/* Batch99: final ERP workbench layer. Loaded last so legacy module styles stay
   intact while shared layout, density and focus behavior are normalized. */
:root {
  --erp-canvas: #f4f7fb;
  --erp-surface: #ffffff;
  --erp-border: #dbe4ef;
  --erp-border-strong: #c6d4e3;
  --erp-ink: #1f3045;
  --erp-muted: #6f7f92;
  --erp-accent: #1769aa;
  --erp-accent-soft: #eaf4fc;
  --erp-radius: 8px;
}

body.erp-mode { background: var(--erp-canvas); color: var(--erp-ink); }
body.erp-mode .erp-shell { min-height: 100vh; }
body.erp-mode .erp-app, body.erp-mode .erp-content, body.erp-mode .erp-page { min-width: 0; }
body.erp-mode .erp-topbar { min-height: 64px; padding-inline: clamp(14px, 2vw, 28px); border-bottom: 1px solid var(--erp-border); background: rgba(255,255,255,.96); box-shadow: 0 2px 10px rgba(24,53,86,.05); }
body.erp-mode .erp-topbar-left, body.erp-mode .erp-topbar-right { min-width: 0; }
body.erp-mode .erp-breadcrumb { min-width: 0; }
body.erp-mode .erp-breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.erp-mode .erp-topbar-right { gap: 8px; flex-wrap: nowrap; }
body.erp-mode .erp-status-pill, body.erp-mode .erp-date-chip { white-space: nowrap; }
body.erp-mode .erp-content { padding: clamp(14px, 2vw, 28px); }
body.erp-mode .card, body.erp-mode .erp-panel, body.erp-mode .erp-module-card, body.erp-mode .control-filter-group, body.erp-mode .control-filter-advanced { border-radius: var(--erp-radius); box-shadow: 0 3px 14px rgba(28,55,88,.045); }
body.erp-mode .card { border-color: var(--erp-border); }
body.erp-mode .step-title { align-items: flex-start; gap: 12px; }
body.erp-mode .step-title p { max-width: 78ch; color: var(--erp-muted); }
body.erp-mode button, body.erp-mode input, body.erp-mode select, body.erp-mode textarea { font: inherit; }
body.erp-mode button { border-radius: 6px; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
body.erp-mode button:focus-visible, body.erp-mode input:focus-visible, body.erp-mode select:focus-visible, body.erp-mode textarea:focus-visible, body.erp-mode summary:focus-visible { outline: 3px solid rgba(23,105,170,.2); outline-offset: 2px; }

/* Keep controls compact and aligned on the control center. */
body.erp-mode .control-filter-panel { display: grid; gap: 10px; }
body.erp-mode .control-filter-group { padding: 12px 14px; background: var(--erp-surface); }
body.erp-mode .control-filter-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
body.erp-mode .control-filter-group-head span { color: var(--erp-muted); font-size: 11px; }
body.erp-mode .control-filter-grid { align-items: end; gap: 9px; }
body.erp-mode .control-filter-grid label { min-width: 0; }
body.erp-mode .control-filter-grid input, body.erp-mode .control-filter-grid select { min-width: 0; width: 100%; }
body.erp-mode .control-unified-timebar { align-items: end; gap: 9px; }
body.erp-mode .control-quick-date-buttons { flex-wrap: wrap; gap: 5px; }
body.erp-mode .control-quick-date-buttons button { min-height: 31px; padding-inline: 9px; }
body.erp-mode .control-filter-advanced { overflow: hidden; background: #fbfdff; }
body.erp-mode .control-filter-advanced > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 9px 13px; cursor: pointer; list-style: none; }
body.erp-mode .control-filter-advanced > summary::-webkit-details-marker { display: none; }
body.erp-mode .control-filter-advanced > summary b { display: block; font-size: 12px; }
body.erp-mode .control-filter-advanced > summary small { display: block; margin-top: 2px; color: var(--erp-muted); font-size: 10px; font-weight: 400; }
body.erp-mode .control-filter-summary-action { color: var(--erp-accent); font-size: 10px; white-space: nowrap; }
body.erp-mode .control-filter-advanced-grid { padding: 0 13px 13px; }
body.erp-mode .control-action-bar { align-items: center; gap: 10px; padding-top: 2px; }
body.erp-mode .control-action-primary, body.erp-mode .control-action-secondary { min-width: 0; flex-wrap: wrap; gap: 6px; }
body.erp-mode .control-active-filters { min-height: 0; }
body.erp-mode .control-display-wrap { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; border: 1px solid var(--erp-border); border-radius: var(--erp-radius); background: #fff; }
body.erp-mode .control-display-wrap table { min-width: max(100%, 1060px); }
body.erp-mode .control-display-wrap th { position: sticky; top: 0; z-index: 3; }
body.erp-mode .control-display-wrap td, body.erp-mode .control-display-wrap th { line-height: 1.35; }

/* Warehouse: only the table scrolls; grid ancestors must be allowed to shrink. */
body.erp-mode .wp-shell, body.erp-mode .wp-pane, body.erp-mode .wp-toolbar, body.erp-mode .wp-hero, body.erp-mode .wp-kpis { min-width: 0; }
body.erp-mode .wp-shell { gap: 12px; }
body.erp-mode .wp-hero { padding: 18px 20px; border-radius: var(--erp-radius); background: #fff; box-shadow: 0 3px 14px rgba(28,55,88,.045); }
body.erp-mode .wp-kpis { gap: 8px; }
body.erp-mode .wp-kpis article { min-width: 0; padding: 12px 13px; border-radius: var(--erp-radius); box-shadow: none; }
body.erp-mode .wp-kpis b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.erp-mode .wp-table-wrap { max-width: 100%; min-width: 0; border-radius: var(--erp-radius); }
body.erp-mode .wp-table-wrap table { width: max(100%, 1080px); }
body.erp-mode .wp-actions { min-width: 0; }
body.erp-mode .wp-actions button { min-height: 30px; }
body.erp-mode .wp-history-tip { align-items: center; justify-content: space-between; }
body.erp-mode .wp-history-tip > div { display: grid; gap: 3px; min-width: 0; }
body.erp-mode .wp-history-tip span { color: var(--erp-muted); font-size: 11px; }
body.erp-mode .wp-history-wrap table { min-width: 1180px; }
body.erp-mode .wp-history-assignment { min-width: 190px; max-width: 280px; }
body.erp-mode .wp-history-machine { display: block; color: #36516e; line-height: 1.5; }
body.erp-mode .wp-history-empty { color: #8995a5; }
body.erp-mode .wp-history-status { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }
body.erp-mode .wp-history-status.changed { background: #eaf8f1; color: #19734e; }
body.erp-mode .wp-history-status.unchanged { background: #fff6df; color: #986a12; }
body.erp-mode .wp-history-message { display: block; max-width: 200px; margin-top: 5px; color: var(--erp-muted); line-height: 1.45; white-space: normal; }

/* Warehouse operation results stay in the user's current context. The node is
   mounted under body so interface zoom and table scrolling cannot move it. */
body.erp-mode > .wp-result {
  position: fixed;
  top: 78px;
  right: 20px;
  z-index: 1250;
  width: min(480px, calc(100vw - 32px));
  max-height: min(46vh, 360px);
  overflow: auto;
  margin: 0;
  padding: 13px 14px;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23,48,78,.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .18s ease, transform .18s ease;
}
body.erp-mode > .wp-result.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
body.erp-mode > .wp-result > div { min-width: 0; }
body.erp-mode > .wp-result #wpResultMessage { overflow-wrap: anywhere; }
body.erp-mode > .wp-result #wpResultDetail { margin-top: 4px; }
body.erp-mode > .wp-result #wpResultClose { flex: 0 0 auto; }

/* Live state is a status indicator, not a blocking notification. */
body.erp-mode .erp-realtime-status { display: inline-flex; align-items: center; gap: 6px; max-width: 210px; min-height: 28px; padding: 0 8px; border: 1px solid var(--erp-border); border-radius: 999px; background: #f8fbfe; color: var(--erp-muted); font-size: 10px; white-space: nowrap; }
body.erp-mode .erp-realtime-status > i { width: 7px; height: 7px; border-radius: 50%; background: #22a06b; flex: 0 0 auto; }
body.erp-mode .erp-realtime-status span { overflow: hidden; text-overflow: ellipsis; }
body.erp-mode .erp-realtime-status button { min-height: 22px; padding: 1px 6px; border: 1px solid #b9cfe4; background: #fff; color: var(--erp-accent); font-size: 10px; }
body.erp-mode .erp-realtime-status.is-updating { border-color: #b8d7ef; background: #f0f8ff; color: #22679a; }
body.erp-mode .erp-realtime-status.is-updating > i { background: #2c82c9; animation: erpPulse 1s ease-in-out infinite; }
body.erp-mode .erp-realtime-status.is-draft, body.erp-mode .erp-realtime-status.is-partial { border-color: #edd49d; background: #fffaf0; color: #8b6315; }
body.erp-mode .erp-realtime-status.is-draft > i, body.erp-mode .erp-realtime-status.is-partial > i { background: #d99a20; }
body.erp-mode .erp-realtime-status.is-error { border-color: #edc1c8; background: #fff5f6; color: #a03745; }
body.erp-mode .erp-realtime-status.is-error > i { background: #d64e60; }
@keyframes erpPulse { 50% { opacity: .35; transform: scale(.72); } }

@media (max-width: 1040px) {
  body.erp-mode .erp-topbar-right .erp-date-chip { display: none; }
  body.erp-mode .control-action-secondary { width: 100%; }
}
@media (max-width: 760px) {
  body.erp-mode .erp-content { padding: 10px; }
  body.erp-mode .erp-topbar { padding-inline: 10px; }
  body.erp-mode .erp-topbar-right .erp-status-pill { display: none; }
  body.erp-mode .erp-realtime-status { max-width: 130px; }
  body.erp-mode .control-filter-group-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  body.erp-mode .control-unified-filter-grid, body.erp-mode .control-statistics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.erp-mode .control-unified-filter-grid .grow { grid-column: 1 / -1; }
  body.erp-mode .control-unified-timebar { display: grid; grid-template-columns: minmax(0,1fr); }
  body.erp-mode .control-quick-date-buttons { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  body.erp-mode .control-action-bar { align-items: stretch; flex-direction: column; }
  body.erp-mode .control-action-primary, body.erp-mode .control-action-secondary { width: 100%; }
  body.erp-mode .control-action-primary button, body.erp-mode .control-action-secondary button { flex: 1 1 auto; }
  body.erp-mode .wp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.erp-mode .wp-hero { align-items: flex-start; }
  body.erp-mode .wp-history-tip { align-items: flex-start; flex-direction: column; }
  body.erp-mode > .wp-result { top: 68px; right: 10px; width: calc(100vw - 20px); max-height: 42vh; }
}
@media (prefers-reduced-motion: reduce) {
  body.erp-mode *, body.erp-mode *::before, body.erp-mode *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Batch102: warehouse preparation visual modes. Audit matrix is the default;
   blueprint and flow remain available as persisted operator views. */
body.erp-mode #warehousePrepPage > .erp-page-heading { display: none; }
body.erp-mode .wp-shell {
  --wp-blue: #1769e8;
  --wp-blue-soft: #eef5ff;
  --wp-green: #159a67;
  --wp-green-soft: #eaf8f2;
  --wp-amber: #c77a08;
  --wp-amber-soft: #fff6e7;
  --wp-red: #d34b56;
  --wp-red-soft: #fff0f1;
  gap: 10px;
  color: #1b2b42;
}
body.erp-mode .wp-hero {
  padding: 2px 2px 10px;
  border: 0;
  border-bottom: 1px solid var(--erp-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.erp-mode .wp-hero-copy > span { color: #4c76a7; font-size: 9px; letter-spacing: .17em; }
body.erp-mode .wp-hero-copy h2 { margin: 3px 0 3px; font-size: clamp(20px,2vw,27px); line-height: 1.2; letter-spacing: -.025em; }
body.erp-mode .wp-hero-copy p { max-width: 70ch; color: #708096; font-size: 12px; }
body.erp-mode .wp-hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
body.erp-mode .wp-view-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--erp-border); border-radius: 8px; background: #f4f7fb; }
body.erp-mode .wp-view-switch button { min-height: 30px; padding: 5px 10px; border: 0; background: transparent; color: #607188; font-size: 11px; font-weight: 700; }
body.erp-mode .wp-view-switch button:hover { background: #fff; color: var(--wp-blue); }
body.erp-mode .wp-view-switch button.active { background: #fff; color: var(--wp-blue); box-shadow: 0 1px 4px rgba(31,65,107,.12); }
body.erp-mode .wp-hero #wpRefresh, body.erp-mode #wpHistoryRefresh { min-height: 36px; padding-inline: 14px; box-shadow: none; }

body.erp-mode .wp-kpis {
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--erp-border);
  border-radius: 9px;
  background: #fff;
}
body.erp-mode .wp-kpis article { position: relative; padding: 13px 16px; border: 0; border-right: 1px solid #e6edf5; border-radius: 0; background: transparent; }
body.erp-mode .wp-kpis article:last-child { border-right: 0; }
body.erp-mode .wp-kpis article::before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2px; border-radius: 2px; background: #91a5bb; opacity: .65; }
body.erp-mode .wp-kpis article.sales::before, body.erp-mode .wp-kpis article.arranged::before { background: var(--wp-blue); }
body.erp-mode .wp-kpis article.outbound::before { background: var(--wp-green); }
body.erp-mode .wp-kpis article.inventory::before { background: #7588a0; }
body.erp-mode .wp-kpis article.exceptions::before { background: var(--wp-red); }
body.erp-mode .wp-kpis span { color: #5e7087; font-size: 11px; font-weight: 700; }
body.erp-mode .wp-kpis b { margin: 2px 0; color: #13243b; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
body.erp-mode .wp-kpis small { overflow: hidden; color: #8a98a9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

body.erp-mode .wp-tabs { gap: 0; padding: 0 4px; border-width: 0 0 1px; border-radius: 0; background: transparent; }
body.erp-mode .wp-tabs button { position: relative; min-height: 40px; padding: 8px 18px!important; border-radius: 0!important; font-weight: 700; }
body.erp-mode .wp-tabs button.active { background: transparent!important; box-shadow: none; }
body.erp-mode .wp-tabs button.active::after { content: ''; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; border-radius: 2px 2px 0 0; background: var(--wp-blue); }
body.erp-mode .wp-tabs b { min-width: 20px; height: 18px; background: #eef3f9; color: #6a7b90; }
body.erp-mode .wp-tabs button.active b { background: var(--wp-blue-soft); color: var(--wp-blue); }

body.erp-mode .wp-toolbar { align-items: center; padding: 2px 0; }
body.erp-mode .wp-toolbar label { position: relative; gap: 4px; width: min(520px,100%); color: #66788e; }
body.erp-mode .wp-toolbar input { height: 36px; padding-inline: 12px; border-radius: 7px; }
body.erp-mode .wp-toolbar > span { max-width: 58%; overflow: hidden; color: #8491a3; text-align: right; text-overflow: ellipsis; white-space: nowrap; }

body.erp-mode .wp-history-pane { min-width: 0; }
body.erp-mode .wp-history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--erp-border); }
body.erp-mode .wp-history-head > div { display: grid; gap: 2px; min-width: 0; }
body.erp-mode .wp-history-head > div > span { color: #4778b5; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
body.erp-mode .wp-history-head b { color: #1a2d46; font-size: 15px; }
body.erp-mode .wp-history-head small { color: #7a899d; font-size: 10px; }
body.erp-mode .wp-history-summary { display: flex; align-items: stretch; gap: 0; margin: 8px 0; overflow-x: auto; border: 1px solid var(--erp-border); border-radius: 8px; background: #fff; }
body.erp-mode .wp-history-summary > div { display: flex; align-items: baseline; gap: 8px; min-width: 132px; padding: 9px 14px; border-right: 1px solid #e7edf4; }
body.erp-mode .wp-history-summary > div:last-child { border-right: 0; }
body.erp-mode .wp-history-summary span { color: #718196; font-size: 10px; }
body.erp-mode .wp-history-summary b { color: #1f324b; font-size: 17px; font-variant-numeric: tabular-nums; }
body.erp-mode .wp-history-summary .changed b { color: var(--wp-green); }
body.erp-mode .wp-history-summary .unchanged b { color: var(--wp-amber); }
body.erp-mode .wp-history-summary .blocked b { color: var(--wp-red); }
body.erp-mode .wp-history-view { display: none; }
body.erp-mode .wp-shell[data-wp-theme="audit"] [data-wp-history-view="audit"],
body.erp-mode .wp-shell[data-wp-theme="blueprint"] [data-wp-history-view="blueprint"],
body.erp-mode .wp-shell[data-wp-theme="flow"] [data-wp-history-view="flow"] { display: block; }

body.erp-mode .wp-history-wrap { border-radius: 8px; }
body.erp-mode .wp-history-wrap table { min-width: 1120px; }
body.erp-mode .wp-history-wrap th { height: 38px; padding: 9px 12px; background: #f8fafc; color: #4d6078; font-size: 10px; }
body.erp-mode .wp-history-wrap td { padding: 10px 12px; font-size: 10px; vertical-align: middle; }
body.erp-mode .wp-history-row { position: relative; cursor: pointer; }
body.erp-mode .wp-history-row td:first-child { border-left: 3px solid #9cadbf; }
body.erp-mode .wp-history-row.changed td:first-child { border-left-color: var(--wp-green); }
body.erp-mode .wp-history-row.unchanged td:first-child { border-left-color: var(--wp-amber); }
body.erp-mode .wp-history-row.blocked td:first-child { border-left-color: var(--wp-red); }
body.erp-mode .wp-history-row:hover td, body.erp-mode .wp-history-blueprint tr[data-wp-history-select]:hover td { background: #f7faff; }
body.erp-mode .wp-history-row code, body.erp-mode .wp-history-row td:nth-child(3) code { display: block; margin-top: 3px; color: #5e7897; font-size: 9px; }
body.erp-mode .wp-machine-change { display: grid; grid-template-columns: minmax(180px,1fr) 52px minmax(180px,1fr); align-items: center; gap: 8px; }
body.erp-mode .wp-machine-change > div { display: grid; gap: 3px; min-width: 0; padding: 8px 9px; border-radius: 7px; background: #f6f9fc; }
body.erp-mode .wp-machine-change > div:last-child { background: #f0f8f5; }
body.erp-mode .wp-machine-change small, body.erp-mode .wp-inspector-machines small { color: #8290a2; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
body.erp-mode .wp-change-label { color: #7590ad; font-size: 9px; font-weight: 700; text-align: center; }
body.erp-mode .wp-history-machine { display: block; color: #35516e; line-height: 1.45; overflow-wrap: anywhere; }
body.erp-mode .wp-history-status { padding: 3px 7px; border: 1px solid transparent; border-radius: 5px; font-size: 9px; }
body.erp-mode .wp-history-status.changed { border-color: #bee8d4; background: var(--wp-green-soft); color: #14744f; }
body.erp-mode .wp-history-status.unchanged { border-color: #f2ddb3; background: var(--wp-amber-soft); color: #93600d; }
body.erp-mode .wp-history-status.blocked { border-color: #efc6cb; background: var(--wp-red-soft); color: #aa3541; }
body.erp-mode .wp-history-message { max-width: 210px; color: #7e8b9c; font-size: 9px; }

body.erp-mode .wp-history-flow { grid-template-columns: minmax(0,1.65fr) minmax(300px,.85fr); gap: 10px; }
body.erp-mode .wp-shell[data-wp-theme="flow"] [data-wp-history-view="flow"] { display: grid; }
body.erp-mode .wp-history-timeline, body.erp-mode .wp-history-inspector { min-width: 0; border: 1px solid var(--erp-border); border-radius: 8px; background: #fff; }
body.erp-mode .wp-history-timeline { max-height: 640px; overflow: auto; padding: 8px; }
body.erp-mode .wp-timeline-date { position: sticky; top: 0; z-index: 2; padding: 7px 8px; background: rgba(255,255,255,.96); color: #667990; font-size: 10px; font-weight: 800; }
body.erp-mode .wp-timeline-item { display: grid; grid-template-columns: 50px minmax(130px,.9fr) minmax(150px,1fr) 72px; align-items: center; gap: 10px; width: 100%; margin-bottom: 5px; padding: 10px; border: 1px solid transparent; border-left: 3px solid #a5b2c1; background: #fff; color: #2a3d55; text-align: left; }
body.erp-mode .wp-timeline-item.changed { border-left-color: var(--wp-green); }
body.erp-mode .wp-timeline-item.unchanged { border-left-color: var(--wp-amber); }
body.erp-mode .wp-timeline-item.blocked { border-left-color: var(--wp-red); }
body.erp-mode .wp-timeline-item:hover { border-color: #cfe0f3; background: #f8fbff; }
body.erp-mode .wp-timeline-item.selected { border-color: #8db8f2; background: #f1f7ff; box-shadow: 0 0 0 2px rgba(23,105,232,.07); }
body.erp-mode .wp-timeline-item time { color: #517198; font-size: 11px; font-variant-numeric: tabular-nums; }
body.erp-mode .wp-timeline-item > span { display: grid; gap: 3px; min-width: 0; }
body.erp-mode .wp-timeline-item b, body.erp-mode .wp-timeline-item small, body.erp-mode .wp-timeline-item .wp-timeline-machine { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.erp-mode .wp-timeline-item small { color: #8190a3; font-size: 9px; }
body.erp-mode .wp-timeline-item em { justify-self: end; color: #64768b; font-size: 9px; font-style: normal; font-weight: 800; }
body.erp-mode .wp-history-inspector { align-self: start; position: sticky; top: 72px; padding: 15px; }
body.erp-mode .wp-inspector-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #e7edf4; }
body.erp-mode .wp-inspector-title > div { display: grid; gap: 3px; }
body.erp-mode .wp-inspector-title > div > span { color: #74849a; font-size: 9px; }
body.erp-mode .wp-inspector-title > div > b { color: #1c2f48; font-size: 16px; }
body.erp-mode .wp-history-inspector dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 12px 0; }
body.erp-mode .wp-history-inspector dl > div { padding: 8px 0; border-bottom: 1px solid #edf1f5; }
body.erp-mode .wp-history-inspector dl > div:nth-child(odd) { padding-right: 10px; }
body.erp-mode .wp-history-inspector dt { color: #8b98a8; font-size: 8px; }
body.erp-mode .wp-history-inspector dd { margin: 3px 0 0; color: #30465f; font-size: 10px; overflow-wrap: anywhere; }
body.erp-mode .wp-inspector-machines { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
body.erp-mode .wp-inspector-machines section { min-width: 0; padding: 10px; border-radius: 7px; background: #f5f8fb; }
body.erp-mode .wp-inspector-machines section:last-child { background: #edf8f3; }
body.erp-mode .wp-inspector-reason { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e7edf4; }
body.erp-mode .wp-inspector-reason small { color: #8492a4; font-size: 8px; }
body.erp-mode .wp-inspector-reason p { margin: 5px 0 0; color: #52657c; font-size: 10px; line-height: 1.55; }
body.erp-mode .wp-history-empty-state { display: grid; min-height: 180px; place-items: center; color: #8795a6; font-size: 11px; }

body.erp-mode .wp-shell[data-wp-theme="blueprint"] .wp-history-summary { border-color: #d8e6f5; background: #f7fbff; }
body.erp-mode .wp-shell[data-wp-theme="blueprint"] .wp-history-head { border: 1px solid #d8e6f5; border-radius: 8px; background: #f4f9ff; }
body.erp-mode .wp-shell[data-wp-theme="blueprint"] .wp-history-blueprint .wp-history-wrap { box-shadow: 0 6px 18px rgba(31,64,102,.05); }

@media (max-width: 1000px) {
  body.erp-mode .wp-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body.erp-mode .wp-kpis article:nth-child(3) { border-right: 0; }
  body.erp-mode .wp-kpis article:nth-child(-n+3) { border-bottom: 1px solid #e6edf5; }
  body.erp-mode .wp-history-flow { grid-template-columns: 1fr; }
  body.erp-mode .wp-history-inspector { position: static; }
}
@media (max-width: 760px) {
  body.erp-mode .wp-hero { gap: 10px; }
  body.erp-mode .wp-hero-actions { width: 100%; justify-content: space-between; }
  body.erp-mode .wp-view-switch { max-width: 100%; overflow-x: auto; }
  body.erp-mode .wp-view-switch button { flex: 0 0 auto; }
  body.erp-mode .wp-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.erp-mode .wp-kpis article, body.erp-mode .wp-kpis article:nth-child(3) { border-right: 1px solid #e6edf5; border-bottom: 1px solid #e6edf5; }
  body.erp-mode .wp-kpis article:nth-child(even) { border-right: 0; }
  body.erp-mode .wp-kpis article:last-child { border-bottom: 0; }
  body.erp-mode .wp-toolbar > span { max-width: 100%; text-align: left; white-space: normal; }
  body.erp-mode .wp-history-head { align-items: flex-start; }
  body.erp-mode .wp-history-head small { display: block; }
  body.erp-mode .wp-history-summary > div { min-width: 112px; padding-inline: 10px; }
  body.erp-mode .wp-machine-change { grid-template-columns: minmax(150px,1fr) 44px minmax(150px,1fr); }
  body.erp-mode .wp-timeline-item { grid-template-columns: 44px minmax(120px,1fr) 72px; }
  body.erp-mode .wp-timeline-machine { display: none!important; }
  body.erp-mode .wp-history-inspector dl, body.erp-mode .wp-inspector-machines { grid-template-columns: 1fr; }
}
