/*
 * OpenDesign V8 — Phase 5 workflow and commercial screens.
 * Presentation only: the existing route, permission, workflow, validation,
 * calculation, upload and approval handlers remain authoritative.
 */

body.bms-opendesign-v8 #workflowStrip:not([hidden]) {
  position: sticky;
  z-index: 12;
  top: calc(var(--bms-topbar-height) + var(--bms-space-3));
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0 0 var(--bms-space-4);
  padding: 22px 18px 18px;
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: var(--bms-shadow-1);
  cursor: default;
  user-select: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #workflowStrip:not([hidden]) {
  position: relative;
  z-index: 1;
  top: auto;
}

body.bms-opendesign-v8 #workflowStrip .workflow-v8-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-4);
  padding: 0 6px 16px;
}

body.bms-opendesign-v8 #workflowStrip .workflow-v8-head strong {
  color: var(--bms-text);
  font: 700 18px/1.2 var(--bms-font-display);
}

body.bms-opendesign-v8 #workflowStrip .workflow-v8-project-identity {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8 #workflowStrip .workflow-v8-project-identity > strong {
  flex: 0 0 auto;
}

body.bms-opendesign-v8 #workflowStrip .workflow-v8-project-identity > span {
  min-width: 0;
  padding-left: var(--bms-space-3);
  overflow: hidden;
  border-left: 1px solid var(--bms-border);
  color: var(--bms-text-muted);
  font: 600 11px/1.3 var(--bms-font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bms-opendesign-v8 #workflowStrip .workflow-v8-head span {
  color: var(--bms-text-muted);
  font: 500 11px/1.3 var(--bms-font-ui);
}

body.bms-opendesign-v8 #workflowStrip .workflow-track {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(var(--workflow-step-count, 12), minmax(78px, 1fr));
  gap: 0;
  align-items: start;
  padding: 4px 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--bms-border-strong) transparent;
  scrollbar-width: auto;
  touch-action: pan-x;
}

body.bms-opendesign-v8 #workflowStrip .workflow-track::-webkit-scrollbar {
  height: 7px;
}

body.bms-opendesign-v8 #workflowStrip .workflow-track::-webkit-scrollbar-track {
  background: transparent;
}

body.bms-opendesign-v8 #workflowStrip .workflow-track::-webkit-scrollbar-thumb {
  border-radius: var(--bms-radius-round);
  background: var(--bms-border-strong);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.workflow-mobile-dashboard {
  display: none;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node {
  position: relative;
  display: grid;
  width: auto;
  min-width: 78px;
  grid-template-columns: minmax(0, 1fr);
  min-height: 68px;
  grid-template-rows: 31px auto;
  justify-items: center;
  gap: 4px;
  padding: 0 var(--bms-space-1);
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--bms-text);
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: none;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node::before {
  position: absolute;
  z-index: 0;
  top: 15.5px;
  left: calc(50% + 15.5px);
  width: calc(100% - 31px);
  height: 2px;
  border-radius: var(--bms-radius-round);
  background: var(--bms-border-strong);
  content: "";
}

body.bms-opendesign-v8 #workflowStrip .workflow-node::after {
  display: none;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node:last-child::before {
  width: 0;
}

body.bms-opendesign-v8 #workflowStrip .workflow-current-marker {
  position: absolute;
  z-index: 2;
  top: -5px;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border: 2px solid var(--bms-surface);
  border-radius: var(--bms-radius-round);
  background: var(--bms-primary);
  box-shadow: var(--bms-shadow-1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 2px solid var(--bms-border-strong);
  border-radius: var(--bms-radius-round);
  color: var(--bms-text-muted);
  background: var(--bms-surface);
  font: 700 11px/1 var(--bms-font-data);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node strong {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 26px;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  color: var(--bms-text-muted);
  font: 650 10px/1.25 var(--bms-font-ui);
  text-overflow: clip;
  white-space: normal;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node:is(:hover, :focus-visible) {
  color: var(--bms-primary);
  background: transparent;
  box-shadow: none;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node:is(:hover, :focus-visible) .workflow-node-number {
  border-color: var(--bms-primary);
  box-shadow: 0 0 0 4px var(--bms-primary-soft);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node:focus-visible {
  outline: 2px solid var(--bms-focus);
  outline-offset: 3px;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-completed::before {
  background: var(--bms-success);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-completed .workflow-node-number {
  border-color: var(--bms-success);
  color: var(--bms-surface);
  background: var(--bms-success);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-completed strong {
  color: var(--bms-text);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-in_progress .workflow-node-number {
  border-color: var(--bms-primary);
  color: var(--bms-primary);
  background: var(--bms-surface);
  box-shadow: 0 0 0 3px var(--bms-primary-soft);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.is-current .workflow-node-number {
  border-color: var(--bms-primary);
  color: var(--bms-surface);
  background: var(--bms-primary);
  box-shadow: 0 0 0 5px var(--bms-primary-soft);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-in_progress,
body.bms-opendesign-v8 #workflowStrip .workflow-node.is-current {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.is-current .workflow-current-marker {
  opacity: 1;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.is-current strong {
  color: var(--bms-text);
  font-weight: 750;
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-blocked .workflow-node-number {
  border-color: var(--bms-danger);
  color: var(--bms-danger);
  background: var(--bms-danger-soft);
}

body.bms-opendesign-v8 #workflowStrip .workflow-node.status-skipped .workflow-node-number {
  border-style: dashed;
  color: var(--bms-text-subtle);
}

body.bms-opendesign-v8 #workflowStrip .workflow-action-dot {
  position: absolute;
  z-index: 2;
  top: 0;
  right: calc(50% - 22px);
}

body.bms-opendesign-v8 #workflowStrip .workflow-current-bar {
  display: none;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-section {
  min-width: 0;
  grid-column: 1 / -1;
  padding: var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
}

body.bms-opendesign-v8 .panel[data-panel="project"] :is(#projectQueueSection, .project-editor-section)[hidden] {
  display: none;
}

body.bms-opendesign-v8 .panel[data-panel="project"].project-hub-mode {
  grid-template-columns: minmax(0, 1fr);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .dashboard-queue-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--bms-space-4);
  margin: 0 0 var(--bms-space-3);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .dashboard-queue-heading > div > span {
  color: var(--bms-text-subtle);
  font: 650 10px/1 var(--bms-font-data);
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .dashboard-queue-heading h3 {
  margin: var(--bms-space-2) 0 0;
  color: var(--bms-text);
  font: 700 20px/1.2 var(--bms-font-display);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions {
  display: flex;
  align-items: center;
  gap: var(--bms-space-2);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions .search-box {
  min-width: min(360px, 38vw);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions .btn {
  height: 40px;
  min-height: 40px;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 0;
  border-radius: 0;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-table-wrap table {
  min-width: 980px;
}

body.bms-opendesign-v8 .panel[data-panel="project"].active {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr);
  align-items: start;
  gap: var(--bms-space-3);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .project-document-form[hidden] {
  display: none;
}

body.bms-opendesign-v8 .panel[data-panel="project"] > :is(div, .project-documents-panel),
body.bms-opendesign-v8 .panel[data-panel="costing"],
body.bms-opendesign-v8 .panel[data-panel="summary"],
body.bms-opendesign-v8 .panel[data-panel="quotation"],
body.bms-opendesign-v8 .panel[data-panel="approval"] {
  min-width: 0;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: var(--bms-shadow-1);
}

body.bms-opendesign-v8 .panel[data-panel="project"] > :is(div, .project-documents-panel) {
  padding: var(--bms-space-5);
}

body.bms-opendesign-v8 .panel[data-panel="costing"],
body.bms-opendesign-v8 .panel[data-panel="summary"],
body.bms-opendesign-v8 .panel[data-panel="quotation"],
body.bms-opendesign-v8 .panel[data-panel="approval"] {
  padding: var(--bms-space-5);
}

body.bms-opendesign-v8 .panel[data-panel] > header.workflow-page-title[data-workflow-page-title],
body.bms-opendesign-v8 .panel[data-panel="project"] > div > .workflow-page-title {
  display: flex;
  height: auto;
  min-height: 70px;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--bms-space-4);
  margin: 0 0 var(--bms-space-5);
  padding: 0 0 var(--bms-space-4);
  border-bottom: 1px solid var(--bms-border);
  background: transparent;
}

body.bms-opendesign-v8 .panel[data-panel] > header.workflow-page-title h2,
body.bms-opendesign-v8 .panel[data-panel="project"] .workflow-page-title h2 {
  margin: 0;
  color: var(--bms-text);
  font: 750 23px/1.2 var(--bms-font-display);
  letter-spacing: -.025em;
}

/* These panels share the exact content origin of the BTGV and Quotation panels. */
body.bms-opendesign-v8 :is(
  .panel[data-panel="approval"],
  .panel[data-panel="production-plan"],
  .panel[data-panel="production-execution"],
  .panel[data-panel="receivables"],
  .panel[data-panel="documents"]
) {
  padding: var(--bms-space-5);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bms-space-4);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .form-grid label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--bms-text-muted);
  font: 600 11px/1.3 var(--bms-font-ui);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .form-grid .span-2 {
  grid-column: 1 / -1;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-group {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--bms-text-muted);
  font: 600 11px/1.3 var(--bms-font-ui);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-controls {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: var(--bms-space-3);
  min-width: 0;
  height: var(--bms-control-standard);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .form-grid .xop-vat-toggle {
  display: flex;
  height: 100%;
  align-items: center;
  gap: var(--bms-space-2);
  padding-right: var(--bms-space-3);
  border-right: 1px solid var(--bms-border);
  color: var(--bms-text);
  cursor: pointer;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-toggle input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--bms-primary);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-rate {
  min-width: 0;
  transition: opacity var(--bms-duration-fast) var(--bms-ease-standard);
}

body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-group.is-vat-off .xop-vat-rate {
  opacity: .5;
}

body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-rate input:disabled {
  cursor: not-allowed;
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .project-documents-panel {
  min-height: 360px;
  max-height: calc(100dvh - var(--bms-topbar-height) - 96px);
  gap: var(--bms-space-4);
}

body.bms-opendesign-v8 .project-documents-panel > header {
  padding-bottom: var(--bms-space-4);
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8 .project-documents-panel h3 {
  color: var(--bms-text);
  font: 700 18px/1.2 var(--bms-font-display);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .panel[data-panel="project"].active {
  grid-template-columns: minmax(0, 1fr);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .panel[data-panel="project"] :is(#projectDocumentsPanel, #projectAiAnalysisPanel) {
  display: none;
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .solution-area-title,
body.bms-opendesign-v8 .panel[data-panel="costing"] .btgv-area-title {
  margin: 0 0 var(--bms-space-3);
  color: var(--bms-text-subtle);
  font: 750 10px/1 var(--bms-font-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .solution-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .solution-card,
body.bms-opendesign-v8 .panel[data-panel="costing"] .product-overview,
body.bms-opendesign-v8 .panel[data-panel="costing"] .costing-layout > :is(.table-wrap, .summary-box),
body.bms-opendesign-v8 .panel[data-panel="costing"] .cost-reference-panel {
  min-width: 0;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface);
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .solution-card {
  padding: var(--bms-space-4);
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .solution-attach-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .btgv-section-divider {
  height: 1px;
  margin: var(--bms-space-5) 0;
  background: var(--bms-border);
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .btgv-overview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--bms-space-3);
  margin-bottom: var(--bms-space-3);
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .product-overview {
  margin-bottom: var(--bms-space-3);
  padding: var(--bms-space-3);
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .costing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: start;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .costing-layout > .table-wrap {
  max-width: 100%;
  max-height: 560px;
  overflow: auto;
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .costing-layout table {
  min-width: 1080px;
}

body.bms-opendesign-v8 .panel[data-panel="costing"] .summary-box {
  position: sticky;
  top: calc(var(--bms-topbar-height) + 190px);
  padding: var(--bms-space-4);
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .panel[data-panel="summary"] #dealSummary {
  display: grid;
  gap: var(--bms-space-4);
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bms-space-3);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-context > div {
  display: grid;
  gap: 5px;
  padding: var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-context span,
body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-settings label > span {
  color: var(--bms-text-muted);
  font: 600 10px/1.2 var(--bms-font-ui);
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-context strong {
  overflow-wrap: anywhere;
  color: var(--bms-text);
  font: 700 14px/1.3 var(--bms-font-ui);
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--bms-space-3);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-settings > label {
  min-width: 0;
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-table-wrap {
  max-width: 100%;
  max-height: 580px;
  overflow: auto;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
}

body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-table {
  min-width: 1850px;
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-roadmap-card,
body.bms-opendesign-v8 .panel[data-panel="approval"] .quotation-roadmap-card {
  margin: 0 0 var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface-subtle);
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document {
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-header {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .55fr);
  gap: var(--bms-space-4);
  padding: var(--bms-space-5);
  border-bottom: 1px solid var(--bms-border);
  background: var(--bms-surface);
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-kicker,
body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-section-title span {
  color: var(--bms-text-subtle);
  font: 750 10px/1 var(--bms-font-ui);
  letter-spacing: .1em;
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-title,
body.bms-opendesign-v8 .panel[data-panel="quotation"] #quotationDocumentTitle {
  color: var(--bms-text);
  font-family: var(--bms-font-display);
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] :is(.quotation-document-meta, .quotation-party-grid, .quotation-export-grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-party-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--bms-space-4);
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-card {
  padding: var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] :is(.quotation-items-section, .quotation-export-section, .quotation-commercial-section) {
  padding: var(--bms-space-5);
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
}

body.bms-opendesign-v8 .panel[data-panel="documents"] .document-checklist {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="documents"] .document-step-detail .document-table-wrap {
  border: 0;
  border-radius: 0;
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-items-table {
  min-width: 960px;
}

body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-3);
  padding: var(--bms-space-4) var(--bms-space-5);
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-sheet {
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: none;
}

body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-sheet-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bms-space-3);
  padding: var(--bms-space-4);
}

body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-section {
  min-width: 0;
  padding: var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface-subtle);
}

body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-section h3 {
  margin: 0 0 var(--bms-space-3);
  color: var(--bms-text);
  font: 700 15px/1.25 var(--bms-font-display);
}

body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-4);
  padding: var(--bms-space-4);
  border-top: 1px solid var(--bms-border);
  background: var(--bms-surface);
}

body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--bms-space-2);
}

@media (max-width: 1279px) {
  body.bms-opendesign-v8 #workflowStrip .workflow-track {
    grid-template-columns: repeat(var(--workflow-step-count, 12), minmax(112px, 1fr));
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] .costing-layout {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] .summary-box {
    position: static;
  }

  body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-settings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  body.bms-opendesign-v8 .panel[data-panel="project"].active,
  body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-header {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8 .project-documents-panel {
    max-height: none;
  }

  body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-context,
  body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.bms-opendesign-v8 #workflowStrip:not([hidden]) {
    position: relative;
    top: auto;
    gap: var(--bms-space-2);
    margin-bottom: var(--bms-space-3);
    padding: var(--bms-space-3);
  }

  body.bms-opendesign-v8 #workflowStrip .workflow-v8-project-identity > strong {
    font-size: 13px;
  }

  body.bms-opendesign-v8 #workflowStrip .workflow-v8-head {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--bms-space-2);
  }

  body.bms-opendesign-v8 #workflowStrip .workflow-v8-project-identity {
    width: 100%;
  }

  body.bms-opendesign-v8 #workflowStrip .workflow-track {
    grid-template-columns: repeat(var(--workflow-step-count, 12), minmax(104px, 1fr));
    scroll-snap-type: x proximity;
  }

  body.bms-opendesign-v8 #workflowStrip .workflow-node {
    min-width: 104px;
    scroll-snap-align: center;
  }

  body.bms-opendesign-v8 #mobileWorkflowWheel {
    display: none;
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] .dashboard-queue-heading,
  body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions .search-box {
    min-width: 0;
    width: 100%;
    height: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions .btn {
    width: 100%;
    height: var(--bms-control-touch);
    min-height: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] :is(.cost-map-btn, .row-action) {
    min-width: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] :is(.product-input, .cost-input) {
    min-width: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] .product-semi-touch {
    display: grid;
    width: var(--bms-control-touch);
    min-width: var(--bms-control-touch);
    height: var(--bms-control-touch);
    place-items: center;
    cursor: pointer;
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] .product-semi-touch .product-semi-checkbox {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
  }

  body.bms-opendesign-v8 .panel[data-panel="documents"] :is(.mini-btn, button) {
    min-height: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] > :is(div, .project-documents-panel),
  body.bms-opendesign-v8 .panel[data-panel="costing"],
  body.bms-opendesign-v8 .panel[data-panel="summary"],
  body.bms-opendesign-v8 .panel[data-panel="quotation"],
  body.bms-opendesign-v8 .panel[data-panel="approval"] {
    padding: var(--bms-space-4);
  }

  body.bms-opendesign-v8 .panel[data-panel] > header.workflow-page-title[data-workflow-page-title],
  body.bms-opendesign-v8 .panel[data-panel="project"] > div > .workflow-page-title,
  body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-actions,
  body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-sheet-footer {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] .form-grid,
  body.bms-opendesign-v8 .panel[data-panel="costing"] .solution-two-col,
  body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-context,
  body.bms-opendesign-v8 .panel[data-panel="summary"] .deal-settings,
  body.bms-opendesign-v8 .panel[data-panel="quotation"] :is(.quotation-document-meta, .quotation-party-grid, .quotation-export-grid),
  body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-sheet-body {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] .form-grid .span-2 {
    grid-column: auto;
  }

  body.bms-opendesign-v8 .panel[data-panel="project"] .xop-vat-controls {
    height: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="quotation"] .quotation-document-header,
  body.bms-opendesign-v8 .panel[data-panel="quotation"] :is(.quotation-items-section, .quotation-export-section, .quotation-commercial-section) {
    padding: var(--bms-space-4);
  }

  body.bms-opendesign-v8 .panel[data-panel="approval"] .approval-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bms-opendesign-v8 #workflowStrip :is(.workflow-node, .workflow-current-marker) {
    transition: none;
    transform: none;
  }
}

/* Roadmap consumes the same V8 progress-node contract as the 12-step workflow.
 * Roadmap-only classes add document, attachment and quick-confirm semantics. */
body.bms-opendesign-v8 .quotation-roadmap-card {
  container-name: quotation-roadmap;
  container-type: inline-size;
  padding: var(--bms-space-4) var(--bms-space-4) var(--bms-space-3);
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: none;
}

@container quotation-roadmap (max-width: 1040px) {
  body.bms-opendesign-v8 .quotation-roadmap-card .quotation-roadmap-warning { display: none; }
}

body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-4);
  margin: 0;
  padding: 0 var(--bms-space-1) var(--bms-space-3);
}

body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head small {
  color: var(--bms-text-muted);
  font: 750 10px/1 var(--bms-font-data);
  letter-spacing: .08em;
}

body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--bms-primary);
  font: 700 11px/1.3 var(--bms-font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head > span {
  flex: none;
  color: var(--bms-text-muted);
  font: 500 10px/1.3 var(--bms-font-data);
}

body.bms-opendesign-v8 .quotation-roadmap-card .quotation-roadmap-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--bms-border-strong) transparent;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-track {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  padding: 7px 4px 5px;
  overflow: visible;
}

body.bms-opendesign-v8 .director-decision-dialog-card {
  padding: var(--bms-space-5);
  gap: var(--bms-space-4);
  color: var(--bms-text);
  background: var(--bms-surface);
}

body.bms-opendesign-v8 .director-decision-dialog-card > header {
  padding-bottom: var(--bms-space-3);
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8 .director-decision-dialog-card > header button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  color: var(--bms-text);
  background: var(--bms-surface);
  font: 700 22px/1 var(--bms-font-ui);
}

body.bms-opendesign-v8 .director-decision-dialog-card > header button:is(:hover, :focus-visible) {
  border-color: var(--bms-primary);
  color: var(--bms-primary);
  background: var(--bms-primary-soft);
  outline: 0;
}

body.bms-opendesign-v8 .director-decision-dialog-card textarea {
  border-color: var(--bms-border-strong);
  border-radius: var(--bms-radius-3);
  color: var(--bms-text);
  background: var(--bms-surface);
  font: 500 14px/1.45 var(--bms-font-ui);
}

body.bms-opendesign-v8 .director-decision-dialog-card footer {
  padding-top: var(--bms-space-3);
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node {
  position: relative;
  display: grid;
  width: auto;
  min-width: 78px;
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 31px auto;
  justify-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 var(--bms-space-1);
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--bms-text);
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: none;
  cursor: pointer;
  opacity: 1;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node::before {
  position: absolute;
  z-index: 0;
  top: 15.5px;
  left: calc(50% + 15.5px);
  width: calc(100% - 31px);
  height: 2px;
  border-radius: var(--bms-radius-round);
  background: var(--bms-border-strong);
  content: "";
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node::after,
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node:last-child::before { width: 0; content: none; }

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node-number {
  position: relative;
  z-index: 1;
  left: auto;
  bottom: auto;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  transform: none;
  border: 2px solid var(--bms-border-strong);
  border-radius: var(--bms-radius-round);
  color: var(--bms-text-muted);
  background: var(--bms-surface);
  box-shadow: none;
  font: 700 10px/1 var(--bms-font-data);
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node > strong {
  display: flex;
  width: 100%;
  min-height: 26px;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  color: var(--bms-text-muted);
  font: 650 10px/1.25 var(--bms-font-ui);
  white-space: normal;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node > small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-current-marker {
  position: absolute;
  z-index: 2;
  top: -5px;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border: 2px solid var(--bms-surface);
  border-radius: var(--bms-radius-round);
  background: var(--bms-primary);
  box-shadow: var(--bms-shadow-1);
  opacity: 0;
  pointer-events: none;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node:is(:hover, :focus-visible) {
  color: var(--bms-primary);
  background: transparent;
  box-shadow: none;
  transform: none;
  outline: 0;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node:is(:hover, :focus-visible) .workflow-node-number {
  border-color: var(--bms-primary);
  box-shadow: 0 0 0 4px var(--bms-primary-soft);
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node:focus-visible {
  outline: 2px solid var(--bms-focus);
  outline-offset: 3px;
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.status-completed::before { background: var(--bms-success); }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.status-completed .workflow-node-number { border-color: var(--bms-success); color: var(--bms-surface); background: var(--bms-success); }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.status-completed > strong { color: var(--bms-text); }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.status-blocked .workflow-node-number { border-color: var(--bms-danger); color: var(--bms-danger); background: var(--bms-danger-soft); }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.status-skipped .workflow-node-number { border-style: dashed; color: var(--bms-text-subtle); }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.is-current .workflow-node-number { border-color: var(--bms-primary); color: var(--bms-surface); background: var(--bms-primary); box-shadow: 0 0 0 5px var(--bms-primary-soft); }
body.bms-opendesign-v8 .panel[data-panel] .quotation-roadmap-card .quotation-roadmap-step.is-current > .workflow-node-number { border-color: var(--bms-primary); color: var(--bms-surface); background: var(--bms-primary); box-shadow: 0 0 0 5px var(--bms-primary-soft); }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.is-current .workflow-current-marker { opacity: 1; }
body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.is-current > strong { color: var(--bms-text); font-weight: 750; }

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node.is-document-missing .workflow-node-number {
  border-color: var(--bms-warning);
  color: var(--bms-warning);
  background: var(--bms-warning-soft);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bms-warning) 18%, transparent);
}

body.bms-opendesign-v8 .quotation-roadmap-card .quotation-roadmap-warning {
  position: absolute;
  z-index: 3;
  top: -7px;
  left: calc(50% + 20px);
  padding: 2px 5px;
  transform: none;
  border: 1px solid color-mix(in srgb, var(--bms-warning) 55%, var(--bms-border));
  border-radius: var(--bms-radius-round);
  color: var(--bms-warning);
  background: var(--bms-warning-soft);
  box-shadow: none;
  font: 750 8px/1.2 var(--bms-font-data);
  white-space: nowrap;
}

body.bms-opendesign-v8 .quotation-roadmap-card .quotation-roadmap-attachment {
  position: absolute;
  z-index: 2;
  top: -6px;
  right: calc(50% - 35px);
  padding: 1px 4px;
  border-radius: var(--bms-radius-round);
  color: var(--bms-text-muted);
  background: var(--bms-surface-subtle);
  font: 650 8px/1.2 var(--bms-font-data);
  font-style: normal;
}

body.bms-opendesign-v8 .quotation-roadmap-card .quotation-roadmap-quick-check:not(:disabled):hover {
  transform: none;
  border-color: var(--bms-primary);
  color: var(--bms-surface);
  background: var(--bms-primary);
}

@media (max-width: 900px), (max-width: 960px) and (max-height: 480px) {
  body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions .search-box,
  body.bms-opendesign-v8 .panel[data-panel="project"] .project-queue-actions .btn {
    height: var(--bms-control-touch);
    min-height: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="costing"] :is(.cost-map-btn, .row-action) {
    min-width: var(--bms-control-touch);
  }

  body.bms-opendesign-v8 .panel[data-panel="documents"] :is(.mini-btn, button) {
    min-height: var(--bms-control-touch);
  }
}

body.bms-opendesign-v8 .quotation-roadmap-card .workflow-node[aria-disabled="true"] { cursor: default; opacity: .72; }

body.bms-opendesign-v8 .quotation-roadmap-node-tip {
  position: fixed;
  z-index: 10020;
  padding: 5px 8px;
  transform: translate(-50%, -100%);
  border: 1px solid color-mix(in srgb, var(--bms-warning) 55%, var(--bms-border));
  border-radius: var(--bms-radius-1);
  color: var(--bms-warning);
  background: var(--bms-warning-soft);
  box-shadow: var(--bms-shadow-2);
  font: 700 10px/1.2 var(--bms-font-ui);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease, transform 120ms ease;
}

body.bms-opendesign-v8 .quotation-roadmap-node-tip.is-visible {
  transform: translate(-50%, calc(-100% - 3px));
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  body.bms-opendesign-v8 .panel[data-panel="summary"] .commercial-products-card {
    min-width: 0;
    max-width: 100%;
  }

  body.bms-opendesign-v8 .panel[data-panel="summary"] .commercial-products-card .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  body.bms-opendesign-v8 .quotation-roadmap-card { padding-inline: var(--bms-space-3); }
  body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head { align-items: flex-start; }
  body.bms-opendesign-v8 .quotation-roadmap-card > .workflow-v8-head > div { display: grid; gap: 4px; }
  body.bms-opendesign-v8 .quotation-roadmap-card .workflow-track { width: max-content; min-width: max-content; grid-template-columns: repeat(5, 96px); }
}

/* Xốp Mê Linh: kế hoạch là hàng đợi đơn hàng; lệnh sản xuất là hàng đợi duyệt thứ tự chạy. */
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub {
  display: grid;
  min-width: 0;
  gap: var(--bms-space-4);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-production-planning-hub, #productionPlanLegacyWorkspace)[hidden] {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub .production-table-toolbar {
  align-items: center;
  padding: var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub .production-table-toolbar > div {
  display: grid;
  gap: 4px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub .production-table-toolbar span:not(.status) {
  color: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub .production-main-card {
  min-width: 0;
  width: 100%;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(#xopPlanningOrderRows tr[data-xop-plan-order], #xopProductionApprovalRows tr[data-xop-approval-project]) {
  cursor: pointer;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(#xopPlanningOrderRows, #xopProductionApprovalRows) .xop-plan-row-expanded > td {
  border-bottom-color: transparent;
  background: var(--bms-primary-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(#xopPlanningOrderRows, #xopProductionApprovalRows) .xop-inline-plan-detail-row > td {
  padding: 0;
  white-space: normal;
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(#xopPlanningOrderRows, #xopProductionApprovalRows) .xop-inline-plan-detail-row:hover > td {
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail {
  display: grid;
  gap: var(--bms-space-4);
  min-width: 0;
  padding: var(--bms-space-4);
  border-left: 3px solid var(--bms-primary);
  box-shadow: inset 0 1px 0 var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail-heading > div {
  display: grid;
  gap: 3px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail-heading span {
  color: var(--bms-primary);
  font: 700 10px/1.2 var(--bms-font-ui);
  letter-spacing: .05em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail-heading h3 {
  margin: 0;
  color: var(--bms-text);
  font: 700 16px/1.3 var(--bms-font-ui);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #xopProductionApprovalRows select {
  min-width: 118px;
  height: var(--bms-control-compact);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-1);
  color: var(--bms-text);
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-schedule-form,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-list {
  display: grid;
  gap: var(--bms-space-4);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table {
  min-width: 1420px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table th:last-child,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table td:last-child {
  width: 360px;
  white-space: normal;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table td {
  vertical-align: top;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table td > :is(strong, small) {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-master-roll-table input[type="datetime-local"] {
  box-sizing: border-box;
  min-width: 180px;
  width: 100%;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-cutting-assignments {
  display: grid;
  gap: var(--bms-space-2);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-cutting-assignments > b {
  color: var(--bms-primary);
  font: 700 10px/1.2 var(--bms-font-ui);
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-cutting-assignment {
  display: grid;
  gap: 3px;
  padding: var(--bms-space-2);
  border-left: 3px solid var(--bms-primary);
  border-radius: var(--bms-radius-1);
  background: var(--bms-primary-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-cutting-assignment :is(span, small, em) {
  color: var(--bms-text-muted);
  font-size: 11px;
  white-space: normal;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-summary > div,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-item-facts > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: var(--bms-space-3);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-plan-detail-summary, .xop-plan-item-facts) span {
  color: var(--bms-text-muted);
  font: 650 10px/1.25 var(--bms-font-ui);
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-plan-detail-summary, .xop-plan-item-facts) strong {
  overflow-wrap: anywhere;
  color: var(--bms-text);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-item {
  display: grid;
  gap: var(--bms-space-4);
  padding: var(--bms-space-4);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: var(--bms-shadow-1);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-item > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-item > header > div {
  display: grid;
  gap: 4px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-item > header span {
  color: var(--bms-primary);
  font: 700 10px/1.2 var(--bms-font-ui);
  text-transform: uppercase;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-item-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--bms-space-2);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bms-space-3);
  padding-top: var(--bms-space-3);
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--bms-text);
  font-weight: 650;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-grid input {
  width: 100%;
  min-width: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-grid small {
  color: var(--bms-text-muted);
  font-weight: 500;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: var(--bms-space-2);
  padding: var(--bms-space-3) 0 0;
  border-top: 1px solid var(--bms-border);
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail .xop-plan-schedule-actions {
  position: static;
  background: transparent;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-current-order-workflow,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-current-order-plan {
  display: grid;
  gap: var(--bms-space-4);
  min-width: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: var(--bms-space-2);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-actions label {
  display: grid;
  gap: 4px;
  color: var(--bms-text-muted);
  font-size: 11px;
  font-weight: 650;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-actions select {
  min-width: 138px;
  height: var(--bms-control-compact);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-sheet {
  display: grid;
  gap: var(--bms-space-5);
  padding: clamp(18px, 2.4vw, 32px);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  color: var(--bms-text);
  background: var(--bms-surface);
  box-shadow: var(--bms-shadow-1);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--bms-space-4);
  padding-bottom: var(--bms-space-4);
  border-bottom: 2px solid var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head > div {
  display: grid;
  gap: 4px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head > div:last-child {
  justify-items: end;
  text-align: right;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head :is(h2, p) {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head h2 {
  color: var(--bms-primary);
  font: 800 clamp(24px, 3vw, 36px)/1.1 var(--bms-font-ui);
  letter-spacing: .04em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head p {
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head strong {
  font-size: 17px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-2);
  overflow: hidden;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-facts > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: var(--bms-space-3);
  border-right: 1px solid var(--bms-border);
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-facts span {
  color: var(--bms-text-muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-facts strong {
  overflow-wrap: anywhere;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section {
  display: grid;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section > header {
  display: flex;
  align-items: center;
  gap: var(--bms-space-3);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section > header > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--bms-primary);
  background: var(--bms-primary-soft);
  font-weight: 800;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section :is(h3, p) {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section p {
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section table {
  width: 100%;
  border-collapse: collapse;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section :is(th, td) {
  padding: 9px 10px;
  border: 1px solid var(--bms-border);
  font-size: 11px;
  text-align: left;
  vertical-align: top;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section th {
  color: var(--bms-text-muted);
  background: var(--bms-surface-subtle, var(--bms-surface));
  text-transform: uppercase;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-section td small {
  display: block;
  margin-top: 3px;
  color: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-signatures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--bms-space-3);
  padding-top: var(--bms-space-4);
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-signatures > div {
  display: grid;
  align-content: space-between;
  gap: 42px;
  min-height: 92px;
  text-align: center;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-signatures span {
  font-weight: 700;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-signatures strong {
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals {
  display: grid;
  gap: var(--bms-space-2);
  margin-top: var(--bms-space-3);
  padding: var(--bms-space-3);
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-3);
  background: var(--bms-surface);
  box-shadow: var(--bms-shadow-1);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals[hidden] {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--bms-space-4);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals > header :is(strong) {
  margin-top: 2px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals > header div {
  display: grid;
  gap: 3px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals > header :is(h3, p) {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals > header span {
  color: var(--bms-primary);
  font: 700 10px/1.2 var(--bms-font-ui);
  letter-spacing: .05em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals > header p {
  color: var(--bms-text-muted);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals table {
  min-width: 1120px;
  width: 100%;
  border-collapse: collapse;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals :is(th, td) {
  padding: 10px;
  border-bottom: 1px solid var(--bms-border);
  font-size: 11px;
  text-align: left;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals th {
  color: var(--bms-text-muted);
  background: var(--bms-surface-subtle, var(--bms-surface));
  text-transform: uppercase;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approvals td small {
  display: block;
  color: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-approval-actions {
  display: flex;
  gap: var(--bms-space-2);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .panel[data-panel="dashboard"] .xop-dashboard-day-schedule {
  display: grid;
  grid-column: 1 / -1;
  gap: var(--bms-space-2);
  min-width: 0;
  min-height: 0;
  padding: var(--bms-space-3);
  border-color: color-mix(in srgb, var(--bms-primary) 22%, var(--bms-border));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-day-schedule[hidden] {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .panel[data-panel="dashboard"] .xop-dashboard-day-schedule > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bms-space-3);
  margin-bottom: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-heading {
  display: flex;
  align-items: center;
  gap: var(--bms-space-3);
  min-width: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-day-schedule > header :is(h3, p) {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-day-schedule > header p {
  color: var(--bms-text-muted);
  font-size: 11px;
  line-height: 1.45;
  text-wrap: pretty;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-date-control {
  display: flex;
  align-items: center;
  gap: var(--bms-space-2);
  flex: 0 0 auto;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-date-control :is(button, input) {
  height: 36px;
  min-height: 36px;
  border-radius: var(--bms-radius-1);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-date-control button:not(#xopDashboardScheduleToday) {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #xopDashboardScheduleToday {
  min-width: 76px;
  padding-inline: var(--bms-space-3);
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-date-control input {
  width: 132px;
  padding-inline: var(--bms-space-3);
  font: 650 11px/1 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bms-space-1) var(--bms-space-3);
  padding-inline-start: var(--bms-space-3);
  border-inline-start: 1px solid color-mix(in srgb, var(--bms-border) 88%, transparent);
  margin-top: 0;
  color: var(--bms-text-muted);
  font-size: 9px;
  line-height: 1.2;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-day-schedule > header .xop-dashboard-schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--bms-text-muted);
  font: 550 9px/1.2 var(--bms-font-ui);
  letter-spacing: 0;
  text-transform: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend i {
  width: 7px;
  height: 7px;
  border-radius: var(--bms-radius-round);
  background: var(--xop-hour-color);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend .is-pending,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-dashboard-hour, .xop-dashboard-order-status).is-pending {
  --xop-hour-color: var(--bms-warning);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend .is-ready,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-dashboard-hour, .xop-dashboard-order-status).is-ready {
  --xop-hour-color: var(--bms-info, var(--bms-primary));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend .is-running,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-dashboard-hour, .xop-dashboard-order-status).is-running {
  --xop-hour-color: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend .is-paused,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-dashboard-hour, .xop-dashboard-order-status).is-paused {
  --xop-hour-color: var(--bms-danger);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend .is-completed,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-dashboard-hour, .xop-dashboard-order-status).is-completed {
  --xop-hour-color: var(--bms-success);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--bms-border) 88%, transparent);
  border-radius: var(--bms-radius-2);
  background: var(--bms-surface);
  scrollbar-color: var(--bms-border-strong) var(--bms-surface-subtle);
  overscroll-behavior-inline: contain;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td) {
  height: 36px;
  padding: 7px 10px;
  border-right: 1px solid color-mix(in srgb, var(--bms-border) 76%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--bms-border) 82%, transparent);
  color: var(--bms-text);
  font-size: 10px;
  text-align: left;
  vertical-align: middle;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table th {
  color: var(--bms-text-muted);
  background: var(--bms-surface-subtle, var(--bms-surface));
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table thead tr:first-child th:nth-child(n+5) {
  color: var(--bms-text-muted);
  background: color-mix(in srgb, var(--bms-surface-subtle) 72%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table thead tr:last-child th {
  height: 32px;
  color: var(--bms-text-subtle);
  font: 650 9px/1 var(--bms-font-data);
  letter-spacing: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table tbody td {
  height: 44px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(1) { width: 120px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(2) { width: 82px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(3) { width: 96px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(4) { width: 92px; }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table thead tr:last-child th,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table tbody td:nth-child(n+5) {
  width: 33px;
  min-width: 33px;
  padding-inline: 2px;
  text-align: center;
  border-right: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table tbody td:nth-child(-n+4),
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table thead tr:first-child th:nth-child(-n+4) {
  position: sticky;
  z-index: 2;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table thead tr:first-child th:nth-child(-n+4) {
  z-index: 4;
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(1) { left: 0; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(2) { left: 120px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(3) { left: 202px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table :is(th, td):nth-child(4) { left: 298px; box-shadow: 5px 0 8px color-mix(in srgb, var(--bms-text) 6%, transparent); }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table tbody td:nth-child(2) {
  padding-inline: 8px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table tbody td:nth-child(2) strong {
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table tbody tr:hover td {
  background-color: color-mix(in srgb, var(--bms-primary) 3%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table td:first-child button {
  display: block;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--bms-primary);
  background: transparent;
  font: 700 11px/1.3 var(--bms-font-data);
  text-align: left;
  text-overflow: ellipsis;
  white-space: normal;
  cursor: pointer;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table td small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--bms-text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour {
  position: relative;
  --bar-color: var(--xop-hour-color);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-filled::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 10px 0;
  background: color-mix(in srgb, var(--xop-hour-color) 11%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-progress-filled::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 10px 0;
  background: color-mix(in srgb, var(--xop-hour-color) 84%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-start::before {
  left: 4px;
  border-radius: 999px 0 0 999px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-end::before {
  right: 4px;
  border-radius: 0 999px 999px 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-start.is-end::before {
  border-radius: 999px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-progress-filled.is-start::after {
  left: 4px;
  border-radius: 999px 0 0 999px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-progress-end::after {
  right: 3px;
  border-radius: 0 999px 999px 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-progress-end.is-start::after {
  border-radius: 999px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-progress-trigger {
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-progress-trigger .production-progress__eye-ring {
  width: 18px;
  height: 18px;
  background: color-mix(in srgb, var(--xop-hour-color) 72%, var(--bms-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--xop-hour-color) 12%, transparent);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-progress-trigger .production-progress__eye-core {
  width: 6px;
  height: 6px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-progress-trigger:is(:hover, :focus-visible) .production-progress__eye-ring {
  width: 22px;
  height: 22px;
  background: color-mix(in srgb, var(--xop-hour-color) 84%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-progress-trigger::after {
  content: "Mở nhật ký sản xuất";
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour-progress {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 8px;
  color: var(--bms-text);
  font: 700 9px/1 var(--bms-font-data);
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-hour.is-progress-filled .xop-dashboard-hour-progress {
  color: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table .is-now {
  box-shadow: inset 1px 0 0 var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table thead .is-now {
  color: var(--bms-primary);
  background: var(--bms-primary-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-24h-table .is-shift-start {
  border-left: 1px solid color-mix(in srgb, var(--bms-primary) 28%, var(--bms-border));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-order-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--xop-hour-color) 28%, var(--bms-border));
  border-radius: var(--bms-radius-round);
  color: color-mix(in srgb, var(--xop-hour-color) 82%, var(--bms-text));
  background: color-mix(in srgb, var(--xop-hour-color) 8%, var(--bms-surface));
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub .production-table-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-planning-hub .production-table {
    min-width: 980px;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-plan-detail-summary, .xop-plan-item-facts) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-grid {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-dashboard-approvals > header, .xop-production-order-document-head) {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .panel[data-panel="dashboard"] .xop-dashboard-day-schedule > header {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--bms-space-1);
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-schedule-legend {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-dashboard-date-control {
    flex-wrap: wrap;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-document-head > div:last-child {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-plan-detail-summary, .xop-plan-item-facts) {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-detail-item > header,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-inline-plan-detail-heading,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-order-actions,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-plan-schedule-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-production-order-facts, .xop-production-order-signatures) {
    grid-template-columns: 1fr;
  }
}

/* Xốp Mê Linh · finished-goods receipt by order lot. */
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .fg-panel.active {
  display: grid;
  gap: 14px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .fg-panel .fg-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #fgLegacyWorkspace[hidden],
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #xopFinishedGoodsWorkspace[hidden] {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .fg-metric strong small {
  color: var(--bms-text-muted);
  font-size: 11px;
  font-weight: 700;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-workspace,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .fg-batches {
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: 14px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-intro :is(h3, p) { margin: 0; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-intro h3 { margin-top: 2px; color: var(--bms-text); font-size: 18px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-intro p { margin-top: 4px; color: var(--bms-text-muted); font-size: 12px; }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-groups { display: grid; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group + .xop-fg-group { border-top: 1px solid var(--bms-border); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header { display: grid; grid-template-columns: 36% minmax(0, 1fr); align-items: center; gap: 0; padding: 13px 14px; background: color-mix(in srgb, var(--bms-surface) 94%, var(--bms-primary)); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header div:first-child { display: flex; align-items: baseline; gap: 10px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header span { color: var(--bms-text); font-weight: 800; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header strong { color: var(--bms-text-muted); font-size: 12px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header .xop-fg-progress { width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: var(--bms-surface-2); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header .xop-fg-progress::-webkit-progress-bar { background: var(--bms-surface-2); border-radius: 999px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header .xop-fg-progress::-webkit-progress-value { background: var(--bms-primary); border-radius: 999px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header .xop-fg-progress::-moz-progress-bar { background: var(--bms-primary); border-radius: 999px; }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap { overflow-x: auto; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap table { width: 100%; border-collapse: collapse; table-layout: fixed; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .xop-fg-col-product { width: 20%; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .xop-fg-col-lot { width: 16%; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .xop-fg-col-quantity { width: 10%; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .xop-fg-col-location { width: 10%; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .xop-fg-col-actions { width: 24%; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap :is(th, td) { padding: 11px 14px; border-bottom: 1px solid var(--bms-border); text-align: left; font-size: 12px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap :is(th, td):is(:nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6)) { text-align: center; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table td { overflow-wrap: anywhere; vertical-align: middle; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .fg-actions { flex-wrap: nowrap; align-items: center; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table .fg-actions .btn { white-space: nowrap; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap th { color: var(--bms-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap td > small { display: block; margin-top: 3px; color: var(--bms-text-muted); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap tr.is-surplus { background: color-mix(in srgb, var(--bms-warning) 7%, var(--bms-surface)); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap .xop-fg-returned,
.xop-warehouse-trace { color: var(--bms-danger); font-weight: 700; }
.xop-warehouse-surplus { color: var(--bms-warning-text); font-weight: 700; }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-receipt-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px; border-radius: 12px; background: var(--bms-surface-2); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-receipt-head > div { display: grid; gap: 3px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-receipt-head span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-receipt-head small { color: var(--bms-text-muted); font-size: 11px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-proof-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-proof-strip .xop-event-image { margin: 0; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-proof-strip img { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-batch header > div { display: grid; gap: 2px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-batch header small { color: var(--bms-text-muted); font-size: 10px; }
.xop-issue-document-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.xop-issue-document-sheet { display: grid; gap: 18px; padding: 24px; border: 1px solid var(--bms-border); border-radius: 12px; background: var(--bms-surface); color: var(--bms-text); }
.xop-issue-document-sheet > header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--bms-primary); }
.xop-issue-document-sheet > header div { display: grid; gap: 3px; }
.xop-issue-document-sheet h2 { margin: 0; font-size: 20px; }
.xop-issue-document-sheet p { margin: 0; }
.xop-issue-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.xop-issue-facts > div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--bms-border); border-radius: 8px; }
.xop-issue-facts span { color: var(--bms-text-muted); font-size: 10px; text-transform: uppercase; }
.xop-issue-document-sheet table { width: 100%; border-collapse: collapse; }
.xop-issue-document-sheet :is(th, td) { padding: 9px; border: 1px solid var(--bms-border); text-align: left; font-size: 11px; }
.xop-issue-document-sheet td:last-child { min-width: 90px; }
.xop-issue-note { color: var(--bms-text-muted); font-size: 10px; }
.xop-issue-signatures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.xop-issue-signatures > div { display: grid; align-content: space-between; min-height: 100px; text-align: center; }
.xop-issue-signatures span { color: var(--bms-text-muted); font-size: 10px; }

@media (max-width: 760px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .fg-panel .fg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-intro { align-items: stretch; flex-direction: column; }
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-group > header { grid-template-columns: 1fr; }
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fg-table-wrap table { min-width: 760px; }
  .xop-issue-facts { grid-template-columns: 1fr; }
}

@media print {
  body.xop-issue-document-print * { visibility: hidden; }
  body.xop-issue-document-print #xopIssueDocumentPrintSheet,
  body.xop-issue-document-print #xopIssueDocumentPrintSheet * { visibility: visible; }
  body.xop-issue-document-print #xopIssueDocumentPrintSheet { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; box-shadow: none; }
  body.xop-issue-document-print #xopIssueDocumentPrintSheet :is(tr, .xop-issue-signatures) { break-inside: avoid; page-break-inside: avoid; }
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-workspace {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: 18px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-workspace[hidden] {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-heading span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component header > div:nth-child(2) > span {
  color: var(--bms-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-heading h3 {
  margin: 4px 0;
  font-size: 22px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-heading p {
  margin: 0;
  color: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-status {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bms-surface-subtle, var(--bms-surface));
  color: var(--bms-text-muted);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-status.is-ready,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-status.is-issued {
  background: color-mix(in srgb, var(--bms-success) 12%, var(--bms-surface));
  color: var(--bms-success);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-status.is-blocked {
  background: color-mix(in srgb, var(--bms-warning) 14%, var(--bms-surface));
  color: color-mix(in srgb, var(--bms-warning) 70%, var(--bms-text));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-components {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 20px 24px 24px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component {
  min-width: 0;
  border: 1px solid var(--bms-border);
  border-radius: 14px;
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component > header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bms-primary) 10%, var(--bms-surface));
  color: var(--bms-primary);
  font-weight: 900;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component h4 {
  margin: 3px 0;
  font-size: 16px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component header small,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component header span:not(:first-child) {
  display: block;
  color: var(--bms-text-muted);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component header > strong {
  color: var(--bms-text);
  font-size: 26px;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component header > strong small {
  display: inline;
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-progress {
  display: block;
  width: calc(100% - 36px);
  height: 6px;
  margin: 0 18px 18px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-progress::-webkit-progress-bar {
  background: var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-progress::-webkit-progress-value,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-core-type-list {
  display: grid;
  gap: 0;
  margin: 0 18px 14px;
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-core-type-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-core-type-list span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-core-type-list small {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-core-type-list small {
  margin-top: 2px;
  color: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-core-type-list b {
  color: var(--bms-primary);
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-top: 1px solid var(--bms-border);
  color: var(--bms-text-muted);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component > footer strong {
  color: var(--bms-text);
  text-align: right;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  border-top: 1px solid var(--bms-border);
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #xopMaterialIssueMessage strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #xopMaterialIssueMessage span {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] #xopMaterialIssueMessage span {
  margin-top: 3px;
  color: var(--bms-text-muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-issue-components {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-material-issue-heading, .xop-material-issue-footer) {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component > header {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-material-component header > strong {
    grid-column: 1 / -1;
  }
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-panel.active {
  display: grid;
  gap: 16px;
  min-width: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 2px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-header > div:first-child > span {
  color: var(--bms-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-header h2 {
  margin: 4px 0 2px;
  color: var(--bms-text);
  font-size: 24px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-header p {
  margin: 0;
  color: var(--bms-text-muted);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-future-integration {
  display: grid;
  min-width: 230px;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--bms-primary) 20%, var(--bms-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--bms-primary) 4%, var(--bms-surface));
  text-align: right;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-future-integration strong {
  color: var(--bms-text);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-future-integration span {
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics article {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--bms-border);
  border-radius: 14px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--bms-text-muted);
  font-size: 11px;
  font-weight: 650;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bms-border-strong);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics span i.available { background: var(--bms-text-muted); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics span i.delivering { background: var(--bms-primary); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics span i.delivered { background: var(--bms-success); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics span i.returning { background: var(--bms-warning); }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics strong {
  display: inline-block;
  margin-top: 4px;
  color: var(--bms-text);
  font-size: 22px;
  line-height: 1.15;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics small {
  margin-left: 4px;
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: 16px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-filters {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--bms-border);
  border-radius: 10px;
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-filters button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--bms-text-muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-filters button.active {
  background: var(--bms-surface);
  color: var(--bms-primary);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--bms-text) 10%, transparent);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-search {
  display: flex;
  align-items: center;
  width: min(320px, 38vw);
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--bms-border);
  border-radius: 10px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-search svg {
  flex: 0 0 16px;
  width: 16px;
  fill: none;
  stroke: var(--bms-text-muted);
  stroke-width: 1.7;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-search input {
  width: 100%;
  min-width: 0;
  padding: 0 0 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bms-text);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table-wrap {
  max-height: calc(100dvh - 330px);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table {
  min-width: 1180px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-receivables-overview-table {
  min-width: 1100px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table th {
  padding: 10px 12px;
  background: var(--bms-surface-subtle, var(--bms-surface));
  color: var(--bms-text-muted);
  font-size: 9px;
  letter-spacing: .04em;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table td {
  padding: 11px 12px;
  border-top-color: var(--bms-border);
  color: var(--bms-text);
  font-size: 11px;
  vertical-align: middle;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table td > strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table td > small {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-table td > small {
  max-width: 240px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--bms-text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-primary,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-debt-value {
  color: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overdue-note {
  color: var(--bms-danger);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fleet-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid var(--bms-border);
  border-radius: 999px;
  color: var(--bms-text-muted);
  background: var(--bms-surface-subtle, var(--bms-surface));
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fleet-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fleet-status.delivering { border-color: color-mix(in srgb, var(--bms-primary) 25%, var(--bms-border)); color: var(--bms-primary); background: color-mix(in srgb, var(--bms-primary) 7%, var(--bms-surface)); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fleet-status.delivered { border-color: color-mix(in srgb, var(--bms-success) 25%, var(--bms-border)); color: var(--bms-success); background: color-mix(in srgb, var(--bms-success) 7%, var(--bms-surface)); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-fleet-status.returning { border-color: color-mix(in srgb, var(--bms-warning) 28%, var(--bms-border)); color: color-mix(in srgb, var(--bms-warning) 75%, var(--bms-text)); background: color-mix(in srgb, var(--bms-warning) 8%, var(--bms-surface)); }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-collection-progress {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) 32px;
  align-items: center;
  gap: 7px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-collection-progress progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-collection-progress progress::-webkit-progress-bar {
  background: var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-collection-progress progress::-webkit-progress-value,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-collection-progress progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--bms-success);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-collection-progress strong {
  font-size: 10px;
  text-align: right;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-empty {
  height: 160px;
  color: var(--bms-text-muted);
  text-align: center;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-empty strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-empty span {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-empty strong {
  margin-bottom: 4px;
  color: var(--bms-text);
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-finance-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--bms-border);
  border-radius: 12px;
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-finance-tabs button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--bms-text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-finance-tabs button.active {
  border-color: var(--bms-border);
  background: var(--bms-surface);
  color: var(--bms-primary);
  box-shadow: 0 1px 5px color-mix(in srgb, var(--bms-text) 9%, transparent);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-finance-tabs button:focus-visible {
  outline: 2px solid var(--bms-primary);
  outline-offset: 1px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-finance-pane {
  display: grid;
  min-width: 0;
  gap: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-finance-pane[hidden] {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: 16px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-header > div > span {
  color: var(--bms-primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-header h3,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history h4 {
  margin: 4px 0;
  color: var(--bms-text);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-header p,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history p {
  margin: 0;
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-version,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--bms-primary) 25%, var(--bms-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bms-primary) 7%, var(--bms-surface));
  color: var(--bms-primary);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) auto minmax(210px, 1.15fr);
  align-items: stretch;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bms-border);
  background: var(--bms-surface-subtle, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--bms-border);
  border-radius: 12px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula > b {
  align-self: center;
  color: var(--bms-text-muted);
  font-size: 18px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula em {
  color: var(--bms-text-muted);
  font-size: 10px;
  font-style: normal;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula strong {
  color: var(--bms-text);
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula .result {
  border-color: color-mix(in srgb, var(--bms-primary) 28%, var(--bms-border));
  background: color-mix(in srgb, var(--bms-primary) 5%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form > label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--bms-text);
  font-size: 11px;
  font-weight: 700;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form :is(input, select) {
  width: 100%;
  min-width: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-field-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--bms-border);
  border-radius: 9px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-field-with-unit input {
  border: 0;
  border-radius: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-field-with-unit small {
  padding: 0 10px;
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-readonly {
  margin: 0;
  padding: 13px 20px;
  border-bottom: 1px solid var(--bms-border);
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history > header {
  padding: 14px 20px 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history :is(th, td) {
  padding: 10px 20px;
  border-top: 1px solid var(--bms-border);
  color: var(--bms-text);
  font-size: 11px;
  text-align: left;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history th {
  color: var(--bms-text-muted);
  font-size: 9px;
  letter-spacing: .04em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history td :is(strong, small) {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-history td small {
  margin-top: 2px;
  color: var(--bms-text-muted);
  font-size: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-price-status.inactive {
  border-color: var(--bms-border);
  background: var(--bms-surface-subtle, var(--bms-surface));
  color: var(--bms-text-muted);
}

@media (max-width: 1200px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form .btn {
    justify-self: start;
  }
}

@media (max-width: 900px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-toolbar,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-future-integration {
    min-width: 0;
    text-align: left;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-search {
    width: 100%;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-filters {
    overflow-x: auto;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-formula > b {
    justify-self: center;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-overview-metrics {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-header,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-header {
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-costing-form .btn {
    width: 100%;
  }
}

/* Xốp Mê Linh · focused production and shift handoff command surface. */
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-module-header {
  margin-bottom: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-metric {
  padding: 13px 15px;
  border-color: var(--bms-border);
  border-radius: 12px;
  background: var(--bms-surface);
  box-shadow: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-metric strong {
  color: var(--bms-text);
  font: 700 19px/1.2 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-layout {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-layout > .production-main-card {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-execution-toolbar {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-board {
  margin-bottom: 12px;
  padding-bottom: 12px;
  overflow: hidden;
  border-color: var(--bms-border);
  border-radius: 14px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-board .production-table-toolbar {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-board .production-table-toolbar strong {
  color: var(--bms-text);
  font-size: 14px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-board .production-table-toolbar input {
  height: 36px;
  min-height: 36px;
  border-color: var(--bms-border);
  border-radius: 9px;
  font-family: var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-board-grid {
  gap: 10px;
  padding: 12px 12px 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-card {
  overflow: hidden;
  border-color: var(--bms-border);
  border-radius: 11px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-card.is-active {
  border-color: color-mix(in srgb, var(--bms-success) 42%, var(--bms-border));
  box-shadow: inset 0 3px 0 var(--bms-success);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-card > header {
  min-height: 54px;
  padding: 10px 11px;
  border-color: var(--bms-border);
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-card > header > span {
  align-self: start;
  padding: 3px 7px;
  border-radius: var(--bms-radius-round);
  background: var(--bms-neutral-soft);
  font: 650 10px/1.3 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-card > header > span.is-running,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order.is-running > span:last-child small {
  color: var(--bms-success);
  background: color-mix(in srgb, var(--bms-success) 10%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order.is-handed-over {
  background: color-mix(in srgb, var(--bms-text-muted) 4%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order {
  border-color: var(--bms-border);
  font-family: inherit;
  cursor: pointer;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order:hover,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order.is-selected {
  background: var(--bms-primary-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order.is-selected {
  box-shadow: inset 3px 0 0 var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-order b {
  color: var(--bms-text);
  font: 700 10px/1 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-command-mini-progress {
  display: block;
  width: 88px;
  height: 5px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: var(--bms-radius-round);
  background: var(--bms-neutral-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-command-mini-progress::-webkit-progress-bar,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress-track::-webkit-progress-bar {
  background: var(--bms-neutral-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-command-mini-progress::-webkit-progress-value,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-command-mini-progress::-moz-progress-bar {
  background: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-empty {
  display: grid;
  min-height: 64px;
  place-items: center;
  padding: 12px;
  color: var(--bms-text-muted);
  font-size: 11px;
  text-align: center;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-side-card.xop-production-command {
  position: static;
  padding: 0;
  overflow: hidden;
  border-color: var(--bms-border);
  border-radius: 14px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-card {
  min-width: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-head h3,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-head p {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-head h3 {
  margin-top: 3px;
  color: var(--bms-text);
  font-size: 18px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-head p {
  margin-top: 3px;
  color: var(--bms-text-muted);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-command-eyebrow {
  color: var(--bms-primary);
  font: 700 9px/1.2 var(--bms-font-data);
  letter-spacing: .08em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress {
  display: grid;
  gap: 7px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress strong {
  color: var(--bms-primary);
  font: 700 17px/1 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress small {
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress-track {
  width: 100%;
  height: 10px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: var(--bms-radius-round);
  background: var(--bms-neutral-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress-track::-webkit-progress-value,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-progress-track::-moz-progress-bar {
  background: linear-gradient(90deg, var(--bms-primary), var(--bms-success));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts > div {
  min-width: 0;
  padding: 13px 20px;
  border-right: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts > div:last-child {
  border-right: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts strong {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts span {
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--bms-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-awaiting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 20px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--bms-primary) 30%, var(--bms-border));
  border-radius: 11px;
  background: var(--bms-primary-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-awaiting strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-awaiting small {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-awaiting small {
  margin-top: 3px;
  color: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-actions .btn {
  min-height: 38px;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-actions .xop-command-primary {
  min-width: 210px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid > section {
  min-width: 0;
  padding: 16px 20px 18px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid > section + section {
  border-left: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid header h4,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid header p {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid header h4 {
  color: var(--bms-text);
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid header p {
  margin-top: 3px;
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-list,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-log-list {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--bms-border);
  border-radius: 9px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row.is-active {
  border-color: color-mix(in srgb, var(--bms-success) 38%, var(--bms-border));
  background: color-mix(in srgb, var(--bms-success) 6%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bms-text-muted);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row.is-active .xop-shift-state-dot {
  background: var(--bms-success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bms-success) 14%, transparent);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row.is-handed-over .xop-shift-state-dot {
  background: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-state-label {
  max-width: 122px;
  padding: 4px 7px;
  border-radius: var(--bms-radius-round);
  color: var(--bms-text-muted);
  background: var(--bms-neutral-soft);
  font: 650 9px/1.35 var(--bms-font-data);
  text-align: center;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row.is-active .xop-shift-state-label {
  color: var(--bms-success);
  background: color-mix(in srgb, var(--bms-success) 10%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row small {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row strong {
  color: var(--bms-text);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-shift-row small {
  margin-top: 2px;
  color: var(--bms-text-muted);
  font-size: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-log-list article {
  padding: 9px 10px;
  border-left: 3px solid var(--bms-primary);
  border-radius: 0 8px 8px 0;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-log-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-log-list :is(span, small) {
  color: var(--bms-text-muted);
  font-size: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-action-form .xop-form-intro {
  padding: 11px 12px;
  border: 1px solid var(--bms-border);
  border-radius: 10px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-action-form .xop-form-intro strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-action-form .xop-form-intro span {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-action-form .xop-form-intro span {
  margin-top: 3px;
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-drawer-card:has(.xop-handoff-form) {
  width: min(960px, calc(100vw - 48px));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-form {
  gap: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--bms-border);
  border-radius: 10px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block.is-actual {
  box-shadow: inset 3px 0 0 var(--bms-success);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block.is-next {
  box-shadow: inset 3px 0 0 var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-step {
  display: block;
  margin-bottom: 8px;
  color: var(--bms-text-muted);
  font: 750 10px/1.35 var(--bms-font-data);
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown {
  padding: 0;
  border: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown > legend {
  padding: 0;
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown > p {
  min-height: 28px;
  margin: 3px 0 9px;
  line-height: 1.4;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown > div {
  grid-template-columns: 1fr;
  gap: 6px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 8px;
  border: 1px solid var(--bms-border);
  border-radius: 8px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown input {
  min-height: 36px;
  text-align: right;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-form :is(input, select, textarea) {
  min-height: 38px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-note textarea {
  min-height: 70px;
  resize: vertical;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-submit {
  justify-self: end;
  min-width: 260px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 14px 20px 0;
  padding: 12px 14px;
  border: 1px solid var(--bms-border);
  border-radius: 11px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner.is-running {
  border-color: color-mix(in srgb, var(--bms-success) 38%, var(--bms-border));
  background: color-mix(in srgb, var(--bms-success) 7%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner.is-paused {
  border-color: color-mix(in srgb, var(--bms-danger) 36%, var(--bms-border));
  background: color-mix(in srgb, var(--bms-danger) 6%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner.is-waiting {
  border-color: color-mix(in srgb, var(--bms-warning) 42%, var(--bms-border));
  background: color-mix(in srgb, var(--bms-warning) 7%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bms-text-muted);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bms-text-muted) 12%, transparent);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner.is-running .xop-active-shift-pulse {
  background: var(--bms-success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bms-success) 15%, transparent);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner.is-paused .xop-active-shift-pulse {
  background: var(--bms-danger);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner > div :is(small, strong, p) {
  display: block;
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner > div > small {
  color: var(--bms-text-muted);
  font: 700 9px/1.35 var(--bms-font-data);
  letter-spacing: .06em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner > div > strong {
  margin-top: 2px;
  color: var(--bms-text);
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner > div > p {
  margin-top: 2px;
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner > b {
  padding: 5px 9px;
  border-radius: var(--bms-radius-round);
  color: var(--bms-text-muted);
  background: var(--bms-neutral-soft);
  font: 700 9px/1.35 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner.is-running > b {
  color: var(--bms-success);
  background: color-mix(in srgb, var(--bms-success) 12%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-card {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-card > header :is(h4, p) {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-card > header h4 {
  color: var(--bms-text);
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-card > header p {
  margin-top: 3px;
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid article {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--bms-border);
  border-radius: 9px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid article > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid :is(span, strong, small) {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid span {
  color: var(--bms-text);
  font-size: 11px;
  font-weight: 700;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid strong {
  color: var(--bms-primary);
  font: 700 11px/1.35 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid progress {
  width: 100%;
  height: 7px;
  margin: 8px 0 5px;
  accent-color: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-roll-progress-grid small {
  color: var(--bms-text-muted);
  font-size: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--bms-border);
  border-radius: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-form .xop-derived-total {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown > legend {
  padding: 0 5px;
  color: var(--bms-text);
  font-size: 12px;
  font-weight: 700;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown > p {
  margin: 0 0 9px;
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown label > span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown label > span small {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-breakdown label > span small {
  margin-top: 2px;
  color: var(--bms-text-muted);
  font-size: 9px;
  font-weight: 400;
}

@media (max-width: 900px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-metrics,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts > div:nth-child(2) {
    border-right: 0;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--bms-border);
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] :is(.xop-roll-progress-grid, .xop-output-breakdown > div) {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-grid > section + section {
    border-top: 1px solid var(--bms-border);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode .production-metrics,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-head,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-awaiting,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-active-shift-banner > b {
    grid-column: 2;
    justify-self: start;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-actions .btn,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-command-actions .xop-command-primary {
    width: 100%;
    min-width: 0;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-quick-facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--bms-border);
  }
}

@media print {
  body.xop-production-order-print * {
    visibility: hidden;
  }

  body.xop-production-order-print #xopProductionOrderPrintSheet,
  body.xop-production-order-print #xopProductionOrderPrintSheet * {
    visibility: visible;
  }

  body.xop-production-order-print #xopProductionOrderPrintSheet {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.xop-production-order-print #xopProductionOrderPrintSheet .table-wrap {
    overflow: visible;
  }

  body.xop-production-order-print #xopProductionOrderPrintSheet :is(tr, .xop-production-order-section, .xop-production-order-signatures) {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Xốp Mê Linh · production workspace (single order, event-first). */
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode #productionExecutionMetrics,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-execution-panel.xop-production-mode #xopProductionShiftBoard {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-side-card.xop-production-command {
  border: 1px solid var(--bms-border);
  border-radius: 14px;
  background: var(--bms-surface);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-workspace {
  min-width: 0;
  color: var(--bms-text);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header-actions,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-heading,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-main,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel > header,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel > header {
  display: flex;
  align-items: center;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header {
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header h3,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header p,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel h4,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel p,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel h4,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel p {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header h3 {
  margin-top: 3px;
  font: 750 18px/1.25 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header p {
  margin-top: 3px;
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header-actions {
  flex: none;
  gap: 8px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header-actions .btn {
  min-height: 32px;
  padding: 6px 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-round);
  color: var(--bms-text-muted);
  background: var(--bms-surface-soft);
  font: 700 10px/1 var(--bms-font-data);
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-status.is-running,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-status.is-complete {
  border-color: color-mix(in srgb, var(--bms-success) 34%, var(--bms-border));
  color: var(--bms-success);
  background: color-mix(in srgb, var(--bms-success) 8%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-status.is-paused {
  border-color: color-mix(in srgb, var(--bms-danger) 32%, var(--bms-border));
  color: var(--bms-danger);
  background: color-mix(in srgb, var(--bms-danger) 6%, var(--bms-surface));
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-progress {
  padding: 15px 20px 17px;
  border-bottom: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-heading {
  justify-content: space-between;
  gap: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-heading span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-progress > small {
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-heading strong {
  font: 700 12px/1.2 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-heading > b {
  color: var(--bms-primary);
  font: 750 18px/1 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-main {
  gap: 16px;
  margin: 7px 0 4px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-rail-viewport {
  min-width: 0;
  flex: 1;
  overflow: visible;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-rail {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 92px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-track {
  position: absolute;
  top: 68px;
  right: 8px;
  left: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: var(--bms-radius-round);
  background: var(--bms-neutral-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--bms-primary);
  transition: width .24s ease;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker {
  --event-dot-offset: 0px;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 84px;
  padding: 0;
  border: 0;
  color: var(--bms-primary);
  background: transparent;
  pointer-events: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker > span {
  position: absolute;
  top: 0;
  left: calc(var(--event-position) + var(--event-dot-offset));
  width: max-content;
  max-width: 108px;
  overflow: hidden;
  transform: translateX(-50%);
  color: var(--bms-text-muted);
  font: 650 9px/1.2 var(--bms-font-data);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker.has-label::before {
  content: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 84px;
  overflow: visible;
  transform: translateX(var(--event-dot-offset));
  pointer-events: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker > svg line {
  stroke: var(--bms-border-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker:not(.has-label) > span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker:is(.is-start,.is-pause,.is-resume,.is-note) > span {
  display: none;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker > i {
  position: absolute;
  bottom: 6px;
  left: calc(var(--event-position) + var(--event-dot-offset));
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border: 3px solid var(--bms-surface);
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 1px currentColor;
  cursor: pointer;
  pointer-events: auto;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker:is(.is-pause) { color: var(--bms-danger); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker:is(.is-handoff,.is-note) { color: var(--bms-warning); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker:is(.is-start,.is-resume) { color: var(--bms-success); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker[aria-current="true"] > i {
  transform: translateX(-50%) scale(1.16);
  box-shadow: 0 0 0 3px var(--bms-primary-soft), 0 0 0 4px currentColor;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-width: 188px;
  min-height: 52px;
  padding-left: 14px;
  border-left: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--bms-border);
  border-radius: var(--bms-radius-round);
  color: var(--bms-text);
  background: var(--bms-surface);
  cursor: pointer;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-button:hover {
  border-color: var(--bms-primary);
  color: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-button.is-primary {
  border-color: var(--bms-primary);
  color: var(--bms-surface);
  background: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-button b {
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-readonly {
  color: var(--bms-text-muted);
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel {
  min-width: 0;
  padding: 17px 20px 20px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel {
  border-left: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel > header,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel > header {
  justify-content: space-between;
  gap: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel h4,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel h4 {
  font-size: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel header p,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel header p {
  margin-top: 2px;
  color: var(--bms-text-muted);
  font-size: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel > header > strong {
  color: var(--bms-primary);
  font: 750 13px/1 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel > header .btn {
  min-height: 34px;
  padding: 7px 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-list {
  margin-top: 13px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-row {
  padding: 10px 0;
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-row > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-row span,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-row strong {
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-row progress {
  display: block;
  width: 100%;
  height: 6px;
  margin: 7px 0 4px;
  accent-color: var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-row small,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-meta dt {
  color: var(--bms-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-meta dt,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-meta dd {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-production-meta dd {
  margin-top: 2px;
  overflow: hidden;
  color: var(--bms-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--bms-border);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history h5 {
  margin: 0 0 7px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--bms-border);
  color: var(--bms-text-muted);
  font-size: 11px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > div :is(strong, small) {
  display: block;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > div strong {
  color: var(--bms-text);
  font-size: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > div small {
  margin-top: 2px;
  font-size: 10px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > dl {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 14px;
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > dl div {
  display: grid;
  gap: 1px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > dl :is(dt, dd) {
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > dl dt {
  font-size: 9px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article > dl dd {
  color: var(--bms-text);
  font: 700 11px/1.35 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-shift-history > article.is-active > div strong {
  color: var(--bms-success);
  font-weight: 750;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-timeline {
  display: grid;
  margin-top: 12px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  min-height: 58px;
  padding: 7px 8px 8px 0;
  border-radius: 8px;
  outline: none;
  transition: background-color .2s ease, box-shadow .2s ease;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row:not(:last-child)::before {
  position: absolute;
  top: 27px;
  bottom: -5px;
  left: 11px;
  width: 1px;
  background: var(--bms-border);
  content: "";
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row.is-highlighted {
  background: var(--bms-primary-soft);
  box-shadow: inset 3px 0 0 var(--bms-primary);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-image {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 9px 0 7px;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-image img {
  width: 100%;
  height: 236px;
  object-fit: cover;
  border: 1px solid var(--bms-border);
  border-radius: 9px;
  background: var(--bms-surface-soft);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-image figcaption {
  color: var(--bms-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .production-drawer-card:has(.xop-handoff-form) {
    width: min(760px, calc(100vw - 24px));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-grid {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown > p {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-meta-grid {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-block .xop-output-breakdown label {
    grid-template-columns: 1fr 82px;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-handoff-submit {
    width: 100%;
    min-width: 0;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-image {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-image img {
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-dot {
  z-index: 1;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid var(--bms-surface);
  border-radius: 50%;
  color: var(--bms-surface);
  background: var(--bms-primary);
  box-shadow: 0 0 0 1px var(--bms-primary);
  font: 750 9px/1 var(--bms-font-data);
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row.is-pause .xop-event-dot { background: var(--bms-danger); box-shadow: 0 0 0 1px var(--bms-danger); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row:is(.is-start,.is-resume) .xop-event-dot { background: var(--bms-success); box-shadow: 0 0 0 1px var(--bms-success); }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row:is(.is-handoff,.is-note) .xop-event-dot { background: var(--bms-warning); box-shadow: 0 0 0 1px var(--bms-warning); }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row strong,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row p,
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row small {
  display: block;
  margin: 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row strong { font-size: 11px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row p { margin-top: 2px; color: var(--bms-text-muted); font-size: 10px; }
body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-row small { margin-top: 3px; color: var(--bms-text-muted); font-size: 9px; }

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel .xop-handoff-awaiting {
  margin: 12px 0 0;
}

body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] [data-xop-output-event-fields][hidden] {
  display: none;
}

@media (max-width: 900px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-progress-main {
    align-items: stretch;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-controls {
    min-width: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--bms-border);
    border-left: 0;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-grid {
    grid-template-columns: 1fr;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel {
    border-top: 1px solid var(--bms-border);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker.is-output.has-label > span,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-marker.is-output.has-label > svg {
    display: none;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel > header,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header-actions,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel > header .btn {
    width: 100%;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header-actions .btn,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel > header .btn {
    flex: 1;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-media-button {
    min-height: 42px;
  }

  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-output-panel,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-event-panel,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-progress,
  body.bms-opendesign-v8[data-business-profile="XOP_ME_LINH"] .xop-workspace-header {
    padding-right: 14px;
    padding-left: 14px;
  }
}
