:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9e0e7;
  --accent: #246b60;
  --accent-strong: #174d45;
  --danger: #b42318;
  --sidebar: #1f2933;
  --sidebar-muted: #a8b3bf;
  font-family: Arial, "Noto Sans Bengali", "Vrinda", "Microsoft YaHei", sans-serif;
}

.barcode-print-page {
  display: grid;
  gap: 18px;
}

.barcode-print-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.barcode-print-tabs button {
  height: 36px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #f5f8fb;
  color: #0f3554;
}

.barcode-print-tabs button.is-active {
  border-color: #1473d2;
  background: #eef6ff;
  color: #0052a3;
}

.barcode-tab-panel {
  display: none;
}

.barcode-tab-panel.is-active {
  display: grid;
  gap: 18px;
}

.barcode-print-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.barcode-print-controls label {
  display: grid;
  gap: 6px;
  color: #53657a;
  font-size: 13px;
}

.barcode-print-controls input,
.barcode-print-controls select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.barcode-print-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.barcode-print-actions button {
  height: 38px;
  padding: 0 16px;
}

.barcode-print-controls .message {
  grid-column: 1 / -1;
  margin: 0;
}

.pallet-print-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.pallet-print-controls label {
  display: grid;
  gap: 6px;
  color: #53657a;
  font-size: 13px;
}

.pallet-print-controls input,
.pallet-print-controls select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.pallet-print-controls .message {
  grid-column: 1 / -1;
  margin: 0;
}

.custom-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.custom-panel-head h3,
.custom-panel-head p {
  margin: 0;
}

.custom-panel-head p {
  color: var(--muted);
  font-size: 13px;
}

.custom-subpanel {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.bom-model-query-page {
  display: grid;
  gap: 16px;
}

.bom-model-query-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.bom-model-query-grid label {
  display: grid;
  gap: 6px;
  color: #53657a;
  font-size: 13px;
}

.bom-model-query-grid input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.bom-model-query-actions {
  justify-content: flex-start;
}

.bom-model-query-results {
  display: grid;
  gap: 12px;
}

.bom-model-query-results h3 {
  margin: 0;
  font-size: 18px;
}

.bom-model-query-table table {
  min-width: 1280px;
}

.bom-model-query-table td:nth-child(3),
.bom-model-query-table td:nth-child(9) {
  white-space: normal;
  word-break: break-word;
  max-width: 320px;
}

@media (max-width: 1100px) {
  .bom-model-query-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

.toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-scroll table {
  min-width: 1100px;
  border: 0;
}

.wrap-cell {
  white-space: normal;
  word-break: break-word;
}

.compact-select {
  min-width: 72px;
  height: 36px;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.barcode-print-preview-wrap {
  min-height: 360px;
  display: grid;
  place-items: start center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  background: #e5e7eb;
}

.barcode-print-empty {
  margin: 0;
  color: var(--muted);
}

.barcode-print-label {
  width: var(--label-width);
  height: var(--label-height);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8mm;
  padding: 1.5mm;
  background: #fff;
  color: #000;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  font-family: SimSun, "宋体", Arial, sans-serif;
  font-size: var(--label-font);
  overflow: hidden;
}

.barcode-print-barcode,
.barcode-print-location {
  min-height: 0;
  text-align: center;
  overflow: hidden;
}

.barcode-print-label svg {
  max-width: 100%;
}

.barcode-print-info {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #000;
  border-bottom: 0;
  overflow: hidden;
}

.barcode-info-row {
  display: grid;
  grid-template-columns: 19mm minmax(0, 1fr);
  min-width: 0;
  border-bottom: 1px solid #000;
}

.barcode-info-row-compact {
  grid-template-columns: 10mm minmax(0, 1fr) 10mm minmax(0, 1fr) 10mm minmax(0, 1fr);
}

.barcode-info-label,
.barcode-info-value {
  min-width: 0;
  padding: 1px 2px;
  line-height: 1.12;
  word-break: break-all;
  overflow: hidden;
}

.barcode-info-label {
  background: #f8f8f8;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid #000;
}

.barcode-info-row-compact .barcode-info-value:not(:last-child) {
  border-right: 1px solid #000;
}

.barcode-info-row-compact .barcode-info-value {
  text-align: center;
}

.barcode-info-row-desc .barcode-info-value {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media print {
  body {
    background: #fff;
    overflow: visible;
  }

  body > *:not(.app-shell),
  .app-header,
  .business-sidebar,
  .topbar,
  .toolbar,
  .summary-grid,
  .table-wrap,
  .no-print {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .main,
  .content-panel,
  .custom-panel,
  .barcode-print-page,
  .barcode-print-preview-wrap {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .barcode-print-label {
    margin: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.app-header {
  width: 100%;
  max-width: 100vw;
  height: 44px;
  flex: 0 0 44px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  background: #102638;
  color: #fff;
  overflow: hidden;
}

.header-brand {
  flex: 0 0 auto;
  font-weight: 700;
}

.top-nav {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.top-nav-item {
  height: 30px;
  padding: 0 8px;
  background: transparent;
  color: #e6edf3;
  border-radius: 4px;
}

.top-nav-item:hover,
.top-nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.header-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

.language-switch {
  flex: 0 0 auto;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.language-switch button {
  height: 24px;
  border-radius: 0;
  min-width: 56px;
  padding: 0 8px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

html[lang="bn-BD"] .language-switch button {
  min-width: 60px;
  font-size: 11px;
}

.language-switch .is-active {
  background: #fff;
  color: #102638;
}

.workspace {
  width: 100%;
  max-width: 100vw;
  height: calc(100vh - 44px);
  min-height: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 46px;
  overflow: hidden;
  transition: grid-template-columns 0.18s ease;
}

.workspace.sidebar-collapsed {
  grid-template-columns: 42px minmax(0, 1fr);
}

.business-sidebar {
  align-self: start;
  max-height: calc(100vh - 76px);
  overflow: auto;
  min-height: 514px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 12px;
  transition: padding 0.18s ease;
}

.business-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 4px 18px;
}

.business-sidebar-title {
  color: #37516b;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #f5f8fb;
  color: #0f3554;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.sidebar-toggle:hover {
  border-color: #1473d2;
  background: #eef6ff;
  color: #0052a3;
}

.workspace.sidebar-collapsed .business-sidebar {
  min-height: 0;
  padding: 8px 6px;
  overflow: visible;
}

.workspace.sidebar-collapsed .business-sidebar-head {
  justify-content: center;
  margin: 0;
}

.workspace.sidebar-collapsed .business-sidebar-title,
.workspace.sidebar-collapsed .module-group-list {
  display: none;
}

.workspace.sidebar-collapsed .sidebar-toggle span {
  transform: rotate(180deg);
}

.module-group-list {
  display: grid;
  gap: 4px;
}

.module-group-button {
  height: auto;
  display: grid;
  gap: 4px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 10px 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.module-group-button span {
  color: #37516b;
  font-size: 12px;
}

.module-group-button:hover,
.module-group-button.is-active {
  border-left-color: #1473d2;
  background: #eef4fa;
  color: #0759a3;
}

.sidebar {
  background: var(--sidebar);
  color: #fff;
  padding: 18px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #e5f4f0;
  color: var(--accent-strong);
  font-weight: 700;
  border-radius: 6px;
}

.brand span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-item {
  border: 0;
  border-radius: 6px;
  text-align: left;
  padding: 11px 12px;
  color: #dce3ea;
  background: transparent;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.main {
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow: auto;
  padding: 0;
}

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

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.session-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  flex: 0 1 220px;
  min-width: 92px;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-panel,
.content-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.open-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: -2px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.open-tabs[hidden] {
  display: none;
}

.open-tab {
  height: 34px;
  max-width: 190px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #f8fbfe;
  color: #23364d;
}

.open-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-tab i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #5d6d7e;
  font-style: normal;
  line-height: 1;
}

.open-tab:hover,
.open-tab.is-active {
  border-color: #1473d2;
  background: #eef6ff;
  color: #0759a3;
}

.open-tab i:hover {
  background: #dde7f0;
  color: #102a43;
}

.login-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 240px));
  align-items: end;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}

button {
  height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.ghost-button {
  background: #eef2f5;
  color: var(--ink);
}

.danger-button {
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #ffd7d3;
}

.danger-button:hover {
  background: #ffe5e0;
}

.message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
}

.obsolete-suggestion-tools {
  display: none !important;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

.toolbar label {
  width: min(280px, 100%);
}

.inventory-search-panel,
.inventory-detail-search-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.inventory-detail-search-panel {
  grid-template-columns: minmax(100px, 0.6fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(85px, 0.45fr) minmax(85px, 0.45fr) minmax(120px, 0.7fr) auto;
}

.inventory-search-actions,
.inventory-detail-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.production-process-search-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.production-process-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.goods-receipt-search-panel {
  display: grid;
  grid-template-columns: minmax(125px, 0.7fr) minmax(120px, 0.65fr) minmax(190px, 1fr) minmax(250px, 1.35fr) minmax(80px, 0.45fr) minmax(135px, 0.75fr) auto;
  grid-template-areas:
    "number material name desc warehouse status actions"
    "creator remark remark start end end actions";
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.goods-receipt-search-panel label:nth-child(1) { grid-area: number; }
.goods-receipt-search-panel label:nth-child(2) { grid-area: material; }
.goods-receipt-search-panel label:nth-child(3) { grid-area: name; }
.goods-receipt-search-panel label:nth-child(4) { grid-area: desc; }
.goods-receipt-search-panel label:nth-child(5) { grid-area: warehouse; }
.goods-receipt-search-panel label:nth-child(6) { grid-area: status; }
.goods-receipt-search-panel label:nth-child(7) { grid-area: creator; }
.goods-receipt-search-panel label:nth-child(8) { grid-area: remark; }
.goods-receipt-search-panel label:nth-child(9) { grid-area: start; }
.goods-receipt-search-panel label:nth-child(10) { grid-area: end; }

.goods-receipt-search-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.inventory-document-search-panel {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(240px, 1.3fr) minmax(90px, 0.5fr) minmax(130px, 0.75fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.inventory-document-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.material-picking-search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
}

.material-picking-search-panel label {
  flex: 0 1 140px;
  min-width: 0;
}

.material-picking-search-panel label:has([name="production_order_number"]),
.material-picking-search-panel label:has([name="material_number"]),
.material-picking-search-panel label:has([name="child_material_number"]) {
  flex-basis: 170px;
}

.material-picking-search-panel label:has([name="material_name"]),
.material-picking-search-panel label:has([name="material_description"]) {
  flex-basis: 210px;
}

.material-picking-search-panel label:has([name="document_number"]),
.material-picking-search-panel label:has([name="status"]),
.material-picking-search-panel label:has([name="modification_status"]),
.material-picking-search-panel label:has([name="material_source"]),
.material-picking-search-panel label:has([name="from_warehouse_code"]),
.material-picking-search-panel label:has([name="to_warehouse_code"]),
.material-picking-search-panel label:has([name="start_date"]),
.material-picking-search-panel label:has([name="end_date"]) {
  flex-basis: 125px;
}

.material-picking-search-panel input,
.material-picking-search-panel select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
}

.material-picking-search-panel .inventory-document-search-actions {
  flex: 1 1 620px;
  flex-wrap: wrap;
}

.material-picking-search-panel .inventory-document-search-actions .file-action {
  width: min(320px, 100%);
}

.material-picking-search-panel .inventory-document-search-actions button {
  min-height: 34px;
  padding: 7px 12px;
}

.warehouse-transfer-search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
  overflow: hidden;
}

.warehouse-transfer-search-panel label {
  flex: 0 1 140px;
  min-width: 0;
}

.warehouse-transfer-search-panel label:has([name="material_name"]),
.warehouse-transfer-search-panel label:has([name="material_description"]) {
  flex-basis: 260px;
}

.warehouse-transfer-search-panel label:has([name="document_number"]),
.warehouse-transfer-search-panel label:has([name="material_number"]),
.warehouse-transfer-search-panel label:has([name="from_warehouse_code"]),
.warehouse-transfer-search-panel label:has([name="to_warehouse_code"]),
.warehouse-transfer-search-panel label:has([name="status"]),
.warehouse-transfer-search-panel label:has([name="start_date"]),
.warehouse-transfer-search-panel label:has([name="end_date"]) {
  flex-basis: 125px;
}

.warehouse-transfer-search-panel input,
.warehouse-transfer-search-panel select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
}

.warehouse-transfer-search-panel .inventory-document-search-actions {
  flex: 1 1 560px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  white-space: normal;
}

.warehouse-transfer-search-panel .inventory-document-search-actions .file-action {
  width: min(320px, 100%);
}

.warehouse-transfer-search-panel .inventory-document-search-actions button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--ink);
  white-space: nowrap;
}

.inline-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.completion-receipt-compare-toggle {
  align-self: center;
  margin-right: 4px;
}

.completion-receipt-search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
  overflow: hidden;
}

.completion-receipt-search-panel label {
  flex: 0 1 140px;
  min-width: 0;
}

.completion-receipt-search-panel label:has([name="production_order_number"]),
.completion-receipt-search-panel label:has([name="material_number"]) {
  flex-basis: 190px;
}

.completion-receipt-search-panel label:has([name="material_name"]) {
  flex-basis: 260px;
}

.completion-receipt-search-panel label:has([name="document_number"]),
.completion-receipt-search-panel label:has([name="warehouse_code"]),
.completion-receipt-search-panel label:has([name="status"]),
.completion-receipt-search-panel label:has([name="material_source"]),
.completion-receipt-search-panel label:has([name="start_date"]),
.completion-receipt-search-panel label:has([name="end_date"]) {
  flex-basis: 125px;
}

.completion-receipt-search-panel input,
.completion-receipt-search-panel select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
}

.completion-receipt-search-panel .inventory-document-search-actions {
  flex: 1 1 560px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  white-space: normal;
}

.completion-receipt-search-panel .inventory-document-search-actions button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.completion-receipt-search-panel .completion-receipt-compare-toggle {
  flex: 0 1 210px;
  min-height: 34px;
  white-space: normal;
}

.product-mapping-search-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.product-mapping-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.finished-product-price-search-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.finished-product-price-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.material-price-search-panel {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(120px, 0.65fr) minmax(180px, 1fr) minmax(240px, 1.35fr) minmax(105px, 0.6fr) minmax(190px, 1.05fr) auto;
  grid-template-areas:
    "price material name desc supplier supplierName actions"
    "source unit warehouse currency creator creator actions";
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.material-price-search-panel label:nth-child(1) { grid-area: price; }
.material-price-search-panel label:nth-child(2) { grid-area: material; }
.material-price-search-panel label:nth-child(3) { grid-area: name; }
.material-price-search-panel label:nth-child(4) { grid-area: desc; }
.material-price-search-panel label:nth-child(5) { grid-area: supplier; }
.material-price-search-panel label:nth-child(6) { grid-area: supplierName; }
.material-price-search-panel label:nth-child(7) { grid-area: source; }
.material-price-search-panel label:nth-child(8) { grid-area: unit; }
.material-price-search-panel label:nth-child(9) { grid-area: warehouse; }
.material-price-search-panel label:nth-child(10) { grid-area: currency; }
.material-price-search-panel label:nth-child(11) { grid-area: creator; }

.material-price-search-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.supplier-search-panel {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(240px, 1.3fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr) minmax(260px, 1.4fr) auto;
  grid-template-areas:
    "code name location contact phone info actions"
    "creator creator creator creator creator info actions";
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.supplier-search-panel label:nth-child(1) { grid-area: code; }
.supplier-search-panel label:nth-child(2) { grid-area: name; }
.supplier-search-panel label:nth-child(3) { grid-area: location; }
.supplier-search-panel label:nth-child(4) { grid-area: contact; }
.supplier-search-panel label:nth-child(5) { grid-area: phone; }
.supplier-search-panel label:nth-child(6) { grid-area: info; }
.supplier-search-panel label:nth-child(7) { grid-area: creator; }

.supplier-search-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.finished-product-price-change-search-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(120px, 0.65fr) minmax(220px, 1.2fr) minmax(260px, 1.35fr) minmax(90px, 0.45fr) minmax(120px, 0.65fr);
  grid-template-areas:
    "change price material name desc model actions"
    "dest dest warehouse currency status status actions";
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.finished-product-price-change-search-panel label:nth-child(1) { grid-area: change; }
.finished-product-price-change-search-panel label:nth-child(2) { grid-area: price; }
.finished-product-price-change-search-panel label:nth-child(3) { grid-area: material; }
.finished-product-price-change-search-panel label:nth-child(4) { grid-area: name; }
.finished-product-price-change-search-panel label:nth-child(5) { grid-area: desc; }
.finished-product-price-change-search-panel label:nth-child(6) { grid-area: model; }
.finished-product-price-change-search-panel label:nth-child(7) { grid-area: dest; }
.finished-product-price-change-search-panel label:nth-child(8) { grid-area: warehouse; }
.finished-product-price-change-search-panel label:nth-child(9) { grid-area: currency; }
.finished-product-price-change-search-panel label:nth-child(10) { grid-area: status; }

.finished-product-price-change-search-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.bulk-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.approval-bulk-action-bar {
  border-color: #b7d7d2;
  border-left: 4px solid var(--accent);
  background: #f6fbfa;
}

.approval-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.approval-workspace-tabs button {
  height: 34px;
  background: #eef4f9;
  color: #0f3554;
  border: 1px solid #cbd9e6;
}

.approval-workspace-tabs button:not([data-approval-tab]) {
  display: none;
}

.approval-workspace-tabs button.is-active {
  background: #0f766e;
  color: #fff;
  border-color: #1a73e8;
  font-weight: 700;
}

.approval-workspace-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.module-tabs button {
  height: 34px;
  background: #eef4f9;
  color: #0f3554;
  border: 1px solid #cbd9e6;
}

.module-tabs button.is-active {
  background: #e8f2ff;
  color: #005bbb;
  border-color: #1a73e8;
}

.completion-main-panel,
.completion-barcode-panel {
  display: none;
}

.completion-main-panel.is-active,
.completion-barcode-panel.is-active {
  display: block;
}

.completion-barcode-tabs {
  margin-top: 8px;
}

.barcode-scale-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #64748b;
  border-radius: 8px;
  background: #f8fafc;
}

.barcode-scale-panel.scale-ok {
  background: #ecfdf3;
  border-color: #86efac;
  border-left-color: #16a34a;
}

.barcode-scale-panel.scale-blocked {
  background: #fff7ed;
  border-color: #fdba74;
  border-left-color: #f97316;
}

.barcode-scale-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.barcode-scale-row label {
  display: grid;
  gap: 4px;
}

.barcode-scale-row input[type="number"] {
  width: 100px;
}

.barcode-scale-row .inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.scale-ok {
  color: #146c2e;
  font-weight: 700;
}

.scale-warn {
  color: #946200;
  font-weight: 700;
}

.completion-barcode-panel .custom-subpanel,
.completion-barcode-panel .document-lines-panel,
.completion-barcode-panel .table-wrap {
  border-color: #d8e1ea;
}

.completion-barcode-panel .metric {
  padding: 11px 12px;
  background: #ffffff;
  border-left-width: 4px;
}

.completion-barcode-panel .metric strong {
  font-size: 15px;
  color: #0b1f33;
}

.completion-barcode-panel .metric:nth-child(4),
.completion-barcode-panel .metric:nth-child(6),
.completion-barcode-panel .metric:nth-child(8) {
  background: #f0fdf4;
  border-left-color: #16a34a;
}

.is-hidden {
  display: none !important;
}

.approval-task-search-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.approval-task-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.material-search-panel,
.bom-search-panel,
.material-price-search-panel,
.supplier-search-panel,
.goods-receipt-search-panel,
.inventory-document-search-panel,
.inventory-search-panel,
.inventory-detail-search-panel,
.production-process-search-panel,
.product-mapping-search-panel,
.finished-product-price-search-panel,
.finished-product-price-change-search-panel,
.approval-task-search-panel,
.generic-list-search-panel,
.production-order-search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
  overflow: hidden;
}

.material-search-panel label,
.bom-search-panel label,
.material-price-search-panel label,
.supplier-search-panel label,
.goods-receipt-search-panel label,
.inventory-document-search-panel label,
.inventory-search-panel label,
.inventory-detail-search-panel label,
.production-process-search-panel label,
.product-mapping-search-panel label,
.finished-product-price-search-panel label,
.finished-product-price-change-search-panel label,
.approval-task-search-panel label,
.generic-list-search-panel label,
.production-order-search-panel label {
  flex: 0 1 140px;
  min-width: 0;
  grid-area: auto !important;
}

:is(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) label:has([name*="description"]),
:is(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) label:has([name*="name"]) {
  flex-basis: 210px;
}

:is(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) label:has([name*="number"]),
:is(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) label:has([name*="date"]),
:is(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) label:has([name*="status"]),
:is(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) label:has([name*="warehouse"]) {
  flex-basis: 125px;
}

.material-search-panel input,
.material-search-panel select,
.bom-search-panel input,
.bom-search-panel select,
.material-price-search-panel input,
.material-price-search-panel select,
.supplier-search-panel input,
.supplier-search-panel select,
.goods-receipt-search-panel input,
.goods-receipt-search-panel select,
.inventory-document-search-panel input,
.inventory-document-search-panel select,
.inventory-search-panel input,
.inventory-search-panel select,
.inventory-detail-search-panel input,
.inventory-detail-search-panel select,
.production-process-search-panel input,
.production-process-search-panel select,
.product-mapping-search-panel input,
.product-mapping-search-panel select,
.finished-product-price-search-panel input,
.finished-product-price-search-panel select,
.finished-product-price-change-search-panel input,
.finished-product-price-change-search-panel select,
.approval-task-search-panel input,
.approval-task-search-panel select,
.generic-list-search-panel input,
.generic-list-search-panel select,
.production-order-search-panel input,
.production-order-search-panel select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
}

.material-search-actions,
.bom-search-actions,
.material-price-search-actions,
.supplier-search-actions,
.goods-receipt-search-actions,
.inventory-document-search-actions,
.inventory-search-actions,
.inventory-detail-search-actions,
.production-process-search-actions,
.product-mapping-search-actions,
.finished-product-price-search-actions,
.finished-product-price-change-search-actions,
.approval-task-search-actions,
.generic-list-search-actions,
.po-search-actions {
  flex: 1 1 520px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  grid-area: auto !important;
  white-space: normal;
}

.material-search-actions button,
.bom-search-actions button,
.material-price-search-actions button,
.supplier-search-actions button,
.goods-receipt-search-actions button,
.inventory-document-search-actions button,
.inventory-search-actions button,
.inventory-detail-search-actions button,
.production-process-search-actions button,
.product-mapping-search-actions button,
.finished-product-price-search-actions button,
.finished-product-price-change-search-actions button,
.approval-task-search-actions button,
.generic-list-search-actions button,
.po-search-actions button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.file-action {
  min-width: 0;
  max-width: 320px;
}

.file-action input[type="file"] {
  max-width: 100%;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) .file-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 300px;
  max-width: 300px;
  min-width: 220px;
  height: 34px;
  margin: 0;
  font-size: 13px;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) .file-action span {
  flex: 0 0 auto;
  white-space: nowrap;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) .file-action input[type="file"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 5px 8px;
}

#customPanel .generic-list-search-panel {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end;
  gap: 8px 10px;
  padding: 10px 0 12px;
  margin: 0;
  border: 0;
  background: transparent;
}

#customPanel .generic-list-search-panel > label {
  display: grid;
  gap: 4px;
  flex: 0 0 110px;
  min-width: 0;
  max-width: 160px;
  color: #37516b;
  font-size: 12px;
}

#customPanel .generic-list-search-panel > label:has([name*="name"]),
#customPanel .generic-list-search-panel > label:has([name*="description"]) {
  flex-basis: 150px;
}

#customPanel .generic-list-search-panel > label:has([name*="status"]),
#customPanel .generic-list-search-panel > label:has([name*="method"]) {
  flex-basis: 96px;
}

#customPanel .generic-list-search-panel :is(input, select) {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 6px 10px;
}

#customPanel .generic-list-search-actions {
  display: flex !important;
  flex: 1 1 660px;
  align-items: center;
  gap: 6px;
  min-width: 620px;
  min-height: 34px;
  margin: 0;
  white-space: normal;
}

#customPanel .generic-list-search-actions button {
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
}

#customPanel .generic-list-search-actions .file-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 150px;
  min-width: 130px;
  max-width: 160px;
  height: 34px;
  color: #37516b;
}

#customPanel .generic-list-search-actions .file-action input[type="file"] {
  height: 34px;
  min-height: 34px;
  padding: 5px 8px;
}

#genericListImportMessage {
  flex: 1 1 100%;
  margin: 0;
}

.bulk-action-bar > div:first-child,
.bulk-action-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
}

.bulk-action-bar strong {
  color: var(--ink);
  font-size: 15px;
}

.bulk-action-buttons {
  display: flex;
  gap: 8px;
}

.bulk-action-buttons .danger-button {
  background: #fff1f0;
  color: var(--danger);
}

.approval-bulk-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8f5f3;
  color: #0f5f58;
  font-weight: 700;
}

.select-column {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
}

.select-column input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.module-portal {
  display: grid;
  gap: 12px;
}

.module-portal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.module-portal-head h2 {
  margin: 0;
  font-size: 24px;
}

.module-portal-head p {
  margin: 6px 0 0;
  color: #37516b;
}

.module-portal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #37516b;
  font-size: 13px;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 8px;
}

.module-card {
  height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 10px 12px;
  border: 1px solid #cfd9e5;
  background: #f8fbfe;
  color: var(--ink);
  text-align: left;
}

.module-card:hover {
  border-color: #1473d2;
  background: #f2f8ff;
}

.module-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-card span {
  color: #37516b;
  font-size: 12px;
}

.module-card em {
  grid-row: 1 / 3;
  grid-column: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4fa;
  color: #37516b;
  font-size: 11px;
  font-style: normal;
}

.module-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.custom-panel {
  margin-bottom: 16px;
}

.permission-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
}

.permission-users,
.permission-matrix {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  overflow: hidden;
}

.permission-users {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100vh - 112px);
}

.permission-users header,
.permission-matrix header {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.permission-user-list {
  max-height: calc(100vh - 162px);
  overflow: auto;
}

.permission-user {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.permission-user.is-active {
  background: #e5f4f0;
  color: var(--accent-strong);
}

.permission-table {
  width: 100%;
  min-width: 760px;
}

.permission-table input {
  width: 18px;
  height: 18px;
}

.permission-module-name {
  width: 34%;
  min-width: 260px;
  font-weight: 600;
}

.permission-action-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.permission-action-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.permission-action-check input {
  flex: 0 0 auto;
}

.permission-legacy-note {
  display: none;
  color: var(--muted);
  font-size: 12px;
}

.permission-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  border-left: 4px solid #1473d2;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  color: #0f5132;
}

.metric:nth-child(4n + 2) {
  border-left-color: #2a9d8f;
}

.metric:nth-child(4n + 3) {
  border-left-color: #b7791f;
}

.metric:nth-child(4n + 4) {
  border-left-color: #7c3aed;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.table-wrap.table-wrap-fit {
  max-height: calc(100vh - 260px);
}

.table-wrap::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid #f7f9fb;
  border-radius: 999px;
  background: #98a2b3;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #667085;
}

.table-wrap::-webkit-scrollbar-track {
  background: #f7f9fb;
}

table {
  width: max-content;
  border-collapse: collapse;
  min-width: max(100%, 760px);
  table-layout: fixed;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fb;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  border-bottom-color: #cdd8e3;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal;
  line-height: 1.25;
  vertical-align: middle;
  hyphens: auto;
}

td {
  font-size: 13px;
  max-width: 360px;
  line-height: 1.55;
}

tbody tr:hover {
  background: #f8fbff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.status-success {
  color: #146c2e;
  background: #e7f6ec;
  border-color: #b8e3c4;
}

.status-warning {
  color: #8a5a00;
  background: #fff5d6;
  border-color: #f3d27b;
}

.status-danger {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffccc7;
}

.status-neutral {
  color: #475467;
  background: #f2f4f7;
  border-color: #d0d5dd;
}

.status-info {
  color: #0759a3;
  background: #eef6ff;
  border-color: #b7d8ff;
}

th:last-child,
td:last-child {
  width: 140px;
  max-width: 160px;
  white-space: nowrap;
}

td:first-child,
td:nth-child(2),
td:nth-child(3) {
  max-width: 220px;
}

tbody tr.clickable-row {
  cursor: pointer;
}

tbody tr.clickable-row:hover {
  background: #eef6f4;
}

.production-process-table-wrap table {
  table-layout: fixed;
  min-width: 1500px;
}

.production-process-table-wrap th,
.production-process-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.production-process-table-wrap th:nth-child(1),
.production-process-table-wrap td:nth-child(1) {
  width: 112px;
}

.production-process-table-wrap th:nth-child(2),
.production-process-table-wrap td:nth-child(2) {
  width: 96px;
}

.production-process-table-wrap th:nth-child(3),
.production-process-table-wrap td:nth-child(3) {
  width: 180px;
}

.production-process-table-wrap th:nth-child(4),
.production-process-table-wrap td:nth-child(4) {
  width: 240px;
}

.production-process-table-wrap th:nth-child(5),
.production-process-table-wrap td:nth-child(5) {
  width: 76px;
}

.production-process-table-wrap th:nth-child(6),
.production-process-table-wrap td:nth-child(6) {
  width: 76px;
}

.production-process-table-wrap th:nth-child(7),
.production-process-table-wrap td:nth-child(7),
.production-process-table-wrap th:nth-child(8),
.production-process-table-wrap td:nth-child(8),
.production-process-table-wrap th:nth-child(9),
.production-process-table-wrap td:nth-child(9),
.production-process-table-wrap th:nth-child(10),
.production-process-table-wrap td:nth-child(10),
.production-process-table-wrap th:nth-child(11),
.production-process-table-wrap td:nth-child(11),
.production-process-table-wrap th:nth-child(12),
.production-process-table-wrap td:nth-child(12),
.production-process-table-wrap th:nth-child(13),
.production-process-table-wrap td:nth-child(13) {
  width: 62px;
}

.production-process-table-wrap th:nth-child(14),
.production-process-table-wrap td:nth-child(14) {
  width: 80px;
}

.production-process-table-wrap th:nth-child(15),
.production-process-table-wrap td:nth-child(15) {
  width: 124px;
}

.production-process-table-wrap th:last-child,
.production-process-table-wrap td:last-child {
  width: 218px;
  max-width: 218px;
}

.production-process-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.production-process-table-wrap .row-actions button {
  min-width: 56px;
  padding: 0 10px;
}

.product-mapping-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1500px;
}

.product-mapping-table-wrap th,
.product-mapping-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-mapping-table-wrap th:nth-child(1),
.product-mapping-table-wrap td:nth-child(1) {
  width: 110px;
}

.product-mapping-table-wrap th:nth-child(2),
.product-mapping-table-wrap td:nth-child(2) {
  width: 190px;
}

.product-mapping-table-wrap th:nth-child(3),
.product-mapping-table-wrap td:nth-child(3) {
  width: 260px;
}

.product-mapping-table-wrap th:nth-child(4),
.product-mapping-table-wrap td:nth-child(4),
.product-mapping-table-wrap th:nth-child(5),
.product-mapping-table-wrap td:nth-child(5),
.product-mapping-table-wrap th:nth-child(6),
.product-mapping-table-wrap td:nth-child(6),
.product-mapping-table-wrap th:nth-child(7),
.product-mapping-table-wrap td:nth-child(7) {
  width: 120px;
}

.product-mapping-table-wrap th:nth-child(8),
.product-mapping-table-wrap td:nth-child(8),
.product-mapping-table-wrap th:nth-child(9),
.product-mapping-table-wrap td:nth-child(9),
.product-mapping-table-wrap th:nth-child(10),
.product-mapping-table-wrap td:nth-child(10) {
  width: 70px;
}

.product-mapping-table-wrap th:nth-child(11),
.product-mapping-table-wrap td:nth-child(11),
.product-mapping-table-wrap th:nth-child(12),
.product-mapping-table-wrap td:nth-child(12),
.product-mapping-table-wrap th:nth-child(13),
.product-mapping-table-wrap td:nth-child(13),
.product-mapping-table-wrap th:nth-child(14),
.product-mapping-table-wrap td:nth-child(14) {
  width: 76px;
}

.product-mapping-table-wrap th:nth-child(15),
.product-mapping-table-wrap td:nth-child(15) {
  width: 132px;
}

.product-mapping-table-wrap th:last-child,
.product-mapping-table-wrap td:last-child {
  width: 126px;
  max-width: 126px;
}

.product-mapping-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-mapping-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.inventory-summary-table-wrap table {
  table-layout: fixed;
  min-width: 980px;
}

.inventory-summary-table-wrap th,
.inventory-summary-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inventory-summary-table-wrap th:nth-child(1),
.inventory-summary-table-wrap td:nth-child(1) {
  width: 130px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-summary-table-wrap th:nth-child(2),
.inventory-summary-table-wrap td:nth-child(2),
.inventory-summary-table-wrap th:nth-child(3),
.inventory-summary-table-wrap td:nth-child(3) {
  width: 230px;
}

.inventory-summary-table-wrap th:nth-child(4),
.inventory-summary-table-wrap td:nth-child(4),
.inventory-summary-table-wrap th:nth-child(6),
.inventory-summary-table-wrap td:nth-child(6),
.inventory-summary-table-wrap th:nth-child(7),
.inventory-summary-table-wrap td:nth-child(7) {
  width: 80px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-summary-table-wrap th:nth-child(5),
.inventory-summary-table-wrap td:nth-child(5) {
  width: 110px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-detail-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1500px;
}

.inventory-detail-table-wrap th,
.inventory-detail-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inventory-detail-table-wrap th:nth-child(1),
.inventory-detail-table-wrap td:nth-child(1) {
  width: 110px;
}

.inventory-detail-table-wrap th:nth-child(2),
.inventory-detail-table-wrap td:nth-child(2),
.inventory-detail-table-wrap th:nth-child(3),
.inventory-detail-table-wrap td:nth-child(3),
.inventory-detail-table-wrap th:nth-child(4),
.inventory-detail-table-wrap td:nth-child(4) {
  width: 130px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-detail-table-wrap th:nth-child(5),
.inventory-detail-table-wrap td:nth-child(5) {
  width: 200px;
}

.inventory-detail-table-wrap th:nth-child(6),
.inventory-detail-table-wrap td:nth-child(6) {
  width: 260px;
}

.inventory-detail-table-wrap th:nth-child(7),
.inventory-detail-table-wrap td:nth-child(7),
.inventory-detail-table-wrap th:nth-child(8),
.inventory-detail-table-wrap td:nth-child(8),
.inventory-detail-table-wrap th:nth-child(9),
.inventory-detail-table-wrap td:nth-child(9),
.inventory-detail-table-wrap th:nth-child(10),
.inventory-detail-table-wrap td:nth-child(10) {
  width: 80px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-detail-table-wrap th:nth-child(11),
.inventory-detail-table-wrap td:nth-child(11) {
  width: 180px;
}

.inventory-detail-table-wrap th:nth-child(12),
.inventory-detail-table-wrap td:nth-child(12) {
  width: 170px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap table {
  table-layout: fixed;
  min-width: 1120px;
}

.goods-receipt-table-wrap th,
.goods-receipt-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.goods-receipt-table-wrap th:nth-child(1),
.goods-receipt-table-wrap td:nth-child(1) {
  width: 125px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap th:nth-child(2),
.goods-receipt-table-wrap td:nth-child(2) {
  width: 150px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap th:nth-child(3),
.goods-receipt-table-wrap td:nth-child(3) {
  width: 130px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap th:nth-child(4),
.goods-receipt-table-wrap td:nth-child(4),
.goods-receipt-table-wrap th:nth-child(6),
.goods-receipt-table-wrap td:nth-child(6) {
  width: 62px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap th:nth-child(5),
.goods-receipt-table-wrap td:nth-child(5) {
  width: 88px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap th:nth-child(7),
.goods-receipt-table-wrap td:nth-child(7) {
  width: 112px;
  white-space: nowrap;
  word-break: normal;
}

.goods-receipt-table-wrap th:nth-child(8),
.goods-receipt-table-wrap td:nth-child(8) {
  width: 230px;
}

.goods-receipt-table-wrap th:last-child,
.goods-receipt-table-wrap td:last-child {
  width: 190px;
  max-width: 190px;
}

.goods-receipt-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.goods-receipt-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.material-picking-table-wrap table {
  width: 100%;
  min-width: 1500px;
  table-layout: fixed;
}

.material-picking-table-wrap th,
.material-picking-table-wrap td {
  padding: 8px 8px;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
  line-height: 1.42;
  max-width: none;
}

.material-picking-table-wrap th:nth-child(1),
.material-picking-table-wrap td:nth-child(1) {
  width: 92px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(2),
.material-picking-table-wrap td:nth-child(2) {
  width: 86px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(3),
.material-picking-table-wrap td:nth-child(3) {
  width: 112px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(4),
.material-picking-table-wrap td:nth-child(4) {
  width: 118px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(5),
.material-picking-table-wrap td:nth-child(5) {
  width: 112px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(6),
.material-picking-table-wrap td:nth-child(6) {
  width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.material-picking-table-wrap th:nth-child(7),
.material-picking-table-wrap td:nth-child(7) {
  width: 300px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.material-picking-table-wrap td:nth-child(6),
.material-picking-table-wrap td:nth-child(7) {
  overflow: visible;
}

.material-picking-table-wrap .table-wrap-text {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
  line-break: anywhere;
}

.material-picking-table-wrap th:nth-child(8),
.material-picking-table-wrap td:nth-child(8) {
  width: 70px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(9),
.material-picking-table-wrap td:nth-child(9) {
  width: 50px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(10),
.material-picking-table-wrap td:nth-child(10) {
  width: 96px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(11),
.material-picking-table-wrap td:nth-child(11) {
  width: 82px;
  white-space: nowrap;
  word-break: normal;
}

.material-picking-table-wrap th:nth-child(12),
.material-picking-table-wrap td:nth-child(12) {
  width: 106px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.material-picking-table-wrap th:nth-child(13),
.material-picking-table-wrap td:nth-child(13) {
  width: 54px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.material-picking-table-wrap .date-cell-date,
.material-picking-table-wrap .date-cell-time {
  display: block;
  line-height: 1.35;
}

.material-picking-table-wrap .date-cell-time {
  color: var(--muted);
}

.material-picking-table-wrap td:has(.row-actions) {
  width: 174px;
}

.material-picking-table-wrap th:last-child,
.material-picking-table-wrap td:last-child {
  width: 174px;
  max-width: 174px;
}

.material-picking-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-picking-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.inventory-document-table-wrap table {
  table-layout: fixed;
  min-width: 1240px;
}

.inventory-document-table-wrap th,
.inventory-document-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inventory-document-table-wrap th:nth-child(1),
.inventory-document-table-wrap td:nth-child(1) {
  width: 125px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-document-table-wrap th:nth-child(2),
.inventory-document-table-wrap td:nth-child(2) {
  width: 150px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-document-table-wrap th:nth-child(3),
.inventory-document-table-wrap td:nth-child(3) {
  width: 130px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-document-table-wrap th:nth-child(4),
.inventory-document-table-wrap td:nth-child(4),
.inventory-document-table-wrap th:nth-child(6),
.inventory-document-table-wrap td:nth-child(6),
.inventory-document-table-wrap th:nth-child(7),
.inventory-document-table-wrap td:nth-child(7) {
  width: 72px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-document-table-wrap th:nth-child(5),
.inventory-document-table-wrap td:nth-child(5) {
  width: 100px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-document-table-wrap th:nth-last-child(3),
.inventory-document-table-wrap td:nth-last-child(3) {
  width: 112px;
  white-space: nowrap;
  word-break: normal;
}

.inventory-document-table-wrap th:nth-last-child(2),
.inventory-document-table-wrap td:nth-last-child(2) {
  width: 210px;
}

.inventory-document-table-wrap th:last-child,
.inventory-document-table-wrap td:last-child {
  width: 190px;
  max-width: 190px;
}

.inventory-document-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inventory-document-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.warehouse-transfer-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1500px;
}

.warehouse-transfer-table-wrap th,
.warehouse-transfer-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.warehouse-transfer-table-wrap .col-document_number {
  width: 118px;
  white-space: nowrap;
}

.warehouse-transfer-table-wrap .col-document_date {
  width: 92px;
  white-space: nowrap;
}

.warehouse-transfer-table-wrap .col-from_warehouse_code,
.warehouse-transfer-table-wrap .col-to_warehouse_code {
  width: 64px;
  text-align: center;
  white-space: nowrap;
}

.warehouse-transfer-table-wrap .col-transfer_type {
  width: 142px;
}

.warehouse-transfer-table-wrap .col-material_number {
  width: 112px;
  white-space: nowrap;
}

.warehouse-transfer-table-wrap .col-material_name {
  width: 260px;
}

.warehouse-transfer-table-wrap .col-unit {
  width: 46px;
  text-align: center;
  white-space: nowrap;
}

.warehouse-transfer-table-wrap .col-total_quantity {
  width: 90px;
  white-space: nowrap;
}

.warehouse-transfer-table-wrap .col-status {
  width: 108px;
}

.warehouse-transfer-table-wrap .col-created_by_name {
  width: 96px;
}

.warehouse-transfer-table-wrap .col-remark {
  width: 210px;
}

.warehouse-transfer-table-wrap .table-wrap-text {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
  line-break: anywhere;
}

.warehouse-transfer-table-wrap .date-cell-date,
.warehouse-transfer-table-wrap .date-cell-time {
  display: block;
  line-height: 1.35;
}

.warehouse-transfer-table-wrap .date-cell-time {
  color: var(--muted);
}

.warehouse-transfer-table-wrap th:last-child,
.warehouse-transfer-table-wrap td:last-child {
  width: 190px;
  max-width: 190px;
}

.warehouse-transfer-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.completion-receipt-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1500px;
}

.completion-receipt-table-wrap th,
.completion-receipt-table-wrap td {
  padding: 8px 8px;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
  line-height: 1.42;
}

.completion-receipt-table-wrap .select-column {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
}

.completion-receipt-table-wrap th,
.completion-receipt-table-wrap td {
  padding-inline: 7px;
}

.completion-receipt-table-wrap .col-document_number {
  width: 88px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-production_order_number {
  width: 88px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-material_number {
  width: 100px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-material_name {
  width: 120px;
}

.completion-receipt-table-wrap .col-material_source {
  width: 44px;
}

.completion-receipt-table-wrap .col-planned_quantity {
  width: 58px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-order_completed_quantity {
  width: 68px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-document_date,
.completion-receipt-table-wrap .col-created_at {
  width: 78px;
}

.completion-receipt-table-wrap .col-completed_quantity {
  width: 68px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-unit {
  width: 36px;
  text-align: center;
}

.completion-receipt-table-wrap .col-issued_quantity {
  width: 62px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-item_count {
  width: 54px;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-warehouse_code {
  width: 46px;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
}

.completion-receipt-table-wrap .col-status {
  width: 86px;
}

.completion-receipt-table-wrap .col-created_by_name {
  width: 70px;
}

.completion-receipt-table-wrap .col-remark {
  width: 50px;
}

.completion-receipt-table-wrap .table-wrap-text {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
  line-break: anywhere;
}

.completion-receipt-table-wrap .date-cell-date,
.completion-receipt-table-wrap .date-cell-time {
  display: block;
  line-height: 1.35;
}

.completion-receipt-table-wrap .date-cell-time {
  color: var(--muted);
}

.completion-receipt-table-wrap th:last-child,
.completion-receipt-table-wrap td:last-child {
  width: 180px;
  max-width: 180px;
}

.completion-receipt-table-wrap .row-actions {
  gap: 5px;
}

.completion-receipt-table-wrap .row-actions button {
  min-width: 48px;
  padding-inline: 8px;
}

.completion-receipt-table-wrap :is(.col-production_order_number, .col-material_number, .col-remark) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html[lang="en-US"] .completion-receipt-table-wrap th,
html[lang="bn-BD"] .completion-receipt-table-wrap th {
  padding-inline: 5px;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0;
}

html[lang="en-US"] .completion-receipt-table-wrap .col-document_number,
html[lang="en-US"] .completion-receipt-table-wrap .col-production_order_number,
html[lang="en-US"] .completion-receipt-table-wrap .col-material_number,
html[lang="en-US"] .completion-receipt-table-wrap .col-material_source,
html[lang="en-US"] .completion-receipt-table-wrap .col-planned_quantity,
html[lang="en-US"] .completion-receipt-table-wrap .col-order_completed_quantity,
html[lang="en-US"] .completion-receipt-table-wrap .col-completed_quantity,
html[lang="en-US"] .completion-receipt-table-wrap .col-issued_quantity,
html[lang="en-US"] .completion-receipt-table-wrap .col-item_count,
html[lang="en-US"] .completion-receipt-table-wrap .col-created_at,
html[lang="en-US"] .completion-receipt-table-wrap .col-remark,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-document_number,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-production_order_number,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-material_number,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-material_source,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-planned_quantity,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-order_completed_quantity,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-completed_quantity,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-issued_quantity,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-item_count,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-created_at,
html[lang="bn-BD"] .completion-receipt-table-wrap .col-remark {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.finished-product-price-table-wrap table {
  table-layout: fixed;
  min-width: 1380px;
}

.finished-product-price-table-wrap th,
.finished-product-price-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.finished-product-price-table-wrap th:nth-child(1),
.finished-product-price-table-wrap td:nth-child(1) {
  width: 128px;
}

.finished-product-price-table-wrap th:nth-child(2),
.finished-product-price-table-wrap td:nth-child(2) {
  width: 105px;
}

.finished-product-price-table-wrap th:nth-child(3),
.finished-product-price-table-wrap td:nth-child(3) {
  width: 200px;
}

.finished-product-price-table-wrap th:nth-child(4),
.finished-product-price-table-wrap td:nth-child(4) {
  width: 250px;
}

.finished-product-price-table-wrap th:nth-child(5),
.finished-product-price-table-wrap td:nth-child(5),
.finished-product-price-table-wrap th:nth-child(6),
.finished-product-price-table-wrap td:nth-child(6) {
  width: 120px;
}

.finished-product-price-table-wrap th:nth-child(7),
.finished-product-price-table-wrap td:nth-child(7),
.finished-product-price-table-wrap th:nth-child(10),
.finished-product-price-table-wrap td:nth-child(10) {
  width: 64px;
}

.finished-product-price-table-wrap th:nth-child(8),
.finished-product-price-table-wrap td:nth-child(8),
.finished-product-price-table-wrap th:nth-child(9),
.finished-product-price-table-wrap td:nth-child(9) {
  width: 86px;
}

.finished-product-price-table-wrap th:nth-child(11),
.finished-product-price-table-wrap td:nth-child(11) {
  width: 95px;
}

.finished-product-price-table-wrap th:nth-child(12),
.finished-product-price-table-wrap td:nth-child(12) {
  width: 132px;
}

.finished-product-price-table-wrap th:last-child,
.finished-product-price-table-wrap td:last-child {
  width: 126px;
  max-width: 126px;
}

.finished-product-price-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finished-product-price-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.material-price-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1500px;
}

.material-price-table-wrap th,
.material-price-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.material-price-table-wrap th:nth-child(1),
.material-price-table-wrap td:nth-child(1) {
  width: 132px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:nth-child(2),
.material-price-table-wrap td:nth-child(2) {
  width: 105px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:nth-child(3),
.material-price-table-wrap td:nth-child(3) {
  width: 185px;
}

.material-price-table-wrap th:nth-child(4),
.material-price-table-wrap td:nth-child(4) {
  width: 260px;
}

.material-price-table-wrap th:nth-child(5),
.material-price-table-wrap td:nth-child(5) {
  width: 95px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:nth-child(6),
.material-price-table-wrap td:nth-child(6) {
  width: 180px;
}

.material-price-table-wrap th:nth-child(7),
.material-price-table-wrap td:nth-child(7) {
  width: 70px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:nth-child(8),
.material-price-table-wrap td:nth-child(8),
.material-price-table-wrap th:nth-child(9),
.material-price-table-wrap td:nth-child(9),
.material-price-table-wrap th:nth-child(12),
.material-price-table-wrap td:nth-child(12) {
  width: 58px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:nth-child(10),
.material-price-table-wrap td:nth-child(10),
.material-price-table-wrap th:nth-child(11),
.material-price-table-wrap td:nth-child(11) {
  width: 86px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:nth-child(13),
.material-price-table-wrap td:nth-child(13) {
  width: 92px;
  white-space: nowrap;
  word-break: normal;
}

.material-price-table-wrap th:last-child,
.material-price-table-wrap td:last-child {
  width: 126px;
  max-width: 126px;
}

.material-price-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-price-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.supplier-table-wrap table {
  table-layout: fixed;
  min-width: 1180px;
}

.supplier-table-wrap th,
.supplier-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.supplier-table-wrap th:nth-child(1),
.supplier-table-wrap td:nth-child(1) {
  width: 110px;
  white-space: nowrap;
  word-break: normal;
}

.supplier-table-wrap th:nth-child(2),
.supplier-table-wrap td:nth-child(2) {
  width: 260px;
}

.supplier-table-wrap th:nth-child(3),
.supplier-table-wrap td:nth-child(3) {
  width: 130px;
}

.supplier-table-wrap th:nth-child(4),
.supplier-table-wrap td:nth-child(4),
.supplier-table-wrap th:nth-child(5),
.supplier-table-wrap td:nth-child(5) {
  width: 120px;
}

.supplier-table-wrap th:nth-child(6),
.supplier-table-wrap td:nth-child(6) {
  width: 250px;
}

.supplier-table-wrap th:nth-child(7),
.supplier-table-wrap td:nth-child(7) {
  width: 92px;
  white-space: nowrap;
  word-break: normal;
}

.supplier-table-wrap th:nth-child(8),
.supplier-table-wrap td:nth-child(8) {
  width: 155px;
  white-space: nowrap;
  word-break: normal;
}

.supplier-table-wrap th:last-child,
.supplier-table-wrap td:last-child {
  width: 126px;
  max-width: 126px;
}

.supplier-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supplier-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.finished-product-price-change-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1500px;
}

.finished-product-price-change-table-wrap th,
.finished-product-price-change-table-wrap td {
  padding: 9px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.finished-product-price-change-table-wrap th:nth-child(1),
.finished-product-price-change-table-wrap td:nth-child(1),
.finished-product-price-change-table-wrap th:nth-child(2),
.finished-product-price-change-table-wrap td:nth-child(2) {
  width: 132px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(3),
.finished-product-price-change-table-wrap td:nth-child(3) {
  width: 108px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(4),
.finished-product-price-change-table-wrap td:nth-child(4) {
  width: 180px;
}

.finished-product-price-change-table-wrap th:nth-child(5),
.finished-product-price-change-table-wrap td:nth-child(5) {
  width: 260px;
}

.finished-product-price-change-table-wrap th:nth-child(6),
.finished-product-price-change-table-wrap td:nth-child(6) {
  width: 58px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(7),
.finished-product-price-change-table-wrap td:nth-child(7) {
  width: 86px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(8),
.finished-product-price-change-table-wrap td:nth-child(8) {
  width: 126px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(9),
.finished-product-price-change-table-wrap td:nth-child(9),
.finished-product-price-change-table-wrap th:nth-child(10),
.finished-product-price-change-table-wrap td:nth-child(10) {
  width: 82px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(11),
.finished-product-price-change-table-wrap td:nth-child(11) {
  width: 58px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(12),
.finished-product-price-change-table-wrap td:nth-child(12) {
  width: 135px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.finished-product-price-change-table-wrap th:nth-child(13),
.finished-product-price-change-table-wrap td:nth-child(13) {
  width: 72px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(14),
.finished-product-price-change-table-wrap td:nth-child(14) {
  width: 96px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(15),
.finished-product-price-change-table-wrap td:nth-child(15) {
  width: 170px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(16),
.finished-product-price-change-table-wrap td:nth-child(16) {
  width: 225px;
  max-width: 225px;
  white-space: nowrap;
  word-break: normal;
}

.finished-product-price-change-table-wrap th:nth-child(5),
.finished-product-price-change-table-wrap td:nth-child(5),
.finished-product-price-change-table-wrap th:nth-child(12),
.finished-product-price-change-table-wrap td:nth-child(12) {
  line-height: 1.35;
}

.finished-product-price-change-table-wrap td:nth-child(12) {
  max-width: 135px;
}

.finished-product-price-change-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finished-product-price-change-table-wrap .row-actions button {
  min-width: 52px;
  padding: 0 10px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
}

.pager button {
  background: #eef2f5;
  color: var(--ink);
}

.location-change-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.location-change-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.location-change-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.tool-panel.wide {
  grid-column: 1 / -1;
}

.tool-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

.tool-form.compact {
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
}

.production-order-search-panel,
.production-order-action-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
  margin-bottom: 12px;
}

.production-order-search-grid {
  display: grid;
  grid-template-columns:
    minmax(130px, 160px)
    minmax(170px, 220px)
    minmax(108px, 128px)
    repeat(3, minmax(126px, 146px))
    repeat(2, minmax(108px, 126px))
    minmax(150px, 190px)
    auto;
  align-items: end;
  gap: 8px 10px;
}

.production-order-file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.production-order-file-actions label {
  width: min(320px, 100%);
}

.production-order-search-grid label {
  min-width: 0;
}

.production-order-search-grid input,
.production-order-search-grid select,
.production-order-file-actions input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
}

.production-order-search-grid button,
.production-order-file-actions button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.po-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.tool-form label.wide {
  grid-column: span 2;
}

.compare-query-panel,
.compare-result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  margin-bottom: 16px;
}

.compare-query-panel .tool-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
}

.compare-query-panel .bom-version-search-form {
  grid-template-columns: minmax(260px, 1.4fr) minmax(160px, 0.75fr) minmax(140px, 0.65fr) minmax(260px, 1.4fr) auto;
}

.bom-version-search-form button {
  min-height: 38px;
}

.compare-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.compare-stats .metric {
  border-width: 2px;
}

.compare-metric-added {
  border-color: #36b37e;
  background: #dcfae6;
  color: #074d31;
}

.compare-metric-deleted {
  border-color: #f04438;
  background: #fee4e2;
  color: #912018;
}

.compare-metric-modified {
  border-color: #f79009;
  background: #fef0c7;
  color: #7a2e0e;
}

.compare-metric-unchanged {
  border-color: #98a2b3;
  background: #eef2f6;
  color: #344054;
}

.compare-result-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.compare-result-panel h2 span {
  color: var(--muted);
  font-weight: 400;
}

.compare-result-panel-added {
  border-color: #36b37e;
  border-left: 6px solid #12b76a;
  background: #e8f8ee;
}

.compare-result-panel-deleted {
  border-color: #f04438;
  border-left: 6px solid #f04438;
  background: #fee9e7;
}

.compare-result-panel-modified {
  border-color: #f79009;
  border-left: 6px solid #f79009;
  background: #fff3d6;
}

.compare-result-panel-unchanged {
  border-color: #98a2b3;
  border-left: 6px solid #98a2b3;
  background: #f1f5f9;
}

.compare-result-panel-added h2 {
  color: #116b42;
}

.compare-result-panel-deleted h2 {
  color: #b42318;
}

.compare-result-panel-modified h2 {
  color: #9a6700;
}

.compare-row-added td {
  background: #e3fcef;
}

.compare-row-deleted td {
  background: #fde8e7;
}

.compare-row-modified td {
  background: #fff1c2;
}

.compare-row-unchanged td {
  background: #f3f6fa;
  color: #667085;
}

.compare-result-panel-added thead th {
  background: #c7f0d8;
}

.compare-result-panel-deleted thead th {
  background: #ffd0cc;
}

.compare-result-panel-modified thead th {
  background: #ffe3a3;
}

.compare-result-panel-unchanged thead th {
  background: #e4e9f0;
}

.compare-change-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compare-change-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid #f79009;
  border-radius: 6px;
  background: #fff7d6;
  color: #344054;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.compare-old {
  color: #b42318;
  text-decoration: line-through;
}

.compare-new {
  color: #067647;
  font-weight: 700;
}

.compare-arrow {
  color: #667085;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.subtabs button {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f7f9fb;
  color: #102a43;
}

.subtabs button.is-active {
  background: #ffffff;
  border-color: var(--line);
  color: #0b5cad;
  font-weight: 700;
}

.tag {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: #344054;
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.bom-edit-table {
  table-layout: fixed;
  min-width: 1320px;
}

.bom-edit-table th,
.bom-edit-table td {
  padding: 8px 6px;
  vertical-align: top;
}

.bom-edit-table input,
.bom-edit-table textarea {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.bom-edit-table textarea {
  min-height: 42px;
  resize: vertical;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.bom-edit-table input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
}

.bom-edit-table input[readonly],
.bom-edit-table textarea[readonly] {
  background: #f7f9fb;
  color: #475467;
}

.bom-edit-table th:first-child,
.bom-edit-table td:first-child {
  width: 44px;
  max-width: 44px;
  text-align: center;
  vertical-align: middle;
}

.bom-edit-table th:nth-child(2),
.bom-edit-table td:nth-child(2) {
  width: 58px;
}

.bom-edit-table th:nth-child(3),
.bom-edit-table td:nth-child(3),
.bom-edit-table th:nth-child(4),
.bom-edit-table td:nth-child(4) {
  width: 108px;
}

.bom-edit-table th:nth-child(5),
.bom-edit-table td:nth-child(5) {
  width: 160px;
}

.bom-edit-table th:nth-child(6),
.bom-edit-table td:nth-child(6) {
  width: 220px;
}

.bom-edit-table th:nth-child(7),
.bom-edit-table td:nth-child(7) {
  width: 56px;
}

.bom-edit-table th:nth-child(8),
.bom-edit-table td:nth-child(8) {
  width: 86px;
}

.bom-edit-table th:nth-child(9),
.bom-edit-table td:nth-child(9),
.bom-edit-table th:nth-child(10),
.bom-edit-table td:nth-child(10) {
  width: 96px;
}

.bom-edit-table th:nth-child(11),
.bom-edit-table td:nth-child(11),
.bom-edit-table th:nth-child(12),
.bom-edit-table td:nth-child(12),
.bom-edit-table th:nth-child(13),
.bom-edit-table td:nth-child(13) {
  width: 76px;
}

.bom-edit-table th:nth-child(14),
.bom-edit-table td:nth-child(14) {
  width: 46px;
  white-space: normal;
}

.bom-edit-table th:nth-child(15),
.bom-edit-table td:nth-child(15) {
  width: 74px;
}

.change-data-cell {
  max-width: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.bom-history-table {
  table-layout: fixed;
  min-width: 0 !important;
  width: 100%;
}

.bom-history-wrap {
  overflow-x: hidden;
}

.history-type-col {
  width: 80px;
}

.history-child-col {
  width: 150px;
}

.history-small-col {
  width: 90px;
}

.history-number-col {
  width: 110px;
}

.history-change-col {
  width: auto;
}

.bom-history-table th,
.bom-history-table td {
  max-width: none !important;
  white-space: normal !important;
}

.bom-history-table th:last-child,
.bom-history-table td:last-child {
  width: auto !important;
  max-width: none !important;
  white-space: normal !important;
}

.change-data-box {
  max-width: 100%;
  display: grid;
  gap: 3px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.change-data-box span {
  display: block;
  padding: 2px 0;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 14px 0 0;
}

.info-grid dt {
  color: var(--muted);
}

.info-grid dd {
  margin: 0;
  min-width: 0;
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
}

.row-actions button {
  min-width: 48px;
  max-width: 100%;
  padding-inline: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.row-actions button,
.toolbar .secondary-button {
  background: #eef2f5;
  color: var(--ink);
}

.row-actions .danger-button,
.row-actions .action-danger {
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #ffccc7;
}

.row-actions .action-primary {
  background: #1f7668;
  color: #fff;
}

.row-actions .action-secondary {
  background: #eef2f5;
  color: #102a43;
}

.row-actions .ghost-button.action-danger {
  background: #fff7e6;
  color: #ad6800;
  border-color: #ffd591;
}

.link-button {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0056b3;
  font-weight: 600;
  text-decoration: underline;
}

.link-button:hover {
  background: transparent;
  color: #003f86;
}

.barcode-scan-actions {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(180px, 0.8fr) auto auto auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0 10px;
  padding: 12px;
  border: 1px solid #b7d7d0;
  border-left: 5px solid #1f7668;
  border-radius: 8px;
  background: #f0fdfa;
}

.barcode-scan-actions label:first-child {
  min-width: 0;
}

.barcode-scan-actions input {
  min-height: 36px;
  border-color: #1f7668;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 118, 104, 0.14);
}

.barcode-scan-actions #crBarcodeScanButton {
  min-width: 180px;
  background: #1f7668;
  color: #fff;
  font-weight: 800;
}

.barcode-scan-actions #crBarcodeReceiveAll {
  background: #e6f4ff;
  color: #0958d9;
  border-color: #91caff;
  font-weight: 700;
}

.barcode-scan-actions #crBarcodeMissing {
  background: #fff7e6;
  color: #ad6800;
  border-color: #ffd591;
  font-weight: 700;
}

.barcode-scan-actions .inline-check {
  align-self: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.barcode-scan-table-wrap table {
  min-width: 1060px;
}

.barcode-scan-table th,
.barcode-scan-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.barcode-scan-table th:first-child,
.barcode-scan-table td:first-child {
  width: 44px;
  text-align: center;
}

.barcode-scan-table th:nth-child(2),
.barcode-scan-table td:nth-child(2) {
  width: 78px;
}

.barcode-scan-table th:nth-child(3),
.barcode-scan-table td:nth-child(3) {
  width: 180px;
  font-weight: 600;
}

.barcode-scan-table th:nth-child(4),
.barcode-scan-table td:nth-child(4) {
  width: 190px;
}

.barcode-scan-table th:nth-child(5),
.barcode-scan-table td:nth-child(5) {
  width: 110px;
}

.barcode-scan-table th:nth-child(6),
.barcode-scan-table td:nth-child(6),
.barcode-scan-table th:nth-child(7),
.barcode-scan-table td:nth-child(7) {
  width: 150px;
}

.barcode-scan-table th:last-child,
.barcode-scan-table td:last-child {
  width: 190px;
}

.barcode-scan-row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.barcode-scan-row-actions button {
  height: 32px;
  padding: 0 10px;
}

.barcode-recent-table-wrap table {
  min-width: 900px;
  table-layout: fixed;
}

.barcode-recent-table th,
.barcode-recent-table td {
  vertical-align: middle;
  white-space: nowrap;
}

.barcode-recent-table th:nth-child(1),
.barcode-recent-table td:nth-child(1) {
  width: 44px;
  text-align: center;
}

.barcode-recent-table th:nth-child(2),
.barcode-recent-table td:nth-child(2) {
  width: 70px;
  text-align: center;
}

.barcode-recent-table th:nth-child(3),
.barcode-recent-table td:nth-child(3) {
  width: 170px;
  font-weight: 700;
}

.barcode-recent-table th:nth-child(4),
.barcode-recent-table td:nth-child(4),
.barcode-recent-table th:nth-child(7),
.barcode-recent-table td:nth-child(7) {
  width: 150px;
}

.barcode-recent-table th:nth-child(5),
.barcode-recent-table td:nth-child(5) {
  width: 104px;
  text-align: center;
}

.barcode-recent-table th:nth-child(6),
.barcode-recent-table td:nth-child(6) {
  width: 136px;
}

.barcode-recent-table th:nth-child(8),
.barcode-recent-table td:nth-child(8) {
  width: 180px;
}

.barcode-recent-table .barcode-scan-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.barcode-void-form {
  margin-top: 10px;
  padding: 12px;
  align-items: end;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.7fr) minmax(160px, 0.45fr);
  border: 1px solid #ffccc7;
  border-left: 5px solid #cf1322;
  border-radius: 8px;
  background: #fff7f6;
}

.barcode-void-form textarea {
  min-height: 38px;
  height: 38px;
  resize: vertical;
}

.barcode-void-form .danger-button,
.barcode-void-form #crBarcodeVoidReplace {
  background: #fff1f0;
  color: #cf1322;
  border-color: #ffa39e;
  font-weight: 800;
}

.barcode-recent-actions {
  justify-content: flex-start;
  gap: 8px;
  margin: 10px 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.barcode-recent-actions .primary-button {
  background: #1f7668;
  color: #fff;
  font-weight: 800;
}

.approval-workflow-toolbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.approval-search {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.approval-search label {
  width: min(360px, 100%);
}

.material-search-panel,
.bom-search-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.bom-search-panel {
  grid-template-columns: repeat(4, minmax(120px, 320px)) minmax(420px, 1fr);
}

.material-search-panel {
  grid-template-columns: repeat(5, minmax(120px, 320px));
}

.material-search-panel label,
.bom-search-panel label {
  min-width: 0;
}

.material-search-panel label {
  max-width: 320px;
}

.material-search-panel .material-search-actions {
  grid-column: 3 / -1;
  grid-row: 2;
  min-width: 0;
}

.material-search-actions .file-action {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.material-search-actions .file-action span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.material-search-actions .file-action input[type="file"] {
  width: 210px;
  min-height: 36px;
}

.bom-search-panel label {
  max-width: 320px;
}

.bom-search-panel label:nth-child(5),
.bom-search-panel label:nth-child(8) {
  max-width: 280px;
}

.bom-search-panel .bom-search-actions {
  grid-column: 4 / -1;
  grid-row: 2;
  align-self: end;
  min-width: 0;
}

.material-search-actions,
.bom-search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.material-search-actions button,
.bom-search-actions button {
  white-space: nowrap;
}

.file-action {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: #5d6d86;
  font-size: 0.9rem;
}

.file-action input[type="file"] {
  min-height: 42px;
  padding: 8px;
  border: 1px solid #d5dfec;
  border-radius: 6px;
  background: #fff;
  color: #17202a;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) .file-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 300px;
  max-width: 300px;
  min-width: 220px;
  height: 34px;
  margin: 0;
  font-size: 13px;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) .file-action span {
  flex: 0 0 auto;
  white-space: nowrap;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) .file-action input[type="file"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 5px 8px;
}

.approval-workflow-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #37516b;
}

.approval-workflow-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4fa;
  font-size: 12px;
  white-space: nowrap;
}

.approval-workflow-stats strong {
  color: var(--ink);
  font-size: 15px;
}

.approval-workflow-table-wrap table {
  min-width: 1120px;
}

.material-table-wrap table {
  min-width: 0;
  table-layout: fixed;
}

.material-table-wrap th,
.material-table-wrap td {
  padding: 9px 10px;
}

.material-table-wrap th:nth-child(1),
.material-table-wrap td:nth-child(1) {
  width: 13%;
}

.material-table-wrap th:nth-child(2),
.material-table-wrap td:nth-child(2) {
  width: 18%;
}

.material-table-wrap th:nth-child(3),
.material-table-wrap td:nth-child(3) {
  width: 31%;
}

.material-table-wrap td:nth-child(3) {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.material-table-wrap th:nth-child(4),
.material-table-wrap td:nth-child(4) {
  width: 7%;
}

.material-table-wrap th:nth-child(5),
.material-table-wrap td:nth-child(5) {
  width: 6%;
}

.material-table-wrap th:nth-child(6),
.material-table-wrap td:nth-child(6) {
  width: 5%;
}

.material-table-wrap th:nth-child(7),
.material-table-wrap td:nth-child(7) {
  width: 8%;
}

.material-table-wrap th:last-child,
.material-table-wrap td:last-child {
  width: 12%;
  max-width: none;
}

.material-table-wrap .row-actions {
  justify-content: flex-start;
  gap: 5px;
  flex-wrap: nowrap;
}

.material-table-wrap .row-actions button {
  height: 30px;
  min-width: 44px;
  padding: 0 7px;
  font-size: 12px;
}

.approval-workflow-table-wrap th,
.approval-workflow-table-wrap td {
  padding: 9px 12px;
  vertical-align: middle;
}

.approval-workflow-table-wrap th:first-child,
.approval-workflow-table-wrap td:first-child {
  width: 56px;
  max-width: 56px;
}

.approval-workflow-table-wrap th:nth-child(2),
.approval-workflow-table-wrap td:nth-child(2) {
  width: 280px;
  max-width: 320px;
}

.approval-workflow-table-wrap th:nth-child(3),
.approval-workflow-table-wrap td:nth-child(3),
.approval-workflow-table-wrap th:nth-child(4),
.approval-workflow-table-wrap td:nth-child(4) {
  width: 150px;
  max-width: 170px;
}

.approval-workflow-table-wrap th:nth-child(5),
.approval-workflow-table-wrap td:nth-child(5),
.approval-workflow-table-wrap th:nth-child(6),
.approval-workflow-table-wrap td:nth-child(6),
.approval-workflow-table-wrap th:nth-child(7),
.approval-workflow-table-wrap td:nth-child(7),
.approval-workflow-table-wrap th:nth-child(8),
.approval-workflow-table-wrap td:nth-child(8) {
  width: 96px;
  max-width: 110px;
}

.approval-workflow-table-wrap th:last-child,
.approval-workflow-table-wrap td:last-child {
  width: 260px;
  max-width: 280px;
  white-space: nowrap;
}

.approval-workflow-table-wrap .row-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.approval-workflow-table-wrap .row-actions button {
  height: 32px;
  padding: 0 10px;
}

.record-dialog {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
}

.record-dialog.approval-workflow-dialog {
  width: min(1080px, calc(100vw - 32px));
}

.record-dialog.production-order-dialog {
  width: min(1240px, calc(100vw - 32px));
}

.record-dialog.document-edit-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.record-dialog.completion-receipt-dialog {
  width: min(1720px, calc(100vw - 24px));
}

.record-dialog.goods-movement-dialog {
  width: min(1500px, calc(100vw - 24px));
}

.record-dialog.material-picking-dialog {
  width: min(1500px, calc(100vw - 24px));
}

.document-edit-dialog .record-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.goods-movement-dialog .record-fields {
  display: block;
}

.material-picking-dialog .record-fields {
  display: block;
}

.production-order-dialog .record-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.production-order-dialog .record-fields label {
  min-width: 0;
}

.production-order-dialog .record-fields textarea {
  min-height: 72px;
}

.production-order-dialog .production-order-bom-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.production-order-dialog .production-order-bom-panel h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.production-order-dialog .production-order-alternate-table {
  margin-top: 8px;
}

.production-order-dialog .production-order-alternate-table table {
  table-layout: fixed;
}

.production-order-dialog .production-order-alternate-table th:first-child,
.production-order-dialog .production-order-alternate-table td:first-child {
  width: 25%;
}

.production-order-dialog .production-order-alternate-table th:nth-child(2),
.production-order-dialog .production-order-alternate-table td:nth-child(2) {
  width: 75%;
}

.production-order-dialog .production-order-alternate-table select {
  width: 100%;
}

.material-picking-editor {
  display: grid;
  gap: 14px;
}

.material-picking-head-grid {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.05fr)
    minmax(170px, 0.8fr)
    minmax(190px, 0.9fr)
    minmax(110px, 0.45fr)
    minmax(110px, 0.45fr)
    minmax(130px, 0.55fr)
    minmax(130px, 0.55fr);
  gap: 10px 12px;
}

.material-picking-head-grid label,
.material-picking-line-grid label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #53657a;
  font-size: 12px;
}

.material-picking-line-grid label > span {
  height: 16px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-picking-head-grid .wide {
  grid-column: 1 / -1;
}

.material-picking-head-grid .material-picking-header-description {
  grid-column: 1 / span 4;
}

.material-picking-head-grid .material-picking-header-remark {
  grid-column: 5 / -1;
}

.material-picking-head-grid input,
.material-picking-head-grid textarea,
.material-picking-line-grid input,
.material-picking-line-grid select,
.material-picking-line-grid textarea {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 6px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-picking-head-grid textarea {
  min-height: 58px;
}

.material-picking-head-grid input[readonly],
.material-picking-head-grid textarea[readonly],
.material-picking-line-grid input[readonly],
.material-picking-line-grid textarea[readonly] {
  background: #f5f8fb;
  color: #415269;
}

.material-picking-items {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  overflow-x: auto;
}

.material-picking-items header,
.material-picking-line header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.material-picking-items h3,
.material-picking-line strong {
  margin: 0;
  font-size: 15px;
}

.material-picking-items p,
.material-picking-rows .empty-note {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.material-picking-rows {
  display: grid;
  gap: 10px;
}

.material-picking-line {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #fff;
  min-width: 1280px;
}

.material-picking-line-grid {
  display: grid;
  grid-template-columns:
    90px
    110px
    135px
    50px
    72px
    72px
    72px
    78px
    82px
    82px
    82px
    74px
    70px
    90px;
  gap: 8px;
  align-items: start;
}

.material-picking-line-grid .span-2 {
  grid-column: auto;
}

.material-picking-line-grid .material-picking-name-field textarea,
.material-picking-line-grid .material-picking-description-field textarea {
  height: 54px;
  min-height: 54px;
  max-height: 90px;
  line-height: 1.35;
  white-space: normal;
  overflow: auto;
  text-overflow: clip;
  resize: vertical;
}

.material-picking-line-grid textarea {
  resize: vertical;
  min-height: 34px;
  max-height: 70px;
}

.material-picking-line-grid .compact input {
  text-align: right;
}

.material-picking-dialog .material-picking-line-grid select {
  height: 34px !important;
  min-height: 34px !important;
}

.material-picking-line .remove-material-picking-line,
.material-picking-items #recalculateMaterialPickingItems,
.material-picking-editor #loadMaterialPickingSuggestion {
  height: 34px;
}

.material-picking-head-grid label.wide.material-picking-header-description {
  grid-column: 1 / span 4;
}

.material-picking-head-grid label.wide.material-picking-header-remark {
  grid-column: 5 / -1;
}

.warehouse-transfer-dialog .record-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1.1fr) minmax(150px, 0.55fr) minmax(170px, 0.65fr);
  gap: 10px 12px;
}

.warehouse-transfer-dialog .record-fields > label {
  display: grid;
  gap: 4px;
}

.warehouse-transfer-dialog .record-fields > label.wide,
.warehouse-transfer-dialog .record-fields > .wide {
  grid-column: 1 / -1;
}

.warehouse-transfer-dialog .record-fields > label.wide textarea {
  min-height: 62px;
}

.movement-editor {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  overflow-x: auto;
}

.movement-editor-head,
.movement-line header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.movement-editor h3,
.movement-line strong {
  margin: 0;
  font-size: 15px;
}

.movement-editor p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.movement-rows {
  display: grid;
  gap: 10px;
}

.movement-line {
  display: grid;
  gap: 8px;
  min-width: 1320px;
  padding: 10px 12px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #fff;
}

.movement-line header {
  min-height: 30px;
}

.movement-grid {
  display: grid;
  grid-template-columns:
    158px
    170px
    250px
    78px
    70px
    96px
    112px
    112px
    108px
    66px
    48px;
  gap: 8px;
  align-items: start;
}

.movement-grid label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #53657a;
  font-size: 12px;
}

.movement-grid label > span {
  height: 16px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movement-grid label.span-2 {
  grid-column: auto;
}

.movement-grid .span-4 {
  grid-column: 1 / -1;
}

.movement-grid .movement-meta.span-4 {
  grid-column: span 4;
}

.movement-grid input,
.movement-grid select,
.movement-grid textarea {
  width: 100%;
  min-width: 0;
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goods-movement-dialog .movement-grid textarea {
  height: 54px !important;
  min-height: 54px !important;
  resize: none;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.movement-grid input[readonly],
.movement-grid textarea[readonly] {
  background: #f5f8fb;
  color: #415269;
}

.movement-grid .compact input {
  text-align: right;
}

.movement-grid label.is-disabled {
  opacity: 0.62;
}

.warehouse-transfer-dialog .cf-transfer-field.is-disabled {
  display: none;
}

.warehouse-transfer-dialog .movement-rows {
  gap: 8px;
}

.warehouse-transfer-dialog .transfer-line {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #fff;
}

.warehouse-transfer-dialog .transfer-main-row {
  display: grid;
  grid-template-columns:
    190px
    minmax(160px, 0.9fr)
    minmax(300px, 1.65fr)
    minmax(78px, 0.34fr)
    minmax(76px, 0.32fr)
    minmax(62px, 0.26fr)
    minmax(130px, 0.65fr)
    64px;
  gap: 8px;
  align-items: end;
}

.warehouse-transfer-dialog .transfer-material-field .inline-field {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.warehouse-transfer-dialog .transfer-material-field input {
  min-width: 0;
}

.warehouse-transfer-dialog .transfer-cf-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.warehouse-transfer-dialog .cf-transfer-side {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(150px, 1fr) minmax(180px, 1.1fr);
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.warehouse-transfer-dialog .cf-side-title {
  grid-column: 1 / -1;
  color: #0b1f33;
  font-size: 13px;
}

.warehouse-transfer-dialog .transfer-line:not(.is-cf-same) .transfer-cf-row {
  display: none;
}

.warehouse-transfer-dialog .transfer-main-row label,
.warehouse-transfer-dialog .transfer-cf-row label {
  display: grid;
  gap: 4px;
  color: #53657a;
  font-size: 12px;
}

.warehouse-transfer-dialog .transfer-main-row input,
.warehouse-transfer-dialog .transfer-main-row select,
.warehouse-transfer-dialog .transfer-cf-row input,
.warehouse-transfer-dialog .transfer-cf-row select {
  height: 34px;
  min-height: 34px;
  padding: 6px 9px;
}

.warehouse-transfer-dialog .transfer-readonly-field input[readonly] {
  background: #f5f8fb;
  color: #415269;
}

.warehouse-transfer-dialog .transfer-desc-field input[readonly] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.warehouse-transfer-dialog .remove-transfer-row,
.warehouse-transfer-dialog #addTransferRow,
.warehouse-transfer-dialog .lookup-transfer-material-button {
  height: 34px;
}

.warehouse-transfer-dialog .transfer-line > input[type="hidden"] {
  display: none;
}

.movement-meta {
  padding: 5px 8px;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: #f7fafc;
}

.movement-meta input {
  display: none;
}

.movement-meta dl {
  display: flex;
  align-items: flex-start;
  gap: 8px 14px;
  margin: 0;
}

.movement-meta div {
  display: flex;
  min-width: 0;
  gap: 4px;
}

.movement-meta div:first-child {
  flex: 0 1 180px;
}

.movement-meta div:nth-child(3),
.movement-meta div:nth-child(4) {
  flex: 0 0 auto;
}

.movement-meta .wide {
  flex: 1 1 360px;
  min-width: 0;
}

.movement-meta dt {
  color: #53657a;
  font-size: 11px;
  line-height: 1.25;
  flex: 0 0 auto;
  white-space: nowrap;
}

.movement-meta dd {
  margin: 0;
  color: #1f2d3d;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.movement-meta .wide dd {
  display: -webkit-box;
  max-height: 32px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.goods-movement-dialog .remove-movement-row,
.goods-movement-dialog #addMovementRow,
.goods-movement-dialog .lookup-material-button {
  height: 34px;
}

.inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.document-item-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.document-item-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-item-editor h3 {
  margin: 0;
  font-size: 16px;
}

.document-item-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.document-item-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.document-item-table th,
.document-item-table td {
  padding: 8px;
  vertical-align: top;
}

.document-item-table th {
  white-space: nowrap;
}

.document-item-table th.wide-cell,
.document-item-table td.wide-cell {
  width: 220px;
}

.document-item-table th:first-child,
.document-item-table td:first-child {
  width: 180px;
}

.document-item-table th:nth-child(2),
.document-item-table td:nth-child(2),
.document-item-table th:nth-child(3),
.document-item-table td:nth-child(3) {
  width: 120px;
}

.document-item-table th:last-child,
.document-item-table td:last-child {
  width: 82px;
}

.document-item-table input,
.document-item-table textarea {
  width: 100%;
  min-height: 34px;
}

.document-item-table textarea {
  resize: vertical;
  min-height: 56px;
}

.document-lines-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.document-lines-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-lines-panel header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.shipment-group-lines {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
}

.shipment-group-lines th,
.shipment-group-lines td {
  padding: 8px;
  vertical-align: top;
}

.shipment-group-lines input,
.shipment-group-lines textarea {
  width: 100%;
  min-height: 34px;
}

.completion-receipt-dialog .record-fields {
  grid-template-columns:
    minmax(190px, 1.1fr)
    minmax(160px, 0.9fr)
    minmax(160px, 0.9fr)
    minmax(120px, 0.6fr)
    minmax(130px, 0.7fr)
    minmax(150px, 0.8fr);
  gap: 10px 12px;
}

.completion-receipt-dialog .document-field {
  min-width: 0;
}

.completion-receipt-dialog .document-field-production_order_number {
  grid-column: span 2;
}

.completion-receipt-dialog .document-field-material_number {
  grid-column: span 2;
}

.completion-receipt-dialog .document-field-material_name {
  grid-column: span 2;
}

.completion-receipt-dialog .document-field-material_description {
  grid-column: 1 / -1;
}

.completion-receipt-dialog .document-field-material_description textarea {
  min-height: 62px;
}

.completion-receipt-dialog .document-field-remark {
  grid-column: 1 / -1;
}

.completion-receipt-dialog .document-field-remark textarea {
  min-height: 44px;
}

.completion-receipt-dialog .document-field-unit,
.completion-receipt-dialog .document-field-planned_quantity,
.completion-receipt-dialog .document-field-completed_sum,
.completion-receipt-dialog .document-field-completed_quantity,
.completion-receipt-dialog .document-field-warehouse_id,
.completion-receipt-dialog .document-field-receipt_date {
  grid-column: span 1;
}

.completion-receipt-dialog .record-fields input,
.completion-receipt-dialog .record-fields select,
.completion-receipt-dialog .record-fields textarea {
  min-width: 0;
}

.completion-receipt-dialog .document-item-table {
  min-width: 1500px;
}

.completion-receipt-dialog .document-item-table th,
.completion-receipt-dialog .document-item-table td {
  padding: 7px;
}

.completion-receipt-dialog .document-item-table th:nth-child(1),
.completion-receipt-dialog .document-item-table td:nth-child(1) {
  width: 150px;
}

.completion-receipt-dialog .document-item-table th:nth-child(2),
.completion-receipt-dialog .document-item-table td:nth-child(2) {
  width: 150px;
}

.completion-receipt-dialog .document-item-table th:nth-child(3),
.completion-receipt-dialog .document-item-table td:nth-child(3) {
  width: 260px;
}

.completion-receipt-dialog .document-item-table th:nth-child(4),
.completion-receipt-dialog .document-item-table td:nth-child(4) {
  width: 70px;
}

.completion-receipt-dialog .document-item-table th:nth-child(5),
.completion-receipt-dialog .document-item-table td:nth-child(5),
.completion-receipt-dialog .document-item-table th:nth-child(6),
.completion-receipt-dialog .document-item-table td:nth-child(6),
.completion-receipt-dialog .document-item-table th:nth-child(7),
.completion-receipt-dialog .document-item-table td:nth-child(7),
.completion-receipt-dialog .document-item-table th:nth-child(8),
.completion-receipt-dialog .document-item-table td:nth-child(8) {
  width: 120px;
}

.completion-receipt-dialog .document-item-table th:nth-child(9),
.completion-receipt-dialog .document-item-table td:nth-child(9) {
  width: 100px;
}

.completion-receipt-dialog .document-item-table th:nth-child(10),
.completion-receipt-dialog .document-item-table td:nth-child(10) {
  width: 130px;
}

.completion-receipt-dialog .document-item-table th:nth-child(11),
.completion-receipt-dialog .document-item-table td:nth-child(11) {
  width: 150px;
}

.completion-receipt-dialog .document-item-table th:last-child,
.completion-receipt-dialog .document-item-table td:last-child {
  width: 78px;
}

.approval-workflow-dialog .record-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.approval-workflow-dialog .record-fields > label {
  align-self: start;
}

.approval-workflow-dialog .record-fields > label.wide textarea {
  min-height: 84px;
  resize: vertical;
}

.approval-workflow-dialog .approval-step-editor {
  grid-column: 1 / -1;
}

.record-dialog::backdrop {
  background: rgba(15, 23, 42, 0.36);
}

.record-dialog form {
  padding: 0;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.icon-button {
  width: 34px;
  padding: 0;
  background: #eef2f5;
  color: var(--ink);
}

.record-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.document-detail-dialog {
  width: min(1120px, calc(100vw - 48px));
}

.document-detail-dialog .record-fields {
  grid-template-columns: 1fr;
  gap: 12px;
}

.document-detail-section-title {
  margin: 0;
  font-size: 15px;
}

.document-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.document-detail-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
}

.document-detail-summary div.wide {
  grid-column: 1 / -1;
}

.document-detail-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.document-detail-summary strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.document-detail-items {
  padding: 0;
}

.document-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.document-detail-table {
  width: 100%;
  min-width: 860px;
  table-layout: auto;
}

.document-detail-table th,
.document-detail-table td {
  padding: 10px 12px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.document-detail-table th {
  background: #f6f8fa;
}

.document-detail-table th:nth-child(1),
.document-detail-table td:nth-child(1),
.document-detail-table th:nth-child(5),
.document-detail-table td:nth-child(5),
.document-detail-table th:nth-child(6),
.document-detail-table td:nth-child(6) {
  white-space: nowrap;
}

.document-detail-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.record-fields label.wide,
.record-fields > .wide {
  grid-column: 1 / -1;
}

.approval-step-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.approval-step-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.approval-step-table-wrap {
  overflow-x: visible;
}

.approval-step-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.approval-step-table th,
.approval-step-table td {
  padding: 8px;
  vertical-align: middle;
}

.approval-step-table th:first-child,
.approval-step-table td:first-child {
  width: 92px;
}

.approval-step-table th:nth-child(2),
.approval-step-table td:nth-child(2) {
  width: 160px;
}

.approval-step-table th:nth-child(4),
.approval-step-table td:nth-child(4) {
  width: 90px;
}

.approval-step-table th:last-child,
.approval-step-table td:last-child {
  width: 86px;
  max-width: 86px;
}

.approval-step-table input,
.approval-step-table select {
  height: 34px;
}

.approval-step-table td:first-child input {
  max-width: 68px;
}

.approval-step-table .remove-step {
  width: 64px;
  padding: 0;
}

.approval-workflow-dialog .approval-step-table th:nth-child(3),
.approval-workflow-dialog .approval-step-table td:nth-child(3),
.approval-workflow-dialog .approval-step-table th:nth-child(5),
.approval-workflow-dialog .approval-step-table td:nth-child(5) {
  width: auto;
}

.purchase-workflow-dialog .approval-step-table th:first-child,
.purchase-workflow-dialog .approval-step-table td:first-child {
  width: 90px;
}

.purchase-workflow-dialog .approval-step-table th:nth-child(2),
.purchase-workflow-dialog .approval-step-table td:nth-child(2) {
  width: 170px;
}

.purchase-workflow-dialog .approval-step-table th:nth-child(3),
.purchase-workflow-dialog .approval-step-table td:nth-child(3) {
  width: 320px;
}

.purchase-workflow-dialog .approval-step-table th:nth-child(4),
.purchase-workflow-dialog .approval-step-table td:nth-child(4) {
  width: 130px;
}

.purchase-workflow-dialog .approval-step-table th:nth-child(5),
.purchase-workflow-dialog .approval-step-table td:nth-child(5) {
  width: auto;
}

.purchase-workflow-dialog .approval-step-table th:last-child,
.purchase-workflow-dialog .approval-step-table td:last-child {
  width: 88px;
  max-width: 88px;
}

.approval-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.approval-detail-summary div {
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #edf1f5;
}

.approval-detail-summary div.wide {
  grid-column: 1 / -1;
}

.approval-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.approval-detail-summary strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.approval-detail-steps {
  margin-top: 0;
}

.record-fields textarea,
.record-fields select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.record-fields textarea {
  min-height: 84px;
  resize: vertical;
}

.record-dialog .message {
  margin: 0;
  padding: 0 16px 10px;
}

:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: end;
  gap: 8px 10px;
  overflow: hidden;
}

:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label {
  flex: 0 1 140px;
  min-width: 0;
  grid-area: auto !important;
}

:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label:has([name*="description"]),
:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label:has([name*="name"]) {
  flex-basis: 210px;
}

:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label:has([name*="number"]),
:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label:has([name*="date"]),
:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label:has([name*="status"]),
:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) > label:has([name*="warehouse"]) {
  flex-basis: 125px;
}

:where(
  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .production-process-search-panel,
  .product-mapping-search-panel,
  .finished-product-price-search-panel,
  .finished-product-price-change-search-panel,
  .approval-task-search-panel,
  .generic-list-search-panel,
  .production-order-search-panel
) :is(input, select) {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 10px;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .generic-list-search-actions,
  .po-search-actions
) {
  flex: 1 1 520px;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px;
  align-items: center;
  min-width: 0;
  grid-area: auto !important;
  white-space: normal;
}

:where(
  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .production-process-search-actions,
  .product-mapping-search-actions,
  .finished-product-price-search-actions,
  .finished-product-price-change-search-actions,
  .approval-task-search-actions,
  .po-search-actions
) button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.table-wrap .col-id {
  width: 72px;
  white-space: nowrap;
  word-break: normal;
  text-align: center;
}

.table-wrap :is(.col-document_number, .col-order_number, .col-code) {
  width: 118px;
  white-space: nowrap;
  word-break: normal;
}

.table-wrap :is(.col-document_date, .col-created_at, .col-updated_at, .col-effective_at, .col-start_date, .col-end_date) {
  width: 104px;
}

.table-wrap :is(.col-status, .col-approval_status, .col-modification_status) {
  width: 112px;
}

.table-wrap :is(.col-material_number, .col-child_material_number, .col-parent_material_number, .col-finished_material_number) {
  width: 180px;
  max-width: 220px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-wrap :is(.col-order_number, .col-document_number, .col-production_order_number, .col-sales_order_number, .col-expectation_number, .col-shipment_number, .col-receipt_number) {
  width: 118px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-wrap :is(.col-unit, .col-warehouse_code, .col-from_warehouse_code, .col-to_warehouse_code) {
  width: 60px;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
}

.table-wrap :is(.col-quantity, .col-total_quantity, .col-planned_quantity, .col-completed_quantity, .col-issued_quantity, .col-item_count, .col-rows) {
  width: 92px;
  white-space: nowrap;
  word-break: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #102a43;
}

.table-wrap :is(.col-created_by_name, .col-submitted_by_name, .col-operator_name) {
  width: 106px;
}

.table-wrap :is(.col-source, .col-material_source) {
  width: 72px;
}

.table-wrap .col-actions {
  width: 220px;
  min-width: 180px;
  white-space: normal;
}

.table-wrap :is(.col-material_name, .col-material_description, .col-remark, .col-description, .col-name) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.completion-receipt-table-wrap .col-production_order_number,
.completion-receipt-table-wrap .col-material_number,
.completion-receipt-table-wrap .col-remark {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.table-wrap .table-wrap-text {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
  line-break: anywhere;
  max-height: 4.8em;
  overflow: hidden;
}

.table-wrap .date-cell-date,
.table-wrap .date-cell-time {
  display: block;
  line-height: 1.35;
}

.table-wrap .date-cell-time {
  color: var(--muted);
}

.row-actions {
  flex-wrap: wrap;
}

.content-panel :is(.tool-panel, .custom-subpanel, .document-lines-panel, .table-wrap) {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.content-panel :is(.message, .error-message):not(:empty) {
  border-radius: 6px;
  padding: 7px 9px;
}

.content-panel .error-message:not(:empty) {
  border: 1px solid #ffa39e;
  background: #fff1f0;
  color: #a8071a;
}

.content-panel .message:not(:empty) {
  border: 1px solid #b7eb8f;
  background: #f6ffed;
  color: #135200;
}

#customPanel {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .movement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movement-meta dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
  }

  .app-header {
    height: auto;
    min-height: 52px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 8px 10px;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .header-brand {
    order: 1;
    flex: 0 0 auto;
    width: auto;
    max-width: 112px;
    line-height: 1.1;
    font-size: 15px;
    white-space: nowrap;
  }

  .top-nav {
    order: 6;
    flex: 1 1 auto;
    width: auto;
    overflow-x: auto;
    padding-top: 4px;
  }

  .top-nav-item {
    flex: 0 0 auto;
    min-width: 64px;
  }

  .header-spacer {
    display: none;
  }

  .language-switch {
    order: 7;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .language-switch button {
    min-width: 52px;
    padding: 0 6px;
  }

  .user-badge {
    order: 3;
    margin-left: auto;
    min-width: 0;
    max-width: 156px;
    height: 34px;
    padding: 6px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  #changePasswordButton {
    order: 4;
    width: auto;
    min-width: 72px;
    height: 34px;
    padding: 0 10px;
    white-space: nowrap;
  }

  #logoutButton {
    order: 5;
    width: auto;
    min-width: 52px;
    height: 34px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .workspace {
    min-height: calc(100vh - 90px);
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .workspace.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .business-sidebar {
    position: static;
    min-height: 0;
    max-height: none;
    padding: 10px;
  }

  .workspace.sidebar-collapsed .business-sidebar {
    padding: 10px;
  }

  .business-sidebar-head,
  .workspace.sidebar-collapsed .business-sidebar-head {
    margin: 0 0 8px;
  }

  .business-sidebar-title {
    display: block;
  }

  .workspace.sidebar-collapsed .business-sidebar-title {
    display: block;
  }

  .sidebar-toggle {
    display: none;
  }

  .workspace.sidebar-collapsed .module-group-list {
    display: grid;
  }

  .module-group-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow-x: visible;
    max-width: 100%;
    padding-bottom: 4px;
  }

  .module-group-button {
    min-width: 0;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .module-group-button.is-active,
  .module-group-button:hover {
    border-left-color: transparent;
    border-bottom-color: #1473d2;
  }

  .main {
    width: 100%;
    min-width: 0;
    height: auto;
    overflow: visible;
  }

  .content-panel,
  .login-panel {
    width: 100%;
    min-width: 0;
    padding: 12px;
  }

  .topbar,
  .login-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric {
    padding: 10px;
  }

  .metric strong {
    font-size: 20px;
  }

  .module-portal-head {
    display: grid;
    gap: 10px;
  }

  .module-portal-head h2 {
    font-size: 22px;
  }

  .module-portal-meta {
    justify-content: space-between;
  }

  .module-card-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 64px;
    height: auto;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar label,
  .toolbar button {
    width: 100%;
  }

  .material-search-panel,
  .bom-search-panel,
  .material-price-search-panel,
  .supplier-search-panel,
  .goods-receipt-search-panel,
  .inventory-document-search-panel,
  .inventory-search-panel,
  .inventory-detail-search-panel,
  .generic-list-search-panel {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .material-price-search-panel label,
  .material-price-search-actions,
  .supplier-search-panel label,
  .supplier-search-actions,
  .goods-receipt-search-panel label,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .generic-list-search-panel label,
  .generic-list-search-actions {
    grid-area: auto;
  }

  .material-search-actions,
  .bom-search-actions,
  .material-price-search-actions,
  .supplier-search-actions,
  .goods-receipt-search-actions,
  .inventory-document-search-actions,
  .inventory-search-actions,
  .inventory-detail-search-actions,
  .generic-list-search-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .barcode-scan-actions,
  .barcode-void-form {
    grid-template-columns: 1fr;
  }

  .barcode-scan-actions #crBarcodeScanButton {
    width: 100%;
    min-width: 0;
  }

  #customPanel .generic-list-search-actions {
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }

  #customPanel .generic-list-search-actions .file-action {
    width: 100%;
    max-width: none;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 560px;
    max-width: none;
  }

  th,
  td {
    padding: 9px 10px;
  }

  .compare-query-panel .tool-form,
  .compare-stats {
    grid-template-columns: 1fr;
  }

  .permission-layout {
    grid-template-columns: 1fr;
  }

  .permission-users {
    position: static;
    max-height: none;
  }

  .permission-user-list {
    max-height: 360px;
  }

  .tool-grid,
  .tool-form,
  .tool-form.compact {
    grid-template-columns: 1fr;
  }

  .production-order-search-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .po-search-actions {
    grid-column: 1 / -1;
  }

  .tool-panel.wide {
    grid-column: auto;
  }

  .record-fields {
    grid-template-columns: 1fr;
  }

  .record-dialog {
    width: min(96vw, 760px);
  }
}

@media (max-width: 430px) {
  .movement-grid {
    grid-template-columns: 1fr;
  }

  .movement-grid label.span-2 {
    grid-column: span 1;
  }

  .movement-meta dl {
    grid-template-columns: 1fr;
  }

  .movement-editor-head,
  .movement-line header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header {
    align-items: center;
    gap: 6px;
  }

  .header-brand {
    max-width: 92px;
    font-size: 14px;
  }

  .language-switch {
    order: 6;
    width: 100%;
    display: flex;
  }

  .language-switch button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 4px;
    font-size: 11px;
  }

  .user-badge {
    flex: 1 1 120px;
    max-width: none;
  }

  #changePasswordButton,
  #logoutButton {
    flex: 0 0 auto;
    min-width: 50px;
    padding: 0 8px;
    font-size: 13px;
  }

  #changePasswordButton {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-nav {
    order: 7;
    width: 100%;
    flex-basis: 100%;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-sidebar-title {
    font-size: 15px;
  }

  h1 {
    font-size: 22px;
  }

  .workspace {
    padding: 8px;
  }

  .topbar {
    margin-bottom: 10px;
  }

  .topbar p {
    font-size: 14px;
  }

  .summary-grid {
    display: none;
  }

  .module-group-button {
    min-width: 0;
  }

  .module-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-card em {
    grid-row: auto;
    grid-column: auto;
    width: fit-content;
  }

  .table-wrap {
    border-radius: 6px;
  }

  table {
    min-width: 520px;
  }

  th,
  td {
    font-size: 12px;
    padding: 8px;
  }

  td {
    max-width: 150px;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .row-actions button {
    width: 48px;
    padding: 0;
  }
}
