/* BNPL ERP — UI Foundation tokens (SSOT mirror of Flutter AppColors / AppTypography / AppSpacing)
   Font: Source Sans 3 only. Do not redefine font-family in feature CSS. */

/* Update gate: never lock document Y scroll — iOS blank/stuck scroll recovery */
body.bnpl-update-blocking {
  overflow-x: clip;
}

body.bnpl-update-blocking #app-view {
  pointer-events: none;
  opacity: 0.96;
}

/* login-view stays interactive during web update reload (iOS blank-screen fix) */
body.bnpl-update-blocking #login-view {
  pointer-events: auto;
  opacity: 1;
}

/* iOS PWA bfcache / stuck hidden — login MUST show when not authenticated */
html:not(.bnpl-app-active) #login-view.login-wrap {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html:not(.bnpl-app-active) #app-splash {
  pointer-events: none;
}
html:not(.bnpl-app-active) #app-splash.hide {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

:root {
  --font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --font-page: 24px;
  --font-section: 20px;
  --font-card: 18px;
  --font-table-header: 17px;
  --font-body: 17px;
  --font-sidebar: 18px;
  --font-button: 17px;
  --font-input: 17px;
  --font-dialog: 17px;
  --font-sidebar-emoji: 24px;
  --font-tooltip: 13px;
  --font-helper: 12px;
  --font-error: 13px;
  --font-success: 13px;

  /* System UI insets — SSOT for iOS PWA + Android/iOS WebView shell */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --bnpl-ui-top: var(--safe-top);
  --bnpl-ui-bottom: var(--safe-bottom);
  --bnpl-keyboard-offset: 0px;
  --bnpl-content-pad-bottom: calc(16px + var(--bnpl-ui-bottom));
  /* Sticky sub-nav (Resource Master tabs) sits below erp-shell-header + breadcrumb */
  --erp-topbar-height: 52px;
  --erp-topbar-actions-height: 0px;
  --erp-crumb-height: 34px;
  --erp-shell-sticky-offset: calc(var(--erp-topbar-height) + var(--erp-topbar-actions-height) + var(--erp-crumb-height) + var(--safe-top));
  --font-small: 13px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --color-primary: #3949AB;
  --color-primary-dark: #303F9F;
  --color-primary-light: #5C6BC0;
  --color-primary-soft: #EEF2FF;
  --color-secondary: #546E7A;

  --color-bg: #F1F5F9;
  --color-surface: #F8FAFC;
  --color-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-divider: #EEF2F7;

  --color-text: #0F172A;
  --color-text-secondary: #1E293B;
  --color-text-muted: #334155;
  /* Typing fields — max contrast (outdoor / sunlight SSOT) */
  --color-input-bg: #FFFFFF;
  --color-input-text: #000000;
  --color-input-border: #94A3B8;
  --color-input-placeholder: #404040;
  --color-on-primary: #FFFFFF;

  --color-success: #2E7D32;
  --color-success-soft: #ECFDF5;
  --color-warning: #F57C00;
  --color-warning-soft: #FFF7ED;
  --color-danger: #C62828;
  --color-danger-soft: #FEF2F2;
  --color-info: #0277BD;
  --color-info-soft: #E1F5FE;

  --color-focus: #3949AB;
  --color-focus-ring: rgba(57, 73, 171, 0.4);
  --color-hover: #F1F5F9;
  --color-selected: #EEF2FF;

  /* Legacy aliases used by existing /m CSS */
  --bnpl-primary: var(--color-primary);
  --bnpl-primary-soft: var(--color-primary-soft);
  --bnpl-primary-border: #C7D2FE;

  /* BNPL UI Template tokens — Vendor reference (reuse Material/Labour/Machine/Fuel) */
  --bnpl-bg: #F5F6F8;
  --bnpl-card-bg: #FFFFFF;
  --bnpl-border: #E2E8F0;
  --bnpl-border-strong: #CBD5E1;
  --bnpl-text: #1A1A1A;
  --bnpl-text-secondary: #334155;
  --bnpl-text-muted: #64748B;
  --bnpl-accent: #3949AB;
  --bnpl-accent-soft: #EEF2FF;
  --bnpl-status-bg: #FFFFFF;
  --bnpl-status-border: #CBD5E1;
  --bnpl-status-text: #475569;
  --bnpl-info-bg: #F1F5F9;
  --bnpl-radius: 12px;
  --bnpl-radius-sm: 8px;
  --bnpl-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  --bnpl-shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.05);
  --bnpl-control-h: 36px;
  --bnpl-control-h-sm: 32px;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --control-height: 48px;
  --button-height: 48px;
  --input-height: 48px;
  --table-row-height: 52px;
  --table-header-height: 48px;
  --touch-min: 44px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;

  /* Control box master — fixed height, content width, unified border (see ERP_CONTROL_BOX_MASTER_LOCK.md) */
  --erp-control-box-height: 40px;
  --erp-control-box-radius: 6px;
  --erp-control-box-border-color: #CBD5E0;
  --erp-control-box-border: 1px solid var(--erp-control-box-border-color);

  /* A4 file-binding gutter SSOT (ERP_A4_BINDING_MARGIN_SSOT_LOCK.md) */
  --erp-a4-binding-left: 24mm;
  --erp-a4-margin-top: 12mm;
  --erp-a4-margin-right: 10mm;
  --erp-a4-margin-bottom: 14mm;
}

/*
 * ERP Control Box Master (LOCKED)
 * Buttons, inputs, selects: same height + same border style; width follows label/content.
 */
html.bnpl-app-active #content .erp-control-box,
html.bnpl-app-active #content button.btn.erp-control-box {
  box-sizing: border-box !important;
  height: var(--erp-control-box-height) !important;
  min-height: var(--erp-control-box-height) !important;
  max-height: var(--erp-control-box-height) !important;
  width: auto !important;
  max-width: 100%;
  padding: 0 14px !important;
  line-height: 1.2 !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #000 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  vertical-align: middle;
}
html.bnpl-app-active #content button.btn.secondary.erp-control-box {
  background: #fff !important;
  border: var(--erp-control-box-border) !important;
  color: #000 !important;
}
html.bnpl-app-active #content button.btn.primary.erp-control-box {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}
/*
 * ERP Button Segment SSOT (LOCKED — ERP_BUTTON_SEGMENT_SSOT_PERMANENT_LOCK.md)
 * Multi-choice rows: OK/Issue etc. Width = text + padding only; inactive border visible.
 */
html.bnpl-app-active #content .erp-btn-segment {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  width: auto !important;
  max-width: 100%;
}
html.bnpl-app-active #content .erp-btn-segment .erp-btn-segment-item,
html.bnpl-app-active #content .erp-btn-segment button.btn.erp-control-box.erp-btn-segment-item {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 88px !important;
  margin: 0 !important;
}
html.bnpl-app-active #content .erp-btn-segment .erp-btn-segment-item.secondary:not(.erp-btn-segment-item--ok-active):not(
    .erp-btn-segment-item--issue-active
  ),
html.bnpl-app-active #content .erp-btn-segment button.erp-btn-segment-item:not(.erp-btn-segment-item--ok-active):not(
    .erp-btn-segment-item--issue-active
  ) {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #64748b !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .erp-btn-segment-item--ok-active,
html.bnpl-app-active #content .erp-btn-segment .erp-btn-segment-item.primary.erp-btn-segment-item--ok-active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab !important;
  -webkit-text-fill-color: #fff !important;
}
/* Language overflow — labels wrap above; boxes stay 40px; buttons grow wider */
html.bnpl-app-active #content .pb-field > span,
html.bnpl-app-active #content label.pb-field > span,
html.bnpl-app-active #content .mboq-field > span,
html.bnpl-app-active #content label.mboq-field > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  line-height: 1.25;
  min-height: 2.5em;
  font-weight: 700 !important;
}
html.bnpl-app-active #content .erp-control-box,
html.bnpl-app-active #content button.btn.erp-control-box {
  overflow: hidden;
  flex-shrink: 0;
}
html.bnpl-app-active #content .mboq-page .action-btn {
  box-sizing: border-box !important;
  width: auto !important;
  max-width: 100% !important;
  height: var(--erp-control-box-height) !important;
  min-height: var(--erp-control-box-height) !important;
  max-height: var(--erp-control-box-height) !important;
  padding: 0 14px !important;
  margin-top: 0 !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  flex-shrink: 0;
  font-weight: 700 !important;
  color: #000 !important;
}
html.bnpl-app-active #content .mboq-page .action-btn.primary {
  background: #3949AB !important;
  color: #fff !important;
  border-color: #3949AB !important;
}
html.bnpl-app-active #content .mboq-page .action-btn .action-icon {
  width: auto !important;
  height: auto !important;
  font-size: 16px !important;
  background: transparent !important;
  border-radius: 0 !important;
  flex-shrink: 0;
}
html.bnpl-app-active #content .mboq-page .action-btn .action-text {
  flex: 0 1 auto !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Language overflow — labels wrap above; boxes stay 40px; buttons grow wider */
html.bnpl-app-active #content .pb-field > span,
html.bnpl-app-active #content label.pb-field > span,
html.bnpl-app-active #content .mboq-field > span,
html.bnpl-app-active #content label.mboq-field > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  line-height: 1.25;
  min-height: 2.5em;
  font-weight: 700 !important;
}
html.bnpl-app-active #content .erp-control-box,
html.bnpl-app-active #content button.btn.erp-control-box {
  overflow: hidden;
  flex-shrink: 0;
}
html.bnpl-app-active #content .mboq-page .action-btn {
  box-sizing: border-box !important;
  width: auto !important;
  max-width: 100% !important;
  height: var(--erp-control-box-height) !important;
  min-height: var(--erp-control-box-height) !important;
  max-height: var(--erp-control-box-height) !important;
  padding: 0 14px !important;
  margin-top: 0 !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  flex-shrink: 0;
  font-weight: 700 !important;
  color: #000 !important;
}
html.bnpl-app-active #content .mboq-page .action-btn.primary {
  background: #3949AB !important;
  color: #fff !important;
  border-color: #3949AB !important;
}
html.bnpl-app-active #content .mboq-page .action-btn .action-icon {
  width: auto !important;
  height: auto !important;
  font-size: 16px !important;
  background: transparent !important;
  border-radius: 0 !important;
  flex-shrink: 0;
}
html.bnpl-app-active #content .mboq-page .action-btn .action-text {
  flex: 0 1 auto !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.bnpl-app-active #content .pb-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
html.bnpl-app-active #content .pb-field select,
html.bnpl-app-active #content .pb-field textarea {
  box-sizing: border-box !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius) !important;
  min-height: var(--erp-control-box-height) !important;
  height: var(--erp-control-box-height) !important;
}

/*
 * ERP filter row + rule/warning display (LOCKED)
 * ERP_CONTROL_BOX_MASTER_LOCK.md · ERP_RULE_WARNING_DISPLAY_LOCK.md
 */
html.bnpl-app-active #content .erp-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
html.bnpl-app-active #content .erp-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}
html.bnpl-app-active #content .erp-filter-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.25;
  min-height: 2.5em;
  display: block;
  white-space: normal;
  word-break: break-word;
  margin: 0;
}
html.bnpl-app-active #content .erp-filter-lbl-spacer {
  display: block;
  user-select: none;
  min-height: 2.5em;
}
html.bnpl-app-active #content .erp-filter-field .erp-control-box,
html.bnpl-app-active #content .erp-filter-field input.erp-control-box,
html.bnpl-app-active #content .erp-filter-field select.erp-control-box {
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: var(--erp-control-box-height) !important;
  height: var(--erp-control-box-height) !important;
  max-height: var(--erp-control-box-height) !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius) !important;
  margin: 0 !important;
}
html.bnpl-app-active #content .erp-rule-warn {
  color: #991b1b !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1.45;
  text-align: left !important;
}
html.bnpl-app-active #content .erp-rule-warn-block {
  margin: 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: var(--erp-control-box-radius);
  background: #fef2f2;
  box-sizing: border-box;
  color: #991b1b !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1.45;
}
html.bnpl-app-active #content .erp-callout-rule {
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  background: #fef2f2;
}
html.bnpl-app-active #content .erp-callout-rule,
html.bnpl-app-active #content .erp-callout-rule .erp-rule-warn {
  color: #991b1b !important;
  font-weight: 700 !important;
}

/*
 * ERP Save footer — Cancel + Save (LOCKED)
 * ERP_SAVE_BUTTON_FOOTER_LOCK.md
 */
html.bnpl-app-active #content .erp-tab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 4px;
  margin-top: auto;
  background: #fff;
  border-top: 2px solid var(--erp-control-box-border-color, #cbd5e0);
  flex-shrink: 0;
}
html.bnpl-app-active #content .erp-tab-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
html.bnpl-app-active #content .erp-tab-actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
html.bnpl-app-active #content .erp-tab-actions .btn.primary.erp-control-box:not(:disabled):not(.erp-save-idle) {
  background: #3949ab !important;
  border-color: #303f9f !important;
  color: #fff !important;
}
html.bnpl-app-active #content .erp-tab-actions .btn.primary.erp-control-box:disabled,
html.bnpl-app-active #content .erp-tab-actions .btn.primary.erp-control-box.erp-save-idle {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
html.bnpl-app-active #content .erp-tab-actions .btn.primary.erp-control-box.erp-save-idle:not(:disabled):hover {
  background: #b8c5d6 !important;
}
html.bnpl-app-active #content .erp-tab-actions-right .erp-control-box,
html.bnpl-app-active #content .erp-tab-actions-right .btn.secondary,
html.bnpl-app-active #content .erp-tab-actions-right .btn.primary {
  height: var(--erp-control-box-height) !important;
  min-height: var(--erp-control-box-height) !important;
  border-radius: var(--erp-control-box-radius) !important;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Responsive shell SSOT — WebView / PWA / desktop (v572+) */
html {
  height: -webkit-fill-available;
}

html.bnpl-viewport-lock,
html.bnpl-viewport-lock body {
  height: var(--bnpl-shell-height, 100%);
  min-height: var(--bnpl-shell-height, 100%);
}

/* Login: allow scroll on iOS/Android browser — prevents blank trapped shell */
html.bnpl-viewport-lock:not(.bnpl-app-active) body {
  max-height: none;
  overflow-x: clip;
  overflow-y: auto;
}

/* Dashboard: grid shell — header + scroll #content + footer at viewport bottom */
html.bnpl-viewport-lock.bnpl-app-active,
html.bnpl-viewport-lock.bnpl-app-active body {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
}

html.bnpl-viewport-lock #login-view.login-wrap:not(.hidden),
html.bnpl-viewport-lock .login-wrap:not(.hidden) {
  min-height: var(--bnpl-shell-height, 100dvh);
  min-height: -webkit-fill-available;
  height: var(--bnpl-shell-height, 100dvh);
  max-height: none;
}

html, body {
  width: 100%;
  margin: 0;
  overflow-x: clip;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: var(--font-family) !important;
  font-size: var(--font-body);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.45;
}

body {
  min-height: var(--bnpl-shell-height, 100dvh);
  min-height: -webkit-fill-available;
  box-sizing: border-box;
}

#login-view.login-wrap,
.login-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: max(16px, var(--safe-top));
  padding-bottom: max(16px, calc(var(--safe-bottom) + var(--bnpl-keyboard-offset, 0px)));
  padding-left: max(12px, var(--safe-left));
  padding-right: max(12px, var(--safe-right));
  box-sizing: border-box;
  background: linear-gradient(135deg, #3949AB 0%, #303F9F 100%);
  z-index: 10;
}

html.bnpl-viewport-lock:not(.bnpl-app-active),
html.bnpl-viewport-lock:not(.bnpl-app-active) body {
  background: linear-gradient(135deg, #3949AB 0%, #303F9F 100%);
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-height: none;
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.bnpl-viewport-lock .login-wrap,
html.bnpl-viewport-lock #login-view.login-wrap {
  min-height: var(--bnpl-shell-height, 100dvh);
  min-height: -webkit-fill-available;
  height: var(--bnpl-shell-height, 100dvh);
  max-height: none;
}

#app-view {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
  overflow-y: visible;
}

/* Post-login shell — grid: header | scroll #content | footer at viewport bottom */
#app-view.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  z-index: 1;
  background: var(--bnpl-bg);
}

#app-view.active > .erp-shell-header {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 40;
}

#app-view.active > #content,
#app-view.active > .content {
  grid-row: 2;
  grid-column: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  width: 100%;
  box-sizing: border-box;
}

#app-view.active > .erp-page-footer {
  grid-row: 3;
  grid-column: 1;
  flex-shrink: 0;
  margin-top: 0;
}

#app-view.active > .side-drawer,
#app-view.active > #sysAdminGate,
#app-view.active > #nav {
  grid-row: 1 / -1;
  grid-column: 1;
}

/* Desktop pinned drawer — footer aligns with content column */
@media (min-width: 1100px) {
  #app-view.erp-drawer-pinned-active > .erp-page-footer {
    margin-left: min(300px, 28vw);
    max-width: calc(100% - min(300px, 28vw));
    width: auto;
  }
}

/* Post-login ERP shell — white/neutral workspace (no blue bleed on any platform) */
html.bnpl-app-active,
html.bnpl-app-active body {
  background: var(--bnpl-bg);
}

html.bnpl-app-active #content {
  background: var(--bnpl-bg);
}

/* Android WebView shell — login height SSOT; post-login = full grey workspace */
html.bnpl-android-shell:not(.bnpl-app-active),
html.bnpl-android-shell:not(.bnpl-app-active) body {
  height: var(--bnpl-shell-height, 100dvh);
  min-height: var(--bnpl-shell-height, 100dvh);
  max-height: var(--bnpl-shell-height, 100dvh);
  overflow: hidden;
}

/* Android post-login — ZERO blue bleed (native WebView letterbox / safe-area) */
html.bnpl-android-shell.bnpl-app-active,
html.bnpl-android-shell.bnpl-app-active body {
  height: 100%;
  min-height: 100%;
  max-height: none;
  overflow: hidden;
  background: var(--bnpl-bg) !important;
}

html.bnpl-android-shell.bnpl-app-active #app-view,
html.bnpl-android-shell.bnpl-app-active #app-view.active {
  background: var(--bnpl-bg) !important;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
}

html.bnpl-android-shell.bnpl-app-active #content,
html.bnpl-android-shell.bnpl-app-active .erp-shell-header {
  background: var(--bnpl-bg);
}

/* Login: full viewport — never clip WebView to partial height (half-screen boxed login) */
html.bnpl-android-shell:not(.bnpl-app-active),
html.bnpl-android-shell:not(.bnpl-app-active) body,
html.bnpl-ios-standalone:not(.bnpl-app-active),
html.bnpl-ios-standalone:not(.bnpl-app-active) body {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-height: none;
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.bnpl-android-shell:not(.bnpl-app-active) #login-view.login-wrap,
html.bnpl-android-shell:not(.bnpl-app-active) .login-wrap,
html.bnpl-ios-standalone:not(.bnpl-app-active) #login-view.login-wrap,
html.bnpl-ios-standalone:not(.bnpl-app-active) .login-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  z-index: 10;
}

html.bnpl-android-shell:not(.bnpl-app-active),
html.bnpl-android-shell:not(.bnpl-app-active) body,
html.bnpl-android-shell body.bnpl-logged-out,
html.bnpl-viewport-lock:not(.bnpl-app-active) body {
  background: linear-gradient(135deg, #3949AB 0%, #303F9F 100%);
}

html.bnpl-android-shell.bnpl-app-active,
html.bnpl-android-shell.bnpl-app-active body {
  background: var(--bnpl-bg) !important;
}

html.bnpl-android-shell #login-view.login-wrap,
html.bnpl-android-shell .login-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--bnpl-shell-height, 100dvh);
  min-height: var(--bnpl-shell-height, 100dvh);
  max-height: none;
  z-index: 10;
  margin: 0;
}

html.bnpl-android-shell #app-view.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

html.bnpl-android-shell #app-splash {
  height: var(--bnpl-shell-height, 100dvh);
}

/* iOS Home Screen PWA — login height SSOT; post-login full grey workspace */
html.bnpl-ios-standalone:not(.bnpl-app-active),
html.bnpl-ios-standalone:not(.bnpl-app-active) body {
  height: var(--bnpl-shell-height, 100dvh);
  min-height: var(--bnpl-shell-height, 100dvh);
  max-height: var(--bnpl-shell-height, 100dvh);
  overflow: hidden;
  background: linear-gradient(135deg, #3949AB 0%, #303F9F 100%);
}

html.bnpl-ios-standalone.bnpl-app-active,
html.bnpl-ios-standalone.bnpl-app-active body {
  height: 100%;
  min-height: 100%;
  max-height: none;
  overflow: hidden;
  background: var(--bnpl-bg) !important;
}

html.bnpl-ios-standalone #login-view.login-wrap,
html.bnpl-ios-standalone .login-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-height: none;
  z-index: 10;
  margin: 0;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.bnpl-ios-standalone #login-view.login-wrap .card,
html.bnpl-ios-standalone .login-wrap .card {
  margin: 0 !important;
  flex-shrink: 0;
}
html.bnpl-ios-standalone:not(.bnpl-app-active) body {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

html.bnpl-viewport-lock.bnpl-ios-standalone:not(.bnpl-app-active) body {
  background: linear-gradient(135deg, #3949AB 0%, #303F9F 100%);
}

html.bnpl-ios-standalone #app-view.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bnpl-bg);
}

html.bnpl-ios-standalone.bnpl-app-active,
html.bnpl-ios-standalone.bnpl-app-active body {
  background: var(--bnpl-bg);
}

/* iOS PWA — login must paint on first frame (before Firebase/splash init) */
html.bnpl-ios-standalone:not(.bnpl-app-active) #app-splash {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html.bnpl-ios-standalone:not(.bnpl-app-active) #login-view.login-wrap {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 20;
}

html.bnpl-ios-standalone #app-splash {
  height: var(--bnpl-shell-height, 100dvh);
}

/* ═══ Mobile login SSOT — full viewport width/height (iOS + Android + ≤768px) ═══ */
html.bnpl-mobile-login:not(.bnpl-app-active) #login-view.login-wrap,
html.bnpl-mobile-login:not(.bnpl-app-active) .login-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  min-height: var(--bnpl-shell-height, 100dvh) !important;
  min-height: -webkit-fill-available !important;
  height: var(--bnpl-shell-height, 100dvh) !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  background: #fff !important;
}

html.bnpl-mobile-login:not(.bnpl-app-active) #login-view.login-wrap:not(.hidden) {
  padding-bottom: 0 !important;
}

html.bnpl-mobile-login #login-view.login-wrap .card,
html.bnpl-mobile-login .login-wrap .card {
  width: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
}

html.bnpl-mobile-login:not(.bnpl-app-active),
html.bnpl-mobile-login:not(.bnpl-app-active) body {
  background: #fff !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

html.bnpl-mobile-login.bnpl-ios-standalone:not(.bnpl-app-active) body,
html.bnpl-mobile-login.bnpl-android-shell:not(.bnpl-app-active) body {
  height: auto !important;
  min-height: var(--bnpl-shell-height, 100dvh) !important;
  max-height: none !important;
}

html.bnpl-mobile-login.bnpl-viewport-lock.bnpl-ios-standalone:not(.bnpl-app-active) body,
html.bnpl-mobile-login.bnpl-viewport-lock.bnpl-android-shell:not(.bnpl-app-active) body {
  background: #fff !important;
}

html.bnpl-mobile-login.bnpl-ios-standalone #login-view.login-wrap,
html.bnpl-mobile-login.bnpl-android-shell #login-view.login-wrap {
  align-items: stretch !important;
  justify-content: flex-start !important;
}

html.bnpl-mobile-login #loginCopyDock,
html.bnpl-mobile-login #loginChannelHost {
  display: none !important;
}

html.bnpl-mobile-login #loginBuildBadge {
  margin: 0 0 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

html.bnpl-mobile-login #login-view.login-wrap h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

html.bnpl-mobile-login #login-view.login-wrap .sub {
  margin-bottom: 14px;
}

html.bnpl-mobile-login #login-view.login-wrap #lang-row {
  margin-bottom: 16px;
}

html.bnpl-mobile-login #login-view.login-wrap .action-btn.primary,
html.bnpl-mobile-login #login-view.login-wrap input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  font-size: 16px;
}

html.bnpl-mobile-login #login-view.login-wrap label {
  font-size: 14px;
  font-weight: 600;
}

/* Dashboard home — scroll room without artificial blank band */
.dash-home.cc-home {
  padding-bottom: 0;
}

.dash-home.cc-home > .dash-actions-grid {
  overflow: visible;
}

.erp-shell-header {
  padding-top: var(--bnpl-ui-top);
  box-sizing: border-box;
  flex-shrink: 0;
}

#content,
.content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-padding-bottom: var(--bnpl-content-pad-bottom);
  padding: 12px;
  padding-left: max(12px, var(--safe-left));
  padding-right: max(12px, var(--safe-right));
  padding-bottom: var(--bnpl-content-pad-bottom);
}

html.bnpl-android-shell #content .list {
  padding-bottom: 8px;
}

*:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.section-title {
  font-size: var(--font-page) !important;
  font-weight: var(--weight-bold) !important;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
  line-height: 1.3;
}

.dash-section-title,
h3.erp-section {
  font-size: var(--font-section) !important;
  font-weight: var(--weight-semibold) !important;
  color: var(--color-text);
}

.erp-card-title,
.co-detail-card h4 {
  font-size: var(--font-card) !important;
  font-weight: var(--weight-semibold) !important;
}

.hint, .erp-helper {
  font-size: var(--font-helper) !important;
  color: var(--color-text-muted);
}

.err, .erp-error {
  font-size: var(--font-error) !important;
}

.erp-success, .role-save-toast {
  font-size: var(--font-success) !important;
}

button, .btn, .action-btn {
  font-family: var(--font-family) !important;
  font-size: var(--font-button) !important;
  font-weight: var(--weight-medium) !important;
  min-height: var(--button-height);
  border-radius: var(--radius);
}

input, select, textarea {
  font-family: var(--font-family) !important;
  font-size: var(--font-input) !important;
  min-height: var(--input-height);
  border-radius: var(--radius);
  border: 1px solid var(--color-input-border);
  color: var(--color-input-text);
  background-color: var(--color-input-bg);
}

/* All user-typed fields — milk white + pure black (not dim slate/gray) */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]):not([type="image"]),
select,
textarea {
  background-color: var(--color-input-bg) !important;
  color: var(--color-input-text) !important;
  -webkit-text-fill-color: var(--color-input-text);
  caret-color: var(--color-input-text);
  font-weight: var(--weight-medium);
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
  color: var(--color-input-placeholder);
  opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill,
input:not([type="checkbox"]):not([type="radio"]):-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--color-input-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--color-input-bg) inset !important;
  -webkit-text-fill-color: var(--color-input-text) !important;
  caret-color: var(--color-input-text);
}

select option {
  background: var(--color-input-bg);
  color: var(--color-input-text);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

table th {
  font-size: var(--font-table-header) !important;
  font-weight: var(--weight-semibold) !important;
}

table td {
  font-size: var(--font-body) !important;
}

.side-drawer .nav-item {
  font-size: calc(var(--font-sidebar) - 1px) !important;
  font-weight: var(--weight-semibold) !important;
  min-height: 38px;
  line-height: 1.25;
  border-left: 3px solid transparent;
}

.side-drawer .zone-head {
  font-size: var(--font-sidebar) !important;
  font-weight: var(--weight-bold) !important;
  min-height: 40px;
  line-height: 1.2;
}

.side-drawer .nav-zone-block--open .zone-items {
  border-left: 3px solid #94A3B8;
}

.side-drawer .nav-sub-group {
  margin: 0 0 4px 0;
}

.side-drawer .nav-sub-group-head {
  width: calc(100% - 4px);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 4px;
  padding: 5px 10px 5px 12px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: var(--font-sidebar);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  line-height: 1.25;
}

.side-drawer .nav-sub-group-head:hover {
  background: #f8fafc;
  color: #1E293B;
}

.side-drawer .nav-sub-group--open > .nav-sub-group-head {
  color: #3949ab;
  font-weight: 700;
}

.side-drawer .nav-sub-group-head .nav-sub-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.side-drawer .nav-sub-group-head .nav-sub-twist {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.side-drawer .nav-sub-group-head .nav-sub-twist::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}

.side-drawer .nav-sub-group--open > .nav-sub-group-head .nav-sub-twist::after {
  transform: rotate(45deg);
  margin-top: -2px;
  border-color: #3949ab;
}

.side-drawer .nav-sub-group-items {
  margin: 0 0 2px 12px;
  padding: 0 0 2px 10px;
  border-left: 2px solid #cbd5e1;
}

.side-drawer .nav-sub-group-items.collapsed {
  display: none;
}

.side-drawer .nav-item.nav-item--nested {
  width: calc(100% - 2px);
  margin-left: 2px;
  padding-left: 10px;
}

.side-drawer .zone-head .zone-label {
  font-size: var(--font-sidebar) !important;
}

.side-drawer .nav-item:hover {
  background: var(--color-hover);
}

.side-drawer .nav-item.active {
  background: var(--color-selected) !important;
  color: var(--color-primary) !important;
  font-weight: var(--weight-semibold) !important;
  border-left-color: var(--color-primary) !important;
}

.side-drawer .zone-head:focus-visible,
.side-drawer .nav-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: var(--color-hover);
  box-shadow: inset 0 0 0 1px var(--color-focus-ring);
}

.co-line {
  min-height: var(--table-row-height);
  border-left: 4px solid transparent;
}

.co-line:hover {
  background: var(--color-hover);
}

.co-line.selected,
.co-line.role-tree-leaf.selected,
.co-line.role-tree-child.selected {
  background: var(--color-primary) !important;
  border-left-color: var(--color-primary-dark) !important;
}

.co-line.selected .name,
.co-line.role-tree-leaf.selected .name,
.co-line.role-tree-child.selected .name {
  color: var(--color-on-primary) !important;
  font-weight: var(--weight-bold) !important;
}

.topbar,
.erp-nav,
.erp-crumb-row,
.content,
.side-drawer,
.card,
.co-master,
.role-workspace {
  font-family: var(--font-family);
}

@media (max-width: 900px) {
  :root {
    --font-body: 17px;
    --font-sidebar: 18px;
    --font-button: 17px;
    --font-input: 17px;
  }
  /* Drawer row height: erp-dashboard-polish.css DRAWER-NAV-COMPACT (not 52px — long module list) */
}

/* Full-bleed content for Role Engine */
#content.role-fullbleed {
  max-width: none !important;
  width: 100% !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* Keyboard focus visibility (enterprise) */
.kb-focus:not(.role-mod-row) {
  outline: 2px solid var(--color-focus) !important;
  outline-offset: -2px;
}

/* Module Explorer tree — compact enterprise navigation */
.role-mod-row.selected {
  background: var(--color-primary) !important;
  border-left-color: var(--color-primary-dark) !important;
  color: var(--color-on-primary) !important;
}
.role-mod-row.selected .name {
  color: var(--color-on-primary) !important;
  font-weight: var(--weight-bold) !important;
}

/* —— Access Control matrix —— */
.ac-page { display: flex; flex-direction: column; gap: 0; min-height: 60vh; }
.ac-top {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  align-items: flex-start; padding: 4px 0 12px;
  border-bottom: 1px solid var(--color-border);
}
.ac-top-right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ac-wizard-btn {
  background: linear-gradient(180deg, #4338CA 0%, #3730A3 100%);
  border: 1.5px solid #312E81;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.25);
}
.ac-wizard-btn:hover:not(:disabled) { filter: brightness(1.06); }
.ac-wizard-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ac-wizard-modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.ac-wiz-progress {
  display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap;
}
.ac-wiz-progress span {
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: #F1F5F9; color: #64748B;
}
.ac-wiz-progress span.on { background: #EEF2FF; color: #3730A3; }
.ac-wiz-step { margin: 0 0 12px; font-weight: 700; color: #334155; font-size: 14px; }
.ac-wiz-radios { display: flex; flex-direction: column; gap: 8px; }
.ac-wiz-radio {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1.5px solid #E2E8F0; border-radius: 10px;
  cursor: pointer; font-weight: 600; margin: 0 !important;
}
.ac-wiz-radio:has(input:checked) {
  border-color: #6366F1; background: #EEF2FF;
}
.ac-wiz-radio input { width: 18px !important; margin: 0 !important; }
.ac-wiz-roles {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 280px; overflow: auto; margin: 8px 0;
  border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px;
}
.ac-wiz-role {
  display: flex; align-items: center; gap: 8px;
  margin: 0 !important; padding: 6px 4px;
  border-bottom: 1px solid #F1F5F9; font-size: 13px;
}
.ac-wiz-role input { width: 16px !important; margin: 0 !important; }
.ac-wiz-role span { color: #64748B; font-weight: 700; min-width: 36px; }
.ac-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: #065F46; color: #ECFDF5; padding: 12px 18px; border-radius: 999px;
  font-weight: 800; font-size: 14px; z-index: 300;
  box-shadow: 0 10px 28px rgba(6, 95, 70, 0.35);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.ac-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ac-exceptions-link {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  color: #92400E;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.ac-exceptions-link:hover:not(:disabled) { background: #FEF3C7; }
.ac-exceptions-link:disabled { opacity: 0.45; cursor: not-allowed; }
.ac-exceptions-modal { width: min(900px, 100%); max-height: 90vh; overflow: auto; }
.ac-exceptions-table-wrap { overflow: auto; max-height: 55vh; margin-top: 8px; }
.ac-exceptions-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.ac-exceptions-table th, .ac-exceptions-table td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid #E2E8F0;
  vertical-align: top;
}
.ac-exceptions-table th { color: #64748B; font-size: 12px; }
.ac-exceptions-acts { color: #334155; line-height: 1.4; }
.ac-exceptions-table .ac-btn-danger {
  white-space: nowrap; font-size: 12px; padding: 6px 10px;
}
.ac-top-controls {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  width: 100%;
  padding: 10px 0 4px;
}
.ac-top-controls select, .ac-top-controls input { min-width: 160px; }
.ac-role-settings {
  width: 100%;
  margin: 8px 0 4px;
  padding: 12px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
}
.ac-role-settings-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.ac-role-checker-label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
}
.ac-role-checker-hint { margin: 6px 0 0 24px; font-size: 12px; }
.role-settings-strip {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
}
.ac-top-controls .primary,
.ac-top-controls .ac-btn-outline {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.ac-btn-outline {
  background: #fff;
  border: 1.5px solid var(--color-primary, #3949AB);
  color: var(--color-primary, #3949AB);
}
.ac-btn-outline:hover:not(:disabled) { background: #EEF2FF; }
.ac-btn-outline:disabled { opacity: 0.45; cursor: not-allowed; }
.ac-top-controls .ac-btn-danger {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  color: #B91C1C;
}
.ac-btn-danger:hover:not(:disabled) { background: #FEE2E2; border-color: #FCA5A5; }
.ac-btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }
.ac-modal .ac-modal-actions .ac-btn-danger { min-width: 120px; }
.ac-body { flex: 1; overflow: auto; padding: 8px 0 16px; }
.ac-row-lock { background: #FFF7F7; }
.ac-lock-tag {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800;
  color: #B91C1C; background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: 4px; padding: 1px 6px; vertical-align: middle;
}
.ac-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ac-modal {
  width: min(420px, 100%); background: #fff; border-radius: 12px;
  padding: 20px; border: 1px solid #C7D2FE;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}
.ac-modal h3 { margin: 0 0 8px; font-size: 18px; color: #303F9F; }
.ac-modal p { margin: 0 0 12px; font-size: 13px; color: #475569; line-height: 1.45; }
.ac-modal label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ac-modal input {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid #CBD5E1; border-radius: 8px; font-size: 14px;
}
.ac-modal-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;
}
.ac-modal-actions .primary,
.ac-modal-actions .ac-btn-outline,
.ac-modal-actions .ac-btn-danger {
  width: auto !important;
  min-width: 88px;
}

.ac-bulk {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--color-primary-soft);
  border-radius: 8px;
}
.ac-bulk-title {
  font-size: var(--font-small);
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
}
.ac-bulk-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}
.ac-master {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0 10px 0 0;
  font-size: var(--font-small);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.ac-master input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.ac-master span { line-height: 1; }
.ac-bulk-sep {
  display: inline-block;
  margin: 0 8px 0 0;
  color: var(--color-border);
  font-weight: 400;
  user-select: none;
}

.ac-mod-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px; margin: 14px 0 6px; font-weight: var(--weight-bold);
}
.ac-mod-links .linkish, .st-page .linkish {
  background: none; border: none; color: var(--color-primary); cursor: pointer;
  font: inherit; padding: 0 2px; text-decoration: underline;
}
.ac-mod-links .linkish.danger { color: #B91C1C; }
.ac-empty-mod { margin: 0 0 12px 8px; font-style: italic; }

/*
 * Activity matrix — one shared 7-column grid per row.
 * Activity = 40%; remaining 6 columns share 60% evenly.
 * Override global `input { width:100% }` so checkboxes/day fields don't blow columns.
 */
.ac-matrix {
  --ac-cols: 40% repeat(6, minmax(0, 1fr));
  overflow-x: auto;
  margin-bottom: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-card);
}
.ac-grid {
  display: grid;
  grid-template-columns: var(--ac-cols);
  align-items: center;
  width: 100%;
  min-width: 720px;
  box-sizing: border-box;
}
.ac-grid-head {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
}
.ac-grid-row {
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--font-body);
}
.ac-grid-row:last-child { border-bottom: none; }
.ac-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 10px 10px;
  box-sizing: border-box;
  min-width: 0;
  text-align: left;
}
.ac-col-name { padding-left: 14px; }
.ac-col-check,
.ac-col-days {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.ac-grid-head .ac-col {
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}
/* Kill global width:100% on matrix inputs */
.ac-matrix input[type="checkbox"] {
  width: 16px !important;
  max-width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  flex: 0 0 16px;
  accent-color: var(--color-primary);
}
.ac-matrix input.ac-days,
.ac-matrix .ac-days {
  width: 70px !important;
  max-width: 70px !important;
  min-width: 60px !important;
  height: 32px !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 4px 6px !important;
  flex: 0 0 70px;
  text-align: left;
  box-sizing: border-box;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff !important;
  color: #0F172A;
  cursor: text;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
  -webkit-user-select: text;
  user-select: text;
  opacity: 1;
}
.ac-matrix .ac-days:focus {
  outline: 2px solid #A5B4FC;
  border-color: #3949AB;
  background: #fff !important;
}
.ac-matrix .ac-days:disabled,
.ac-matrix input.ac-days:disabled {
  opacity: 0.55;
  background: #F1F5F9 !important;
  color: #94A3B8 !important;
  cursor: not-allowed !important;
  border-color: #E2E8F0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.ac-code { font-size: var(--font-helper); color: var(--color-text-secondary); }
.ac-bottom {
  position: sticky; bottom: 0; padding: 10px 0 4px; text-align: right;
  background: linear-gradient(transparent, var(--color-bg) 30%);
}

/* —— Role & Access Control v713 — master-detail (Company v711 parity) —— */
.rac-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  min-height: 60vh;
  box-sizing: border-box;
}
.rac-shell button,
.rac-shell .primary,
.rac-shell .ac-btn-outline,
.rac-shell .ac-btn-danger,
.rac-shell .action-btn {
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
}
.rac-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.rac-page-head .section-title { margin: 0 0 4px; }
.rac-subtitle { margin: 0; text-align: left; }
.rac-master {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  min-height: 480px;
}
@media (min-width: 900px) {
  .rac-master { flex-direction: row; min-height: 560px; align-items: stretch; }
}
.rac-list-pane {
  flex: 0 0 auto;
  width: 100%;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  max-height: 46vh;
}
@media (min-width: 900px) {
  .rac-list-pane {
    width: 32%;
    min-width: 260px;
    max-width: 360px;
    max-height: none;
    border-bottom: 0;
    border-right: 1px solid #e2e8f0;
  }
}
.rac-list-head {
  padding: 12px 12px 8px;
  border-bottom: 1px solid #eef2f7;
}
.rac-list-head h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.rac-list-search {
  width: 100% !important;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
.rac-add-role-btn {
  width: 100% !important;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  cursor: pointer;
}
.rac-add-role-btn:hover:not(:disabled) { background: #dbeafe; }
.rac-add-role-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rac-role-list {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.rac-role-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f7;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.rac-role-line:hover { background: #f1f5f9; }
.rac-role-line.selected {
  background: var(--bnpl-primary-soft, #eef2ff);
  border-left-color: var(--bnpl-primary, #3949ab);
}
.rac-role-line.selected .rac-role-name {
  font-weight: 800;
  color: var(--bnpl-primary, #3949ab);
}
.rac-role-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #3949ab;
}
.rac-role-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}
.rac-list-foot {
  padding: 8px 12px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #eef2f7;
}
.rac-detail-pane {
  flex: 1;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.rac-detail-inner {
  flex: 1;
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) {
  .rac-detail-inner { padding: 14px 16px; }
}
.rac-mobile-back {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #3949ab;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100% !important;
  text-align: left;
}
.rac-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.rac-hero-main { flex: 1; min-width: 180px; }
.rac-hero-main h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}
.rac-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
}
.rac-hero-desc {
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}
.rac-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rac-hero-actions .ac-btn-outline,
.rac-hero-actions .ac-btn-danger {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
}
.rac-empty-card {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  margin: 12px 0;
}
.rac-empty-card p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.5; }
.rac-save-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  bottom: 0;
  z-index: 5;
}
.rac-save-bar .primary {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}
.rac-save-bar .primary:disabled { opacity: 0.5; cursor: not-allowed; }
.rac-mod-title { font-weight: 700; color: #1e293b; }
.rac-shell .rac-matrix-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.rac-shell .rac-matrix-toolbar .rac-matrix-filters {
  flex: 1 1 280px;
  margin: 0;
  min-width: 0;
}
.rac-shell .rac-bulk-panel {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-primary-soft, #eef2ff);
  border-radius: 8px;
  margin-left: auto;
}
.rac-shell .rac-bulk-panel .ac-bulk-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.rac-shell .ac-mod-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
}
.rac-shell .ac-mod-head .rac-mod-title {
  flex: 0 1 auto;
  min-width: 0;
}
.rac-shell .ac-mod-head .ac-mod-links {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}
.rac-matrix-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.rac-filter-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  width: auto !important;
  box-sizing: border-box;
}
.rac-filter-search {
  flex: 1 1 160px;
  min-width: 120px;
  max-width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: auto !important;
  box-sizing: border-box;
}
.rac-filter-empty { padding: 16px; text-align: center; }
@media (min-width: 900px) {
  .rac-matrix-filters { flex-wrap: nowrap; }
  .rac-filter-search { flex: 1 1 auto; max-width: 320px; }
}
.ac-matrix.rac-matrix { --ac-cols: 26% 16% repeat(6, minmax(0, 1fr)); min-width: 780px; }
.ac-col-code {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  font-family: ui-monospace, monospace;
  word-break: break-all;
  justify-content: flex-start;
  align-items: center;
}
.ac-grid-head .ac-col-code {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
}
/* Role & Access Control — visual polish (scoped; v716) */
.rac-shell .co-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  line-height: 1.2;
  flex-shrink: 0;
}
.rac-shell .co-status.on {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}
.rac-shell .co-status.on i {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
.rac-shell .rac-role-line .co-status {
  font-size: 11px;
  padding: 2px 8px 2px 6px;
}
.rac-shell .rac-hero-meta > span:not(.co-status) {
  color: #64748b;
}
.rac-shell .ac-bulk-title {
  color: #334155;
  font-weight: 700;
}
.rac-shell .ac-master span {
  color: #1e293b;
  font-weight: 600;
  font-size: 13px;
}
.rac-shell .ac-matrix.rac-matrix .ac-col-code {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}
.rac-shell .ac-matrix.rac-matrix .ac-grid-head .ac-col-code {
  color: #334155;
}
.rac-shell .ac-matrix.rac-matrix .ac-grid-row .ac-col-name b {
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
}
.rac-shell .ac-matrix.rac-matrix .ac-grid-head .ac-col {
  color: #334155;
  font-weight: 700;
}
@media (max-width: 899px) {
  .rac-matrix-filters { gap: 6px; }
  .rac-filter-select { flex: 1 1 calc(50% - 4px); min-width: 140px; }
  .rac-filter-search { flex: 1 1 100%; }
  .rac-shell .rac-matrix-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .rac-shell .rac-bulk-panel {
    margin-left: 0;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
  }
  .rac-shell .rac-bulk-panel .ac-bulk-row {
    justify-content: flex-start;
  }
  .rac-shell .ac-mod-head .ac-mod-links {
    white-space: normal;
  }
  .rac-shell.rac-show-detail .rac-list-pane { display: none; }
  .rac-shell.rac-show-detail .rac-mobile-back { display: flex; }
  .rac-shell:not(.rac-show-detail) .rac-detail-pane { display: none; }
  .rac-shell.rac-show-detail .rac-detail-pane { display: flex; }
  .rac-list-pane { max-height: none; flex: 1; }
  .rac-master { min-height: 420px; }
}

.la-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 108px;
  max-width: 560px;
  margin: 0 auto;
}
.la-offline-badge {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -4px 0 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #FACC15;
  color: #713F12;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 rgba(113, 63, 18, 0.12);
}
.la-offline-sync { background: #E0F2FE; color: #075985; }
.la-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.la-verify {
  width: 100% !important;
  min-height: 52px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}
.la-site {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  font-size: var(--font-body);
}
.la-site-ico { font-size: 22px; line-height: 1.2; }
.la-banner {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}
.la-banner-solid-green {
  background: #059669;
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.28);
}
.la-banner-solid-red {
  background: #DC2626;
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
}
.la-banner-meta { font-weight: 600; opacity: 0.9; }
.la-banner-green { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.la-banner-red { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.la-banner-amber { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.la-banner-muted { background: var(--color-surface); color: var(--color-text-secondary); border: 1px solid var(--color-border); font-weight: 600; }
.la-list { display: flex; flex-direction: column; gap: 10px; }
.la-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.la-identity { line-height: 1.35; }
.la-name { font-weight: 800; font-size: 15px; }
.la-cat {
  display: inline-block;
  margin-left: 2px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #F1F5F9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.la-type { font-size: var(--font-helper); color: var(--color-text-secondary); margin-top: 4px; }
.la-status {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0 10px;
}
.la-pill {
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 6px !important;
  border-radius: 12px !important;
  border: 1.5px solid #CBD5E1 !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}
.la-pill.on.present {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
}
.la-pill.on.half {
  background: #D97706 !important;
  border-color: #D97706 !important;
  color: #fff !important;
}
.la-pill.on.absent {
  background: #64748B !important;
  border-color: #64748B !important;
  color: #fff !important;
}
.la-ot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}
.la-ot {
  width: 88px !important;
  max-width: 88px !important;
  margin: 0 !important;
  text-align: center;
  min-height: 40px !important;
  border-radius: 10px !important;
}
.la-empty {
  text-align: center;
  padding: 28px 14px;
  background: var(--color-card);
  border: 1px dashed var(--color-border);
  border-radius: 14px;
}
.la-sheet-locked { color: var(--color-text-secondary); }
.la-loading { padding: 16px; }
.la-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(transparent, var(--color-bg) 22%, var(--color-bg));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 560px;
  margin: 0 auto;
}
.la-submit {
  width: 100% !important;
  min-height: 52px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}
.la-submit:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }
.la-bottom-hint { text-align: center; margin: 6px 0 0; }

/* AI Face Verification panel */
.la-face-panel {
  margin-top: 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, #F8FAFC 0%, #EEF2FF 100%);
}
.la-face-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.la-face-file {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.la-face-file input { font-size: 13px; }
.la-face-run { width: 100% !important; min-height: 48px !important; font-weight: 800 !important; }
.la-face-banner {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}
.la-face-fraud { background: #DC2626; color: #fff; }
.la-face-ok { background: #059669; color: #fff; }
.la-face-pending { background: #F59E0B; color: #422006; }
.la-face-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.la-face-ok-chip {
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: #D1FAE5;
  padding: 2px 8px;
  border-radius: 6px;
}
.la-face-miss-chip {
  font-size: 11px;
  font-weight: 700;
  color: #92400E;
  background: #FEF3C7;
  padding: 2px 8px;
  border-radius: 6px;
}
.la-face-enroll {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.la-face-enroll input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Labour supplier proforma — one field per line (mobile) */
html.bnpl-app-active #content .la-mark-page.staff-co-page:not(.la-mark-page--register) {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 4px 16px;
}
html.bnpl-app-active #content .la-mark-page--register {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 8px 20px !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .la-mark-register-staff-wrap {
  width: 100%;
  max-width: none;
}
html.bnpl-app-active #content .la-staff-register-mount .staff-att-sheet.erp-register-desktop {
  max-width: none;
  width: 100%;
}
html.bnpl-app-active #content .la-mark-staff-register-hint {
  max-width: 1123px;
  font-weight: 700 !important;
  color: #000000 !important;
  margin: 0 0 8px !important;
}
html.bnpl-app-active #content .la-staff-punch-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
html.bnpl-app-active #content .la-labour-punch-log {
  max-width: 520px;
}
html.bnpl-app-active #content .la-mark-staff-punch-hint {
  font-weight: 700 !important;
  color: #000000 !important;
  margin: 0 0 8px !important;
}
html.bnpl-app-active #content .la-mark-register-staff-wrap {
  width: 100%;
  max-width: none;
}
html.bnpl-app-active #content .la-staff-register-mount .staff-att-sheet.erp-register-desktop {
  max-width: none;
  width: 100%;
}
html.bnpl-app-active #content .la-mark-staff-register-hint {
  max-width: 1123px;
  font-weight: 700 !important;
  color: #000000 !important;
  margin: 0 0 8px !important;
}
html.bnpl-app-active #content .la-staff-punch-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
html.bnpl-app-active #content .la-labour-punch-log {
  max-width: 520px;
}
html.bnpl-app-active #content .la-mark-staff-punch-hint {
  font-weight: 700 !important;
  color: #000000 !important;
  margin: 0 0 8px !important;
}
html.bnpl-app-active #content .la-mark-register-sheet {
  width: 100%;
  max-width: 1123px;
  margin: 0;
  padding: 16px 18px 20px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
html.bnpl-app-active #content .la-mark-register-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  position: relative;
}
html.bnpl-app-active #content .la-mark-register-toolbar .erp-rd-anchor {
  position: relative;
}
html.bnpl-app-active #content .la-mark-page--register .la-reg-wrap {
  overflow-x: auto;
  max-width: 100%;
}
html.bnpl-app-active #content .la-mark-page--register .staff-co-table.la-reg-table {
  min-width: 100%;
  width: max-content;
  font-size: 13px !important;
}
html.bnpl-app-active #content .la-punch-step-meta {
  margin: 6px 0 0 0;
  padding: 0 2px 8px;
}
html.bnpl-app-active #content .la-punch-step-meta .staff-a1-punch-log-time {
  margin: 4px 0 2px !important;
  font-weight: 700 !important;
  color: #000000 !important;
}
html.bnpl-app-active #content .la-mark-checker-note {
  margin: 8px 0 0 !important;
  max-width: 1123px;
  font-weight: 700 !important;
  color: #000000 !important;
}
html.bnpl-app-active #content .la-reg-verify-label {
  font-size: 12px;
  font-weight: 700;
  color: #000000 !important;
}
.la-reg-row-modal .la-reg-punch-thumb {
  max-width: 120px;
  max-height: 90px;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
}
.la-reg-row-modal .la-reg-punch-log {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.la-reg-row-modal .la-reg-checker-actions {
  margin-top: 12px;
}
html.bnpl-app-active #content .la-punch-step-meta {
  margin: 6px 0 0 0;
  padding: 0 2px 8px;
}
html.bnpl-app-active #content .la-punch-step-meta .staff-a1-punch-log-time {
  margin: 4px 0 2px !important;
  font-weight: 700 !important;
  color: #000000 !important;
}
html.bnpl-app-active #content .la-mark-checker-note {
  margin: 8px 0 0 !important;
  max-width: 1123px;
  font-weight: 700 !important;
  color: #000000 !important;
}
html.bnpl-app-active #content .la-reg-verify-label {
  font-size: 12px;
  font-weight: 700;
  color: #000000 !important;
}
.la-reg-row-modal .la-reg-punch-thumb {
  max-width: 120px;
  max-height: 90px;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
}
.la-reg-row-modal .la-reg-punch-log {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.la-reg-row-modal .la-reg-checker-actions {
  margin-top: 12px;
}
html.bnpl-app-active #content .la-mark-page .staff-co-heading,
html.bnpl-app-active #content .la-mark-page .la-mark-title {
  margin: 0 0 6px !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #000000 !important;
}
html.bnpl-app-active #content .la-mark-channel-tag {
  margin: 0 0 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #3949AB !important;
}
html.bnpl-app-active #content .la-mark-channel-tag {
  margin: 0 0 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #3949AB !important;
}
html.bnpl-app-active #content .la-mark-tab-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin: 14px 0 16px;
}
html.bnpl-app-active #content .la-mark-tab {
  width: auto !important;
  min-height: 40px !important;
  font-weight: 700 !important;
}
html.bnpl-app-active #content .la-mark-register-lead {
  margin: 0 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #000000 !important;
  line-height: 1.45 !important;
}
html.bnpl-app-active #content .la-mark-page .staff-co-table-wrap {
  margin-top: 0;
}
html.bnpl-app-active #content .la-mark-page .staff-co-table.la-reg-table th {
  background: #e2e8f0 !important;
  font-weight: 800 !important;
  color: #000000 !important;
  font-size: 12px !important;
  padding: 8px 10px !important;
}
html.bnpl-app-active #content .la-mark-page .staff-co-table.la-reg-table td {
  font-weight: 700 !important;
  color: #000000 !important;
  font-size: 12px !important;
  padding: 8px 10px !important;
}
html.bnpl-app-active #content .la-mark-page input.staff-p10-control,
html.bnpl-app-active #content .la-mark-page select.staff-p10-control,
html.bnpl-app-active #content .la-mark-page .la-mark-box {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
  border: var(--erp-control-box-border, 1px solid #cbd5e1) !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content .la-mark-page input[type="number"].staff-p10-control {
  -moz-appearance: textfield;
  appearance: textfield;
}
html.bnpl-app-active #content .la-mark-page input[type="number"].staff-p10-control::-webkit-outer-spin-button,
html.bnpl-app-active #content .la-mark-page input[type="number"].staff-p10-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
html.bnpl-app-active #content .la-mark-page input.staff-p10-control,
html.bnpl-app-active #content .la-mark-page select.staff-p10-control,
html.bnpl-app-active #content .la-mark-page .la-mark-box {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
  border: var(--erp-control-box-border, 1px solid #cbd5e1) !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content .la-mark-page input[type="number"].staff-p10-control {
  -moz-appearance: textfield;
  appearance: textfield;
}
html.bnpl-app-active #content .la-mark-page input[type="number"].staff-p10-control::-webkit-outer-spin-button,
html.bnpl-app-active #content .la-mark-page input[type="number"].staff-p10-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.la-proforma-page:not(.la-mark-page--register) { max-width: 520px; margin: 0 auto; }
.la-mark-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.la-mark-toolbar .la-mark-field { flex: 1 1 160px; min-width: 140px; margin-bottom: 0 !important; }
.la-mark-field { margin-bottom: 10px; }
.la-mark-box { width: 100% !important; color: #000000 !important; font-weight: 700 !important; }
.la-mark-order-hint { margin: 0 0 10px !important; font-weight: 700 !important; color: #000000 !important; }
.la-mark-step-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.la-mark-step-row .la-mark-field { flex: 1 1 100px; min-width: 88px; margin-bottom: 0 !important; }
.la-mark-step-spacer { flex: 0 0 auto; min-width: 56px; }
.la-mark-step-action { flex: 1 1 120px; min-width: 100px; }
.la-mark-step-action .btn { width: auto !important; }
.la-mark-save-row { margin-top: 12px; }
.la-mark-save-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.la-mark-save-cluster .btn.primary { width: auto !important; }
.la-mark-tabs { margin-bottom: 12px; }
.la-mark-build-badge {
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  border: 1px solid #3949AB !important;
  border-radius: 6px !important;
  background: #eef2ff !important;
  color: #000000 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}
.la-mark-build-badge {
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  border: 1px solid #3949AB !important;
  border-radius: 6px !important;
  background: #eef2ff !important;
  color: #000000 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}
.la-proforma-card {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: #ffffff;
}
.la-proforma-card-title {
  font-size: 14px;
  font-weight: 800 !important;
  color: #000000 !important;
  margin: 0 0 10px;
}
.la-punch-steps { display: flex; flex-direction: column; gap: 10px; }
.la-punch-step {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
}
.la-punch-step.is-active { border-color: #3949AB; background: #eef2ff; }
.la-punch-step.is-done { background: #f0fdf4; border-color: #86efac; }
.la-punch-step.is-locked { opacity: 0.55; }
.la-punch-step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.la-punch-step-name {
  font-size: 14px;
  font-weight: 800 !important;
  color: #000000 !important;
}
.la-punch-step-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
}
.la-punch-step-row .la-proforma-line { margin-bottom: 0; flex: 1 1 100px; min-width: 88px; }
.la-punch-step-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  object-fit: cover;
  background: #e2e8f0;
}
.la-proforma-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}
.la-proforma-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.la-proforma-tab { width: auto !important; font-weight: 700 !important; }
.la-proforma-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  width: 100%;
}
.la-proforma-label {
  font-size: 13px;
  font-weight: 700 !important;
  color: #000000 !important;
}
.la-proforma-box { width: 100% !important; }
.la-proforma-section {
  font-size: 14px;
  font-weight: 800;
  color: #000000 !important;
  margin: 8px 0 4px;
}
.la-proforma-callout {
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #000000 !important;
  margin: 12px 0;
  line-height: 1.45;
}
.la-proforma-callout.info { background: #eff6ff; border: 1px solid #93c5fd; }
.la-proforma-callout.warn { background: #fff7ed; border: 1px solid #fdba74; }
.la-proforma-callout.ok { background: #ecfdf5; border: 1px solid #6ee7b7; }
.la-proforma-punch-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
@media (min-width: 480px) {
  .la-proforma-punch-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.la-proforma-photo-card {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  background: #f8fafc;
}
.la-proforma-photo-card.is-locked { opacity: 0.65; }
.la-proforma-photo-card.is-locked { opacity: 0.65; }
.la-proforma-photo-title {
  font-weight: 800 !important;
  color: #000000 !important;
  margin: 0 0 4px;
}
.la-proforma-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.la-proforma-pill.ok { background: #dcfce7; color: #166534; }
.la-proforma-actions { margin-top: 8px; }
.la-reg-wrap {
  overflow-x: auto;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #fff;
  margin-top: 8px;
}
.la-reg-table {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: #000000 !important;
}
.la-reg-table th,
.la-reg-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
}
.la-reg-table th {
  background: #e2e8f0;
  font-weight: 800 !important;
}
.la-reg-table tr.la-reg-warn td { background: #fffbeb; }
.la-reg-table--compact { min-width: 100%; }
.la-proforma-admin-lead {
  font-size: 13px;
  font-weight: 600;
  color: #000000 !important;
  line-height: 1.45;
  margin: 0 0 12px;
}
.la-proforma-admin-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-top: 4px;
}
.la-proforma-admin-save-row .btn.primary { width: auto !important; }

.cc-fraud-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: #DC2626;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.cc-row-fraud td { background: #FEF2F2; }

.st-table-wrap { overflow-x: auto; margin-bottom: 12px; border: 1px solid var(--color-border); border-radius: 10px; }
.st-table { width: 100%; border-collapse: collapse; font-size: var(--font-body); }
.st-table th {
  text-align: left; padding: 8px 10px; background: var(--color-surface);
  border-bottom: 1px solid var(--color-border); font-size: var(--font-table-header);
}
.st-table td { padding: 8px 10px; border-bottom: 1px solid var(--color-divider); vertical-align: middle; }

/* —— Staff Management —— */
.st-grid {
  display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 16px; align-items: start;
  max-width: 100%;
}
.st-dir { min-width: 0; max-width: 100%; overflow: hidden; }
.st-page { max-width: 100%; box-sizing: border-box; overflow-x: hidden; }
.st-table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .st-grid { grid-template-columns: 1fr; }
}
.st-card {
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: 12px; padding: 14px 16px;
}
.st-card h3 { margin: 0 0 6px; font-size: var(--font-card); }
.st-card label { display: block; margin: 10px 0 4px; font-size: var(--font-small); font-weight: var(--weight-semibold); }
.st-card input, .st-card select { width: 100%; box-sizing: border-box; }
.st-card .primary { margin-top: 14px; width: 100%; }
.st-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.st-toolbar input { flex: 1 1 140px; min-width: 120px; }
.st-toolbar select { flex: 0 1 auto; }
.st-setup-step { font-weight: 800; margin: 16px 0 8px; font-size: var(--font-card); }
.st-setup-step--2 { margin-top: 20px; padding-top: 12px; border-top: 2px solid var(--color-border); }
.st-step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #3949AB; color: #fff; font-size: 12px; margin-right: 6px; }
.st-row-selected { background: #EEF2FF; }
.st-step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #3949AB; color: #fff; font-size: 12px; margin-right: 6px; }
.st-row-selected { background: #EEF2FF; }
.st-setup-unified .st-card { margin-bottom: 10px; }
.st-master-vform {
  display: flex; flex-direction: column; gap: 0; padding-bottom: 0;
  max-width: 100%;
  min-width: 0;
}
.st-master-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}
.st-master-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.st-master-vform .form-section {
  border: 1px solid var(--color-border); border-radius: 12px;
  background: var(--color-card); padding: 14px 16px; margin-bottom: 12px;
}
.st-master-vform .form-section h3 {
  margin: 0 0 8px; font-size: var(--font-card); font-weight: 800;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.st-master-vform .form-section label {
  display: block; margin: 10px 0 4px; font-size: var(--font-small); font-weight: var(--weight-semibold);
}
.st-master-vform .form-section input,
.st-master-vform .form-section select {
  width: 100%; box-sizing: border-box;
}
.st-master-vform .st-form-start {
  text-align: center; font-weight: 800; color: #3949AB; margin: 4px 0 10px; font-size: var(--font-small);
}
.st-master-sticky,
.rm-save-bar {
  position: sticky; bottom: 0; z-index: 40;
  background: linear-gradient(to top, var(--color-bg, #F8FAFC) 88%, rgba(248, 250, 252, 0));
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: stretch;
  margin-top: auto;
  flex-shrink: 0;
}
.st-master-sticky .primary,
.rm-save-bar .primary { flex: 1 1 120px; min-height: 44px; }
.st-master-sticky .secondary,
.rm-save-bar .secondary { flex: 1 1 100px; min-height: 44px; }
.st-master-summary { font-size: var(--font-small); color: var(--color-muted, #64748b); margin: 0 0 8px; }
.st-master-vform .st-dup-hint { color: #B45309; font-size: var(--font-small); margin: 4px 0 0; font-weight: 700; }
.st-master-vform .st-create-wrap { margin-top: 8px; padding: 10px; border-radius: 8px; background: #F8FAFC; border: 1px dashed var(--color-border); }
.st-dropdown-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.st-dropdown-row select { flex: 1 1 160px; min-width: 140px; }
.st-inline-popover {
  position: absolute; z-index: 50; min-width: 260px; max-width: 96vw;
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.st-inline-popover-backdrop {
  position: fixed; inset: 0; z-index: 45; background: transparent;
}
.st-field-wrap { position: relative; margin-bottom: 10px; }
.st-increment-alert label { color: #B91C1C; font-weight: 800; }
.st-increment-alert input { border: 2px solid #DC2626; color: #991B1B; font-weight: 800; }
.st-leave-policy-lock {
  padding: 10px 12px; border-radius: 8px; background: #EFF6FF; border: 1px solid #BFDBFE;
  font-weight: 700; font-size: var(--font-small);
}
.st-master-dir-list { max-height: none; overflow: visible; font-size: var(--font-small); }
.st-master-dir-table { min-width: 0; max-width: 100%; margin-top: 8px; }
.st-master-pc-grid-hint {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 8px;
  background: #FFF7ED; border: 1px solid #FDBA74; font-size: var(--font-small);
}
.st-master-api-warn {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 8px;
  background: #FEF2F2; border: 1px solid #FECACA; font-size: var(--font-small);
  color: #991B1B; font-weight: 700;
}
.st-master-vform .form-section input,
.st-master-vform .form-section select {
  min-height: 44px;
}
.st-master-mobile-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
  min-height: 44px;
}
.st-master-mobile-row select {
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 88px;
  min-height: 44px;
}
.st-master-mobile-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
}
.st-master-step1 .st-master-head { margin-bottom: 8px; }
.st-master-step1 .form-section { margin-bottom: 12px; }
.st-master-title { margin: 0 0 6px; }
.st-master-lead { margin: 0 0 12px; }
.st-master-section {
  margin-bottom: 20px; min-width: 0; max-width: 100%;
}
.st-master-section-title {
  margin: 0 0 10px; font-size: var(--font-card); font-weight: 800;
  padding-bottom: 6px; border-bottom: 2px solid var(--color-border);
}
/* Staff registration Part A/B/C — largest headings inside the form body */
.st-master-vform .sm-part-section .sm-part-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.st-master-vform .sm-part-section .sm-part-head-title {
  margin: 0;
  font-weight: 800;
  font-size: var(--font-section);
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-master-vform .sm-part-section .sm-part-head-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}
.st-master-vform .sm-part-section .sm-part-head-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--font-helper);
  font-weight: 800;
  white-space: nowrap;
}
.st-master-vform .sm-part-a-submit-sticky {
  display: block !important;
  visibility: visible !important;
}
.st-master-vform .sm-part-a-submit {
  display: block !important;
  visibility: visible !important;
  background: #3949AB !important;
  color: #fff !important;
}
.st-master-vform .sm-part-a-submit:disabled {
  opacity: 0.45;
}
.st-master-vform .sm-admin-bootstrap-save:disabled {
  opacity: 0.55;
}
.st-master-vform .sm-part-section label,
.st-master-vform .sm-part-section .sm-field-label {
  font-size: var(--font-small);
  font-weight: 700;
}
.sm-admin-part-tabs .sm-admin-part-tab--active {
  box-shadow: 0 2px 8px rgba(57, 73, 171, 0.18);
  transform: translateY(-1px);
}
.sm-admin-part-tabs .sm-admin-part-tab--active[data-part-key="a"] {
  background: #EEF2FF !important;
}
.sm-admin-part-tabs .sm-admin-part-tab--active[data-part-key="b"] {
  background: #EEF2FF !important;
}
.sm-admin-part-tabs .sm-admin-part-tab--active[data-part-key="c"] {
  background: #FFFBEB !important;
}
.st-emp-profile .sm-part-section .sm-part-head-title {
  font-size: var(--font-section);
}
.st-emp-profile .sm-part-section label,
.st-emp-profile .sm-field-label {
  font-size: var(--font-small);
  font-weight: 700;
}
/* My Profile — compulsory (mandatory) field star */
.st-emp-profile .sm-emp-req-star,
.st-emp-profile .erp-doc-req-star {
  color: #c62828 !important;
  font-size: 1.45em;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
  margin-left: 2px;
}
.st-emp-profile #smEmpDocMount .erp-doc-label {
  color: #000000 !important;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
}
.st-emp-profile .sm-emp-opt-mark {
  color: #64748b !important;
  font-size: 12px;
  font-weight: 700;
}
/* My Profile — standard ERP form layout (parity with Resource Master Form B) */
.st-emp-profile {
  max-width: min(920px, 100%);
  margin: 0 auto;
  min-width: 0;
}
.st-emp-profile .sm-emp-profile-head {
  margin: 0 0 12px;
}
.st-emp-profile .sm-emp-profile-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #000000 !important;
}
.st-emp-profile .sm-emp-profile-lead {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155 !important;
  line-height: 1.4;
}
.st-emp-profile .sm-emp-part-card {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 2px solid #0f172a;
  border-radius: 10px;
  background: #ffffff;
  box-sizing: border-box;
}
.st-emp-profile .sm-emp-part-card--b {
  background: #fafbfc;
}
.st-emp-profile .sm-emp-part-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
}
.st-emp-profile .sm-emp-part-kicker--b {
  color: #3949ab !important;
}
.st-emp-profile .sm-emp-part-a-line {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #000000 !important;
  line-height: 1.35;
}
.st-emp-profile .sm-form-b-profile {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.st-emp-profile .sm-form-b-field {
  min-width: 0;
  margin: 0 0 8px;
}
.st-emp-profile .sm-form-b-field--full,
.st-emp-profile .sm-form-b-grid__full {
  grid-column: 1 / -1;
  width: 100%;
}
.st-emp-profile .sm-form-b-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 12px;
  margin: 0 0 8px;
  min-width: 0;
}
.st-emp-profile .sm-form-b-grid--short {
  margin-top: 4px;
}
.st-emp-profile .sm-form-b-input,
.st-emp-profile .sm-form-b-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #0f172a !important;
  border-radius: 6px !important;
  background: #fff;
  color: #000000 !important;
  font-size: 15px;
  font-weight: 700;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 10px;
  margin: 0;
}
.st-emp-profile .sm-form-b-textarea {
  height: auto !important;
  min-height: 72px !important;
  resize: vertical;
}
.st-emp-profile .sm-field-label {
  display: block;
  margin: 0 0 4px;
  color: #000000 !important;
  font-weight: 800;
  font-size: 13px;
}
.st-emp-profile .sm-form-b-doc-title {
  margin: 12px 0 8px;
  font-weight: 800;
  font-size: 14px;
  color: #000000 !important;
}
.st-emp-profile .sm-emp-doc-section {
  margin-top: 4px;
}
.st-emp-profile .sm-emp-submit-btn {
  width: 100%;
  min-height: 48px !important;
  font-weight: 800 !important;
  margin-top: 4px;
}
.st-emp-profile .sm-emp-profile-msg {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #c62828 !important;
}
.st-emp-profile .sm-emp-save-status {
  margin: 6px 0 0;
  font-size: 12px;
}
@media (min-width: 992px) {
  .st-emp-profile .sm-form-b-grid--short {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 991px) {
  .st-emp-profile .sm-form-b-grid--short {
    grid-template-columns: 1fr !important;
  }
}
.st-emp-profile .erp-documents-section--form-b .erp-doc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.st-master-section--grid { min-width: 0; overflow: hidden; }
.st-master-section--grid .st-table-wrap {
  width: 100%; max-width: 100%; min-width: 0;
  overflow-x: auto; overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.st-master-grid-table { min-width: 640px; }
.st-grid-edit-cell { padding: 4px 6px !important; }
.st-grid-inline-select {
  width: 100%; min-width: 120px; max-width: 200px;
  box-sizing: border-box; font-size: var(--font-small);
}
.st-master-audit-cell {
  background: #FEF3C7 !important;
  font-weight: 700;
  color: #78350F;
  box-shadow: inset 0 0 0 1px #FCD34D;
}
.st-master-audit-cell .st-grid-inline-select {
  background: #FFFBEB;
  border-color: #F59E0B;
}
@media (min-width: 960px) {
  .st-master-grid-compact .st-table th {
    font-size: 11px; padding: 6px 8px; letter-spacing: 0.02em;
  }
}
#content .st-master-vform { min-width: 0; overflow-x: hidden; }
.st-pager { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.st-dir #stSearch { margin: 8px 0 10px; width: 100%; box-sizing: border-box; }
.st-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: var(--font-helper); font-weight: var(--weight-semibold);
  background: var(--bnpl-status-bg);
  color: var(--bnpl-status-text);
  border: 1px solid var(--bnpl-status-border);
}
.st-badge.ok { background: var(--bnpl-status-bg); color: var(--bnpl-status-text); border: 1px solid var(--bnpl-status-border); }
.st-badge.off { background: var(--bnpl-status-bg); color: var(--bnpl-status-text); border: 1px solid var(--bnpl-status-border); }
.st-vip-badge {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 6px; padding: 2px 8px;
  font-size: 11px; font-weight: 800; line-height: 1.3;
  color: var(--bnpl-status-text);
  background: var(--bnpl-status-bg);
  border: 1px solid var(--bnpl-status-border);
  border-radius: 999px;
  vertical-align: middle; white-space: nowrap;
}
.st-row-vip td:first-child { background: var(--bnpl-info-bg); }
.st-modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 16px;
}
.st-modal {
  background: #fff; border-radius: 12px; padding: 18px 20px; max-width: 420px; width: 100%;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}
.st-modal h3 { margin: 0 0 8px; }
.st-modal label { display: block; margin: 12px 0 4px; font-weight: var(--weight-semibold); font-size: var(--font-small); }
.st-modal select, .st-modal input { width: 100%; box-sizing: border-box; }
.st-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.st-special-modal { max-width: 820px; width: 100%; max-height: 90vh; overflow: auto; }
.st-special-list { max-height: 55vh; overflow: auto; margin-top: 8px; }
.st-special-mod { margin: 12px 0 8px; }
.st-special-mod > b {
  display: block; margin-bottom: 6px; color: #303F9F; font-size: 13px;
  border-bottom: 1px solid #E2E8F0; padding-bottom: 4px;
}
.st-special-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) auto 64px auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
}
.st-special-name b { font-size: 13px; }
.st-special-cb {
  display: inline-flex !important; align-items: center; gap: 4px;
  margin: 0 !important; white-space: nowrap; font-weight: 600;
}
.st-special-cb input { width: 16px !important; margin: 0 !important; }
.st-special-days {
  width: 64px !important; max-width: 64px !important;
  margin: 0 !important; padding: 4px 6px !important;
  font-size: 12px !important;
}
.st-special-days:disabled { background: #F1F5F9; opacity: 0.6; }

/* —— BOQ Breakdown & Material Estimation —— */
.boq-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 96px;
  max-width: 960px;
  margin: 0 auto;
}
.boq-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.boq-site-pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}
.boq-site-pick label {
  font-size: var(--font-helper);
  font-weight: 700;
  color: var(--color-text-secondary);
}
.boq-site-pick select {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}
.boq-banner {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.boq-banner-ok {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}
.boq-banner-warn {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.boq-banner-err {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.boq-banner-info {
  background: #EEF2FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
}
.boq-upload {
  border: 1px solid #C7D2FE;
  border-radius: 14px;
  background: linear-gradient(180deg, #EEF2FF 0%, #F8FAFC 100%);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boq-upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.boq-upload-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #312E81;
}
.boq-upload-hint {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #4338CA;
}
.boq-upload-hint-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #C7D2FE;
  border-radius: 12px;
  background: #F8FAFC;
}
.boq-upload-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boq-sub-labor td { background: #FFFBEB; }
.boq-sub-machinery td { background: #F0FDF4; }
.boq-debug-line {
  font-size: 12px;
  color: #64748B;
  padding: 6px 0;
}
.boq-upload-toggle {
  appearance: none;
  border: 1px solid #C7D2FE;
  background: #fff;
  color: #3730A3;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.boq-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.boq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}
.boq-field-wide { grid-column: 1 / -1; }
.boq-field input,
.boq-field select,
.boq-csv-block textarea {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.boq-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.boq-csv-block {
  border-top: 1px dashed #C7D2FE;
  padding-top: 10px;
}
.boq-csv-block summary {
  cursor: pointer;
  font-weight: 700;
  color: #3730A3;
  margin-bottom: 8px;
}
.boq-csv-block textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  margin: 6px 0 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
@media (max-width: 640px) {
  .boq-upload-grid { grid-template-columns: 1fr; }
  .boq-upload-actions .action-btn { width: 100%; }
}
.boq-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #F8FAFC 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.boq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-body);
  min-width: 640px;
}
.boq-table th {
  text-align: left;
  padding: 11px 12px;
  background: #F1F5F9;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-table-header);
  color: #334155;
  white-space: nowrap;
}
.boq-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: middle;
}
.boq-row.is-open > td {
  background: #F8FAFC;
}
.boq-item-name-cell {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  word-break: break-word;
  vertical-align: top;
}
.boq-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  word-break: break-word;
}
.boq-action-cell {
  min-width: 200px;
  vertical-align: top;
}
.boq-yield-hint {
  margin: 0 0 4px;
  font-size: 10px;
  color: #64748B;
}
.boq-standard-badge {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.boq-standard-badge--dsr {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #93C5FD;
}
.boq-standard-badge--morth {
  background: #FFEDD5;
  color: #C2410C;
  border: 1px solid #FDBA74;
}
.boq-action-cell .boq-work-type-sel,
.boq-action-cell .boq-work-type-locked {
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
}
.boq-action-cell .boq-extract-btn {
  width: 100%;
}
/* M022 — Granular Material & Labor Consumption Auditor: DPR % Efficiency badges */
.dpr-eff-badge {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.dpr-eff-badge--normal {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}
.dpr-eff-badge--high {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FBBF24;
  animation: dprAmberFlash 1.4s ease-in-out infinite;
}
@keyframes dprAmberFlash {
  0%, 100% { box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.35); }
}
.dpr-form-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  margin: 10px 0 16px;
}
.dpr-form-card label {
  display: block;
  margin-top: 8px;
  margin-bottom: 4px;
}
.dpr-form-card select,
.dpr-form-card input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  font-size: 13px;
}
.dpr-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.dpr-form-card .boq-extract-btn {
  margin-top: 14px;
  width: 100%;
}
.dpr-result-card {
  border: 1px solid #86EFAC;
  background: #F0FDF4;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.dpr-result-card.is-amber {
  border-color: #FBBF24;
  background: #FFFBEB;
}
.dpr-result-title {
  font-weight: 700;
  margin: 0 0 8px;
}
.dpr-badge-row {
  margin-bottom: 6px;
}
.dpr-log-wrap {
  overflow-x: auto;
}
.dpr-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dpr-log-table th,
.dpr-log-table td {
  border: 1px solid #E2E8F0;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}
.dpr-log-table th {
  background: #F1F5F9;
  font-weight: 700;
}
/* DPR compact layout (50–100 BOQ lines ready) */
.dpr-form-compact { padding: 10px 12px; }
.dpr-intro { margin-bottom: 6px; font-size: 13px; }
.dpr-form-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.dpr-form-col { flex: 1 1 140px; min-width: 120px; }
.dpr-line-filter {
  width: 100%; box-sizing: border-box; margin-bottom: 6px;
  padding: 8px 10px; border: 1px solid #CBD5E1; border-radius: 8px; font-size: 14px;
}
.dpr-line-select {
  font-size: 13px !important;
  max-height: 168px;
}
.dpr-form-grid-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.dpr-submit-btn { margin-top: 10px; width: 100%; }
.dpr-eff-badge--compact {
  font-size: 10px;
  padding: 2px 7px;
  margin: 2px 3px 2px 0;
}
.dpr-labor-row { display: flex; flex-wrap: wrap; gap: 4px; }
.dpr-labor-mason { background: #E0E7FF !important; color: #312E81 !important; border-color: #A5B4FC !important; }
.dpr-labor-labour { background: #FEF3C7 !important; color: #92400E !important; border-color: #FCD34D !important; }
.dpr-mat-grid { display: flex; flex-wrap: wrap; gap: 2px; }
.dpr-result-title { font-size: 13px; line-height: 1.35; margin: 0 0 8px; }
.dpr-log-title { margin-top: 14px !important; margin-bottom: 8px !important; font-size: 15px !important; }
.dpr-log-list { display: flex; flex-direction: column; gap: 8px; }
.dpr-log-card {
  border: 1px solid #E2E8F0; border-radius: 10px; padding: 10px 12px; background: #fff;
}
.dpr-log-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: #475569; }
.dpr-log-item { margin: 6px 0; font-size: 13px; line-height: 1.35; font-weight: 600; }
@media (max-width: 640px) {
  .dpr-form-grid-tight { grid-template-columns: 1fr 1fr; }
  .dpr-form-grid-tight > div:first-child { grid-column: 1 / -1; }
}
.mboq-preview-locked {
  margin-top: 14px;
  border: 1px solid #86EFAC;
  background: #F0FDF4;
}
.boq-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1E40AF;
  cursor: pointer;
}
.boq-sel-all-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.boq-sel-all-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
}
.boq-debug-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
  word-break: break-all;
}
.boq-work-type-wrap {
  margin-top: 4px;
}
.boq-work-type-sel {
  max-width: 100%;
  min-width: 12rem;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: #fff;
  color: #0F172A;
}
.boq-work-type-sel:focus {
  outline: 2px solid #93C5FD;
  border-color: #3B82F6;
}
.boq-work-type-locked {
  max-width: 100%;
  min-width: 12rem;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
  border: 1px solid #86EFAC;
  border-radius: 6px;
  background: #F0FDF4;
  color: #166534;
  margin-bottom: 8px;
}
.boq-work-type-lock-ico {
  font-size: 11px;
}
.boq-extract-btn {
  appearance: none;
  border: 1px solid #C7D2FE;
  background: linear-gradient(180deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #312E81;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.boq-extract-btn:hover {
  box-shadow: 0 4px 12px rgba(49, 46, 129, 0.12);
  transform: translateY(-1px);
}
.boq-extract-btn.is-active {
  background: linear-gradient(180deg, #312E81 0%, #3730A3 100%);
  color: #fff;
  border-color: #312E81;
}
.boq-sub td {
  background: #F8FAFC;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px dashed #E2E8F0;
}
.boq-sub-indent { padding-left: 28px !important; }
.boq-mat-ico { margin-right: 4px; }
.boq-flag-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.boq-flag-off { background: #FEE2E2; color: #B91C1C; }
.boq-mat-missing-reason {
  color: #92400E;
  font-weight: 600;
}
.boq-sub-manual td {
  background: #FFFBEB;
}
.boq-manual-mat-del {
  appearance: none;
  border: 1px solid #FCA5A5;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.boq-manual-mat-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
}
.boq-manual-mat-name {
  flex: 2 1 160px;
  min-width: 140px;
}
.boq-manual-mat-qty {
  flex: 1 1 80px;
  min-width: 70px;
}
.boq-manual-mat-unit {
  flex: 1 1 90px;
  min-width: 80px;
}
.boq-manual-mat-name,
.boq-manual-mat-qty,
.boq-manual-mat-unit {
  padding: 6px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: #0F172A;
}
.boq-manual-mat-add {
  appearance: none;
  border: 1px solid #93C5FD;
  background: #EFF6FF;
  color: #1E40AF;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.boq-legend {
  margin: 0;
  padding: 0 2px;
}
.boq-sticky {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 12px 0 4px;
  background: linear-gradient(transparent, var(--color-bg) 28%);
  display: flex;
  justify-content: flex-end;
}
.boq-push-btn {
  min-height: 48px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}
@media (max-width: 640px) {
  .boq-page { padding-bottom: 112px; }
  .boq-sticky { justify-content: stretch; }
  .boq-push-btn { width: 100%; }
  .boq-extract-btn { width: 100%; }
}

/* —— Master BOQ Upload (Store & Material → Material) —— */
/* v145 — widened from 960px: this screen's analysis grid has many columns
   and the app is primarily used on Windows desktop/laptop (~1280px+), so we
   let the page use much more of the available width to fit a full BOQ line
   without horizontal scroll on typical laptop screens. */
.mboq-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 24px;
  width: 100%;
}
.mboq-page-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #1E3A8A;
  letter-spacing: -0.01em;
}
.mboq-card {
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  background:
    radial-gradient(120% 80% at 0% 0%, #DBEAFE 0%, transparent 55%),
    linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 60%);
  padding: 10px 12px 12px;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mboq-toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(180px, 280px) 1fr;
  gap: 8px 10px;
  align-items: end;
}
.mboq-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 38px;
}
.mboq-field-compact {
  gap: 2px;
  min-width: 0;
}
.mboq-field-compact span {
  font-size: 12px;
  font-weight: 700;
  color: #000;
}
.mboq-field-compact select {
  padding: 0 10px;
  height: var(--erp-control-box-height);
  min-height: var(--erp-control-box-height);
  max-height: var(--erp-control-box-height);
  font-size: 13px;
  border-radius: var(--erp-control-box-radius);
}
.mboq-site-field { min-width: 0; }
.mboq-site-sel {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mboq-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.mboq-chip-ok { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.mboq-chip-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.mboq-chip-locked { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.mboq-chip-open { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.mboq-chip-pending { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.mboq-inline-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #64748B;
}
.mboq-perm-denied {
  margin: 0;
  color: #B91C1C;
  font-size: 12px;
  font-weight: 700;
}
.mboq-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #1E3A8A;
  letter-spacing: -0.01em;
}
.mboq-card-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #1D4ED8;
}
.mboq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}
.mboq-field select,
.mboq-field input[type="text"],
.mboq-field input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  padding: 0 12px;
  height: var(--erp-control-box-height);
  min-height: var(--erp-control-box-height);
  max-height: var(--erp-control-box-height);
  border: var(--erp-control-box-border);
  border-radius: var(--erp-control-box-radius);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}
.mboq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.mboq-actions .action-btn {
  min-height: 40px;
  font-weight: 800;
}
.mboq-manual {
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  background: #EFF6FF;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mboq-manual-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #1E40AF;
}
.mboq-manual-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(160px, 2fr) minmax(110px, 0.9fr) minmax(120px, 0.9fr);
  gap: 8px;
  align-items: end;
}
.mboq-draft-preview {
  border: 1px dashed #93C5FD;
  border-radius: 8px;
  background: #fff;
  padding: 6px 10px;
  min-height: 36px;
}
.mboq-draft-preview-ok .mboq-draft-desc { margin: 0 0 8px; font-size: 13px; }
.mboq-draft-preview-warn { color: #B45309; font-size: 12px; font-weight: 700; }
.mboq-comp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.mboq-comp-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #E0E7FF;
  color: #3730A3;
}
.mboq-comp-mat { background: #DCFCE7; color: #166534; }
.mboq-comp-lab { background: #FEF3C7; color: #92400E; }
.mboq-comp-mach { background: #E0F2FE; color: #075985; }
.mboq-comp-none { color: #94A3B8; font-size: 12px; }
.mboq-comp-detail { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.mboq-row-detail td { background: #F8FAFC; }
.mboq-row-detail-btn, .mboq-full-preview-btn {
  margin-top: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #fff;
  cursor: pointer;
}
.boq-flag-mrs { background: #DBEAFE; color: #1D4ED8; }
.mboq-field-wide { grid-column: 1 / -1; }
.mboq-hint-hi {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.mboq-row-del {
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #B91C1C;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-weight: 800;
  cursor: pointer;
}
.mboq-row-del:hover { background: #FEE2E2; }
.mboq-drop {
  border: 2px dashed #93C5FD;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.mboq-drop:hover,
.mboq-drop.is-drag {
  border-color: #2563EB;
  background: #EFF6FF;
  transform: translateY(-1px);
}
.mboq-drop-ico { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.mboq-drop-label {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #1E40AF;
}
/* v145 — replaces the removed file-upload dropzone; freed vertical space
   now shows short inline usage guidance for the manual-entry flow. */
.mboq-guide-panel {
  border: 1px solid #BFDBFE;
  border-radius: 14px;
  background: #F8FAFF;
  padding: 14px 16px;
}
.mboq-guide-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: #1E40AF;
}
.mboq-guide-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}
.mboq-guide-list li { padding-left: 2px; }
.mboq-badge {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.mboq-badge-locked {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}
.mboq-badge-open {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}
.mboq-badge-pending {
  background: #EEF2FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
}
.mboq-sa-hint {
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.mboq-replace-cta {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #FFF7ED;
  border: 1px solid #FDBA74;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.mboq-replace-cta .mboq-replace-btn,
.mboq-preview .mboq-replace-btn {
  width: 100%;
  min-height: 48px;
  font-weight: 800;
  font-size: 15px;
}
.mboq-drop-locked {
  border-color: #F59E0B;
  background: #FFFBEB;
}
.mboq-drop-locked .mboq-drop-label {
  color: #92400E;
}
.mboq-show-preview-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.mboq-selected-file a {
  color: #1D4ED8;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.mboq-pending-panel {
  border: 1px solid #C7D2FE;
  border-radius: 12px;
  background: #F8FAFF;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.mboq-pending-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748B;
}
.mboq-pending-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mboq-pending-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #312E81;
}
.mboq-pending-scope {
  display: flex;
  gap: 6px;
}
.mboq-scope-btn {
  border: 1px solid #C7D2FE;
  background: #fff;
  color: #3730A3;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.mboq-scope-btn.is-active {
  background: #312E81;
  color: #fff;
  border-color: #312E81;
}
.mboq-scope-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.mboq-pending-empty {
  margin: 0;
}
.mboq-pending-item {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mboq-pending-who {
  margin: 0 0 2px;
  font-size: 13px;
  color: #0F172A;
}
.mboq-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mboq-pending-actions .action-btn {
  min-height: 40px;
  font-weight: 800;
}
.mboq-banner {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.mboq-banner-ok { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.mboq-banner-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.mboq-banner-err { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.mboq-banner-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.mboq-preview {
  border: 1px solid #93C5FD;
  border-radius: 10px;
  background: #F8FBFF;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
  scroll-margin-top: 72px;
}
.mboq-preview-live {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.mboq-preview-empty {
  border-style: dashed;
  border-color: #CBD5E1;
  background: #F8FAFC;
}
.mboq-preview-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mboq-preview-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
}
.mboq-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #1D4ED8;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.mboq-preview-count {
  margin: 2px 0 0;
  font-size: 12px;
}
.mboq-table-scroll {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
  -webkit-overflow-scrolling: touch;
  /* v145 — scrollLeft/scrollTop restored across paint() re-renders via JS
     (see restoreTableScroll/captureTableScroll in erp-boq-upload.js). */
}
.mboq-table-scroll .mboq-table-wrap {
  overflow-x: auto;
  border: none;
  border-radius: 0;
}
.mboq-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 var(--color-border);
}
.mboq-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.mboq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-body);
  min-width: 560px;
}
.mboq-table th {
  text-align: left;
  padding: 10px 12px;
  background: #F1F5F9;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-table-header);
  white-space: normal;
  overflow-wrap: anywhere;
}
.mboq-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}
.mboq-lock-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 4px;
}
.mboq-lock-btn {
  min-height: 48px !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.18);
}
@media (max-width: 640px) {
  .mboq-toolbar { grid-template-columns: 1fr; }
  .mboq-toolbar-meta { min-height: 0; }
  .mboq-lock-row { align-items: stretch; }
  .mboq-lock-btn { width: 100%; }
  .mboq-manual-grid { grid-template-columns: 1fr 1fr; }
  .mboq-field-wide { grid-column: 1 / -1; }
  .mboq-actions .action-btn { flex: 1 1 100%; }
  .mboq-pending-actions .action-btn { flex: 1 1 100%; }
}

/* ── v143 — Master Databook selector + Material/Manpower Analysis grid ── */
.mboq-databook-card {
  border: 2px solid #1D4ED8;
  background: #EFF6FF;
}
.mboq-databook-title { color: #1D4ED8; font-size: 15px; }
.mboq-databook-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.mboq-databook-sel {
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  border: 2px solid #1D4ED8;
}
.mboq-card-disabled .mboq-actions,
.mboq-card-disabled .mboq-preview-live,
.mboq-card-disabled .mboq-manual {
  opacity: 0.55;
  pointer-events: none;
}
.mboq-lock-blocked {
  color: #B91C1C;
  font-weight: 700;
  margin: 6px 0 0;
}

/* v145 — trimmed from 1500px + more compact cells/font so a normal ~1360px+
   desktop/laptop window fits the whole row without horizontal scroll (the
   page itself now goes up to max-width:1440px, see .mboq-page above). */
.mboq-analysis-table {
  min-width: 1280px;
  font-size: 12px;
}
.mboq-analysis-table th,
.mboq-analysis-table td {
  padding: 6px 7px;
}
.mboq-analysis-table th.mboq-ssot-col { background: #DBEAFE !important; color: #1E3A8A; }
.mboq-analysis-table th.mboq-view-col { background: #F1F5F9 !important; }
.mboq-analysis-table th.mboq-manpower-col { background: #FEF3C7 !important; color: #92400E; }
.mboq-analysis-table td.mboq-ssot-td { background: #F8FAFF; }
.mboq-col-narrow { width: 34px; }
.mboq-rownum { text-align: center; color: #94A3B8; font-weight: 700; }

/* Sticky leading columns (# · Item No · Description) — stay visible while
   scrolling right so the user always has a stable "which row is this"
   anchor, even at narrower widths where some horizontal scroll remains. */
.mboq-analysis-table th:nth-child(1),
.mboq-analysis-table td:nth-child(1) {
  position: sticky; left: 0; z-index: 2; width: 34px; min-width: 34px;
}
.mboq-analysis-table th:nth-child(2),
.mboq-analysis-table td:nth-child(2) {
  position: sticky; left: 34px; z-index: 2; width: 62px; min-width: 62px;
}
.mboq-analysis-table th:nth-child(3),
.mboq-analysis-table td:nth-child(3) {
  position: sticky; left: 96px; z-index: 2; width: 190px; min-width: 190px;
  box-shadow: 2px 0 5px rgba(15, 23, 42, 0.08);
}
.mboq-analysis-table thead th:nth-child(1),
.mboq-analysis-table thead th:nth-child(2),
.mboq-analysis-table thead th:nth-child(3) {
  z-index: 4;
}
.mboq-analysis-table .mboq-desc-input { min-width: 170px; }
.mboq-analysis-table .mboq-itemno-input { min-width: 54px; }

.mboq-ssot-badge {
  display: block;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: #1D4ED8;
  color: #fff;
  letter-spacing: .03em;
  margin-top: 2px;
  width: fit-content;
}
.mboq-view-badge {
  display: block;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: #64748B;
  color: #fff;
  letter-spacing: .03em;
  margin-top: 2px;
  width: fit-content;
}

.mboq-cell-input {
  width: 100%;
  min-width: 72px;
  padding: 5px 6px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
}
.mboq-desc-input { min-width: 220px; }
.mboq-itemno-input { min-width: 70px; }
.mboq-view-only { background: #F8FAFC; color: #475569; }
.mboq-unit2-locked { background: #EFF6FF; color: #1E3A8A; font-weight: 700; border-color: #93C5FD; }
.mboq-qty2-note,
.mboq-cell-note {
  display: block;
  font-size: 10px;
  color: #64748B;
  margin-top: 2px;
}
.mboq-cell-note-warn { color: #B91C1C; }
.mboq-cell-note-locked { color: #1D4ED8; font-weight: 700; }
.mboq-manday-auto { background: #FFFBEB; font-weight: 700; color: #92400E; }
.mboq-manday-manual { background: #fff; border: 1.5px dashed #F59E0B !important; }

.mboq-status-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.mboq-badge-ok { background: #DCFCE7; color: #166534; }
.mboq-badge-warn { background: #FEF3C7; color: #92400E; }
.mboq-badge-nonboq { background: #DBEAFE; color: #1E40AF; }
.mboq-badge-mismatch { background: #FEE2E2; color: #B91C1C; }

.mboq-row-ok td { background: #fff; }
.mboq-row-warn td { background: #FFFBEB; }
.mboq-row-nonboq td { background: #F0F9FF; }
.mboq-row-mismatch td { background: #FEF2F2; }

.mboq-yn-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  overflow: hidden;
  min-width: 90px;
}
.mboq-yn-btn {
  flex: 1;
  border: none;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: #F8FAFC;
  color: #64748B;
}
.mboq-yn-btn.is-yes { background: #DCFCE7; color: #166534; }
.mboq-yn-btn.is-no { background: #FEE2E2; color: #B91C1C; }

.mboq-footer-totals {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--color-border);
}
.mboq-total-box { display: flex; flex-direction: column; gap: 2px; }
.mboq-total-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.mboq-total-val { font-size: 16px; font-weight: 800; color: #1E293B; }
.mboq-total-val.mboq-match-ok { color: #047857; }
.mboq-total-val.mboq-match-no { color: #B91C1C; }
.mboq-tender-input {
  width: 140px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.mboq-excel-btn {
  background: #ECFDF5 !important;
  color: #047857 !important;
  border: 1px solid #A7F3D0 !important;
}

@media (max-width: 640px) {
  .mboq-databook-row { flex-direction: column; align-items: stretch; }
  .mboq-footer-totals { gap: 12px; }
}

/* Material Working Limit % admin (SSOT) */
.mwl-page .mwl-field { display: block; margin-bottom: 10px; }
.mwl-page .mwl-field span { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 4px; }
.mwl-head-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.mwl-head-row .mwl-title { margin: 0; flex: 1; min-width: 160px; }
.mwl-back { margin: 0; font-size: 15px; font-weight: 700; }
.mwl-help { margin: 0 0 8px; font-size: 13px; }
.mwl-help summary { cursor: pointer; font-weight: 700; color: #3949AB; }
.mwl-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
  margin-bottom: 10px; padding: 10px 12px;
}
.mwl-field-compact { flex: 1 1 120px; min-width: 100px; margin-bottom: 0 !important; }
.mwl-field-compact span { font-size: 11px; margin-bottom: 2px; }
.mwl-btn { flex: 0 0 auto; margin: 0; min-height: 38px; }
.mwl-input-date { max-width: 150px; }
.mwl-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--color-border); border-radius: 8px; font-size: 15px;
}
.mwl-input-narrow { max-width: 120px; }
.mwl-bulk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.mwl-field-inline { flex: 0 0 auto; min-width: 140px; }
.mwl-table-wrap { overflow-x: auto; margin-top: 8px; }
.mwl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mwl-table-compact { font-size: 13px; }
.mwl-table th, .mwl-table td { border: 1px solid #E2E8F0; padding: 8px 10px; text-align: left; vertical-align: middle; }
.mwl-table-compact th, .mwl-table-compact td { padding: 6px 8px; }
.mwl-table th { background: #F8FAFC; font-weight: 700; font-size: 12px; }
.mwl-row-changed { background: #FFFBEB; }
.mwl-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mwl-pct-input { width: 72px; padding: 6px 8px; border: 1px solid #CBD5E1; border-radius: 6px; font-weight: 700; }
.mwl-msg-ok { color: #15803D; }
.mwl-msg-warn { color: #B45309; }
.mwl-msg-info { color: #475569; }
/* Override global .action-btn { width:100% } — toolbar buttons were collapsing / hidden */
.mwl-toolbar .action-btn,
.mwl-save-bar .action-btn {
  width: auto !important;
  min-width: 112px;
  flex: 1 1 calc(50% - 4px);
  max-width: 100%;
  margin-top: 0 !important;
  padding: 10px 14px !important;
  justify-content: center;
  text-align: center;
  font-weight: 700 !important;
}
.mwl-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 2px solid #BFDBFE;
  border-radius: 12px;
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
}
.mwl-save-bar .action-btn.primary {
  flex: 1 1 100%;
  min-height: 48px;
  font-size: 17px !important;
  background: #2563EB !important;
  border-color: #1D4ED8 !important;
  color: #fff !important;
}
.mwl-save-bar-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 13px;
  color: #475569;
  text-align: center;
}

/* M032 Smart Activity-Driven DPR */
.sdpr-steps {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.sdpr-step-tab {
  flex: 1 1 45%;
  min-height: 44px;
  border: 2px solid #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.sdpr-step-tab.is-active {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1D4ED8;
}
.sdpr-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}
.sdpr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}
.sdpr-table th,
.sdpr-table td {
  border-bottom: 1px solid #E2E8F0;
  padding: 8px 6px;
  vertical-align: top;
}
.sdpr-table th {
  background: #F1F5F9;
  font-weight: 700;
  text-align: left;
}
.sdpr-table .sdpr-inp {
  width: 100%;
  min-width: 56px;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
}
.sdpr-table .sdpr-num {
  max-width: 72px;
}
.sdpr-total-row td {
  background: #FFFBEB;
  font-size: 13px;
}
.sdpr-gps-btn {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.sdpr-gps-ok {
  color: #047857;
  font-size: 11px;
  line-height: 1.35;
}
.sdpr-gps-cell {
  min-width: 130px;
}
.sdpr-qty-out {
  font-weight: 700;
  white-space: nowrap;
}
.sdpr-add-row {
  margin-top: 8px;
}
.sdpr-blind-note {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.sdpr-section-label {
  font-weight: 700;
  margin: 14px 0 6px;
  font-size: 13px;
}
.sdpr-camera-btn {
  display: inline-block;
  background: #DBEAFE;
  border: 1px solid #3B82F6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  cursor: pointer;
}
.sdpr-camera-inp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none;
}
.sdpr-camera-open {
  width: 100%;
  margin-top: 10px;
  background: #2563EB !important;
  border-color: #1D4ED8 !important;
  min-height: 48px;
  font-size: 14px !important;
}
.sdpr-labor-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.sdpr-labor-card {
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 12px;
  background: #FFFFFF;
}
.sdpr-labor-head {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.sdpr-labor-qty {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
}
.sdpr-labor-preview {
  display: block;
  margin-top: 10px;
  max-width: 100%;
  max-height: 160px;
}
.sdpr-labor-status {
  margin-top: 8px;
}
.sdpr-lock-sites {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.sdpr-switch-site {
  width: 100%;
  text-align: left;
  background: #FEF3C7 !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
}
.sdpr-boq-loading {
  font-weight: 600;
  color: #2563EB;
}
.sdpr-evidence-panel {
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  background: #F8FAFC;
}
.sdpr-evidence-optional {
  margin: 0 0 10px;
  font-size: 12px;
}
.sdpr-evidence-group {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fff;
}
.sdpr-evidence-group-title {
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 14px;
}
.sdpr-evidence-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sdpr-evidence-btn {
  flex: 1 1 45%;
  min-height: 44px;
  font-size: 13px !important;
}
.sdpr-evidence-video {
  background: #7C3AED !important;
  border-color: #6D28D9 !important;
}
.sdpr-evidence-inp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none;
}
.sdpr-evidence-preview {
  display: block;
  max-width: 100%;
  max-height: 200px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
}
.sdpr-evidence-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}
.sdpr-thumb {
  max-width: 64px;
  max-height: 48px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
}
.sdpr-status-ok { color: #047857; font-weight: 600; font-size: 12px; }
.sdpr-status-warn { color: #B45309; font-weight: 600; font-size: 12px; }
.sdpr-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.sdpr-actions .sdpr-draft {
  flex: 1 1 40%;
  background: #64748B !important;
  border-color: #475569 !important;
}
.sdpr-actions .sdpr-submit {
  flex: 1 1 55%;
  background: #059669 !important;
  border-color: #047857 !important;
}
.sdpr-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sdpr-lock-hint {
  color: #B45309;
  font-size: 12px;
}
/* M033 Smart DPR — home / result */
.sdpr-home-card,
.sdpr-form-card,
.sdpr-result-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.sdpr-day-summary {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.sdpr-home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sdpr-close-day {
  background: #059669 !important;
  border-color: #047857 !important;
}
.sdpr-list-title { margin-top: 16px; }
.sdpr-list-table { min-width: 100%; }
.sdpr-link-btn {
  background: none;
  border: none;
  color: #2563EB;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.sdpr-search {
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-sizing: border-box;
}
.sdpr-form-nav {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.sdpr-back-home {
  background: #64748B !important;
  border-color: #475569 !important;
}
.sdpr-result-head {
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
}
.sdpr-perf-line {
  font-size: 14px;
  margin: 8px 0 12px;
}
.sdpr-var-over td { background: #FEF2F2; }
.sdpr-var-under td { background: #FFFBEB; }
.sdpr-var-match td { background: #F0FDF4; }
.sdpr-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.sdpr-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sdpr-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
}
.sdpr-field-weather {
  grid-column: 2;
  grid-row: 1;
}
.sdpr-field:first-child {
  grid-column: 1;
  grid-row: 1;
}
.sdpr-field:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 2;
}
@media (min-width: 520px) {
  .sdpr-meta-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .sdpr-field:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .sdpr-field-weather {
    grid-column: 3;
    grid-row: 1;
  }
}
.sdpr-date-inp {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 14px;
}
.sdpr-boq-pick {
  width: 100%;
  min-height: 44px;
  max-height: none !important;
}
.sdpr-selected-line {
  margin: 6px 0 0;
  font-size: 13px;
}
.sdpr-boq-label { margin-top: 4px; }
.sdpr-decimal {
  font-variant-numeric: tabular-nums;
}
.sdpr-table th.sdpr-dim-th,
.sdpr-table td.sdpr-dim-cell {
  text-align: center;
  vertical-align: middle;
}
.sdpr-table td.sdpr-dim-cell {
  padding: 6px 4px;
}
.sdpr-table td.sdpr-dim-cell .sdpr-inp.sdpr-num {
  display: block;
  width: 100%;
  min-width: 48px;
  max-width: 68px;
  margin: 0 auto;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
.sdpr-boq-tap-hint {
  margin: 4px 0 8px;
  font-size: 12px;
}
.sdpr-boq-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 8px;
  padding: 4px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
  -webkit-overflow-scrolling: touch;
}
.sdpr-boq-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 2px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sdpr-boq-item.is-selected {
  border-color: #2563EB;
  background: #EFF6FF;
  box-shadow: 0 0 0 1px #93C5FD;
}
.sdpr-boq-item-no {
  flex: 0 0 auto;
  min-width: 28px;
  font-weight: 800;
  color: #1D4ED8;
}
.sdpr-boq-item-text {
  flex: 1 1 auto;
  color: #0F172A;
  word-break: break-word;
}
.sdpr-boq-empty {
  color: #B45309;
  font-weight: 600;
}

/* M034 compact daily sheet */
.sdpr-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.sdpr-toolbar-site { flex: 1 1 140px; min-width: 0; padding: 6px 8px; font-size: 14px; }
.sdpr-toolbar-date { flex: 0 0 auto; padding: 6px 8px; font-size: 14px; }
.sdpr-toolbar-badge {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  background: #E0E7FF;
  padding: 4px 8px;
  border-radius: 6px;
}
.sdpr-compact { padding: 10px 12px; margin-bottom: 8px; }
.sdpr-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 13px;
  color: #0F172A;
  margin-bottom: 8px;
}
.sdpr-home-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sdpr-btn-main { flex: 1 1 auto; min-width: 72px; }
.sdpr-section-label {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin: 8px 0 4px;
}
.sdpr-steps-compact { margin-bottom: 6px; }
.sdpr-steps-compact .sdpr-step-tab { padding: 8px 10px; font-size: 13px; }
.sdpr-setup-compact { display: flex; flex-direction: column; gap: 8px; }
.sdpr-lab-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sdpr-radio { font-size: 14px; font-weight: 600; color: #0F172A; }
.sdpr-boq-picker-compact { max-height: 160px; }
.sdpr-item-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.sdpr-item-tab {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFF;
  color: #0F172A;
  cursor: pointer;
}
.sdpr-item-tab.is-active {
  border-color: #3949AB;
  background: #EEF2FF;
  font-weight: 700;
}
.sdpr-meas-stack { display: flex; flex-direction: column; gap: 8px; }
.sdpr-meas-card {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #FFF;
}
.sdpr-meas-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: #0F172A;
}
.sdpr-meas-dims {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 4px 8px;
  align-items: center;
  margin: 6px 0;
}
.sdpr-meas-dims .hint { font-size: 11px; margin: 0; }
.sdpr-meas-dims .sdpr-inp { padding: 6px 8px; font-size: 14px; }
.sdpr-table-dense th,
.sdpr-table-dense td { padding: 6px 8px; font-size: 13px; }
.sdpr-form-nav-sticky {
  position: sticky;
  bottom: 0;
  background: #F8FAFC;
  padding: 8px 0 4px;
  margin-top: 10px;
  border-top: 1px solid #E2E8F0;
  z-index: 2;
}
.sdpr-foot-val { margin: 6px 0 0; font-size: 12px; }
.sdpr-pm-pick, .sdpr-dir-row { margin: 6px 0; }
.sdpr-dir-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sdpr-dir-row select { flex: 0 0 140px; padding: 6px; }
.sdpr-dir-row .sdpr-inp { flex: 1 1 120px; }

.sdpr-panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
/* Resource Master — scroll shell: tabs pinned, form scrolls in .rm-panels (SSOT) */
.rm-page {
  max-width: 100%;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.rm-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
}
#content.bnpl-resource-master-view {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
#content.bnpl-resource-master-view > #resource-master-root.rm-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.rm-tabs-wrap {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 45;
  margin: 0 -4px 12px;
  padding: 8px 4px;
  background: var(--bnpl-card-bg, #F8FAFC);
  border-bottom: 2px solid var(--bnpl-border, #E2E8F0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
html.bnpl-app-active #content.bnpl-resource-master-view > #resource-master-root.rm-page .rm-tabs-wrap {
  margin: -12px -14px 12px;
  padding: 8px 14px;
}
#resource-master-root .rm-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

html.bnpl-app-active #resource-master-root > #rm-build-banner,
html.bnpl-app-active #resource-master-root > .rm-title {
  display: none !important;
}

html.bnpl-android-shell #resource-master-root > #rm-build-banner,
html.bnpl-ios-standalone #resource-master-root > #rm-build-banner,
html.bnpl-android-shell #resource-master-root > .rm-title,
html.bnpl-ios-standalone #resource-master-root > .rm-title {
  display: none !important;
}
.rm-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rm-tabs::-webkit-scrollbar { display: none; }
.rm-tab {
  flex: 1 1 0;
  min-width: 72px;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFF;
  color: #334155;
  white-space: nowrap;
}
.rm-tab-active {
  background: #3949AB;
  border-color: #3949AB;
  color: #FFF;
  box-shadow: 0 2px 6px rgba(57, 73, 171, 0.25);
}
.rm-panel {
  min-height: 120px;
}
#resource-master-root .rm-panel .st-master-scroll {
  min-height: 0;
}
.rm-panel .st-master-scroll {
  min-height: calc(100dvh - 220px);
}
@media (max-width: 767px) {
  :root {
    --erp-topbar-height: 44px;
    --erp-topbar-actions-height: 48px;
  }
}

@media (min-width: 1100px) {
  :root {
    --erp-shell-sticky-offset: calc(var(--erp-topbar-height) + var(--erp-topbar-actions-height) + var(--erp-crumb-height) + 10px + var(--safe-top));
  }
  .rm-panel .st-master-scroll {
    min-height: calc(100dvh - 180px);
  }
  #resource-master-root .rm-panel .st-master-scroll {
    min-height: 0;
  }
}
.rm-placeholder {
  padding: 16px 4px;
  text-align: center;
}
.rm-page .st-master-title { display: none; }

/* Resource Master — payroll iframe embed + skeleton */
.rm-payroll-embed-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 320px;
  overflow: hidden;
  box-sizing: border-box;
}

.rm-payroll-embed {
  display: block;
  width: 100%;
  min-height: 480px;
  border: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rm-payroll-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(12px, 3vw, 16px);
  min-height: 280px;
}

@keyframes rm-sk-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.rm-sk-bar {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: rm-sk-shimmer 1.4s ease-in-out infinite;
}

.rm-sk-bar--title {
  width: 52%;
  height: 18px;
}

.rm-sk-bar--sub {
  width: 36%;
  height: 11px;
}

.rm-sk-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rm-sk-field {
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: rm-sk-shimmer 1.4s ease-in-out infinite;
}

.rm-sk-caption {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin: 4px 0 0;
}

@media (min-width: 768px) {
  .rm-payroll-embed {
    min-height: 560px;
  }
}

.sdpr-panel-tab {
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFF;
  color: #0F172A;
  cursor: pointer;
}
.sdpr-panel-tab.is-active {
  background: #3949AB;
  color: #FFF;
  border-color: #303F9F;
}
.sdpr-boq-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.sdpr-boq-toolbar .sdpr-search { flex: 1; margin: 0; }
.sdpr-boq-toolbar .hint { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
.sdpr-inp-sm { padding: 6px 8px; font-size: 13px; }
.sdpr-radio-inline { font-size: 13px; font-weight: 600; margin-right: 4px; }
.sdpr-setup-table td { vertical-align: middle; }
.sdpr-meas-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sdpr-gps-mini { padding: 4px 8px; font-size: 11px; }
.sdpr-boq-picker-compact { max-height: 140px; }

/* —— Verification Center navigation shell (v222+) —— */
.vc-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 32px;
  width: 100%;
}
.vc-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #E2E8F0;
}
.vc-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vc-title {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: #1E3A8A;
}
.vc-route-tag {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 6px;
}
.vc-phase-banner {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  padding: 10px 12px;
}
.vc-phase-banner-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: #92400E;
}
.vc-phase-banner-hint { margin: 0; font-size: 13px; }
.vc-section { display: flex; flex-direction: column; gap: 8px; }
.vc-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
}
.vc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.vc-kpi {
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  background: #F8FAFC;
  padding: 10px 12px;
}
.vc-kpi-wide { grid-column: 1 / -1; }
.vc-kpi-label { margin: 0; font-size: 12px; font-weight: 700; color: #64748B; }
.vc-kpi-value { margin: 4px 0 0; font-size: 22px; font-weight: 800; color: #1E40AF; }
.vc-kpi-note { margin: 4px 0 0; font-size: 11px; color: #94A3B8; }
.vc-filter-panel {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.vc-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 10px;
  margin-top: 8px;
}
.vc-filter-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vc-filter-field span { font-size: 11px; font-weight: 700; color: #64748B; }
.vc-filter-field input,
.vc-filter-field select {
  padding: 7px 8px;
  font-size: 13px;
  border: 1px solid #94A3B8;
  border-radius: 8px;
  background: #fff;
}
.vc-filter-wide { grid-column: 1 / -1; }
.vc-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.vc-table-wrap { overflow-x: auto; border: 1px solid #E2E8F0; border-radius: 10px; }
.vc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vc-table th {
  text-align: left;
  padding: 8px 10px;
  background: #F1F5F9;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #E2E8F0;
}
.vc-table td { padding: 8px 10px; border-bottom: 1px solid #F1F5F9; }
.vc-empty-cell {
  text-align: center;
  color: #64748B;
  font-weight: 600;
  padding: 24px 12px !important;
}
.vc-list-placeholder {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  line-height: 1.5;
}
.vc-settings-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
  font-weight: 600;
  color: #334155;
}

/* Control Panel — CP-SHELL */
.cp-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 32px;
  width: 100%;
}
.cp-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #E2E8F0;
}
.cp-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cp-title {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: #1E3A8A;
}
.cp-route-tag {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 6px;
}
.cp-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 8px;
  border-bottom: 1px solid #E2E8F0;
}
.cp-subnav-link {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.cp-subnav-link-active {
  background: #1E40AF;
  border-color: #1E40AF;
  color: #fff;
}

/* Control Panel — Hub dashboard (rich rows) */
.cp-page-hub,
.cp-page-module {
  max-width: min(1120px, 100%);
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
}
.cp-page-hub .cp-header,
.cp-page-module .cp-header {
  padding-left: 0;
  padding-right: 0;
}
.cp-kpi-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.cp-kpi-compact { padding: 8px 10px; }
.cp-kpi-compact .cp-kpi-value { font-size: 18px; }
.cp-hub-group {
  margin: 0 0 4px;
}
.cp-hub-group-title {
  margin: 14px 0 8px;
  padding: 7px 10px 7px 12px;
  font-size: var(--font-small);
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-left: 3px solid var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0 8px 8px 0;
  line-height: 1.3;
}
.cp-hub-group:first-child .cp-hub-group-title {
  margin-top: 6px;
}
.cp-hub-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cp-hub-row {
  display: grid;
  grid-template-columns: minmax(0, 22%) minmax(0, 1fr) minmax(0, max-content);
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.cp-hub-row:hover {
  border-color: #93C5FD;
  background: #F8FAFC;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.08);
}
.cp-hub-row-active,
.cp-module-bar-active {
  border-color: #1E40AF;
  background: #EFF6FF;
  box-shadow: inset 3px 0 0 #1E40AF;
}
.cp-hub-icon {
  font-size: 20px;
  line-height: 1;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.cp-hub-lead {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cp-hub-desc {
  font-size: var(--font-body);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  line-height: 1.4;
  min-width: 0;
}
.cp-hub-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cp-hub-title {
  font-size: var(--font-small);
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
  line-height: 1.3;
}
.cp-hub-blurb {
  font-size: var(--font-body);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cp-hub-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 8px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}
.cp-hub-status {
  font-size: var(--font-body);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-hub-open {
  font-size: var(--font-body);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.cp-route-tag,
.cp-route-hint {
  display: none !important;
}
.cp-module-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 10px;
  border: 1px solid #1E40AF;
  border-radius: 10px;
  background: #EFF6FF;
  margin-bottom: 4px;
}
.cp-back-hub {
  font-size: 12px;
  font-weight: 700;
  color: #1E40AF;
  background: #fff;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.cp-module-bar-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.cp-module-bar-text { min-width: 0; }
.cp-module-bar-blurb {
  display: block;
  -webkit-line-clamp: 1;
}
@media (min-width: 1100px) {
  .cp-page-hub,
  .cp-page-module {
    padding-left: 4px;
    padding-right: 8px;
  }
}
@media (max-width: 720px) {
  .cp-kpi-grid-compact { grid-template-columns: 1fr; }
  .cp-hub-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 6px;
    padding: 10px;
  }
  .cp-hub-desc {
    font-size: var(--font-body);
    line-height: 1.4;
  }
  .cp-hub-meta {
    justify-content: space-between;
    width: 100%;
  }
  .cp-hub-blurb { -webkit-line-clamp: 2; }
  .cp-module-bar { flex-direction: column; align-items: stretch; }
  .cp-module-bar-body { width: 100%; }
}

.cp-phase-banner {
  background: #EFF6FF;
  border: 1px solid #93C5FD;
  border-radius: 10px;
  padding: 10px 12px;
}
.cp-phase-banner-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: #1E3A8A;
}
.cp-phase-banner-hint { margin: 0; font-size: 13px; }
.cp-section { display: flex; flex-direction: column; gap: 10px; }
.cp-section-lead { margin: 0; font-size: 15px; line-height: 1.5; color: #334155; }

/* CP1 Staff & Payroll Policy — 4-section layout (UI only) */
/* Scoped overrides: index.html global label/input/button { width:100% } breaks this form. */
.cp1-policy-section { gap: 14px; padding-bottom: 24px; max-width: 100%; width: 100%; }
.cp1-policy-stack { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.cp1-policy-card {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  width: 100%;
  box-sizing: border-box;
}
.cp1-policy-card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: #1E40AF !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cp1-policy-card-hint { margin: -4px 0 10px; text-align: left !important; color: #000 !important; font-weight: 600 !important; }
.cp1-policy-field-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.cp1-policy-section label.cp1-policy-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #F8FAFC;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #000000 !important;
  line-height: 1.35;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}
.cp1-policy-section .cp1-policy-check-text {
  flex: 1 1 auto;
  min-width: 0;
  color: #000000 !important;
  font-weight: 700 !important;
}
.cp1-policy-section input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  accent-color: #3949AB;
}
.cp1-policy-section label.cp1-policy-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #000000 !important;
  width: 100%;
}
.cp1-policy-section .cp1-policy-select,
.cp1-policy-section .cp1-chain-label,
.cp1-policy-section .cp1-chain-role {
  width: 100% !important;
  max-width: 100%;
  height: 40px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border: 1px solid #94A3B8 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #000000 !important;
  background: #FFFFFF !important;
  box-sizing: border-box;
}
.cp1-policy-section .hint {
  text-align: left !important;
  margin: 8px 0 0 !important;
  color: #000000 !important;
  font-weight: 600 !important;
}
.cp1-approval-chain-vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 10px;
}
.cp1-chain-row {
  position: relative;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 22px;
  background: #F8FAFC;
}
.cp1-chain-row:last-child { margin-bottom: 8px; }
.cp1-chain-row:not(:last-child)::after {
  content: '↓';
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 800;
  color: #94A3B8;
  line-height: 1;
}
.cp1-chain-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cp1-chain-level-label {
  font-weight: 800;
  font-size: 14px;
  color: #0F172A;
  flex: 1;
  min-width: 100px;
}
.cp1-chain-on-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}
.cp1-chain-row-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 520px) {
  .cp1-chain-row-fields { grid-template-columns: 1fr 1fr; }
}
.cp1-policy-section .cp1-chain-on-label {
  display: inline-flex !important;
  gap: 6px;
  align-items: center;
  margin: 0 !important;
}
.cp1-policy-section .cp1-chain-on-label input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
}
.cp1-chain-remove {
  min-width: 32px !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1;
}
.cp1-policy-section .cp1-add-level-btn {
  width: auto !important;
  max-width: 100%;
  height: 40px !important;
  font-size: 13px !important;
  padding: 0 14px !important;
  margin-top: 4px;
  align-self: flex-start;
  border-radius: 6px !important;
  color: #000000 !important;
  font-weight: 700 !important;
}
.cp1-policy-save-bar {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 0 max(12px, env(safe-area-inset-bottom));
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border-top: 2px solid #E2E8F0;
}
.cp1-policy-save-bar #cp1SavePolicy.btn.primary.erp-control-box {
  width: auto !important;
  min-width: 200px;
  max-width: min(100%, 320px);
  flex: 0 0 auto;
  margin: 0 !important;
}
.cp1-policy-save-bar .cp1-policy-save-status {
  flex: 1 1 160px;
  min-width: 0;
  margin: 0 !important;
  text-align: left !important;
  color: #000000 !important;
  font-weight: 700 !important;
}
@media (min-width: 640px) {
  .cp1-policy-save-bar {
    justify-content: space-between;
  }
  .cp1-policy-save-bar .cp1-policy-save-status {
    text-align: right !important;
  }
}
.cp1-policy-save-bar .cp1-chain-remove,
.cp1-policy-section .cp1-chain-remove {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 6px !important;
}
.cp-route-hint { margin: 0; }
.cp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.cp-kpi {
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  background: #F8FAFC;
  padding: 10px 12px;
}
.cp-kpi-label { margin: 0; font-size: 12px; font-weight: 700; color: #64748B; }
.cp-kpi-value { margin: 4px 0 0; font-size: 22px; font-weight: 800; color: #1E40AF; }
.cp-link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-deep-link { font-size: 13px; }
.cp-pb-mount { margin-top: 8px; width: 100%; max-width: 100%; box-sizing: border-box; }

/* Permission Board (CP-1) */
.pb-page { display: flex; flex-direction: column; gap: 12px; }
.pb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
}
.pb-field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.pb-field-grow { flex: 1; min-width: 180px; }
.pb-field span { font-size: 11px; font-weight: 700; color: #64748B; }
.pb-field select,
.pb-field input {
  padding: 8px;
  border: 1px solid #94A3B8;
  border-radius: 8px;
  font-size: 13px;
}
.pb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pb-note { margin: 0; }
.pb-matrix-wrap { overflow-x: auto; border: 1px solid #E2E8F0; border-radius: 10px; }
.pb-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.pb-matrix th {
  text-align: left;
  padding: 8px 10px;
  background: #F1F5F9;
  font-weight: 700;
  border-bottom: 1px solid #E2E8F0;
}
.pb-matrix td { padding: 8px 10px; border-bottom: 1px solid #F1F5F9; vertical-align: top; }
.pb-group-row td { background: #EFF6FF; font-size: 14px; }
.pb-code { font-family: ui-monospace, monospace; font-size: 11px; color: #475569; }
.pb-actions-cell { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 0; }
.pb-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.pb-action-chip input { margin: 0; }
.pb-days-cell {
  width: 104px;
  min-width: 96px;
  vertical-align: middle !important;
  position: relative;
  z-index: 3;
}
.pb-matrix input.pb-days {
  width: 72px !important;
  height: 40px !important;
  border-radius: 6px !important;
  border: 1.5px solid #CBD5E1;
  color: #000000 !important;
  font-weight: 700;
  text-align: center;
  background: #fff !important;
  box-sizing: border-box;
  pointer-events: auto !important;
  position: relative;
  z-index: 3;
  cursor: text;
}
.pb-matrix input.pb-days:disabled {
  opacity: 0.55;
  background: #F1F5F9 !important;
  color: #94A3B8 !important;
  cursor: not-allowed;
}
.pb-days-cell {
  width: 104px;
  min-width: 96px;
  vertical-align: middle !important;
  position: relative;
  z-index: 3;
}
.pb-matrix input.pb-days {
  width: 72px !important;
  height: 40px !important;
  border-radius: 6px !important;
  border: 1.5px solid #CBD5E1;
  color: #000000 !important;
  font-weight: 700;
  text-align: center;
  background: #fff !important;
  box-sizing: border-box;
  pointer-events: auto !important;
  position: relative;
  z-index: 3;
  cursor: text;
}
.pb-matrix input.pb-days:disabled {
  opacity: 0.55;
  background: #F1F5F9 !important;
  color: #94A3B8 !important;
  cursor: not-allowed;
}

/* Sidebar + Dashboard — TEST-only module build marks (read-only) */
.side-drawer .nav-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.side-drawer .nav-item .nav-leaf {
  flex: 1;
  min-width: 0;
}
.nav-build-badge {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.nav-build-badge--main {
  background: #DCFCE7 !important;
  border: 1px solid #86EFAC;
  color: #166534 !important;
  opacity: 0.92;
}
.nav-build-badge--uat {
  background: #FEF3C7 !important;
  border: 1px solid #FCD34D;
  color: #92400E !important;
}
.dash-build-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #C5CAE9;
  border-radius: 8px;
  background: #EEF2FF;
  font-size: 12px;
  font-weight: 700;
}
.dash-build-test-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  background: #3949AB !important;
  color: #FFFFFF !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.dash-build-strip-label {
  color: #000000 !important;
  font-weight: 700;
}
.dash-build-strip-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-build-strip-item.is-on-main {
  padding: 3px 10px;
  border-radius: 999px;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #166534 !important;
  font-weight: 700 !important;
}
.dash-build-strip-item.needs-attention {
  padding: 3px 10px;
  border-radius: 999px;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #92400E !important;
}

/* Site Master — primary actions under title (mobile thumb zone) */
.site-detail-actions-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 14px;
}
.site-detail-actions-top .action-btn.primary { flex: 1 1 auto; min-width: 140px; }
.site-detail-readonly-hint { margin: 10px 0 14px; }
.site-detail-delete { margin-top: 16px; width: 100%; }

.site-loc-preview-wrap {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
}
.site-loc-preview-wrap.site-loc-preview-confirmed {
  border-color: #16A34A;
  box-shadow: 0 0 0 1px #16A34A33;
}
.site-loc-preview-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
}
.site-loc-preview-hint { margin: 0 0 10px; font-size: 13px; }
.site-loc-preview-map {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
  background: #E2E8F0;
}
.site-loc-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.site-loc-preview-actions .action-btn.primary { flex: 1 1 auto; min-width: 160px; }

body.site-loc-modal-open { overflow: hidden; }
.site-loc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}
.site-loc-modal.hidden { display: none; }
.site-loc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.site-loc-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 16px 16px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.site-loc-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #64748B;
}
.site-loc-modal-title {
  margin: 0 32px 4px 0;
  font-weight: 700;
  font-size: 16px;
}
.site-loc-modal-hint { margin: 0 0 12px; font-size: 13px; }
.site-loc-modal-map {
  width: 100%;
  height: min(52vh, 360px);
  border-radius: 8px;
  overflow: hidden;
  background: #E2E8F0;
}
.site-loc-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.site-loc-modal-actions .action-btn { width: 100%; justify-content: center; }

/* Permission Simple UI — Simple / Advanced role mode (RAC) */
.psi-page { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.psi-banner-advanced { border-color: #FDBA74 !important; background: #FFF7ED !important; }
.psi-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.psi-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}
.psi-toolbar-row-top { align-items: flex-end; }
.psi-toolbar-row-search { width: 100%; }
.psi-toolbar-row-bottom { align-items: center; }
.psi-toolbar-row-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.psi-toolbar-actions-left { justify-self: start; display: flex; align-items: center; min-width: 0; }
.psi-toolbar-actions-center { justify-self: center; display: flex; align-items: center; }
.psi-toolbar-actions-right {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.psi-preview-btn,
.psi-save-btn { height: 40px !important; white-space: nowrap; }
.psi-save-status { margin: 0; text-align: right; }
.psi-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.psi-toolbar-group-box {
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
}
.psi-toolbar-group-role.psi-toolbar-group-box {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
}
.psi-role-split-box { width: 100%; }
.psi-role-split-label {
  display: block;
  font-size: 11px;
  font-weight: 700 !important;
  color: #000 !important;
  margin: 0 0 4px;
  line-height: 1.2;
}
.psi-role-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  align-items: stretch;
}
.psi-role-split-cell { min-width: 0; width: 100%; }
.psi-role-split-control,
.psi-role-split-select select,
.psi-role-split-action .psi-new-role-btn {
  width: 100% !important;
  max-width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
  border: 1px solid #94A3B8 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #000 !important;
  margin: 0 !important;
}
.psi-role-split-action .psi-new-role-btn {
  background: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2 !important;
}
.psi-role-split-select select {
  padding: 0 10px !important;
  background: #fff !important;
}
.psi-new-role-modal .pb-field { margin-bottom: 10px; }
.psi-new-role-modal .pb-field select,
.psi-new-role-modal .pb-field input { width: 100%; height: 40px !important; border-radius: 6px !important; }
.psi-toolbar-group-copy {
  flex: 1 1 280px;
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
}
.psi-toolbar-group-copy .pb-field { flex: 1 1 140px; min-width: 120px; margin: 0; }
.psi-copy-btn { height: 40px !important; align-self: flex-end; white-space: nowrap; }
.psi-search-field { width: 100%; margin: 0; }
.psi-search-field input { width: 100%; height: 40px !important; border-radius: 6px !important; }
.psi-adv-filters-row { width: 100%; }
.psi-adv-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.psi-adv-filter-field { margin: 0; flex: 1 1 160px; min-width: 140px; }
.psi-adv-filter-field .rac-filter-select,
.psi-adv-filter-field input {
  width: 100%;
  height: 40px !important;
  border-radius: 6px !important;
}
.psi-adv-filters .pb-field span { color: #000 !important; font-weight: 700 !important; }
.psi-dirty { color: #EA580C !important; font-weight: 700 !important; font-size: 12px; white-space: nowrap; }
.psi-mode {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid #94A3B8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px #E2E8F0;
}
.psi-mode-btn {
  appearance: none;
  border: none !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #000 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  height: 40px !important;
  min-width: 84px;
  padding: 0 14px !important;
  cursor: pointer;
  box-shadow: none !important;
}
.psi-mode-btn + .psi-mode-btn { border-left: 1px solid #CBD5E1 !important; }
.psi-mode-btn.active {
  background: #3949AB !important;
  color: #fff !important;
}
.psi-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
}
.psi-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
  padding: 12px;
  border: 2px solid #CBD5E1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  min-height: 112px;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}
.psi-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.psi-tile-on { border-color: #16A34A; background: #F0FDF4; }
.psi-tile-partial { border-color: #F59E0B; background: #FFFBEB; }
.psi-tile-off { border-color: #CBD5E1; background: #F8FAFC; }
.psi-tile-icon { font-size: 24px; line-height: 1; }
.psi-tile-name {
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.25;
  min-height: 2.5em;
}
.psi-tile-state { font-size: 16px; font-weight: 700; color: #000 !important; line-height: 1; }
.psi-tile-count { font-size: 11px; font-weight: 700; color: #64748B !important; margin-top: auto; }
.psi-mod-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  align-self: flex-start;
  border: var(--erp-control-box-border);
  border-radius: var(--erp-control-box-radius);
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
.psi-mod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  height: auto;
  padding: 8px 14px;
  margin: 0;
  border: none;
  border-bottom: 1px solid #EDF2F7;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}
.psi-mod-row:last-child { border-bottom: none; }
.psi-mod-row:hover { background: #F8FAFC; }
.psi-mod-row-on { background: #F0FDF4; }
.psi-mod-row-partial { background: #FFFBEB; }
.psi-mod-row-off { background: #fff; }
.psi-mod-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.psi-mod-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}
.psi-mod-name {
  font-size: 15px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
  min-width: 0;
  white-space: normal;
}
.psi-mod-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.psi-mod-count {
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  white-space: nowrap;
}
.psi-mod-state {
  font-size: 15px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1;
}
.psi-page--simple > .psi-mod-list,
.psi-page--simple > .psi-search-hits {
  width: max-content;
  max-width: 720px;
  align-self: flex-start;
}
.psi-module-win {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 720px;
  align-self: flex-start;
  border: var(--erp-control-box-border);
  border-radius: var(--erp-control-box-radius);
  padding: 16px 20px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.psi-module-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}
.psi-module-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 180px;
  min-width: 0;
}
.psi-module-title { margin: 0; font-size: 17px; font-weight: 700; color: #000 !important; }
.psi-module-state-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #CBD5E1;
  color: #000 !important;
  background: #F8FAFC;
}
.psi-module-state-on { border-color: #16A34A; background: #DCFCE7; }
.psi-module-state-partial { border-color: #F59E0B; background: #FEF3C7; }
.psi-module-state-off { border-color: #CBD5E1; background: #F1F5F9; }
.psi-module-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.psi-back-btn { white-space: nowrap; }
.psi-mod-btn-on { color: #166534 !important; }
.psi-mod-btn-off { color: #475569 !important; }
.psi-module-subbar {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}
.psi-module-search-field { margin: 0; width: 100%; }
.psi-module-search-field input { width: 100%; height: 40px !important; border-radius: 6px !important; }
.psi-act-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: var(--erp-control-box-border);
  border-radius: var(--erp-control-box-radius);
  overflow: hidden;
}
.psi-act-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border: none;
  border-bottom: 1px solid #EDF2F7;
  border-radius: 0;
  background: #fff;
  min-height: 40px;
  box-sizing: border-box;
  transition: background 0.2s ease;
}
.psi-act-row:last-child { border-bottom: none; }
.psi-act-row:hover { background: #F8FAFC; }
.psi-act-sensitive {
  background: #FFF5F5;
  border-left: 3px solid #E53E3E;
}
.psi-act-sensitive:hover { background: #FEF2F2; }
.psi-act-special-power {
  background: #FFFBEB;
  border-left: 3px solid #DD6B20;
}
.psi-act-special-power:hover { background: #FEF3C7; }
.psi-act-highlight { box-shadow: 0 0 0 2px #3949AB; }
.psi-act-label-wrap { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.psi-act-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.psi-act-info {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #CBD5E0;
  border-radius: 50%;
  background: #F7FAFC;
  color: #3949AB !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  cursor: help;
}
.psi-act-info:focus { outline: 2px solid #3949AB; outline-offset: 1px; }
.psi-module-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  text-align: left;
}
.psi-module-note {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
  text-align: left;
}
.psi-module-note-warn {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.psi-act-sensitive-badge {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  color: #B91C1C !important;
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.2;
  text-transform: uppercase;
}
.psi-act-special-power-badge {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  color: #9A3412 !important;
  background: #FFEDD5;
  border: 1px solid #FDBA74;
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.2;
  text-transform: uppercase;
}
.psi-act-label {
  font-size: 14px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.psi-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}
.psi-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.psi-switch-ui {
  width: 52px;
  height: 28px;
  background: #CBD5E1;
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.psi-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.psi-switch input:checked + .psi-switch-ui { background: #16A34A; }
.psi-switch input:checked + .psi-switch-ui::after { transform: translateX(24px); }
.psi-search-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #F8FAFC;
}
.psi-hit { font-size: 12px !important; padding: 6px 10px !important; }
.psi-preview {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  background: #F8FAFC;
}
.psi-preview-body { font-size: 13px; font-weight: 600; color: #000 !important; line-height: 1.6; }
.psi-advanced-mount {
  margin-top: 4px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}
.psi-page--simple {
  align-items: flex-start;
}
.psi-page--simple > .psi-banner,
.psi-page--simple > .psi-toolbar,
.psi-page--simple > .psi-preview {
  width: 100%;
  max-width: 720px;
  align-self: flex-start;
}
.psi-page--simple .psi-toolbar-group-role.psi-toolbar-group-box {
  flex: 0 1 auto;
  width: 100%;
  max-width: 720px;
}
.psi-page--simple .psi-role-split-box {
  width: auto;
  max-width: 720px;
}
.psi-page--simple .psi-toolbar-row-search {
  width: auto;
  max-width: 720px;
}
.psi-page--simple .psi-search-field {
  width: auto;
  max-width: 360px;
  flex: 0 1 360px;
  margin: 0;
}
.psi-page--simple .psi-search-field input {
  width: 100%;
  max-width: 360px;
}
.psi-page--simple .psi-toolbar-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 720px;
  grid-template-columns: none;
}
.psi-page--simple .psi-toolbar-actions-left,
.psi-page--simple .psi-toolbar-actions-center,
.psi-page--simple .psi-toolbar-actions-right {
  justify-self: unset;
}
.psi-page--simple .psi-toolbar-actions-right {
  justify-content: flex-start;
}
.psi-page--simple .psi-save-status {
  text-align: left;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split {
  display: flex !important;
  grid-template-columns: none !important;
  width: auto !important;
  max-width: 100%;
  align-items: flex-end;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split-select {
  flex: 1 1 240px;
  max-width: 320px;
  width: auto;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split-action {
  flex: 0 0 auto;
  width: auto;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split-action .psi-new-role-btn {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}
.psi-page--advanced {
  align-items: flex-start;
}
.psi-page--advanced > .psi-banner,
.psi-page--advanced > .psi-toolbar,
.psi-page--advanced > .psi-preview {
  width: 100%;
  max-width: 1200px;
  align-self: flex-start;
}
.psi-page--advanced > .psi-advanced-mount {
  width: max-content;
  max-width: 1200px;
  align-self: flex-start;
}
.psi-page--advanced .psi-toolbar-group-role.psi-toolbar-group-box {
  flex: 0 1 auto;
  max-width: 520px;
  width: 100%;
}
.psi-page--advanced .psi-toolbar-group-copy {
  flex: 0 1 auto;
  max-width: 420px;
}
.psi-page--advanced .psi-adv-filters-row,
.psi-page--advanced .psi-adv-filters {
  width: auto;
  max-width: 1200px;
}
.psi-page--advanced .psi-adv-filter-field {
  flex: 0 0 auto;
  width: auto;
  min-width: 160px;
  max-width: 240px;
}
.psi-page--advanced .psi-adv-filter-search {
  max-width: 280px;
}
.psi-page--advanced .psi-toolbar-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 1200px;
  grid-template-columns: none;
}
.psi-page--advanced .psi-toolbar-actions-left,
.psi-page--advanced .psi-toolbar-actions-center,
.psi-page--advanced .psi-toolbar-actions-right {
  justify-self: unset;
}
.psi-page--advanced .psi-advanced-mount {
  border: var(--erp-control-box-border);
  border-radius: var(--erp-control-box-radius);
}
.psi-page--advanced .pb-matrix-wrap {
  width: max-content !important;
  max-width: 100%;
  overflow-x: auto;
}
.psi-page--advanced .pb-matrix {
  width: max-content !important;
  min-width: 0 !important;
  table-layout: auto !important;
}
.psi-page--advanced .pb-matrix th,
.psi-page--advanced .pb-matrix td {
  width: auto;
  white-space: nowrap;
  vertical-align: middle;
}
.psi-page--advanced .pb-matrix th:nth-child(1),
.psi-page--advanced .pb-matrix td:nth-child(1) {
  max-width: 260px;
  white-space: normal;
}
.psi-page--advanced .pb-matrix .pb-code {
  white-space: nowrap;
}
.psi-page--advanced .pb-matrix .pb-actions-cell {
  width: auto;
  white-space: normal;
}
.psi-page--advanced .pb-note {
  margin: 0 0 8px;
  text-align: left;
  color: #000 !important;
  font-weight: 700;
}
.psi-page--simple {
  align-items: flex-start;
}
.psi-page--simple > .psi-banner,
.psi-page--simple > .psi-toolbar,
.psi-page--simple > .psi-preview {
  width: 100%;
  max-width: 720px;
  align-self: flex-start;
}
.psi-page--simple .psi-toolbar-group-role.psi-toolbar-group-box {
  flex: 0 1 auto;
  width: 100%;
  max-width: 720px;
}
.psi-page--simple .psi-role-split-box {
  width: auto;
  max-width: 720px;
}
.psi-page--simple .psi-toolbar-row-search {
  width: auto;
  max-width: 720px;
}
.psi-page--simple .psi-search-field {
  width: auto;
  max-width: 360px;
  flex: 0 1 360px;
  margin: 0;
}
.psi-page--simple .psi-search-field input {
  width: 100%;
  max-width: 360px;
}
.psi-page--simple .psi-toolbar-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 720px;
  grid-template-columns: none;
}
.psi-page--simple .psi-toolbar-actions-left,
.psi-page--simple .psi-toolbar-actions-center,
.psi-page--simple .psi-toolbar-actions-right {
  justify-self: unset;
}
.psi-page--simple .psi-toolbar-actions-right {
  justify-content: flex-start;
}
.psi-page--simple .psi-save-status {
  text-align: left;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split {
  display: flex !important;
  grid-template-columns: none !important;
  width: auto !important;
  max-width: 100%;
  align-items: flex-end;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split-select {
  flex: 1 1 240px;
  max-width: 320px;
  width: auto;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split-action {
  flex: 0 0 auto;
  width: auto;
}
html.bnpl-app-active #content .psi-page--simple .psi-role-split-action .psi-new-role-btn {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}
.psi-page--advanced {
  align-items: flex-start;
}
.psi-page--advanced > .psi-banner,
.psi-page--advanced > .psi-toolbar,
.psi-page--advanced > .psi-preview {
  width: 100%;
  max-width: 1200px;
  align-self: flex-start;
}
.psi-page--advanced > .psi-advanced-mount {
  width: max-content;
  max-width: 1200px;
  align-self: flex-start;
}
.psi-page--advanced .psi-toolbar-group-role.psi-toolbar-group-box {
  flex: 0 1 auto;
  max-width: 520px;
  width: 100%;
}
.psi-page--advanced .psi-toolbar-group-copy {
  flex: 0 1 auto;
  max-width: 420px;
}
.psi-page--advanced .psi-adv-filters-row,
.psi-page--advanced .psi-adv-filters {
  width: auto;
  max-width: 1200px;
}
.psi-page--advanced .psi-adv-filter-field {
  flex: 0 0 auto;
  width: auto;
  min-width: 160px;
  max-width: 240px;
}
.psi-page--advanced .psi-adv-filter-search {
  max-width: 280px;
}
.psi-page--advanced .psi-toolbar-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 1200px;
  grid-template-columns: none;
}
.psi-page--advanced .psi-toolbar-actions-left,
.psi-page--advanced .psi-toolbar-actions-center,
.psi-page--advanced .psi-toolbar-actions-right {
  justify-self: unset;
}
.psi-page--advanced .psi-advanced-mount {
  border: var(--erp-control-box-border);
  border-radius: var(--erp-control-box-radius);
}
.psi-page--advanced .pb-matrix-wrap {
  width: max-content !important;
  max-width: 100%;
  overflow-x: auto;
}
.psi-page--advanced .pb-matrix {
  width: max-content !important;
  min-width: 0 !important;
  table-layout: auto !important;
}
.psi-page--advanced .pb-matrix th,
.psi-page--advanced .pb-matrix td {
  width: auto;
  white-space: nowrap;
  vertical-align: middle;
}
.psi-page--advanced .pb-matrix th:nth-child(1),
.psi-page--advanced .pb-matrix td:nth-child(1) {
  max-width: 260px;
  white-space: normal;
}
.psi-page--advanced .pb-matrix .pb-code {
  white-space: nowrap;
}
.psi-page--advanced .pb-matrix .pb-actions-cell {
  width: auto;
  white-space: normal;
}
.psi-page--advanced .pb-note {
  margin: 0 0 8px;
  text-align: left;
  color: #000 !important;
  font-weight: 700;
}
.psi-page .pb-field select,
.psi-page .pb-field input {
  height: 40px !important;
  border-radius: 6px !important;
  color: #000 !important;
  font-weight: 600;
}
.psi-page .pb-field span { color: #000 !important; font-weight: 700 !important; }

/*
 * ROOT FIX — index.html global `button, .btn { width:100% }` forces toolbar
 * buttons onto their own line (New Role appears above / beside Role wrongly).
 * Same pattern as Staff Form A v850 + attendance punch log overrides.
 */
html.bnpl-app-active #content .psi-page button:not(.psi-tile):not(.psi-mod-row),
html.bnpl-app-active #content .psi-page .btn:not(.psi-tile):not(.psi-mod-row) {
  width: auto !important;
  max-width: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
html.bnpl-app-active #content .psi-page .psi-tiles button.psi-tile,
html.bnpl-app-active #content .psi-page .psi-mod-list button.psi-mod-row {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  justify-content: space-between !important;
  flex: none !important;
  height: auto !important;
  min-height: 40px !important;
}
html.bnpl-app-active #content .psi-page .psi-role-split {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}
html.bnpl-app-active #content .psi-page .psi-role-split-control,
html.bnpl-app-active #content .psi-page .psi-role-split-select select,
html.bnpl-app-active #content .psi-page .psi-role-split-action .psi-new-role-btn {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #000 !important;
  border: 1px solid #94A3B8 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .psi-page .psi-role-split-action .psi-new-role-btn {
  background: #fff !important;
}
html.bnpl-app-active #content .psi-page .psi-copy-btn,
html.bnpl-app-active #content .psi-page .psi-preview-btn,
html.bnpl-app-active #content .psi-page .psi-save-btn,
html.bnpl-app-active #content .psi-page .psi-module-actions .btn,
html.bnpl-app-active #content .psi-page #psiModuleReset,
html.bnpl-app-active #content .psi-page .psi-mod-btn-on,
html.bnpl-app-active #content .psi-page .psi-mod-btn-off,
html.bnpl-app-active #content .psi-page .psi-back-btn {
  min-height: var(--erp-control-box-height) !important;
  height: var(--erp-control-box-height) !important;
  max-height: var(--erp-control-box-height) !important;
  padding: 0 14px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius) !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 720px) {
  .psi-toolbar-group-role,
  .psi-toolbar-group-copy,
  .psi-toolbar-row-actions { width: 100%; }
  .psi-toolbar-group-role.psi-toolbar-group-box {
    max-width: none;
  }
  .psi-role-split {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  html.bnpl-app-active #content .psi-page .psi-role-split-control,
  html.bnpl-app-active #content .psi-page .psi-role-split-select select,
  html.bnpl-app-active #content .psi-page .psi-role-split-action .psi-new-role-btn,
  html.bnpl-app-active #content .psi-page .psi-copy-btn,
  html.bnpl-app-active #content .psi-page .psi-preview-btn,
  html.bnpl-app-active #content .psi-page .psi-save-btn {
    width: 100% !important;
  }
  .psi-toolbar-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .psi-toolbar-actions-left,
  .psi-toolbar-actions-center,
  .psi-toolbar-actions-right {
    width: 100%;
    justify-content: stretch;
    justify-self: stretch;
  }
  .psi-toolbar-actions-left .psi-mode { width: 100%; }
  .psi-toolbar-actions-left .psi-mode-btn { flex: 1 1 50%; }
  .psi-preview-btn,
  .psi-save-btn { width: 100%; }
  .psi-toolbar-actions-right { flex-direction: column; align-items: stretch; }
  .psi-save-status { text-align: center; }
  .psi-adv-filters { flex-direction: column; align-items: stretch; }
  .psi-adv-filter-field { width: 100%; min-width: 0; }
  .psi-toolbar-group-copy { flex-direction: column; align-items: stretch; }
  .psi-copy-btn { width: 100%; }
  .psi-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psi-module-actions { width: 100%; margin-left: 0; }
  .psi-module-actions .btn { flex: 1 1 auto; }
  .psi-act-row { padding: 10px; gap: 8px; }
  .psi-act-label { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* Staff People grid — self punch + row actions (v419) */
/* Staff People grid — COMMON UI LOCK (final Staff correction) */
.spg-wrap {
  margin: 0 0 16px;
  padding: 12px;
  background: var(--bnpl-card-bg, #fff);
  border: 1px solid var(--bnpl-border, #e2e8f0);
  border-radius: var(--bnpl-radius, 12px);
  box-shadow: var(--bnpl-shadow-sm);
}
.spg-wrap .spg-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--bnpl-text, #0f172a);
}
.spg-status-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--bnpl-status-bg);
  color: var(--bnpl-status-text);
  border: 1px solid var(--bnpl-status-border);
  white-space: nowrap;
}
.spg-part-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bnpl-status-bg);
  color: var(--bnpl-status-text);
  border: 1px solid var(--bnpl-status-border);
}
.spg-part-chip--done {
  color: var(--bnpl-text, #0f172a);
  font-weight: 800;
}
.spg-part-c-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--bnpl-border, #e2e8f0);
  border-radius: var(--bnpl-radius-sm, 8px);
  background: var(--bnpl-info-bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--bnpl-status-text);
  min-height: 36px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.spg-list-host {
  background: var(--bnpl-info-bg);
}
.spg-part-c-info.is-active {
  border-color: var(--bnpl-accent, #3949ab);
  color: var(--bnpl-text, #0f172a);
}
.spg-part-c-info-count {
  font-weight: 800;
  color: var(--bnpl-text, #0f172a);
}
.spg-search-new-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.spg-search {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--bnpl-text, #0f172a);
}
.spg-search:focus {
  outline: none;
  border-color: #3949ab;
  box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.15);
}
.spg-wrap #spgNewStaff.spg-new-staff-btn {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--color-primary, #3949ab);
  border-radius: 10px;
  background: var(--color-primary, #3949ab);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.spg-wrap #spgNewStaff.spg-new-staff-btn:hover,
.spg-wrap #spgNewStaff.spg-new-staff-btn:focus-visible {
  background: #303f9f;
  border-color: #303f9f;
  outline: none;
}
.spg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.spg-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 2px solid #0f172a;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.spg-kpi-card--accent-green {
  box-shadow: inset 4px 0 0 #16a34a;
}
.spg-kpi-card--accent-gray {
  box-shadow: inset 4px 0 0 #64748b;
}
.spg-kpi-card--accent-amber {
  box-shadow: inset 4px 0 0 #d97706;
}
.spg-kpi-card:hover,
.spg-kpi-card:focus-visible {
  border-color: #cbd5e1;
  outline: none;
}
.spg-kpi-card--accent-green:hover,
.spg-kpi-card--accent-green:focus-visible {
  box-shadow: inset 3px 0 0 #16a34a, 0 2px 8px rgba(15, 23, 42, 0.08);
}
.spg-kpi-card--accent-gray:hover,
.spg-kpi-card--accent-gray:focus-visible {
  box-shadow: inset 3px 0 0 #64748b, 0 2px 8px rgba(15, 23, 42, 0.08);
}
.spg-kpi-card--accent-amber:hover,
.spg-kpi-card--accent-amber:focus-visible {
  box-shadow: inset 3px 0 0 #d97706, 0 2px 8px rgba(15, 23, 42, 0.08);
}
.spg-kpi-card.is-active {
  border-color: #3949ab;
  box-shadow: inset 4px 0 0 var(--spg-kpi-accent, #3949ab), 0 0 0 1px #3949ab;
}
.spg-kpi-card--accent-green.is-active {
  --spg-kpi-accent: #16a34a;
}
.spg-kpi-card--accent-gray.is-active {
  --spg-kpi-accent: #64748b;
}
.spg-kpi-card--accent-amber.is-active {
  --spg-kpi-accent: #d97706;
}
.spg-kpi-card--pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  overflow: visible;
  cursor: default;
  min-height: 72px;
  border: 2px solid #0f172a;
  text-align: center;
  box-shadow: none;
}
.spg-kpi-card--pending.spg-kpi-card--accent-amber {
  box-shadow: none;
}
.spg-kpi-card--pending.is-active {
  border-color: #3949ab;
  box-shadow: 0 0 0 1px #3949ab;
}
.spg-pending-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.spg-pending-head .spg-kpi-label {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}
.spg-pending-head .spg-kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  width: 100%;
  text-align: center;
}
.spg-pending-sub {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  border: 1px solid #0f172a;
  border-radius: 8px;
  padding: 0 28px 0 12px;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  text-align: center;
  text-align-last: center;
}
.spg-kpi-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}
.spg-kpi-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  width: 100%;
  text-align: center;
}
.spg-kpi-value {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  width: 100%;
  text-align: center;
}
.spg-inactive-filter {
  align-self: flex-start;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.spg-inactive-filter.is-active {
  color: #3949ab;
}
@media (max-width: 640px) {
  .spg-search-new-row {
    grid-template-columns: 1fr;
  }
  .spg-kpi-grid {
    grid-template-columns: 1fr;
  }
}
.spg-thead {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) minmax(0, 1.15fr) minmax(52px, 58px) minmax(92px, 0.9fr);
  gap: 6px;
  padding: 8px 10px;
  background: #fafbfc;
  border-bottom: 1px solid var(--bnpl-border, #e2e8f0);
  font-size: 11px;
  font-weight: 800;
  color: var(--bnpl-text-secondary, #64748b);
  text-transform: uppercase;
}
.spg-duty-badge--compact {
  font-size: 10px;
  padding: 2px 6px;
}
.spg-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) minmax(0, 1.15fr) minmax(52px, 58px) minmax(92px, 0.9fr);
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--bnpl-border, #e2e8f0);
  background: #fff;
}
.spg-col-staff {
  min-width: 0;
}
.spg-col-access {
  min-width: 0;
}
.spg-col-projects {
  min-width: 0;
}
/* ERP dark copy zone — SSOT: ERP_DARK_FONT_COPY_PERMANENT_LOCK.md (Form A/B + future modules) */
html.bnpl-app-active #content .erp-dark-copy-zone {
  color: #000 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .hint,
html.bnpl-app-active #content .erp-dark-copy-zone p,
html.bnpl-app-active #content .erp-dark-copy-zone label,
html.bnpl-app-active #content .erp-dark-copy-zone .section-title,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-section-title,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-morning-item,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-morning-name,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-morning-name,
html.bnpl-app-active #content .erp-dark-copy-zone .erp-filter-lbl,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-context-grid,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-page-title,
html.bnpl-app-active #content .erp-dark-copy-zone .sm-chip-btn {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
  opacity: 1 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone input.erp-control-box,
html.bnpl-app-active #content .erp-dark-copy-zone select.erp-control-box,
html.bnpl-app-active #content .erp-dark-copy-zone textarea.erp-control-box {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .btn.secondary.erp-control-box,
html.bnpl-app-active #content .erp-dark-copy-zone button.secondary,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-step.btn.secondary {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .btn.primary.erp-control-box {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .erp-rule-warn,
html.bnpl-app-active #content .erp-dark-copy-zone .erp-rule-warn-block {
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}
html.bnpl-app-active #content #machFormBMount .hint {
  color: #000 !important;
  font-weight: 700 !important;
}
/* BMP Material Purchase voucher — ERP dark copy (no muted helper text on form) */
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .hint,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .erp-helper,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-compact-title,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-lbl,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-val,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-pct,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-section-lbl,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-photo-slot-label,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-party-lbl,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-doc-preview-cap,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-doc-preview-title,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-item-suggest-pct,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-voucher-msg,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .hint,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .erp-helper,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-lbl,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-val,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-pct {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
  opacity: 1 !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-confirmed,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-confirmed-badge {
  color: #14532d !important;
  -webkit-text-fill-color: #14532d !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-verified-btn.bmp-ocr-verified-btn--done,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-verified-btn.bmp-ocr-verified-btn--done {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone table.bmp-lines.bmp-voucher-lines--a4 thead th,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone table.bmp-lines.bmp-voucher-lines--a4 thead th {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .btn.primary.erp-control-box,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .btn.primary.erp-control-box {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
/* ERP dark copy zone — SSOT: ERP_DARK_FONT_COPY_PERMANENT_LOCK.md (Form A/B + future modules) */
html.bnpl-app-active #content .erp-dark-copy-zone {
  color: #000 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .hint,
html.bnpl-app-active #content .erp-dark-copy-zone p,
html.bnpl-app-active #content .erp-dark-copy-zone label,
html.bnpl-app-active #content .erp-dark-copy-zone .section-title,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-section-title,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-morning-item,
html.bnpl-app-active #content .erp-dark-copy-zone .erp-filter-lbl,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-context-grid,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-page-title,
html.bnpl-app-active #content .erp-dark-copy-zone .sm-chip-btn {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
  opacity: 1 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone input.erp-control-box,
html.bnpl-app-active #content .erp-dark-copy-zone select.erp-control-box,
html.bnpl-app-active #content .erp-dark-copy-zone textarea.erp-control-box {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .btn.secondary.erp-control-box,
html.bnpl-app-active #content .erp-dark-copy-zone button.secondary,
html.bnpl-app-active #content .erp-dark-copy-zone .mach-form-b-step.btn.secondary {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .btn.primary.erp-control-box {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .erp-dark-copy-zone .erp-rule-warn,
html.bnpl-app-active #content .erp-dark-copy-zone .erp-rule-warn-block {
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}
html.bnpl-app-active #content #machFormBMount .hint {
  color: #000 !important;
  font-weight: 700 !important;
}
/* BMP Material Purchase voucher — ERP dark copy (no muted helper text on form) */
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .hint,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .erp-helper,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-compact-title,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-lbl,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-val,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-pct,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-section-lbl,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-photo-slot-label,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-party-lbl,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-doc-preview-cap,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-doc-preview-title,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-item-suggest-pct,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-voucher-msg,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .hint,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .erp-helper,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-lbl,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-val,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-chip-pct {
  color: #000 !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #000 !important;
  opacity: 1 !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-confirmed,
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-confirmed-badge {
  color: #14532d !important;
  -webkit-text-fill-color: #14532d !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .bmp-ocr-verified-btn.bmp-ocr-verified-btn--done,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .bmp-ocr-verified-btn.bmp-ocr-verified-btn--done {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone table.bmp-lines.bmp-voucher-lines--a4 thead th,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone table.bmp-lines.bmp-voucher-lines--a4 thead th {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .bmp-voucher.erp-dark-copy-zone .btn.primary.erp-control-box,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-voucher.erp-dark-copy-zone .btn.primary.erp-control-box {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
/* Machine Form A/B — two control boxes per row (ERP straight line) */
html.bnpl-app-active #content .mach-form-b-sheet {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Form B Layout v1 — full scroll shell (MACH_FORM_B_LAYOUT_v1_CHECKLIST.md) */
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-fields,
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-proof-mount,
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-duty-shell,
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-footer {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-fields {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
html.bnpl-app-active #content .mach-form-b-section-block {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-step-bar {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-proof-slot-actions {
  flex-wrap: wrap;
  width: 100%;
  max-width: 720px;
  gap: 8px;
}
html.bnpl-app-active #content .mach-form-b-proof-slot-actions .btn.erp-control-box,
html.bnpl-app-active #content .mach-form-b-proof-action-row .btn.erp-control-box {
  width: auto !important;
  flex: 0 0 auto !important;
}
html.bnpl-app-active #content .mach-form-b-footer {
  margin-top: 12px;
}
html.bnpl-app-active #content .mach-form-b-sheet #machFormBDutyWrap,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-duty-shell {
  opacity: 1 !important;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
html.bnpl-app-active #content .mach-form-b-sheet #machFormBDutyWrap.mach-form-b-duty--locked,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-duty-shell.mach-form-b-duty--locked {
  pointer-events: none;
}
html.bnpl-app-active #content .mach-form-b-sheet #machFormBDutyWrap.mach-form-b-duty--locked .erp-control-box {
  background: #f1f5f9 !important;
}
/* Form B Layout v1 — full scroll shell (MACH_FORM_B_LAYOUT_v1_CHECKLIST.md) */
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-fields,
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-proof-mount,
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-duty-shell,
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-footer {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-fields {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
html.bnpl-app-active #content .mach-form-b-section-block {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .mach-form-b-layout-v1 .mach-form-b-step-bar {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-proof-slot-actions {
  flex-wrap: wrap;
  width: 100%;
  max-width: 720px;
  gap: 8px;
}
html.bnpl-app-active #content .mach-form-b-proof-slot-actions .btn.erp-control-box,
html.bnpl-app-active #content .mach-form-b-proof-action-row .btn.erp-control-box {
  width: auto !important;
  flex: 0 0 auto !important;
}
html.bnpl-app-active #content .mach-form-b-footer {
  margin-top: 12px;
}
html.bnpl-app-active #content .mach-form-b-sheet #machFormBDutyWrap,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-duty-shell {
  opacity: 1 !important;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
html.bnpl-app-active #content .mach-form-b-sheet #machFormBDutyWrap.mach-form-b-duty--locked,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-duty-shell.mach-form-b-duty--locked {
  pointer-events: none;
}
html.bnpl-app-active #content .mach-form-b-sheet #machFormBDutyWrap.mach-form-b-duty--locked .erp-control-box {
  background: #f1f5f9 !important;
}
html.bnpl-app-active #content .mach-form-b-section-title {
  margin: 14px 0 6px;
  padding: 0;
  border: none;
  background: transparent;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-section-title:first-of-type {
  margin-top: 4px;
}
html.bnpl-app-active #content .mach-form-b-context-card {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
}
html.bnpl-app-active #content .mach-form-b-context-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #000 !important;
  font-size: 14px;
}
html.bnpl-app-active #content .mach-form-b-chips-row .mach-form-b-chip-field {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 120px;
}
html.bnpl-app-active #content .mach-form-b-chip-val {
  height: var(--erp-control-box-height, 40px);
  line-height: 40px;
  padding: 0 10px;
  box-sizing: border-box;
  background: #fff;
  font-weight: 700;
  color: #000 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.bnpl-app-active #content .mach-form-b-progress {
  margin: 0 0 8px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-fuel-hint {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .mach-form-b-actions {
  margin-top: 12px;
}
html.bnpl-app-active #content .mach-form-b-proof-mount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-section-hint {
  margin: 6px 0 12px;
  padding: 0;
  max-width: 720px;
  width: 100%;
  line-height: 1.4;
  display: block;
  clear: both;
  text-align: left;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-proof-action-row,
html.bnpl-app-active #content .mach-form-b-att-proof-actions {
  width: 100%;
  max-width: 720px;
}
html.bnpl-app-active #content .mach-form-b-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-proof-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
html.bnpl-app-active #content .mach-form-b-morning-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.bnpl-app-active #content .mach-form-b-morning-block,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-block {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0;
}
html.bnpl-app-active #content .mach-form-b-morning-name,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-name {
  width: 100%;
  font-weight: 700 !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-size: 15px;
  line-height: 1.25;
}
html.bnpl-app-active #content .mach-form-b-morning-block--issue .mach-form-b-morning-name,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-block--issue .mach-form-b-morning-name {
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}
html.bnpl-app-active #content .mach-form-b-morning-item-detail,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-item-detail {
  width: 100%;
  box-sizing: border-box;
  margin: 2px 0 0;
}
html.bnpl-app-active #content .mach-form-b-morning-item-detail .erp-filter-lbl,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-item-detail .erp-filter-lbl {
  display: block;
  margin: 0 0 4px;
}
html.bnpl-app-active #content .mach-form-b-morning-segment,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-segment,
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-segment {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  width: auto !important;
  max-width: 100%;
}
html.bnpl-app-active #content .mach-form-b-morning-segment .mach-form-b-morning-status,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-segment .mach-form-b-morning-status,
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-segment .btn.mach-form-b-morning-status {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 88px !important;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: 1px solid #64748b !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-morning-segment .mach-form-b-morning-status:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-segment .mach-form-b-morning-status:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-segment .mach-form-b-morning-status:not(.mach-form-b-morning-status--active) {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #64748b !important;
  border-width: 1px !important;
  border-style: solid !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-morning-status.secondary:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-status.secondary:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-status.secondary:not(.mach-form-b-morning-status--active) {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #64748b !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-morning-status.primary.mach-form-b-morning-status--active,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-status.primary.mach-form-b-morning-status--active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .mach-form-b-morning-status--issue.mach-form-b-morning-status--active,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-status--issue.mach-form-b-morning-status--active {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .mach-form-b-morning-issue-detail-row {
  width: 100%;
  min-height: 64px;
  height: auto !important;
  line-height: 1.35;
  padding: 8px 10px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-morning-issue-panel {
  margin: 8px 0;
  padding: 10px;
}
html.bnpl-app-active #content .mach-form-b-morning-issue-detail {
  min-height: 64px;
  height: auto !important;
  line-height: 1.35;
  padding: 8px 10px;
}
html.bnpl-app-active #content .mach-form-b-morning-rule {
  margin: 0 0 8px;
  padding: 8px 10px;
}
html.bnpl-app-active #content .mach-form-b-step-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 8px 0;
  border-bottom: 1px solid var(--erp-control-box-border, #cbd5e1);
}
html.bnpl-app-active #content .mach-form-b-step--done {
  font-weight: 700;
  border-color: #3949ab;
}
html.bnpl-app-active #content .mach-form-b-static-hint {
  height: var(--erp-control-box-height, 40px);
  line-height: 40px;
  padding: 0 10px;
  font-weight: 700;
  color: #000 !important;
  background: #f8fafc;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-att-proof-actions {
  flex-wrap: wrap;
}
html.bnpl-app-active #content .mach-form-b-proof-mount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-section-hint {
  margin: 6px 0 12px;
  padding: 0;
  max-width: 720px;
  width: 100%;
  line-height: 1.4;
  display: block;
  clear: both;
  text-align: left;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-proof-action-row,
html.bnpl-app-active #content .mach-form-b-att-proof-actions {
  width: 100%;
  max-width: 720px;
}
html.bnpl-app-active #content .mach-form-b-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-proof-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
html.bnpl-app-active #content .mach-form-b-morning-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.bnpl-app-active #content .mach-form-b-morning-block,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-block {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0 0 4px;
  border-bottom: 1px solid #e2e8f0;
}
html.bnpl-app-active #content .mach-form-b-morning-block:last-child,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-block:last-child {
  border-bottom: none;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .mach-form-b-morning-name,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-name {
  width: 100%;
  font-weight: 700 !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 2px;
}
html.bnpl-app-active #content .mach-form-b-morning-block--issue .mach-form-b-morning-name,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-block--issue .mach-form-b-morning-name {
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}
html.bnpl-app-active #content .mach-form-b-morning-item-detail,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-item-detail {
  width: 100%;
  box-sizing: border-box;
  margin: 2px 0 0;
}
html.bnpl-app-active #content .mach-form-b-morning-item-detail .erp-filter-lbl,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-item-detail .erp-filter-lbl {
  display: block;
  margin: 0 0 4px;
}
html.bnpl-app-active #content .mach-form-b-morning-segment,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-segment,
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-segment {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  width: auto !important;
  max-width: 100%;
}
html.bnpl-app-active #content .mach-form-b-morning-segment .mach-form-b-morning-status,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-segment .mach-form-b-morning-status,
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-segment .btn.mach-form-b-morning-status {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 88px !important;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: 1px solid #64748b !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-morning-segment .mach-form-b-morning-status:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-segment .mach-form-b-morning-status:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-segment .mach-form-b-morning-status:not(.mach-form-b-morning-status--active) {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #64748b !important;
  border-width: 1px !important;
  border-style: solid !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-morning-status.secondary:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-status.secondary:not(.mach-form-b-morning-status--active),
html.bnpl-app-active #content .mach-form-b-proof-mount .mach-form-b-morning-status.secondary:not(.mach-form-b-morning-status--active) {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #64748b !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-morning-status.primary.mach-form-b-morning-status--active,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-status.primary.mach-form-b-morning-status--active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .mach-form-b-morning-status--issue.mach-form-b-morning-status--active,
html.bnpl-app-active #content .mach-form-b-sheet .mach-form-b-morning-status--issue.mach-form-b-morning-status--active {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
  -webkit-text-fill-color: #fff !important;
}
html.bnpl-app-active #content .mach-form-b-morning-issue-detail-row {
  width: 100%;
  min-height: 64px;
  height: auto !important;
  line-height: 1.35;
  padding: 8px 10px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-morning-issue-panel {
  margin: 8px 0;
  padding: 10px;
}
html.bnpl-app-active #content .mach-form-b-morning-issue-detail {
  min-height: 64px;
  height: auto !important;
  line-height: 1.35;
  padding: 8px 10px;
}
html.bnpl-app-active #content .mach-form-b-morning-rule {
  margin: 0 0 8px;
  padding: 8px 10px;
}
html.bnpl-app-active #content .mach-form-b-step-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 8px 0;
  border-bottom: 1px solid var(--erp-control-box-border, #cbd5e1);
}
html.bnpl-app-active #content .mach-form-b-step--done {
  font-weight: 700;
  border-color: #3949ab;
}
html.bnpl-app-active #content .mach-form-b-static-hint {
  height: var(--erp-control-box-height, 40px);
  line-height: 40px;
  padding: 0 10px;
  font-weight: 700;
  color: #000 !important;
  background: #f8fafc;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-b-att-proof-actions {
  flex-wrap: wrap;
}
html.bnpl-app-active #content .mach-form-b-sheet {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.bnpl-app-active #content .mach-form-b-section-title {
  margin: 14px 0 6px;
  padding: 0;
  border: none;
  background: transparent;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-section-title:first-of-type {
  margin-top: 4px;
}
html.bnpl-app-active #content .mach-form-b-context-card {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
}
html.bnpl-app-active #content .mach-form-b-context-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #000 !important;
  font-size: 14px;
}
html.bnpl-app-active #content .mach-form-b-chips-row .mach-form-b-chip-field {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 120px;
}
html.bnpl-app-active #content .mach-form-b-chip-val {
  height: var(--erp-control-box-height, 40px);
  line-height: 40px;
  padding: 0 10px;
  box-sizing: border-box;
  background: #fff;
  font-weight: 700;
  color: #000 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.bnpl-app-active #content .mach-form-b-progress {
  margin: 0 0 8px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-form-b-fuel-hint {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .mach-form-b-actions {
  margin-top: 12px;
}
html.bnpl-app-active #content .mach-form-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /*
   * Form A doc actions SSOT: equal box every slot; height = longest label (doc.chooseGallery EN/HI)
   * + inner padding so colour extends slightly past text (touch-friendly, not text-tight chips).
   */
  --mach-doc-action-h: 54px;
  --mach-doc-action-fs: 11px;
  --mach-doc-action-pad-x: 8px;
  --mach-doc-action-pad-y: 4px;
  --mach-doc-action-gap: 6px;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair .erp-filter-field {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-full {
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-full .erp-filter-field,
html.bnpl-app-active #content .mach-form-fields .mach-form-full .mpg-site-allot-box {
  flex: 1 1 100%;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .erp-filter-field .erp-control-box {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--erp-control-box-border, #CBD5E1);
  border-radius: 6px;
  min-height: var(--erp-control-box-height, 40px);
}
html.bnpl-app-active #content .mach-form-config-bar {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  margin-bottom: 12px;
}
html.bnpl-app-active #content .mach-config-card-row {
  margin: 0;
  align-items: stretch;
  gap: 10px 12px;
}
html.bnpl-app-active #content .mach-config-card {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.bnpl-app-active #content .mach-config-card-title {
  margin: 0;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #000 !important;
  line-height: 1.25;
  text-align: center;
}
html.bnpl-app-active #content .mach-config-card-hint {
  margin: 0;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #000 !important;
  line-height: 1.3;
  text-align: center;
  flex: 1 1 auto;
}
html.bnpl-app-active #content .mach-config-card .mach-config-bar-btn {
  width: 100%;
  margin-top: 4px;
  font-size: 14px !important;
  font-weight: 800 !important;
  min-height: var(--erp-control-box-height, 40px) !important;
}
html.bnpl-app-active #content .mach-site-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: var(--erp-control-box-height, 40px);
  padding: 6px 8px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  width: 100%;
}
html.bnpl-app-active #content .mach-site-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  max-width: 100%;
  word-break: break-word;
}
html.bnpl-app-active #content .mach-site-chip--primary {
  border-color: #3949ab;
  background: #eef2ff;
}
html.bnpl-app-active #content .mach-site-chip-star {
  color: #3949ab;
  font-weight: 800;
}
html.bnpl-app-active #content .mach-site-chips-empty {
  display: flex;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #000;
}
html.bnpl-app-active #content .mach-site-primary-hint {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
}
html.bnpl-app-active #content .mach-form-section-title {
  margin: 14px 0 10px;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.35;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 0 0 6px !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-field {
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
  row-gap: 4px;
  width: 100%;
  align-items: end;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-lbl-left {
  grid-column: 1;
  text-align: left;
  min-height: 2.35em;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-lbl-right {
  grid-column: 2;
  text-align: center;
  min-height: 2.35em;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-box {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: var(--erp-control-box-height, 40px);
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius, 6px) !important;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
}
/*
 * Split name + fuel: outer .mach-name-fuel-box = single ERP border;
 * inner halves override global .erp-filter-field .erp-control-box { width:100% !important }.
 */
html.bnpl-app-active #content .mach-form-fields .erp-filter-field.mach-name-fuel-field .mach-name-fuel-box input.erp-control-box,
html.bnpl-app-active #content .mach-form-fields .erp-filter-field.mach-name-fuel-field .mach-name-fuel-box select.erp-control-box {
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  max-height: var(--erp-control-box-height, 40px) !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-filter-field.mach-name-fuel-field .mach-name-fuel-box select.erp-control-box {
  padding-left: 8px !important;
  padding-right: 28px !important;
  cursor: pointer;
  text-align: center !important;
  text-align-last: center !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-box-divider {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  background: var(--erp-control-box-border-color, #cbd5e0);
}
html.bnpl-app-active #content .mach-form-fields .mach-form-full.mach-service-schedule-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 0 4px;
  align-items: stretch;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-block {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 8px 10px 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-head {
  display: grid;
  grid-template-columns: 4.5rem 5.75rem 5rem minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin: 0 0 4px;
  padding: 0 0 2px;
  border-bottom: 1px solid #e2e8f0;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-head-cell {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.2;
  min-height: 1.25em;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-head-desc {
  min-width: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-row {
  display: grid;
  grid-template-columns: 4.5rem 5.75rem 5rem minmax(0, 1fr);
  gap: 8px;
  align-items: flex-end;
  margin: 0 0 6px;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-row:last-child {
  margin-bottom: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-lbl {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.2;
  white-space: nowrap;
  height: var(--erp-control-box-height, 40px);
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-type,
html.bnpl-app-active #content .mach-form-fields .mach-svc-val,
html.bnpl-app-active #content .mach-form-fields .mach-svc-desc {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  margin: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-val {
  max-width: 5rem;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-type {
  max-width: 5.75rem;
  min-width: 5.75rem;
  padding-left: 8px !important;
  padding-right: 26px !important;
}
html.bnpl-app-active #content .mach-form-fields select.erp-control-box#machMeterType,
html.bnpl-app-active #content .mach-form-fields select.erp-control-box.mach-svc-type {
  line-height: calc(var(--erp-control-box-height, 40px) - 2px) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-field {
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
  row-gap: 4px;
  width: 100%;
  align-items: end;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-lbl-left {
  grid-column: 1;
  text-align: left;
  min-height: 2.35em;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-lbl-right {
  grid-column: 2;
  text-align: center;
  min-height: 2.35em;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-box {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: var(--erp-control-box-height, 40px);
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius, 6px) !important;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
}
/*
 * Split name + fuel: outer .mach-name-fuel-box = single ERP border;
 * inner halves override global .erp-filter-field .erp-control-box { width:100% !important }.
 */
html.bnpl-app-active #content .mach-form-fields .erp-filter-field.mach-name-fuel-field .mach-name-fuel-box input.erp-control-box,
html.bnpl-app-active #content .mach-form-fields .erp-filter-field.mach-name-fuel-field .mach-name-fuel-box select.erp-control-box {
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  max-height: var(--erp-control-box-height, 40px) !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-filter-field.mach-name-fuel-field .mach-name-fuel-box select.erp-control-box {
  padding-left: 8px !important;
  padding-right: 28px !important;
  cursor: pointer;
  text-align: center !important;
  text-align-last: center !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-name-fuel-box-divider {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  background: var(--erp-control-box-border-color, #cbd5e0);
}
html.bnpl-app-active #content .mach-form-fields .mach-form-full.mach-service-schedule-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 0 4px;
  align-items: stretch;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-block {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 8px 10px 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-head {
  display: grid;
  grid-template-columns: 4.5rem 5.75rem 5rem minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin: 0 0 4px;
  padding: 0 0 2px;
  border-bottom: 1px solid #e2e8f0;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-head-cell {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.2;
  min-height: 1.25em;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-head-desc {
  min-width: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-row {
  display: grid;
  grid-template-columns: 4.5rem 5.75rem 5rem minmax(0, 1fr);
  gap: 8px;
  align-items: flex-end;
  margin: 0 0 6px;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-row:last-child {
  margin-bottom: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-service-schedule-lbl {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.2;
  white-space: nowrap;
  height: var(--erp-control-box-height, 40px);
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-type,
html.bnpl-app-active #content .mach-form-fields .mach-svc-val,
html.bnpl-app-active #content .mach-form-fields .mach-svc-desc {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  margin: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-val {
  max-width: 5rem;
}
html.bnpl-app-active #content .mach-form-fields .mach-svc-type {
  max-width: 5.75rem;
  min-width: 5.75rem;
  padding-left: 8px !important;
  padding-right: 26px !important;
}
html.bnpl-app-active #content .mach-form-fields select.erp-control-box#machMeterType,
html.bnpl-app-active #content .mach-form-fields select.erp-control-box.mach-svc-type {
  line-height: calc(var(--erp-control-box-height, 40px) - 2px) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-lbl,
html.bnpl-app-active #content .mach-form-fields .erp-filter-lbl {
  font-size: 14px !important;
  min-height: 2.35em;
  font-weight: 700 !important;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-req-asterisk,
html.bnpl-app-active #content .mach-form-fields .erp-star-required {
  color: #d32f2f !important;
  -webkit-text-fill-color: #d32f2f !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  margin-left: 2px !important;
  vertical-align: baseline !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-req-asterisk,
html.bnpl-app-active #content .mach-form-fields .erp-star-required {
  color: #d32f2f !important;
  -webkit-text-fill-color: #d32f2f !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  margin-left: 2px !important;
  vertical-align: baseline !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-control-box,
html.bnpl-app-active #content .mach-form-fields select.erp-control-box,
html.bnpl-app-active #content .mach-form-fields input.erp-control-box,
html.bnpl-app-active #content .mach-form-fields textarea.erp-control-box {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #000 !important;
}
html.bnpl-app-active .mach-form-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
html.bnpl-app-active .mach-form-rules-modal[hidden] {
  display: none !important;
}
html.bnpl-app-active .mach-form-rules-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
html.bnpl-app-active .mach-form-rules-dialog {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
}
html.bnpl-app-active .mach-form-rules-dialog h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
}
html.bnpl-app-active .mach-rules-modal-hint {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-assign-list-wrap {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  overflow: auto;
  max-height: 280px;
  margin-bottom: 12px;
  background: #fff;
}
html.bnpl-app-active #content .mach-assign-thead,
html.bnpl-app-active #content .mach-assign-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.55fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  border-bottom: 1px solid #e2e8f0;
}
html.bnpl-app-active #content .mach-assign-thead {
  background: #f8fafc;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 1;
}
html.bnpl-app-active #content .mach-assign-row {
  font-size: 14px;
}
html.bnpl-app-active #content .mach-assign-row {
  cursor: pointer;
  background: #fff;
}
html.bnpl-app-active #content .mach-assign-row--current {
  background: #eef2ff;
}
html.bnpl-app-active #content .mach-assign-row:hover {
  background: #f1f5f9;
}
html.bnpl-app-active #content .mach-assign-cell {
  min-width: 0;
  word-break: break-word;
  line-height: 1.35;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
}
html.bnpl-app-active #content .st-master-vform .mach-form-fields .mach-doc-mount.erp-documents-section--form-b .erp-doc-slot {
  min-height: 0 !important;
  flex: 0 0 auto !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-replace,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-delete {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-preview-btn,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-replace,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-delete {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-pick--primary {
  background: #3949ab !important;
  border: 2px solid #3949ab !important;
  color: #fff !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-pick:not(.erp-doc-pick--primary) {
  background: #fff !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-preview-btn {
  background: #e8eaf6 !important;
  border: 2px solid #3949ab !important;
  color: #1a237e !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-retry {
  background: #fff3e0 !important;
  border: 2px solid #f57c00 !important;
  color: #e65100 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="view"] {
  background: #3949ab !important;
  border: 2px solid #3949ab !important;
  color: #fff !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="download"] {
  background: #e8f5e9 !important;
  border: 2px solid #2e7d32 !important;
  color: #1b5e20 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="print"] {
  background: #fff3e0 !important;
  border: 2px solid #ef6c00 !important;
  color: #e65100 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="share"] {
  background: #e3f2fd !important;
  border: 2px solid #1565c0 !important;
  color: #0d47a1 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair--align-top {
  align-items: flex-start;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-head,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-audit {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-status-text {
  display: none;
}
/* Machinery Form A document actions — SSOT 2×2 grid (not Staff Form B pick menu / flex patches) */
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-actions--mach-form-a {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--mach-doc-action-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: var(--mach-doc-action-h) var(--mach-doc-action-h);
  gap: var(--mach-doc-action-gap);
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-full .mach-doc-mount .erp-doc-mach-action-grid {
  max-width: calc(50% - 6px);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="cam"] {
  grid-column: 1;
  grid-row: 1;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="gal"] {
  grid-column: 2;
  grid-row: 1;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="pdf"] {
  grid-column: 1;
  grid-row: 2;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="preview"] {
  grid-column: 2;
  grid-row: 2;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-retry-bar {
  min-width: 0;
  width: 100% !important;
  max-width: 100% !important;
  min-height: var(--mach-doc-action-h) !important;
  height: var(--mach-doc-action-h) !important;
  max-height: var(--mach-doc-action-h) !important;
  padding: var(--mach-doc-action-pad-y) var(--mach-doc-action-pad-x) !important;
  font-size: var(--mach-doc-action-fs) !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: hidden;
  margin: 0 !important;
  flex: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[hidden],
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-retry-bar[hidden],
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-actions--mach-form-a .erp-doc-replace,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-actions--mach-form-a .erp-doc-delete {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-mach-action-grid {
  grid-template-rows: var(--mach-doc-action-h);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-mach-cell[data-mach-cell="cam"] {
  grid-column: 1 / -1;
  grid-row: 1;
}
html.bnpl-app-active #content .st-master-vform .mach-form-fields .mach-doc-mount.erp-documents-section--form-b .erp-doc-actions--mach-form-a .btn,
html.bnpl-app-active #content .st-master-vform .mach-form-fields .mach-doc-mount.erp-documents-section--form-b .erp-doc-actions--mach-form-a .secondary {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview--has-media {
  max-height: 52px;
  margin: 0 0 4px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview--has-media img,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview--has-media .erp-doc-media-open {
  max-height: 48px;
  object-fit: cover;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-slot--meter-evidence {
  width: 100%;
  min-height: 168px;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--stack .erp-doc-slot--mach-stack {
  min-height: 152px;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-pick-menu--mach-inline .erp-doc-pick:only-child {
  flex: 1 1 auto !important;
  min-height: 44px !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-upload-trigger {
  width: 100% !important;
  max-width: 100% !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-preview--has-media {
  max-height: none;
  min-height: 120px;
  margin: 0 0 6px;
  position: relative;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-meter-evidence-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-meter-evidence-img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-meter-evidence-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-evidence-links {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: var(--mach-doc-action-h);
  gap: var(--mach-doc-action-gap);
  width: 100%;
  margin-top: 4px;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-evidence-link {
  min-height: var(--mach-doc-action-h) !important;
  height: var(--mach-doc-action-h) !important;
  max-height: var(--mach-doc-action-h) !important;
  font-size: var(--mach-doc-action-fs) !important;
  font-weight: 800 !important;
  padding: var(--mach-doc-action-pad-y) var(--mach-doc-action-pad-x) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
}
@media (max-width: 640px) {
  html.bnpl-app-active #content .mach-assign-thead .mach-assign-col-address,
  html.bnpl-app-active #content .mach-assign-row .mach-assign-col-address {
    display: none;
  }
  html.bnpl-app-active #content .mach-assign-thead,
  html.bnpl-app-active #content .mach-assign-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.55fr);
  }
}
html.bnpl-app-active #content .mach-master-shell .mach-form-page-title,
html.bnpl-app-active #content .mach-master-shell #machFormHead {
  margin: 0 0 8px;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #000 !important;
  border-bottom: none !important;
  padding: 0 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair--stack {
  align-items: flex-start;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-stack {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-stack .erp-filter-field {
  width: 100%;
  margin: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-stack--spacer {
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair-spacer {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair--stack {
  align-items: flex-start;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-stack {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-stack .erp-filter-field {
  width: 100%;
  margin: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-stack--spacer {
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair-spacer {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
}
html.bnpl-app-active #content .mach-form-fields .mach-readonly-field {
  background: #f8fafc !important;
  cursor: default;
  -webkit-appearance: none;
  appearance: none;
}
html.bnpl-app-active #content .mach-form-fields .mach-readonly-line {
  display: flex;
  align-items: center;
  min-height: var(--erp-control-box-height, 40px);
  height: auto !important;
  max-height: none !important;
  padding: 6px 10px;
  font-weight: 700;
  color: #000;
  box-sizing: border-box;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-top-site-row {
  align-items: flex-end;
}
html.bnpl-app-active #content .mach-form-fields .mach-top-sites-field {
  flex: 1 1 200px;
  min-width: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-top-site-hint {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-file-inp {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-filter-field textarea.erp-control-box {
  height: auto !important;
  max-height: none !important;
  min-height: 80px !important;
}
html.bnpl-app-active #content .mach-highlight-config-btn {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3949ab;
  font-weight: 700;
}
html.bnpl-app-active #content .mach-form-top-config {
  padding: 12px;
  border: 1px solid var(--erp-control-box-border, #CBD5E1);
  border-radius: 8px;
  background: #F8FAFC;
  margin-bottom: 8px;
}
html.bnpl-app-active #content .mach-form-rules-body {
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--erp-control-box-border, #CBD5E1);
  border-radius: 8px;
  background: #fff;
}
html.bnpl-app-active #content .mach-form-rules-panel .co-form-rules-scroll {
  max-height: 240px;
  overflow: auto;
}
html.bnpl-app-active #content .mach-form-rules-panel .cp-form-rules-table input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0 4px 0 0;
  flex-shrink: 0;
}
html.bnpl-app-active #content .mach-assignment-list {
  padding: 12px;
}
html.bnpl-app-active #content .mach-form-rules-body {
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--erp-control-box-border, #CBD5E1);
  border-radius: 8px;
  background: #fff;
}
html.bnpl-app-active #content .mach-form-rules-panel .co-form-rules-scroll {
  max-height: 240px;
  overflow: auto;
}
html.bnpl-app-active #content .mach-form-rules-panel .cp-form-rules-table input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0 4px 0 0;
  flex-shrink: 0;
}
html.bnpl-app-active #content .mach-assignment-list {
  padding: 12px;
}

/* Machine Form A/B — two control boxes per row (ERP straight line) */
html.bnpl-app-active #content .mach-form-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /*
   * Form A doc actions SSOT: equal box every slot; height = longest label (doc.chooseGallery EN/HI)
   * + inner padding so colour extends slightly past text (touch-friendly, not text-tight chips).
   */
  --mach-doc-action-h: 54px;
  --mach-doc-action-fs: 11px;
  --mach-doc-action-pad-x: 8px;
  --mach-doc-action-pad-y: 4px;
  --mach-doc-action-gap: 6px;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair .erp-filter-field {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-full {
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-full .erp-filter-field,
html.bnpl-app-active #content .mach-form-fields .mach-form-full .mpg-site-allot-box {
  flex: 1 1 100%;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .erp-filter-field .erp-control-box {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--erp-control-box-border, #CBD5E1);
  border-radius: 6px;
  min-height: var(--erp-control-box-height, 40px);
}
html.bnpl-app-active #content .mach-form-config-bar {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  margin-bottom: 12px;
}
html.bnpl-app-active #content .mach-config-card-row {
  margin: 0;
  align-items: stretch;
  gap: 10px 12px;
}
html.bnpl-app-active #content .mach-config-card {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.bnpl-app-active #content .mach-config-card-title {
  margin: 0;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #000 !important;
  line-height: 1.25;
  text-align: center;
}
html.bnpl-app-active #content .mach-config-card-hint {
  margin: 0;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #000 !important;
  line-height: 1.3;
  text-align: center;
  flex: 1 1 auto;
}
html.bnpl-app-active #content .mach-config-card .mach-config-bar-btn {
  width: 100%;
  margin-top: 4px;
  font-size: 14px !important;
  font-weight: 800 !important;
  min-height: var(--erp-control-box-height, 40px) !important;
}
html.bnpl-app-active #content .mach-site-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: var(--erp-control-box-height, 40px);
  padding: 6px 8px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  width: 100%;
}
html.bnpl-app-active #content .mach-site-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  max-width: 100%;
  word-break: break-word;
}
html.bnpl-app-active #content .mach-site-chip--primary {
  border-color: #3949ab;
  background: #eef2ff;
}
html.bnpl-app-active #content .mach-site-chip-star {
  color: #3949ab;
  font-weight: 800;
}
html.bnpl-app-active #content .mach-site-chips-empty {
  display: flex;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #000;
}
html.bnpl-app-active #content .mach-site-primary-hint {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
}
html.bnpl-app-active #content .mach-form-section-title {
  margin: 14px 0 10px;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.35;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 0 0 6px !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-lbl,
html.bnpl-app-active #content .mach-form-fields .erp-filter-lbl {
  font-size: 14px !important;
  min-height: 2.35em;
  font-weight: 700 !important;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-control-box,
html.bnpl-app-active #content .mach-form-fields select.erp-control-box,
html.bnpl-app-active #content .mach-form-fields input.erp-control-box,
html.bnpl-app-active #content .mach-form-fields textarea.erp-control-box {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #000 !important;
}
html.bnpl-app-active .mach-form-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
html.bnpl-app-active .mach-form-rules-modal[hidden] {
  display: none !important;
}
html.bnpl-app-active .mach-form-rules-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
html.bnpl-app-active .mach-form-rules-dialog {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
}
html.bnpl-app-active .mach-form-rules-dialog h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
}
html.bnpl-app-active .mach-rules-modal-hint {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .mach-assign-list-wrap {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  overflow: auto;
  max-height: 280px;
  margin-bottom: 12px;
  background: #fff;
}
html.bnpl-app-active #content .mach-assign-thead,
html.bnpl-app-active #content .mach-assign-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.55fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  border-bottom: 1px solid #e2e8f0;
}
html.bnpl-app-active #content .mach-assign-thead {
  background: #f8fafc;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 1;
}
html.bnpl-app-active #content .mach-assign-row {
  font-size: 14px;
}
html.bnpl-app-active #content .mach-assign-row {
  cursor: pointer;
  background: #fff;
}
html.bnpl-app-active #content .mach-assign-row--current {
  background: #eef2ff;
}
html.bnpl-app-active #content .mach-assign-row:hover {
  background: #f1f5f9;
}
html.bnpl-app-active #content .mach-assign-cell {
  min-width: 0;
  word-break: break-word;
  line-height: 1.35;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
}
html.bnpl-app-active #content .st-master-vform .mach-form-fields .mach-doc-mount.erp-documents-section--form-b .erp-doc-slot {
  min-height: 0 !important;
  flex: 0 0 auto !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-replace,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-delete {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-preview-btn,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-replace,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-delete {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-pick--primary {
  background: #3949ab !important;
  border: 2px solid #3949ab !important;
  color: #fff !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-pick:not(.erp-doc-pick--primary) {
  background: #fff !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-preview-btn {
  background: #e8eaf6 !important;
  border: 2px solid #3949ab !important;
  color: #1a237e !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-retry {
  background: #fff3e0 !important;
  border: 2px solid #f57c00 !important;
  color: #e65100 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="view"] {
  background: #3949ab !important;
  border: 2px solid #3949ab !important;
  color: #fff !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="download"] {
  background: #e8f5e9 !important;
  border: 2px solid #2e7d32 !important;
  color: #1b5e20 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="print"] {
  background: #fff3e0 !important;
  border: 2px solid #ef6c00 !important;
  color: #e65100 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-evidence-link[data-evidence-act="share"] {
  background: #e3f2fd !important;
  border: 2px solid #1565c0 !important;
  color: #0d47a1 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair--align-top {
  align-items: flex-start;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-head,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-audit {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-status-text {
  display: none;
}
/* Machinery Form A document actions — SSOT 2×2 grid (not Staff Form B pick menu / flex patches) */
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-actions--mach-form-a {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--mach-doc-action-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: var(--mach-doc-action-h) var(--mach-doc-action-h);
  gap: var(--mach-doc-action-gap);
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-full .mach-doc-mount .erp-doc-mach-action-grid {
  max-width: calc(50% - 6px);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="cam"] {
  grid-column: 1;
  grid-row: 1;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="gal"] {
  grid-column: 2;
  grid-row: 1;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="pdf"] {
  grid-column: 1;
  grid-row: 2;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[data-mach-cell="preview"] {
  grid-column: 2;
  grid-row: 2;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-retry-bar {
  min-width: 0;
  width: 100% !important;
  max-width: 100% !important;
  min-height: var(--mach-doc-action-h) !important;
  height: var(--mach-doc-action-h) !important;
  max-height: var(--mach-doc-action-h) !important;
  padding: var(--mach-doc-action-pad-y) var(--mach-doc-action-pad-x) !important;
  font-size: var(--mach-doc-action-fs) !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: hidden;
  margin: 0 !important;
  flex: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-cell[hidden],
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-mach-retry-bar[hidden],
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-actions--mach-form-a .erp-doc-replace,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-actions--mach-form-a .erp-doc-delete {
  display: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-mach-action-grid {
  grid-template-rows: var(--mach-doc-action-h);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-mach-cell[data-mach-cell="cam"] {
  grid-column: 1 / -1;
  grid-row: 1;
}
html.bnpl-app-active #content .st-master-vform .mach-form-fields .mach-doc-mount.erp-documents-section--form-b .erp-doc-actions--mach-form-a .btn,
html.bnpl-app-active #content .st-master-vform .mach-form-fields .mach-doc-mount.erp-documents-section--form-b .erp-doc-actions--mach-form-a .secondary {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview--has-media {
  max-height: 52px;
  margin: 0 0 4px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview--has-media img,
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview--has-media .erp-doc-media-open {
  max-height: 48px;
  object-fit: cover;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount .erp-doc-slot--mach-stack .erp-doc-preview-btn {
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-slot--meter-evidence {
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-upload-trigger {
  width: 100% !important;
  max-width: 100% !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-preview--has-media {
  max-height: none;
  min-height: 120px;
  margin: 0 0 6px;
  position: relative;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-meter-evidence-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-meter-evidence-img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-meter-evidence-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-evidence-links {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: var(--mach-doc-action-h);
  gap: var(--mach-doc-action-gap);
  width: 100%;
  margin-top: 4px;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-mount--meter-evidence .erp-doc-evidence-link {
  min-height: var(--mach-doc-action-h) !important;
  height: var(--mach-doc-action-h) !important;
  max-height: var(--mach-doc-action-h) !important;
  font-size: var(--mach-doc-action-fs) !important;
  font-weight: 800 !important;
  padding: var(--mach-doc-action-pad-y) var(--mach-doc-action-pad-x) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
}
@media (max-width: 640px) {
  html.bnpl-app-active #content .mach-assign-thead .mach-assign-col-address,
  html.bnpl-app-active #content .mach-assign-row .mach-assign-col-address {
    display: none;
  }
  html.bnpl-app-active #content .mach-assign-thead,
  html.bnpl-app-active #content .mach-assign-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.55fr);
  }
}
html.bnpl-app-active #content .mach-master-shell .mach-form-page-title,
html.bnpl-app-active #content .mach-master-shell #machFormHead {
  margin: 0 0 8px;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #000 !important;
  border-bottom: none !important;
  padding: 0 !important;
}
html.bnpl-app-active #content .mach-form-fields .mach-form-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
html.bnpl-app-active #content .mach-form-fields .mach-readonly-field {
  background: #f8fafc !important;
  cursor: default;
  -webkit-appearance: none;
  appearance: none;
}
html.bnpl-app-active #content .mach-form-fields .mach-readonly-line {
  display: flex;
  align-items: center;
  min-height: var(--erp-control-box-height, 40px);
  height: auto !important;
  max-height: none !important;
  padding: 6px 10px;
  font-weight: 700;
  color: #000;
  box-sizing: border-box;
  width: 100%;
}
html.bnpl-app-active #content .mach-form-fields .mach-top-site-row {
  align-items: flex-end;
}
html.bnpl-app-active #content .mach-form-fields .mach-top-sites-field {
  flex: 1 1 200px;
  min-width: 0;
}
html.bnpl-app-active #content .mach-form-fields .mach-top-site-hint {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .mach-form-fields .mach-doc-file-inp {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
html.bnpl-app-active #content .mach-form-fields .erp-filter-field textarea.erp-control-box {
  height: auto !important;
  max-height: none !important;
  min-height: 80px !important;
}
html.bnpl-app-active #content .mach-highlight-config-btn {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3949ab;
  font-weight: 700;
}
html.bnpl-app-active #content .mach-form-top-config {
  padding: 12px;
  border: 1px solid var(--erp-control-box-border, #CBD5E1);
  border-radius: 8px;
  background: #F8FAFC;
  margin-bottom: 8px;
}

.mpg-machine-table .mpg-machine-thead,
.mpg-machine-table .mpg-machine-row {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 1.15fr) minmax(0, 0.65fr) minmax(0, 0.55fr);
}
.mpg-machine-row {
  cursor: pointer;
}
.mpg-machine-row .mpg-col-name,
.mpg-machine-row .mpg-col-primary,
.mpg-machine-row .mpg-col-status,
.mpg-machine-row .mpg-col-reg,
.mpg-machine-row .mpg-col-sites {
  min-width: 0;
}
@media (max-width: 767px) {
  .mpg-machine-table .mpg-machine-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name name"
      "sites sites"
      "primary status"
      "reg reg";
    gap: 10px;
    align-items: stretch;
  }
  .mpg-machine-row .mpg-col-name { grid-area: name; }
  .mpg-machine-row .mpg-col-sites {
    grid-area: sites;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  .mpg-machine-row .mpg-col-primary { grid-area: primary; }
  .mpg-machine-row .mpg-col-status { grid-area: status; }
  .mpg-machine-row .mpg-col-reg { grid-area: reg; }
}
.spg-row-hr {
  font-size: 11px;
  font-weight: 700;
  color: #000000;
  line-height: 1.35;
  margin-top: 2px;
}
.spg-row-meta {
  margin-top: 4px;
}
.spg-role-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}
.spg-role-badge--none {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}
.spg-role-badge--unknown {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}
.spg-role-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  color: #3949AB;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  line-height: 1.3;
  display: block;
  width: 100%;
  max-width: 100%;
  word-break: break-word;
}
.spg-role-link--none {
  font-size: 11px;
  color: #92400E;
}
.spg-role-link--unknown {
  font-size: 11px;
  color: #991B1B;
}

/* Staff People — access role picker modal (flex list) */
#spgRoleModal.spg-role-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.45);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px;
  box-sizing: border-box;
  pointer-events: auto !important;
}
#spgRoleModal .spg-role-dialog {
  max-width: 420px;
  width: 100%;
  border-radius: 12px;
  padding: 18px 20px 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  box-sizing: border-box;
  max-height: min(92vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-weight: 600;
  color: #111111;
  position: relative;
  z-index: 1;
  pointer-events: auto !important;
}
#spgRoleModal .spg-role-dialog > h3 {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 16px;
  color: #000000 !important;
  text-align: center;
}
#spgRoleModal .spg-role-sub {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600 !important;
  color: #111111 !important;
  line-height: 1.35;
  text-align: center;
}
#spgRoleModal .spg-role-search {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  margin: 0 0 8px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #111111 !important;
  background: #ffffff !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}
#spgRoleModal .spg-role-row.spg-role-row--filtered-out {
  display: none !important;
}
#spgRoleModal .spg-role-search:focus {
  border-color: #3949ab;
  box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.15);
  outline: none;
}
#spgRoleModal .spg-role-search-empty {
  margin: 0;
  padding: 8px 10px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b !important;
  text-align: center;
}
#spgRoleModal .spg-role-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}
#spgRoleModal .spg-role-list-head,
#spgRoleModal .spg-role-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  box-sizing: border-box;
}
#spgRoleModal .spg-role-list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #111111 !important;
  padding: 4px 8px;
  line-height: 1.1;
}
#spgRoleModal .spg-role-col-pick {
  flex: 0 0 56px;
  width: 56px;
  text-align: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}
#spgRoleModal .spg-role-col-name {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #111111 !important;
  line-height: 1.05 !important;
  word-break: break-word;
  padding: 1px 0;
}
#spgRoleModal .spg-role-col-name--none {
  color: #334155 !important;
}
#spgRoleModal .spg-role-row {
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  min-height: 0;
  padding-top: 1px;
  padding-bottom: 1px;
}
#spgRoleModal .spg-role-row:last-child {
  border-bottom: none;
}
#spgRoleModal .spg-role-row:hover {
  background: #f8fafc;
}
#spgRoleModal .spg-role-row.is-selected {
  background: #eef2ff;
}
#spgRoleModal .spg-role-radio {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  cursor: pointer;
  flex-shrink: 0;
}
#spgRoleModal .spg-role-empty {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #92400e !important;
  text-align: center;
}
#spgRoleModal .spg-role-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
  background: #ffffff;
  pointer-events: auto !important;
  box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06);
}
#spgRoleModal .spg-role-btn-edit,
#spgRoleModal .spg-role-btn-cancel,
#spgRoleModal .spg-role-btn-save {
  pointer-events: auto !important;
  touch-action: manipulation;
}
#spgRoleModal .spg-role-btn-edit {
  display: block !important;
  width: 100%;
  min-height: 40px;
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #3949ab !important;
  background: #eef2ff !important;
  color: #3949ab !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-sizing: border-box;
}
#spgRoleModal .spg-role-footer-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}
#spgRoleModal .spg-role-btn-cancel {
  flex: 1 1 0;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer;
  min-height: 44px;
}
#spgRoleModal .spg-role-btn-save {
  flex: 1 1 0;
  background: #3949ab !important;
  color: #ffffff !important;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer;
  min-height: 44px;
}

.spg-proj-lines {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.spg-proj-line {
  font-size: 11px;
  font-weight: 700;
  color: #000000;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.spg-proj-more {
  font-size: 11px;
  font-weight: 800;
  color: #3949AB;
  margin-top: 2px;
}
.spg-punch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
}
.spg-punch-badge--on {
  background: #3949AB;
  color: #FFFFFF;
}
.spg-punch-badge--off {
  background: #E2E8F0;
  color: #475569;
}
.spg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--bnpl-text, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.spg-info-box {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--bnpl-border, #e2e8f0);
  border-radius: var(--bnpl-radius-sm, 8px);
  background: #fafbfc;
  font-weight: 600;
  font-size: 12px;
  color: var(--bnpl-text-secondary, #64748b);
}
.spg-punch-yn {
  display: flex;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  overflow: hidden;
  min-width: 68px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.spg-punch-seg {
  flex: 1;
  border: none;
  padding: 7px 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: #F8FAFC;
  color: #94A3B8;
  line-height: 1;
}
.spg-punch-seg.is-on {
  background: #3949AB;
  color: #FFF;
  box-shadow: inset 0 0 0 1px #283593;
}
.spg-punch-seg.is-off {
  background: #334155;
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px #0f172a;
}
.spg-punch-seg:not(.is-on):not(.is-off) {
  background: #F1F5F9;
  color: #94A3B8;
}
.spg-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.spg-act-btn {
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFF;
  min-height: 28px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}
.spg-act-open {
  color: var(--bnpl-text, #0f172a);
  border-color: var(--bnpl-border-strong, #cbd5e1);
  background: #fff;
}
.spg-act-deactivate,
.spg-act-activate {
  color: var(--bnpl-text-secondary, #64748b);
  border-color: var(--bnpl-border, #e2e8f0);
  background: #fafbfc;
}
.spg-table {
  min-width: 560px;
  width: 100%;
  box-sizing: border-box;
}
.spg-list-scroll {
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--bnpl-border, #e2e8f0);
  border-radius: 10px;
  background: #fafafa;
  -webkit-overflow-scrolling: touch;
}
.spg-mobile-label {
  display: none;
}
.spg-row-open {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
  border-radius: 8px;
}
.spg-avatar--brand {
  background: #3949ab;
  color: #fff;
}
.spg-row-identity {
  min-width: 0;
  flex: 1;
}
.spg-row-name {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}
.spg-row-mobile {
  font-size: 14px;
  color: #212529;
  margin-top: 3px;
  line-height: 1.35;
  font-weight: 600;
  word-break: break-word;
}
.spg-row-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.3;
}
.spg-row-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.spg-col-self {
  display: flex;
  justify-content: center;
  align-items: center;
}
.spg-col-type {
  display: flex;
  align-items: center;
}
.spg-col-projects .spg-projects {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: #3949ab;
  cursor: pointer;
  text-align: left;
  word-break: break-word;
  width: 100%;
}
.spg-proj-names {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
.spg-col-actions {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (max-width: 767px) {
  .spg-list-scroll {
    overflow-x: hidden;
    max-height: none;
  }
  .spg-table {
    min-width: 0;
  }
  .spg-thead,
  .spg-actions-hint {
    display: none !important;
  }
  .spg-mobile-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
  }
  .spg-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "party party"
      "projects projects"
      "self type"
      "actions actions";
    gap: 10px;
    padding: 12px;
    align-items: stretch;
  }
  .spg-col-party {
    grid-area: party;
    min-width: 0;
  }
  .spg-col-projects {
    grid-area: projects;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 0;
    box-sizing: border-box;
  }
  .spg-col-self {
    grid-area: self;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .spg-col-type {
    grid-area: type;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
  }
  .spg-col-actions {
    grid-area: actions;
    justify-content: stretch;
    width: 100%;
  }
  .spg-actions {
    flex-direction: row;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }
  .spg-act-btn {
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
    flex: 1;
    white-space: normal;
  }
  .spg-act-open {
    flex: 1.25;
    background: #eef2ff;
    border-color: #3949ab;
    color: #3949ab;
  }
  .spg-proj-names {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .spg-row-open:active {
    background: #f1f5f9;
  }
  .spg-punch-yn {
    min-width: 72px;
  }
}
.sm-status-toggle-btn {
  align-self: flex-start;
  display: inline-block;
  max-width: fit-content;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  min-height: auto;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
}
.sm-status-toggle-btn--deactivate {
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  background: #fff !important;
}
.sm-status-toggle-btn--activate {
  color: #16a34a !important;
  border: 1px solid #86efac !important;
  background: #fff !important;
}
.st-master-vform .sm-chip-btn,
.st-master-vform button.sm-chip-btn.primary,
.st-master-vform button.sm-chip-btn.secondary {
  max-width: fit-content;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  margin: 12px 0;
  display: inline-block;
  width: auto !important;
  min-height: auto !important;
  flex: none !important;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}
.st-master-vform .sm-admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.st-master-vform #smAdminFormToolbar #smAdminViewModeHint {
  text-align: center;
}
.st-master-vform #smAdminFormToolbar #smAdminEditBtn,
.st-master-vform #smAdminFormToolbar #smAdminCancelEditBtn {
  font-size: 17px;
  font-weight: 800;
  min-height: 48px;
  padding: 12px 28px;
  text-align: center;
  margin: 0;
  line-height: 1.2;
}
.st-master-vform .sm-form-input,
.st-master-vform .sm-form-select {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  background: #ffffff;
  box-sizing: border-box;
  display: block;
  margin-bottom: 8px;
}
.st-master-vform .sm-form-input--readonly {
  background: #f8fafc;
  color: #475569;
}
.st-master-vform .sm-form-input--flex {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.st-master-vform .sm-form-select--compact {
  width: auto;
  min-width: 72px;
  flex-shrink: 0;
  margin-bottom: 0;
}
.st-master-vform .sm-form-textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  background: #ffffff;
  box-sizing: border-box;
  display: block;
  margin-bottom: 8px;
  resize: vertical;
}
.st-master-vform .st-master-mobile-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.st-master-vform #smAdminPartTabs.sm-admin-part-tabs {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  flex-wrap: nowrap;
  margin: 0;
}
.st-master-vform .sm-admin-part-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  padding: 8px 6px;
  font-size: 11px;
  line-height: 1.25;
  cursor: pointer;
  align-self: stretch;
  gap: 3px;
}
.st-master-vform .sm-admin-part-tab-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin: 0 auto 2px;
  border-radius: 6px;
  font-size: 12px;
}
.st-master-vform .sm-admin-part-tab-title {
  display: block;
  width: 100%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.st-master-vform .sm-admin-part-tab[data-part-key="a"] .sm-admin-part-tab-letter {
  background: #6366f1;
  color: #fff;
}
.st-master-vform .sm-admin-part-tab[data-part-key="b"] .sm-admin-part-tab-letter {
  background: #6366f1;
  color: #fff;
}
.st-master-vform .sm-admin-part-tab[data-part-key="c"] .sm-admin-part-tab-letter {
  background: #d97706;
  color: #fff;
}
.st-master-vform .sm-admin-part-tab-actor {
  display: block;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
  line-height: 1.2;
}
.st-master-vform #smCategoryActionRow,
.st-master-vform #smDesignationActionRow {
  margin: 12px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Compact multi-select checklist — SSOT: .cursor/rules/erp-compact-checkbox-list.mdc */
.erp-compact-checklist {
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--color-input-border);
  border-radius: 6px;
  padding: 2px 4px;
  margin-bottom: 8px;
  background: var(--color-input-bg);
  -webkit-overflow-scrolling: touch;
}
.erp-compact-checklist--tall {
  max-height: 160px;
}
.erp-compact-checklist__item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 2px;
  font-size: var(--font-input);
  line-height: 1.25;
  cursor: pointer;
  border-radius: 4px;
}
.erp-compact-checklist__item:hover {
  background: var(--color-hover);
}
.erp-compact-checklist__input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.erp-compact-checklist__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: var(--weight-medium);
}
/* Legacy Staff Part C aliases */
.sm-sites-list {
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--color-input-border);
  border-radius: 6px;
  padding: 2px 4px;
  margin-bottom: 8px;
  background: var(--color-input-bg);
  -webkit-overflow-scrolling: touch;
}
.sm-site-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 2px;
  font-size: var(--font-input);
  line-height: 1.25;
  cursor: pointer;
  border-radius: 4px;
}
.sm-site-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.sm-site-check > span,
.sm-site-check:not(:has(span)) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Resource Master — Vendor UI template (class .rm-vendor-mode — NO :has(), iOS/Android safe) */
#content.bnpl-vendor-template-view {
  background: var(--bnpl-bg);
  padding: 10px 12px 16px;
}
#resource-master-root.rm-vendor-mode {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin: 0;
}
#resource-master-root.rm-vendor-mode #rm-build-banner {
  display: none !important;
}
#resource-master-root.rm-vendor-mode > .rm-title {
  display: none;
}
#resource-master-root.rm-vendor-mode .rm-tabs-wrap {
  position: sticky;
  top: var(--erp-shell-sticky-offset, 88px);
  z-index: 35;
  margin: 0 0 8px;
  padding: 4px;
  background: var(--bnpl-card-bg);
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius);
  box-shadow: var(--bnpl-shadow-sm);
}
#resource-master-root.rm-vendor-mode .rm-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#resource-master-root.rm-vendor-mode .rm-tabs::-webkit-scrollbar {
  display: none;
}
#resource-master-root.rm-vendor-mode .rm-tab {
  flex: 1 1 0;
  min-width: 64px;
  min-height: var(--bnpl-control-h-sm);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  background: var(--bnpl-card-bg);
  color: var(--bnpl-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
#resource-master-root.rm-vendor-mode .rm-tab.rm-tab-active {
  background: var(--bnpl-accent);
  border-color: var(--bnpl-accent);
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(57, 73, 171, 0.2);
}
#resource-master-root.rm-vendor-mode .rm-panels {
  background: transparent;
}
#rmVendorHost {
  width: 100%;
}
/* BNPL UI TEMPLATE — Vendor reference (reuse for Material/Labour/Machine/Fuel) */
.rm-vendor-page,
.bnpl-ui-template.rm-vendor-page {
  display: flex;
  flex-direction: column;
  background: var(--bnpl-card-bg);
  color: var(--bnpl-text);
  gap: 0;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius);
  padding: 12px 14px 14px;
  box-shadow: var(--bnpl-shadow);
  margin-top: 0;
}
.rm-vendor-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bnpl-text-muted);
  line-height: 1.3;
}
.rm-vendor-crumb-parent {
  color: var(--bnpl-text-secondary);
}
.rm-vendor-crumb-root {
  color: var(--bnpl-text-muted);
}
.rm-vendor-crumb-sep {
  color: var(--bnpl-border-strong);
  font-weight: 400;
}
.rm-vendor-crumb-current {
  color: var(--bnpl-accent);
  font-weight: 700;
}
.rm-vendor-heading {
  margin: 0 0 10px;
  padding: 0 0 7px;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--bnpl-text);
  border-bottom: 2px solid var(--bnpl-accent);
  line-height: 1.25;
}
.rm-vendor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  align-items: center;
}
.rm-vendor-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bnpl-control-h);
  padding: 0 14px;
  font-size: 13px;
  border: none;
  border-radius: var(--bnpl-radius-sm);
  background: var(--bnpl-accent);
  color: #FFFFFF !important;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(57, 73, 171, 0.18);
}
.rm-vendor-btn-primary:hover {
  background: #303F9F;
}
.rm-vendor-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bnpl-control-h-sm);
  padding: 0 11px;
  font-size: 12px;
  border: 1px solid var(--bnpl-border-strong);
  border-radius: var(--bnpl-radius-sm);
  background: var(--bnpl-card-bg);
  color: var(--bnpl-text) !important;
  font-weight: 600;
  cursor: pointer;
}
.rm-vendor-btn-secondary:hover {
  background: #F8FAFC;
}
.rm-vendor-import-label {
  margin: 0;
  cursor: pointer;
}
.rm-vendor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  align-items: center;
  padding: 7px 9px;
  background: #FAFBFC;
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
}
.rm-vendor-toolbar .pm-input,
.rm-vendor-toolbar .rm-vendor-search,
.rm-vendor-toolbar .rm-vendor-status {
  flex: 1 1 140px;
  min-width: 110px;
  min-height: var(--bnpl-control-h-sm);
  margin: 0;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--bnpl-border-strong);
  border-radius: var(--bnpl-radius-sm);
  color: var(--bnpl-text);
  background: var(--bnpl-card-bg);
}
.rm-vendor-list-section {
  margin-bottom: 8px;
}
.rm-vendor-table-wrap {
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  overflow: hidden;
  background: var(--bnpl-card-bg);
}
.rm-vendor-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.rm-vendor-table th {
  background: #FAFBFC !important;
  color: var(--bnpl-text) !important;
  font-weight: 700;
  border-bottom: 1px solid var(--bnpl-border) !important;
  padding: 7px 10px;
  font-size: 12px;
}
.rm-vendor-table td {
  color: var(--bnpl-text-secondary);
  border-bottom: 1px solid var(--bnpl-border);
  vertical-align: middle;
  padding: 7px 10px;
  font-size: 13px;
}
.rm-vendor-table td:first-child {
  color: var(--bnpl-text);
  font-weight: 700;
}
.rm-vendor-col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.rm-vendor-table tbody tr:last-child td {
  border-bottom: none;
}
.rm-vendor-table tbody tr:hover td {
  background: #FAFBFC;
}
.rm-vendor-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rm-vendor-card {
  background: var(--bnpl-card-bg);
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  padding: 10px 12px;
  box-shadow: var(--bnpl-shadow-sm);
}
.rm-vendor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.rm-vendor-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--bnpl-text);
}
.rm-vendor-card-meta {
  font-size: 13px;
  color: var(--bnpl-text-secondary);
  margin-bottom: 3px;
}
.rm-vendor-card-flags {
  font-size: 12px;
  color: var(--bnpl-text-muted);
  margin-bottom: 6px;
}
.rm-vendor-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rm-vendor-form-section {
  background: #FAFBFC;
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
}
.rm-vendor-form-section .pm-field {
  margin-bottom: 7px;
}
.rm-vendor-form-section .pm-field > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--bnpl-text-secondary);
  margin-bottom: 4px;
}
.rm-vendor-form-section .pm-input {
  min-height: var(--bnpl-control-h-sm);
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--bnpl-border-strong);
  border-radius: var(--bnpl-radius-sm);
  background: var(--bnpl-card-bg);
  color: var(--bnpl-text);
}
.rm-vendor-form-section .pm-field-row {
  gap: 8px;
  margin-bottom: 0;
}
.rm-vendor-all-sites-field {
  max-width: 220px;
  display: flex;
  align-items: end;
}
.rm-vendor-all-sites-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bnpl-text-secondary);
}
.rm-vendor-flags-row {
  flex-wrap: wrap;
  gap: 10px;
}
.rm-vendor-flags-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bnpl-text-secondary);
}
.rm-vendor-form-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bnpl-text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bnpl-border);
}
.rm-vendor-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.rm-vendor-empty {
  margin: 0;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--bnpl-text-muted);
  background: var(--bnpl-card-bg);
  border: 1px dashed var(--bnpl-border-strong);
  border-radius: var(--bnpl-radius-sm);
}
.rm-vendor-link-btn {
  border: none;
  background: transparent;
  color: var(--bnpl-accent);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
/* FINAL UI FOUNDATION: action links use brand blue only — no warn/success colours */
.rm-vendor-link-warn,
.rm-vendor-link-success {
  color: var(--bnpl-accent);
}

/* FINAL UI FOUNDATION — neutral status badges (text carries meaning, not colour) */
.rm-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  background: var(--bnpl-status-bg);
  color: var(--bnpl-status-text);
  border: 1px solid var(--bnpl-status-border);
}
.rm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #94A3B8;
}
.rm-status-active,
.rm-status-inactive,
.rm-status-progress,
.rm-status-pending,
.rm-status-hold,
.rm-status-draft {
  background: var(--bnpl-status-bg);
  color: var(--bnpl-status-text);
  border-color: var(--bnpl-status-border);
}
.rm-status-active .rm-status-dot,
.rm-status-inactive .rm-status-dot,
.rm-status-progress .rm-status-dot,
.rm-status-pending .rm-status-dot,
.rm-status-hold .rm-status-dot,
.rm-status-draft .rm-status-dot {
  background: #94A3B8;
}
.rm-vendor-page .pm-msg,
.rm-vendor-page .pm-msg-ok,
.rm-vendor-page .pm-msg-warn,
.rm-vendor-page .pm-msg-info,
.rm-vendor-page .hint.pm-msg {
  color: var(--bnpl-text-secondary);
  background: #FAFBFC;
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  padding: 6px 10px;
  margin: 0 0 8px;
  font-size: 12px;
}
.rm-row-actions {
  white-space: nowrap;
  text-align: right;
}
@media (min-width: 1280px) {
  .rm-vendor-page .rm-vendor-list-section {
    margin-bottom: 10px;
  }
  .rm-vendor-table-wrap {
    overflow-x: auto;
  }
  .rm-vendor-toolbar {
    flex-wrap: nowrap;
  }
  .rm-vendor-toolbar .rm-vendor-search {
    flex: 2 1 220px;
    max-width: 360px;
  }
  .rm-vendor-toolbar .rm-vendor-status {
    flex: 0 1 140px;
    max-width: 160px;
  }
  .rm-vendor-form-section .pm-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .rm-vendor-all-sites-field {
    grid-column: 1 / -1;
    max-width: none;
  }
}
.rm-vendor-legacy-divider {
  display: none;
}
.rm-vendor-legacy {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  background: var(--bnpl-card-bg);
  box-shadow: var(--bnpl-shadow-sm);
}
.rm-vendor-legacy .section-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bnpl-text);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--bnpl-border);
}
.rm-vendor-legacy .hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--bnpl-text-muted);
}
.rm-vendor-legacy-banner--locked,
.rm-vendor-legacy-banner--visible {
  padding: 7px 10px;
  font-size: 12px;
  margin-bottom: 8px;
  background: #FAFBFC;
  border: 1px solid var(--bnpl-border);
  color: var(--bnpl-text-secondary);
  border-radius: var(--bnpl-radius-sm);
}
.rm-vendor-legacy .cc-table-wrap {
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  overflow: hidden;
}
@media (max-width: 1279px) {
  .rm-vendor-page .rm-vendor-form-section {
    order: 3;
  }
  .rm-vendor-page .rm-vendor-list-section {
    order: 2;
  }
  #content.bnpl-vendor-template-view {
    padding: 8px 10px 14px;
  }
  .rm-vendor-page,
  .bnpl-ui-template.rm-vendor-page {
    padding: 10px 12px;
  }
}

/* ═══ COMMON UI TEMPLATE — LOCKED (Vendor SSOT) — ERP-wide post-login ═══ */
html.bnpl-app-active #content {
  padding: 10px 12px 16px;
}

html.bnpl-app-active #content .pm-page,
html.bnpl-app-active #content > .rm-page {
  background: var(--bnpl-card-bg);
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius);
  box-shadow: var(--bnpl-shadow);
  padding: 12px 14px 14px;
  color: var(--bnpl-text);
}

html.bnpl-app-active #content .section-title,
html.bnpl-app-active #content > .rm-page > .rm-title {
  margin: 0 0 10px;
  padding: 0 0 7px;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--bnpl-text);
  border-bottom: 2px solid var(--bnpl-accent);
  line-height: 1.25;
}

html.bnpl-app-active #content .cc-table-wrap {
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  overflow: hidden;
  background: var(--bnpl-card-bg);
}

html.bnpl-app-active #content .cc-table th {
  background: var(--bnpl-info-bg);
  color: var(--bnpl-text-secondary);
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid var(--bnpl-border);
  padding: 8px 10px;
}

html.bnpl-app-active #content .cc-table td {
  border-bottom: 1px solid var(--bnpl-border);
  color: var(--bnpl-text);
  padding: 8px 10px;
  font-size: 13px;
}

html.bnpl-app-active #content .cc-table tbody tr:hover td {
  background: #FAFBFC;
}

html.bnpl-app-active #content .pm-input,
html.bnpl-app-active #content input.pm-input,
html.bnpl-app-active #content select.pm-input,
html.bnpl-app-active #content textarea.pm-input {
  min-height: var(--bnpl-control-h-sm);
  border: 1px solid var(--bnpl-border-strong);
  border-radius: var(--bnpl-radius-sm);
  background: var(--bnpl-card-bg);
  color: var(--bnpl-text);
}

html.bnpl-app-active #content .st-badge.ok,
html.bnpl-app-active #content .st-badge.warn,
html.bnpl-app-active #content .st-badge.err,
html.bnpl-app-active #content .st-badge.pending {
  background: var(--bnpl-status-bg);
  color: var(--bnpl-status-text);
  border: 1px solid var(--bnpl-status-border);
}

html.bnpl-app-active #content .card-like {
  background: var(--bnpl-card-bg);
  border: 1px solid var(--bnpl-border);
  border-radius: var(--bnpl-radius-sm);
  box-shadow: var(--bnpl-shadow-sm);
}

/* Dashboard KPI cards — preserve existing dashboard polish (no override) */
html.bnpl-app-active #content .dash-home.cc-home,
html.bnpl-app-active #content .dash-home.cc-home .cc-kpi {
  background: unset;
  border: unset;
  box-shadow: unset;
}

/* ═══ FINAL COMMON UI LOCK — GLOBAL LEGACY NEUTRALIZER (one-shot v610) ═══
   ERP-wide post-login: white/grey + dark text + blue accent ONLY.
   Status badges = pure white; info panels = cool grey (--bnpl-info-bg). */

html.bnpl-app-active #content .st-badge,
html.bnpl-app-active #content .st-badge.ok,
html.bnpl-app-active #content .st-badge.off,
html.bnpl-app-active #content .st-badge.warn,
html.bnpl-app-active #content .st-badge.err,
html.bnpl-app-active #content .st-badge.pending,
html.bnpl-app-active #content .badge,
html.bnpl-app-active #content .rm-status-badge,
html.bnpl-app-active #content .spg-status-badge,
html.bnpl-app-active #content .spg-part-chip,
html.bnpl-app-active #content .spg-duty-badge,
html.bnpl-app-active #content .mboq-chip-ok,
html.bnpl-app-active #content .mboq-chip-warn,
html.bnpl-app-active #content .mboq-chip-locked,
html.bnpl-app-active #content .mboq-chip-open,
html.bnpl-app-active #content .mboq-badge-ok,
html.bnpl-app-active #content .mboq-badge-warn,
html.bnpl-app-active #content .mboq-badge-mismatch,
html.bnpl-app-active #content .mboq-comp-mat,
html.bnpl-app-active #content .mboq-comp-lab,
html.bnpl-app-active #content .boq-flag-off,
html.bnpl-app-active #content .dpr-labor-labour,
html.bnpl-app-active #content span[class*="badge"],
html.bnpl-app-active #content span[class*="status"],
html.bnpl-app-active #content div[class*="badge"]:not(.card):not(.card-like),
html.bnpl-app-active #content .st-vip-badge,
html.bnpl-app-active #content .rm-status-active,
html.bnpl-app-active #content .rm-status-inactive,
html.bnpl-app-active #content .rm-status-progress,
html.bnpl-app-active #content .rm-status-pending,
html.bnpl-app-active #content .rm-status-hold,
html.bnpl-app-active #content .rm-status-draft {
  background: var(--bnpl-status-bg) !important;
  color: var(--bnpl-status-text) !important;
  border-color: var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content .la-banner-green,
html.bnpl-app-active #content .la-banner-red,
html.bnpl-app-active #content .mboq-banner-ok,
html.bnpl-app-active #content .mboq-banner-warn,
html.bnpl-app-active #content .mboq-banner-err,
html.bnpl-app-active #content .spg-info-box,
html.bnpl-app-active #content .spg-part-c-info,
html.bnpl-app-active #content .pm-dup-banner,
html.bnpl-app-active #content .pm-return-box,
html.bnpl-app-active #content .pm-msg,
html.bnpl-app-active #content .pm-msg-ok,
html.bnpl-app-active #content .pm-msg-warn,
html.bnpl-app-active #content .pm-msg-info,
html.bnpl-app-active #content .hint.pm-msg,
html.bnpl-app-active #content .rm-vendor-legacy-banner--locked,
html.bnpl-app-active #content .rm-vendor-legacy-banner--visible {
  background: var(--bnpl-info-bg) !important;
  color: var(--bnpl-status-text) !important;
  border: 1px solid var(--bnpl-status-border) !important;
  box-shadow: none !important;
}

html.bnpl-app-active #content #smMandatoryRulesBanner,
html.bnpl-app-active #content #smDocQuickRow,
html.bnpl-app-active #content #smAdminFormToolbar,
html.bnpl-app-active #content #smPartASubmitBar,
html.bnpl-app-active #content #smPartBStatus,
html.bnpl-app-active #content .sm-part-a-submit-sticky {
  border: 1px solid var(--bnpl-status-border) !important;
  background: var(--bnpl-info-bg) !important;
  box-shadow: none !important;
}

html.bnpl-app-active #content #smMandatoryRulesBanner p,
html.bnpl-app-active #content #smDocQuickRow p,
html.bnpl-app-active #content #smAdminFormToolbar p,
html.bnpl-app-active #content #smPartASubmitBar p {
  color: var(--bnpl-text) !important;
}

html.bnpl-app-active #content .sm-part-section {
  border: 1px solid var(--bnpl-border) !important;
  background: var(--bnpl-card-bg) !important;
}

html.bnpl-app-active #content .sm-part-head-title {
  color: var(--bnpl-text) !important;
}

html.bnpl-app-active #content .sm-part-head-letter,
html.bnpl-app-active #content .sm-part-head-badge {
  background: var(--bnpl-status-bg) !important;
  color: var(--bnpl-status-text) !important;
  border: 1px solid var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content .sm-admin-part-tab--active,
html.bnpl-app-active #content .sm-admin-part-tab--active[data-part-key="a"],
html.bnpl-app-active #content .sm-admin-part-tab--active[data-part-key="b"],
html.bnpl-app-active #content .sm-admin-part-tab--active[data-part-key="c"] {
  background: var(--bnpl-accent) !important;
  color: #fff !important;
  border: 2px solid #0f172a !important;
  box-shadow: none !important;
}

html.bnpl-app-active #content span[style*="border-radius:999px"],
html.bnpl-app-active #content span[style*="border-radius: 999px"] {
  background: var(--bnpl-status-bg) !important;
  color: var(--bnpl-status-text) !important;
  border: 1px solid var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content section[style*="border:2px solid #3949AB"],
html.bnpl-app-active #content section[style*="border: 2px solid #3949AB"],
html.bnpl-app-active #content div[style*="border:2px solid #3949AB"],
html.bnpl-app-active #content div[style*="border: 2px solid #3949AB"] {
  border: 1px solid var(--bnpl-border) !important;
}

html.bnpl-app-active #content .spg-thead,
html.bnpl-app-active #content thead[style*="EEF2FF"],
html.bnpl-app-active #content tr[style*="EEF2FF"] {
  background: var(--bnpl-info-bg) !important;
  color: var(--bnpl-status-text) !important;
  border-color: var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content .st-master-vform .sm-status-toggle-btn--deactivate {
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
  background: #fff !important;
}
html.bnpl-app-active #content .st-master-vform .sm-status-toggle-btn--activate {
  color: #16a34a !important;
  border-color: #86efac !important;
  background: #fff !important;
}
html.bnpl-app-active #content .st-master-vform button.sm-chip-btn.primary {
  background: var(--bnpl-accent, #3949ab) !important;
  color: #fff !important;
  border: none !important;
}
html.bnpl-app-active #content .st-master-vform button.sm-chip-btn.secondary {
  background: #fff !important;
  color: var(--bnpl-text-secondary) !important;
  border: 1px solid var(--bnpl-border-strong) !important;
}

html.bnpl-app-active #content .spg-act-deactivate,
html.bnpl-app-active #content .spg-act-activate,
html.bnpl-app-active #content .spg-act-open,
html.bnpl-app-active #content button.danger,
html.bnpl-app-active #content .danger.pm-mini-btn,
html.bnpl-app-active #content .linkish.danger,
html.bnpl-app-active #content .secondary,
html.bnpl-app-active #content button.secondary {
  background: #fff !important;
  color: var(--bnpl-text-secondary) !important;
  border: 1px solid var(--bnpl-border-strong) !important;
}
html.bnpl-app-active #content .erp-btn-segment-item--issue-active,
html.bnpl-app-active #content .erp-btn-segment-item--issue-active,
html.bnpl-app-active #content .mach-form-b-proof-mount button.mach-form-b-morning-status.mach-form-b-morning-status--issue.mach-form-b-morning-status--active,
html.bnpl-app-active #content .mach-form-b-sheet button.mach-form-b-morning-status.mach-form-b-morning-status--issue.mach-form-b-morning-status--active,
html.bnpl-app-active #content .mach-form-b-morning-segment button.mach-form-b-morning-status.mach-form-b-morning-status--issue.mach-form-b-morning-status--active {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
  -webkit-text-fill-color: #fff !important;
}
/* Staff Form A polish v850 — beat index.html global button { width:100% } */
html.bnpl-app-active #content .st-master-vform #smAdminFormToolbar .sm-admin-toolbar-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
}
html.bnpl-app-active #content .st-master-vform #smAdminFormToolbar #smAdminViewModeHint {
  text-align: center !important;
}
html.bnpl-app-active #content .st-master-vform #smAdminEditBtn,
html.bnpl-app-active #content .st-master-vform #smAdminCancelEditBtn {
  width: auto !important;
  max-width: fit-content !important;
  display: inline-block !important;
  flex: none !important;
  padding: 12px 28px !important;
  min-height: 48px !important;
  border-radius: 8px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: normal !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .st-master-vform #smCategoryChecklistBtn,
html.bnpl-app-active #content .st-master-vform #smDesignationChecklistBtn,
html.bnpl-app-active #content .st-master-vform button.sm-chip-btn {
  width: auto !important;
  max-width: fit-content !important;
  display: inline-block !important;
  flex: none !important;
  padding: 8px 18px !important;
  min-height: auto !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin: 12px 0 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .st-master-vform #smCategoryToggleBtn,
html.bnpl-app-active #content .st-master-vform #smDesignationToggleBtn {
  width: auto !important;
  max-width: fit-content !important;
  display: inline-block !important;
  padding: 8px 14px !important;
  min-height: auto !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active #content .st-master-vform #smFullName,
html.bnpl-app-active #content .st-master-vform #smStaffId,
html.bnpl-app-active #content .st-master-vform #smJoinDate,
html.bnpl-app-active #content .st-master-vform #smMobile,
html.bnpl-app-active #content .st-master-vform #smCategorySelect,
html.bnpl-app-active #content .st-master-vform #smDesignationSelect,
html.bnpl-app-active #content .st-master-vform #smCountryCode,
html.bnpl-app-active #content .st-master-vform .sm-form-input,
html.bnpl-app-active #content .st-master-vform .sm-form-select {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #000000 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  margin-bottom: 8px !important;
}
html.bnpl-app-active #content .st-master-vform #smCategorySelect,
html.bnpl-app-active #content .st-master-vform #smDesignationSelect {
  text-align: left !important;
  text-align-last: left !important;
}
html.bnpl-app-active #content .st-master-vform #smCategorySelect option,
html.bnpl-app-active #content .st-master-vform #smDesignationSelect option {
  color: #000000 !important;
  font-weight: 700 !important;
  text-align: left !important;
}
html.bnpl-app-active #content .st-master-vform #smStaffId {
  background: #f8fafc !important;
  color: #475569 !important;
}
html.bnpl-app-active #content .st-master-vform #smCountryCode {
  width: auto !important;
  min-width: 72px !important;
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}
html.bnpl-app-active #content .st-master-vform #smMobile {
  margin-bottom: 0 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
html.bnpl-app-active #content .st-master-vform .st-master-mobile-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 8px !important;
}

/* Staff master — required field indicator (ERP standard: red asterisk) */
html.bnpl-app-active #content .st-master-vform .erp-req-asterisk,
html.bnpl-app-active #content .st-master-vform .erp-doc-req-star {
  color: #d32f2f !important;
  -webkit-text-fill-color: #d32f2f !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  display: inline-block !important;
  vertical-align: baseline !important;
  margin-left: 2px !important;
  position: relative !important;
  top: 1px !important;
}
html.bnpl-app-active #content .st-master-vform label.sm-form-label,
html.bnpl-app-active #content .st-master-vform .sm-part-section label {
  color: #000000 !important;
  font-weight: 700 !important;
}
html.bnpl-app-active #content .st-master-vform .sm-field-req {
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html.bnpl-app-active #content .st-master-vform .sm-field-req .sm-field-req-text {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  margin-left: 3px !important;
}
html.bnpl-app-active #content .st-master-vform .sm-field-req .erp-req-asterisk {
  margin-left: 0 !important;
  top: 2px !important;
}
html.bnpl-app-active #content .st-master-vform .sm-field-opt {
  margin: 0 0 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html.bnpl-app-active #content .st-master-vform #smAdminPartTabs.sm-admin-part-tabs {
  display: flex !important;
  gap: 10px !important;
  align-items: stretch !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
}
html.bnpl-app-active #content .st-master-vform #smAdminPartTabs .sm-admin-part-tab {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  align-self: stretch !important;
  width: auto !important;
  min-height: 56px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border: 2px solid #0f172a !important;
  padding: 8px 6px !important;
}

html.bnpl-app-active #content .mboq-yn-btn.is-no,
html.bnpl-app-active #content .mboq-yn-btn.is-yes {
  background: var(--bnpl-status-bg) !important;
  color: var(--bnpl-status-text) !important;
}

/* LOCKED v1571 — Staff People grid Self punch ON/OFF (see STAFF_PEOPLE_GRID_SELF_PUNCH_TOGGLE_v1571_LOCK.md).
   Never comma-group .spg-punch-seg.is-off with mboq/status neutralizers. Run staff_self_punch_toggle_css_verify.py */
html.bnpl-app-active #content .spg-punch-seg.spg-punch-on.is-on {
  background: #3949AB !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

html.bnpl-app-active #content .spg-punch-seg.spg-punch-off.is-off {
  background: #334155 !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 0 1px #0f172a !important;
}

html.bnpl-app-active #content .spg-punch-seg:not(.is-on):not(.is-off) {
  background: #F1F5F9 !important;
  color: #64748B !important;
  font-weight: 700 !important;
}

html.bnpl-app-active #content .sdpr-status-ok,
html.bnpl-app-active #content .mboq-total-val.mboq-match-ok,
html.bnpl-app-active #content .mboq-total-val.mboq-match-no,
html.bnpl-app-active #content .mboq-cell-note-warn,
html.bnpl-app-active #content .st-increment-alert label,
html.bnpl-app-active #content .pm-returned-hint,
html.bnpl-app-active #content .ac-mod-links .linkish.danger {
  color: var(--bnpl-text-secondary) !important;
}

html.bnpl-app-active #content .pm-photo-slot-done {
  border-color: var(--bnpl-status-border) !important;
  color: var(--bnpl-status-text) !important;
  background: var(--bnpl-info-bg) !important;
}

html.bnpl-app-active #content .err {
  background: var(--bnpl-info-bg) !important;
  color: var(--bnpl-text) !important;
  border: 1px solid var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content .sm-doc-st {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--bnpl-text-secondary);
}

html.bnpl-app-active #content .sm-doc-st::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

html.bnpl-app-active #content [style*="background:#FFFBEB"],
html.bnpl-app-active #content [style*="background:#EFF6FF"],
html.bnpl-app-active #content [style*="background:#F5F3FF"],
html.bnpl-app-active #content [style*="background:#FEF3C7"],
html.bnpl-app-active #content [style*="background:#FFEDD5"],
html.bnpl-app-active #content [style*="background:#ECFDF5"],
html.bnpl-app-active #content [style*="background:#FEF2F2"],
html.bnpl-app-active #content [style*="background:#EDE9FE"],
html.bnpl-app-active #content [style*="background:#FEF9C3"],
html.bnpl-app-active #content [style*="background:#FEFCE8"],
html.bnpl-app-active #content [style*="background:#F0FDF4"],
html.bnpl-app-active #content [style*="background:#EEF2FF"],
html.bnpl-app-active #content [style*="background: #FFFBEB"],
html.bnpl-app-active #content [style*="background: #EFF6FF"],
html.bnpl-app-active #content [style*="background: #F5F3FF"],
html.bnpl-app-active #content [style*="background: #FEF3C7"],
html.bnpl-app-active #content [style*="background: #FFEDD5"],
html.bnpl-app-active #content [style*="background: #ECFDF5"],
html.bnpl-app-active #content [style*="background: #FEF2F2"],
html.bnpl-app-active #content [style*="background: #EDE9FE"],
html.bnpl-app-active #content [style*="background: #FEF9C3"],
html.bnpl-app-active #content [style*="background: #FEFCE8"],
html.bnpl-app-active #content [style*="background: #F0FDF4"],
html.bnpl-app-active #content [style*="background: #EEF2FF"] {
  background: var(--bnpl-info-bg) !important;
  border-color: var(--bnpl-status-border) !important;
  color: var(--bnpl-status-text) !important;
}

/* Badge inline warm/neutral tints → pure white SSOT */
html.bnpl-app-active #content span[style*="background:#F8FAFC"],
html.bnpl-app-active #content span[style*="background:#FAFBFC"],
html.bnpl-app-active #content span[style*="background:#FAFAFA"],
html.bnpl-app-active #content span[style*="background: #F8FAFC"],
html.bnpl-app-active #content span[style*="background: #FAFBFC"],
html.bnpl-app-active #content span[style*="background: #FAFAFA"],
html.bnpl-app-active #content .badge[style*="background:#FEF3C7"],
html.bnpl-app-active #content .badge[style*="background: #FEF3C7"] {
  background: var(--bnpl-status-bg) !important;
  border-color: var(--bnpl-status-border) !important;
  color: var(--bnpl-status-text) !important;
}

/* Info panel inline neutral tints → cool grey SSOT */
html.bnpl-app-active #content div[style*="background:#F8FAFC"],
html.bnpl-app-active #content div[style*="background:#FAFBFC"],
html.bnpl-app-active #content div[style*="background:#FAFAFA"],
html.bnpl-app-active #content section[style*="background:#F8FAFC"],
html.bnpl-app-active #content section[style*="background:#FAFBFC"],
html.bnpl-app-active #content div[style*="background: #F8FAFC"],
html.bnpl-app-active #content div[style*="background: #FAFBFC"],
html.bnpl-app-active #content div[style*="background: #FAFAFA"],
html.bnpl-app-active #content section[style*="background: #F8FAFC"],
html.bnpl-app-active #content section[style*="background: #FAFBFC"],
html.bnpl-app-active #content #spgListHost {
  background: var(--bnpl-info-bg) !important;
  border-color: var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content [style*="color:#B91C1C"],
html.bnpl-app-active #content [style*="color:#166534"],
html.bnpl-app-active #content [style*="color:#92400E"],
html.bnpl-app-active #content [style*="color:#047857"],
html.bnpl-app-active #content [style*="color:#065F46"],
html.bnpl-app-active #content [style*="color:#4338CA"],
html.bnpl-app-active #content [style*="color:#c62828"],
html.bnpl-app-active #content [style*="color: #B91C1C"],
html.bnpl-app-active #content [style*="color: #166534"],
html.bnpl-app-active #content [style*="color: #92400E"],
html.bnpl-app-active #content [style*="color: #047857"],
html.bnpl-app-active #content [style*="color: #065F46"],
html.bnpl-app-active #content [style*="color: #4338CA"],
html.bnpl-app-active #content [style*="color: #c62828"] {
  color: var(--bnpl-text-secondary) !important;
}

html.bnpl-app-active #content .erp-draft-status,
html.bnpl-app-active #content .erp-draft-status--saved,
html.bnpl-app-active #content .erp-draft-status--synced,
html.bnpl-app-active #content .erp-draft-status--submitted,
html.bnpl-app-active #content .erp-draft-status--offline,
html.bnpl-app-active #content .erp-draft-status--error,
html.bnpl-app-active #content .erp-draft-status--saving,
html.bnpl-app-active #content .erp-draft-status--syncing {
  color: var(--bnpl-text-secondary) !important;
}

/* v611 ERP-wide catch-all — MRS, Material Indent, Labour banners, VC, alerts */
html.bnpl-app-active #content .la-banner-amber,
html.bnpl-app-active #content .la-banner-solid-green,
html.bnpl-app-active #content .la-banner-solid-red,
html.bnpl-app-active #content [class*="mrs-comp-badge"],
html.bnpl-app-active #content .mrs-dup-banner,
html.bnpl-app-active #content .mrs-updated-badge,
html.bnpl-app-active #content .mrs-permission-banner,
html.bnpl-app-active #content .mrs-mini-btn.danger,
html.bnpl-app-active #content .mrs-row-del,
html.bnpl-app-active #content .mi-limit-ok,
html.bnpl-app-active #content .mi-limit-none,
html.bnpl-app-active #content .mi-budget-warn,
html.bnpl-app-active #content .vc-phase-banner,
html.bnpl-app-active #content .vc-route-tag,
html.bnpl-app-active #content .rm-vendor-link-warn,
html.bnpl-app-active #content .rm-vendor-link-success,
html.bnpl-app-active #content .ac-exceptions-link,
html.bnpl-app-active #content .la-face-pending,
html.bnpl-app-active #content div[class*="-banner"]:not(.card):not(.card-like),
html.bnpl-app-active #content section[class*="-banner"],
html.bnpl-app-active #content p[class*="-alert"],
html.bnpl-app-active #content div[class*="-alert"],
html.bnpl-app-active #content [class*="-chip"]:not(.rm-tab):not(.mboq-chip),
html.bnpl-app-active #content td[class*="-badge"],
html.bnpl-app-active #content label[class*="badge"] {
  background: var(--bnpl-status-bg) !important;
  color: var(--bnpl-status-text) !important;
  border-color: var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content .mi-budget-warn,
html.bnpl-app-active #content .mrs-dup-banner,
html.bnpl-app-active #content .mrs-permission-banner,
html.bnpl-app-active #content .vc-phase-banner,
html.bnpl-app-active #content div[class*="-banner"]:not(.card):not(.card-like),
html.bnpl-app-active #content section[class*="-banner"] {
  background: var(--bnpl-info-bg) !important;
}

html.bnpl-app-active #content [style*="border:2px solid #FDE68A"],
html.bnpl-app-active #content [style*="border: 2px solid #FDE68A"],
html.bnpl-app-active #content [style*="border:2px solid #F59E0B"],
html.bnpl-app-active #content [style*="border: 2px solid #F59E0B"],
html.bnpl-app-active #content [style*="border:1px solid #FECACA"],
html.bnpl-app-active #content [style*="border: 1px solid #FECACA"],
html.bnpl-app-active #content [style*="border:1px solid #FCD34D"],
html.bnpl-app-active #content [style*="border: 1px solid #FCD34D"],
html.bnpl-app-active #content [style*="border:1px solid #059669"],
html.bnpl-app-active #content [style*="border: 1px solid #059669"],
html.bnpl-app-active #content [style*="border-color:#FECACA"],
html.bnpl-app-active #content [style*="border-color: #FECACA"],
html.bnpl-app-active #content [style*="border-color:#FDE68A"],
html.bnpl-app-active #content [style*="border-color: #FDE68A"] {
  border-color: var(--bnpl-status-border) !important;
}

html.bnpl-app-active #content [style*="color:#B45309"],
html.bnpl-app-active #content [style*="color: #B45309"],
html.bnpl-app-active #content [style*="color:#991B1B"],
html.bnpl-app-active #content [style*="color: #991B1B"],
html.bnpl-app-active #content [style*="color:#1D4ED8"],
html.bnpl-app-active #content [style*="color: #1D4ED8"],
html.bnpl-app-active #content [style*="color:#6D28D9"],
html.bnpl-app-active #content [style*="color: #6D28D9"] {
  color: var(--bnpl-text-secondary) !important;
}

html.bnpl-app-active #content .cc-row-fraud td,
html.bnpl-app-active #content .boq-sub-labor td,
html.bnpl-app-active #content .mboq-row-warn td,
html.bnpl-app-active #content .mboq-row-mismatch td,
html.bnpl-app-active #content .mwl-row-changed,
html.bnpl-app-active #content tr[style*="background:#F8FAFC"] {
  background: var(--bnpl-info-bg) !important;
}

/* —— Checker Management Phase 1 (.ckm-*) —— */
.ckm-toolbar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ckm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.ckm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}
.ckm-filter-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.25;
  min-height: 2.5em;
  display: block;
  white-space: normal;
  word-break: break-word;
  margin: 0;
}
.ckm-shell .ckm-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-search,
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-select,
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-search-sm,
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-select-sm {
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  max-height: var(--erp-control-box-height, 40px) !important;
  margin: 0 !important;
}
.ckm-filter-w-search {
  flex: 1 1 168px;
  min-width: 160px;
  max-width: 240px;
}
.ckm-filter-w-md {
  flex: 0 0 168px;
  width: 168px;
  max-width: 168px;
}
.ckm-filter-w-sm {
  flex: 0 0 148px;
  width: 148px;
  max-width: 148px;
}
.ckm-filter-w-act {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}
.ckm-filter-w-scope-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-scope-sel {
  flex: 0 0 120px;
  width: 120px;
  max-width: 120px;
}
.ckm-filter-w-seq-act-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-seq-act-sel {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 420px;
}
.ckm-filter-w-seq-chk-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-seq-slot {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 100%;
}
.ckm-filter-w-audit-search {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 320px;
}
.ckm-filter-w-audit-action {
  flex: 0 1 160px;
  min-width: 140px;
  max-width: 200px;
}
.ckm-filter-w-audit-activity {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-audit-from,
.ckm-filter-w-audit-to {
  flex: 0 1 160px;
  min-width: 140px;
  max-width: 180px;
}
.ckm-filter-w-audit-clear {
  flex: 0 0 auto;
}
.ckm-audit-filters-row1,
.ckm-audit-filters-row2 {
  margin-bottom: 8px;
}
.ckm-audit-body-wrap {
  padding: 0;
  overflow: hidden;
  margin-bottom: 8px;
}
.ckm-audit-body-wrap .ckm-audit-table-wrap {
  border: none;
  border-radius: 0;
  max-height: min(480px, 55vh);
}
.ckm-audit-tab-footer .ckm-audit-foot-note {
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-panel-audit .ckm-table-audit th {
  color: #000 !important;
  font-weight: 800;
}
.ckm-panel-audit .ckm-table-audit td {
  color: #000 !important;
  font-weight: 700;
}
html.bnpl-app-active #content .ckm-shell .erp-control-box-block {
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius, 6px) !important;
  box-sizing: border-box;
}
.ckm-filter-w-seq-act-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-seq-act-sel {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 420px;
}
.ckm-filter-w-seq-chk-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-seq-slot {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 100%;
}
.ckm-filter-w-audit-search {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 320px;
}
.ckm-filter-w-audit-action {
  flex: 0 1 160px;
  min-width: 140px;
  max-width: 200px;
}
.ckm-filter-w-audit-activity {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-audit-from,
.ckm-filter-w-audit-to {
  flex: 0 1 160px;
  min-width: 140px;
  max-width: 180px;
}
.ckm-filter-w-audit-clear {
  flex: 0 0 auto;
}
.ckm-audit-filters-row1,
.ckm-audit-filters-row2 {
  margin-bottom: 8px;
}
.ckm-audit-body-wrap {
  padding: 0;
  overflow: hidden;
  margin-bottom: 8px;
}
.ckm-audit-body-wrap .ckm-audit-table-wrap {
  border: none;
  border-radius: 0;
  max-height: min(480px, 55vh);
}
.ckm-audit-tab-footer .ckm-audit-foot-note {
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-panel-audit .ckm-table-audit th {
  color: #000 !important;
  font-weight: 800;
}
.ckm-panel-audit .ckm-table-audit td {
  color: #000 !important;
  font-weight: 700;
}
html.bnpl-app-active #content .ckm-shell .erp-control-box-block {
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius, 6px) !important;
  box-sizing: border-box;
}
.ckm-filter-lbl-spacer {
  display: block;
  user-select: none;
  min-height: 2.5em;
}
.ckm-filter-field-btn {
  flex: 0 0 auto;
}
.ckm-toolbar-legend {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
/* Checker — rules & warnings (must read: red bold, not .hint muted) */
html.bnpl-app-active #content .ckm-shell .ckm-rule-warn {
  color: #991b1b !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1.45;
  text-align: left !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-rule-warn-block {
  margin: 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: 6px;
  background: #fef2f2;
  box-sizing: border-box;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule {
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  background: #fef2f2;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-callout-kicker,
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-callout-steps,
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-step-chip {
  color: #991b1b !important;
  font-weight: 700 !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-meta-n {
  color: #dc2626 !important;
  font-weight: 800 !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-step-sep {
  color: #b91c1c !important;
  opacity: 0.65;
}
.ckm-erp-callout {
  margin: 10px 0 0;
  padding: 10px 12px 10px 14px;
  border: var(--erp-control-box-border);
  border-left: 4px solid #3949ab;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
.ckm-callout-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-callout-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #000 !important;
  line-height: 1.5;
}
.ckm-callout-list li { margin: 0 0 4px; }
.ckm-callout-list li:last-child { margin-bottom: 0; }
.ckm-erp-callout-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  line-height: 1.45;
}
.ckm-erp-callout-inline .ckm-callout-kicker {
  margin: 0;
  flex-shrink: 0;
}
.ckm-callout-steps {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  color: #000 !important;
}
.ckm-step-chip { white-space: normal; }
.ckm-step-sep {
  margin: 0 6px;
  color: #94a3b8 !important;
  font-weight: 700;
}
.ckm-meta-n {
  font-weight: 800;
  color: #3949ab !important;
}
.ckm-detail-meta-line {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #334155 !important;
  line-height: 1.4;
}
.ckm-detail-meta-item { display: inline; }
.ckm-detail-meta-sep {
  margin: 0 4px;
  color: #94a3b8 !important;
}
.ckm-erp-callout-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  line-height: 1.45;
}
.ckm-erp-callout-inline .ckm-callout-kicker {
  margin: 0;
  flex-shrink: 0;
}
.ckm-callout-steps {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  color: #000 !important;
}
.ckm-step-chip { white-space: normal; }
.ckm-step-sep {
  margin: 0 6px;
  color: #94a3b8 !important;
  font-weight: 700;
}
.ckm-meta-n {
  font-weight: 800;
  color: #3949ab !important;
}
.ckm-detail-meta-line {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #334155 !important;
  line-height: 1.4;
}
.ckm-detail-meta-item { display: inline; }
.ckm-detail-meta-sep {
  margin: 0 4px;
  color: #94a3b8 !important;
}
.ckm-hero-strip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.ckm-hero-strip-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.ckm-hero-strip-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-hero-strip .ckm-pill-btn {
  height: 40px !important;
  min-width: 88px;
  border-radius: 6px !important;
  border: var(--erp-control-box-border) !important;
  font-weight: 700;
  color: #000 !important;
  box-sizing: border-box;
}
.ckm-checker-block.ckm-hero-strip {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erp-control-box-border-color, #CBD5E0);
  box-sizing: border-box;
}
.ckm-detail-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}
.ckm-hero-strip-field .ckm-checker-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px;
  border: var(--erp-control-box-border) !important;
  border-radius: 6px !important;
  background: #fff;
  box-sizing: border-box;
  min-width: 120px;
}
.ckm-sub-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.ckm-filter-field-inline {
  flex: 1 1 180px;
  max-width: 280px;
}
/* legacy inline — prefer ckm-filter-w-* + ckm-control-row */
/* legacy inline — prefer ckm-filter-w-* + ckm-control-row */
.ckm-shell .ckm-toolbar .ckm-search,
.ckm-shell .ckm-toolbar .ckm-select,
.ckm-shell .ckm-sub-toolbar .ckm-search,
.ckm-shell .ckm-sub-toolbar .ckm-select {
  height: 40px !important;
  border-radius: 6px !important;
  border: 1px solid var(--erp-control-box-border, #cbd5e1) !important;
  color: #000 !important;
  font-weight: 700;
  box-sizing: border-box;
}
.ckm-shell .ckm-icon-btn.erp-control-box {
  height: 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  border-radius: 6px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.ckm-shell .ckm-filter-field-btn .ckm-icon-btn.erp-control-box {
  width: 40px !important;
  max-width: 40px !important;
}
.ckm-refresh-field .ckm-refresh-btn-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.ckm-refresh-glyph {
  display: inline-block;
  line-height: 1;
  font-size: 18px;
  font-weight: 700;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--busy {
  opacity: 1 !important;
  cursor: wait !important;
  background: #eef2ff !important;
  border-color: #3949ab !important;
  color: #3949ab !important;
  box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.45) !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--busy .ckm-refresh-glyph {
  animation: ckm-refresh-spin 0.75s linear infinite;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--flash {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #166534 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.45) !important;
  animation: ckm-refresh-pulse 0.55s ease-in-out 2;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--flash .ckm-refresh-glyph {
  animation: none;
  transform: scale(1.05);
}
.ckm-refresh-ok {
  font-size: 13px;
  font-weight: 800;
  color: #166534 !important;
  white-space: nowrap;
  animation: ckm-refresh-ok-in 0.25s ease-out;
}
@keyframes ckm-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes ckm-refresh-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@keyframes ckm-refresh-ok-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}
.ckm-seq-assign-card {
  margin: 12px 0 14px;
  padding: 14px 14px 12px;
  background: #f8fafc;
}
.ckm-panel-sequence .ckm-seq-act-bar {
  margin-bottom: 12px;
}
.ckm-seq-assign-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-seq-assign-hint {
  margin: 0 0 10px;
}
.ckm-seq-backup-kicker {
  margin: 16px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-panel-sequence .ckm-toolbar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ckm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.ckm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}
.ckm-filter-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.25;
  min-height: 2.5em;
  display: block;
  white-space: normal;
  word-break: break-word;
  margin: 0;
}
.ckm-shell .ckm-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-search,
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-select,
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-search-sm,
html.bnpl-app-active #content .ckm-shell .ckm-filter-field .ckm-select-sm {
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  max-height: var(--erp-control-box-height, 40px) !important;
  margin: 0 !important;
}
.ckm-filter-w-search {
  flex: 1 1 168px;
  min-width: 160px;
  max-width: 240px;
}
.ckm-filter-w-md {
  flex: 0 0 168px;
  width: 168px;
  max-width: 168px;
}
.ckm-filter-w-sm {
  flex: 0 0 148px;
  width: 148px;
  max-width: 148px;
}
.ckm-filter-w-act {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}
.ckm-filter-w-scope-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 360px;
}
.ckm-filter-w-scope-sel {
  flex: 0 0 120px;
  width: 120px;
  max-width: 120px;
}
.ckm-filter-lbl-spacer {
  display: block;
  user-select: none;
  min-height: 2.5em;
}
.ckm-filter-field-btn {
  flex: 0 0 auto;
}
.ckm-toolbar-legend {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
/* Checker — rules & warnings (must read: red bold, not .hint muted) */
html.bnpl-app-active #content .ckm-shell .ckm-rule-warn {
  color: #991b1b !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1.45;
  text-align: left !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-rule-warn-block {
  margin: 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: 6px;
  background: #fef2f2;
  box-sizing: border-box;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule {
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  background: #fef2f2;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-callout-kicker,
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-callout-steps,
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-step-chip {
  color: #991b1b !important;
  font-weight: 700 !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-meta-n {
  color: #dc2626 !important;
  font-weight: 800 !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-erp-callout-rule .ckm-step-sep {
  color: #b91c1c !important;
  opacity: 0.65;
}
.ckm-erp-callout {
  margin: 10px 0 0;
  padding: 10px 12px 10px 14px;
  border: var(--erp-control-box-border);
  border-left: 4px solid #3949ab;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
.ckm-callout-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-callout-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #000 !important;
  line-height: 1.5;
}
.ckm-callout-list li { margin: 0 0 4px; }
.ckm-callout-list li:last-child { margin-bottom: 0; }
.ckm-hero-strip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.ckm-hero-strip-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.ckm-hero-strip-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-hero-strip .ckm-pill-btn {
  height: 40px !important;
  min-width: 88px;
  border-radius: 6px !important;
  border: var(--erp-control-box-border) !important;
  font-weight: 700;
  color: #000 !important;
  box-sizing: border-box;
}
.ckm-checker-block.ckm-hero-strip {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erp-control-box-border-color, #CBD5E0);
  box-sizing: border-box;
}
.ckm-detail-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}
.ckm-hero-strip-field .ckm-checker-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px;
  border: var(--erp-control-box-border) !important;
  border-radius: 6px !important;
  background: #fff;
  box-sizing: border-box;
  min-width: 120px;
}
.ckm-sub-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.ckm-filter-field-inline {
  flex: 1 1 180px;
  max-width: 280px;
}
.ckm-shell .ckm-toolbar .ckm-search,
.ckm-shell .ckm-toolbar .ckm-select,
.ckm-shell .ckm-sub-toolbar .ckm-search,
.ckm-shell .ckm-sub-toolbar .ckm-select {
  height: 40px !important;
  border-radius: 6px !important;
  border: 1px solid var(--erp-control-box-border, #cbd5e1) !important;
  color: #000 !important;
  font-weight: 700;
  box-sizing: border-box;
}
.ckm-shell .ckm-icon-btn.erp-control-box {
  height: 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  border-radius: 6px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.ckm-shell .ckm-filter-field-btn .ckm-icon-btn.erp-control-box {
  width: 40px !important;
  max-width: 40px !important;
}
.ckm-refresh-field .ckm-refresh-btn-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.ckm-refresh-glyph {
  display: inline-block;
  line-height: 1;
  font-size: 18px;
  font-weight: 700;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--busy {
  opacity: 1 !important;
  cursor: wait !important;
  background: #eef2ff !important;
  border-color: #3949ab !important;
  color: #3949ab !important;
  box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.45) !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--busy .ckm-refresh-glyph {
  animation: ckm-refresh-spin 0.75s linear infinite;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--flash {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #166534 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.45) !important;
  animation: ckm-refresh-pulse 0.55s ease-in-out 2;
}
html.bnpl-app-active #content .ckm-shell .ckm-icon-btn.ckm-icon-btn--flash .ckm-refresh-glyph {
  animation: none;
  transform: scale(1.05);
}
.ckm-refresh-ok {
  font-size: 13px;
  font-weight: 800;
  color: #166534 !important;
  white-space: nowrap;
  animation: ckm-refresh-ok-in 0.25s ease-out;
}
@keyframes ckm-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes ckm-refresh-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@keyframes ckm-refresh-ok-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}
.ckm-seq-assign-card {
  margin: 12px 0 14px;
  padding: 14px 14px 12px;
  background: #f8fafc;
}
.ckm-panel-sequence .ckm-seq-act-bar {
  margin-bottom: 12px;
}
.ckm-seq-assign-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-seq-assign-hint {
  margin: 0 0 10px;
}
.ckm-seq-backup-kicker {
  margin: 16px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.ckm-slot-row {
  margin: 10px 0 0;
}
.ckm-checker-toggle.ckm-pill-btn.checker {
  background: #eef2ff !important;
  border-color: #3949ab !important;
  color: #000 !important;
}
.ckm-checker-toggle.ckm-pill-btn.checker-off {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #000 !important;
}
.ckm-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  min-height: 60vh;
  box-sizing: border-box;
}
.ckm-shell button,
.ckm-shell .primary,
.ckm-shell .ckm-btn-outline,
.ckm-shell .ckm-icon-btn {
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
}
.ckm-shell button.primary,
.ckm-modal-overlay button.primary {
  color: #fff !important;
  background: var(--color-primary, #3949AB) !important;
  border: 1px solid var(--color-primary-dark, #303F9F) !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  min-width: 108px;
}
.ckm-shell button.primary:disabled,
.ckm-modal-overlay button.primary:disabled {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #f8fafc !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}
.ckm-shell button.ckm-btn-outline,
.ckm-modal-overlay button.ckm-btn-outline {
  color: #334155 !important;
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  min-width: 88px;
}
.ckm-shell button.ckm-btn-outline:disabled,
.ckm-modal-overlay button.ckm-btn-outline:disabled {
  color: #94a3b8 !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}
.ckm-modal-overlay button {
  width: auto !important;
}
.ckm-save-banner {
  flex: 1 1 100%;
  width: 100%;
  padding: 8px 12px;
  margin-top: 2px;
  border-radius: 8px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.ckm-tab-actions.is-saved .ckm-tab-actions-right button.primary:disabled {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}
.ckm-page-head { margin-bottom: 2px; }
.ckm-page-head .section-title { margin: 0 0 4px; }
.ckm-subtitle { margin: 0; color: #64748B; font-size: var(--font-small, 13px); text-align: left; }
.ckm-toolbar {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding: 10px 12px;
  background: #fff;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  box-sizing: border-box;
}
.ckm-search {
  padding: 0 10px;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  font-size: var(--font-body, 14px);
  box-sizing: border-box;
}
.ckm-select {
  padding: 0 10px;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
.ckm-icon-btn {
  padding: 0;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  box-sizing: border-box;
}
.ckm-master {
  display: flex;
  flex-direction: column;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  min-height: 420px;
}
@media (min-width: 768px) {
  .ckm-master { flex-direction: row; min-height: 520px; }
}
.ckm-list-pane {
  flex: 0 0 auto;
  width: 100%;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  max-height: 280px;
}
@media (min-width: 768px) {
  .ckm-list-pane {
    width: 340px;
    max-width: 38%;
    border-bottom: none;
    border-right: 1px solid #e2e8f0;
    max-height: none;
  }
}
.ckm-list-head {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.ckm-list-scroll { overflow-y: auto; flex: 1; }
.ckm-emp-row,
.ckm-emp-cols-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 76px 52px;
  column-gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
}
.ckm-emp-row {
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}
html.bnpl-app-active #content .ckm-shell button.ckm-emp-row,
html.bnpl-app-active #content .ckm-shell div.ckm-emp-row {
  width: 100% !important;
  max-width: 100% !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  background: #fff !important;
  color: inherit !important;
}
.ckm-emp-cols-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--erp-control-box-border, #cbd5e1);
  font-size: 12px;
  font-weight: 700;
  color: #000000 !important;
  text-transform: none;
  letter-spacing: normal;
}
.ckm-col-name { text-align: left; min-width: 0; }
.ckm-col-hr,
.ckm-col-chk,
.ckm-emp-stat-col {
  text-align: center;
  justify-self: center;
}
.ckm-emp-stat-col .ckm-pill {
  min-width: 40px;
  max-width: 100%;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
  font-size: 10px !important;
  padding: 2px 5px !important;
  line-height: 1.2;
}
.ckm-emp-row:hover { background: #f8fafc; }
.ckm-emp-row.is-selected { background: #eef2ff; border-left: 3px solid #3949AB; }
.ckm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3949AB;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ckm-avatar.lg { width: 48px; height: 48px; font-size: 14px; }
.ckm-emp-meta { min-width: 0; display: flex; flex-direction: column; text-align: left; }
.ckm-emp-name {
  font-weight: 700;
  font-size: 13px;
  color: #000000 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ckm-emp-code { font-size: 11px; color: #334155 !important; font-weight: 600; }
.ckm-inactive-checker-hint {
  margin: 8px 0 0;
  width: 100%;
}
.ckm-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.ckm-pill.ok { background: #dcfce7; color: #166534; }
.ckm-pill.off { background: #f1f5f9; color: #64748B; }
.ckm-pill.checker { background: #eef2ff; color: #3730a3; }
.ckm-pill.checker-off { background: #f1f5f9; color: #64748B; }
.ckm-pill-btn.ckm-pool-toggle,
.ckm-pill-btn.ckm-checker-toggle {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border: var(--erp-control-box-border) !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ckm-pill-btn.ckm-pool-toggle,
.ckm-pill-btn.ckm-checker-toggle {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border: var(--erp-control-box-border) !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ckm-pill-btn.ckm-pool-toggle {
  border: 1px solid #000000;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  cursor: pointer;
  min-height: 28px;
  line-height: 1.2;
}
.ckm-pill-btn.ckm-pool-toggle.ok { background: #dcfce7; color: #166534 !important; }
.ckm-pill-btn.ckm-pool-toggle.off { background: #f1f5f9; color: #64748b !important; }
.ckm-pool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.ckm-hr-readonly {
  font-size: 12px;
  font-weight: 700;
  color: #64748b !important;
}
.ckm-panel-compact { max-width: 100%; width: 100%; }
/* Activity Scope — checkbox + ON/OFF inline (immune to global input/label/switch rules) */
html.bnpl-app-active #content .ckm-shell label.ckm-scope-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  cursor: pointer;
  font-weight: 700 !important;
  color: #000000 !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-table-scope .ckm-scope-check {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  accent-color: #3949AB;
  border-radius: 4px !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-scope-pill {
  display: inline-block;
  min-width: 30px;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  color: #000000 !important;
  text-align: center;
}
html.bnpl-app-active #content .ckm-shell .ckm-scope-pill.is-on { color: #166534 !important; }
html.bnpl-app-active #content .ckm-shell .ckm-scope-pill.is-off { color: #64748B !important; }
.ckm-table-scope td,
.ckm-table-scope th {
  padding: 4px 8px !important;
  vertical-align: middle !important;
  line-height: 1.25 !important;
}
.ckm-table-wrap-compact .ckm-table tbody tr {
  height: auto;
}
.ckm-tab-actions-top {
  margin-top: 0;
  margin-bottom: 10px;
  padding-top: 0;
  padding-bottom: 10px;
  border-top: none;
  border-bottom: 2px solid #E2E8F0;
}
.ckm-tab-actions-bottom {
  margin-top: auto;
}
.ckm-act-code-cell {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}
.ckm-table-scope th:nth-child(1) { width: 44%; }
.ckm-table-scope th:nth-child(2) { width: 36%; }
.ckm-table-scope th:nth-child(3) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  text-align: center;
}
.ckm-table-scope .ckm-act-toggle {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.ckm-table-seq .ckm-col-num { width: 44px; text-align: center; }
.ckm-table-seq .ckm-col-actions { width: 148px; text-align: right; }
.ckm-table-seq th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #334155 !important;
  border-bottom: 2px solid #e2e8f0;
}
.ckm-table-seq td,
.ckm-table-seq th {
  padding: 8px 10px !important;
  vertical-align: middle !important;
}
.ckm-seq-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  box-shadow: 0 1px 0 #e2e8f0;
}
.ckm-seq-num-cell {
  font-weight: 700;
  color: #3949AB;
  text-align: center;
  width: 44px;
}
.ckm-seq-name-cell { font-weight: 700; color: #000000 !important; font-size: 13px; }
.ckm-seq-role-cell { font-weight: 600; color: #334155 !important; font-size: 13px; }
.ckm-seq-code-cell { font-size: 12px; font-weight: 600; color: #475569; }
.ckm-seq-actions-cell { white-space: nowrap; text-align: right; }
.ckm-panel-sequence .ckm-seq-context-card {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-left: 4px solid #3949AB;
}
.ckm-seq-context-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B !important;
  margin-bottom: 4px;
}
.ckm-seq-context-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #000000 !important;
  line-height: 1.3;
}
.ckm-seq-context-code {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #3949AB !important;
  background: #eef2ff;
  border-radius: 6px;
  padding: 2px 8px;
}
.ckm-panel-sequence .ckm-seq-top-two-hint {
  margin: 0 0 10px;
  line-height: 1.45;
}
.ckm-panel-sequence .ckm-seq-checker-bar {
  margin-bottom: 10px;
}
.ckm-panel-sequence .ckm-seq-add-btn {
  white-space: nowrap;
}
.ckm-panel-sequence .ckm-panel-head {
  margin-bottom: 10px;
}
.ckm-seq-selected {
  margin: 8px 0 6px;
  font-size: 14px;
  color: #0f172a;
}
.ckm-date-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
}
.ckm-date-label span { line-height: 1.2; }
.ckm-clear-btn { white-space: nowrap; }
.ckm-table-audit { font-size: 12px; table-layout: fixed; width: 100%; min-width: 720px; }
.ckm-table-audit th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; }
.ckm-table-audit th:nth-child(1) { width: 12%; }
.ckm-table-audit th:nth-child(2) { width: 14%; }
.ckm-table-audit th:nth-child(3) { width: 16%; }
.ckm-table-audit th:nth-child(4) { width: 14%; }
.ckm-table-audit th:nth-child(5) { width: 14%; }
.ckm-table-audit th:nth-child(6),
.ckm-table-audit th:nth-child(7) { width: 15%; }
.ckm-audit-date { white-space: nowrap; color: #475569; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ckm-audit-action-cell { font-weight: 700; color: #3730a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.ckm-audit-act-cell .ckm-act-name-inline { font-weight: 600; color: #0f172a; display: block; }
.ckm-audit-act-cell { max-width: 0; overflow: hidden; }
.ckm-audit-change { font-weight: 600; color: #334155; }
.ckm-audit-by-cell { color: #64748B; max-width: 0; overflow: hidden; }
.ckm-cell-primary {
  display: block;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.ckm-cell-secondary {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #64748B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.ckm-audit-status { padding: 16px 8px; text-align: center; }
.ckm-audit-error-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ckm-audit-error { color: #b91c1c; font-weight: 600; margin: 0; }
.ckm-audit-retry { font-size: 13px; }
.ckm-audit-date-warn {
  margin: 8px 10px;
  text-align: left;
}
.ckm-detail-pane {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.ckm-detail {
  padding: 12px 14px 16px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.ckm-detail-empty { padding: 24px; }
.ckm-detail-head { margin-bottom: 12px; }
.ckm-detail-hero-card {
  background: #f8fafc;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  padding: 12px 14px;
  box-sizing: border-box;
}
.ckm-detail-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}
.ckm-detail-meta-hr {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #475569 !important;
}
.ckm-detail-name { margin: 0 0 4px; font-size: 18px; }
.ckm-detail-sub { margin: 0 0 0; font-size: 13px; color: #334155 !important; font-weight: 600; }
.ckm-hero-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.ckm-hero-control-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  box-sizing: border-box;
}
.ckm-hero-control-item--switch .ckm-checker-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}
.ckm-hero-control-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #000000 !important;
}
.ckm-checker-toggle {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.ckm-label { font-size: 13px; font-weight: 700; color: #000000 !important; }
.ckm-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.ckm-switch.lg { width: 52px; height: 28px; }
.ckm-switch input { opacity: 0; width: 0; height: 0; }
.ckm-switch-ui {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .15s;
}
.ckm-switch-ui:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
}
.ckm-switch.lg .ckm-switch-ui:before { height: 22px; width: 22px; }
.ckm-switch input:checked + .ckm-switch-ui { background: #3949ab; }
.ckm-switch input:checked + .ckm-switch-ui:before { transform: translateX(20px); }
.ckm-switch.lg input:checked + .ckm-switch-ui:before { transform: translateX(24px); }
.ckm-switch-label { font-size: 12px; font-weight: 700; color: #334155; }
.ckm-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 10px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fff;
  box-shadow: 0 2px 0 rgba(148, 163, 184, 0.25);
}
.ckm-tabs-row {
  align-items: flex-end;
}
.ckm-tab-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ckm-detail-head { flex-shrink: 0; }
.ckm-tab {
  padding: 0 16px;
  min-height: var(--erp-control-box-height, 40px);
  height: var(--erp-control-box-height, 40px);
  box-sizing: border-box;
  border: var(--erp-control-box-border, 1px solid #94a3b8);
  border-radius: 6px;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #000 !important;
  line-height: 1.2;
  white-space: nowrap;
}
.ckm-tab:hover:not(.active) {
  background: #f8fafc;
  border-color: #64748b;
}
.ckm-tab.active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab !important;
  box-shadow: 0 2px 6px rgba(57, 73, 171, 0.35);
}
.ckm-tab:focus-visible {
  outline: 2px solid #3949ab;
  outline-offset: 2px;
}
.ckm-panel {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ckm-panel-title {
  font-weight: 800;
  margin: 0 0 6px;
  font-size: 14px;
  color: #000000 !important;
}
.ckm-hint {
  margin: 0 0 10px;
  color: #000000 !important;
  font-weight: 600 !important;
  text-align: left !important;
}
.ckm-table-wrap { flex: 1; min-height: 120px; }
html.bnpl-app-active #content .ckm-shell .ckm-search,
html.bnpl-app-active #content .ckm-shell .ckm-search-sm,
html.bnpl-app-active #content .ckm-shell .ckm-select,
html.bnpl-app-active #content .ckm-shell .ckm-select-sm,
html.bnpl-app-active #content .ckm-shell .ckm-date {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 6px !important;
  color: #000000 !important;
  font-weight: 700 !important;
  box-sizing: border-box;
}
.ckm-table-wrap { overflow-x: auto; }
.ckm-shell .ckm-table-wrap-compact {
  border: var(--erp-control-box-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
.ckm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ckm-table th,
.ckm-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--erp-control-box-border-color, #CBD5E0);
  text-align: left;
}
.ckm-table th {
  background: #f8fafc;
  font-weight: 700;
  border-bottom: 2px solid var(--erp-control-box-border-color, #CBD5E0);
}
.ckm-shell .ckm-table-wrap-compact .ckm-table tbody tr:last-child td {
  border-bottom: none;
}
.ckm-act-name { font-weight: 600; color: #0f172a; }
.ckm-act-code { display: block; font-size: 11px; color: #64748B; font-weight: 500; }
.ckm-seq-list { list-style: none; margin: 10px 0; padding: 0; }
.ckm-seq-list .ckm-seq-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #fafafa;
}
.ckm-table-seq tbody tr.ckm-seq-tr {
  display: table-row;
  border: none;
  border-radius: 0;
  margin: 0;
  background: transparent;
}
.ckm-table-seq tbody tr.ckm-seq-tr:nth-child(even) { background: #fafbfc; }
.ckm-table-seq tbody tr.ckm-seq-tr:hover { background: #f1f5f9; }
.ckm-seq-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3949AB;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ckm-seq-name { flex: 1; font-weight: 600; font-size: 14px; }
.ckm-seq-sub { font-weight: 500; color: #64748B; font-size: 12px; }
.ckm-seq-actions { display: flex; gap: 4px; }
html.bnpl-app-active #content .ckm-shell .ckm-table-seq .ckm-seq-btn.erp-control-box {
  min-width: 40px !important;
  width: auto !important;
  height: var(--erp-control-box-height) !important;
  min-height: var(--erp-control-box-height) !important;
  padding: 0 10px !important;
  font-weight: 700 !important;
  border: var(--erp-control-box-border) !important;
  border-radius: var(--erp-control-box-radius, 6px) !important;
  background: #fff !important;
  color: #000 !important;
}
html.bnpl-app-active #content .ckm-shell .ckm-table-seq .ckm-seq-btn.danger.erp-control-box {
  color: #991b1b !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}
.ckm-seq-btn {
  min-width: 32px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
html.bnpl-app-active .ckm-seq-btn.erp-control-box {
  min-width: var(--erp-control-box-height, 40px);
  height: var(--erp-control-box-height, 40px);
  padding: 0 10px;
  border: var(--erp-control-box-border, 1px solid #cbd5e1);
  border-radius: 6px;
  box-sizing: border-box;
}
.ckm-seq-btn.danger { color: #b91c1c; border-color: #fecaca; }
.ckm-seq-empty { padding: 12px; color: #64748B; font-size: 13px; }
.ckm-add-btn { margin-top: 8px; }
.ckm-back {
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.ckm-audit-list { margin: 0; padding-left: 18px; font-size: 13px; }
.ckm-audit-diff { font-size: 12px; color: #64748B; }
.ckm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ckm-modal {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  width: min(400px, 100%);
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
}
.ckm-modal.ckm-modal-lg { width: min(560px, 100%); max-height: min(85vh, 640px); display: flex; flex-direction: column; }
.ckm-discard-modal .ckm-discard-body {
  margin: 0 0 14px;
  font-size: 14px;
  text-align: left;
}
.ckm-discard-modal .ckm-discard-actions {
  justify-content: flex-end;
  margin-top: 4px;
}
.ckm-modal-body { flex: 1; overflow: auto; min-height: 0; }
.ckm-modal-act { margin: 0 0 10px; font-size: 13px; }
.ckm-modal-table-wrap { max-height: 280px; margin-top: 8px; }
.ckm-table-modal tbody tr.ckm-modal-row { cursor: pointer; }
.ckm-table-modal tbody tr.ckm-modal-row.is-selected { background: #eff6ff; }
.ckm-seq-table-wrap { max-height: min(420px, 55vh); overflow-y: auto; }
.ckm-audit-table-wrap { max-height: min(480px, 60vh); overflow: auto; -webkit-overflow-scrolling: touch; }
.ckm-seq-remove-btn { font-size: 11px; padding: 4px 8px; min-width: 56px; }
.ckm-seq-status-cell { white-space: nowrap; }
.ckm-audit-old, .ckm-audit-new {
  font-size: 12px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}
.ckm-checker-inline-save { display: flex; gap: 6px; align-items: center; }
.ckm-btn-compact { padding: 6px 10px; font-size: 12px; }
.ckm-checker-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.ckm-checker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}
.ckm-audit-emp-cell { max-width: 0; overflow: hidden; }
.ckm-modal h3 { margin: 0 0 8px; font-size: 16px; }
.ckm-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ckm-btn-outline {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.ckm-saving { color: #2563eb; font-weight: 600; }
.ckm-list-empty { padding: 16px; }

/* Tab actions — footer bar (no sticky overlap on scroll) */
.ckm-tab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 4px;
  margin-top: auto;
  background: #FFFFFF;
  border: none;
  border-top: 2px solid #E2E8F0;
  border-radius: 0;
  position: static;
  z-index: 1;
  box-shadow: none;
  flex-shrink: 0;
}
.ckm-tab-actions .ckm-save-banner {
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  margin-top: 0;
  text-align: left;
}
.ckm-tab-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.ckm-tab-actions-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ckm-tab-actions-right { display: flex; gap: 8px; flex-shrink: 0; }
.ckm-unsaved { font-size: 13px; font-weight: 600; color: #b45309; }
.ckm-save-toast { font-size: 13px; font-weight: 600; color: #166534; }
.ckm-sub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin-bottom: 10px;
}
.ckm-sub-toolbar.ckm-sub-toolbar-row {
  align-items: flex-end;
}
.ckm-search-sm {
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.ckm-select-sm {
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.ckm-date {
  padding: 0 10px;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}
html.bnpl-app-active #content .ckm-shell .ckm-tab-actions-right .erp-control-box,
html.bnpl-app-active #content .ckm-shell .ckm-tab-actions-right .ckm-btn-outline,
html.bnpl-app-active #content .ckm-shell .ckm-tab-actions-right .primary {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 6px !important;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ckm-panel-head { margin-bottom: 4px; }
.ckm-empty-cell, .ckm-empty-msg {
  padding: 16px 12px;
  color: #64748B;
  font-size: 13px;
  text-align: center;
}
.ckm-act-code.inline { display: inline; margin-left: 4px; font-size: 12px; }
.ckm-detail-identity { flex: 1; min-width: 0; }
.ckm-detail-code { font-weight: 600; color: #334155; }
.ckm-detail-mobile { color: #475569; }
.ckm-switch-label.on { color: #166534; }
.ckm-switch-label.off { color: #64748B; }
.ckm-seq-for { margin: 8px 0 6px; font-size: 13px; color: #475569; }

/* Improved readability */
.ckm-act-name { font-weight: 600; color: #0f172a; font-size: 14px; }
.ckm-act-code { display: block; font-size: 12px; color: #475569; font-weight: 500; margin-top: 2px; }
.ckm-label { font-size: 13px; font-weight: 600; color: #334155; }
.ckm-detail-name { margin: 0 0 4px; font-size: 18px; color: #000000 !important; font-weight: 800; }
.ckm-detail-sub { margin: 0; font-size: 13px; color: #334155 !important; font-weight: 600; }
.ckm-pill { font-size: 12px; padding: 3px 10px; }
.ckm-switch-label { font-size: 13px; font-weight: 700; }

/* Sequence controls — touch-friendly */
.ckm-seq-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  color: #334155;
}
.ckm-seq-btn:hover { background: #f1f5f9; border-color: #64748B; }
.ckm-seq-btn.danger { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }
.ckm-seq-num {
  width: 28px;
  height: 28px;
  font-size: 13px;
}
.ckm-seq-list .ckm-seq-row { padding: 10px 12px; }

/* Layout density */
@media (max-width: 767px) {
  .ckm-detail-hero-top {
    flex-direction: row;
  }
}
@media (min-width: 768px) {
  .ckm-list-pane {
    width: 320px;
    max-width: 32%;
    min-width: 280px;
  }
  .ckm-emp-row,
  .ckm-emp-cols-head {
    grid-template-columns: 36px minmax(0, 1fr) 80px 58px;
  }
  .ckm-detail-pane { flex: 1; }
  .ckm-master { min-height: 560px; }
}
.ckm-audit-filters { margin-bottom: 12px; }
.ckm-audit-cards { display: flex; flex-direction: column; gap: 8px; }
.ckm-audit-card {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
}
.ckm-audit-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.ckm-audit-when { font-size: 12px; color: #64748B; font-weight: 500; }
.ckm-audit-action {
  font-size: 13px;
  font-weight: 700;
  color: #3730a3;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 999px;
}
.ckm-audit-act { margin: 4px 0; font-size: 14px; color: #0f172a; }
.ckm-audit-emp { margin: 2px 0; font-size: 13px; color: #334155; }
.ckm-audit-diff { margin: 4px 0; font-size: 13px; font-weight: 600; color: #475569; }
.ckm-audit-by { margin: 4px 0 0; font-size: 12px; color: #64748B; }
.ckm-audit-panel .ckm-audit-body { max-height: none; overflow: visible; }
.ckm-audit-panel { overflow: hidden; }

@media (max-width: 767px) {
  .ckm-tab-actions { position: static; }
  .ckm-tab-actions-right { width: 100%; justify-content: flex-end; }
  .ckm-tab-actions-right .primary,
  .ckm-tab-actions-right .ckm-btn-outline { flex: 1; max-width: 160px; }
  .ckm-seq-btn { min-width: 40px; min-height: 40px; }
  .ckm-audit-table-wrap { overflow-x: auto; overflow-y: auto; }
  .ckm-audit-panel { overflow-x: hidden; }
}

/* ERP box-card SSOT — dark black border + centered text (KPI, part tabs, stat boxes) */
.erp-box-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  box-sizing: border-box;
  box-shadow: none;
}
.erp-box-card__label,
.erp-box-card__value,
.erp-box-card__sub,
.erp-box-card > span,
.erp-box-card > button {
  text-align: center;
}
html.bnpl-app-active #content .erp-box-card {
  border: 2px solid #0f172a !important;
  text-align: center !important;
}

/* Staff people grid — KPI counter cards (center + black border + bold text) */
html.bnpl-app-active #content .spg-wrap button.spg-kpi-card,
html.bnpl-app-active #content .spg-wrap #spgKpiPendingWrap.spg-kpi-card--pending {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 12px !important;
  border: 2px solid #0f172a !important;
  background: #fff !important;
  color: #0f172a !important;
  min-height: 72px !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
}
html.bnpl-app-active #content .spg-wrap #spgKpiPendingWrap.spg-kpi-card--pending.is-active {
  border-color: #3949ab !important;
  box-shadow: 0 0 0 1px #3949ab !important;
}
html.bnpl-app-active #content .spg-wrap #spgPendingSubFilter.spg-pending-sub {
  text-align: center !important;
  text-align-last: center !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  border: 1px solid #0f172a !important;
  background: #fff !important;
}
html.bnpl-app-active #content .spg-wrap #spgKpiPendingBtn.spg-pending-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  gap: 4px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: #0f172a !important;
}
html.bnpl-app-active #content .spg-wrap .spg-kpi-label,
html.bnpl-app-active #content .spg-wrap .spg-kpi-value {
  text-align: center !important;
  width: 100% !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

/* Form B — responsive profile + document grid (v859) */
.st-master-vform .sm-part-b-admin-open-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  color: #0f172a;
  text-align: center;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.st-master-vform .sm-form-b-profile {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.st-master-vform .sm-form-b-field {
  min-width: 0;
  margin: 0 0 8px;
}
.st-master-vform .sm-form-b-field--full,
.st-master-vform .sm-form-b-grid__full {
  grid-column: 1 / -1;
  width: 100%;
}
.st-master-vform .sm-form-b-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 12px;
  margin: 0 0 8px;
  min-width: 0;
}
.st-master-vform .sm-form-b-aadhaar-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 12px;
  min-width: 0;
}
.st-master-vform .sm-form-b-input,
.st-master-vform .sm-form-b-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 10px;
  margin: 0;
}
.st-master-vform .sm-form-b-textarea {
  min-height: 72px;
  resize: vertical;
}
.st-master-vform .sm-form-b-gate-msg {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #c62828;
}
.st-master-vform .sm-form-b-doc-title {
  font-weight: 800;
  color: #0f172a;
  margin: 12px 0 8px;
  font-size: 14px;
}
.st-master-vform .sm-part-b-doc-choices {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
}
.st-master-vform .sm-form-b-doc-grid,
.st-emp-profile .sm-form-b-doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
  align-items: stretch;
}
@media (max-width: 991px) {
  .st-master-vform .sm-form-b-grid--short,
  .st-master-vform .sm-form-b-aadhaar-pair,
  .st-master-vform .sm-form-b-doc-grid {
    grid-template-columns: 1fr !important;
  }
}
.st-master-vform .sm-form-b-doc-grid__full {
  grid-column: 1 / -1;
  min-width: 0;
}
.st-master-vform .sm-form-b-doc-cell,
.st-emp-profile .sm-form-b-doc-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}
.st-master-vform .sm-form-b-doc-cell .erp-doc-mount,
.st-emp-profile .sm-form-b-doc-cell .erp-doc-mount {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
@media (min-width: 992px) {
  .st-master-vform .sm-form-b-grid--short {
    grid-template-columns: 1fr 1fr;
  }
  .st-master-vform .sm-form-b-aadhaar-pair {
    grid-template-columns: 1fr 1fr;
  }
  .st-master-vform .sm-form-b-doc-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot {
  margin: 0;
  padding: 10px 12px;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
  position: relative;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--has-file .erp-doc-actions--compact,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--has-file .erp-doc-actions--compact {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--has-file .erp-doc-upload-trigger,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--has-file .erp-doc-upload-trigger,
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--has-file .erp-doc-preview-btn,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--has-file .erp-doc-preview-btn {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-status-text.erp-doc-status--ok,
.st-emp-profile .erp-documents-section--form-b .erp-doc-status-text.erp-doc-status--ok {
  color: #16a34a;
  font-weight: 800;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-status-text.erp-doc-status--busy,
.st-emp-profile .erp-documents-section--form-b .erp-doc-status-text.erp-doc-status--busy {
  color: #3949ab;
  font-weight: 800;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--compact-uploading .erp-doc-progress-wrap,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--compact-uploading .erp-doc-progress-wrap,
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--show-progress .erp-doc-progress-wrap,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--show-progress .erp-doc-progress-wrap {
  display: flex !important;
  margin-top: 8px;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-progress-wrap,
.st-emp-profile .erp-documents-section--form-b .erp-doc-progress-wrap {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  margin: 8px 0 0;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-progress-track,
.st-emp-profile .erp-documents-section--form-b .erp-doc-progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-progress-fill,
.st-emp-profile .erp-documents-section--form-b .erp-doc-progress-fill {
  display: block;
  height: 100%;
  min-width: 4%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3949ab 0%, #5c6bc0 45%, #7e57c2 100%);
  transition: width 0.18s ease-out;
  box-shadow: 0 0 8px rgba(57, 73, 171, 0.35);
}
.st-master-vform .erp-documents-section--form-b .erp-doc-progress-fill--pulse,
.st-emp-profile .erp-documents-section--form-b .erp-doc-progress-fill--pulse {
  background: linear-gradient(
    90deg,
    #3949ab 0%,
    #5c6bc0 25%,
    #7e57c2 50%,
    #5c6bc0 75%,
    #3949ab 100%
  );
  background-size: 200% 100%;
  animation: erp-doc-progress-shimmer 1.1s linear infinite;
}
@keyframes erp-doc-progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.st-master-vform .erp-documents-section--form-b .erp-doc-progress-pct,
.st-emp-profile .erp-documents-section--form-b .erp-doc-progress-pct {
  font-size: 13px;
  font-weight: 800;
  color: #3949ab;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-preview-btn,
.st-emp-profile .erp-documents-section--form-b .erp-doc-preview-btn {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: center !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
  background: #fff !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--has-file:not(.erp-doc-slot--busy) .erp-doc-preview-btn,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--has-file:not(.erp-doc-slot--busy) .erp-doc-preview-btn {
  display: inline-flex !important;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-progress-label,
.st-emp-profile .erp-documents-section--form-b .erp-doc-progress-label {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--busy,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--busy {
  pointer-events: none;
  opacity: 0.92;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--busy .erp-doc-upload-trigger,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--busy .erp-doc-upload-trigger,
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--busy .erp-doc-preview-btn,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--busy .erp-doc-preview-btn,
.st-master-vform .erp-documents-section--form-b .erp-doc-slot--busy .erp-doc-pick,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot--busy .erp-doc-pick {
  opacity: 0.55;
}
.erp-doc-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}
.erp-doc-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}
.erp-doc-preview-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 24px));
  height: min(72vh, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  background: #fff;
  border: 2px solid #0f172a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.28);
}
.erp-doc-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
  flex-shrink: 0;
}
.erp-doc-preview-download {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid #0f172a;
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  line-height: 1;
}
.erp-doc-preview-download:hover {
  background: #f1f5f9;
}
.erp-doc-preview-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.erp-doc-preview-body--pdf {
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
}
.erp-doc-preview-body--img {
  padding: 16px;
}
.erp-doc-preview-close {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: 3px solid #0f172a;
  background: #0f172a;
  border-radius: 12px;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  font-weight: 900;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}
.erp-doc-preview-close:hover {
  background: #1e293b;
  border-color: #1e293b;
}
.erp-doc-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid #0f172a;
  border-radius: 8px;
}
.erp-doc-preview-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  background: #f1f5f9;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-head,
.st-emp-profile .erp-documents-section--form-b .erp-doc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-label,
.st-emp-profile .erp-documents-section--form-b .erp-doc-label {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.3;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-status-text,
.st-emp-profile .erp-documents-section--form-b .erp-doc-status-text {
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  color: #0f172a;
  white-space: nowrap;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-preview,
.st-emp-profile .erp-documents-section--form-b .erp-doc-preview {
  margin: 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-preview--has-media,
.st-emp-profile .erp-documents-section--form-b .erp-doc-preview--has-media {
  min-height: 72px;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-thumb-btn,
.st-emp-profile .erp-documents-section--form-b .erp-doc-thumb-btn,
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-thumb,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-thumb {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-thumb-btn:focus-visible,
.st-emp-profile .erp-documents-section--form-b .erp-doc-thumb-btn:focus-visible,
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-thumb:focus-visible,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-thumb:focus-visible {
  outline: 2px solid #3949ab;
  outline-offset: 2px;
  border-radius: 8px;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-thumb,
.st-emp-profile .erp-documents-section--form-b .erp-doc-thumb {
  max-height: 120px;
  max-width: 100%;
  width: auto;
  border: 2px solid #0f172a;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-thumb--loading,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-thumb--loading {
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  padding: 10px 12px;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-loading,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-loading {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-visual-thumb,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-visual-thumb {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-page-thumb,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-page-thumb {
  max-height: 120px;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-badge,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-thumb:not(.erp-doc-pdf-thumb--loading),
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-thumb:not(.erp-doc-pdf-thumb--loading) {
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  padding: 10px 12px;
  border: 2px dashed #3949ab;
  border-radius: 8px;
  background: #eef2ff;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-icon,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: #3949ab;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pdf-tag,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pdf-tag {
  font-size: 12px;
  font-weight: 800;
  color: #3949ab;
  text-align: center;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-actions,
.st-emp-profile .erp-documents-section--form-b .erp-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-actions--compact,
.st-emp-profile .erp-documents-section--form-b .erp-doc-actions--compact {
  justify-content: stretch;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-upload-trigger,
.st-emp-profile .erp-documents-section--form-b .erp-doc-upload-trigger {
  flex: 1 1 auto;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  width: 100% !important;
  max-width: none !important;
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  display: inline-flex !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
  background: #fff !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pick-menu,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pick-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  max-width: min(240px, 100vw);
  padding: 6px;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pick-menu.is-open,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pick-menu.is-open {
  display: flex;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-pick-menu .erp-doc-pick,
.st-emp-profile .erp-documents-section--form-b .erp-doc-pick-menu .erp-doc-pick {
  display: flex !important;
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
  background: #fff !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-actions .secondary,
.st-emp-profile .erp-documents-section--form-b .erp-doc-actions .secondary,
.st-master-vform .erp-documents-section--form-b .erp-doc-actions .danger,
.st-emp-profile .erp-documents-section--form-b .erp-doc-actions .danger {
  min-height: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.st-master-vform .erp-documents-section--form-b .erp-doc-audit,
.st-emp-profile .erp-documents-section--form-b .erp-doc-audit {
  display: none;
}
.st-master-vform .erp-doc-gateway-wrap {
  margin: 0;
  width: 100%;
}
.st-master-vform .erp-doc-gateway.erp-doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  min-height: 44px;
  box-sizing: border-box;
}
.st-master-vform .erp-doc-gateway-label {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
}
.st-master-vform .erp-doc-gateway-status {
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  white-space: nowrap;
}
.st-master-vform .erp-doc-gateway-status.is-done {
  color: #16a34a;
}
.st-master-vform .erp-doc-gateway-open {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
  background: #fff !important;
  border-radius: 8px !important;
}
html.bnpl-app-active #content .st-master-vform .erp-documents-section--form-b,
.st-emp-profile .erp-documents-section--form-b .erp-doc-slot {
  border: 2px solid #0f172a !important;
}
html.bnpl-app-active #content .st-master-vform .erp-doc-gateway.erp-doc-row {
  border: 2px solid #0f172a !important;
}
html.bnpl-app-active #content .st-master-vform .sm-tax-input {
  min-height: 44px !important;
  height: 44px !important;
  border: 2px solid #0f172a !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* DAPS login brand block (platform SSOT — tenant name below) */
.login-brand-block {
  text-align: center;
  margin-bottom: 18px;
}
.login-brand-block h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
  color: #0f172a !important;
  font-weight: 800 !important;
}
.login-brand-logo {
  display: block;
  margin: 0 auto 4px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.login-brand-expansion {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #334155 !important;
}
.login-tagline {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a !important;
}
.login-org-label {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
}
.login-brand-block .sub {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a !important;
}

/* —— Party Library skeleton (.pl-*) —— */
.pl-shell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-bottom: 24px;
  box-sizing: border-box;
  min-width: 0;
  color: #000 !important;
  font-weight: 700;
}
.pl-shell-head--list {
  padding-bottom: 2px;
}
.pl-shell-head--list .pl-title {
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0;
}
.pl-shell-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  row-gap: 4px;
}
.pl-shell-step-id {
  flex: 0 0 auto;
}
.pl-shell-kpis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.pl-kpi-inline {
  font-size: 12px;
  font-weight: 800 !important;
  color: #000 !important;
  white-space: nowrap;
}
.pl-kpi-inline-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  font-weight: 800;
  margin-right: 4px;
}
.pl-shell--list .pl-kpi-inline-lbl {
  color: #000 !important;
  font-size: 11px;
}
.pl-shell--list .pl-register-guide {
  margin: 0 0 8px;
  line-height: 1.35;
  max-width: 100%;
}
.pl-shell-layout-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  flex: 1 1 100%;
}
@media (min-width: 901px) {
  .pl-shell-layout-note {
    flex: 0 1 auto;
    margin-left: auto;
  }
}
.pl-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pl-top--list-toolbar {
  padding: 0 0 6px;
  margin: 0;
  border: none;
  background: transparent;
}
.pl-top-toolbar--list {
  flex-wrap: nowrap;
  gap: 8px;
  align-items: flex-end;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
@media (min-width: 1200px) {
  .pl-top-toolbar--list {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 8px;
  }
}
.pl-top-toolbar--list .pl-download-wrap {
  flex: 0 0 auto;
  align-items: center;
  position: relative;
}
.pl-top-toolbar--list .pl-toolbar-cell--action {
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
}
.pl-top-toolbar--list .pl-toolbar-cell--action .btn.erp-control-box {
  width: auto !important;
  white-space: nowrap;
}
.pl-top-toolbar--list .pl-toolbar-cell--download .pl-download-wrap {
  width: auto;
}
.pl-form-grid.pl-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  width: 100%;
}
html.bnpl-app-active #content .pl-form-grid.pl-field-row.erp-control-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  width: 100%;
  max-width: 720px;
  flex-wrap: unset;
}
.pl-form-grid.pl-field-row .pl-field {
  min-width: 0;
}
@media (max-width: 720px) {
  .pl-form-grid.pl-field-row {
    grid-template-columns: 1fr;
  }
}
.pl-top-toolbar--list .btn.erp-control-box {
  flex-shrink: 0;
}
.pl-top-toolbar--inline-lbl .pl-toolbar-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.pl-top-toolbar--inline-lbl .pl-toolbar-cell--search {
  flex: 1 1 200px;
  min-width: 140px;
}
.pl-top-toolbar--inline-lbl .pl-toolbar-cell--filter {
  flex: 0 0 168px;
  min-width: 140px;
}
@media (min-width: 901px) {
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell .erp-filter-lbl {
    min-height: 0 !important;
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800 !important;
    color: #000 !important;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell .erp-control-box {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell--search {
    flex: 1 1 240px;
    max-width: none;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell--filter {
    flex: 0 0 200px;
  }
}
@media (max-width: 900px) {
  .pl-top-toolbar--list {
    flex-wrap: wrap;
    align-items: flex-end;
  }
}
.pl-stat--card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  min-width: 140px;
}
.pl-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #334155 !important;
  max-width: 720px;
}
.pl-top-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.pl-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.pl-stat-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  font-weight: 800;
}
.pl-stat-val {
  font-size: 18px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-top-toolbar {
  align-items: flex-end;
}
.pl-filter-grow {
  flex: 1 1 240px;
  max-width: 420px;
}
.pl-body {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 8px 10px;
  align-items: stretch;
  min-height: min(480px, calc(100vh - 200px));
  min-width: 0;
  width: 100%;
}
.pl-shell--list .pl-body {
  min-height: min(480px, calc(100vh - 140px));
}
.pl-shell--workspace.pl-shell--list .pl-body {
  min-height: calc(100vh - 128px);
}
.pl-shell--list .pl-pane {
  min-height: 320px;
}
.pl-shell--workspace.pl-shell--list .pl-pane {
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}
.pl-shell--list .pl-pane-inner {
  min-height: 0;
}
.pl-shell--workspace .pl-pane-inner--list {
  flex: 1 1 auto;
  min-height: calc(100vh - 160px);
  height: auto;
}
.pl-shell--workspace .pl-pane-body--list.pl-pane-body--workspace {
  padding: 8px 12px 12px;
}
.pl-workspace-head {
  flex: 0 0 auto;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e2e8f0;
}
.pl-workspace-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  justify-content: space-between;
}
.pl-workspace-head .pl-pane-title {
  margin: 0;
  font-size: 1.05rem;
}
.pl-workspace-head .pl-pane-desc {
  margin: 6px 0 0;
  font-size: 12px;
}
.pl-body--nav-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.pl-nav--hidden {
  display: none !important;
}
.pl-pane-reopen-row {
  margin-bottom: 10px;
}
.pl-nav-reopen {
  font-weight: 700 !important;
}
.pl-nav {
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
  padding: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
  min-width: 0;
  box-sizing: border-box;
}
.pl-nav-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 8px;
  border-bottom: var(--erp-control-box-border, 1px solid #64748b);
  margin-bottom: 8px;
  color: #000 !important;
}
.pl-nav-daily {
  margin: 0 0 10px;
  padding: 8px;
  border-radius: 6px;
  border: 2px solid #3949ab;
  background: #eef2ff;
  box-sizing: border-box;
}
.pl-nav-daily-lbl {
  display: block;
  margin: 0 0 4px;
  color: #3949ab !important;
  font-weight: 800 !important;
  min-height: 0 !important;
}
.pl-nav-daily-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.35;
}
.pl-nav-daily-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.bnpl-app-active #content .pl-nav .pl-step-btn--daily,
.pl-step-btn--daily {
  border: 2px solid #3949ab !important;
  background: #fff !important;
  color: #000 !important;
  font-weight: 800 !important;
}
.pl-step-btn--daily.pl-step-btn--active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #303f9f !important;
}
.pl-step-btn--daily.pl-step-btn--active .pl-step-daily-mark {
  color: #fde047;
}
.pl-step-daily-mark {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
  color: #3949ab;
}
.pl-nav-head .erp-filter-lbl,
.pl-nav-head strong {
  color: #000 !important;
  font-weight: 700 !important;
  min-height: 0;
  margin: 0;
}
.pl-nav-toggle {
  width: auto !important;
  white-space: nowrap;
}
.pl-phase-hdr {
  display: block;
  width: 100% !important;
  text-align: left;
  margin: 0 0 6px;
  font-weight: 700 !important;
  color: #000 !important;
  cursor: pointer;
}
.pl-phase-steps {
  padding: 0 0 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.bnpl-app-active #content .pl-nav .pl-step-btn,
.pl-step-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  width: 100% !important;
  text-align: left;
  margin: 0;
  cursor: pointer;
  color: #000 !important;
  font-weight: 700 !important;
  height: auto !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  max-height: none !important;
  white-space: normal;
}
.pl-step-btn:hover {
  background: #fff !important;
}
.pl-step-btn--active {
  border-color: #3949ab !important;
  background: #eef2ff !important;
  color: #000 !important;
}
.pl-step-label {
  display: block;
}
.pl-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
html.bnpl-app-active #content:has(.pl-shell) {
  padding-left: 4px;
  padding-right: 6px;
  padding-top: 4px;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content:has(.pl-shell--list) {
  padding-top: 2px;
}
html.bnpl-app-active #content .pl-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
}
html.bnpl-app-active #app-view.erp-drawer-pinned-active #content .pl-shell {
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .pl-body {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 6px 8px;
}
html.bnpl-app-active #content .pl-body--nav-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
html.bnpl-app-active #content .pl-pane {
  min-width: 0;
  overflow-x: auto;
}

@media (min-width: 901px) {
  html.bnpl-app-active #content .pl-nav {
    width: 100%;
    max-width: 280px;
  }
  html.bnpl-app-active #content .pl-body:not(.pl-body--nav-collapsed) .pl-nav {
    min-width: 240px;
  }
}
@media (max-width: 1099px) {
  html.bnpl-app-active #content .pl-body:not(.pl-body--nav-collapsed) {
    grid-template-columns: minmax(220px, min(280px, 38vw)) minmax(0, 1fr);
  }
}
.pl-pane {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  background: #fff;
  min-height: 480px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pl-pane-inner {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  height: 100%;
  overflow: visible;
}
html.bnpl-app-active #content .pl-shell:not(.pl-shell--list) .pl-pane-inner--own-actions {
  max-width: 720px;
  width: 100%;
}
html.bnpl-app-active #content .pl-pane-body .pl-action-bar.erp-tab-actions {
  justify-content: space-between;
  gap: 8px;
  max-width: 720px;
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .pl-pane-body .pl-action-bar.erp-tab-actions .btn.erp-control-box {
  width: auto !important;
}
.pl-pane-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.pl-pane-head--list {
  padding: 8px 12px 6px;
}
.pl-pane-head--list .pl-pane-title {
  font-size: 1rem;
}
.pl-pane-inner--list .pl-pane-body,
.pl-pane-body--list {
  padding: 8px 10px 12px;
}
.pl-pane-inner--list .pl-pane-reopen-row {
  margin-bottom: 6px;
}
.pl-pane-inner--list .pl-section {
  margin-bottom: 8px;
}
.pl-pane-inner--list .pl-section-title {
  display: none;
}
.pl-pane-inner--list .pl-list-hint {
  margin: 6px 0 0;
  font-size: 12px;
}
.pl-pane-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.pl-pane-step-id {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748b !important;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 8px;
  background: #fff;
}
.pl-pane-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-pane-desc {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #475569 !important;
}
.pl-pane-badges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pl-pane-body {
  flex: 1 1 auto;
  min-height: 220px;
  padding: 16px 18px 20px;
  overflow-y: auto;
  overflow-x: auto;
}
.pl-pane-foot {
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}
.pl-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #94a3b8;
  color: #334155 !important;
  background: #f1f5f9;
}
.pl-badge--locked {
  border-color: #991b1b;
  color: #991b1b !important;
  background: #fef2f2;
}
.pl-badge--soon {
  border-color: #b45309;
  color: #b45309 !important;
  background: #fffbeb;
}
.pl-badge--skel {
  border-color: #64748b;
  color: #475569 !important;
}
.pl-section {
  margin-bottom: 18px;
}
.pl-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-field-row {
  margin-bottom: 12px;
}
.pl-field .erp-control-box {
  width: 100%;
  box-sizing: border-box;
}
.pl-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}
.pl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.pl-table th,
.pl-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
}
.pl-table th {
  background: #f8fafc;
  font-weight: 800 !important;
}
.pl-table-wrap--register {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 100%;
  max-height: min(calc(100vh - 280px), 640px);
  overflow: auto;
}
.pl-pane-inner--list .pl-table-wrap--register {
  width: 100%;
  max-width: 100%;
}
.pl-table--register {
  width: 100%;
  table-layout: fixed;
}
.pl-table--register th,
.pl-table--register td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.pl-table--register th:nth-child(1),
.pl-table--register td:nth-child(1) {
  width: 7%;
}
.pl-table--register th:nth-child(2),
.pl-table--register td:nth-child(2) {
  width: 16%;
  white-space: normal;
  word-break: break-word;
}
.pl-table--register th:nth-child(3),
.pl-table--register td:nth-child(3) {
  width: 10%;
}
.pl-table--register th:nth-child(4),
.pl-table--register td:nth-child(4) {
  width: 12%;
}
.pl-table--register th:nth-child(5),
.pl-table--register td:nth-child(5) {
  width: 10%;
}
.pl-table--register th:nth-child(6),
.pl-table--register td:nth-child(6) {
  width: 9%;
}
.pl-table--register th:nth-child(7),
.pl-table--register td:nth-child(7) {
  width: 12%;
}
.pl-table--register th:nth-child(8),
.pl-table--register td:nth-child(8) {
  width: 8%;
}
.pl-table--register th:nth-child(9),
.pl-table--register td:nth-child(9) {
  width: 10%;
}
.pl-table--register th:nth-child(10),
.pl-table--register td:nth-child(10) {
  width: 11%;
  white-space: normal;
  font-size: 12px;
}
.pl-table--register th.pl-reg-col-actions,
.pl-table--register td.pl-reg-col-actions {
  width: 15%;
  min-width: 148px;
  white-space: normal;
  position: sticky;
  right: 0;
  z-index: 2;
  background: #ffffff;
  box-shadow: -3px 0 6px rgba(15, 23, 42, 0.08);
}
.pl-table--register tbody tr:nth-child(even) td.pl-reg-col-actions {
  background: #fafafa;
}
.pl-table--register tbody tr:hover td.pl-reg-col-actions {
  background: #eef2ff;
}
.pl-table--register thead th.pl-reg-col-actions {
  z-index: 3;
  background: #f8fafc;
}
.pl-table--register td.pl-reg-col-actions .pl-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.pl-last-updated-cell {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #000000 !important;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.pl-ref-create-row {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pl-ref-create-host {
  display: flex;
  width: 100%;
  margin: 4px 0 0;
  box-sizing: border-box;
}
.pl-ref-create-host--toolbar {
  justify-content: flex-end;
}
.pl-ref-create-host--form {
  justify-content: flex-start;
}
html.bnpl-app-active #content .pl-ref-create-panel.bmp-party-ref-create,
.pl-ref-create-panel.bmp-party-ref-create {
  margin: 0;
  padding: 10px 12px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
  width: auto !important;
  max-width: 28rem;
  display: inline-block;
  vertical-align: top;
  align-self: flex-end;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .pl-ref-create-panel--manage,
.pl-ref-create-panel--manage {
  max-width: 720px !important;
  width: 100% !important;
  display: block;
  align-self: stretch;
}
.pl-ref-admin-hint {
  margin: 0 0 8px;
}
.pl-ref-admin-filter {
  margin-top: 8px;
}
.pl-ref-admin-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}
.pl-ref-admin-table {
  width: 100%;
}
.pl-ref-create-panel .bmp-party-ref-create-lbl {
  display: block;
  margin: 0 0 6px;
  font-weight: 700 !important;
  color: #000 !important;
}
.pl-ref-create-panel .bmp-party-ref-create-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  width: auto;
}
.pl-ref-create-panel .bmp-party-ref-create-field {
  flex: 0 0 16rem;
  width: 16rem;
  max-width: 16rem;
  margin: 0;
}
html.bnpl-app-active #content .pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box,
.pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box {
  width: 16rem !important;
  max-width: 16rem !important;
}
.pl-ref-create-panel .btn.erp-control-box {
  flex: 0 0 auto;
  width: auto !important;
  white-space: nowrap;
}
@media (max-width: 560px) {
  html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-row.erp-control-row,
  .pl-ref-create-panel--manage .pl-ref-manage-row {
    flex-wrap: wrap;
  }
  html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-status .erp-control-box {
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .pl-ref-create-panel.bmp-party-ref-create {
    max-width: 100%;
    display: block;
  }
  .pl-ref-create-panel .bmp-party-ref-create-row {
    flex-wrap: wrap;
  }
  .pl-ref-create-panel .bmp-party-ref-create-field,
  .pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box {
    flex: 1 1 12rem;
    width: 100% !important;
    max-width: 100% !important;
  }
}
.pl-import-list-hint {
  margin-top: 0;
}
.pl-table--register thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 #e2e8f0;
}
.pl-table--register tbody tr:nth-child(even) {
  background: #fafafa;
}
.pl-table--register tbody tr:hover {
  background: #eef2ff;
}
.pl-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}
.pl-pill--ok {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46 !important;
}
.pl-pill--pending {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e !important;
}
.pl-pill--warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412 !important;
}
.pl-pill--issue {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b !important;
}
.pl-pill--muted {
  background: #f1f5f9;
  color: #475569 !important;
}
.pl-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pl-row-actions .pl-btn-locked {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}
.pl-row-actions .pl-row-act.erp-control-box {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}
.pl-shell-head--step {
  padding-bottom: 4px;
}
.pl-shell-head--step .pl-title {
  font-size: 1.05rem;
  margin: 0;
}
.pl-register-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.pl-register-foot-row {
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
html.bnpl-app-active #content .pl-download-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}
html.bnpl-app-active #content .pl-download-wrap .erp-rd-anchor {
  position: relative;
}
html.bnpl-app-active #content .pl-download-wrap .erp-rd-panel.erp-rd-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 200;
  width: min(460px, 94vw);
}
html.bnpl-app-active #content .pl-register-dl-toolbar,
html.bnpl-app-active #content .pl-section {
  position: relative;
  z-index: 1;
}
html.bnpl-app-active #content .pl-register-dl-toolbar:has(.erp-rd-panel:not([hidden])) {
  z-index: 50;
}
html.bnpl-app-active #content .pl-pane-body,
html.bnpl-app-active #content .pl-register-foot,
html.bnpl-app-active #content .pl-register-dl-toolbar {
  overflow: visible;
}
html.bnpl-app-active #content .pl-register-dl-toolbar {
  margin-bottom: 10px;
}
html.bnpl-app-active #content .pl-register-dl-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}
.pl-register-meta {
  font-size: 13px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-page-size {
  min-width: 120px;
}
.pl-list-hint {
  margin-top: 8px;
  font-size: 12px;
}
.pl-shell--list .pl-pane-body {
  padding-top: 12px;
}
.pl-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.pl-doc-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fafafa;
}
.pl-doc-name {
  font-size: 13px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pl-btn-locked[disabled] {
  opacity: 0.85;
  cursor: not-allowed;
}
.pl-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.pl-checklist li,
.pl-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  color: #000 !important;
}
.pl-hint {
  margin: 8px 0 12px;
}
.pl-type-segment {
  margin-top: 8px;
}
.pl-int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.pl-int-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}
.pl-360-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.pl-360-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  min-height: 88px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-audit-table {
  width: 100%;
  table-layout: fixed;
}
.pl-audit-table th,
.pl-audit-table td {
  font-weight: 800;
  color: #000 !important;
  vertical-align: top;
  word-break: break-word;
}
.pl-quality-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #000 !important;
}
.pl-quality-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.pl-quality-fill {
  width: 35%;
  height: 100%;
  background: #3949ab;
}
.pl-release-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}
@media (max-width: 900px) {
  .pl-body {
    grid-template-columns: 1fr;
  }
  .pl-nav {
    max-height: min(240px, 38vh);
    max-width: none;
  }
}
.pl-shell-head { margin-bottom: 4px; }
.pl-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 14px;
}
.pl-context-note { font-size: 13px; font-weight: 700; color: #475569 !important; }
.pl-page-block { margin-bottom: 14px; }
.pl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pl-upload-zone {
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #fafafa;
}
.pl-doc-preview { margin-top: 10px; }
.pl-preview-frame {
  min-height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin-top: 8px;
}
.pl-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.pl-flow-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-width: 88px;
  font-size: 12px;
  font-weight: 800;
}
.pl-flow-arrow { color: #64748b; font-weight: 800; }
.pl-kpi-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pl-kpi {
  flex: 1 1 140px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.pl-kpi-lbl { font-size: 11px; font-weight: 800; color: #64748b !important; text-transform: uppercase; }
.pl-kpi-val { font-size: 20px; font-weight: 800 !important; color: #000 !important; }
.pl-gate-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.pl-gate-card { padding: 12px; border: 1px solid #fecaca; background: #fff5f5; border-radius: 6px; font-weight: 800; }
.pl-action-bar { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.pl-req { color: #991b1b; font-weight: 800; }
.pl-name-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-name-chip { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: 800; }
.pl-name-chip--display { border-color: #3949ab; background: #eef2ff; }
.pl-flag-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: min(100%, 480px);
}
.pl-control-flags-card {
  padding: 12px 14px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
  max-width: min(100%, 520px);
}
.pl-control-flags-card .pl-check-item {
  width: 100%;
  max-width: 480px;
  justify-content: flex-start;
}
.pl-change-history-mount {
  width: 100%;
  max-width: 100%;
}
.pl-audit-panel {
  margin-top: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  max-height: min(420px, 55vh);
  overflow: auto;
  background: #fff;
}
.pl-pane-inner--workspace {
  min-height: calc(100vh - 200px);
  max-width: 100% !important;
  width: 100%;
}
.pl-pane-body--workspace {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: calc(100vh - 240px);
  overflow: hidden;
  padding-bottom: 10px;
}
.pl-audit-page,
.pl-amend-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.pl-section.pl-section--flex {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
}
.pl-section.pl-section--flex .pl-section-title {
  flex: 0 0 auto;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-change-history-mount--full {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}
.pl-change-history-mount--full .pl-audit-panel,
.pl-pane-inner--workspace .pl-audit-panel {
  flex: 1 1 auto;
  max-height: min(calc(100vh - 240px), 920px);
  min-height: min(calc(100vh - 320px), 520px);
  margin-top: 0;
  border: var(--erp-control-box-border, 1px solid #64748b);
}
.pl-shell--workspace .pl-change-history-mount--full .pl-audit-panel {
  max-height: min(calc(100vh - 220px), 960px);
  min-height: min(calc(100vh - 300px), 560px);
}
.pl-pane-inner--workspace .pl-amend-register-wrap {
  max-height: min(calc(100vh - 340px), 820px);
  min-height: min(280px, 40vh);
}
.pl-audit-table--erp {
  table-layout: fixed;
  width: 100%;
  min-width: 720px;
  margin: 0;
  border: none;
  border-radius: 0;
}
.pl-audit-table--erp thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef2ff !important;
  color: #000 !important;
  border-bottom: 2px solid #3949ab;
}
.pl-audit-table--erp tbody tr:nth-child(even) {
  background: #f8fafc;
}
.pl-audit-table--erp .pl-audit-col-when {
  width: 18%;
  white-space: nowrap;
}
.pl-audit-table--erp .pl-audit-col-actor {
  width: 22%;
}
.pl-audit-table--erp .pl-audit-col-event {
  width: 20%;
}
.pl-audit-table--erp .pl-audit-col-detail {
  width: 40%;
  font-weight: 700 !important;
  line-height: 1.35;
}
.pl-audit-event-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #eef2ff;
  color: #000 !important;
  font-size: 12px;
  font-weight: 800 !important;
  line-height: 1.2;
}
.pl-audit-empty {
  text-align: center;
  color: #64748b !important;
  font-weight: 700 !important;
  padding: 16px !important;
}
.pl-audit-loading {
  padding: 12px 0;
}
.pl-audit-party-pick {
  padding: 12px 14px;
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 6px;
  background: #fff;
  max-width: min(100%, 560px);
}
.pl-audit-page .pl-audit-party-pick--toolbar {
  flex: 0 0 auto;
  max-width: 100%;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.pl-audit-party-pick-field {
  flex: 1 1 320px;
  min-width: 0;
}
.pl-audit-party-pick-field select.erp-control-box {
  width: 100%;
  max-width: 100%;
}
.pl-amend-toolbar-row {
  margin-bottom: 10px;
}
.pl-amend-toolbar-field {
  flex: 1 1 auto;
  min-width: 0;
}
.pl-amend-queue-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.pl-amend-esc-segment {
  flex: 0 0 auto;
}
.pl-amend-register-wrap {
  max-height: min(480px, 55vh);
}
.pl-amend-register-table .pl-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}
.pl-amend-register-table td.pl-amend-esc-yes {
  color: #991b1b !important;
  font-weight: 800 !important;
}
.pl-amend-loading {
  padding: 20px !important;
}
.pl-amend-empty-cell {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}
.pl-amend-empty {
  margin: 12px;
  padding: 16px 18px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  text-align: left;
}
.pl-amend-empty-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-amend-empty-body {
  margin: 0;
}
.pl-amend-audit-foot {
  font-weight: 700;
  color: #000 !important;
}
.pl-section .pl-amend-register-wrap .pl-amend-register-table {
  min-width: 720px;
  width: 100%;
  table-layout: auto;
}
.pl-amend-register-wrap table.pl-amend-register-table thead th.erp-reg-freeze-left,
.pl-amend-register-wrap table.pl-amend-register-table thead th.erp-reg-freeze-r1 {
  z-index: 5;
  background: #f8fafc;
}
.pl-amend-register-wrap table.pl-amend-register-table tbody tr:nth-child(even) td.erp-reg-freeze-left,
.pl-amend-register-wrap table.pl-amend-register-table tbody tr:nth-child(even) td.erp-reg-freeze-r1 {
  background: #fafafa;
}
.pl-amend-register-wrap table.pl-amend-register-table tbody tr:hover td.erp-reg-freeze-left,
.pl-amend-register-wrap table.pl-amend-register-table tbody tr:hover td.erp-reg-freeze-r1 {
  background: #eef2ff;
}
.pl-section--status .pl-type-segment {
  max-width: min(100%, 520px);
}
.pl-drawer-preview { border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; background: #f8fafc; }
.pl-site-list { display: grid; gap: 6px; }
.pl-masked { font-weight: 800; color: #000 !important; }
.pl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pl-int-map { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; padding: 16px; border: 1px solid #e2e8f0; border-radius: 8px; }
.pl-int-hub { font-weight: 800; padding: 12px 16px; background: #3949ab; color: #fff !important; border-radius: 6px; }
.pl-int-spoke { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px; display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.pl-import-flow, .pl-release-flow { font-weight: 800; padding: 12px; background: #f8fafc; border-radius: 6px; border: 1px solid #e2e8f0; }
.pl-import-page {
  max-width: min(100%, 980px);
}
.pl-import-lead {
  margin: 0 0 12px;
  font-weight: 700;
  color: #000 !important;
}
.pl-import-steps {
  margin: 0;
  padding-left: 1.25rem;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.45;
}
.pl-import-steps li {
  margin-bottom: 8px;
}
.pl-import-warn {
  margin: 12px 0;
}
.pl-import-kpi-row {
  margin-bottom: 12px;
}
.pl-import-kpi--auto .pl-kpi-val { color: #166534 !important; }
.pl-import-kpi--review .pl-kpi-val { color: #b45309 !important; }
.pl-import-kpi--dup .pl-kpi-val { color: #991b1b !important; }
.pl-import-panel {
  max-height: min(420px, 50vh);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.pl-section .pl-import-table {
  min-width: 720px;
  margin: 0;
}
.pl-import-action-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 800 !important;
  color: #000 !important;
  line-height: 1.2;
}
.pl-import-action-pill--ok {
  background: #ecfdf5;
  border-color: #059669;
}
.pl-import-action-pill--review {
  background: #fffbeb;
  border-color: #d97706;
}
.pl-import-action-pill--block {
  background: #fef2f2;
  border-color: #dc2626;
}
.pl-import-review-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b !important;
}
.pl-import-batch-result--ok {
  padding: 10px 12px;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #f0fdf4;
  font-weight: 700;
  color: #000 !important;
}
.pl-import-foot {
  margin-top: 12px;
  font-weight: 700;
}
.pl-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pl-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-pagination { margin-top: 10px; text-align: right; }
@media (max-width: 900px) {
  .pl-split { grid-template-columns: 1fr; }
}

/* Party Library — UI polish (TEST cycle; SSOT-aligned) */
.pl-shell--ready .pl-badge--skel {
  display: none;
}
.pl-section > .pl-field:not(:last-child) {
  display: block;
  margin-bottom: 10px;
  max-width: min(100%, 520px);
}
.pl-section .pl-field-row .pl-field {
  max-width: none;
  flex: 1 1 180px;
  min-width: 0;
}
.pl-section .pl-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  display: block;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.pl-section .pl-data-table thead,
.pl-section .pl-data-table tbody {
  display: table;
  width: 100%;
  min-width: 640px;
}
.pl-section .pl-data-table th,
.pl-section .pl-data-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}
.pl-section .pl-data-table th {
  background: #f8fafc;
  font-weight: 800 !important;
  position: sticky;
  top: 0;
  z-index: 1;
}
.pl-section .pl-data-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.pl-context-bar--info {
  padding: 8px 12px;
  background: #fff;
  border-color: var(--erp-control-box-border, #cbd5e1);
}
.pl-pane-foot.erp-tab-actions {
  gap: 8px;
  flex-wrap: wrap;
}
.pl-pane-body .pl-action-bar.pl-page-block {
  margin-bottom: 8px;
  padding-top: 4px;
}
.pl-pane-body .pl-section:last-child {
  margin-bottom: 8px;
}
.pl-top-toolbar--list .btn.primary.erp-control-box {
  flex-shrink: 0;
}
html.bnpl-app-active #content .pl-shell--list .pl-title {
  font-size: 1.1rem;
}
.pl-filter-lbl .pl-req,
.pl-field .erp-filter-lbl .pl-req {
  color: #991b1b !important;
  font-weight: 800;
}

/* Material Library Hub — Party-style register grid (list mode) */
.mlh-page.pl-shell--list {
  width: 100%;
  max-width: 100%;
}
.mlh-page .pl-pane-inner--list,
.mlh-page .pl-pane-body--list {
  width: 100%;
  max-width: 100%;
}
.mlh-view-segment {
  margin-bottom: 12px;
}
.mlh-pane-bar {
  padding: 0 0 8px;
  margin: 0;
  align-items: flex-end;
}
.mlh-pane-bar .erp-filter-field {
  width: auto;
}
.mlh-view-segment--inline {
  margin-bottom: 0;
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
}
.mlh-tb-segment {
  min-width: 0;
  width: auto;
}
.mlh-tb-segment .mlh-view-segment--inline .erp-btn-segment-item {
  white-space: nowrap;
}
.mlh-toolbar-unified.pl-top-toolbar--list {
  display: grid;
  gap: 8px 10px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  flex-wrap: unset;
  overflow: visible;
}
.mlh-toolbar-unified--master.pl-top-toolbar--list {
  grid-template-columns:
    auto
    minmax(108px, 1.35fr)
    minmax(92px, 0.72fr)
    minmax(92px, 0.72fr)
    auto
    auto;
}
.mlh-toolbar-unified--site.pl-top-toolbar--list {
  grid-template-columns: auto minmax(200px, 1fr);
  margin-bottom: 10px;
}
.mlh-toolbar-unified--site .mlh-tb-site {
  min-width: 0;
}
.mlh-toolbar {
  margin-bottom: 10px;
}
.mil-top-toolbar,
.mil-pane .pl-pane-body--list {
  overflow: visible;
}
.mil-toolbar-single.pl-top-toolbar--list:not(.mlh-toolbar-unified) {
  display: grid;
  grid-template-columns:
    minmax(108px, 1.35fr)
    minmax(92px, 0.72fr)
    minmax(92px, 0.72fr)
    auto
    auto;
  gap: 8px 10px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  flex-wrap: unset;
  overflow: visible;
}
.mil-toolbar-single .mil-tb-search,
.mil-toolbar-single .mil-tb-filter {
  min-width: 0;
}
.mil-toolbar-single .mil-tb-action {
  min-width: 0;
  width: auto;
}
.mil-toolbar-single .mil-tb-action .btn.erp-control-box {
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .mil-toolbar-single.pl-top-toolbar--list:not(.mlh-toolbar-unified) {
    grid-template-columns: 1fr 1fr;
  }
  .mil-toolbar-single .mil-tb-search {
    grid-column: 1 / -1;
  }
  .mlh-toolbar-unified--master.pl-top-toolbar--list {
    grid-template-columns: 1fr 1fr;
  }
  .mlh-toolbar-unified--master .mlh-tb-segment {
    grid-column: 1 / -1;
  }
  .mlh-toolbar-unified--master .mil-tb-search {
    grid-column: 1 / -1;
  }
  .mlh-toolbar-unified--site.pl-top-toolbar--list {
    grid-template-columns: 1fr;
  }
  .mlh-toolbar-unified--site .mlh-tb-segment {
    grid-column: 1 / -1;
  }
}
.mil-pane .pl-top--list-toolbar {
  margin-bottom: 8px;
}
.mil-hint {
  margin: 0 0 10px;
}
.mil-name-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: #000000 !important;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mil-name-link:hover {
  color: #3949ab !important;
}
.mil-detail-panel {
  position: relative;
  margin: 12px 0 16px;
  max-width: 720px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
}
.mil-detail-body p {
  margin: 0 0 8px;
  color: #000000;
  font-weight: 600;
}
.mil-detail-audit-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--erp-control-box-border, #64748b);
}
.mil-detail-audit {
  margin: 0 0 6px !important;
  font-weight: 600;
  color: #000000 !important;
}
.mil-table-wrap.mlh-table-wrap {
  max-height: min(calc(100vh - 280px), 720px);
}
.mil-register-table.pl-table--register {
  width: 100%;
  table-layout: auto !important;
}
.mil-register-table.pl-table--register th:nth-child(1),
.mil-register-table.pl-table--register td:nth-child(1) {
  width: auto;
  min-width: 140px;
  white-space: normal;
  word-break: break-word;
}
.mil-register-table.pl-table--register th:nth-child(2),
.mil-register-table.pl-table--register td:nth-child(2),
.mil-register-table.pl-table--register th:nth-child(3),
.mil-register-table.pl-table--register td:nth-child(3) {
  width: auto;
  white-space: normal;
  word-break: break-word;
}
.mil-register-table.pl-table--register .mil-th-compact,
.mil-register-table.pl-table--register .mil-td-compact {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.mil-register-table.pl-table--register {
  --erp-reg-r1: 220px;
}
.mil-register-table.pl-table--register th.pl-reg-col-actions,
.mil-register-table.pl-table--register td.pl-reg-col-actions,
.mil-register-table.pl-table--register th:nth-child(8),
.mil-register-table.pl-table--register td:nth-child(8) {
  width: auto;
  min-width: 280px;
  white-space: nowrap;
  vertical-align: middle;
}
.mil-td-actions .mil-action-stack,
.ul-td-actions .ul-action-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
.mil-td-actions .btn.erp-control-box,
.ul-td-actions .btn.erp-control-box {
  width: auto !important;
  max-width: none;
  flex: 0 0 auto;
}
.mil-empty-cell {
  color: #64748b !important;
  font-weight: 600 !important;
}

/* Unit library — Party/Material-style register (4 columns) */
.ul-page.pl-shell--list {
  width: 100%;
  max-width: 100%;
}
.ul-page .pl-pane-inner--list,
.ul-page .pl-pane-body--list {
  width: 100%;
  max-width: 100%;
}
.ul-top-toolbar,
.ul-page .pl-pane-body--list {
  overflow: visible;
}
.ul-toolbar-single.pl-top-toolbar--list,
.mcl-toolbar-single.pl-top-toolbar--list {
  display: grid;
  grid-template-columns:
    minmax(160px, 220px)
    minmax(108px, 132px)
    minmax(108px, 132px)
    minmax(140px, 180px)
    auto
    auto;
  gap: 8px 10px;
  align-items: end;
  width: auto;
  max-width: 100%;
  flex-wrap: unset;
  overflow: visible;
}
.mcl-toolbar-single.pl-top-toolbar--list {
  grid-template-columns:
    minmax(160px, 220px)
    minmax(108px, 132px)
    minmax(160px, 220px)
    minmax(160px, 220px)
    auto;
}
.ul-toolbar-single .ul-tb-search {
  min-width: 0;
}
.ul-toolbar-single .ul-tb-filter {
  min-width: 0;
}
.ul-toolbar-single .ul-tb-newname {
  min-width: 0;
}
.ul-toolbar-single .ul-tb-action {
  min-width: 0;
  width: auto;
}
.ul-toolbar-single .ul-tb-action .btn.erp-control-box {
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .ul-toolbar-single.pl-top-toolbar--list {
    grid-template-columns: 1fr 1fr;
  }
  .ul-toolbar-single .ul-tb-search {
    grid-column: 1 / -1;
  }
  .ul-toolbar-single .ul-tb-newname {
    grid-column: 1 / -1;
  }
}
.ul-hint {
  margin: 0 0 10px;
}
.ul-table-wrap.mlh-table-wrap,
.mlh-table-wrap--compact.pl-table-wrap--register {
  max-height: min(calc(100vh - 280px), 720px);
  width: 100%;
  max-width: 100%;
  overflow: auto;
}
.ul-register-table.pl-table--register,
.mcl-register-table.pl-table--register {
  --erp-reg-r1: 280px;
  width: 100% !important;
  min-width: 820px;
  max-width: none !important;
  table-layout: auto !important;
}
.ul-register-table.pl-table--register th,
.ul-register-table.pl-table--register td,
.mcl-register-table.pl-table--register th,
.mcl-register-table.pl-table--register td {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.ul-register-table.pl-table--register th:nth-child(1),
.ul-register-table.pl-table--register td:nth-child(1),
.mcl-register-table.pl-table--register th:nth-child(1),
.mcl-register-table.pl-table--register td:nth-child(1) {
  width: auto;
  min-width: 160px;
  white-space: nowrap !important;
  word-break: keep-all;
}
.ul-register-table.pl-table--register th:nth-child(2),
.ul-register-table.pl-table--register td:nth-child(2),
.mcl-register-table.pl-table--register th:nth-child(2),
.mcl-register-table.pl-table--register td:nth-child(2),
.mcl-register-table.pl-table--register th:nth-child(3),
.mcl-register-table.pl-table--register td:nth-child(3) {
  width: auto;
  min-width: 120px;
  white-space: nowrap !important;
}
.ul-register-table.pl-table--register th.ul-th-linked,
.ul-register-table.pl-table--register td.ul-td-linked,
.mcl-register-table.pl-table--register th.ul-th-linked,
.mcl-register-table.pl-table--register td.ul-td-linked {
  width: auto;
  min-width: 176px;
  padding-right: 16px;
  white-space: nowrap !important;
  overflow: visible !important;
}
.ul-register-table.pl-table--register th.pl-reg-col-actions,
.ul-register-table.pl-table--register td.pl-reg-col-actions,
.mcl-register-table.pl-table--register th.pl-reg-col-actions,
.mcl-register-table.pl-table--register td.pl-reg-col-actions {
  width: auto !important;
  min-width: 220px;
  white-space: nowrap !important;
}
.ul-register-table.pl-table--register thead th.erp-reg-freeze-left,
.ul-register-table.pl-table--register thead th.erp-reg-freeze-r1,
.mcl-register-table.pl-table--register thead th.erp-reg-freeze-left,
.mcl-register-table.pl-table--register thead th.erp-reg-freeze-r1 {
  z-index: 5;
  background: #f8fafc;
}
.ul-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-left,
.ul-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-r1,
.mcl-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-left,
.mcl-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-r1 {
  background: #fafafa;
}
.ul-td-actions .btn.erp-control-box,
.mcl-register-table .mlh-td-actions .btn.erp-control-box {
  width: auto !important;
  max-width: none;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.mlh-page .pl-shell-kpis {
  flex-wrap: wrap;
}
.mlh-toolbar .erp-filter-field {
  min-width: min(420px, 100%);
}
.mlh-table-wrap.pl-table-wrap--register {
  max-height: min(calc(100vh - 240px), 720px);
}
.mlh-register-table.pl-table--register th:nth-child(1),
.mlh-register-table.pl-table--register td:nth-child(1) {
  width: 16%;
  white-space: normal;
  word-break: break-word;
}
.mlh-register-table.pl-table--register th:nth-child(2),
.mlh-register-table.pl-table--register td:nth-child(2) {
  width: 12%;
  white-space: normal;
}
.mlh-register-table.pl-table--register th:nth-child(3),
.mlh-register-table.pl-table--register td:nth-child(3) {
  width: 14%;
  white-space: normal;
}
.mlh-register-table.pl-table--register th:nth-child(4),
.mlh-register-table.pl-table--register td:nth-child(4) {
  width: 6%;
}
.mlh-register-table.pl-table--register th:nth-child(5),
.mlh-register-table.pl-table--register td:nth-child(5) {
  width: 10%;
}
.mlh-register-table.pl-table--register th:nth-child(6),
.mlh-register-table.pl-table--register td:nth-child(6) {
  width: 8%;
}
.mlh-register-table.pl-table--register th:nth-child(7),
.mlh-register-table.pl-table--register td:nth-child(7) {
  width: 14%;
  white-space: normal;
}
.mlh-register-table.pl-table--register th:nth-child(8),
.mlh-register-table.pl-table--register td:nth-child(8) {
  width: 9%;
}
.mlh-register-table.pl-table--register th:nth-child(9),
.mlh-register-table.pl-table--register td:nth-child(9) {
  width: 11%;
  white-space: normal;
}
.mlh-td-name {
  font-weight: 800 !important;
  color: #000 !important;
}
.mlh-td-num,
.mlh-th-num {
  text-align: right !important;
}
.mlh-td-unit {
  text-align: center !important;
}
.mlh-td-actions {
  text-align: right !important;
}
.mlh-td-actions .mlh-pass {
  min-height: 32px !important;
  height: 32px !important;
  font-size: 11px !important;
  padding: 0 10px !important;
}
.mlh-cap-input {
  width: 100%;
  max-width: 112px;
  min-height: 40px !important;
  height: 40px !important;
  text-align: right;
  box-sizing: border-box;
}
.mlh-boq-cap-hint {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
}
.mlh-qty {
  font-weight: 800 !important;
  color: #000 !important;
}
.mlh-unlimited {
  font-weight: 700 !important;
  color: #475569 !important;
}
.mlh-dash {
  color: #64748b !important;
  font-weight: 700;
}
.mlh-pill--boq {
  background: #eef2ff;
  border-color: #818cf8;
  color: #312e81 !important;
  white-space: normal;
  line-height: 1.25;
  max-width: 100%;
}
.mlh-pill--nonboq {
  background: #f0fdf4;
  border-color: #86efac;
  color: #14532d !important;
  white-space: normal;
}
.mlh-pill--returnable {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412 !important;
  white-space: normal;
}
.mlh-site-warn {
  margin-top: 8px;
}
.mlh-action-hint {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b !important;
  line-height: 1.35;
  max-width: 120px;
  margin-left: auto;
  text-align: right;
}
.mlh-td-actions .mlh-pass {
  white-space: nowrap;
}

/* Purchase Item Master Hub v1.72 — ribbon + badges */
.erp-purchase-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ede7f6 0%, #f5f3ff 55%, #fff 100%);
  border: 1px solid #b39ddb;
}
.erp-purchase-ribbon-tab {
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #64748b);
  background: #fff;
  color: #000 !important;
  font-weight: 800;
  cursor: default;
}
.erp-purchase-ribbon-tab--active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab;
}
.erp-badge-unverified {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e !important;
  font-weight: 800;
  border: 1px solid #f59e0b;
}
.erp-badge-verified {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534 !important;
  font-weight: 800;
  border: 1px solid #86efac;
}
.pm-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1200;
}
#pmItemCreateDrawer:not([hidden]),
#bmpPartyIntakeDrawer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}
#pmItemCreateDrawer:not([hidden]) .pm-drawer-backdrop,
#pmItemCreateDrawer:not([hidden]) .pm-item-create-drawer,
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-backdrop,
#bmpPartyIntakeDrawer:not([hidden]) .pm-item-create-drawer {
  pointer-events: auto;
}
.pm-item-create-drawer.pm-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  right: auto;
  max-width: 520px;
  width: min(520px, calc(100vw - 24px));
  z-index: 1201;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 640px);
  overflow: hidden;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}
.pm-drawer-head {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.pm-drawer-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800 !important;
  color: #000000 !important;
  line-height: 1.3;
}
.pm-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.pm-drawer-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0 0 10px;
  min-width: 0;
}
.pm-drawer-field .erp-filter-lbl {
  min-height: 2.5em;
  margin: 0 0 4px;
}
.pm-drawer-field .erp-control-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.pm-drawer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 2px;
}
.pm-drawer-field--half {
  margin-bottom: 10px;
  min-width: 0;
}
.pm-drawer-inline-create {
  margin: 0 0 12px;
  padding: 10px;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  background: #f8fafc;
}
.pm-drawer-suggest {
  margin-top: 4px;
  max-height: 160px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #64748b;
  border-radius: 6px;
}
.pm-drawer-suggest-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
.pm-drawer-suggest-row:hover {
  background: #eff6ff;
}
.pm-drawer-pick {
  max-height: 168px;
  overflow-y: auto;
  margin: 0 0 12px;
  border: 1px solid #64748b;
  border-radius: 6px;
  background: #fff;
}
.pm-drawer-pick-empty {
  margin: 0;
  padding: 8px;
  font-weight: 700;
  color: #991b1b !important;
}
.pm-drawer-pick-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 8px 10px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
.pm-drawer-pick-row:last-child {
  border-bottom: none;
}
.pm-drawer-pick-row:hover {
  background: #eff6ff;
}
.pm-drawer-pick-row.is-selected {
  background: #3949ab;
  color: #fff !important;
}
.pm-drawer-picked {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.pm-drawer-picked-name {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--erp-control-box-height, 40px);
  height: var(--erp-control-box-height, 40px);
  box-sizing: border-box;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  font-weight: 800;
  color: #000 !important;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-drawer-foot.erp-tab-actions {
  flex-shrink: 0;
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
  justify-content: flex-end;
}
/* App-shell party intake drawer — outside #content; override login-global button { width:100% } */
#bmpPartyIntakeDrawer:not([hidden]) .pm-item-create-drawer button.btn.erp-control-box {
  width: auto !important;
  max-width: none !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  padding: 0 14px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-foot.erp-tab-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px;
}
#bmpPartyIntakeDrawer:not([hidden]) button.btn.secondary.erp-control-box {
  background: #fff !important;
  color: #000 !important;
  border: var(--erp-control-box-border, 1px solid #64748b) !important;
}
#bmpPartyIntakeDrawer:not([hidden]) button.btn.primary.erp-control-box {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab !important;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-hint {
  text-align: left !important;
  margin: 0 0 10px !important;
  color: #374151 !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-ref-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 4px;
  width: 100%;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-field--grow {
  flex: 1 1 12rem;
  min-width: 0;
  margin-bottom: 10px;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-field--action {
  flex: 0 0 auto;
  width: auto !important;
  margin-bottom: 10px;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-mini-btn {
  font-size: 13px !important;
  padding: 0 10px !important;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-field--action .erp-filter-lbl-spacer {
  min-height: 2.5em;
  display: block;
}
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-field select.erp-control-box,
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-field input.erp-control-box {
  width: 100% !important;
  max-width: 100% !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}
#bmpPartyIntakeDrawer:not([hidden]) .bmp-party-ref-create {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
}
#bmpPartyIntakeDrawer:not([hidden]) .bmp-party-ref-create-lbl {
  display: block;
  margin: 0 0 6px;
  font-weight: 700 !important;
  color: #000 !important;
}
#bmpPartyIntakeDrawer:not([hidden]) .bmp-party-ref-create-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
}
#bmpPartyIntakeDrawer:not([hidden]) .bmp-party-ref-create-field {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}
#bmpPartyIntakeDrawer:not([hidden]) .bmp-party-ref-create-field .erp-control-box {
  width: 100% !important;
}
@media (max-width: 480px) {
  .pm-drawer-row {
    grid-template-columns: 1fr;
  }
  #bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-ref-row {
    flex-direction: column;
    align-items: stretch;
  }
  #bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-field--action .erp-filter-lbl-spacer {
    display: none;
  }
  #bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-mini-btn {
    width: 100% !important;
  }
}

/* Site Workspace + Basic Material Purchase V1 — control-box SSOT layout */
html.bnpl-app-active #content .sw-page {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
html.bnpl-app-active #content .sw-page--fullwidth {
  max-width: 100%;
  width: 100%;
}
html.bnpl-app-active #content .sw-page .page-title {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .sw-toolbar-unified {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
}
html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-left {
  justify-self: start;
  min-width: 0;
  font-weight: 700;
  color: #000 !important;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-center {
  justify-self: center;
  min-width: 0;
}
html.bnpl-app-active #content .sw-hub-ribbon-panel {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
}
html.bnpl-app-active #content .sw-hub-ribbon-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .sw-hub-ribbon-stack .erp-btn-segment {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  max-width: 100%;
}
html.bnpl-app-active #content .sw-hub-ribbon-main .erp-btn-segment-item,
html.bnpl-app-active #content .sw-hub-ribbon-att .erp-btn-segment-item {
  width: auto !important;
}
html.bnpl-app-active #content .sw-site-hub-body {
  margin-top: 8px;
  min-height: 96px;
}
html.bnpl-app-active #content .sw-hub-site-banner {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  color: #000 !important;
  line-height: 1.35;
  word-break: break-word;
  max-width: 720px;
}
html.bnpl-app-active #content .sw-hub-site-banner-row {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
html.bnpl-app-active #content .sw-hub-site-banner-label {
  flex: 1 1 200px;
  min-width: 0;
}
html.bnpl-app-active #content .sw-hub-site-banner-row [data-sw-change-site] {
  width: auto !important;
  flex-shrink: 0;
}
html.bnpl-app-active #content .sw-site-hub .sw-hub-sticky-wrap {
  position: sticky;
  top: var(--erp-shell-sticky-offset, 88px);
  z-index: 12;
  background: #f8fafc;
  padding-bottom: 4px;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .sw-site-hub .sw-hub-page-title {
  margin: 0 0 8px;
  max-width: 720px;
  word-break: break-word;
  line-height: 1.3;
}
html.bnpl-app-active #content .sw-hub-ribbon-att-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}
html.bnpl-app-active #content .sw-hub-ribbon-att-scroll .sw-hub-ribbon-att {
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
}
html.bnpl-app-active #content .sw-hub-body-col {
  max-width: 720px;
}
html.bnpl-app-active #content .sw-hub-att-pick-hint {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .sw-hub-recent-table-wrap {
  width: 100%;
}
html.bnpl-app-active #content .sw-hub-recent-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto auto;
  gap: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  border: var(--erp-control-box-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f1f5f9;
}
html.bnpl-app-active #content .sw-hub-recent-table-wrap .sw-hub-recent-list {
  border-radius: 0 0 6px 6px;
  border-top: none;
}
html.bnpl-app-active #content .sw-toolbar-unified.sw-hub-toolbar--ribbon {
  display: block;
  grid-template-columns: unset;
  grid-template-areas: none;
  border: none;
  background: transparent;
  padding: 0 0 6px;
  margin: 0 0 4px;
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .sw-toolbar-unified.sw-hub-toolbar--ribbon .sw-toolbar-center {
  grid-area: unset;
  justify-self: start;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .sw-hub-toolbar--ribbon .sw-hub-ribbon-stack {
  width: 100%;
  max-width: 100%;
}
/* Site Hub landing = narrow summary; embedded BMP / attendance = full ERP width */
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .sw-hub-sticky-wrap {
  position: relative;
  top: auto;
  z-index: 1;
  padding-bottom: 0;
  margin-bottom: 0;
  background: transparent;
}
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .sw-hub-page-title,
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .sw-hub-toolbar--ribbon {
  display: none !important;
}
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .sw-hub-body-col,
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .sw-site-hub-body {
  max-width: 100% !important;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
}
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn #swMaterialPurchaseHost,
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn #swAttEmbed {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .bmp-form,
html.bnpl-app-active #content.erp-bmp-content-full .sw-site-hub--embed-txn .bmp-form--fullwidth {
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .sw-hub-landing-hint {
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .sw-hub-landing-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .sw-hub-landing-actions {
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
html.bnpl-app-active #content .sw-hub-snapshot {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
html.bnpl-app-active #content .sw-hub-snap-chip {
  width: auto !important;
}
html.bnpl-app-active #content .sw-hub-recent-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .sw-hub-recent-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  overflow: hidden;
}
html.bnpl-app-active #content .sw-hub-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  text-align: left;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
html.bnpl-app-active #content .sw-hub-recent-list li:last-child .sw-hub-recent-row {
  border-bottom: none;
}
html.bnpl-app-active #content .sw-hub-recent-vno {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.bnpl-app-active #content .sw-hub-recent-meta {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.bnpl-app-active #content .sw-hub-recent-amt,
html.bnpl-app-active #content .sw-hub-recent-ws {
  font-size: 12px;
  white-space: nowrap;
}
html.bnpl-app-active #content .sw-hub-open-reg {
  margin-bottom: 10px;
}
html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-right {
  justify-self: end;
}
html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-right .erp-control-box {
  width: auto !important;
  white-space: nowrap;
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .sw-toolbar-unified.sw-hub-toolbar--ribbon {
    display: block;
    grid-template-columns: unset;
    grid-template-areas: none;
  }
  html.bnpl-app-active #content .sw-toolbar-unified.sw-hub-toolbar--ribbon .sw-toolbar-center {
    grid-area: unset;
    justify-self: start;
    width: 100%;
  }
  html.bnpl-app-active #content .sw-toolbar-unified:not(.sw-hub-toolbar--ribbon) {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "site site"
      "tabs checker";
  }
  html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-left {
    grid-area: site;
    white-space: normal;
  }
  html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-center {
    grid-area: tabs;
    justify-self: center;
  }
  html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-right {
    grid-area: checker;
  }
}
html.bnpl-app-active #content .sw-page-title {
  margin: 0 0 6px;
  flex-shrink: 0;
}
html.bnpl-app-active #content .sw-toolbar-unified {
  flex-shrink: 0;
}
html.bnpl-app-active #content .bmp-form {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-section {
  margin: 0 0 10px;
  padding: 8px 10px 10px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-section .dash-section-title {
  margin: 0 0 6px;
}
html.bnpl-app-active #content .bmp-form .erp-control-row {
  gap: 8px;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .bmp-form .erp-filter-lbl {
  min-height: 1.35em;
  line-height: 1.25;
  margin-bottom: 2px;
}
html.bnpl-app-active #content .bmp-form .erp-btn-segment {
  margin: 4px 0 8px;
}
html.bnpl-app-active #content #bmpBillType .erp-btn-segment-item {
  pointer-events: auto;
  cursor: pointer;
}
html.bnpl-app-active #content .bmp-form .erp-tab-actions {
  margin-top: 8px;
}
html.bnpl-app-active #content .bmp-lines-wrap {
  overflow-x: auto;
  margin: 0 0 8px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
@media (min-width: 721px) {
  html.bnpl-app-active #content .bmp-lines-wrap {
    overflow-x: visible;
  }
  html.bnpl-app-active #content table.bmp-lines {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-col-item {
    width: 16%;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-col-unit {
    width: 6%;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-col-qty {
    width: 6%;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-col-rate {
    width: 9%;
    min-width: 5.5em;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-col-amount,
  html.bnpl-app-active #content table.bmp-lines .bmp-col-after,
  html.bnpl-app-active #content table.bmp-lines .bmp-col-with-gst {
    width: 8%;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-col-disc,
  html.bnpl-app-active #content table.bmp-lines .bmp-col-gst {
    width: 5.5em;
    max-width: 5.5em;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-line-act-cell {
    width: 11%;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-line-rate {
    min-width: 5.5em;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-pct-field {
    width: 100%;
    min-width: 4.25em;
    max-width: 5.5em;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-calc-amount,
  html.bnpl-app-active #content table.bmp-lines .bmp-calc-after-disc,
  html.bnpl-app-active #content table.bmp-lines .bmp-calc-with-gst {
    background: #f1f5f9 !important;
    color: #000 !important;
    font-weight: 700;
  }
  html.bnpl-app-active #content .bmp-line-act-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  html.bnpl-app-active #content .bmp-line-act-stack .erp-control-box {
    width: 100%;
    font-size: 12px;
    padding-left: 6px;
    padding-right: 6px;
  }
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .bmp-lines-wrap {
    overflow-x: visible;
  }
  html.bnpl-app-active #content table.bmp-lines.bmp-lines--stack-mobile {
    min-width: 0;
  }
  html.bnpl-app-active #content table.bmp-lines.bmp-lines--stack-mobile thead {
    display: none;
  }
  html.bnpl-app-active #content table.bmp-lines.bmp-lines--stack-mobile tbody tr {
    display: block;
    border: 1px solid var(--erp-control-box-border);
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 6px;
  }
  html.bnpl-app-active #content table.bmp-lines.bmp-lines--stack-mobile tbody td {
    display: block;
    width: 100%;
    border: none;
    padding: 4px 0 6px;
  }
  html.bnpl-app-active #content table.bmp-lines.bmp-lines--stack-mobile tbody td.bmp-col-sl {
    font-weight: 800;
  }
  html.bnpl-app-active #content table.bmp-lines.bmp-lines--stack-mobile tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: #000 !important;
    font-size: 13px;
    margin-bottom: 2px;
  }
  html.bnpl-app-active #content table.bmp-lines .bmp-line-act-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
}
html.bnpl-app-active #content table.bmp-lines {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
}
html.bnpl-app-active #content table.bmp-lines th {
  text-align: left;
  font-weight: 700;
  color: #000 !important;
  padding: 6px 8px;
  border-bottom: 1px solid #cbd5e0;
  white-space: nowrap;
}
html.bnpl-app-active #content table.bmp-lines td {
  padding: 4px 6px;
  vertical-align: middle;
}
html.bnpl-app-active #content table.bmp-lines .pb-field {
  width: 100%;
  min-width: 72px;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-line-actions {
  margin: 0 0 4px;
}
html.bnpl-app-active #content .bmp-gst-status {
  margin: 0;
}
html.bnpl-app-active #content .bmp-evidence-rule {
  margin: 0 0 8px;
}
html.bnpl-app-active #content .bmp-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 4px;
}
html.bnpl-app-active #content .bmp-photo-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: 6px 8px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-photo-slot .bmp-doc-pick-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 2px solid #0f172a;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}
html.bnpl-app-active #content .bmp-photo-slot .bmp-doc-pick-menu.is-open {
  display: flex;
}
html.bnpl-app-active #content .bmp-photo-slot .bmp-doc-pick-menu .erp-doc-pick {
  width: 100%;
  min-height: 40px;
  height: 40px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .bmp-photo-slot-done {
  background: #f0fdf4;
  border-color: #86efac;
}
html.bnpl-app-active #content .bmp-doc-preview-cap {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: #000 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
html.bnpl-app-active #content .bmp-slot-preview {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  min-height: 72px;
  max-height: 120px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 6px;
  cursor: pointer;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-slot-preview--pdf {
  flex-direction: column;
  padding: 6px;
  gap: 2px;
}
html.bnpl-app-active #content .bmp-slot-preview-img {
  width: 100%;
  max-height: 118px;
  object-fit: contain;
}
html.bnpl-app-active #content .bmp-photo-slot-label {
  font-weight: 700;
  color: #000 !important;
  font-size: 13px;
  line-height: 1.35;
}
html.bnpl-app-active #content .sw-gst-panel.bmp-section {
  margin-top: 20px;
}
html.bnpl-app-active #content .bmp-gst-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
html.bnpl-app-active #content .bmp-gst-list li {
  margin: 0 0 6px;
}
@media (max-width: 640px) {
  html.bnpl-app-active #content .bmp-photo-grid {
    grid-template-columns: 1fr 1fr;
  }
}
/*
 * Site Workspace freeze panes (Owner UAT):
 * Top (title + tabs) and bottom (GST strip + ERP footer + left nav) stay put.
 * Only the middle (register grid / long form) scrolls.
 */
html.bnpl-app-active #content.erp-bmp-content-full {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden !important;
}
html.bnpl-app-active #content.erp-bmp-content-full .sw-page,
html.bnpl-app-active #content.erp-bmp-content-full .sw-page--fullwidth {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
html.bnpl-app-active #content.erp-bmp-content-full .bmp-form--fullwidth {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content.erp-bmp-content-full #swMaterialPurchaseHost {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
html.bnpl-app-active #content.erp-bmp-content-full #swMaterialPurchaseHost:has(.bmp-reg-shell),
html.bnpl-app-active #content.erp-bmp-content-full #swMaterialPurchaseHost:has(.bmp-gst-follow) {
  overflow: hidden;
}
html.bnpl-app-active #content.erp-bmp-content-full #swGstPendingHost {
  display: none;
}
html.bnpl-app-active #content.erp-bmp-content-full .bmp-form--register,
html.bnpl-app-active #content.erp-bmp-content-full .bmp-form--gst-route,
html.bnpl-app-active #content.erp-bmp-content-full .bmp-form:has(.bmp-reg-shell),
html.bnpl-app-active #content.erp-bmp-content-full .bmp-form:has(.bmp-gst-follow),
html.bnpl-app-active #content.erp-bmp-content-full .bmp-reg-shell,
html.bnpl-app-active #content.erp-bmp-content-full .bmp-gst-follow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 100%;
}
html.bnpl-app-active #content.erp-bmp-content-full #bmpRegisterBody,
html.bnpl-app-active #content.erp-bmp-content-full #bmpGstFollowBody {
  flex: 1 1 auto;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  overflow: auto;
  max-width: 100%;
}
html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-center .erp-btn-segment,
html.bnpl-app-active #content .sw-toolbar-unified .sw-toolbar-center .bmp-transaction-ribbon {
  pointer-events: auto;
}
html.bnpl-app-active #content .bmp-section--compact {
  margin: 0 0 8px;
  padding: 6px 10px 8px;
}
html.bnpl-app-active #content .bmp-header-row {
  display: grid;
  grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  width: 100%;
}
html.bnpl-app-active #content .bmp-header-row .bmp-field-party {
  min-width: 0;
}
html.bnpl-app-active #content .bmp-bill-invoice-row {
  flex-wrap: wrap;
  width: 100%;
}
html.bnpl-app-active #content .bmp-bill-type-row {
  margin: 0 0 6px;
}
html.bnpl-app-active #content .bmp-ocr-panel--compact {
  margin: 6px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--erp-control-box-border, #64748b);
  border-radius: 6px;
  background: #f8fafc;
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-ocr-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
html.bnpl-app-active #content .bmp-ocr-compact-title {
  font-weight: 700;
  color: #1f2937 !important;
  font-size: 14px;
}
html.bnpl-app-active #content .bmp-ocr-confirmed {
  font-weight: 700;
  color: #166534 !important;
  font-size: 12px;
}
html.bnpl-app-active #content .bmp-ocr-panel--verified {
  border: 2px solid #16a34a !important;
  background: #ecfdf5 !important;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15);
}
html.bnpl-app-active #content .bmp-ocr-panel--verified .bmp-ocr-compact-title {
  font-size: 15px;
  font-weight: 800;
  color: #14532d !important;
}
html.bnpl-app-active #content .bmp-ocr-confirmed-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #16a34a;
  background: #dcfce7;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: #14532d !important;
  -webkit-text-fill-color: #14532d !important;
}
html.bnpl-app-active #content .bmp-ocr-panel--verified .bmp-ocr-chip-box {
  border-color: #86efac;
  background: #f0fdf4;
}
html.bnpl-app-active #content .bmp-ocr-verified-btn.bmp-ocr-verified-btn--done {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  opacity: 1 !important;
  cursor: default;
  min-width: 7.5rem;
}
html.bnpl-app-active #content .bmp-ocr-verified-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--erp-control-box-height, 40px);
  padding: 0 14px;
  border-radius: 6px;
  border: 2px solid #16a34a;
  background: #16a34a;
  color: #fff !important;
  font-weight: 800;
  font-size: 14px;
  box-sizing: border-box;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-panel--verified {
  border: 2px solid #16a34a !important;
  background: #ecfdf5 !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-confirmed-badge {
  font-size: 14px;
  font-weight: 800;
  color: #14532d !important;
}
html.bnpl-app-active #content .bmp-ocr-panel-body.erp-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
}
html.bnpl-app-active #content .bmp-ocr-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 16rem;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
@media (max-width: 1100px) {
  html.bnpl-app-active #content .bmp-ocr-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .bmp-ocr-panel-body.erp-control-row {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  html.bnpl-app-active #content .bmp-ocr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.bnpl-app-active #content .bmp-ocr-act {
    justify-self: end;
  }
}
@media (max-width: 420px) {
  html.bnpl-app-active #content .bmp-ocr-grid {
    grid-template-columns: 1fr;
  }
}
html.bnpl-app-active #content .bmp-ocr-chip.erp-filter-field {
  margin: 0;
  min-width: 0;
  text-align: center;
}
html.bnpl-app-active #content .bmp-ocr-chip-box {
  box-sizing: border-box;
  min-height: 4.75rem;
  padding: 6px 8px 8px;
  border: 1px solid var(--erp-control-box-border, #64748b);
  border-radius: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  height: 100%;
  text-align: center;
}
html.bnpl-app-active #content .bmp-ocr-chip-lbl.erp-filter-lbl {
  font-weight: 700;
  color: #111827 !important;
  font-size: 12px;
  line-height: 1.25;
  min-height: 0;
  margin: 0;
  width: 100%;
  text-align: center;
  display: block;
}
html.bnpl-app-active #content .bmp-ocr-chip-val {
  font-weight: 700;
  color: #000000 !important;
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
  width: 100%;
  text-align: center;
  display: block;
}
html.bnpl-app-active #content .bmp-ocr-chip-pct {
  font-weight: 700;
  color: #000 !important;
  font-size: 12px;
  line-height: 1.2;
  width: 100%;
  text-align: center;
  display: block;
  margin: 0;
}
html.bnpl-app-active #content .bmp-ocr-act {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
html.bnpl-app-active #content .bmp-ocr-panel--compact .bmp-ocr-chip-box span {
  color: #111827 !important;
}
html.bnpl-app-active #content .bmp-ocr-panel--compact .bmp-ocr-chip-val {
  color: #000000 !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-panel-body.erp-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-chip-lbl.erp-filter-lbl,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-chip-val,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-chip-pct {
  font-weight: 700 !important;
  text-align: center !important;
  display: block !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-chip-val {
  color: #000000 !important;
  font-size: 15px !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-chip-lbl.erp-filter-lbl {
  color: #111827 !important;
  font-size: 12px !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-chip-pct {
  color: #000 !important;
  font-size: 12px !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-ocr-act {
  align-self: center;
}
html.bnpl-app-active #content .bmp-remarks-field {
  width: 100%;
  display: block;
}
html.bnpl-app-active #content .bmp-totals-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  align-items: end;
}
html.bnpl-app-active #content .bmp-totals-row .bmp-net-field input {
  font-weight: 700;
  background: #eef2ff !important;
}
html.bnpl-app-active #content table.bmp-lines .bmp-num .pb-field,
html.bnpl-app-active #content table.bmp-lines th.bmp-num {
  text-align: right;
}
html.bnpl-app-active #content table.bmp-lines .bmp-col-rate .pb-field {
  text-align: right;
  min-width: 5.5em;
}
html.bnpl-app-active #content .bmp-ledger-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background: #f8fafc;
}
html.bnpl-app-active #content .bmp-ledger-compact-lbl {
  font-weight: 700;
  color: #000 !important;
  font-size: 13px;
}
html.bnpl-app-active #content .bmp-ledger-chip {
  font-size: 13px;
  font-weight: 600;
  color: #000 !important;
}
html.bnpl-app-active #content .sw-gst-panel.bmp-section {
  margin-top: 10px;
  padding: 6px 10px 8px;
}
html.bnpl-app-active #content .bmp-gst-compact-head {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
html.bnpl-app-active #content .bmp-gst-compact-title {
  margin: 0;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .bmp-gst-seg {
  margin: 0;
  flex: 1 1 auto;
}
html.bnpl-app-active #content .bmp-gst-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 6px;
}
html.bnpl-app-active #content .bmp-gst-chip {
  font-weight: 700;
  color: #000 !important;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e2e8f0;
}
html.bnpl-app-active #content .bmp-gst-list--compact {
  max-height: 220px;
  overflow-y: auto;
}
html.bnpl-app-active #content .bmp-gst-list--compact .erp-control-box {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}
@media (min-width: 992px) {
  html.bnpl-app-active #content .bmp-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 991px) {
  html.bnpl-app-active #content .bmp-totals-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.bnpl-app-active #content .bmp-header-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .bmp-totals-row {
    grid-template-columns: 1fr;
  }
}
/* BMP — OnSite-style voucher sheet */
html.bnpl-app-active #content .bmp-voucher-sheet {
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-voucher-head {
  border-bottom: 2px solid #3949ab;
  margin: 0 0 6px;
  padding: 0 0 4px;
}
html.bnpl-app-active #content .bmp-voucher-head-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 4px;
  min-height: 36px;
}
html.bnpl-app-active #content .bmp-voucher-head-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  justify-content: flex-end;
  margin: 0;
  flex: 0 0 auto;
  z-index: 1;
}
html.bnpl-app-active #content .bmp-voucher-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #000 !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
html.bnpl-app-active #content .bmp-voucher-meta {
  display: grid;
  grid-template-columns: minmax(14rem, 2.6fr) minmax(9.5rem, auto) auto;
  align-items: flex-end;
  gap: 6px;
}
html.bnpl-app-active #content .bmp-voucher-meta .erp-filter-field {
  min-width: 0;
  max-width: 100%;
}
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-ref {
  grid-column: 1;
  min-width: 14rem;
}
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-ref .bmp-ref-input {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-width: 0;
  width: 100%;
}
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-date {
  grid-column: 2;
  width: 100%;
  max-width: 10.5rem;
  justify-self: end;
}
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-dl {
  grid-column: 3;
}
html.bnpl-app-active #content .bmp-field-party--mismatch .erp-filter-lbl {
  color: #991b1b !important;
  font-weight: 700;
}
html.bnpl-app-active #content .bmp-field-party--mismatch select.pb-field,
html.bnpl-app-active #content .bmp-field-party--mismatch select.erp-control-box {
  border-color: #991b1b !important;
  box-shadow: 0 0 0 1px #991b1b;
}
html.bnpl-app-active #content .bmp-party-mismatch-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-new-party,
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-dl {
  flex: 0 0 auto;
  width: auto;
}
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-new-party .erp-control-box,
html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-dl .erp-control-box {
  width: auto !important;
  white-space: nowrap;
}
html.bnpl-app-active #content .bmp-photo-evidence-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}
html.bnpl-app-active #content .bmp-photo-evidence-links .erp-doc-evidence-link {
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  width: 100% !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border: var(--erp-control-box-border, 1px solid #64748b) !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content .bmp-photo-loc-links {
  margin-top: 6px;
  gap: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}
@media (max-width: 520px) {
  html.bnpl-app-active #content .bmp-photo-evidence-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
html.bnpl-app-active #content .bmp-photo-loc-links .staff-a1-punch-loc-link,
html.bnpl-app-active #content .bmp-photo-loc-links .bmp-loc-chip {
  width: auto !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border: var(--erp-control-box-border, 1px solid #64748b) !important;
  color: #000 !important;
  background: #fff !important;
}
.bmp-evidence-loc-bar {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  gap: 8px;
}
.bmp-evidence-loc-bar .staff-a1-punch-loc-link,
.bmp-evidence-loc-bar .bmp-loc-chip {
  width: auto !important;
  min-height: 40px !important;
  height: 40px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.erp-att-punch-preview-modal .bmp-evidence-loc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}
html.bnpl-app-active #content .bmp-doc-preview--pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  min-height: 120px;
  background: #f8fafc;
}
html.bnpl-app-active #content .bmp-doc-preview-pdf-lbl {
  font-weight: 800;
  color: #000 !important;
  font-size: 13px;
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .bmp-voucher-meta {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, auto);
  }
  html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-ref {
    grid-column: 1;
  }
  html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-date {
    grid-column: 2;
    justify-self: stretch;
    max-width: none;
  }
  html.bnpl-app-active #content .bmp-voucher-meta .bmp-field-dl {
    grid-column: auto;
  }
}
html.bnpl-app-active #content .bmp-voucher-ref {
  font-weight: 700;
  color: #000 !important;
  font-size: 13px;
  flex: 1 1 12rem;
}
html.bnpl-app-active #content .bmp-voucher-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 10px;
}
html.bnpl-app-active #content .bmp-party-col {
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 4.5em;
  background: #fafafa;
  overflow: visible;
}
html.bnpl-app-active #content .bmp-bill-from-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 8px;
  width: 100%;
}
html.bnpl-app-active #content .bmp-bill-from-pick .bmp-field-party,
html.bnpl-app-active #content .bmp-bill-from-pick .bmp-field-party-search {
  flex: 1 1 9rem;
  min-width: 0;
  max-width: none;
  position: relative;
}
html.bnpl-app-active #content .bmp-bill-from-pick .bmp-field-new-party {
  flex: 0 0 auto;
  width: auto;
}
html.bnpl-app-active #content .bmp-bill-from-pick #bmpParty,
html.bnpl-app-active #content .bmp-bill-from-pick #bmpPartySearch {
  width: 100%;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  text-align: left;
}
html.bnpl-app-active #content .bmp-bill-from-pick #bmpNewParty {
  height: var(--erp-control-box-height, 40px) !important;
  width: auto !important;
  white-space: nowrap;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .bmp-party-suggest,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-party-suggest,
html.bnpl-app-active .bmp-party-suggest--portal {
  position: fixed;
  z-index: 10070;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #64748b;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
html.bnpl-app-active .bmp-item-suggest--portal[hidden],
html.bnpl-app-active .bmp-party-suggest--portal[hidden] {
  display: none !important;
  pointer-events: none !important;
}
html.bnpl-app-active #swMaterialPurchaseHost .bmp-bill-from-pick #bmpParty,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-bill-from-pick #bmpPartySearch {
  width: 100%;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  pointer-events: auto !important;
}
html.bnpl-app-active #content .bmp-party-suggest-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
html.bnpl-app-active #content .bmp-party-suggest-row:hover {
  background: #eff6ff;
}
html.bnpl-app-active #content .bmp-party-suggest-empty {
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .bmp-party-addr {
  font-weight: 700;
  color: #000 !important;
  font-size: 13px;
  line-height: 1.35;
}
html.bnpl-app-active #content .bmp-party-lbl {
  font-weight: 800;
  color: #000 !important;
  font-size: 12px;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .bmp-party-body {
  font-weight: 600;
  color: #000 !important;
  font-size: 13px;
  line-height: 1.35;
}
html.bnpl-app-active #content .bmp-party-hint {
  font-weight: 600;
  color: #64748b !important;
}
html.bnpl-app-active #content table.bmp-lines .bmp-col-sl {
  width: 2.5em;
  text-align: center;
  font-weight: 800;
}
html.bnpl-app-active #content .bmp-reg-act .erp-control-box {
  font-size: 12px;
  padding-left: 8px;
  padding-right: 8px;
}
html.bnpl-app-active #content .bmp-register-v2-wrap .pl-table--register th,
html.bnpl-app-active #content .bmp-register-v2-wrap .pl-table--register td {
  font-size: 12px;
  vertical-align: middle;
}
html.bnpl-app-active .erp-vch-print-overlay {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  flex-direction: column;
  background: #e5e7eb;
  box-sizing: border-box;
}
html.bnpl-app-active .erp-vch-print-overlay-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
html.bnpl-app-active .erp-vch-print-overlay-bar.erp-vch-print-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--erp-control-box-border-color);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active .erp-vch-print-overlay-bar.erp-vch-print-toolbar .erp-control-box,
html.bnpl-app-active .erp-vch-print-overlay-bar.erp-vch-print-toolbar button {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto;
  min-width: 88px;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-rd-hint {
  flex: 0 0 auto;
  margin: 0 auto;
  padding: 8px 16px 10px;
  width: 100%;
  max-width: min(210mm, 100vw);
  box-sizing: border-box;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-rd-page {
  width: 210mm;
  max-width: calc(100vw - 16px);
  min-height: 0;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: visible;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  flex: 0 0 auto;
}
html.bnpl-app-active .erp-vch-print-overlay.erp-vch-print-overlay--landscape .erp-rd-page {
  width: 297mm;
  max-width: calc(100vw - 16px);
}
html.bnpl-app-active .erp-vch-print-overlay.erp-vch-print-overlay--landscape .erp-rd-hint {
  max-width: min(297mm, 100vw);
}
html.bnpl-app-active .erp-vch-print-overlay.erp-vch-print-overlay--landscape .erp-vch-paper--landscape-a4 {
  padding: 14mm 10mm 8mm 12mm !important;
  max-width: 297mm;
}
html.bnpl-app-active .erp-vch-print-overlay.erp-vch-print-overlay--landscape .erp-vch-meta-row--r1 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px;
  width: 100%;
}
html.bnpl-app-active .erp-vch-print-overlay.erp-vch-print-overlay--landscape .erp-vch-meta-row--r1 .erp-vch-meta-box-loose {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none !important;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
html.bnpl-app-active .erp-vch-print-overlay-bar.erp-vch-print-toolbar .erp-rd-bar-actions {
  margin-left: auto;
  flex: 0 0 auto;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-paper {
  padding: var(--erp-a4-margin-top) var(--erp-a4-margin-right) var(--erp-a4-margin-bottom)
    var(--erp-a4-binding-left) !important;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta {
  width: 100%;
  table-layout: fixed;
  margin: 0 0 10px;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta col.erp-vch-meta-lbl {
  width: 22%;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta col.erp-vch-meta-val {
  width: 28%;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta th,
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta td {
  font-size: 11px;
  padding: 8px 10px;
  vertical-align: top;
  line-height: 1.4;
  min-height: 34px;
  box-sizing: border-box;
  overflow: visible;
  border: 1px solid #64748b;
  color: #000 !important;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta th {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-weight: 800;
  background: #f8fafc;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-meta td {
  font-weight: 700;
  background: #fff;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines-wrap {
  overflow-x: visible;
  margin: 0 0 8px;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  table-layout: fixed;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-sn { width: 5%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-item { width: 21%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-qty { width: 8%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-unit { width: 7%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-rate { width: 9%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-disc { width: 10%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-gst { width: 8%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-c-amt { width: 14%; }
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines th,
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines td {
  font-size: 10px;
  padding: 5px 3px;
  color: #000 !important;
  word-break: break-word;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines th {
  background: #3949AB;
  color: #fff !important;
  line-height: 1.2;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines th.erp-vch-th-narrow {
  font-size: 10px;
  padding: 5px 4px;
  white-space: nowrap;
  letter-spacing: 0;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-lines .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-foot-lbl {
  text-align: right;
  font-size: 10px;
  padding-right: 4px;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-foot-val {
  min-width: 0 !important;
  width: 14%;
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-foot-words {
  font-size: 10px;
  text-align: left;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-signoff {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  max-width: 100%;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-sign-lbl,
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-sign-val {
  font-size: 10px;
  color: #000 !important;
  word-break: break-word;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-narr {
  font-size: 11px;
  color: #000 !important;
}
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-doctype,
html.bnpl-app-active .erp-vch-print-overlay .erp-vch-letterhead-name {
  color: #000 !important;
}
html.bnpl-app-active .erp-vch-print-overlay-bar {
  flex: 0 0 auto;
}
@media print {
  html.bnpl-app-active .erp-vch-print-overlay .erp-vch-paper {
    padding: 10mm 8mm 12mm 14mm;
  }
  html.bnpl-app-active .erp-vch-print-overlay .erp-rd-page {
    max-width: none;
    width: 100%;
    overflow: visible;
  }
  html.bnpl-app-active .erp-vch-print-overlay-scroll {
    overflow: visible;
    padding: 0;
  }
}
@media print {
  html.bnpl-app-active body.erp-vch-print-active > *:not(.erp-vch-print-overlay) {
    display: none !important;
  }
  html.bnpl-app-active body.erp-vch-print-active .erp-vch-print-overlay {
    position: static;
    inset: auto;
    display: block;
    background: #fff;
  }
  html.bnpl-app-active body.erp-vch-print-active .erp-vch-print-overlay-bar,
  html.bnpl-app-active body.erp-vch-print-active .erp-vch-print-overlay .erp-rd-hint {
    display: none !important;
  }
  html.bnpl-app-active body.erp-vch-print-active .erp-vch-print-overlay-scroll {
    overflow: visible;
    padding: 0;
  }
  html.bnpl-app-active body.erp-vch-print-active .erp-vch-print-overlay .erp-rd-page {
    box-shadow: none;
    max-width: none;
    width: 100%;
  }
  html.bnpl-app-active body.erp-vch-print-active .erp-vch-paper--landscape-a4 {
    page: erp-vch-landscape;
  }
}
@page erp-vch-landscape {
  size: A4 landscape;
  margin: 14mm 10mm 8mm 12mm;
}
@media print {
  html.bnpl-app-active:has(#bmpRegDetailModal:not([hidden])) body > *:not(#bmpRegDetailModal) {
    display: none !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) {
    position: static !important;
    inset: auto !important;
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .bmp-reg-detail-backdrop,
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .bmp-reg-detail-chrome,
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) #bmpRegDetailCheckerBar,
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .bmp-reg-checker-only,
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .bmp-reg-detail-flags {
    display: none !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .bmp-reg-detail-panel {
    display: block !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .bmp-reg-detail-panel {
    max-width: none !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) #bmpRegDetailBody {
    overflow: visible !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .erp-vch-paper {
    padding: 8mm 10mm 10mm 12mm !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .erp-vch-paper--landscape-a4 {
    page: erp-vch-landscape;
    max-width: none !important;
    width: 100% !important;
  }
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .erp-vch-lines tbody td:nth-child(4),
  html.bnpl-app-active #bmpRegDetailModal:not([hidden]) .erp-vch-lines tbody td:nth-child(5) {
    min-width: 48px;
  }
}
html.bnpl-app-active .bmp-reg-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: #e5e7eb;
}
html.bnpl-app-active .bmp-reg-detail-modal[hidden] {
  display: none !important;
}
html.bnpl-app-active .bmp-reg-detail-backdrop {
  position: absolute;
  inset: 0;
  background: #e5e7eb;
}
html.bnpl-app-active .bmp-reg-detail-panel {
  position: relative;
  width: min(210mm, calc(100vw - 32px));
  min-width: min(210mm, calc(100vw - 32px));
  max-width: min(210mm, calc(100vw - 32px));
  height: auto;
  max-height: 92vh;
  flex: none;
  align-self: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px 16px;
  box-sizing: border-box;
  border: 1px solid var(--erp-control-box-border, #cbd5e0);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
html.bnpl-app-active #bmpRegDetailBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
html.bnpl-app-active .bmp-reg-detail-chrome {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
html.bnpl-app-active .bmp-vch-letterhead-host {
  display: none !important;
}
/* Register View Details (16-Oct complete): company logo + name + PURCHASE VOUCHER row */
html.bnpl-app-active .bmp-reg-detail-modal .bmp-vch-letterhead-host {
  display: block !important;
  margin: 0 0 10px;
  width: 100%;
  min-width: 0;
}
html.bnpl-app-active .bmp-reg-detail-modal .bmp-vch-letterhead-host:not(:empty) ~ .bmp-reg-detail-head h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
html.bnpl-app-active .erp-vch-letterhead {
  display: block;
  min-height: 36px;
  width: 100%;
  min-width: 0;
}
html.bnpl-app-active .erp-vch-head-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
html.bnpl-app-active .erp-vch-head-row.erp-vch-head-row--land-one-line {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 6px;
  padding: 0 0 6px;
  border-bottom: 2px solid #000;
}
html.bnpl-app-active .erp-vch-head-row--land-one-line .erp-vch-head-left {
  display: flex;
  flex: 0 1 32%;
  max-width: 32%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
html.bnpl-app-active .erp-vch-head-row--land-one-line .erp-vch-head-left .erp-vch-letterhead-name {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal !important;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
}
html.bnpl-app-active .erp-vch-head-row--land-one-line .erp-vch-doctype--land-center {
  flex: 1 1 auto;
  text-align: center !important;
  white-space: nowrap;
  font-size: 16px;
}
html.bnpl-app-active .erp-vch-head-row--land-one-line .erp-vch-head-id-col {
  flex: 0 0 auto;
  text-align: right;
}
html.bnpl-app-active .erp-vch-head-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
html.bnpl-app-active .erp-vch-logo {
  height: 36px;
  max-width: 96px;
  object-fit: contain;
  flex: 0 0 auto;
}
html.bnpl-app-active .erp-vch-initials {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a237e;
  color: #fff !important;
  font-weight: 800;
  border-radius: 6px;
  font-size: 13px;
  flex: 0 0 auto;
}
html.bnpl-app-active .erp-vch-letterhead-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #000 !important;
  min-width: 0;
  white-space: nowrap;
}
html.bnpl-app-active .bmp-reg-detail-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  flex: 0 0 auto;
}
html.bnpl-app-active .bmp-reg-detail-head h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  color: #000 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.bnpl-app-active .bmp-reg-detail-head .erp-control-box {
  width: auto !important;
  flex: 0 0 auto;
}
html.bnpl-app-active .bmp-reg-detail-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-paper {
  padding: 8px 12px 8px 18mm;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-paper-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-paper-title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-id {
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-letterhead {
  display: block;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-head-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-head-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-doctype {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  color: #000 !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
  table-layout: fixed;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta col.erp-vch-meta-lbl {
  width: 22%;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta col.erp-vch-meta-val {
  width: 28%;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta th,
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta td {
  border: 1px solid #64748b;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.35;
  vertical-align: middle;
  color: #000 !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta th {
  font-weight: 800;
  background: #f8fafc;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc .bmp-reg-detail-head h3 {
  display: none;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc .bmp-vch-letterhead-host {
  display: none !important;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc .bmp-reg-detail-panel {
  width: min(297mm, calc(100vw - 16px));
  min-width: 0;
  max-width: min(297mm, calc(100vw - 16px));
  padding: 0;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc .bmp-reg-roundoff-tick {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
  height: 40px;
  margin: 0;
  white-space: nowrap;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc .bmp-reg-roundoff-tick input {
  width: 16px;
  height: 16px;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-paper--landscape-a4 {
  max-width: 297mm;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc .bmp-reg-detail-chrome {
  padding: 10px 12px 0;
  flex: 0 0 auto;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-paper:not(.erp-vch-paper--landscape-a4) {
  padding: var(--erp-a4-margin-top) var(--erp-a4-margin-right) var(--erp-a4-margin-bottom)
    var(--erp-a4-binding-left);
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-paper--landscape-a4 {
  padding: var(--erp-a4-margin-top) var(--erp-a4-margin-right) var(--erp-a4-margin-bottom)
    var(--erp-a4-binding-left);
  width: 100%;
  max-width: 297mm;
  margin: 0 auto;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-lines-wrap {
  overflow-x: visible;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-lines {
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-meta th,
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-meta td {
  vertical-align: top;
  padding: 8px 10px;
  min-height: 34px;
  line-height: 1.4;
  box-sizing: border-box;
  overflow: visible;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-letterhead-name {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
html.bnpl-app-active .bmp-reg-detail-modal.bmp-reg-detail--voucher-doc #bmpRegDetailBody .erp-vch-lines .num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta td {
  font-weight: 700;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-meta td {
  font-weight: 400;
  background: #fff;
  word-break: break-word;
  overflow-wrap: anywhere;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 8px;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
  empty-cells: show;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines th,
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines td {
  border: 1px solid #64748b;
  padding: 6px 5px;
  font-size: 11px;
  color: #000 !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines td {
  font-weight: 400;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines th {
  background: #3949AB;
  color: #fff !important;
  text-align: center;
  line-height: 1.25;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines th.erp-vch-th-narrow {
  white-space: nowrap;
  font-size: 10px;
  padding: 5px 4px;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines .num {
  text-align: right;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-lines tfoot td {
  background: #f8fafc;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-foot-lbl {
  text-align: right;
  white-space: normal;
  padding-right: 8px;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-foot-val {
  white-space: nowrap;
  min-width: 9em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-foot-words {
  text-align: left;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-narr,
html.bnpl-app-active #bmpRegDetailBody .erp-vch-proofs,
html.bnpl-app-active #bmpRegDetailBody .erp-vch-sys {
  margin: 8px 0;
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-narr p {
  margin: 4px 0 0;
  padding: 8px;
  border: 1px solid #333;
  min-height: 40px;
  box-sizing: border-box;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-proofs,
html.bnpl-app-active #bmpRegDetailBody .erp-vch-proof-row {
  display: none !important;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-signoff {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-sign-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #000 !important;
  margin: 0 0 4px;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-sign-val {
  font-size: 12px;
  font-weight: 400;
  color: #000 !important;
  white-space: normal;
  word-break: break-word;
}
html.bnpl-app-active #bmpRegDetailBody .erp-vch-empty {
  color: #991b1b !important;
  font-weight: 800;
}
html.bnpl-app-active .bmp-reg-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: end;
  width: 100%;
  min-width: 0;
  margin-bottom: 12px;
}
html.bnpl-app-active .bmp-reg-meta-field {
  min-width: 0 !important;
  width: auto;
  max-width: 100%;
  overflow: hidden;
}
html.bnpl-app-active .bmp-reg-meta-field .erp-filter-lbl {
  white-space: normal;
}
html.bnpl-app-active #bmpRegDetailBody .bmp-reg-meta-field input.bmp-reg-meta-val,
html.bnpl-app-active .bmp-reg-meta-field input.bmp-reg-meta-val,
html.bnpl-app-active .bmp-reg-meta-field input.erp-control-box {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: var(--erp-control-box-height, 40px) !important;
  max-height: var(--erp-control-box-height, 40px) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
html.bnpl-app-active .bmp-reg-meta-pill {
  display: flex;
  align-items: center;
  min-height: var(--erp-control-box-height, 40px);
  padding: 0 8px;
  border: 1px solid var(--erp-control-box-border, #cbd5e0);
  border-radius: 6px;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-reg-detail-proofs {
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
html.bnpl-app-active .bmp-reg-detail-proofs .erp-control-box {
  width: auto !important;
}
html.bnpl-app-active .bmp-reg-detail-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: start;
  gap: 12px 16px;
  margin-top: 4px;
}
html.bnpl-app-active .bmp-reg-detail-body-grid--no-lines {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}
html.bnpl-app-active .bmp-reg-detail-main {
  min-width: 0;
}
html.bnpl-app-active .bmp-reg-detail-aside {
  min-width: 0;
  max-width: none;
  margin-left: 0;
}
html.bnpl-app-active .bmp-vch-narration {
  margin-top: 12px;
}
html.bnpl-app-active .bmp-vch-narration p {
  margin: 0;
  min-height: var(--erp-control-box-height, 40px);
  padding: 8px 10px;
  border: 1px solid var(--erp-control-box-border, #cbd5e0);
  border-radius: 6px;
  box-sizing: border-box;
  font-weight: 700;
  color: #000 !important;
  white-space: pre-wrap;
}
html.bnpl-app-active .bmp-vch-creator {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
  color: #000 !important;
  font-size: 12px;
}
html.bnpl-app-active .bmp-reg-detail-subhead {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active .bmp-reg-detail-body-grid .bmp-voucher-summary {
  margin: 0;
  padding-top: 0;
  border-top: none;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active .bmp-reg-detail-summary .bmp-voucher-summary-table {
  max-width: 100%;
}
html.bnpl-app-active .bmp-reg-lines-table {
  width: 100%;
  table-layout: auto;
}
html.bnpl-app-active .bmp-reg-lines-table th,
html.bnpl-app-active .bmp-reg-lines-table td {
  font-weight: 700;
  color: #000 !important;
  font-size: 12px;
  white-space: nowrap;
  vertical-align: middle;
  padding: 6px 8px;
}
html.bnpl-app-active .bmp-reg-lines-table th:first-child,
html.bnpl-app-active .bmp-reg-lines-table td:first-child {
  width: auto;
  white-space: normal;
  min-width: 10rem;
}
html.bnpl-app-active .bmp-reg-lines-table th:not(:first-child),
html.bnpl-app-active .bmp-reg-lines-table td:not(:first-child) {
  width: 1%;
}
html.bnpl-app-active .bmp-reg-detail-lines--form-parity {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
html.bnpl-app-active .bmp-reg-lines-table--form-parity {
  min-width: 72rem;
  width: 100%;
  table-layout: auto;
}
html.bnpl-app-active .bmp-reg-lines-table--form-parity th,
html.bnpl-app-active .bmp-reg-lines-table--form-parity td {
  white-space: nowrap;
  width: auto !important;
  min-width: 0;
}
html.bnpl-app-active .bmp-reg-lines-table--form-parity th:nth-child(2),
html.bnpl-app-active .bmp-reg-lines-table--form-parity td:nth-child(2) {
  white-space: normal;
  min-width: 9rem;
}
html.bnpl-app-active .bmp-reg-lines-table--form-parity tfoot .bmp-foot-lbl,
html.bnpl-app-active .bmp-reg-lines-table--form-parity tfoot .bmp-foot-val {
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active .bmp-reg-detail-lines {
  max-height: min(40vh, 22rem);
  overflow: auto;
}
html.bnpl-app-active .bmp-reg-detail-flags {
  margin: 8px 0 0;
}
html.bnpl-app-active .bmp-reg-remarks-wrap {
  margin: 0 0 12px;
}
html.bnpl-app-active .bmp-reg-remarks-table th,
html.bnpl-app-active .bmp-reg-remarks-table td {
  font-weight: 700;
  color: #000 !important;
  vertical-align: top;
}
html.bnpl-app-active .bmp-reg-pass-done {
  font-weight: 700;
  color: #000 !important;
  margin: 0 0 10px;
}
html.bnpl-app-active .bmp-reg-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 100%;
}
html.bnpl-app-active .bmp-gst-follow-hint {
  margin: 0 0 8px;
  font-weight: 700;
  color: #000 !important;
  flex-shrink: 0;
}
html.bnpl-app-active .bmp-gst-follow-bar {
  flex-shrink: 0;
  margin: 0 0 10px;
  align-items: flex-end;
}
html.bnpl-app-active .bmp-gst-follow-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto !important;
  min-width: 7.5rem;
  height: auto !important;
  min-height: var(--erp-control-box-height, 40px);
  padding: 4px 10px;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-gst-follow-table-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  max-width: 100%;
}
html.bnpl-app-active #bmpRegTableHost,
html.bnpl-app-active #bmpRegTableHost .bmp-reg-register,
html.bnpl-app-active #bmpRegTableHost .pl-pane-inner {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html.bnpl-app-active .bmp-reg-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(8.5rem, 1fr));
  gap: 8px;
  margin: 0 0 10px;
  align-items: stretch;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  html.bnpl-app-active .bmp-reg-kpi-row {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  }
}
html.bnpl-app-active .bmp-reg-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto !important;
  min-width: 0;
  flex: 0 0 auto;
  max-width: none;
  height: auto !important;
  min-height: var(--erp-control-box-height, 40px);
  padding: 4px 10px;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-reg-kpi-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.2;
  white-space: normal;
  min-height: 2.5em;
}
html.bnpl-app-active .bmp-reg-kpi-val {
  font-size: 16px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active .bmp-reg-filters {
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  flex-shrink: 0;
}
html.bnpl-app-active .bmp-reg-filters .erp-filter-field {
  flex: 0 0 auto;
  width: auto;
  min-width: 8rem;
  max-width: 14rem;
}
html.bnpl-app-active .bmp-reg-filters .erp-filter-field .erp-control-box,
html.bnpl-app-active .bmp-reg-filters .erp-filter-field .pb-field {
  width: auto !important;
  min-width: 8rem;
}
html.bnpl-app-active .bmp-reg-proof-pair {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
html.bnpl-app-active .bmp-reg-proof--icon {
  width: auto !important;
  min-width: 40px;
  padding: 0 8px;
}
html.bnpl-app-active .bmp-reg-proof-ico {
  display: inline-block;
  width: 14px;
  height: 16px;
  border: 2px solid #000;
  border-radius: 2px;
  box-sizing: border-box;
  vertical-align: middle;
}
html.bnpl-app-active .bmp-reg-proof-ico--bill {
  background: #fff;
  position: relative;
}
html.bnpl-app-active .bmp-reg-proof-ico--material {
  border-radius: 50% 50% 4px 4px;
  background: #fff;
}
html.bnpl-app-active .bmp-reg-proof-na {
  color: #000 !important;
  font-weight: 700;
  padding: 0 4px;
}
html.bnpl-app-active .bmp-reg-col-inv,
html.bnpl-app-active .bmp-reg-col-billtype,
html.bnpl-app-active .bmp-reg-col-date {
  white-space: nowrap;
}
@media (max-width: 900px) {
  html.bnpl-app-active .bmp-reg-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.bnpl-app-active .bmp-reg-detail-body-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
html.bnpl-app-active #content .bmp-register-v2-wrap,
html.bnpl-app-active #content .bmp-gst-follow-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-height: 8rem;
  max-height: none;
  overflow: auto;
}
html.bnpl-app-active .bmp-reg-table-v2 {
  min-width: 86rem;
}
html.bnpl-app-active .bmp-gst-follow-table {
  min-width: 52rem;
}
/* Sticky left/right freeze requires separate borders (collapse breaks sticky in Chrome/Edge) */
html.bnpl-app-active table.bmp-reg-table-v2.pl-table--register,
html.bnpl-app-active table.bmp-gst-follow-table.pl-table--register {
  border-collapse: separate;
  border-spacing: 0;
}
html.bnpl-app-active .erp-reg-freeze-left,
html.bnpl-app-active .erp-reg-freeze-r1,
html.bnpl-app-active .erp-reg-freeze-r2,
html.bnpl-app-active .erp-reg-freeze-r3,
html.bnpl-app-active .erp-reg-freeze-r4 {
  position: sticky;
  background: #fff;
}
html.bnpl-app-active .erp-reg-freeze-left {
  left: 0;
  z-index: 4;
  box-shadow: 2px 0 4px rgba(15, 23, 42, 0.08);
}
html.bnpl-app-active .bmp-reg-table-v2,
html.bnpl-app-active .bmp-gst-follow-table {
  --erp-reg-r1: 9rem;
  --erp-reg-r2: 5.5rem;
  --erp-reg-r3: 7.25rem;
  --erp-reg-r4: 7rem;
}
html.bnpl-app-active .erp-reg-freeze-r1 {
  right: 0;
  z-index: 4;
  min-width: var(--erp-reg-r1);
  box-shadow: -3px 0 6px rgba(15, 23, 42, 0.08);
}
html.bnpl-app-active .erp-reg-freeze-r2 {
  right: var(--erp-reg-r1);
  z-index: 4;
  min-width: var(--erp-reg-r2);
}
html.bnpl-app-active .erp-reg-freeze-r3 {
  right: calc(var(--erp-reg-r1) + var(--erp-reg-r2));
  z-index: 4;
  min-width: var(--erp-reg-r3);
}
html.bnpl-app-active .erp-reg-freeze-r4 {
  right: calc(var(--erp-reg-r1) + var(--erp-reg-r2) + var(--erp-reg-r3));
  z-index: 4;
  min-width: var(--erp-reg-r4);
  box-shadow: -2px 0 4px rgba(15, 23, 42, 0.06);
}
html.bnpl-app-active .bmp-reg-table-v2 thead th.erp-reg-freeze-left,
html.bnpl-app-active .bmp-reg-table-v2 thead th.erp-reg-freeze-r1,
html.bnpl-app-active .bmp-reg-table-v2 thead th.erp-reg-freeze-r2,
html.bnpl-app-active .bmp-reg-table-v2 thead th.erp-reg-freeze-r3,
html.bnpl-app-active .bmp-reg-table-v2 thead th.erp-reg-freeze-r4,
html.bnpl-app-active .bmp-gst-follow-table thead th.erp-reg-freeze-left,
html.bnpl-app-active .bmp-gst-follow-table thead th.erp-reg-freeze-r1 {
  z-index: 6;
  background: #f8fafc;
}
html.bnpl-app-active .bmp-reg-table-v2 tbody tr:nth-child(even) td.erp-reg-freeze-left,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr:nth-child(even) td.erp-reg-freeze-r1,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr:nth-child(even) td.erp-reg-freeze-r2,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr:nth-child(even) td.erp-reg-freeze-r3,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr:nth-child(even) td.erp-reg-freeze-r4,
html.bnpl-app-active .bmp-gst-follow-table tbody tr:nth-child(even) td.erp-reg-freeze-left,
html.bnpl-app-active .bmp-gst-follow-table tbody tr:nth-child(even) td.erp-reg-freeze-r1 {
  background: #fafafa;
}
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-row--kbd td.erp-reg-freeze-left,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-row--kbd td.erp-reg-freeze-r1,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-row--kbd td.erp-reg-freeze-r2,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-row--kbd td.erp-reg-freeze-r3,
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-row--kbd td.erp-reg-freeze-r4 {
  background: #eef2ff;
}
html.bnpl-app-active #content .bmp-reg-table-v2 thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
html.bnpl-app-active .bmp-reg-table-v2.pl-table--register,
html.bnpl-app-active .bmp-gst-follow-table.pl-table--register {
  table-layout: auto;
  width: 100%;
}
html.bnpl-app-active .bmp-reg-table-v2.pl-table--register th:nth-child(n),
html.bnpl-app-active .bmp-reg-table-v2.pl-table--register td:nth-child(n),
html.bnpl-app-active .bmp-gst-follow-table.pl-table--register th:nth-child(n),
html.bnpl-app-active .bmp-gst-follow-table.pl-table--register td:nth-child(n) {
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* BMP register v1 — frozen voucher column: fixed width so headers stay aligned on horizontal scroll */
html.bnpl-app-active .bmp-reg-table-v2--v1 .bmp-reg-col-vno.erp-reg-freeze-left {
  min-width: 12rem;
  width: 12rem;
  max-width: 12rem;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-reg-table-v2--v1 .bmp-reg-col-date {
  min-width: 6.75rem;
}
html.bnpl-app-active .bmp-reg-table-v2--v1 thead th.bmp-reg-col-vno.erp-reg-freeze-left {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #f8fafc;
}
html.bnpl-app-active .bmp-reg-table-v2--v1 tbody td.bmp-reg-col-vno.erp-reg-freeze-left {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}
html.bnpl-app-active .bmp-reg-table-v2--v1 tbody tr:nth-child(even) td.bmp-reg-col-vno.erp-reg-freeze-left {
  background: #fafafa;
}
html.bnpl-app-active .bmp-reg-table-v2--v1 tbody tr:hover td.bmp-reg-col-vno.erp-reg-freeze-left {
  background: #eef2ff;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-vno,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-col-vno,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-date,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-col-date,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-inv,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-col-inv,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-billtype,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-qty,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-unit,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-rate,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-lamt,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-net,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-col-net,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-status,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-workflow,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-proof,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-act,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-act {
  width: 1%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-party,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-col-party {
  width: auto;
  min-width: 11rem;
  max-width: 18rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.bnpl-app-active .bmp-reg-table-v2 th,
html.bnpl-app-active .bmp-reg-table-v2 td,
html.bnpl-app-active .bmp-gst-follow-table th,
html.bnpl-app-active .bmp-gst-follow-table td {
  font-weight: 700;
  color: #000 !important;
  font-size: 12px;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-row-open,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-row-open {
  display: inline-block;
  width: auto;
  max-width: none;
  text-align: left;
  font-weight: 700;
  color: #000 !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  padding: 0 8px;
  min-height: var(--erp-control-box-height, 40px);
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-row-open:focus,
html.bnpl-app-active .bmp-gst-follow-table .bmp-reg-row-open:focus {
  border-color: var(--erp-control-box-border, #64748b);
  background: #fff;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-site,
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-staff {
  width: 1%;
  max-width: 12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-material {
  max-width: 10rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-status .pl-pill {
  display: inline-block;
  padding: 2px 6px;
  white-space: nowrap;
}
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-v2-row {
  cursor: default;
}
html.bnpl-app-active .bmp-reg-table-v2 tbody tr.bmp-reg-v2-row.bmp-reg-row--kbd {
  background: #f8fafc;
}
html.bnpl-app-active .bmp-reg-cell-kbd {
  cursor: default;
}
html.bnpl-app-active .bmp-reg-table-v2 td.bmp-reg-cell-kbd:focus,
html.bnpl-app-active .bmp-gst-follow-table td.bmp-reg-cell-kbd:focus {
  outline: 3px solid #1a237e !important;
  outline-offset: -1px;
  background: #c5cae9 !important;
  box-shadow: inset 0 0 0 1px #fff;
  z-index: 7;
}
html.bnpl-app-active .bmp-reg-table-v2 td.bmp-reg-cell-kbd:focus:not(.erp-reg-freeze-left):not(.erp-reg-freeze-r1),
html.bnpl-app-active .bmp-gst-follow-table td.bmp-reg-cell-kbd:focus:not(.erp-reg-freeze-left):not(.erp-reg-freeze-r1) {
  position: relative;
}
/* GST bills pending — 6-column fixed grid (party must not consume full row width) */
html.bnpl-app-active .bmp-gst-follow-table.bmp-gst-follow-table--v1 {
  table-layout: fixed;
  width: 100%;
  min-width: 44rem;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 .bmp-reg-col-party {
  width: 22%;
  min-width: 7rem;
  max-width: 14rem;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 thead th.bmp-reg-col-party.erp-reg-freeze-left {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #f8fafc;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody td.bmp-reg-col-party.erp-reg-freeze-left {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 .bmp-reg-col-inv {
  width: 12%;
  min-width: 5.5rem;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 .bmp-reg-col-vno {
  width: 22%;
  min-width: 9rem;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 .bmp-reg-col-date {
  width: 11%;
  min-width: 6.5rem;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 .bmp-reg-col-net {
  width: 11%;
  min-width: 6rem;
  text-align: right;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 th.bmp-reg-col-net {
  text-align: right;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 .bmp-reg-act {
  width: 22%;
  min-width: 9.5rem;
  max-width: 11rem;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody tr:nth-child(even) td {
  background: #fafafa;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody tr:hover td {
  background: #eef2ff;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody tr:nth-child(even) td.erp-reg-freeze-left,
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody tr:nth-child(even) td.erp-reg-freeze-r1 {
  background: #fafafa;
}
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody tr:hover td.erp-reg-freeze-left,
html.bnpl-app-active .bmp-gst-follow-table--v1 tbody tr:hover td.erp-reg-freeze-r1 {
  background: #eef2ff;
}
html.bnpl-app-active #bmpGstFollowTableHost,
html.bnpl-app-active #bmpGstFollowTableHost .bmp-reg-register,
html.bnpl-app-active #bmpGstFollowTableHost .pl-pane-inner {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html.bnpl-app-active #bmpGstFollowTableHost .bmp-register-v2-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
html.bnpl-app-active .bmp-gst-follow-kpi-row {
  margin-bottom: 8px;
}
html.bnpl-app-active .bmp-form--gst-follow-only .bmp-gst-follow-only-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 0 12px;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-gst-follow-only-head {
  margin-bottom: 10px;
}
html.bnpl-app-active .bmp-gst-follow-only-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active .bmp-gst-follow-only-sub {
  margin: 0;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active .bmp-gst-follow-only-summary {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
html.bnpl-app-active .bmp-gst-follow-only-meta {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin: 0;
}
html.bnpl-app-active .bmp-gst-follow-only-meta .erp-filter-field {
  flex: 0 1 auto;
  min-width: 120px;
}
html.bnpl-app-active .bmp-gst-follow-only-meta .bmp-gst-follow-only-party {
  flex: 1 1 180px;
  min-width: 160px;
}
html.bnpl-app-active .bmp-gst-follow-only-meta .pb-field[readonly] {
  background: #f8fafc !important;
  color: #000 !important;
  font-weight: 700;
  cursor: default;
}
html.bnpl-app-active .bmp-gst-follow-only-evidence {
  margin-top: 0;
  background: #f8fafc;
}
html.bnpl-app-active .bmp-gst-follow-only-evidence .bmp-section-lbl {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
html.bnpl-app-active .bmp-gst-follow-only-rule {
  margin: 0 0 8px;
}
html.bnpl-app-active .bmp-gst-follow-only-footer {
  margin-top: 12px;
  justify-content: flex-end;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-photo-slot--gst-follow {
  cursor: default;
  min-height: 0;
  padding: 10px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #fff;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-photo-slot-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-photo-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-photo-action-grid .erp-doc-mach-cell {
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  width: 100% !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-photo-evidence-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-slot-preview {
  max-width: 100%;
  min-height: 88px;
  max-height: 140px;
}
html.bnpl-app-active #content .bmp-photo-grid--gst-follow .bmp-photo-slot-done {
  background: #f0fdf4;
  border-color: #86efac;
}
html.bnpl-app-active .bmp-reg-detail-checker-footer {
  flex: 0 0 auto;
  width: 100%;
  max-height: 42vh;
  overflow: auto;
  margin: 0;
  padding: 10px 0 0;
  border-top: 2px solid #1a237e;
  background: #fff;
  box-sizing: border-box;
  z-index: 2;
}
html.bnpl-app-active .bmp-reg-detail-checker-footer[hidden] {
  display: none !important;
}
html.bnpl-app-active .bmp-reg-checker-audit {
  margin-bottom: 12px;
}
html.bnpl-app-active .bmp-reg-review-history-lbl {
  margin: 0 0 6px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active .bmp-reg-admin-gateway {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px dashed #64748b;
}
html.bnpl-app-active .bmp-reg-checker-actions--audit {
  justify-content: space-between;
  align-items: flex-end;
}
html.bnpl-app-active .bmp-reg-checker-actions-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}
html.bnpl-app-active .bmp-reg-checker-actions--gateway {
  justify-content: space-between;
  gap: 10px;
}
html.bnpl-app-active .bmp-reg-btn-danger {
  border-color: #991b1b !important;
  color: #991b1b !important;
  font-weight: 700;
}
html.bnpl-app-active .bmp-reg-checker-actions {
  flex-wrap: wrap;
}
html.bnpl-app-active .bmp-reg-table-v2 .bmp-reg-col-proof .erp-control-box {
  font-size: 11px;
  padding-left: 6px;
  padding-right: 6px;
  width: auto !important;
}
html.bnpl-app-active .bmp-reg-table-v2--workflow th:nth-child(10),
html.bnpl-app-active .bmp-reg-table-v2--workflow td:nth-child(10),
html.bnpl-app-active .bmp-reg-table-v2--checker th:nth-child(10),
html.bnpl-app-active .bmp-reg-table-v2--checker td:nth-child(10) {
  width: 12%;
  white-space: normal;
}
html.bnpl-app-active .bmp-reg-table-v2--checker th:nth-child(11),
html.bnpl-app-active .bmp-reg-table-v2--checker td:nth-child(11) {
  width: 11%;
  white-space: normal;
}
html.bnpl-app-active .bmp-reg-staff-boundary {
  margin: 12px 0 0;
  border: none;
  border-top: 2px solid #64748b;
}
html.bnpl-app-active .bmp-reg-staff-boundary-lbl {
  margin: 8px 0 10px;
  font-size: 12px;
}
html.bnpl-app-active .bmp-reg-detail-aside {
  display: flex;
  flex-direction: column;
}
html.bnpl-app-active .bmp-reg-col-workflow .bmp-reg-workflow-pill {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.25;
}
html.bnpl-app-active .bmp-checker-page-title {
  margin: 0 0 6px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active .bmp-checker-register-host {
  width: 100%;
}
html.bnpl-app-active .bmp-reg-remarks {
  margin: 0 0 10px;
  padding-left: 18px;
  color: #000 !important;
  font-weight: 600;
}
html.bnpl-app-active #content .bmp-voucher-lines-wrap {
  margin: 0 0 4px;
}
html.bnpl-app-active #content .bmp-voucher-summary {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 0 0;
  border-top: 2px solid #cbd5e0;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-voucher-summary-table {
  width: 100%;
  max-width: 340px;
  border-collapse: collapse;
  font-size: 13px;
}
html.bnpl-app-active #content .bmp-voucher-summary-table td {
  padding: 5px 8px;
  vertical-align: middle;
  color: #000 !important;
}
html.bnpl-app-active #content .bmp-voucher-summary-table .sum-lbl {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}
html.bnpl-app-active #content .bmp-voucher-summary-table .sum-val {
  text-align: right;
  width: 9.5rem;
  font-weight: 700;
}
html.bnpl-app-active #content .bmp-voucher-summary-table .sum-val .pb-field {
  text-align: right;
}
html.bnpl-app-active #content .bmp-voucher-summary-table tr.bmp-voucher-foot--net td {
  background: #eef2ff;
  font-size: 14px;
  border-radius: 4px;
}
html.bnpl-app-active #content .bmp-workspace-form {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
html.bnpl-app-active #content .bmp-workspace-form .bmp-voucher-sheet {
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  padding: 10px 12px 8px;
  background: #fff;
  flex: 1 1 auto;
}
html.bnpl-app-active #content .bmp-voucher-toolbar-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 0 4px;
  border-top: 1px solid #64748b;
}
html.bnpl-app-active #content .bmp-voucher-toolbar-footer .erp-control-box {
  min-width: 7.5rem;
}
html.bnpl-app-active #content .bmp-voucher-msg {
  margin: 4px 0 0;
  text-align: right;
}
html.bnpl-app-active #content .bmp-voucher-sheet.bmp-section {
  padding: 10px 12px 12px;
}
/* BMP Form Visual Lock — last meta rule must stay 3-col (Ref · Date · Download). Never restore 5-col party scramble. */
html.bnpl-app-active #content .bmp-voucher-meta {
  display: grid;
  grid-template-columns: minmax(14rem, 2.6fr) minmax(9.5rem, auto) auto;
  gap: 6px;
  align-items: flex-end;
  width: 100%;
}
html.bnpl-app-active #content .bmp-voucher-meta .bmp-voucher-ref {
  flex: none;
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .bmp-voucher-meta {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, auto);
  }
  html.bnpl-app-active #content .bmp-voucher-summary-table {
    max-width: none;
  }
}
@media (max-width: 720px) {
  html.bnpl-app-active #content .bmp-voucher-parties {
    grid-template-columns: 1fr;
  }
}
@media print {
  html.bnpl-app-active #content .bmp-voucher-toolbar,
  html.bnpl-app-active #content .bmp-transaction-ribbon,
  html.bnpl-app-active #content .bmp-voucher-toolbar-footer,
  html.bnpl-app-active #content .bmp-line-actions,
  html.bnpl-app-active #content .erp-tab-actions {
    display: none !important;
  }
  html.bnpl-app-active #content .bmp-voucher-sheet {
    border: none;
    padding: 0;
  }
}
/* BMP — 2-column workspace (form SSOT, no Tailwind) */
html.bnpl-app-active #content .bmp-workspace-shell {
  padding: 6px 8px 8px;
  width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-workspace-ai-bar {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 6px;
  padding: 4px 8px;
  min-height: 40px;
  background: #fff;
  border-radius: 6px;
  border: var(--erp-control-box-border, 1px solid #64748b);
}
html.bnpl-app-active #content .bmp-ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content .bmp-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
html.bnpl-app-active #content .bmp-ai-pill--busy .bmp-ai-dot {
  background: #3949ab;
  animation: bmp-ai-dot-pulse 1s ease-in-out infinite;
}
@keyframes bmp-ai-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
html.bnpl-app-active #content .bmp-ai-scan-btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}
html.bnpl-app-active #content .bmp-workspace-form--full {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html.bnpl-app-active #content .bmp-evidence-compact {
  margin-top: 8px;
  padding: 6px 8px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-evidence-compact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
html.bnpl-app-active #content .bmp-evidence-compact-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 900px) {
  html.bnpl-app-active #content .bmp-evidence-compact-row {
    flex-direction: row;
    align-items: flex-start;
  }
  html.bnpl-app-active #content .bmp-evidence-compact-row .bmp-doc-preview {
    flex: 0 0 200px;
    min-height: 120px;
    max-height: 160px;
    margin: 0;
  }
  html.bnpl-app-active #content .bmp-evidence-compact-row .bmp-photo-grid {
    flex: 1 1 auto;
    min-width: 0;
  }
}
html.bnpl-app-active #content .bmp-line-item-head {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}
html.bnpl-app-active #content .bmp-mat-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #64748b;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-mat-dot--linked {
  background: #16a34a !important;
  border-color: #15803d;
}
html.bnpl-app-active #content .bmp-mat-dot--open {
  background: #dc2626 !important;
  border-color: #b91c1c;
}
html.bnpl-app-active #content .bmp-line-item-display-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
  color: #000 !important;
  word-break: normal;
  overflow-wrap: break-word;
}
html.bnpl-app-active #content .bmp-line-item-edit-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 0;
  width: 100%;
}
html.bnpl-app-active #content .bmp-line-item-edit-panel--fixed,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-line-item-edit-panel--fixed {
  position: fixed;
  z-index: 10048;
  width: auto;
  max-width: min(420px, calc(100vw - 16px));
  padding: 6px 8px;
  background: #fff;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}
html.bnpl-app-active #content .bmp-line-item-edit-panel--fixed .btn,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-line-item-edit-panel--fixed .btn {
  min-height: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
  padding: 0 8px !important;
}
html.bnpl-app-active #content .bmp-line-item-head--editing,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-line-item-head--editing {
  flex-wrap: nowrap;
}
html.bnpl-app-active #content .bmp-item-suggest--portal,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-item-suggest--portal {
  background: #fff;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  padding: 4px 0;
}
html.bnpl-app-active #content .bmp-item-suggest--sheet,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-item-suggest--sheet {
  padding: 0;
  overflow: hidden;
  position: fixed;
  z-index: 10055;
  pointer-events: auto;
  box-sizing: border-box;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 td.bmp-col-item,
html.bnpl-app-active #swMaterialPurchaseHost table.bmp-lines.bmp-voucher-lines--a4 td.bmp-col-item {
  overflow: visible;
}
html.bnpl-app-active #content .bmp-line-item-picker .bmp-item-suggest[hidden],
html.bnpl-app-active #swMaterialPurchaseHost .bmp-line-item-picker .bmp-item-suggest[hidden] {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
html.bnpl-app-active #content .bmp-mat-search-sheet,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  max-height: inherit;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-hd,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-hd {
  font-weight: 800;
  font-size: 13px;
  color: #000 !important;
  line-height: 1.3;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-q,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-q {
  width: 100%;
  box-sizing: border-box;
  height: var(--erp-control-box-height, 40px) !important;
  min-height: var(--erp-control-box-height, 40px) !important;
  background: #fff !important;
  border: var(--erp-control-box-border, 1px solid #64748b) !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-list,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
  min-height: 0;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-list .bmp-item-suggest-row,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-list .bmp-item-suggest-row {
  width: 100%;
  text-align: left;
  min-height: 36px;
  height: auto !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-empty,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-empty {
  margin: 4px 0 0;
  padding: 6px 8px;
  font-size: 12px;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-ft,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-ft {
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .bmp-mat-search-sheet-ft .btn,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-mat-search-sheet-ft .btn {
  min-height: 36px !important;
  height: 36px !important;
  width: auto !important;
  max-width: none;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .bmp-line-item-picker--sheet-open .bmp-line-item-head,
html.bnpl-app-active #swMaterialPurchaseHost .bmp-line-item-picker--sheet-open .bmp-line-item-head {
  display: none !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 td.bmp-col-item,
html.bnpl-app-active #swMaterialPurchaseHost table.bmp-lines.bmp-voucher-lines--a4 td.bmp-col-item {
  vertical-align: middle;
}
html.bnpl-app-active #content .bmp-line-search--edit {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}
html.bnpl-app-active #content .bmp-alias-propose--secondary {
  font-size: 11px !important;
  min-height: 28px !important;
  height: auto !important;
  padding: 2px 8px !important;
}
html.bnpl-app-active #content .bmp-line-item-edit {
  flex: 0 0 auto;
  min-height: 28px !important;
  height: 28px !important;
  font-size: 12px !important;
  padding: 0 10px !important;
}
html.bnpl-app-active #content .bmp-line-item-picked-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
html.bnpl-app-active #content .bmp-line-item-picked-name {
  width: 100%;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
  color: #000 !important;
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}
html.bnpl-app-active #content .bmp-line-item-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  width: 100%;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-alias-propose {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 28px !important;
  height: auto !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.25;
  white-space: normal;
  text-align: left;
}
html.bnpl-app-active #content .bmp-line-item-ocr-name {
  display: block;
  width: 100%;
  margin-bottom: 4px;
}
html.bnpl-app-active #content .bmp-line-item-chg {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
  min-height: 28px !important;
  height: 28px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 0 10px !important;
  white-space: nowrap;
}
html.bnpl-app-active #content .bmp-workspace-doc {
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  padding: 10px;
  background: #f1f5f9;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-workspace-doc-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 8px;
}
html.bnpl-app-active #content .bmp-workspace-doc-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
html.bnpl-app-active #content .bmp-doc-preview {
  border: 2px dashed #94a3b8;
  border-radius: 6px;
  background: #fff;
  min-height: 100px;
  max-height: 200px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  box-sizing: border-box;
  margin: 0 0 10px;
}
html.bnpl-app-active #content .bmp-doc-preview--filled {
  cursor: pointer;
  border-style: solid;
  border-color: #cbd5e1;
  padding: 4px;
}
html.bnpl-app-active #content .bmp-doc-preview-img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}
html.bnpl-app-active #content .bmp-doc-preview-title {
  font-weight: 800;
  color: #000 !important;
  margin: 0 0 4px;
}
html.bnpl-app-active #content .bmp-workspace-evidence .bmp-photo-grid {
  grid-template-columns: 1fr;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 {
  border-collapse: collapse;
  border: 1px solid #64748b;
  margin: 0;
  table-layout: fixed;
  width: 100%;
  min-width: 920px;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-sl { width: 2.25rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-item { width: 24%; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-unit { width: 3.25rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-qty { width: 3.75rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-rate { width: 5.25rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-base { width: 5rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-disc { width: 4.5rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-other { width: 4.5rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-after { width: 5rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-gst { width: 3.75rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-amt { width: 5.25rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 col.bmp-col-act { width: 3rem; }
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4.pl-table th,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4.pl-table td {
  border-color: #64748b;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 thead th {
  background: #3949AB !important;
  color: #fff !important;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #64748b;
  padding: 4px 2px;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td {
  text-align: center;
  font-size: 13px;
  border: 1px solid #64748b;
  padding: 3px 4px;
  vertical-align: middle;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 td.left-align,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-item {
  text-align: left;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.num {
  text-align: right;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-sl,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-unit,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody .bmp-col-unit,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-gst,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-act {
  text-align: center;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 td.right-align {
  text-align: right;
}
html.bnpl-app-active #content .bmp-voucher-sheet-title {
  flex: 1 1 auto;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  color: #000 !important;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .pb-field:not(.bmp-mat-search-sheet-q),
html.bnpl-app-active #swMaterialPurchaseHost table.bmp-lines.bmp-voucher-lines--a4 .pb-field:not(.bmp-mat-search-sheet-q),
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 select.pb-field,
html.bnpl-app-active #swMaterialPurchaseHost table.bmp-lines.bmp-voucher-lines--a4 select.pb-field {
  min-width: 0;
  width: 100%;
  height: 34px;
  min-height: 34px;
  box-sizing: border-box;
  margin: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-amt-display {
  color: #000 !important;
  font-weight: 700;
  text-align: right;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-col-act,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-col-act-hd,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-foot-act-spacer {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
  padding: 2px !important;
  text-align: center;
  vertical-align: middle;
  border-left: 1px solid #64748b !important;
  border-right: 1px solid #64748b !important;
  background: #fff !important;
  box-sizing: border-box;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody .bmp-col-act {
  border-bottom: 1px solid #64748b;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-act-spacer {
  border-top: 1px solid #64748b;
  padding: 0 !important;
  background: #fff !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-lbl--round {
  white-space: nowrap;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-round-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  cursor: default;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-round-auto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-round-auto input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #3949ab;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-item-picker {
  position: relative;
  width: 100%;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest {
  position: fixed;
  z-index: 10050;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #64748b;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest-empty {
  margin: 0;
  padding: 6px 8px;
  font-size: 11px;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-inline-match-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 6px;
  max-width: 100%;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-inline-match-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #000;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-inline-match-list .bmp-item-suggest-row {
  min-height: 36px !important;
  height: auto !important;
  font-size: 12px !important;
  font-weight: 700;
  border: 1px solid var(--erp-control-box-border, #64748b) !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-open-item-suggest {
  width: 100%;
  min-height: 32px !important;
  height: 32px !important;
  margin-top: 4px;
  font-size: 11px !important;
  font-weight: 800;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-create-inline {
  width: 100%;
  min-height: 30px !important;
  height: 30px !important;
  margin-top: 4px;
  font-size: 10px !important;
  font-weight: 800;
  padding: 2px 6px !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest-row,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest-create {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest-row:hover {
  background: #eff6ff;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest-create {
  color: #3949ab !important;
  font-weight: 800;
  border-bottom: none;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-item-suggest-pct {
  font-weight: 600;
  color: #64748b;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-act-col {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-icon-btn.bmp-add-line-row {
  background: #3949ab !important;
  color: #fff !important;
  border: 1px solid #3949ab !important;
  min-height: 28px;
  height: 28px;
  width: 28px;
  padding: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
html.bnpl-app-active #content .bmp-photo-grid--four {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
html.bnpl-app-active #content .bmp-photo-grid--four .bmp-photo-slot {
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  padding: 4px 6px;
  background: #fff;
  box-sizing: border-box;
}
html.bnpl-app-active #content .bmp-photo-grid--four .bmp-photo-slot-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 6px;
  display: block;
  color: #000 !important;
}
html.bnpl-app-active #content .bmp-photo-grid--four .bmp-photo-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}
html.bnpl-app-active #content .bmp-photo-grid--four .bmp-photo-action-grid .erp-doc-mach-cell {
  min-height: var(--erp-control-box-height, 40px) !important;
  height: var(--erp-control-box-height, 40px) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  padding: 4px 8px !important;
  width: 100% !important;
  border-radius: 6px !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  margin: 0;
  border: 1px solid #64748b;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #000;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-icon-btn.bmp-new-mat {
  border-color: #3949AB;
  color: #3949AB;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-line-icon-btn.bmp-rm-line {
  font-size: 16px;
  line-height: 1;
}

html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot tr:first-child td {
  border-top: 1px solid #64748b;
}
/* BMP Form Visual Lock — calculation foot/money stay 13px. Do not reintroduce 11px on these selectors. */
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot td {
  border: 1px solid #64748b;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
  vertical-align: middle;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-lbl {
  text-align: right;
  background: #f8f9fa;
  white-space: normal;
  line-height: 1.35;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 5.5rem;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot tr.bmp-foot-row--net td {
  background: #eef2ff;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-remarks-cell {
  text-align: left;
  vertical-align: top;
  padding: 0 !important;
  background: #fff;
  height: 100%;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-remarks-box {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  min-height: 100%;
  padding: 4px 5px;
  box-sizing: border-box;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-remarks-lbl {
  font-size: 13px;
  font-weight: 800;
  color: #000 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-remarks-ta {
  width: 100%;
  flex: 1 1 auto;
  min-height: 6.5rem;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  padding: 4px 2px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #000 !important;
  resize: vertical;
  background: #fff;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-remarks-ro {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-words-cell {
  text-align: left;
  vertical-align: middle;
  padding: 6px 8px;
  background: #fff;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-words-cap {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: #000 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-words-cap-lbl {
  font-weight: 800;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-input,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-amt,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-inr {
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  line-height: 1.35;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-input {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  text-align: right;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot tr.bmp-foot-row--net .bmp-foot-val,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot tr.bmp-foot-row--net .bmp-foot-amt,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot tr.bmp-foot-row--net .bmp-inr {
  font-weight: 800 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-inr-wrap {
  display: grid;
  grid-template-columns: 0.9em minmax(0, 1fr);
  align-items: center;
  column-gap: 4px;
  min-width: 0;
  width: 100%;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-inr {
  grid-column: 1;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-money-view,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-foot-amt,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tfoot .bmp-foot-input {
  grid-column: 2;
  width: 100% !important;
  max-width: 100%;
  text-align: right !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 .bmp-money-view {
  display: inline-block;
  height: auto !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody .bmp-col-rate .bmp-inr-wrap input {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  text-align: right;
}

html.bnpl-app-active #content .bmp-voucher-lines-wrap {
  overflow-x: auto;
  overflow-y: visible;
  margin: 0;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td {
  overflow: hidden;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-item {
  overflow: visible;
  min-width: 10.5rem;
  vertical-align: top;
  padding: 5px 6px;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.num .pb-field,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.num .bmp-money-view {
  text-align: right;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-qty .pb-field {
  text-align: right;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-disc,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-other {
  overflow: visible;
  position: relative;
  z-index: 3;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-disc input,
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-other input {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  width: 100%;
  min-width: 0;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 thead th.bmp-col-act-hd {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #3949AB !important;
}
html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 tbody td.bmp-col-act {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff !important;
}
@media (min-width: 721px) {
  html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 {
    table-layout: fixed;
    width: 100%;
    min-width: 720px;
  }
}
@media (max-width: 720px) {
  html.bnpl-app-active #content table.bmp-lines.bmp-voucher-lines--a4 {
    min-width: 720px;
  }
}

/* —— Party Library skeleton (.pl-*) —— */
.pl-shell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-bottom: 24px;
  box-sizing: border-box;
  min-width: 0;
  color: #000 !important;
  font-weight: 700;
}
.pl-shell-head--list {
  padding-bottom: 2px;
}
.pl-shell-head--list .pl-title {
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0;
}
.pl-shell-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  row-gap: 4px;
}
.pl-shell-step-id {
  flex: 0 0 auto;
}
.pl-shell-kpis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.pl-kpi-inline {
  font-size: 12px;
  font-weight: 800 !important;
  color: #000 !important;
  white-space: nowrap;
}
.pl-kpi-inline-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  font-weight: 800;
  margin-right: 4px;
}
.pl-shell-layout-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  flex: 1 1 100%;
}
@media (min-width: 901px) {
  .pl-shell-layout-note {
    flex: 0 1 auto;
    margin-left: auto;
  }
}
.pl-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pl-top--list-toolbar {
  padding: 0 0 6px;
  margin: 0;
  border: none;
  background: transparent;
}
.pl-top-toolbar--list {
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.pl-top-toolbar--list .pl-download-wrap {
  flex: 0 0 auto;
  align-items: center;
}
.pl-top-toolbar--list .btn.erp-control-box {
  flex-shrink: 0;
}
.pl-top-toolbar--inline-lbl .pl-toolbar-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.pl-top-toolbar--inline-lbl .pl-toolbar-cell--search {
  flex: 1 1 200px;
  min-width: 140px;
}
.pl-top-toolbar--inline-lbl .pl-toolbar-cell--filter {
  flex: 0 0 168px;
  min-width: 140px;
}
@media (min-width: 901px) {
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell .erp-filter-lbl {
    min-height: 0 !important;
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800 !important;
    color: #000 !important;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell .erp-control-box {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell--search {
    flex: 1 1 240px;
    max-width: none;
  }
  .pl-top-toolbar--inline-lbl .pl-toolbar-cell--filter {
    flex: 0 0 200px;
  }
}
@media (max-width: 900px) {
  .pl-top-toolbar--list {
    flex-wrap: wrap;
    align-items: flex-end;
  }
}
.pl-stat--card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  min-width: 140px;
}
.pl-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #334155 !important;
  max-width: 720px;
}
.pl-top-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.pl-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.pl-stat-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  font-weight: 800;
}
.pl-stat-val {
  font-size: 18px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-top-toolbar {
  align-items: flex-end;
}
.pl-filter-grow {
  flex: 1 1 240px;
  max-width: 420px;
}
.pl-body {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 8px 10px;
  align-items: stretch;
  min-height: min(480px, calc(100vh - 200px));
  min-width: 0;
  width: 100%;
}
.pl-shell--list .pl-body {
  min-height: min(480px, calc(100vh - 140px));
}
.pl-shell--list .pl-pane {
  min-height: 320px;
}
.pl-shell--list .pl-pane-inner {
  min-height: 0;
}
.pl-body--nav-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.pl-nav--hidden {
  display: none !important;
}
.pl-pane-reopen-row {
  margin-bottom: 10px;
}
.pl-nav-reopen {
  font-weight: 800 !important;
}
.pl-nav {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
  min-width: 0;
}
.pl-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 8px;
  color: #000 !important;
}
.pl-nav-toggle {
  min-width: 40px !important;
  padding: 0 8px !important;
}
.pl-phase-hdr {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-weight: 800 !important;
  color: #0f172a !important;
  cursor: pointer;
  font-size: 12px;
}
.pl-phase-steps {
  padding: 0 0 8px 4px;
}
.pl-step-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  padding: 8px 8px;
  margin-bottom: 4px;
  cursor: pointer;
  color: #000 !important;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.35;
}
.pl-step-btn:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.pl-step-btn--active {
  border-color: #3949ab !important;
  background: #eef2ff !important;
}
.pl-step-label {
  display: block;
}
.pl-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
html.bnpl-app-active #content:has(.pl-shell) {
  padding-left: 4px;
  padding-right: 6px;
  padding-top: 4px;
  max-width: 100%;
  box-sizing: border-box;
}
html.bnpl-app-active #content:has(.pl-shell--list) {
  padding-top: 2px;
}
html.bnpl-app-active #content .pl-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
}
html.bnpl-app-active #app-view.erp-drawer-pinned-active #content .pl-shell {
  width: 100%;
  max-width: 100%;
}
html.bnpl-app-active #content .pl-body {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 6px 8px;
}
html.bnpl-app-active #content .pl-body--nav-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
html.bnpl-app-active #content .pl-pane {
  min-width: 0;
  overflow-x: auto;
}
@media (min-width: 901px) {
  html.bnpl-app-active #content .pl-nav {
    width: 100%;
    max-width: 280px;
  }
  html.bnpl-app-active #content .pl-body:not(.pl-body--nav-collapsed) .pl-nav {
    min-width: 240px;
  }
}
@media (max-width: 1099px) {
  html.bnpl-app-active #content .pl-body:not(.pl-body--nav-collapsed) {
    grid-template-columns: minmax(220px, min(280px, 38vw)) minmax(0, 1fr);
  }
}
.pl-pane {
  border: 1px solid var(--erp-control-box-border, #cbd5e1);
  border-radius: 8px;
  background: #fff;
  min-height: 480px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pl-pane-inner {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  height: 100%;
  overflow: visible;
}
.pl-pane-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.pl-pane-head--list {
  padding: 8px 12px 6px;
}
.pl-pane-head--list .pl-pane-title {
  font-size: 1rem;
}
.pl-pane-inner--list .pl-pane-body,
.pl-pane-body--list {
  padding: 8px 10px 12px;
}
.pl-pane-inner--list .pl-pane-reopen-row {
  margin-bottom: 6px;
}
.pl-pane-inner--list .pl-section {
  margin-bottom: 8px;
}
.pl-pane-inner--list .pl-section-title {
  display: none;
}
.pl-pane-inner--list .pl-list-hint {
  margin: 6px 0 0;
  font-size: 12px;
}
.pl-pane-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.pl-pane-step-id {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748b !important;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 8px;
  background: #fff;
}
.pl-pane-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-pane-desc {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #475569 !important;
}
.pl-pane-badges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pl-pane-body {
  flex: 1 1 auto;
  min-height: 220px;
  padding: 16px 18px 20px;
  overflow-y: auto;
  overflow-x: auto;
}
.pl-pane-foot {
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}
.pl-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #94a3b8;
  color: #334155 !important;
  background: #f1f5f9;
}
.pl-badge--locked {
  border-color: #991b1b;
  color: #991b1b !important;
  background: #fef2f2;
}
.pl-badge--soon {
  border-color: #b45309;
  color: #b45309 !important;
  background: #fffbeb;
}
.pl-badge--skel {
  border-color: #64748b;
  color: #475569 !important;
}
.pl-section {
  margin-bottom: 18px;
}
.pl-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-field-row {
  margin-bottom: 12px;
}
.pl-field .erp-control-box {
  width: 100%;
  box-sizing: border-box;
}
.pl-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}
.pl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
}
.pl-table th,
.pl-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
}
.pl-table th {
  background: #f8fafc;
  font-weight: 800 !important;
}
.pl-table-wrap--register {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 100%;
  max-height: min(calc(100vh - 280px), 640px);
  overflow: auto;
}
.pl-pane-inner--list .pl-table-wrap--register {
  width: 100%;
  max-width: 100%;
}
.pl-table--register {
  width: 100%;
  table-layout: fixed;
}
.pl-table--register th,
.pl-table--register td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.pl-table--register th:nth-child(1),
.pl-table--register td:nth-child(1) {
  width: 7%;
}
.pl-table--register th:nth-child(2),
.pl-table--register td:nth-child(2) {
  width: 16%;
  white-space: normal;
  word-break: break-word;
}
.pl-table--register th:nth-child(3),
.pl-table--register td:nth-child(3) {
  width: 10%;
}
.pl-table--register th:nth-child(4),
.pl-table--register td:nth-child(4) {
  width: 12%;
}
.pl-table--register th:nth-child(5),
.pl-table--register td:nth-child(5) {
  width: 10%;
}
.pl-table--register th:nth-child(6),
.pl-table--register td:nth-child(6) {
  width: 9%;
}
.pl-table--register th:nth-child(7),
.pl-table--register td:nth-child(7) {
  width: 12%;
}
.pl-table--register th:nth-child(8),
.pl-table--register td:nth-child(8) {
  width: 10%;
}
.pl-table--register th:nth-child(9),
.pl-table--register td:nth-child(9) {
  width: 14%;
  white-space: normal;
}
.pl-table--register td:nth-child(9) .pl-row-actions {
  justify-content: flex-end;
}
.pl-table--register thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 #e2e8f0;
}
.pl-table--register tbody tr:nth-child(even) {
  background: #fafafa;
}
.pl-table--register tbody tr:hover {
  background: #eef2ff;
}
.pl-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}
.pl-pill--ok {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46 !important;
}
.pl-pill--pending {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e !important;
}
.pl-pill--warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412 !important;
}
.pl-pill--issue {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b !important;
}
.pl-pill--muted {
  background: #f1f5f9;
  color: #475569 !important;
}
.pl-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pl-row-actions .pl-btn-locked {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}
.pl-row-actions .pl-row-act.erp-control-box {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}
.pl-shell-head--step {
  padding-bottom: 4px;
}
.pl-shell-head--step .pl-title {
  font-size: 1.05rem;
  margin: 0;
}
.pl-register-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.pl-register-foot-row {
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
html.bnpl-app-active #content .pl-download-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}
html.bnpl-app-active #content .pl-download-wrap .erp-rd-anchor {
  position: relative;
}
html.bnpl-app-active #content .pl-download-wrap .erp-rd-panel.erp-rd-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 200;
  width: min(460px, 94vw);
}
html.bnpl-app-active #content .pl-register-dl-toolbar,
html.bnpl-app-active #content .pl-section {
  position: relative;
  z-index: 1;
}
html.bnpl-app-active #content .pl-register-dl-toolbar:has(.erp-rd-panel:not([hidden])) {
  z-index: 50;
}
html.bnpl-app-active #content .pl-pane-body,
html.bnpl-app-active #content .pl-register-foot,
html.bnpl-app-active #content .pl-register-dl-toolbar {
  overflow: visible;
}
html.bnpl-app-active #content .pl-register-dl-toolbar {
  margin-bottom: 10px;
}
html.bnpl-app-active #content .pl-register-dl-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}
.pl-register-meta {
  font-size: 13px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-page-size {
  min-width: 120px;
}
.pl-list-hint {
  margin-top: 8px;
  font-size: 12px;
}
.pl-shell--list .pl-pane-body {
  padding-top: 12px;
}
.pl-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.pl-doc-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fafafa;
}
.pl-doc-name {
  font-size: 13px;
  font-weight: 800 !important;
  color: #000 !important;
}
.pl-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pl-btn-locked[disabled] {
  opacity: 0.85;
  cursor: not-allowed;
}
.pl-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.pl-checklist li,
.pl-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  color: #000 !important;
}
.pl-hint {
  margin: 8px 0 12px;
}
.pl-type-segment {
  margin-top: 8px;
}
.pl-int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.pl-int-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}
.pl-360-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.pl-360-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  min-height: 88px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-quality-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #000 !important;
}
.pl-quality-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.pl-quality-fill {
  width: 35%;
  height: 100%;
  background: #3949ab;
}
.pl-release-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}
@media (max-width: 900px) {
  .pl-body {
    grid-template-columns: 1fr;
  }
  .pl-nav {
    max-height: min(240px, 38vh);
    max-width: none;
  }
}
.pl-shell-head { margin-bottom: 4px; }
.pl-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 14px;
}
.pl-context-note { font-size: 13px; font-weight: 700; color: #475569 !important; }
.pl-page-block { margin-bottom: 14px; }
.pl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pl-upload-zone {
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #fafafa;
}
.pl-doc-preview { margin-top: 10px; }
.pl-preview-frame {
  min-height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin-top: 8px;
}
.pl-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.pl-flow-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-width: 88px;
  font-size: 12px;
  font-weight: 800;
}
.pl-flow-arrow { color: #64748b; font-weight: 800; }
.pl-kpi-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pl-kpi {
  flex: 1 1 140px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.pl-kpi-lbl { font-size: 11px; font-weight: 800; color: #64748b !important; text-transform: uppercase; }
.pl-kpi-val { font-size: 20px; font-weight: 800 !important; color: #000 !important; }
.pl-gate-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.pl-gate-card { padding: 12px; border: 1px solid #fecaca; background: #fff5f5; border-radius: 6px; font-weight: 800; }
.pl-action-bar { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.pl-req { color: #991b1b; font-weight: 800; }
.pl-name-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-name-chip { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: 800; }
.pl-name-chip--display { border-color: #3949ab; background: #eef2ff; }
.pl-flag-grid { display: grid; gap: 8px; }
.pl-drawer-preview { border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; background: #f8fafc; }
.pl-site-list { display: grid; gap: 6px; }
.pl-masked { font-weight: 800; color: #000 !important; }
.pl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pl-int-map { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; padding: 16px; border: 1px solid #e2e8f0; border-radius: 8px; }
.pl-int-hub { font-weight: 800; padding: 12px 16px; background: #3949ab; color: #fff !important; border-radius: 6px; }
.pl-int-spoke { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px; display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.pl-import-flow, .pl-release-flow { font-weight: 800; padding: 12px; background: #f8fafc; border-radius: 6px; border: 1px solid #e2e8f0; }
.pl-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pl-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-pagination { margin-top: 10px; text-align: right; }
@media (max-width: 900px) {
  .pl-split { grid-template-columns: 1fr; }
}

/* Party Library — UI polish (TEST cycle; SSOT-aligned) */
.pl-shell--ready .pl-badge--skel {
  display: none;
}
.pl-section > .pl-field:not(:last-child) {
  display: block;
  margin-bottom: 10px;
  max-width: min(100%, 520px);
}
.pl-section .pl-field-row .pl-field {
  max-width: none;
  flex: 1 1 180px;
  min-width: 0;
}
.pl-section .pl-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  display: block;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.pl-section .pl-data-table thead,
.pl-section .pl-data-table tbody {
  display: table;
  width: 100%;
  min-width: 640px;
}
.pl-section .pl-data-table th,
.pl-section .pl-data-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}
.pl-section .pl-data-table th {
  background: #f8fafc;
  font-weight: 800 !important;
  position: sticky;
  top: 0;
  z-index: 1;
}
.pl-section .pl-data-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.pl-context-bar--info {
  padding: 8px 12px;
  background: #fff;
  border-color: var(--erp-control-box-border, #cbd5e1);
}
.pl-pane-foot.erp-tab-actions {
  gap: 8px;
  flex-wrap: wrap;
}
.pl-pane-body .pl-action-bar.pl-page-block {
  margin-bottom: 8px;
  padding-top: 4px;
}
.pl-pane-body .pl-section:last-child {
  margin-bottom: 8px;
}
.pl-top-toolbar--list .btn.primary.erp-control-box {
  flex-shrink: 0;
}
html.bnpl-app-active #content .pl-shell--list .pl-title {
  font-size: 1.1rem;
}
.pl-filter-lbl .pl-req,
.pl-field .erp-filter-lbl .pl-req {
  color: #991b1b !important;
  font-weight: 800;
}


/* Party Library — Phase A workspace + daily steps (merge scoped) */

.pl-shell--workspace.pl-shell--list .pl-body {
  min-height: calc(100vh - 128px);
}

.pl-shell--workspace.pl-shell--list .pl-pane {
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}

.pl-shell--workspace .pl-pane-inner--list {
  flex: 1 1 auto;
  min-height: calc(100vh - 160px);
  height: auto;
}

.pl-shell--workspace .pl-pane-body--list.pl-pane-body--workspace {
  padding: 8px 12px 12px;
}

.pl-workspace-head {
  flex: 0 0 auto;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e2e8f0;
}

.pl-workspace-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  justify-content: space-between;
}

.pl-workspace-head .pl-pane-title {
  margin: 0;
  font-size: 1.05rem;
}

.pl-workspace-head .pl-pane-desc {
  margin: 6px 0 0;
  font-size: 12px;
}

.pl-nav-daily {
  margin: 0 0 10px;
  padding: 8px;
  border-radius: 6px;
  border: 2px solid #3949ab;
  background: #eef2ff;
  box-sizing: border-box;
}

.pl-nav-daily-lbl {
  display: block;
  margin: 0 0 4px;
  color: #3949ab !important;
  font-weight: 800 !important;
  min-height: 0 !important;
}

.pl-nav-daily-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.35;
}

.pl-nav-daily-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

html.bnpl-app-active #content .pl-nav .pl-step-btn--daily,
.pl-step-btn--daily {
  border: 2px solid #3949ab !important;
  background: #fff !important;
  color: #000 !important;
  font-weight: 800 !important;
}

.pl-step-btn--daily.pl-step-btn--active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #303f9f !important;
}

.pl-step-btn--daily.pl-step-btn--active .pl-step-daily-mark {
  color: #fde047;
}

.pl-step-daily-mark {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
  color: #3949ab;
}

.pl-audit-panel {
  margin-top: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  max-height: min(420px, 55vh);
  overflow: auto;
  background: #fff;
}

.pl-pane-inner--workspace {
  min-height: calc(100vh - 200px);
  max-width: 100% !important;
  width: 100%;
}

.pl-pane-body--workspace {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: calc(100vh - 240px);
  overflow: hidden;
  padding-bottom: 10px;
}

.pl-audit-page,
.pl-amend-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.pl-change-history-mount--full {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.pl-change-history-mount--full .pl-audit-panel,
.pl-pane-inner--workspace .pl-audit-panel {
  flex: 1 1 auto;
  max-height: min(calc(100vh - 240px), 920px);
  min-height: min(calc(100vh - 320px), 520px);
  margin-top: 0;
  border: var(--erp-control-box-border, 1px solid #64748b);
}

.pl-shell--workspace .pl-change-history-mount--full .pl-audit-panel {
  max-height: min(calc(100vh - 220px), 960px);
  min-height: min(calc(100vh - 300px), 560px);
}

.pl-pane-inner--workspace .pl-amend-register-wrap {
  max-height: min(calc(100vh - 340px), 820px);
  min-height: min(280px, 40vh);
}

.pl-audit-table--erp {
  table-layout: fixed;
  width: 100%;
  min-width: 720px;
  margin: 0;
  border: none;
  border-radius: 0;
}

.pl-audit-table--erp thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef2ff !important;
  color: #000 !important;
  border-bottom: 2px solid #3949ab;
}

.pl-audit-table--erp tbody tr:nth-child(even) {
  background: #f8fafc;
}

.pl-audit-table--erp .pl-audit-col-when {
  width: 18%;
  white-space: nowrap;
}

.pl-audit-table--erp .pl-audit-col-actor {
  width: 22%;
}

.pl-audit-table--erp .pl-audit-col-event {
  width: 20%;
}

.pl-audit-table--erp .pl-audit-col-detail {
  width: 40%;
  font-weight: 700 !important;
  line-height: 1.35;
}

.pl-audit-page .pl-audit-party-pick--toolbar {
  flex: 0 0 auto;
  max-width: 100%;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.pl-amend-toolbar-row {
  margin-bottom: 10px;
}

.pl-amend-toolbar-field {
  flex: 1 1 auto;
  min-width: 0;
}

.pl-amend-esc-segment {
  flex: 0 0 auto;
}

.pl-amend-register-wrap {
  max-height: min(480px, 55vh);
}

.pl-amend-register-table td.pl-amend-esc-yes {
  color: #991b1b !important;
  font-weight: 800 !important;
}

.pl-amend-loading {
  padding: 20px !important;
}

.pl-amend-empty-cell {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.pl-amend-empty {
  margin: 12px;
  padding: 16px 18px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  text-align: left;
}

.pl-amend-empty-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800 !important;
  color: #000 !important;
}

.pl-amend-empty-body {
  margin: 0;
}

.pl-section .pl-amend-register-wrap .pl-amend-register-table {
  min-width: 720px;
  width: 100%;
  table-layout: auto;
}

.pl-amend-register-wrap table.pl-amend-register-table thead th.erp-reg-freeze-left,
.pl-amend-register-wrap table.pl-amend-register-table thead th.erp-reg-freeze-r1 {
  z-index: 5;
  background: #f8fafc;
}

.pl-amend-register-wrap table.pl-amend-register-table tbody tr:nth-child(even) td.erp-reg-freeze-left,
.pl-amend-register-wrap table.pl-amend-register-table tbody tr:nth-child(even) td.erp-reg-freeze-r1 {
  background: #fafafa;
}

.pl-amend-register-wrap table.pl-amend-register-table tbody tr:hover td.erp-reg-freeze-left,
.pl-amend-register-wrap table.pl-amend-register-table tbody tr:hover td.erp-reg-freeze-r1 {
  background: #eef2ff;
}

/* Party Library — ref type/category manage panel (toolbar right align) */

.pl-ref-create-row {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
html.bnpl-app-active #content .pl-ref-create-panel.bmp-party-ref-create,
.pl-ref-create-panel.bmp-party-ref-create {
  margin: 8px 0 4px;
  padding: 10px 12px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
  width: auto !important;
  max-width: 28rem;
  display: inline-block;
  vertical-align: top;
}
.pl-ref-create-panel .bmp-party-ref-create-lbl {
  display: block;
  margin: 0 0 6px;
  font-weight: 700 !important;
  color: #000 !important;
}
.pl-ref-create-panel .bmp-party-ref-create-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  width: auto;
}
.pl-ref-create-panel .bmp-party-ref-create-field {
  flex: 0 0 16rem;
  width: 16rem;
  max-width: 16rem;
  margin: 0;
}
html.bnpl-app-active #content .pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box,
.pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box {
  width: 16rem !important;
  max-width: 16rem !important;
}
.pl-ref-create-panel .btn.erp-control-box {
  flex: 0 0 auto;
  width: auto !important;
  white-space: nowrap;
}
@media (max-width: 560px) {
  html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-row.erp-control-row,
  .pl-ref-create-panel--manage .pl-ref-manage-row {
    flex-wrap: wrap;
  }
  html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-status .erp-control-box {
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .pl-ref-create-panel.bmp-party-ref-create {
    max-width: 100%;
    display: block;
  }
  .pl-ref-create-panel .bmp-party-ref-create-row {
    flex-wrap: wrap;
  }
  .pl-ref-create-panel .bmp-party-ref-create-field,
  .pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box {
    flex: 1 1 12rem;
    width: 100% !important;
    max-width: 100% !important;
  }
}

.pl-ref-create-host {
  display: flex;
  width: 100%;
  margin: 4px 0 0;
  box-sizing: border-box;
}

.pl-ref-create-host--toolbar {
  justify-content: flex-end;
}

.pl-ref-create-host--form {
  justify-content: flex-start;
}

html.bnpl-app-active #content .pl-ref-create-panel.bmp-party-ref-create,
.pl-ref-create-panel.bmp-party-ref-create {
  margin: 0;
  padding: 10px 12px;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
  width: auto !important;
  max-width: 28rem;
  display: inline-block;
  vertical-align: top;
  align-self: flex-end;
  flex: 0 0 auto;
}
html.bnpl-app-active #content .pl-ref-create-panel--manage,
.pl-ref-create-panel--manage {
  max-width: 720px !important;
  width: 100% !important;
  display: block;
  align-self: stretch;
}
.pl-ref-admin-hint {
  margin: 0 0 8px;
}
.pl-ref-admin-filter {
  margin-top: 8px;
}
.pl-ref-admin-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}
.pl-ref-admin-table {
  width: 100%;
}

html.bnpl-app-active #content .pl-ref-create-panel--manage,
.pl-ref-create-panel--manage {
  max-width: 720px !important;
  width: 100% !important;
  display: block;
  align-self: stretch;
}

.pl-ref-admin-hint { margin: 0 0 8px; }
.pl-toolbar-ref-open {
  outline: 2px solid #3949ab;
  outline-offset: 1px;
}
.pl-ref-create-host--open {
  border: 1px solid #3949ab;
  border-radius: 6px;
  padding: 10px 12px 12px;
  margin-top: 8px;
  background: #f8fafc;
}
.pl-ref-create-host--open[data-pl-ref-open="party_type"] {
  box-shadow: inset 3px 0 0 #3949ab;
}
.pl-ref-create-host--open[data-pl-ref-open="category"] {
  box-shadow: inset 3px 0 0 #64748b;
}

.pl-toolbar-ref-open {
  outline: 2px solid #3949ab;
  outline-offset: 1px;
}

.pl-ref-create-host--open {
  border: 1px solid #3949ab;
  border-radius: 6px;
  padding: 10px 12px 12px;
  margin-top: 8px;
  background: #f8fafc;
}

.pl-ref-create-host--open[data-pl-ref-open="party_type"] {
  box-shadow: inset 3px 0 0 #3949ab;
}

.pl-ref-create-host--open[data-pl-ref-open="category"] {
  box-shadow: inset 3px 0 0 #64748b;
}

html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-row.erp-control-row,
.pl-ref-create-panel--manage .pl-ref-manage-row {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 720px;
  margin: 0 0 8px;
}

.pl-ref-manage-name {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.pl-ref-manage-status {
  flex: 0 0 auto;
  width: auto;
}

.pl-ref-manage-btns {
  flex: 0 0 auto;
}

.pl-ref-manage-btns-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-name .erp-control-box {
  width: 100% !important;
  max-width: none !important;
  height: var(--erp-control-box-height, 40px) !important;
  border: var(--erp-control-box-border, 1px solid #64748b) !important;
  border-radius: 6px !important;
}

html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-status .erp-control-box {
  width: auto !important;
  min-width: 6.75rem;
  max-width: 9.25rem;
  height: var(--erp-control-box-height, 40px) !important;
  border: var(--erp-control-box-border, 1px solid #64748b) !important;
  border-radius: 6px !important;
}

html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-btns .btn.erp-control-box {
  width: auto !important;
  height: var(--erp-control-box-height, 40px) !important;
}

.pl-ref-admin-table-wrap { margin-top: 8px; overflow-x: auto; }

.pl-ref-admin-table { width: 100%; }

html.bnpl-app-active #content .pl-ref-admin-table .btn.erp-control-box {
  width: auto !important;
}

.pl-ref-create-panel .bmp-party-ref-create-lbl {
  display: block;
  margin: 0 0 6px;
  font-weight: 700 !important;
  color: #000 !important;
}

.pl-ref-create-panel .bmp-party-ref-create-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  width: auto;
}

.pl-ref-create-panel .bmp-party-ref-create-field {
  flex: 0 0 16rem;
  width: 16rem;
  max-width: 16rem;
  margin: 0;
}

html.bnpl-app-active #content .pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box,
.pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box {
  width: 16rem !important;
  max-width: 16rem !important;
}

.pl-ref-create-panel .btn.erp-control-box {
  flex: 0 0 auto;
  width: auto !important;
  white-space: nowrap;
}

  html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-row.erp-control-row,
  .pl-ref-create-panel--manage .pl-ref-manage-row {
    flex-wrap: wrap;
  }

  html.bnpl-app-active #content .pl-ref-create-panel--manage .pl-ref-manage-status .erp-control-box {
    max-width: 100%;
  }

  .pl-ref-create-panel.bmp-party-ref-create {
    max-width: 100%;
    display: block;
  }

  .pl-ref-create-panel .bmp-party-ref-create-row {
    flex-wrap: wrap;
  }

  .pl-ref-create-panel .bmp-party-ref-create-field,
  .pl-ref-create-panel .bmp-party-ref-create-field .erp-control-box {
    flex: 1 1 12rem;
    width: 100% !important;
    max-width: 100% !important;
  }

/* === Material Library view restore (b8 SSOT) === */
/* Material Library Hub â€” Party-style register grid (list mode) */
.mlh-page.pl-shell--list {
  width: 100%;
  max-width: 100%;
}
.mlh-page .pl-pane-inner--list,
.mlh-page .pl-pane-body--list {
  width: 100%;
  max-width: 100%;
}
.mlh-view-segment {
  margin-bottom: 12px;
}
.mlh-pane-bar {
  padding: 0 0 8px;
  margin: 0;
  align-items: flex-end;
}
.mlh-pane-bar .erp-filter-field {
  width: auto;
}
.mlh-view-segment--inline {
  margin-bottom: 0;
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
}
.mlh-tb-segment {
  min-width: 0;
  width: auto;
}
.mlh-tb-segment .mlh-view-segment--inline .erp-btn-segment-item {
  white-space: nowrap;
}
.mlh-toolbar-unified.pl-top-toolbar--list {
  display: grid;
  gap: 8px 10px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  flex-wrap: unset;
  overflow: visible;
}
.mlh-toolbar-unified--master.pl-top-toolbar--list {
  grid-template-columns:
    auto
    minmax(108px, 1.35fr)
    minmax(92px, 0.72fr)
    minmax(92px, 0.72fr)
    auto
    auto;
}
.mlh-toolbar-unified--site.pl-top-toolbar--list {
  grid-template-columns: auto minmax(200px, 1fr);
  margin-bottom: 10px;
}
.mlh-toolbar-unified--site .mlh-tb-site {
  min-width: 0;
}
.mlh-toolbar {
  margin-bottom: 10px;
}
.mil-top-toolbar,
.mil-pane .pl-pane-body--list {
  overflow: visible;
}
.mil-toolbar-single.pl-top-toolbar--list:not(.mlh-toolbar-unified) {
  display: grid;
  grid-template-columns:
    minmax(108px, 1.35fr)
    minmax(92px, 0.72fr)
    minmax(92px, 0.72fr)
    auto
    auto;
  gap: 8px 10px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  flex-wrap: unset;
  overflow: visible;
}
.mil-toolbar-single .mil-tb-search,
.mil-toolbar-single .mil-tb-filter {
  min-width: 0;
}
.mil-toolbar-single .mil-tb-action {
  min-width: 0;
  width: auto;
}
.mil-toolbar-single .mil-tb-action .btn.erp-control-box {
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .mil-toolbar-single.pl-top-toolbar--list:not(.mlh-toolbar-unified) {
    grid-template-columns: 1fr 1fr;
  }
  .mil-toolbar-single .mil-tb-search {
    grid-column: 1 / -1;
  }
  .mlh-toolbar-unified--master.pl-top-toolbar--list {
    grid-template-columns: 1fr 1fr;
  }
  .mlh-toolbar-unified--master .mlh-tb-segment {
    grid-column: 1 / -1;
  }
  .mlh-toolbar-unified--master .mil-tb-search {
    grid-column: 1 / -1;
  }
  .mlh-toolbar-unified--site.pl-top-toolbar--list {
    grid-template-columns: 1fr;
  }
  .mlh-toolbar-unified--site .mlh-tb-segment {
    grid-column: 1 / -1;
  }
}
.mil-pane .pl-top--list-toolbar {
  margin-bottom: 8px;
}
.mil-hint {
  margin: 0 0 10px;
}
.mil-name-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: #000000 !important;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mil-name-link:hover {
  color: #3949ab !important;
}
.mil-detail-panel {
  position: relative;
  margin: 12px 0 16px;
  max-width: 720px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
}
.mil-detail-body p {
  margin: 0 0 8px;
  color: #000000;
  font-weight: 600;
}
.mil-detail-audit-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--erp-control-box-border, #64748b);
}
.mil-detail-audit {
  margin: 0 0 6px !important;
  font-weight: 600;
  color: #000000 !important;
}
.mil-table-wrap.mlh-table-wrap {
  max-height: min(calc(100vh - 280px), 720px);
}
.mil-register-table.pl-table--register {
  width: 100%;
  table-layout: auto !important;
}
.mil-register-table.pl-table--register th:nth-child(1),
.mil-register-table.pl-table--register td:nth-child(1) {
  width: auto;
  min-width: 140px;
  white-space: normal;
  word-break: break-word;
}
.mil-register-table.pl-table--register th:nth-child(2),
.mil-register-table.pl-table--register td:nth-child(2),
.mil-register-table.pl-table--register th:nth-child(3),
.mil-register-table.pl-table--register td:nth-child(3) {
  width: auto;
  white-space: normal;
  word-break: break-word;
}
.mil-register-table.pl-table--register .mil-th-compact,
.mil-register-table.pl-table--register .mil-td-compact {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.mil-register-table.pl-table--register {
  --erp-reg-r1: 220px;
}
.mil-register-table.pl-table--register th.pl-reg-col-actions,
.mil-register-table.pl-table--register td.pl-reg-col-actions,
.mil-register-table.pl-table--register th:nth-child(8),
.mil-register-table.pl-table--register td:nth-child(8) {
  width: auto;
  min-width: 280px;
  white-space: nowrap;
  vertical-align: middle;
}
.mil-td-actions .mil-action-stack,
.ul-td-actions .ul-action-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
.mil-td-actions .btn.erp-control-box,
.ul-td-actions .btn.erp-control-box {
  width: auto !important;
  max-width: none;
  flex: 0 0 auto;
}
.mil-empty-cell {
  color: #64748b !important;
  font-weight: 600 !important;
}

/* Unit library â€” Party/Material-style register (4 columns) */
.ul-page.pl-shell--list {
  width: 100%;
  max-width: 100%;
}
.ul-page .pl-pane-inner--list,
.ul-page .pl-pane-body--list {
  width: 100%;
  max-width: 100%;
}
.ul-top-toolbar,
.ul-page .pl-pane-body--list {
  overflow: visible;
}
.ul-toolbar-single.pl-top-toolbar--list,
.mcl-toolbar-single.pl-top-toolbar--list {
  display: grid;
  grid-template-columns:
    minmax(160px, 220px)
    minmax(108px, 132px)
    minmax(108px, 132px)
    minmax(140px, 180px)
    auto
    auto;
  gap: 8px 10px;
  align-items: end;
  width: auto;
  max-width: 100%;
  flex-wrap: unset;
  overflow: visible;
}
.mcl-toolbar-single.pl-top-toolbar--list {
  grid-template-columns:
    minmax(160px, 220px)
    minmax(108px, 132px)
    minmax(160px, 220px)
    minmax(160px, 220px)
    auto;
}
.ul-toolbar-single .ul-tb-search {
  min-width: 0;
}
.ul-toolbar-single .ul-tb-filter {
  min-width: 0;
}
.ul-toolbar-single .ul-tb-newname {
  min-width: 0;
}
.ul-toolbar-single .ul-tb-action {
  min-width: 0;
  width: auto;
}
.ul-toolbar-single .ul-tb-action .btn.erp-control-box {
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .ul-toolbar-single.pl-top-toolbar--list {
    grid-template-columns: 1fr 1fr;
  }
  .ul-toolbar-single .ul-tb-search {
    grid-column: 1 / -1;
  }
  .ul-toolbar-single .ul-tb-newname {
    grid-column: 1 / -1;
  }
}
.ul-hint {
  margin: 0 0 10px;
}
.ul-table-wrap.mlh-table-wrap,
.mlh-table-wrap--compact.pl-table-wrap--register {
  max-height: min(calc(100vh - 280px), 720px);
  width: 100%;
  max-width: 100%;
  overflow: auto;
}
.ul-register-table.pl-table--register,
.mcl-register-table.pl-table--register {
  --erp-reg-r1: 280px;
  width: 100% !important;
  min-width: 820px;
  max-width: none !important;
  table-layout: auto !important;
}
.ul-register-table.pl-table--register th,
.ul-register-table.pl-table--register td,
.mcl-register-table.pl-table--register th,
.mcl-register-table.pl-table--register td {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.ul-register-table.pl-table--register th:nth-child(1),
.ul-register-table.pl-table--register td:nth-child(1),
.mcl-register-table.pl-table--register th:nth-child(1),
.mcl-register-table.pl-table--register td:nth-child(1) {
  width: auto;
  min-width: 160px;
  white-space: nowrap !important;
  word-break: keep-all;
}
.ul-register-table.pl-table--register th:nth-child(2),
.ul-register-table.pl-table--register td:nth-child(2),
.mcl-register-table.pl-table--register th:nth-child(2),
.mcl-register-table.pl-table--register td:nth-child(2),
.mcl-register-table.pl-table--register th:nth-child(3),
.mcl-register-table.pl-table--register td:nth-child(3) {
  width: auto;
  min-width: 120px;
  white-space: nowrap !important;
}
.ul-register-table.pl-table--register th.ul-th-linked,
.ul-register-table.pl-table--register td.ul-td-linked,
.mcl-register-table.pl-table--register th.ul-th-linked,
.mcl-register-table.pl-table--register td.ul-td-linked {
  width: auto;
  min-width: 176px;
  padding-right: 16px;
  white-space: nowrap !important;
  overflow: visible !important;
}
.ul-register-table.pl-table--register th.pl-reg-col-actions,
.ul-register-table.pl-table--register td.pl-reg-col-actions,
.mcl-register-table.pl-table--register th.pl-reg-col-actions,
.mcl-register-table.pl-table--register td.pl-reg-col-actions {
  width: auto !important;
  min-width: 220px;
  white-space: nowrap !important;
}
.ul-register-table.pl-table--register thead th.erp-reg-freeze-left,
.ul-register-table.pl-table--register thead th.erp-reg-freeze-r1,
.mcl-register-table.pl-table--register thead th.erp-reg-freeze-left,
.mcl-register-table.pl-table--register thead th.erp-reg-freeze-r1 {
  z-index: 5;
  background: #f8fafc;
}
.ul-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-left,
.ul-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-r1,
.mcl-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-left,
.mcl-register-table.pl-table--register tbody tr:nth-child(even) td.erp-reg-freeze-r1 {
  background: #fafafa;
}
.ul-td-actions .btn.erp-control-box,
.mcl-register-table .mlh-td-actions .btn.erp-control-box {
  width: auto !important;
  max-width: none;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.mlh-page .pl-shell-kpis {
  flex-wrap: wrap;
}
.mlh-toolbar .erp-filter-field {
  min-width: min(420px, 100%);
}
.mlh-table-wrap.pl-table-wrap--register {
  max-height: min(calc(100vh - 240px), 720px);
}
.mlh-register-table.pl-table--register th:nth-child(1),
.mlh-register-table.pl-table--register td:nth-child(1) {
  width: 16%;
  white-space: normal;
  word-break: break-word;
}
.mlh-register-table.pl-table--register th:nth-child(2),
.mlh-register-table.pl-table--register td:nth-child(2) {
  width: 12%;
  white-space: normal;
}
.mlh-register-table.pl-table--register th:nth-child(3),
.mlh-register-table.pl-table--register td:nth-child(3) {
  width: 14%;
  white-space: normal;
}
.mlh-register-table.pl-table--register th:nth-child(4),
.mlh-register-table.pl-table--register td:nth-child(4) {
  width: 6%;
}
.mlh-register-table.pl-table--register th:nth-child(5),
.mlh-register-table.pl-table--register td:nth-child(5) {
  width: 10%;
}
.mlh-register-table.pl-table--register th:nth-child(6),
.mlh-register-table.pl-table--register td:nth-child(6) {
  width: 8%;
}
.mlh-register-table.pl-table--register th:nth-child(7),
.mlh-register-table.pl-table--register td:nth-child(7) {
  width: 14%;
  white-space: normal;
}
.mlh-register-table.pl-table--register th:nth-child(8),
.mlh-register-table.pl-table--register td:nth-child(8) {
  width: 9%;
}
.mlh-register-table.pl-table--register th:nth-child(9),
.mlh-register-table.pl-table--register td:nth-child(9) {
  width: 11%;
  white-space: normal;
}
.mlh-td-name {
  font-weight: 800 !important;
  color: #000 !important;
}
.mlh-td-num,
.mlh-th-num {
  text-align: right !important;
}
.mlh-td-unit {
  text-align: center !important;
}
.mlh-td-actions {
  text-align: right !important;
}
.mlh-td-actions .mlh-pass {
  min-height: 32px !important;
  height: 32px !important;
  font-size: 11px !important;
  padding: 0 10px !important;
}
.mlh-cap-input {
  width: 100%;
  max-width: 112px;
  min-height: 40px !important;
  height: 40px !important;
  text-align: right;
  box-sizing: border-box;
}
.mlh-boq-cap-hint {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.35;
}
.mlh-qty {
  font-weight: 800 !important;
  color: #000 !important;
}
.mlh-unlimited {
  font-weight: 700 !important;
  color: #475569 !important;
}
.mlh-dash {
  color: #64748b !important;
  font-weight: 700;
}
.mlh-pill--boq {
  background: #eef2ff;
  border-color: #818cf8;
  color: #312e81 !important;
  white-space: normal;
  line-height: 1.25;
  max-width: 100%;
}
.mlh-pill--nonboq {
  background: #f0fdf4;
  border-color: #86efac;
  color: #14532d !important;
  white-space: normal;
}
.mlh-pill--returnable {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412 !important;
  white-space: normal;
}
.mlh-site-warn {
  margin-top: 8px;
}
.mlh-action-hint {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b !important;
  line-height: 1.35;
  max-width: 120px;
  margin-left: auto;
  text-align: right;
}
.mlh-td-actions .mlh-pass {
  white-space: nowrap;
}

/* Purchase Item Master Hub v1.72 â€” ribbon + badges */
.erp-purchase-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ede7f6 0%, #f5f3ff 55%, #fff 100%);
  border: 1px solid #b39ddb;
}
.erp-purchase-ribbon-tab {
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--erp-control-box-border, #64748b);
  background: #fff;
  color: #000 !important;
  font-weight: 800;
  cursor: default;
}
.erp-purchase-ribbon-tab--active {
  background: #3949ab !important;
  color: #fff !important;
  border-color: #3949ab;
}
.erp-badge-unverified {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e !important;
  font-weight: 800;
  border: 1px solid #f59e0b;
}
.erp-badge-verified {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534 !important;
  font-weight: 800;
  border: 1px solid #86efac;
}
.pm-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1200;
}
#pmItemCreateDrawer:not([hidden]),
#bmpPartyIntakeDrawer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}
#pmItemCreateDrawer:not([hidden]) .pm-drawer-backdrop,
#pmItemCreateDrawer:not([hidden]) .pm-item-create-drawer,
#bmpPartyIntakeDrawer:not([hidden]) .pm-drawer-backdrop,
#bmpPartyIntakeDrawer:not([hidden]) .pm-item-create-drawer {
  pointer-events: auto;
}
.pm-item-create-drawer.pm-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  right: auto;
  max-width: 520px;
  width: min(520px, calc(100vw - 24px));
  z-index: 1201;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 640px);
  overflow: hidden;
  border: var(--erp-control-box-border, 1px solid #64748b);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}
.pm-drawer-head {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.pm-drawer-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800 !important;
  color: #000000 !important;
  line-height: 1.3;
}
.pm-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.pm-drawer-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0 0 10px;
  min-width: 0;
}
.pm-drawer-field .erp-filter-lbl {
  min-height: 2.5em;
  margin: 0 0 4px;
}
.pm-drawer-field .erp-control-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.pm-drawer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 2px;
}
.pm-drawer-field--half {
  margin-bottom: 10px;
  min-width: 0;
}
.pm-drawer-inline-create {
  margin: 0 0 12px;
  padding: 10px;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  background: #f8fafc;
}
.pm-drawer-suggest {
  margin-top: 4px;
  max-height: 160px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #64748b;
  border-radius: 6px;
}
.pm-drawer-suggest-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
.pm-drawer-suggest-row:hover {
  background: #eff6ff;
}
.pm-drawer-pick {
  max-height: 168px;
  overflow-y: auto;
  margin: 0 0 12px;
  border: 1px solid #64748b;
  border-radius: 6px;
  background: #fff;
}
.pm-drawer-pick-empty {
  margin: 0;
  padding: 8px;
  font-weight: 700;
  color: #991b1b !important;
}
.pm-drawer-pick-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 8px 10px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 700;
  color: #000 !important;
  cursor: pointer;
}
.pm-drawer-pick-row:last-child {
  border-bottom: none;
}
.pm-drawer-pick-row:hover {
  background: #eff6ff;
}
.pm-drawer-pick-row.is-selected {
  background: #3949ab;
  color: #fff !important;
}
.pm-drawer-picked {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.pm-drawer-picked-name {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--erp-control-box-height, 40px);
  height: var(--erp-control-box-height, 40px);
  box-sizing: border-box;
  border: var(--erp-control-box-border);
  border-radius: 6px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  font-weight: 800;
  color: #000 !important;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-drawer-foot.erp-tab-actions {
  flex-shrink: 0;
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
  justify-content: flex-end;
}
