:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --line: #1f2933;
  --line-soft: #d6dde3;
  --text: #18212b;
  --muted: #66727f;
  --blue: #145fca;
  --red: #e1192d;
  --green: #dfeeda;
  --green-strong: #cfe5c8;
  --teal: #127f62;
  --amber: #a56a00;
  --gray-cell: #c7c9c9;
  --white-cell: #ffffff;
  --sidebar: #17212f;
  --sidebar-soft: #263344;
  --focus: #2d72e8;
  --danger-bg: #fff1f2;
  --ok-bg: #edf8f1;
  --warning-bg: #fff7df;
  --shortage-block-width: 370px;
  --shortage-blocks-per-row: 4;
  --shortage-row-height: 25px;
  --shortage-current-row-height: 30px;
  --shortage-title-row-height: 25px;
  --shortage-head-row-height: 25px;
  --ledger-row-height: 34px;
  --ledger-header-row-height: 34px;
  --summary-row-height: 45px;
  --global-tile-row-height: 94px;
  --panel-header-row-height: 56px;
  --archive-row-height: 58px;
  --nav-row-height: 40px;
  --custom-module-row-height: 92px;
  --shortage-font-size: 12px;
  --shortage-detail-font-size: 12px;
  --shortage-title-font-size: 13px;
  --shortage-label-font-size: 12px;
  --shortage-total-font-size: 12px;
  --ledger-font-size: 13px;
  --ledger-header-font-size: 13px;
  --archive-inline-font-size: 13px;
  --archive-inline-header-font-size: 13px;
  --ledger-image-font-size: 12px;
  --ledger-switch-font-size: 12px;
  --shortage-font-weight: 400;
  --shortage-detail-font-weight: 400;
  --shortage-title-font-weight: 800;
  --shortage-label-font-weight: 700;
  --shortage-total-font-weight: 700;
  --shortage-bed-font-weight: 400;
  --ledger-font-weight: 400;
  --ledger-header-font-weight: 700;
  --archive-inline-font-weight: 400;
  --archive-inline-header-font-weight: 700;
  --ledger-image-font-weight: 500;
  --ledger-switch-font-weight: 700;
  --shortage-label-column-width: 68px;
  --shortage-size-column-width: 31px;
  --shortage-total-column-width: 45px;
  --shortage-bed-column-width: 40px;
  --shortage-bed-font-size: 11px;
  --shortage-block-gap: 10px;
  --shortage-block-actions-height: 30px;
  --shortage-action-row-height: 26px;
  --shortage-action-key-size: 26px;
  --shortage-action-key-font-size: 11px;
  --shortage-action-gap: 4px;
  --shortage-status-label-width: 32px;
  --shortage-status-label-font-size: 10px;
  --shortage-status-label-line-height: 11px;
  --shortage-status-label-em-font-size: 9px;
  --shortage-status-label-em-line-height: 9px;
  --shortage-queue-inline-height: 29px;
  --shortage-queue-inline-font-size: 14px;
  --shortage-queue-inline-padding-x: 9px;
  --business-tabs-height: 42px;
  --sidebar-width: 90px;
  --business-tabs-left: var(--sidebar-width);
  --shortage-inventory-bg: #dfeeda;
  --shortage-layout-color: #145fca;
  --shortage-remark-color: #e1192d;
  font-family:
    "Microsoft YaHei",
    "Segoe UI",
    Arial,
    sans-serif;
}

/* StandardListPageScaffold v4: one executable layout contract for every ordinary list. */
:root {
  --standard-list-top-card-width: 100px;
  --standard-list-top-card-height: 45px;
  --standard-list-top-card-gap: 6px;
  --standard-list-page-header-height: 56px;
  --standard-list-filter-toolbar-height: 40px;
  --standard-list-filter-control-width: 142px;
  --standard-list-filter-field-gap: 10px;
  --standard-list-filter-date-query-gap: 20px;
  --standard-list-filter-query-button-gap: 8px;
  --standard-list-filter-label-control-gap: 6px;
  --standard-list-filter-control-height: 28px;
  --standard-list-filter-row-gap: 6px;
  --standard-list-active-value-color: #0b63ce;
  --standard-list-match-color: #92400e;
  --standard-list-match-background: #fef3c7;
}

.standard-list-page-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: var(--standard-list-page-header-height) !important;
}

.standard-list-top-filter-cards,
.production-main-topbar-stats.standard-list-top-filter-cards,
.supplier-purchase-topbar-stats.standard-list-top-filter-cards,
.sales-topbar-stats.standard-list-top-filter-cards {
  display: flex;
  align-items: center;
  gap: var(--standard-list-top-card-gap) !important;
  min-width: 0;
  overflow: hidden;
}

.standard-list-top-filter-card,
.standard-list-top-filter-cards > .production-main-topbar-stat,
.standard-list-top-filter-cards > .supplier-purchase-topbar-stat,
.standard-list-top-filter-cards > .sales-topbar-stat {
  box-sizing: border-box;
  flex: 0 0 var(--standard-list-top-card-width) !important;
  width: var(--standard-list-top-card-width) !important;
  min-width: var(--standard-list-top-card-width) !important;
  max-width: var(--standard-list-top-card-width) !important;
  height: var(--standard-list-top-card-height) !important;
  min-height: var(--standard-list-top-card-height) !important;
  max-height: var(--standard-list-top-card-height) !important;
}

.standard-list-top-filter-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid #d3dce8;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.standard-list-top-filter-card:hover,
.standard-list-top-filter-card:focus-visible {
  border-color: #6aa5e8;
  outline: none;
}

.standard-list-top-filter-card.is-active,
.standard-list-top-filter-card[aria-pressed="true"] {
  border-color: #1268c4;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px #1268c4;
}

.standard-list-top-filter-card > span {
  max-width: 100%;
  color: #607086;
  font-size: 12px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standard-list-top-filter-card > strong {
  max-width: 100%;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standard-list-filter-toolbar {
  --standard-list-field-gap: var(--standard-list-filter-field-gap);
  --standard-list-label-gap: var(--standard-list-filter-label-control-gap);
  --standard-list-control-height: var(--standard-list-filter-control-height);
  --standard-list-row-gap: var(--standard-list-filter-row-gap);
  box-sizing: border-box;
  display: flex !important;
  align-items: center !important;
  min-height: var(--standard-list-filter-toolbar-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.standard-list-page-scaffold .standard-list-filter-toolbar .supplier-purchase-list-tools,
.standard-list-page-scaffold .standard-list-filter-toolbar .production-main-list-tools,
.standard-list-page-scaffold .standard-list-filter-toolbar.supplier-purchase-list-tools,
.standard-list-page-scaffold .standard-list-filter-toolbar.production-main-list-tools {
  box-sizing: border-box;
  align-items: center !important;
  width: 100%;
  min-height: 0 !important;
  max-height: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.standard-list-filter-toolbar .standard-list-filter-fields,
.standard-list-filter-toolbar .production-main-list-search,
.standard-list-filter-toolbar .supplier-purchase-list-search,
.standard-list-filter-toolbar .finance-query-fields,
.standard-list-filter-toolbar .reports-query-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap !important;
  column-gap: var(--standard-list-field-gap) !important;
  row-gap: var(--standard-list-row-gap) !important;
  min-width: 0;
  max-height: none !important;
  overflow: visible !important;
}

.standard-list-filter-toolbar label.standard-list-filter-field {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex: 0 0 auto;
  gap: var(--standard-list-label-gap) !important;
  margin: 0 !important;
  white-space: nowrap;
}

.standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-label {
  flex: 0 0 auto;
  color: #20364f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  width: var(--standard-list-filter-control-width) !important;
  min-width: var(--standard-list-filter-control-width) !important;
  max-width: var(--standard-list-filter-control-width) !important;
  height: var(--standard-list-control-height) !important;
  min-height: var(--standard-list-control-height) !important;
  max-height: var(--standard-list-control-height) !important;
}

.standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control.clearable-control {
  width: var(--standard-list-filter-control-width) !important;
}

.standard-list-filter-toolbar .standard-list-filter-control > .clearable-control-button {
  box-sizing: border-box;
  min-width: 14px;
  max-width: 14px;
  min-height: 14px !important;
  max-height: 14px !important;
}

.standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control > input,
.standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control > select,
.standard-list-filter-toolbar label.standard-list-filter-field > input,
.standard-list-filter-toolbar label.standard-list-filter-field > select,
.standard-list-filter-toolbar .standard-list-query-button {
  box-sizing: border-box;
  height: var(--standard-list-control-height) !important;
  min-height: var(--standard-list-control-height) !important;
  max-height: var(--standard-list-control-height) !important;
}

.standard-list-page-scaffold .standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control > input,
.standard-list-page-scaffold .standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control > select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: var(--standard-list-filter-control-height) !important;
  min-height: var(--standard-list-filter-control-height) !important;
  max-height: var(--standard-list-filter-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 1px solid #b8c7d9 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: #fff !important;
  color: #14263b;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 26px !important;
}

.standard-list-page-scaffold .standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control > input:focus,
.standard-list-page-scaffold .standard-list-filter-toolbar label.standard-list-filter-field > .standard-list-filter-control > select:focus {
  border-color: #2d72e8 !important;
  box-shadow: inset 0 0 0 1px rgba(45, 114, 232, 0.26) !important;
}

.standard-list-page-scaffold .standard-list-filter-toolbar label.standard-list-filter-field,
.standard-list-page-scaffold .standard-list-filter-toolbar .supplier-purchase-search-wide,
.standard-list-page-scaffold .standard-list-filter-toolbar .production-main-search-wide {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-left: 0 !important;
}

.standard-list-filter-toolbar .standard-list-query-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--standard-list-filter-query-button-gap) !important;
  min-width: 0;
}

.standard-list-filter-toolbar .standard-list-query-group.standard-list-query-after-date {
  margin-left: calc(var(--standard-list-filter-date-query-gap) - var(--standard-list-filter-field-gap));
}

.standard-list-filter-toolbar .standard-list-query-group > label.standard-list-filter-field {
  flex: 0 0 auto;
  min-width: 0;
}

.standard-list-filter-toolbar .standard-list-query-group > label.standard-list-filter-field > .standard-list-filter-control {
  flex: 0 0 var(--standard-list-filter-control-width);
  width: var(--standard-list-filter-control-width) !important;
  min-width: var(--standard-list-filter-control-width) !important;
}

.standard-list-page-scaffold .standard-list-filter-control.clearable-control:not(.has-value) > .clearable-control-button {
  display: none !important;
}

.standard-list-page-scaffold .standard-list-filter-control.clearable-control.has-value > input[data-standard-list-filter-role] {
  color: var(--standard-list-active-value-color) !important;
  font-weight: 600 !important;
}

.standard-list-page-scaffold input[data-standard-list-filter-role]::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

.standard-list-search-match {
  padding: 0 1px;
  border-radius: 2px;
  background: var(--standard-list-match-background);
  color: var(--standard-list-match-color);
  font-weight: 600;
}

.standard-list-data-grid-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.standard-list-data-grid {
  table-layout: fixed;
}

.standard-list-top-filter-card-editor > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.standard-list-top-filter-card-editor > header span {
  color: #607086;
  font-size: 12px;
}

.standard-list-top-filter-card-editor-rows {
  display: grid;
  gap: 6px;
}

.standard-list-top-filter-card-editor-row {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) minmax(150px, 1.2fr) 142px minmax(120px, 1fr) 64px auto auto;
  align-items: end;
  gap: 6px;
}

.standard-list-top-filter-card-editor-row label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #607086;
  font-size: 12px;
}

.standard-list-top-filter-card-editor-row input,
.standard-list-top-filter-card-editor-row select,
.standard-list-top-filter-card-editor-row button {
  box-sizing: border-box;
  min-width: 0;
  height: 28px;
}

.standard-list-top-filter-card-editor-row .standard-list-top-filter-card-visible {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 4px;
  color: #0f172a;
}

.standard-list-top-filter-card-editor-row .standard-list-top-filter-card-visible input {
  width: 14px;
  height: 14px;
}

.standard-list-layout-editor,
.standard-list-layout-columns {
  display: grid;
  gap: 8px;
}

.standard-list-layout-section {
  padding: 10px;
  border: 1px solid #d7e0ea;
  background: #fff;
}

.standard-list-layout-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.standard-list-layout-section > header div {
  display: grid;
  gap: 2px;
}

.standard-list-layout-section > header span,
.standard-list-layout-save-state {
  color: #607086;
  font-size: 12px;
}

.standard-list-layout-column-row {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #e0e7ef;
  background: #fbfdff;
}

.standard-list-layout-column-basic,
.standard-list-layout-style-group,
.standard-list-layout-footer {
  display: flex;
  align-items: end;
  gap: 6px;
}

.standard-list-layout-column-basic {
  flex-wrap: wrap;
}

.standard-list-layout-style-group {
  display: grid;
  grid-template-columns: 44px repeat(4, minmax(88px, 1fr));
}

.standard-list-layout-style-group > strong {
  align-self: center;
  color: #30445c;
  font-size: 12px;
}

.standard-list-layout-field {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #607086;
  font-size: 12px;
}

.standard-list-layout-field input,
.standard-list-layout-column-basic button,
.standard-list-layout-footer button {
  box-sizing: border-box;
  min-width: 0;
  height: 28px;
}

.standard-list-layout-visible {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 4px;
}

.standard-list-layout-footer {
  justify-content: flex-end;
  padding: 8px 0 0;
}

.standard-list-layout-footer > span {
  margin-right: auto;
}

@media (max-width: 760px) {
  .standard-list-page-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .standard-list-top-filter-card-editor-row {
    grid-template-columns: 28px 1fr;
  }

  .standard-list-layout-style-group {
    grid-template-columns: 44px 1fr 1fr;
  }
}

.reports-view,
.reports-panel,
.reports-board {
  min-width: 0;
  min-height: 0;
}

.reports-panel {
  padding: 0;
  overflow: hidden;
}

.reports-workspace {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(100vh - 156px);
  padding: 8px;
  color: #10233f;
  background: #f4f7fb;
}

.reports-actions {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
}

.reports-actions label {
  display: grid;
  gap: 3px;
  color: #425775;
  font-size: 11px;
  font-weight: 700;
}

.reports-actions select,
.reports-advanced-grid input,
.reports-advanced-grid select {
  height: 30px;
  min-width: 122px;
  padding: 0 8px;
  border: 1px solid #b7c8dc;
  border-radius: 2px;
  color: #0e315c;
  background: #fff;
  font: 12px "Microsoft YaHei", sans-serif;
}

.reports-result-count {
  white-space: nowrap;
  color: #546b88;
  font-size: 12px;
}

.reports-table-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 420px;
  border: 1px solid #b8c9dc;
  background: #fff;
}

.reports-table-scroll {
  position: relative;
  flex: 1 1 auto;
  max-height: calc(100vh - 270px);
  overflow: auto;
}

.reports-table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font: 12px "Microsoft YaHei", sans-serif;
}

.reports-table th,
.reports-table td {
  height: 34px;
  padding: 4px 7px;
  overflow: hidden;
  border-right: 1px solid #c9d5e2;
  border-bottom: 1px solid #c9d5e2;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.reports-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 38px;
  color: #101828;
  background: #fff0ad;
  font-weight: 800;
  text-align: center;
}

.reports-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.reports-table tbody tr:hover td {
  background: #eef6ff;
}

.reports-sequence-head,
.reports-sequence-cell {
  width: 42px;
  text-align: center;
}

.reports-number {
  display: block;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reports-document-link,
.reports-row-action {
  padding: 2px 7px;
  border: 1px solid #7fb0ea;
  border-radius: 2px;
  color: #0759b6;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.reports-document-link {
  max-width: 100%;
  overflow: hidden;
  border-color: transparent;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.reports-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3182ce;
  content: "";
}

.reports-status.status-voided,
.reports-status.status-reversed,
.reports-status.status-rejected {
  color: #c92a2a;
}

.reports-status.status-voided::before,
.reports-status.status-reversed::before,
.reports-status.status-rejected::before {
  background: #e03131;
}

.reports-state-cell {
  height: 120px !important;
  color: #65758b;
  text-align: center;
}

.reports-error {
  color: #b42318;
}

.reports-advanced-layer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
}

.reports-advanced-shield {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 38, 0.46);
}

.reports-advanced-dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #9fb3cb;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(16, 42, 72, 0.24);
}

.reports-advanced-dialog > header,
.reports-advanced-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #d2dce8;
}

.reports-advanced-dialog > header div {
  display: grid;
  gap: 3px;
}

.reports-advanced-dialog > header strong {
  font-size: 18px;
}

.reports-advanced-dialog > header span {
  color: #66768d;
  font-size: 12px;
}

.reports-advanced-dialog > header button {
  border: 0;
  color: #5d6d82;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}

.reports-advanced-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid #d2dce8;
  border-bottom: 0;
}

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

.reports-advanced-grid label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #263b57;
  font-size: 12px;
  font-weight: 700;
}

.reports-advanced-grid input,
.reports-advanced-grid select {
  width: 100%;
  min-width: 0;
}

.reports-directory-table-card {
  min-height: 360px;
}

.standard-list-page-scaffold .standard-list-filter-control.is-list-date {
  position: relative;
}

.standard-list-page-scaffold .standard-list-filter-control.is-list-date > .standard-list-date-picker-button {
  position: absolute;
  top: 50%;
  right: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px !important;
  padding: 0;
  border: 0;
  border-radius: 2px;
  transform: translateY(-50%);
  background: transparent center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23334455' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
  cursor: pointer;
}

.standard-list-page-scaffold .standard-list-filter-control.is-list-date > .standard-list-date-picker-button:hover,
.standard-list-page-scaffold .standard-list-filter-control.is-list-date > .standard-list-date-picker-button:focus-visible {
  outline: 1px solid #2d72e8;
  outline-offset: 1px;
  background-color: #edf6ff;
}

.standard-list-page-scaffold .standard-list-filter-control.is-list-date > input {
  padding-right: 43px !important;
}

.standard-list-page-scaffold .standard-list-filter-control.is-list-date > input[type="date"]::-webkit-calendar-picker-indicator {
  width: 0;
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.standard-list-page-scaffold .standard-list-filter-control.is-list-date > .clearable-control-button {
  right: 3px !important;
}

.standard-list-header-filter-sort-bar {
  grid-template-columns: 1fr 1fr;
}

.standard-list-header-filter-sort-bar .standard-list-header-filter-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}

.standard-list-header-filter-sort-bar .standard-list-header-filter-sort-button > b {
  color: #6b7f95;
  font-size: 15px;
  line-height: 1;
}

.standard-list-header-filter-sort-bar .standard-list-header-filter-sort-button.active > b {
  color: #0f5fb8;
}

.standard-list-header-filter-frame {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.standard-list-header-filter-options {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.standard-list-page-action-zone,
.standard-list-toolbar-action-zone,
.standard-list-row-action-zone,
.standard-list-layout-action-zone {
  box-sizing: border-box;
}

.standard-list-page-action-zone {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.standard-list-toolbar-action-zone,
.standard-list-filter-toolbar-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.standard-list-row-action-cell {
  text-align: center;
}

.standard-list-row-action-cell button,
.standard-list-row-action-zone button {
  min-height: 24px;
}

@media (max-width: 760px) {
  .standard-list-row-action-cell button,
  .standard-list-row-action-zone button {
    min-height: 32px;
  }
}

.reports-directory-summary {
  text-align: center;
}

.reports-header-field,
.reports-header-filter-shell {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 26px;
}

.reports-header-filter-shell {
  position: relative;
  border: 1px solid #cad4df;
  background: #fff;
}

.reports-header-filter-shell.is-active {
  border-color: #a8c9ec;
  background: #e7f2ff;
}

.reports-header-filter-open {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 18px 0 5px;
  overflow: hidden;
  border: 0;
  color: #111827;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
}

.reports-header-filter-input::-webkit-search-cancel-button {
  display: none;
}

.reports-header-filter-shell.is-active .reports-header-filter-open {
  color: #075fbd;
}

.reports-header-filter-shell.clearable-control {
  display: flex;
  height: 26px;
}

.reports-header-filter-popover {
  width: 292px;
}

.production-main-filter-popup [data-reports-header-filter-options-host] {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.reports-record-detail-dialog {
  width: min(1180px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
}

.reports-record-detail-body {
  overflow: auto;
}

.reports-detail-content {
  display: grid;
  gap: 14px;
}

.reports-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #c7d5e4;
  border-left: 1px solid #c7d5e4;
}

.reports-detail-grid div {
  display: grid;
  min-width: 0;
  padding: 7px;
  border-right: 1px solid #c7d5e4;
  border-bottom: 1px solid #c7d5e4;
}

.reports-detail-grid span {
  color: #65758a;
  font-size: 10px;
}

.reports-detail-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-detail-lines > div {
  max-height: 360px;
  overflow: auto;
}

.reports-detail-lines table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.reports-detail-lines th,
.reports-detail-lines td {
  padding: 6px;
  border: 1px solid #c7d5e4;
}

.reports-detail-lines th {
  background: #e8f2ff;
}

.reports-detail-boundary {
  margin: 0;
  color: #66768b;
  font-size: 11px;
}

@media (max-width: 760px) {
  .reports-workspace {
    min-height: calc(100vh - 128px);
    padding: 5px;
  }

  .reports-actions {
    align-items: stretch;
  }

  .reports-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
  }

  .reports-actions label {
    min-width: 0;
  }

  .reports-actions select {
    width: 100%;
    min-width: 0;
  }

  .reports-actions button {
    min-height: 40px;
  }

  .reports-actions label,
  .reports-result-count {
    grid-column: 1 / -1;
  }

  .reports-table-scroll {
    max-height: calc(100vh - 330px);
  }

  .reports-advanced-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .reports-advanced-grid label {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .reports-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-record-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

body.erp-image-preview-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button.erp-image-preview-trigger {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

a.erp-image-preview-trigger {
  cursor: pointer;
}

button.erp-image-preview-trigger:focus-visible,
a.erp-image-preview-trigger:focus-visible {
  outline: 2px solid rgba(45, 114, 232, 0.32);
  outline-offset: 2px;
}

.business-detail-image-preview-trigger,
.ledger-detail-image-preview-trigger,
.ledger-image-preview-trigger,
.purchase-slip-photo-preview-trigger {
  display: block;
  max-width: 100%;
  line-height: 0;
  text-align: left;
}

dialog.erp-image-preview-layer.hidden {
  display: none;
}

dialog.erp-image-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 30000;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}

dialog.erp-image-preview-layer::backdrop { background: transparent; }

.erp-image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.76);
}

.erp-image-preview-dialog {
  position: relative;
  z-index: 1;
  width: max-content;
  height: max-content;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  box-sizing: border-box;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 10px;
  border: 1px solid #101820;
  background: #ffffff;
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.36);
}

.erp-image-preview-canvas {
  min-width: 0;
  min-height: 0;
  width: max-content;
  height: auto;
  max-width: calc(100vw - 50px);
  max-height: calc(100dvh - 82px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f8fbff;
}

.erp-image-preview-canvas img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.erp-image-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.erp-image-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(8, 18, 32, 0.68);
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.erp-image-preview-nav[hidden] {
  display: none;
}

.erp-image-preview-nav.is-previous {
  left: 24px;
}

.erp-image-preview-nav.is-next {
  right: 24px;
}

.erp-image-preview-nav:hover,
.erp-image-preview-nav:focus-visible {
  background: rgba(20, 95, 202, 0.9);
}

.erp-image-preview-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 0;
  color: #42556a;
  font-size: 13px;
}

.erp-image-preview-footer [data-erp-image-preview-title] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-image-preview-footer [data-erp-image-preview-counter] {
  flex: 0 0 auto;
  margin-left: auto;
  color: #145fca;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .erp-image-preview-dialog {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    padding: 8px;
  }

  .erp-image-preview-nav {
    width: 40px;
    height: 60px;
    font-size: 34px;
  }

  .erp-image-preview-nav.is-previous {
    left: 12px;
  }

  .erp-image-preview-nav.is-next {
    right: 12px;
  }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

body.hide-sidebar .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.hide-sidebar .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  scrollbar-gutter: auto;
  background: var(--sidebar);
  color: #f8fbff;
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand [contenteditable="true"]:focus {
  outline: 2px solid rgba(159, 211, 156, 0.78);
  outline-offset: 2px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ffffff;
  border-radius: 3px;
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-copy {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.brand-title {
  font-size: 13px;
  line-height: 1.15;
  font-weight: 800;
  white-space: nowrap;
  outline: 0;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: #afbac7;
  outline: 0;
}

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

.sidebar-save-meta {
  margin-top: auto;
  margin-bottom: 88px;
  padding: 5px 3px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #d6dee7;
  font-size: 10px;
  line-height: 1.25;
  background: transparent;
  overflow: visible;
}

.sidebar-save-meta-title {
  display: block;
  color: #ffffff;
  font-weight: 700;
}

.sidebar-status-block {
  display: grid;
  gap: 1px;
  margin-top: 5px;
}

.sidebar-status-block:first-child {
  margin-top: 0;
}

.sidebar-status-label {
  color: #afbac7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
}

.sidebar-status-value,
.sidebar-status-time {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.sidebar-jst-order-sync {
  color: #ff3b30;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  max-height: none;
  overflow: visible;
}

.sidebar-jst-order-sync-time {
  display: block;
  margin-top: 0;
  color: #ff3b30;
  font-weight: 700;
}

.sidebar-save-meta-time {
  margin-top: 0;
  color: #ffffff;
  font-size: 10px;
  line-height: 1.25;
  word-break: keep-all;
}

.sidebar-save-meta-source,
.sidebar-save-meta-page {
  display: grid;
  margin-top: 3px;
  color: #95a3b5;
}

.sidebar-status-block-jst .sidebar-status-label,
.sidebar-status-block-jst .sidebar-status-value,
.sidebar-status-block-jst .sidebar-status-time {
  color: #ff3b30;
}

.sidebar-save-meta-page .sidebar-status-label,
.sidebar-save-meta-page .sidebar-status-value {
  color: #ffffff;
}

.sidebar-save-meta-business {
  display: grid;
  margin-top: 5px;
  color: #95a3b5;
}

.sidebar-save-meta-business .sidebar-status-label,
.sidebar-save-meta-business .sidebar-status-value {
  color: #95a3b5;
}

.nav-item {
  position: relative;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #d6dee7;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.nav-item [contenteditable="true"]:focus {
  outline: 2px solid rgba(159, 211, 156, 0.78);
  outline-offset: 2px;
}

.nav-item.active,
.nav-item:hover {
  background: var(--sidebar-soft);
  color: #ffffff;
}

.nav-icon {
  width: 14px;
  flex: 0 0 14px;
  text-align: center;
  color: #9fd39c;
  outline: 0;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  outline: 0;
}

.nav-item.has-business-popover::after {
  content: "›";
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1;
}

.nav-business-popover {
  position: fixed;
  z-index: 220;
  width: min(398px, calc(100vw - 24px));
  display: none;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #d9e1e8;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

.nav-business-popover.visible {
  display: block;
}

.nav-business-popover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-top: 0;
}

.nav-business-popover-grid-transfer {
  grid-template-columns: minmax(0, 1fr);
}

.nav-business-popover-grid-master {
  grid-template-columns: minmax(0, 1fr);
}

.nav-business-popover-grid-finance {
  grid-template-columns: minmax(0, 1fr);
}

.nav-business-popover-finance-list {
  gap: 6px;
}

.nav-business-popover-finance-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  align-items: stretch;
  border: 1px solid #e0e7ef;
  background: #f8fafc;
  overflow: hidden;
}

.nav-business-popover-finance-row:hover {
  border-color: #9ebce1;
  background: #f4f8fd;
}

.nav-business-popover-finance-reconcile {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: #17212f;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-business-popover-finance-reconcile span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-business-popover-finance-reconcile small {
  color: #8b96a5;
  font-size: 12px;
}

.nav-business-popover-finance-document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
  align-items: stretch;
  border-left: 1px solid #d9e2ec;
  background: #fff;
}

.nav-business-popover-finance-document strong {
  align-self: center;
  padding: 0 8px;
  color: #1f3c61;
  font-size: 13px;
  white-space: nowrap;
}

.nav-business-popover-finance-document button {
  border: 0;
  border-left: 1px solid #e1e7ee;
  background: transparent;
  color: #0f5fc8;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.nav-business-popover-finance-document button:last-child {
  color: #e5364d;
}

.nav-business-popover-finance-reconcile:hover,
.nav-business-popover-finance-reconcile:focus,
.nav-business-popover-finance-document button:hover,
.nav-business-popover-finance-document button:focus {
  background: #eef5fd;
  outline: 0;
}

.nav-business-popover-section + .nav-business-popover-section {
  padding-top: 7px;
  border-top: 1px solid #edf1f5;
}

.nav-business-popover-list {
  display: grid;
  gap: 5px;
}

.nav-business-popover-item {
  min-height: 29px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 1px solid #edf1f5;
  background: #f7f9fb;
  color: #17212f;
  text-align: left;
  overflow: hidden;
}

.nav-business-popover-grid-transfer .nav-business-popover-item {
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) 112px;
}

.nav-business-popover-grid-transfer .nav-business-popover-item-transfer-action {
  grid-template-columns: minmax(0, 1fr) 54px 58px;
}

.nav-business-popover-item.no-side {
  grid-template-columns: minmax(0, 1fr);
}

.nav-business-popover-item:hover {
  border-color: #ff5a6a;
  background: #fff7f8;
}

.nav-business-popover-main,
.nav-business-popover-add,
.nav-business-popover-list-action {
  min-height: 29px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-business-popover-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}

.nav-business-popover-main:hover,
.nav-business-popover-main:focus,
.nav-business-popover-add:hover,
.nav-business-popover-add:focus,
.nav-business-popover-list-action:hover,
.nav-business-popover-list-action:focus {
  background: #fff1f3;
  outline: 0;
}

.nav-business-popover-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 760;
}

.nav-business-popover-grid-transfer .nav-business-popover-main span {
  white-space: normal;
}

.nav-business-popover-main small,
.nav-business-popover-status {
  color: #7b8794;
  font-size: 12px;
  white-space: nowrap;
}

.nav-business-popover-add {
  border-left: 1px solid #dbe3ea;
  color: #ff3b52;
  font-size: 12px;
  color: #ff3b52;
  font-weight: 820;
  text-align: center;
}

.nav-business-popover-label {
  min-width: 0;
  padding: 0 9px;
  overflow: hidden;
  color: #17212f;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-business-popover-list-action {
  min-width: 0;
  border-left: 1px solid #dbe3ea;
  color: #0f5fc8;
  font-size: 12px;
  font-weight: 820;
  text-align: center;
}

.nav-business-popover-grid-transfer .nav-business-popover-item-transfer-action .nav-business-popover-add,
.nav-business-popover-grid-transfer .nav-business-popover-item-transfer-action .nav-business-popover-list-action {
  min-height: 38px;
}

.nav-business-popover-grid-transfer .nav-business-popover-item-transfer-action:hover {
  border-color: #8fb7e8;
  background: #f8fbff;
}

.nav-business-popover-grid-transfer .nav-business-popover-list-action:hover,
.nav-business-popover-grid-transfer .nav-business-popover-list-action:focus {
  background: #eff6ff;
}

.nav-business-popover-status {
  padding: 0 8px;
  text-align: right;
}

.nav-controls,
.nav-add-btn {
  display: none;
}

body.layout-editing .nav-item {
  min-height: calc(var(--nav-row-height) + 30px);
  align-items: flex-start;
  padding-top: 9px;
}

body.layout-editing .nav-controls {
  position: absolute;
  left: 10px;
  right: 8px;
  bottom: 6px;
  display: flex;
  gap: 4px;
}

.nav-controls button,
.nav-add-btn {
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.nav-controls button {
  padding: 0 5px;
}

.nav-controls .nav-delete {
  color: #ffb4bd;
}

body.layout-editing .nav-add-btn {
  display: block;
  min-height: 34px;
  border-style: dashed;
  background: transparent;
}

.status-panel {
  display: none !important;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  color: #cbd5df;
  font-size: 13px;
}

.metric-row strong {
  color: #ffffff;
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: calc(18px + var(--business-tabs-height)) 22px 28px;
  overflow-x: hidden;
}

.global-business-tabs {
  position: fixed;
  top: 0;
  left: var(--business-tabs-left);
  right: 0;
  z-index: 180;
  min-height: var(--business-tabs-height);
  margin: 0;
  border-bottom: 1px solid #dfe5eb;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

body.hide-sidebar .global-business-tabs {
  left: 0;
}

.global-business-tabs.hidden {
  display: none;
}

.mobile-module-nav {
  display: none;
}

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

.topbar-copy {
  min-width: 220px;
  flex: 1 1 auto;
  display: grid;
  gap: 8px;
}

.topbar-title-row {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 34px;
}

.topbar-title-row .ledger-table-search {
  flex: 0 1 620px;
  min-width: 520px;
  max-width: 650px;
  min-height: 34px;
  justify-content: flex-start;
  align-self: center;
}

.topbar-title-row .supplier-purchase-topbar-search {
  flex: 0 1 560px;
  min-width: 540px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.topbar-title-row .cost-accounting-topbar-search {
  flex: 1 1 920px;
  min-width: 780px;
  max-width: 1280px;
  align-self: center;
  margin-left: 34px;
}

.topbar-title-row .cost-accounting-topbar-search .cost-accounting-bom-search-form {
  width: 100%;
}

.topbar-field {
  position: relative;
}

body.layout-editing .topbar-field {
  padding-top: 28px;
}

.topbar-field-controls,
.topbar-add-btn {
  display: none;
}

body.layout-editing .topbar-field-controls {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 4px;
}

.topbar-field-controls button,
.topbar-add-btn {
  min-height: 23px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: #275078;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.topbar-field-controls button {
  padding: 0 7px;
}

.topbar-field-controls .topbar-delete {
  color: #b4232f;
}

body.layout-editing .topbar-add-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 0 8px;
  border-style: dashed;
}

.topbar-copy [contenteditable="true"]:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  background: #f7fbff;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 23px;
  line-height: 1.25;
}

.topbar-title {
  outline: 0;
}

.topbar-title-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-left: 4px;
  padding: 1px 10px 2px;
  border: 1px solid #9ebdf2;
  background: #eaf2ff;
  color: #1255b0;
  font-weight: 900;
  line-height: 1.15;
  vertical-align: baseline;
}

.topbar-title-badge-piecework {
  box-shadow: inset 4px 0 0 #1f6feb;
}

.topbar-title-hierarchy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  vertical-align: middle;
}

.topbar-title-main {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #102033;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.topbar-title-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2f6fd1;
  flex: 0 0 auto;
}

.topbar-title-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid #9ec5fe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 17px;
  font-weight: 920;
  line-height: 1;
}

.topbar-title-hierarchy-dispatch .topbar-title-dot {
  background: #1d4ed8;
}

.topbar-title-hierarchy-dispatch .topbar-title-sub {
  border-color: #93b8fb;
  background: #eaf2ff;
  color: #0f56c7;
  box-shadow: inset 4px 0 0 #1d4ed8;
}

.topbar-title-hierarchy-master .topbar-title-sub {
  border-color: #9ec5fe;
  background: #eff6ff;
  color: #1d4ed8;
}

.top-business-bar {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  overflow: visible;
  padding: 0 12px;
}

.top-business-tabs {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.top-business-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.top-business-account-slot {
  flex: 0 0 auto;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.top-business-tab {
  --top-tab-accent: #334155;
  --top-tab-bg: #ffffff;
  min-height: 40px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  max-width: 210px;
  padding: 0 8px 0 12px;
  border: 0;
  border-right: 1px solid #e2e7ec;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  font-size: 13px;
  font-weight: 660;
  box-shadow: inset 0 -1px 0 #e5e7eb;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.top-business-tab::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--top-tab-accent);
  opacity: 0.42;
  pointer-events: none;
}

.top-business-tab::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--top-tab-accent);
  opacity: 0;
  pointer-events: none;
}

.top-business-tab:hover {
  background: #f8fafc;
}

.top-business-tab[draggable="true"] {
  cursor: grab;
}

.top-business-tab.top-tab-dragging {
  opacity: 0.5;
}

.top-business-tab.top-tab-drop-before {
  box-shadow: inset 3px 0 0 #1d4ed8, inset 0 -1px 0 #e5e7eb;
}

.top-business-tab.top-tab-drop-after {
  box-shadow: inset -3px 0 0 #1d4ed8, inset 0 -1px 0 #e5e7eb;
}

.top-business-tab.active {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 780;
  box-shadow: inset 0 1px 0 #ffffff;
}

.top-business-tab.active::before {
  opacity: 0.7;
}

.top-business-tab.active::after {
  opacity: 1;
}

.top-business-tab-group-common {
  --top-tab-accent: #334155;
}

.top-business-tab-group-purchase {
  --top-tab-accent: #0f766e;
}

.top-business-tab-group-dispatch {
  --top-tab-accent: #2563eb;
}

.top-business-tab-group-people {
  --top-tab-accent: #6d28d9;
}

.top-business-tab-group-cut {
  --top-tab-accent: #b91c1c;
}

.top-business-tab-group-master {
  --top-tab-accent: #0f766e;
}

.top-business-tab-group-production {
  --top-tab-accent: #92400e;
}

.top-business-tab-group-transfer {
  --top-tab-accent: #0e7490;
}

.top-business-tab-group-cost {
  --top-tab-accent: #4338ca;
}

.top-business-tab-group-exception {
  --top-tab-accent: #b91c1c;
}

.top-business-tab-group-rules,
.top-business-tab-group-neutral {
  --top-tab-accent: #475569;
}

.top-business-tab-group-migration {
  --top-tab-accent: #4f46e5;
}

.top-business-tab-main {
  padding-right: 8px;
}

.top-business-tab-piecework {
  background: #ffffff;
}

.top-business-tab-piecework.active {
  background: #f8fafc;
  color: #0f172a;
}

.top-business-tab-piecework-label {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font-weight: inherit;
}

.top-business-tab-piecework.active .top-business-tab-piecework-label {
  background: transparent;
}

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

.top-business-tab button {
  width: 18px;
  height: 18px;
  border: 0;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
}

.top-business-tab button:hover {
  background: #e2e8f0;
  color: #0f172a;
}

h2 {
  font-size: 17px;
}

.page-meta,
.panel-header span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

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

.toolbar .save-btn {
  background: #174ea6;
  border-color: #174ea6;
  color: #ffffff;
  min-width: 52px;
  padding-left: 10px;
  padding-right: 10px;
}

.toolbar #toggleTemplatePanel {
  color: #52606d;
  background: #f8fafc;
  border-color: #d9e1ea;
  width: 74px;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.toolbar .master-toolbar-action {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  box-shadow: none;
}

.toolbar .master-toolbar-emphasis {
  color: #0f6b4f;
  border-color: #9ccfb8;
  background: #f1fbf6;
}

.toolbar .master-field-mode-toolbar.active {
  color: #ffffff;
  border-color: #174ea6;
  background: #174ea6;
}

.toolbar #addManualDispatchBlock,
.toolbar #addDemoBlock,
.toolbar .shortage-pin-search-button,
.toolbar .jst-style-sync-button {
  box-shadow: none;
}

.toolbar #addManualDispatchBlock,
.toolbar #addDemoBlock {
  width: 72px;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 13px;
}

.topbar:has(.purchase-main-action-btn),
.topbar:has(.cost-main-action-btn),
.topbar:has(.production-main-action-btn),
.topbar:has(.transfer-main-action-btn) {
  justify-content: flex-start;
  gap: 18px;
}

.topbar:has(.purchase-main-action-btn) .topbar-copy,
.topbar:has(.cost-main-action-btn) .topbar-copy,
.topbar:has(.production-main-action-btn) .topbar-copy,
.topbar:has(.transfer-main-action-btn) .topbar-copy {
  flex: 0 0 auto;
  min-width: 0;
}

.topbar:has(.purchase-main-action-btn) .toolbar,
.topbar:has(.cost-main-action-btn) .toolbar,
.topbar:has(.production-main-action-btn) .toolbar,
.topbar:has(.transfer-main-action-btn) .toolbar {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 6px;
  margin-left: 8px;
}

.topbar:has(.purchase-main-action-btn) .topbar-fixed-title,
.topbar:has(.cost-main-action-btn) .topbar-fixed-title,
.topbar:has(.production-main-action-btn) .topbar-fixed-title,
.topbar:has(.transfer-main-action-btn) .topbar-fixed-title {
  width: max-content;
}

.toolbar .purchase-main-action-btn,
.toolbar .cost-main-action-btn,
.toolbar .production-main-action-btn,
.toolbar .transfer-main-action-btn {
  height: 30px;
  min-width: 0;
  padding: 0 11px;
  border-color: #9fb3c9;
  background: #eef4fb;
  color: #173a5f;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.toolbar .purchase-main-action-btn.primary-btn,
.toolbar .cost-main-action-btn.primary-btn,
.toolbar .production-main-action-btn.primary-btn,
.toolbar .transfer-main-action-btn.primary-btn {
  border-color: #2d527a;
  background: #315f8f;
  color: #ffffff;
}

.toolbar .purchase-main-utility-btn,
.toolbar .cost-main-utility-btn,
.toolbar .production-main-utility-btn,
.toolbar .transfer-main-utility-btn {
  height: 30px;
  min-width: 0;
  padding: 0 11px;
  border-color: #c7d2de;
  background: #f8fafc;
  color: #244a70;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.toolbar #saveWorkbenchConfig.purchase-main-utility-btn,
.toolbar #saveWorkbenchConfig.cost-main-utility-btn,
.toolbar #saveWorkbenchConfig.production-main-utility-btn,
.toolbar #saveWorkbenchConfig.transfer-main-utility-btn {
  margin-left: auto;
  min-width: 54px;
  border-color: #2f6fb6;
  background: #2368b4;
  color: #ffffff;
}

.toolbar #toggleTemplatePanel.purchase-main-utility-btn,
.toolbar #toggleTemplatePanel.cost-main-utility-btn,
.toolbar #toggleTemplatePanel.production-main-utility-btn,
.toolbar #toggleTemplatePanel.transfer-main-utility-btn {
  width: auto;
  min-width: 54px;
  padding: 0 11px;
  border-color: #c7d2de;
  background: #f8fafc;
  color: #244a70;
}

.toolbar .purchase-main-action-btn:hover,
.toolbar .cost-main-action-btn:hover,
.toolbar .production-main-action-btn:hover,
.toolbar .transfer-main-action-btn:hover {
  border-color: #315a84;
  background: #e2edf8;
}

.toolbar .purchase-main-action-btn.primary-btn:hover,
.toolbar .cost-main-action-btn.primary-btn:hover,
.toolbar .production-main-action-btn.primary-btn:hover,
.toolbar .transfer-main-action-btn.primary-btn:hover {
  background: #294f78;
}

.toolbar .purchase-main-utility-btn:hover,
.toolbar .cost-main-utility-btn:hover,
.toolbar .production-main-utility-btn:hover,
.toolbar .transfer-main-utility-btn:hover {
  border-color: #7492b0;
  background: #eef4fb;
}

.toolbar #saveWorkbenchConfig.purchase-main-utility-btn:hover,
.toolbar #saveWorkbenchConfig.cost-main-utility-btn:hover,
.toolbar #saveWorkbenchConfig.production-main-utility-btn:hover,
.toolbar #saveWorkbenchConfig.transfer-main-utility-btn:hover {
  background: #1d5a9e;
}

.auth-account-menu {
  position: relative;
  flex: 0 0 auto;
  font-size: 12px;
  color: #334155;
}

.auth-account-menu summary {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #7eaad3;
  background: #f7fbff;
  color: #1e3a5f;
  cursor: pointer;
  list-style: none;
  font-size: 0;
  box-shadow: none;
}

.auth-account-menu summary::-webkit-details-marker {
  display: none;
}

.auth-account-menu[open] summary,
.auth-account-menu summary:hover {
  border-color: #1d5fa8;
  background: #e5f1ff;
}

.auth-account-avatar {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
}

.auth-account-avatar::before,
.auth-account-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.auth-account-avatar::before {
  top: 0;
  width: 6px;
  height: 6px;
  border: 2px solid #1e5d9e;
  border-radius: 50%;
  background: #f0f7ff;
}

.auth-account-avatar::after {
  bottom: 0;
  width: 14px;
  height: 8px;
  border: 2px solid #1e5d9e;
  border-top: 0;
  border-radius: 8px 8px 4px 4px;
}

.auth-account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 250;
  width: 154px;
  padding: 5px 6px;
  border: 1px solid #d8e2ec;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.auth-account-panel-name {
  display: block;
  padding: 2px 4px 6px;
  min-width: 0;
  color: #102033;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-account-panel button {
  width: 100%;
  min-height: 26px;
  margin-top: 2px;
  border: 1px solid #d9e1ea;
  background: #f8fafc;
  color: #b4232f;
  font-weight: 800;
  cursor: pointer;
}

.auth-account-panel button:hover {
  border-color: #f2b8bf;
  background: #fff5f6;
}

.topbar-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  background: #f8fbff;
  color: #304156;
  line-height: 1.2;
}

.hidden-style-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
}

.hidden-style-search input {
  width: 148px;
  height: 34px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: #102033;
  padding: 0 10px;
  font-size: 13px;
}

.hidden-style-search .clearable-control,
.jst-style-sync .clearable-control {
  flex: 0 0 148px;
  width: 148px;
}

.hidden-style-search input:focus {
  outline: 2px solid rgba(43, 108, 176, 0.18);
  border-color: #2b6cb0;
}

.jst-style-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
}

.jst-style-sync input {
  width: 148px;
  height: 34px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: #102033;
  padding: 0 10px;
  font-size: 13px;
}

.jst-style-sync input:focus {
  outline: 2px solid rgba(43, 108, 176, 0.18);
  border-color: #2b6cb0;
}

.hidden-style-search input::placeholder,
.jst-style-sync input::placeholder {
  color: #475569;
  opacity: 1;
}

.jst-style-sync-button {
  height: 34px;
  min-width: 56px;
  padding: 0 10px;
  font-size: 13px;
}

.shortage-pin-search-button {
  height: 34px;
  min-width: 46px;
  padding: 0 10px;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.segment {
  height: 34px;
  min-width: 54px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: #52606d;
  cursor: pointer;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: #1d4f91;
  color: #ffffff;
}

.primary-btn,
.ghost-btn,
.danger-btn {
  height: 34px;
  border: 1px solid transparent;
  padding: 0 13px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  background: #1f6fd1;
  color: #ffffff;
}

.ghost-btn {
  background: #ffffff;
  color: #275078;
  border-color: var(--line-soft);
}

.master-reference-load-state > span + .ghost-btn {
  margin-left: 8px;
}

.save-btn.saved {
  background: #087443;
  border-color: #087443;
  color: #ffffff;
}

.save-toast {
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 100;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  background: #087443;
  color: #ffffff;
  border: 1px solid #0a633b;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
  font-size: 14px;
  font-weight: 900;
}

.save-toast.has-action {
  justify-content: space-between;
  max-width: min(560px, calc(100vw - 48px));
}

.save-toast-action {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.save-toast.error {
  background: #b91c1c;
  border-color: #991b1b;
  color: #ffffff;
}

.save-toast.warning {
  background: #b45309;
  border-color: #92400e;
  color: #ffffff;
}

.client-version-guard-modal.hidden {
  display: none;
}

.client-version-guard-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 16px 24px;
  background: rgba(15, 23, 42, 0.18);
}

.client-version-guard-dialog {
  width: min(460px, 100%);
  padding: 18px 18px 16px;
  background: #ffffff;
  border: 1px solid #b7c6d8;
  border-radius: 6px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
}

.client-version-guard-dialog h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.25;
}

.client-version-guard-dialog p {
  margin: 0 0 8px;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

.client-version-guard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.top-tab-limit-modal.hidden {
  display: none;
}

.top-tab-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 74px;
  background: rgba(15, 23, 42, 0.08);
}

.top-tab-limit-dialog {
  width: min(320px, calc(100vw - 32px));
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #b7c6d8;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.2);
}

.top-tab-limit-message {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.top-tab-limit-ok {
  min-width: 54px;
  height: 30px;
  border: 1px solid #0f55c8;
  background: #145fd7;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.top-tab-limit-ok:hover,
.top-tab-limit-ok:focus {
  background: #0f4eb5;
  outline: 2px solid rgba(20, 95, 215, 0.22);
  outline-offset: 1px;
}

.local-draft-banner {
  position: fixed;
  top: 118px;
  right: 24px;
  z-index: 120;
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
}

.local-draft-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fff8e8;
  color: var(--text);
  border: 1px solid #e5b85c;
  box-shadow: 0 12px 32px rgba(91, 58, 8, 0.18);
}

.local-draft-copy strong {
  display: block;
  margin-bottom: 5px;
  color: #6b3d00;
  font-size: 15px;
  font-weight: 900;
}

.local-draft-copy span {
  display: block;
  color: #694d1f;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 700;
}

.local-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.local-draft-actions .primary-btn,
.local-draft-actions .ghost-btn {
  height: 30px;
}

.danger-btn {
  background: #b4232f;
  color: #ffffff;
}

.common-view {
  min-width: 0;
}

.common-panel {
  padding: 0;
  background: #ffffff;
}

.common-business-workspace {
  min-width: 0;
}

.production-business-host {
  min-width: 0;
}

.production-main-overview {
  display: grid;
  gap: 0;
}

.production-main-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid #d6e0ec;
  border-bottom: 0;
  background: #ffffff;
}

.production-main-list-tools label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #405268;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.production-main-search-wide {
  flex: 1 1 220px;
  min-width: 180px;
}

.production-main-search-input {
  min-width: 112px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #c9d5e2;
  background: #ffffff;
  color: #142136;
  font: inherit;
}

.production-main-search-wide .production-main-search-input {
  width: 100%;
  min-width: 0;
}

.production-main-clear-btn {
  min-height: 28px;
  padding: 0 12px;
}

.production-main-count {
  min-width: 86px;
  color: #586b82;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.production-main-table-wrap {
  max-height: min(56vh, 560px);
  min-height: 318px;
  overflow: auto;
  border: 1px solid #d3dce8;
  background: #ffffff;
}

.production-main-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.production-main-table th,
.production-main-table td {
  min-width: 0;
  height: 34px;
  padding: 4px 6px;
  border: 1px solid #d3dce8;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.production-main-table th {
  height: 36px;
  padding: 2px 3px;
  vertical-align: middle;
  background: #e8eef5;
  color: #102033;
  font-weight: 800;
}

.production-main-head-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  line-height: 1.12;
}

.production-main-filter-shell {
  position: relative;
  display: block;
  width: 100%;
  height: 28px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 1px solid #c9d5e2;
  background: #ffffff;
  cursor: text;
}

.production-main-filter-shell.is-active {
  border-color: #2d72e8;
  box-shadow: inset 0 -2px 0 #2d72e8;
}

.production-main-filter-search-icon {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.production-main-filter-search-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 6px;
  height: 6px;
  border: 1.5px solid #466178;
  border-radius: 50%;
}

.production-main-filter-search-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 5px;
  height: 1.5px;
  border-radius: 2px;
  background: #466178;
  transform: rotate(45deg);
  transform-origin: left center;
}

.production-main-filter-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 0 3px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #142136;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.production-main-filter-input::placeholder {
  color: #142136;
  font-weight: 900;
  opacity: 1;
}

.production-main-filter-clear {
  position: absolute;
  right: 1px;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid #c7d2df;
  border-radius: 50%;
  background: #f4f7fb;
  color: #617185;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.production-main-filter-clear:hover,
.production-main-filter-clear:focus {
  border-color: #2d72e8;
  color: #0f5fb8;
  outline: 0;
}

.production-main-table td.strong {
  color: #071a36;
  font-weight: 900;
}

.production-main-size,
.production-main-total {
  font-variant-numeric: tabular-nums;
}

.production-main-row-index {
  background: #eef3f7 !important;
  color: #536477;
  font-weight: 900;
}

.production-main-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  min-width: 44px;
  padding: 0 8px;
  border: 1px solid #b9d7c6;
  background: #ecf8f0;
  color: #067647;
  font-weight: 800;
}

.production-main-status.is-warning {
  border-color: #f1c27d;
  background: #fff7ed;
  color: #b45309;
}

.production-main-status.is-normal {
  border-color: #b9d7c6;
  background: #ecf8f0;
  color: #067647;
}

.production-main-action {
  min-height: 24px;
  margin: 1px 2px;
  padding: 0 7px;
}

.production-main-action-cell {
  white-space: normal;
}

.production-main-empty-row td {
  height: 72px;
  color: #66758a;
  font-weight: 800;
  text-align: center;
}

.production-main-row-expanded td {
  background: #f5f9ff;
}

.production-main-detail-row > td {
  padding: 0 !important;
  background: #f8fbff;
}

.production-main-row-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #d3dce8;
  background: #f8fbff;
}

.production-main-row-details.business-replay-panel {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 8px;
  border-top: 1px solid #d3dce8;
  background: #f8fbff;
}

.production-main-row-details.business-replay-panel .business-detail-section {
  box-shadow: none;
}

.production-main-detail-field {
  display: grid;
  gap: 3px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #d6e0ec;
  background: #ffffff;
  text-align: left;
}

.production-main-detail-field span {
  color: #65768a;
  font-size: 12px;
}

.production-main-detail-field strong {
  color: #142136;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.production-main-filter-popup {
  position: fixed;
  z-index: 12140;
  display: flex;
  flex-direction: column;
  width: min(292px, calc(100vw - 16px));
  height: min(500px, calc(100vh - 16px));
  max-height: min(500px, calc(100vh - 16px));
  border: 1px solid #c7d6e5;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(18, 48, 71, 0.2);
  overflow: hidden;
}

.production-main-filter-popup.hidden {
  display: none;
}

.production-main-filter-popup-sort {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #dfe8f2;
  background: #f6f8fb;
}

.production-main-filter-popup-sort button {
  min-height: 30px;
  border: 0;
  border-right: 1px solid #dfe8f2;
  background: transparent;
  color: #30445b;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.production-main-filter-popup-sort button:last-child {
  border-right: 0;
}

.production-main-filter-popup-sort button:hover,
.production-main-filter-popup-sort button:focus {
  background: #eaf3ff;
  color: #0f5fb8;
  outline: 0;
}

.production-main-filter-popup-sort button.active {
  background: #eaf3ff;
  color: #0f5fb8;
}

.production-main-filter-popup-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin: 8px 9px 7px;
  padding: 0 4px 0 10px;
  border: 1px solid #ccd9e7;
  background: #ffffff;
}

.production-main-filter-popup-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #102033;
  font-size: 14px;
  font-weight: 800;
}

.production-main-filter-popup-search input::placeholder {
  color: #9aa8b6;
  font-weight: 800;
  opacity: 1;
}

.production-main-filter-popup-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8b9bac;
  font-size: 16px;
  cursor: pointer;
}

.production-main-filter-popup [data-production-main-filter-options-host],
.production-main-filter-popup [data-purchase-list-filter-options-host],
.production-main-filter-popup [data-migration-filter-options-host],
.production-main-filter-popup [data-inventory-query-filter-options-host],
.production-main-filter-popup [data-operating-filter-options-host] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.production-main-filter-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 11px 6px;
  color: #34495f;
  font-size: 13px;
  font-weight: 800;
}

.production-main-filter-select-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.production-main-filter-select-row button {
  border: 0;
  background: transparent;
  color: #255fbe;
  font: inherit;
  cursor: pointer;
}

.production-main-filter-option-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.production-main-filter-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 12px;
  color: #102033;
  font-size: 13px;
  cursor: pointer;
}

.production-main-filter-option:hover {
  background: #eef6ff;
}

.production-main-filter-option.is-pinned {
  background: #eaf3ff;
  box-shadow: inset 3px 0 0 #216ad8;
}

.production-main-filter-option input,
.production-main-filter-select-row input {
  accent-color: #216ad8;
}

.production-main-filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-main-filter-option b {
  color: #708296;
  font-size: 12px;
  font-weight: 800;
}

.production-main-filter-empty,
.production-main-filter-limit {
  padding: 16px 12px;
  color: #6b7b8c;
  font-size: 13px;
}

.production-main-filter-empty.is-error {
  color: #b91c1c;
}

.production-main-filter-limit {
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.production-main-filter-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid #e1e8f0;
  background: #ffffff;
}

.migration-view.production-business-mode .migration-panel-head,
.migration-view.production-business-mode .migration-tabs,
.migration-view.production-business-mode .migration-table-tools,
.migration-view.production-business-mode .migration-top-scroll,
.migration-view.production-business-mode .migration-table-wrap {
  display: none;
}

.common-empty-workspace {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: #687580;
  text-align: center;
  border: 1px solid #d8e0e8;
  background: #ffffff;
}

.common-empty-workspace strong {
  color: #26333f;
  font-size: 18px;
  font-weight: 900;
}

.common-empty-workspace span {
  max-width: 620px;
  line-height: 1.6;
  font-size: 13px;
}

.common-task-center {
  min-height: 520px;
  padding: 18px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
}

.common-task-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

.common-task-hero > div:first-child {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #d8e0e8;
  background: #f7faf8;
}

.common-task-eyebrow {
  color: #1c725b;
  font-size: 12px;
  font-weight: 800;
}

.common-task-hero strong {
  color: #17212f;
  font-size: 20px;
  line-height: 1.3;
}

.common-task-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.common-task-kpis div {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
}

.common-task-kpis span {
  color: #697683;
  font-size: 12px;
}

.common-task-kpis strong {
  color: #0f172a;
  font-size: 24px;
}

.common-todo-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d8e0e8;
  background: #fbfcfd;
}

.common-todo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.common-todo-head div {
  display: grid;
  gap: 4px;
}

.common-todo-head span,
.common-todo-head em {
  color: #697683;
  font-size: 12px;
  font-style: normal;
}

.common-todo-head strong {
  color: #17212f;
  font-size: 17px;
}

.common-todo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.common-todo-card {
  min-width: 0;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce5ec;
  background: #ffffff;
  color: #17212f;
  text-align: left;
  cursor: pointer;
}

.common-todo-card:hover {
  border-color: #9bbbe8;
  box-shadow: 0 8px 18px rgba(24, 33, 43, 0.08);
}

.common-todo-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.common-todo-card em {
  color: #0f172a;
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.common-todo-card em small {
  margin-left: 4px;
  color: #697683;
  font-size: 12px;
  font-weight: 700;
}

.common-todo-card > span:last-child {
  color: #64717e;
  font-size: 12px;
  line-height: 1.4;
}

.common-status-chip {
  justify-self: start;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: #2f6ecb;
}

.common-status-chip.is-warn {
  background: #f59e0b;
}

.common-status-chip.is-ok {
  background: #16866b;
}

.common-status-chip.is-danger {
  background: #e1192d;
}

.common-role-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.common-role-filter button {
  min-height: 58px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 9px 12px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
  color: #17212f;
  text-align: left;
  cursor: pointer;
}

.common-role-filter button.active {
  border-color: #0f4c81;
  background: #123f65;
  color: #ffffff;
}

.common-role-filter strong {
  font-size: 14px;
}

.common-role-filter span {
  color: #697683;
  font-size: 12px;
}

.common-role-filter button.active span {
  color: #d8eafe;
}

.common-task-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
}

.common-task-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.common-task-lane {
  min-width: 0;
  border: 1px solid #d8e0e8;
  background: #fbfcfd;
}

.common-task-lane-head {
  min-height: 54px;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border-bottom: 1px solid #e3e9ef;
  background: #ffffff;
}

.common-task-lane-head strong {
  color: #17212f;
  font-size: 15px;
}

.common-task-lane-head span {
  color: #697683;
  font-size: 12px;
}

.common-task-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.common-task-item {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dce5ec;
  background: #ffffff;
  color: #18212b;
  text-align: left;
  cursor: pointer;
}

.common-task-item:hover {
  border-color: #9bbbe8;
  box-shadow: 0 6px 16px rgba(24, 33, 43, 0.08);
}

.common-task-badge {
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: #2f6ecb;
}

.common-task-item.is-warn .common-task-badge,
.generic-business-head em.is-warn {
  background: #f59e0b;
}

.common-task-item.is-ok .common-task-badge,
.generic-business-head em.is-ok {
  background: #16866b;
}

.common-task-item.is-danger .common-task-badge,
.generic-business-head em.is-danger {
  background: #e1192d;
}

.common-task-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.common-task-main strong {
  color: #17212f;
  font-size: 14px;
}

.common-task-main small {
  color: #64717e;
  font-size: 12px;
  line-height: 1.35;
}

.common-task-side {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #ecd28e;
  background: #fff8df;
}

.common-task-side strong {
  color: #65460b;
  font-size: 15px;
}

.common-task-side ol {
  margin: 0;
  padding-left: 18px;
  color: #5c6670;
  font-size: 13px;
  line-height: 1.7;
}

.production-center-workspace {
  min-height: 420px;
  padding: 28px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
}

.production-center-empty-workspace {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #687580;
  text-align: center;
}

.production-center-empty-workspace strong {
  color: #26333f;
  font-size: 18px;
  font-weight: 900;
}

.production-center-empty-workspace span {
  max-width: 680px;
  line-height: 1.6;
  font-size: 13px;
}

.production-center-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid #e1e7ee;
}

.production-center-workspace-head span,
.production-center-action-grid span {
  display: block;
  margin-bottom: 7px;
  color: #6d7b88;
  font-size: 12px;
}

.production-center-workspace-head strong {
  color: #101820;
  font-size: 22px;
  font-weight: 900;
}

.production-center-workspace-head em {
  color: #4f6f91;
  font-style: normal;
  font-size: 13px;
}

.production-center-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.production-center-action-grid div {
  min-height: 72px;
  padding: 14px;
  border: 1px solid #dfe6ed;
  background: #f8fafc;
}

.production-center-action-grid strong {
  color: #101820;
  font-size: 17px;
  font-weight: 900;
}

.production-center-note {
  margin: 18px 0 0;
  padding: 13px 14px;
  border: 1px solid #f0d98a;
  color: #5c4c16;
  background: #fff7d8;
  line-height: 1.6;
  font-size: 13px;
}

.production-center-boundary {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dfe6ed;
  background: #ffffff;
}

.production-center-boundary strong,
.production-center-boundary span {
  display: block;
}

.production-center-boundary strong {
  margin-bottom: 8px;
  color: #101820;
  font-size: 15px;
  font-weight: 900;
}

.production-center-boundary span {
  color: #536170;
  line-height: 1.65;
  font-size: 13px;
}

.production-center-link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.piecework-workspace {
  padding: 14px;
  background: #f4f7fb;
}

.piecework-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.piecework-card {
  border: 1px solid #d7e0eb;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.piecework-lifecycle-card {
  margin-top: 14px;
}

.piecework-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
}

.piecework-stage-grid div {
  min-height: 112px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 10px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #f8fbff;
}

.piecework-stage-grid b {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #163b61;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.piecework-stage-grid strong {
  color: #101820;
  font-size: 14px;
  font-weight: 900;
}

.piecework-stage-grid span {
  color: #526477;
  font-size: 12px;
  line-height: 1.45;
}

.piecework-register-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.45fr);
  gap: 12px;
  padding: 0 14px 12px;
}

.piecework-card-head {
  min-height: 46px;
  padding: 10px 14px;
  border-bottom: 1px solid #e1e7ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.piecework-card-head strong {
  color: #101820;
  font-size: 16px;
  font-weight: 900;
}

.piecework-card-head span {
  color: #617083;
  font-size: 12px;
  white-space: nowrap;
}

.piecework-scan-card,
.piecework-workbench-card {
  padding-bottom: 12px;
}

.piecework-bed-card {
  padding-bottom: 12px;
}

.piecework-bed-list {
  display: grid;
  gap: 8px;
  padding: 12px 14px 0;
}

.piecework-bed-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 170px) 108px;
  gap: 10px;
  align-items: center;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: #071a35;
  text-align: left;
  cursor: pointer;
}

.piecework-bed-item:hover,
.piecework-bed-item.active {
  border-color: #1f6feb;
  background: #f0f6ff;
}

.piecework-bed-item span {
  min-width: 0;
}

.piecework-bed-item strong,
.piecework-bed-item b {
  display: block;
  font-size: 15px;
  font-weight: 900;
}

.piecework-bed-item em {
  display: block;
  margin-top: 3px;
  color: #617083;
  font-size: 12px;
  font-style: normal;
}

.piecework-bed-item i {
  justify-self: end;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1f5ebd;
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.piecework-bed-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 12px;
  margin-top: 12px;
}

.piecework-bed-detail-compact {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}

.piecework-scan-row,
.piecework-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
  padding: 12px 14px 0;
}

.piecework-scan-row input,
.piecework-submit-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c7d3e4;
  border-radius: 6px;
  padding: 8px 10px;
  color: #071a35;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.piecework-submit-row label {
  display: grid;
  gap: 5px;
  color: #617083;
  font-size: 12px;
}

.piecework-hint {
  margin: 8px 14px 0;
  color: #617083;
  font-size: 12px;
  line-height: 1.45;
}

.piecework-hint.danger {
  color: #c24132;
  font-weight: 700;
}

.piecework-hint.ok {
  color: #168a53;
  font-weight: 700;
}

.piecework-backend-notice {
  margin: 10px 0 0;
  padding: 8px 12px;
  border: 1px solid #d7e0eb;
  border-radius: 6px;
  background: #fff;
}

.piecework-empty-state {
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px dashed #c7d3e4;
  border-radius: 8px;
  background: #f8fafc;
  color: #617083;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
}

.piecework-toolbar-row {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 12px;
  color: #617083;
  font-size: 12px;
}

.piecework-toolbar-row .primary-btn {
  min-height: 32px;
  padding: 0 12px;
}

.piecework-table-note {
  margin-top: 0;
  padding-top: 4px;
}

.piecework-field-grid,
.piecework-process-box,
.piecework-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}

.piecework-process-box {
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, 0.7fr) minmax(180px, 1fr);
}

.piecework-field-grid div,
.piecework-process-box label,
.piecework-process-box div,
.piecework-summary-grid div {
  min-height: 58px;
  border: 1px solid #d7e0eb;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px 10px;
}

.piecework-process-box label,
.piecework-process-box div {
  background: #e8f1ff;
  border-color: #b8d2f6;
}

.piecework-field-grid span,
.piecework-process-box label span,
.piecework-process-box span,
.piecework-summary-grid span {
  display: block;
  color: #617083;
  font-size: 12px;
}

.piecework-field-grid strong,
.piecework-process-box strong,
.piecework-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: #071a35;
  font-size: 18px;
  font-weight: 900;
}

.piecework-process-select select {
  width: 100%;
  min-height: 30px;
  margin-top: 4px;
  border: 1px solid #a9c5ec;
  border-radius: 6px;
  background: #ffffff;
  color: #071a35;
  font-size: 14px;
  font-weight: 800;
}

.piecework-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.piecework-longterm-summary {
  padding-bottom: 14px;
}

.piecework-progress-list {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.piecework-progress-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
}

.piecework-bar {
  height: 9px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.piecework-bar span {
  display: block;
  width: var(--piecework-progress);
  height: 100%;
  background: #1f6feb;
}

.piecework-workbench-card {
  margin-top: 12px;
}

.piecework-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}

.piecework-tab {
  border: 1px solid #c7d3e4;
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  color: #172033;
  font-size: 13px;
  cursor: pointer;
}

.piecework-tab.active {
  border-color: #1f6feb;
  background: #1f6feb;
  color: #fff;
}

.piecework-table-wrap {
  margin: 0 14px 14px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}

.piecework-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

.piecework-small-table {
  min-width: 760px;
}

.piecework-review-table {
  min-width: 1080px;
}

.piecework-table th,
.piecework-table td {
  border-right: 1px solid #d7e0eb;
  border-bottom: 1px solid #d7e0eb;
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.piecework-table th {
  background: #eaf0f7;
  color: #26354f;
  font-size: 12px;
  font-weight: 900;
}

.piecework-table td:last-child,
.piecework-table th:last-child {
  border-right: 0;
}

.piecework-quantity-cell,
.piecework-money-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.piecework-quantity-cell {
  font-weight: 700;
}

.piecework-money-cell {
  font-weight: 400;
}

.piecework-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.piecework-status.wait {
  color: #b7791f;
  background: #fff4d8;
}

.piecework-status.ok {
  color: #168a53;
  background: #e8f7ef;
}

.piecework-status.stop {
  color: #c24132;
  background: #ffeceb;
}

.piecework-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
}

.piecework-rate-side {
  display: grid;
  gap: 10px;
  margin: 0 14px 14px 0;
}

.piecework-rate-form {
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.piecework-rate-form strong {
  display: block;
  margin-bottom: 10px;
  color: #101820;
  font-size: 16px;
}

.piecework-rate-form label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  color: #536170;
  font-size: 12px;
}

.piecework-rate-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c7d3e4;
  border-radius: 6px;
  padding: 0 9px;
  color: #071a35;
  font-weight: 700;
}

.piecework-rate-form .primary-btn {
  width: 100%;
}

.piecework-rule-card {
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.piecework-rule-card strong {
  display: block;
  margin-bottom: 10px;
  color: #101820;
  font-size: 16px;
}

.piecework-rule-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #d7e0eb;
  color: #536170;
}

.piecework-rule-card div:last-child {
  border-bottom: 0;
}

.piecework-rule-card b {
  color: #071a35;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.template-panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  margin-bottom: 14px;
}

.template-panel-head {
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.template-controls {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.template-controls label {
  display: grid;
  gap: 5px;
  color: #3f4b57;
  font-size: 12px;
  font-weight: 700;
}

.template-controls input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line-soft);
  padding: 0 8px;
  background: #ffffff;
}

.template-controls input:focus {
  outline: 2px solid var(--focus);
  outline-offset: -1px;
}

.layout-controls {
  padding: 0 12px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #3f4b57;
  font-size: 13px;
}

.layout-controls-title {
  font-weight: 800;
  color: #18212b;
}

.layout-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.layout-controls input {
  width: 15px;
  height: 15px;
}

.module-manager {
  margin: 0 12px 12px;
  border: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.module-manager-head {
  min-height: 42px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-manager-head strong {
  display: block;
  font-size: 13px;
}

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

.module-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.module-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 106px repeat(4, auto);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.module-business-row {
  grid-template-columns: minmax(220px, 1.1fr) minmax(120px, 0.7fr) minmax(220px, 1.2fr) auto auto;
  cursor: default;
}

.module-business-title strong {
  display: block;
  color: #142234;
  font-size: 14px;
}

.module-business-title span,
.module-business-status,
.module-business-impact {
  min-width: 0;
  color: #526273;
  font-size: 12px;
  line-height: 1.35;
}

.module-business-title span {
  display: block;
  margin-top: 3px;
}

.module-business-status {
  color: #0c5e41;
  font-weight: 800;
}

.module-business-impact {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-row[draggable="true"] {
  cursor: grab;
}

.module-row.dragging {
  opacity: 0.42;
}

.module-row.is-hidden {
  opacity: 0.58;
}

.module-row input,
.module-row select {
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  padding: 0 8px;
}

.module-row button {
  min-width: 52px;
  height: 30px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: #275078;
  cursor: pointer;
  font-weight: 700;
}

.module-row button:hover {
  border-color: #2d72e8;
  color: #145fca;
}

.module-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.module-row .module-delete {
  color: #b4232f;
}

.template-panel.production-layout-panel .layout-controls {
  display: none;
}

.template-panel.production-layout-panel .module-manager {
  margin-top: 12px;
}

.production-layout-editor {
  display: grid;
  gap: 12px;
}

.production-layout-section {
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.production-layout-section-head {
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid #d6e0ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.production-layout-section-head strong {
  display: block;
  color: #142234;
  font-size: 13px;
}

.production-layout-section-head span {
  display: block;
  margin-top: 2px;
  color: #607086;
  font-size: 12px;
}

.production-layout-section-head button,
.production-layout-column-main-line > button,
.production-layout-card-row > button {
  height: 28px;
  border: 1px solid #cbd7e6;
  background: #ffffff;
  color: #164f95;
  font-weight: 800;
  cursor: pointer;
}

.production-layout-section-head button {
  min-width: 72px;
  padding: 0 12px;
}

.production-layout-section-head button:hover,
.production-layout-column-main-line > button:hover,
.production-layout-card-row > button:hover {
  border-color: #1767d8;
  color: #0f5fc7;
}

.production-layout-column-main-line > button:disabled,
.production-layout-card-row > button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.production-layout-scope-grid {
  display: grid;
}

.production-layout-scope-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(130px, 0.6fr) minmax(110px, 0.45fr) minmax(260px, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid #e3ebf4;
  font-size: 12px;
}

.production-layout-scope-row:last-child {
  border-bottom: 0;
}

.production-layout-scope-row strong {
  color: #142234;
}

.production-layout-scope-row span {
  color: #00634a;
  font-weight: 800;
}

.production-layout-scope-row em {
  min-width: 0;
  color: #526273;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-layout-column-list,
.production-layout-card-list,
.production-layout-style-grid {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.production-layout-column-row,
.production-layout-card-row,
.production-layout-style-row {
  min-height: 36px;
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid #dce5ef;
  background: #fbfdff;
  font-size: 12px;
}

.production-layout-column-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  overflow-x: auto;
}

.production-layout-column-main-line {
  display: grid;
  grid-template-columns:
    50px minmax(96px, 0.8fr)
    minmax(88px, 0.76fr) minmax(54px, 0.34fr) minmax(58px, 0.36fr) minmax(100px, 0.86fr)
    44px
    minmax(88px, 0.76fr) minmax(54px, 0.34fr) minmax(58px, 0.36fr) minmax(100px, 0.86fr)
    44px 34px 34px 46px 46px 50px;
  gap: 4px;
  align-items: center;
  width: 100%;
  min-width: 0;
  justify-content: start;
}

.production-layout-card-row {
  grid-template-columns: minmax(220px, 1.05fr) minmax(260px, 1.28fr) minmax(110px, 0.5fr) minmax(116px, 0.5fr) minmax(116px, 0.5fr) 38px 38px 68px;
}

.production-layout-style-row {
  grid-template-columns: 72px repeat(4, minmax(120px, 1fr));
}

.production-layout-column-detail-label {
  color: #142234;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.production-layout-column-row.is-selected {
  border-color: #ff8a00;
  background: #fff7e8;
}

.production-layout-column-row input,
.production-layout-column-row select,
.production-layout-card-row input,
.production-layout-card-row select,
.production-layout-style-row input {
  min-width: 0;
  width: 100%;
  height: 28px;
  border: 1px solid #cbd7e6;
  background: #ffffff;
  padding: 0 7px;
  color: #102033;
  font: inherit;
}

.production-layout-column-main-line label,
.production-layout-card-row label,
.production-layout-style-field {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: auto minmax(44px, 1fr);
  align-items: center;
  gap: 4px;
  color: #405268;
  font-weight: 800;
}

.production-layout-column-main-line > .production-layout-style-field {
  width: 100%;
}

.production-layout-column-main-line > button {
  min-width: 0;
  padding: 0 4px;
  white-space: nowrap;
}

.production-layout-column-main-line .production-layout-style-field {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px;
}

.production-layout-column-main-line .production-layout-style-field > span {
  white-space: nowrap;
}

.production-layout-column-main-line > .clearable-control,
.production-layout-card-row > .clearable-control,
.production-layout-style-field > .clearable-control,
.production-layout-card-text-field > .clearable-control {
  min-width: 0;
  width: 100%;
}

.production-layout-style-row > strong {
  color: #142234;
}

.production-layout-style-field {
  grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
}

.production-layout-editor .clearable-control-button {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-radius: 50%;
  font-size: 9px;
  line-height: 12px;
  right: 2px;
}

.production-layout-editor .clearable-control > input {
  padding-right: 18px !important;
}

.production-layout-column-row .production-layout-inline-check {
  display: inline-flex;
  justify-content: center;
}

.production-layout-card-text-field {
  grid-template-columns: 36px minmax(0, 1fr);
}

.production-layout-inline-check input {
  width: 14px;
  height: 14px;
}

.production-layout-danger {
  color: #b4232f !important;
}

body:has(#templatePanel.production-layout-panel:not(.hidden)) .summary-grid {
  display: none !important;
}

.cell-style-popover {
  position: fixed;
  z-index: 60;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #245da8;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  color: #20303a;
  font-size: 12px;
}

.cell-style-popover label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.cell-style-popover input,
.cell-style-popover select {
  width: 58px;
  height: 26px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  padding: 0 5px;
  font-weight: 700;
}

.cell-style-popover input[type="color"] {
  width: 34px;
  padding: 2px;
}

.cell-style-action {
  height: 26px;
  border: 1px solid #c6d4e1;
  background: #f7fbff;
  color: #123047;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cell-style-action:hover {
  border-color: #2d72e8;
  color: #145fca;
}

.cell-style-target {
  min-width: 46px;
  color: #145fca;
  font-weight: 900;
}

.cell-style-selected {
  outline: 2px solid var(--focus) !important;
  outline-offset: -2px;
  background-image: linear-gradient(rgba(45, 114, 232, 0.08), rgba(45, 114, 232, 0.08));
}

.generic-editable-table th,
.generic-editable-table td {
  position: relative;
}

.generic-editable-table [data-generic-readonly="0"]:focus,
[data-generic-region]:focus {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.generic-editable-table [data-generic-readonly="1"] {
  cursor: default;
}

.generic-column-resize-handle,
.generic-row-resize-handle,
.supplier-doc-column-resize-handle,
.supplier-doc-row-resize-handle,
.cost-accounting-bom-column-resize-handle,
.cost-accounting-bom-row-resize-handle {
  position: absolute;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.generic-column-resize-handle,
.supplier-doc-column-resize-handle,
.cost-accounting-bom-column-resize-handle {
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
}

.generic-row-resize-handle,
.supplier-doc-row-resize-handle,
.cost-accounting-bom-row-resize-handle {
  left: 0;
  right: 0;
  bottom: -3px;
  height: 7px;
  cursor: row-resize;
}

.generic-editable-table th:hover > .generic-column-resize-handle,
.generic-editable-table td:hover > .generic-column-resize-handle,
.generic-editable-table th:hover > .generic-row-resize-handle,
.generic-editable-table td:hover > .generic-row-resize-handle,
.generic-column-resize-handle.dragging,
.generic-row-resize-handle.dragging,
.supplier-doc-matrix-table th:hover > .supplier-doc-column-resize-handle,
.supplier-doc-matrix-table td:hover > .supplier-doc-row-resize-handle,
.supplier-doc-column-resize-handle.dragging,
.supplier-doc-row-resize-handle.dragging,
.cost-accounting-bom-table th:hover > .cost-accounting-bom-column-resize-handle,
.cost-accounting-bom-column-resize-handle.dragging,
.cost-accounting-bom-table td:hover > .cost-accounting-bom-row-resize-handle,
.cost-accounting-bom-row-resize-handle.dragging {
  opacity: 1;
  background: rgba(45, 114, 232, 0.2);
}

.supplier-doc-column-resize-handle:hover,
.supplier-doc-row-resize-handle:hover,
.cost-accounting-bom-column-resize-handle:hover,
.cost-accounting-bom-row-resize-handle:hover {
  opacity: 1;
  background: rgba(45, 114, 232, 0.32);
}

.cost-accounting-bom-table .cost-accounting-bom-delete-head > .cost-accounting-bom-column-resize-handle {
  opacity: 0.45;
  background: rgba(45, 114, 232, 0.12);
}

.cost-accounting-bom-table .cost-accounting-bom-delete-head:hover > .cost-accounting-bom-column-resize-handle,
.cost-accounting-bom-table .cost-accounting-bom-delete-head > .cost-accounting-bom-column-resize-handle.dragging {
  opacity: 1;
  background: rgba(45, 114, 232, 0.28);
}

.generic-cell-hidden-by-merge {
  display: none !important;
}

.layout-module {
  position: relative;
}

body.layout-editing .layout-module:not(.hidden) {
  outline: 2px dashed rgba(45, 114, 232, 0.56);
  outline-offset: 3px;
}

body.layout-editing .layout-module:not(.hidden)::before {
  content: attr(data-layout-title);
  position: absolute;
  top: -22px;
  left: 58px;
  z-index: 5;
  min-height: 20px;
  padding: 2px 8px;
  background: #1d4f91;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.layout-drag-handle {
  display: none;
}

body.layout-editing .layout-module:not(.hidden) > .layout-drag-handle {
  position: absolute;
  top: -24px;
  left: 0;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 52px;
  border: 0;
  background: #145fca;
  color: #ffffff;
  cursor: grab;
  font-size: 12px;
  font-weight: 900;
}

body.layout-editing .layout-module.layout-page-dragging {
  opacity: 0.48;
}

body.layout-editing .layout-module.layout-drop-before {
  box-shadow: 0 -5px 0 #2d72e8;
}

body.layout-editing .layout-module.layout-drop-after {
  box-shadow: 0 5px 0 #2d72e8;
}

.layout-width-half {
  max-width: calc(50% - 7px);
}

.custom-module-host {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.custom-layout-panel {
  flex: 1 1 100%;
}

.custom-module-body {
  position: relative;
  min-height: var(--custom-module-row-height);
  padding: 12px 14px;
  color: #263442;
  line-height: 1.6;
  outline: 0;
}

.custom-module-body:focus {
  box-shadow: inset 0 0 0 2px var(--focus);
  background: #f7fbff;
}

.summary-item {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: 7px 10px;
  min-height: var(--summary-row-height);
}

.summary-item.summary-dragging {
  opacity: 0.48;
}

.summary-item.summary-drop-before {
  box-shadow: -5px 0 0 #2d72e8;
}

.summary-item.summary-drop-after {
  box-shadow: 5px 0 0 #2d72e8;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  outline: 0;
}

.summary-item strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.1;
  outline: 0;
}

.summary-grid[data-summary-view="ledger"] {
  align-items: start;
  gap: 8px;
  margin-bottom: 12px;
}

.summary-grid[data-summary-view="ledger"] .ledger-table-search {
  grid-column: span 6;
  min-height: 34px;
  align-self: start;
  justify-content: flex-start;
}

.summary-grid[data-summary-view="ledger"] .summary-item {
  min-height: 38px !important;
  padding: 5px 10px;
}

.summary-grid[data-summary-view="ledger"] .summary-item span {
  font-size: 12px;
  line-height: 1.1;
}

.summary-grid[data-summary-view="ledger"] .summary-item strong {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1;
}

.summary-item [contenteditable="true"]:focus {
  box-shadow: inset 0 -2px 0 var(--focus);
  background: #f7fbff;
}

.summary-drag-handle {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 8;
  display: none;
  height: 22px;
  border: 0;
  background: #145fca;
  color: #ffffff;
  cursor: grab;
  font-size: 12px;
  font-weight: 900;
}

.summary-drag-handle:active {
  cursor: grabbing;
}

.summary-width-resize-handle,
.summary-height-resize-handle {
  position: absolute;
  z-index: 7;
  background: rgba(45, 114, 232, 0.22);
  opacity: 0;
}

.summary-width-resize-handle {
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.summary-height-resize-handle {
  left: 0;
  right: 0;
  bottom: -4px;
  height: 8px;
  cursor: row-resize;
}

.summary-item:hover .summary-drag-handle,
body.layout-editing .summary-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
}

.summary-item:hover .summary-width-resize-handle,
.summary-item:hover .summary-height-resize-handle,
.summary-width-resize-handle.dragging,
.summary-height-resize-handle.dragging {
  opacity: 1;
}

.summary-width-resize-handle:hover,
.summary-width-resize-handle.dragging,
.summary-height-resize-handle:hover,
.summary-height-resize-handle.dragging {
  background: rgba(45, 114, 232, 0.45);
}

.summary-item-controls {
  display: none;
}

body.layout-editing .summary-item {
  padding-top: 38px;
}

body.layout-editing .summary-item-controls {
  position: absolute;
  top: 6px;
  left: 64px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.summary-item-controls button,
.summary-add-btn {
  min-height: 24px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: #275078;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.summary-item-controls button {
  padding: 0 7px;
}

.summary-item-controls .summary-delete {
  color: #b4232f;
}

.summary-add-btn {
  display: none;
  min-height: var(--summary-row-height);
  padding: 7px 10px;
  border-style: dashed;
  background: #f8fbff;
}

body.layout-editing .summary-add-btn {
  display: block;
}

.global-board {
  display: none !important;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  margin-bottom: 14px;
}

.global-board-head {
  position: relative;
  min-height: var(--panel-header-row-height);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.global-board-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.global-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #52606d;
  font-size: 13px;
}

.global-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
}

.legend-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border: 1px solid transparent;
}

.legend-dot.abnormal {
  background: #f9c7ce;
  border-color: #dd5764;
}

.legend-dot.normal {
  background: #cfe8d5;
  border-color: #4a9a68;
}

.legend-dot.archived {
  background: #d9dde2;
  border-color: #8d97a3;
}

.global-strip {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
}

.global-tile {
  position: relative;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  min-height: var(--global-tile-row-height);
  padding: 9px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  cursor: pointer;
  text-align: left;
}

.global-tile:hover {
  border-color: #2d72e8;
  box-shadow: inset 0 0 0 1px #2d72e8;
}

.global-tile.abnormal {
  background: linear-gradient(90deg, var(--danger-bg), #ffffff 54%);
}

.global-tile.normal {
  background: linear-gradient(90deg, var(--ok-bg), #ffffff 54%);
}

.global-tile.archived {
  background: #f0f2f4;
}

.global-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.global-style {
  color: var(--blue);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.global-queue {
  color: var(--red);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.global-meta {
  color: #52606d;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.global-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  align-self: end;
}

.global-mini-cell {
  min-height: 18px;
  display: grid;
  place-items: center;
  background: var(--green);
  border: 1px solid #b7c8b2;
  font-size: 11px;
  color: #20303a;
  overflow: hidden;
}

.board-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
}

.board-layout > .layout-module {
  flex: 1 1 100%;
}

.board-layout > .layout-module.layout-width-half {
  flex: 1 1 calc(50% - 7px);
  max-width: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  min-width: 0;
}

.panel-header {
  position: relative;
  min-height: var(--panel-header-row-height);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cut-list,
.archive-list,
.transfer-list {
  padding: 12px;
  display: grid;
  gap: 14px;
}

.cut-panel .cut-list,
.transfer-panel .transfer-list {
  padding-top: 0;
  gap: 40px;
  overflow-x: auto;
  background: #ffffff;
}

.cut-desktop-list {
  display: grid;
  gap: 40px;
  align-items: start;
}

.cut-mobile-list {
  display: none;
}

.cut-style-group {
  min-width: max-content;
}

.cut-style-grid {
  display: grid;
  grid-template-columns: repeat(var(--shortage-blocks-per-row), var(--shortage-block-width));
  gap: var(--shortage-block-gap);
  align-items: start;
}

.block-list {
  padding: 10px;
  display: grid;
  gap: 40px;
  align-items: start;
  overflow-x: auto;
  background: #ffffff;
}

.shortage-panel .block-list {
  padding-top: 0;
  gap: var(--shortage-block-gap);
}

#shortagePanel[data-dispatch-filter="development-design"] {
  padding: 0;
  overflow: hidden;
}

#shortagePanel[data-dispatch-filter="development-design"] .block-list {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.shortage-window-groups {
  min-width: max-content;
  display: grid;
  gap: var(--shortage-block-gap);
  align-items: start;
}

.shortage-window-spacer {
  min-width: 1px;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 18px;
}

.shortage-window-spacer.hidden {
  display: none;
}

.shortage-window-loading {
  display: none;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #cfd8e6;
  background: #ffffff;
  color: #344255;
  font-size: 13px;
  font-weight: 700;
}

.shortage-window-spacer.is-loading .shortage-window-loading {
  display: inline-flex;
  border-color: #b8c8df;
  box-shadow: 0 0 0 2px rgba(40, 102, 190, 0.08);
}

.shortage-window-end {
  display: none;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d6dee9;
  background: #ffffff;
  color: #5f6f83;
  font-size: 13px;
  font-weight: 700;
}

.shortage-window-spacer.is-end .shortage-window-end {
  display: inline-flex;
}

.shortage-style-group {
  position: relative;
  min-width: max-content;
  display: grid;
  grid-template-columns: max-content auto;
  column-gap: 6px;
  align-items: start;
  padding: 0;
  border-top: 0;
}

.shortage-style-group.is-dispatch-pinned-style {
  padding-right: 0;
}

.shortage-style-group .style-group-grid {
  grid-column: 1;
  grid-row: 1;
}

.shortage-style-group-actions {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}

.shortage-unpin-style-key {
  position: static;
  z-index: auto;
  width: 32px;
  min-width: 32px;
  height: 50px;
  padding: 0 2px;
  border: 1px solid #ff1f1f;
  background: #fff7f7;
  color: #d10000;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.shortage-style-rail-key {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  writing-mode: horizontal-tb;
}

.shortage-style-rail-key span {
  display: block;
  line-height: 1.05;
}

.shortage-style-group-actions .shortage-hide-style-key {
  width: 32px;
  min-width: 32px;
  height: 50px;
  padding: 0 2px;
  border-color: #ff1f1f;
  background: #fff7f7;
  color: #d10000;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.shortage-unpin-style-key:hover,
.shortage-unpin-style-key:focus-visible,
.shortage-style-group-actions .shortage-hide-style-key:hover,
.shortage-style-group-actions .shortage-hide-style-key:focus-visible {
  background: #ff1f1f;
  color: #ffffff;
  outline: none;
}

.shortage-pinned-style-zone {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--shortage-block-gap);
  align-items: start;
  min-width: max-content;
  outline: 4px solid #ff1f1f;
  outline-offset: 4px;
}

.style-group-header {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 10px;
  background: #f5f8fb;
  border: 1px solid #cfd9e3;
  border-bottom: 0;
}

.style-group-header strong {
  color: #102033;
  font-size: 15px;
  font-weight: 900;
}

.style-group-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.style-group-header b {
  font-size: 15px;
}

.style-group-alert {
  padding: 2px 7px;
  color: #9f1f2b !important;
  border: 1px solid #f1b8bf;
  background: #fff1f2;
}

.style-group-grid {
  display: grid;
  grid-template-columns: repeat(var(--shortage-blocks-per-row), var(--shortage-block-width));
  gap: var(--shortage-block-gap);
  align-items: start;
  padding-top: 0;
}

.shortage-block,
.cut-block,
.transfer-block {
  border: 1px solid #15191e;
  background: #ffffff;
}

.transfer-style-group {
  min-width: max-content;
  padding-right: clamp(180px, 28vw, 520px);
}

.transfer-style-grid {
  display: grid;
  grid-template-columns: repeat(var(--shortage-blocks-per-row), var(--shortage-block-width));
  gap: var(--shortage-block-gap);
  align-items: start;
}

.transfer-card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid #15191e;
  background: #f8fbff;
  color: #0f2f4b;
  font-size: 12px;
}

.transfer-card-header strong {
  min-width: 0;
  grid-column: 1;
  color: #003c9a;
  font-size: 14px;
  font-weight: 900;
}

.transfer-card-header span {
  min-width: 0;
  grid-column: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.transfer-card-header em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #ffb9bd;
  background: #fff4f4;
  color: #d1192d;
  font-style: normal;
  font-weight: 900;
}

.transfer-matrix .title-alert {
  background: #ffe5e2;
  color: #9f1d12;
}

.transfer-editable-cell {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(45, 114, 232, 0.16);
}

.transfer-size-matrix-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.transfer-editable-cell:focus,
.transfer-note-cell:focus {
  outline: 2px solid rgba(45, 114, 232, 0.38);
  outline-offset: -2px;
  background: #f5fbff;
}

.transfer-size-matrix-cell:focus {
  outline-color: rgba(45, 114, 232, 0.55);
  background: #eef7ff;
}

.transfer-strong-cell,
.transfer-total-cell {
  font-weight: 700;
}

.transfer-status-cell {
  color: #4a5862;
  font-size: 12px;
}

.transfer-note-cell {
  text-align: left !important;
  background: #fffdf5;
  color: #25313b;
}

.transfer-actions .primary-btn:disabled,
.transfer-actions .ghost-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.transfer-ledger-shell {
  min-width: 1120px;
  padding-right: clamp(180px, 24vw, 460px);
}

.transfer-receipt-header {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr;
  border: 1px solid #c9d5df;
  border-bottom: 0;
  background: #ffffff;
}

.transfer-receipt-field {
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px;
  border-right: 1px solid #c9d5df;
  display: grid;
  align-content: center;
  gap: 5px;
}

.transfer-receipt-field:last-child {
  border-right: 0;
}

.transfer-receipt-field span {
  color: #5d6b78;
  font-size: 12px;
  line-height: 1.2;
}

.transfer-receipt-field em {
  margin-right: 3px;
  color: #ff3850;
  font-style: normal;
}

.transfer-receipt-field strong {
  min-width: 0;
  overflow: hidden;
  color: #163149;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-receipt-field input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #b8c6d5;
  border-radius: 0;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 700;
}

.transfer-receipt-field input:focus {
  border-color: #4b8ad5;
  outline: 0;
  box-shadow: 0 0 0 1px rgba(75, 138, 213, 0.18);
}

.transfer-structured-table {
  width: 100%;
  min-width: 1080px;
  border: 1px solid #101820;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.transfer-structured-table th,
.transfer-structured-table td {
  border: 1px solid #101820;
  padding: 7px 8px;
  color: #092235;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
}

.transfer-structured-table th {
  background: #e7f6e9;
  color: #061d2f;
  font-weight: 900;
  text-align: center;
}

.transfer-structured-table th:nth-child(1),
.transfer-structured-table td:nth-child(1) {
  width: 48px;
  text-align: center;
}

.transfer-structured-table th:nth-child(2),
.transfer-structured-table td:nth-child(2) {
  width: 132px;
  font-weight: 900;
}

.transfer-structured-table th:nth-child(3),
.transfer-structured-table td:nth-child(3),
.transfer-structured-table th:nth-child(4),
.transfer-structured-table td:nth-child(4) {
  width: 112px;
}

.transfer-structured-table th:nth-child(5),
.transfer-structured-table td:nth-child(5) {
  width: 420px;
}

.transfer-structured-table th:nth-child(6),
.transfer-structured-table td:nth-child(6) {
  width: 70px;
  text-align: center;
  font-weight: 900;
}

.transfer-structured-table th:nth-child(7),
.transfer-structured-table td:nth-child(7),
.transfer-structured-table th:nth-child(8),
.transfer-structured-table td:nth-child(8) {
  width: 116px;
}

.transfer-structured-table th:nth-child(9),
.transfer-structured-table td:nth-child(9) {
  width: 150px;
}

.transfer-ledger-row:nth-child(even) td {
  background: #fbfdff;
}

.transfer-ledger-size-cell {
  position: relative;
  overflow: visible;
}

.transfer-detail-total {
  font-weight: 900;
}

.transfer-ledger-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}

.transfer-ledger-actions .primary-btn,
.transfer-ledger-actions .ghost-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.status-pending {
  color: #9a5a00;
  background: #fff6dc;
  border-color: #f2d58b;
}

.status-danger {
  color: #b4232f;
  background: #fff1f2;
  border-color: #ffc9cf;
}

.transfer-panel .transfer-list {
  gap: 14px;
  padding: 14px 16px;
}

.transfer-ledger-shell {
  min-width: 1240px;
  padding-right: clamp(120px, 18vw, 360px);
}

.transfer-receipt-header {
  overflow: hidden;
  border: 1px solid #d2dde7;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #f8fbfd;
}

.transfer-receipt-field {
  min-height: 56px;
  padding: 9px 12px;
  border-right-color: #dbe4ec;
}

.transfer-receipt-field span {
  color: #677789;
  font-size: 12px;
}

.transfer-receipt-field strong {
  color: #163650;
  font-size: 14px;
  letter-spacing: 0;
}

.transfer-structured-table {
  border: 1px solid #d2dde7;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 2px rgba(15, 35, 50, 0.04);
}

.transfer-structured-table th,
.transfer-structured-table td {
  border: 0;
  border-right: 1px solid #dbe4ec;
  border-bottom: 1px solid #dbe4ec;
  padding: 8px 10px;
  color: #18324a;
}

.transfer-structured-table th:last-child,
.transfer-structured-table td:last-child {
  border-right: 0;
}

.transfer-structured-table tbody tr:last-child td {
  border-bottom: 0;
}

.transfer-structured-table th {
  height: 36px;
  background: #15354f;
  color: #ffffff;
  font-weight: 800;
}

.transfer-ledger-row:nth-child(even) td {
  background: #fbfdff;
}

.transfer-ledger-row:hover td {
  background: #f3f8fd;
}

.transfer-ledger-style {
  color: #0d4e9f;
  font-weight: 900;
}

.transfer-ledger-total {
  color: #102c45;
  font-size: 14px;
}

.transfer-ledger-actions .primary-btn,
.transfer-ledger-actions .ghost-btn {
  border-radius: 3px;
}

.transfer-workbench-shell {
  min-width: 1180px;
  max-width: 1480px;
  padding-right: clamp(96px, 14vw, 280px);
}

.transfer-workbench-shell .transfer-receipt-header {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(5, minmax(126px, 1fr)) minmax(116px, 0.72fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid #d8e2eb;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 35, 50, 0.04);
}

.transfer-receipt-title {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #e2e9f0;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fb 100%);
  display: grid;
  align-content: center;
  gap: 5px;
}

.transfer-receipt-title strong {
  color: #102c45;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.transfer-receipt-title span {
  color: #6b7d8d;
  font-size: 12px;
  line-height: 1.35;
}

.transfer-workbench-shell .transfer-receipt-field {
  min-height: 70px;
  padding: 12px 14px;
  border-right: 1px solid #e2e9f0;
  background: #ffffff;
}

.transfer-workbench-shell .transfer-receipt-field span,
.transfer-receipt-total span {
  color: #6b7d8d;
  font-size: 12px;
  font-weight: 700;
}

.transfer-workbench-shell .transfer-receipt-field strong {
  color: #102c45;
  font-size: 14px;
  font-weight: 800;
}

.transfer-receipt-total {
  min-height: 70px;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: #f6fbf7;
}

.transfer-receipt-total strong {
  color: #087443;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.transfer-workbench-card {
  margin-top: 12px;
  border: 1px solid #d8e2eb;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 35, 50, 0.04);
}

.transfer-workbench-header {
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e9f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fbfdff;
}

.transfer-workbench-header > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.transfer-workbench-header strong {
  color: #102c45;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.transfer-workbench-header span {
  color: #6b7d8d;
  font-size: 12px;
}

.transfer-workbench-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.transfer-workbench-tools .ghost-btn,
.transfer-workbench-tools .primary-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 3px;
  font-size: 12px;
}

.transfer-work-list-head,
.transfer-work-row {
  display: grid;
  grid-template-columns: 54px minmax(520px, 1.6fr) 112px 218px 172px 150px;
  align-items: center;
}

.transfer-work-list-head {
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e9f0;
  background: #f4f7fa;
  color: #6b7d8d;
  font-size: 12px;
  font-weight: 800;
}

.transfer-work-list {
  display: grid;
}

.transfer-work-row {
  position: relative;
  gap: 0;
  min-height: 94px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f6;
  background: #ffffff;
}

.transfer-work-row:last-child {
  border-bottom: 0;
}

.transfer-work-row:hover {
  background: #f9fcff;
}

.transfer-row-seq {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #eef4f8;
  color: #536678;
  font-size: 12px;
  font-weight: 900;
}

.transfer-row-main {
  min-width: 0;
  padding-right: 16px;
}

.transfer-row-title {
  min-width: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.transfer-row-title strong {
  color: #0d4e9f;
  font-size: 15px;
  font-weight: 900;
}

.transfer-row-title span {
  padding: 2px 7px;
  border: 1px solid #e0e8ef;
  border-radius: 999px;
  background: #f8fbfd;
  color: #536678;
  font-size: 12px;
  font-weight: 700;
}

.transfer-row-number-stack {
  display: grid;
  justify-items: start;
  gap: 3px;
}

.transfer-row-number-stack span,
.transfer-row-kpi span {
  color: #6b7d8d;
  font-size: 12px;
  font-weight: 700;
}

.transfer-row-number-stack strong {
  color: #102c45;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.transfer-row-kpi {
  display: grid;
  gap: 5px;
}

.transfer-row-kpi span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 168px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #e0e8ef;
  border-radius: 999px;
  background: #fbfdff;
}

.transfer-row-kpi b {
  color: #102c45;
  font-weight: 900;
}

.transfer-row-statuses {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.transfer-row-statuses .status-pill {
  min-height: 24px;
  border-radius: 999px;
}

.transfer-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.transfer-row-actions .ghost-btn,
.transfer-row-actions .primary-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 3px;
  font-size: 12px;
}

.transfer-workbench-shell .transfer-receipt-header {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(150px, 0.9fr)
    minmax(160px, 0.9fr)
    minmax(150px, 0.9fr)
    minmax(170px, 0.95fr);
  align-items: stretch;
  overflow: visible;
  border: 1px solid #d7e0e8;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
}

.transfer-workbench-shell .transfer-receipt-field,
.transfer-workbench-shell .transfer-receipt-total {
  min-height: 58px;
  padding: 8px 12px;
  border-right: 1px solid #e1e8ef;
  background: #ffffff;
  display: grid;
  align-content: center;
  gap: 5px;
}

.transfer-workbench-shell .transfer-receipt-field:last-of-type {
  border-right: 0;
}

.transfer-workbench-shell .transfer-receipt-field span,
.transfer-workbench-shell .transfer-receipt-total span {
  color: #1c2430;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.transfer-workbench-shell .transfer-receipt-field span em {
  margin-right: 2px;
  color: #f04452;
  font-style: normal;
}

.transfer-workbench-shell .transfer-receipt-field strong,
.transfer-workbench-shell .transfer-receipt-total strong {
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #d4dee8;
  background: #f9fbfd;
  color: #0f2e46;
  font-size: 13px;
  font-weight: 800;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-workbench-shell .transfer-receipt-total {
  border-right: 0;
  background: #f7fcf9;
}

.transfer-workbench-shell .transfer-receipt-total strong {
  border-color: #cae6d3;
  background: #f0faf4;
  color: #087443;
  font-size: 18px;
  line-height: 18px;
}

.transfer-workbench-total {
  min-height: 48px;
  padding: 8px 16px;
  border-top: 1px solid #e2e9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
}

.transfer-workbench-total span {
  color: #102c45;
  font-size: 16px;
  font-weight: 900;
}

.transfer-workbench-total strong {
  min-width: 86px;
  padding: 5px 14px;
  border: 1px solid #cae6d3;
  border-radius: 3px;
  background: #f0faf4;
  color: #087443;
  font-size: 22px;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
}

.transfer-workbench-shell {
  max-width: none;
  min-width: 1260px;
  padding-right: clamp(120px, 18vw, 360px);
}

.transfer-workbench-shell .transfer-receipt-header {
  grid-template-columns:
    minmax(230px, 1.25fr)
    minmax(180px, 1fr)
    minmax(160px, 0.9fr)
    minmax(170px, 0.95fr)
    minmax(160px, 0.9fr)
    minmax(180px, 1fr)
    minmax(130px, 0.72fr);
}

.transfer-workbench-shell .transfer-receipt-title {
  min-height: 64px;
  padding: 10px 16px;
  border-right: 1px solid #e1e8ef;
  background: #fbfdff;
  display: grid;
  align-content: center;
  gap: 5px;
}

.transfer-workbench-shell .transfer-receipt-title strong {
  color: #102c45;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.transfer-workbench-shell .transfer-receipt-title span {
  color: #6b7d8d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.transfer-document-card {
  margin-top: 12px;
  border: 1px solid #d8e2eb;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 35, 50, 0.04);
  overflow: hidden;
}

.transfer-document-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid #e1e8ef;
  background: #ffffff;
}

/* Inventory inbound/outbound now use the shared list/document skeleton. */
.transfer-ledger-shell.transfer-workbench-shell.transfer-standard-list-workspace {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

.transfer-standard-list-workspace .transfer-standard-list-toolbar {
  margin: 0;
}

.transfer-standard-list-workspace .transfer-standard-list-card {
  min-width: 0;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.transfer-standard-list-workspace .transfer-document-table-wrap {
  height: 100%;
  min-height: 280px;
  overflow: auto;
  border-top: 0;
}

.transfer-standard-list-workspace .transfer-document-table {
  width: max-content;
}

.transfer-standard-document .supplier-doc-topbar {
  min-height: 48px;
}

.transfer-standard-document-form > .supplier-doc-section,
.transfer-standard-document-form > .supplier-doc-actions {
  margin-inline: 0;
}

.transfer-standard-document .transfer-doc-not-applicable {
  min-height: 54px;
}

.transfer-document-boundary-note {
  margin-right: auto;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 700;
}

.transfer-document-table {
  width: 100%;
  min-width: 1510px;
  border-collapse: collapse;
  table-layout: fixed;
}

.transfer-document-table th,
.transfer-document-table td {
  min-height: 42px;
  padding: 9px 10px;
  border-right: 1px solid #dbe4ec;
  border-bottom: 1px solid #e6edf3;
  color: #102c45;
  font-size: 13px;
  line-height: 1.35;
  vertical-align: middle;
}

.transfer-document-table th {
  height: 36px;
  background: #133a56;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.transfer-document-table th:nth-child(1),
.transfer-document-table td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.transfer-document-table th:nth-child(2),
.transfer-document-table td:nth-child(2) {
  width: 176px;
}

.transfer-document-table th:nth-child(3),
.transfer-document-table td:nth-child(3),
.transfer-document-table th:nth-child(4),
.transfer-document-table td:nth-child(4) {
  width: 126px;
}

.transfer-document-table th:nth-child(5),
.transfer-document-table td:nth-child(5) {
  width: 460px;
}

.transfer-document-table th:nth-child(6),
.transfer-document-table td:nth-child(6),
.transfer-document-table th:nth-child(7),
.transfer-document-table td:nth-child(7),
.transfer-document-table th:nth-child(8),
.transfer-document-table td:nth-child(8) {
  width: 92px;
  text-align: right;
}

.transfer-document-table th:nth-child(9),
.transfer-document-table td:nth-child(9),
.transfer-document-table th:nth-child(10),
.transfer-document-table td:nth-child(10) {
  width: 116px;
}

.transfer-document-table th:nth-child(11),
.transfer-document-table td:nth-child(11) {
  width: 150px;
}

.transfer-document-table .transfer-table-fill {
  width: 180px;
  border-right: 0;
  background: #f7fafc;
}

.transfer-document-row:nth-child(even) td {
  background: #fbfdff;
}

.transfer-document-row:hover td {
  background: #f4f9ff;
}

.transfer-document-seq {
  color: #5c7082;
  font-weight: 900;
}

.transfer-document-style strong {
  display: block;
  color: #0d4e9f;
  font-size: 14px;
  font-weight: 900;
}

.transfer-document-style span {
  display: block;
  margin-top: 3px;
  color: #6b7d8d;
  font-size: 12px;
  font-weight: 700;
}

.transfer-list-size-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 5px;
  max-width: 430px;
}

.transfer-list-size-summary .transfer-size-mini {
  min-height: 34px;
  padding: 5px 8px 12px;
  border-color: #d7e2eb;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
}

.transfer-list-size-summary .transfer-size-mini.has-value {
  border-color: #c9ded1;
  background: #f2f8f4;
}

.transfer-list-size-summary .transfer-size-mini strong {
  color: #102c45;
  font-size: 14px;
  font-weight: 900;
}

.transfer-list-size-summary .transfer-size-mini small {
  right: 6px;
  bottom: 3px;
  color: #7c8b98;
  font-size: 10px;
}

.transfer-document-number {
  color: #102c45;
  font-size: 16px;
  font-weight: 900;
}

.transfer-document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.transfer-document-actions .ghost-btn,
.transfer-document-actions .primary-btn {
  min-width: 52px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 12px;
}

.transfer-workbench-total {
  justify-content: flex-end;
  gap: 8px;
  padding: 9px 16px;
  background: #fbfdff;
}

.transfer-workbench-total span {
  margin-left: 8px;
  color: #536678;
  font-size: 13px;
  font-weight: 800;
}

.transfer-workbench-total strong {
  min-width: 72px;
  padding: 4px 12px;
  font-size: 18px;
  line-height: 22px;
}

.jst-write-task-panel {
  margin-top: 12px;
}

.jst-task-table-wrap {
  overflow-x: auto;
}

.jst-task-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.jst-task-table th,
.jst-task-table td {
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 13px;
  vertical-align: middle;
  word-break: break-word;
}

.jst-task-table th {
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
}

.jst-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jst-task-actions .ghost-btn,
.jst-task-actions .primary-btn {
  min-height: 28px;
  padding: 4px 8px;
}

.permissions-panel {
  overflow: hidden;
}

.permissions-list {
  padding: 12px;
  display: grid;
  gap: 12px;
  background: #ffffff;
}

.permissions-board {
  display: grid;
  gap: 14px;
}

.permissions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.permissions-toolbar div {
  display: grid;
  gap: 3px;
}

.permissions-toolbar strong,
.permission-settings-head strong {
  font-size: 15px;
  color: #1f2933;
}

.permissions-toolbar span,
.permission-settings-head span {
  color: var(--muted);
  font-size: 12px;
}

.permissions-toolbar button,
.permission-role-actions button,
.permission-settings-actions button,
.permission-operator-row button {
  border: 1px solid #dbe3e8;
  background: #f8fafc;
  color: #25313b;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.permissions-toolbar button:disabled,
.permission-role-actions button:disabled,
.permission-settings-actions button:disabled,
.permission-operator-row button:disabled {
  color: #9aa7b2;
  cursor: not-allowed;
}

.permissions-tabs {
  display: flex;
  gap: 8px;
}

.permissions-tabs button {
  min-width: 92px;
  min-height: 34px;
  border: 1px solid #dbe3e8;
  background: #f5f7f9;
  color: #25313b;
  font-weight: 700;
}

.permissions-tabs button.active {
  border-color: #ff4768;
  background: #fff2f5;
  color: #e43455;
}

.permissions-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  background: #f8fbff;
  color: #25313b;
}

.permissions-notice strong {
  font-size: 14px;
}

.permissions-notice span {
  color: var(--muted);
  font-size: 12px;
}

.permission-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.permission-role-card {
  border: 1px solid var(--line-soft);
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.permission-role-card.active {
  border-color: #ff4768;
  box-shadow: 0 0 0 2px rgba(255, 71, 104, 0.08);
}

.permission-role-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.permission-role-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-role-card-head span {
  color: #ff4768;
  font-size: 12px;
  font-weight: 700;
}

.permission-role-card-head strong {
  color: #111827;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.permission-role-card-head mark {
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.permission-role-meta,
.permission-role-rules {
  display: grid;
  gap: 7px;
}

.permission-edit-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.permission-edit-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.permission-edit-row p {
  margin: 0;
  min-height: 24px;
  padding: 3px 5px;
  background: #f9fbfc;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.permission-edit-row p:focus,
.permission-role-card-head strong:focus {
  outline: 2px solid rgba(45, 114, 232, 0.38);
  outline-offset: -2px;
  background: #f5fbff;
}

.permission-operator-list {
  display: grid;
  gap: 6px;
  border-top: 1px dashed #dbe3e8;
  border-bottom: 1px dashed #dbe3e8;
  padding: 8px 0;
}

.permission-operator-row {
  display: grid;
  grid-template-columns: 22px minmax(92px, 1fr) minmax(92px, 1fr) auto auto auto auto;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #25313b;
}

.permission-operator-row b {
  color: #9aa7b2;
  font-weight: 700;
}

.permission-operator-row small {
  color: var(--muted);
}

.permission-role-actions,
.permission-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-settings-panel {
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.permission-settings-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.permission-settings-head > div:first-child {
  display: grid;
  gap: 3px;
}

.permission-matrix-groups {
  display: grid;
  gap: 0;
}

.permission-matrix-group {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line-soft);
}

.permission-matrix-group:last-child {
  border-bottom: 0;
}

.permission-matrix-group h3 {
  margin: 0;
  padding: 10px 14px;
  background: #eef4f7;
  color: #25313b;
  font-size: 13px;
}

.permission-matrix-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #eef2f5;
}

.permission-matrix-row.high-risk {
  background: #fffaf0;
}

.permission-module-name {
  display: grid;
  gap: 3px;
}

.permission-module-name strong {
  font-size: 13px;
  color: #1f2933;
}

.permission-module-name span {
  color: var(--muted);
  font-size: 11px;
}

.permission-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid #dbe3e8;
  background: #f8fafc;
  color: #25313b;
  font-size: 12px;
}

.permission-action-chip em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.permission-action-allowed {
  border-color: #b7e3c5;
  background: #effaf2;
  color: #1f6f43;
}

.permission-action-review {
  border-color: #ffe0a6;
  background: #fff8df;
  color: #8a5a00;
}

.permission-action-denied,
.permission-action-disabled {
  border-color: #edf0f2;
  background: #f4f6f8;
  color: #9aa7b2;
}

.permission-action-summary {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid #d8e2ea;
  border-left-width: 5px;
  background: #ffffff;
  color: #25313b;
  font-size: 12px;
}

.permission-summary-main,
.permission-summary-detail {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.permission-action-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.permission-action-summary strong {
  min-width: 0;
  overflow: hidden;
  color: #12233d;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-action-summary small {
  min-width: 0;
  overflow: hidden;
  color: #607080;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-action-summary-allowed {
  border-left-color: #22a06b;
}

.permission-action-summary-review {
  border-left-color: #f59e0b;
  background: #fffdf6;
}

.permission-action-summary-denied,
.permission-action-summary-disabled {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.permission-status-pending {
  color: #8a5a00;
  background: #fff8df;
}

.permission-status-active {
  color: #1f6f43;
  background: #e9f7ef;
}

.permission-status-disabled {
  color: #9b1c1c;
  background: #ffe8e8;
}

/* codex-permission-manager-layout-20260617:start */
.permission-auth-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.permission-auth-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d6e0ea;
  background: #ffffff;
}

.permission-auth-strip span,
.permission-section-title span {
  color: #667585;
  font-size: 12px;
}

.permission-auth-strip strong {
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.permission-dept-sidebar,
.permission-position-sidebar,
.permission-detail-panel {
  border: 1px solid #d6e0ea;
  background: #ffffff;
}

.permission-dept-sidebar,
.permission-position-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  background: #f8fafc;
}

.permission-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e5ebf0;
}

.permission-section-title.compact {
  display: grid;
  gap: 3px;
  padding: 0;
  border-bottom: 0;
}

.permission-section-title strong {
  color: #0f172a;
  font-size: 14px;
}

.permission-section-title em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.permission-dept-list {
  display: grid;
  gap: 6px;
}

.permission-department-group {
  display: grid;
  gap: 0;
  border: 1px solid #c8d8ec;
  background: #ffffff;
}

.permission-department-group.active {
  border-color: #2563eb;
  background: #f5f9ff;
  box-shadow: inset 5px 0 0 #2563eb;
}

.permission-dept-item {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 62px;
  padding: 12px 10px;
  border: 1px solid #d8e2ea;
  background: #f8fafc;
  color: #102033;
  text-align: left;
}

.permission-dept-item.active {
  border-color: #2563eb;
  background: #eef5ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.permission-dept-item span {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-dept-item strong,
.permission-dept-item small {
  color: #667585;
  font-size: 11px;
  font-weight: 700;
}

.permission-dept-item em {
  justify-self: end;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-style: normal;
}

.permission-main-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.permission-detail-panel {
  display: grid;
  gap: 0;
}

.permission-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5ebf0;
  background: #fbfcfd;
}

.permission-detail-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.permission-detail-head span {
  color: #667585;
  font-size: 12px;
}

.permission-detail-head strong {
  color: #0f172a;
  font-size: 18px;
}

.permission-detail-head mark {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.permission-detail-grid,
.permission-role-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.permission-detail-actions,
.permission-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-detail-actions {
  padding: 0;
}

.permission-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.permission-summary-card {
  display: grid;
  gap: 8px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid #d6e0ea;
  background: #ffffff;
}

.permission-summary-card span {
  color: #667585;
  font-size: 12px;
}

.permission-summary-card strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-detail-actions button,
.permission-row-actions button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dbe3e8;
  background: #f8fafc;
  color: #25313b;
  font-size: 12px;
}

.permission-detail-actions button:disabled,
.permission-row-actions button:disabled {
  color: #9aa7b2;
  cursor: not-allowed;
}

.permission-status-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 64px;
  min-width: 64px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.permission-status-switch-label {
  position: absolute;
  top: 50%;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.permission-status-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transition: transform 0.16s ease;
}

.permission-status-switch.is-on {
  border-color: #0a6ed1;
  background: #0a6ed1;
}

.permission-status-switch.is-on .permission-status-switch-label {
  left: 9px;
  color: #ffffff;
}

.permission-status-switch.is-on .permission-status-switch-thumb {
  transform: translateX(38px);
}

.permission-status-switch.is-off {
  border-color: #cbd5e1;
  background: #cbd5e1;
}

.permission-status-switch.is-off .permission-status-switch-label {
  right: 8px;
  color: #334155;
}

.permission-status-switch.is-off .permission-status-switch-thumb {
  transform: translateX(0);
}

.permission-status-switch:hover {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14), 0 0 0 2px rgba(10, 110, 209, 0.12);
}

.permission-status-switch:focus-visible {
  outline: 2px solid #0a6ed1;
  outline-offset: 2px;
}

.permission-employee-table-wrap {
  overflow-x: auto;
  padding: 0 12px 12px;
}

.permission-employee-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.permission-employee-table th,
.permission-employee-table td {
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  color: #102033;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}

.permission-employee-table th {
  background: #eef4f7;
  color: #334155;
  font-weight: 800;
}

.permission-employee-table th:nth-child(1),
.permission-employee-table td:nth-child(1) {
  width: 110px;
}

.permission-employee-table th:nth-child(2),
.permission-employee-table td:nth-child(2) {
  width: 118px;
}

.permission-employee-table th:nth-child(3),
.permission-employee-table td:nth-child(3) {
  width: 96px;
}

.permission-employee-table th:nth-child(5),
.permission-employee-table td:nth-child(5) {
  width: 210px;
}

.permission-employee-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #d8e2ea;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
}

.permission-employee-status.is-active {
  border-color: #a7d8b8;
  background: #e8f7ee;
  color: #176b36;
}

.permission-employee-status.is-disabled {
  border-color: #d5dde7;
  background: #f1f5f9;
  color: #64748b;
}

.permission-employee-status.is-pending {
  border-color: #f4c979;
  background: #fff8e7;
  color: #8a4b00;
}

.permission-scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.permission-scope-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #d8e2ea;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
}

.permission-admin-zone {
  display: grid;
  gap: 5px;
  padding-bottom: 0;
  border-bottom: 0;
}

.permission-admin-card,
.permission-department-card,
.permission-position-item,
.permission-add-department,
.permission-add-position {
  width: 100%;
  border: 1px solid #d8e2ea;
  background: #f8fafc;
  color: #102033;
  text-align: left;
}

.permission-admin-card {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.permission-department-card {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 0;
  border: 0;
  background: #edf5ff;
}

.permission-department-group.active .permission-department-card {
  background: #dcecff;
  border-bottom: 1px solid #b9d1ee;
}

.permission-department-main {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px 10px 12px;
  border: 0;
  background: transparent;
  color: #102033;
  cursor: pointer;
  text-align: left;
}

.permission-department-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.permission-department-arrow {
  flex: 0 0 22px;
  color: #0f4fb7;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.permission-department-expand-panel {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 8px 11px 46px;
  border-top: 0;
  border-left: 0;
  background: #ffffff;
}

.permission-department-expand-panel::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #8da9cc;
}

.permission-department-position-list {
  display: grid;
  gap: 4px;
}

.permission-department-position {
  position: relative;
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
}

.permission-department-position::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 17px;
  width: 18px;
  height: 2px;
  background: #8da9cc;
}

.permission-position-main {
  position: relative;
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px 6px 18px;
  border: 1px solid #d6e1ef;
  background: #fbfdff;
  color: #102033;
  text-align: left;
  cursor: pointer;
}

.permission-position-main::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  transform: translateY(-50%);
}

.permission-department-position.active .permission-position-main,
.permission-position-main:hover {
  border-color: #2563eb;
  background: #eef5ff;
}

.permission-department-position.active .permission-position-main {
  box-shadow: inset 3px 0 0 #2563eb;
}

.permission-department-position.active .permission-position-main::before {
  background: #2563eb;
}

.permission-position-main span {
  min-width: 0;
  overflow: hidden;
  color: #1e2c3a;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-position-main em {
  flex: 0 0 auto;
  color: #526273;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  white-space: nowrap;
}

.permission-node-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.permission-node-actions button {
  min-width: 32px;
  min-height: 24px;
  padding: 0 6px;
  border: 1px solid #d7e0ea;
  background: #f8fafc;
  color: #536579;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.permission-node-actions button:hover {
  border-color: #9cb3cf;
  color: #174ea6;
}

.permission-admin-card.active,
.permission-position-item.active {
  border-color: #2563eb;
  background: #eef5ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.permission-admin-card span,
.permission-department-card strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-admin-card em,
.permission-department-main em,
.permission-position-item em {
  flex: 0 0 auto;
  color: #526273;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  white-space: nowrap;
}

.permission-position-list {
  display: grid;
  gap: 6px;
}

.permission-position-item {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  background: #ffffff;
}

.permission-position-item span {
  color: #1e2c3a;
  font-size: 13px;
  font-weight: 800;
}

.permission-position-empty {
  margin-left: 1px;
  padding: 6px 9px;
  border: 1px dashed #cfd8e3;
  color: #758395;
  font-size: 12px;
}

.permission-add-department,
.permission-add-position {
  min-height: 28px;
  padding: 5px 9px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.permission-add-position {
  margin-left: 0;
  width: 100%;
}

.permission-department-add-position {
  position: relative;
  min-height: 26px;
  padding: 5px 8px;
  border-style: dashed;
  border-color: #b7c9de;
  background: #f8fbff;
}

.permission-department-add-position::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 18px;
  height: 2px;
  background: #8da9cc;
}
/* codex-permission-manager-layout-20260617:end */

@media (max-width: 720px) {
  .permissions-toolbar,
  .permission-settings-head {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-auth-strip,
  .permission-workspace,
  .permission-detail-grid,
  .permission-role-rules,
  .permission-summary-grid {
    grid-template-columns: 1fr;
  }

  .permission-dept-sidebar,
  .permission-position-sidebar {
    position: static;
  }

  .permission-role-grid {
    grid-template-columns: 1fr;
  }

  .permission-operator-row {
    grid-template-columns: 22px 1fr;
  }

  .permission-operator-row button,
  .permission-operator-row small {
    grid-column: 2;
    justify-self: start;
  }

  .permission-matrix-row {
    grid-template-columns: 1fr;
  }

  .permission-action-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Employee feedback r723: one fixed workbench shell; admin uses a project-list
 * summary with an on-demand secondary detail dialog. */
.employee-feedback-shell {
  width: min(1560px, calc(100vw - 48px));
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
}

.employee-feedback-main.is-compose,
.employee-feedback-main.is-list { overflow: auto; }

.employee-feedback-compose {
  width: min(100%, 640px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 18px 22px 16px;
}

.employee-feedback-list-view:not(.is-admin) {
  width: min(100%, 720px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 18px 22px;
}

.employee-feedback-shell .employee-feedback-list-view.is-admin {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 14px 16px 18px;
}

.employee-feedback-admin-workspace { display: block; min-height: 0; margin-top: 0; }
.employee-feedback-admin-ledger-pane { min-height: 0; height: auto; }
.employee-feedback-admin-table-wrap { max-height: calc(100dvh - 286px); }
.employee-feedback-admin-table { min-width: 900px; }
.employee-feedback-admin-table .employee-feedback-admin-col-no { width: 58px; }
.employee-feedback-admin-table .employee-feedback-admin-col-status { width: 84px; }
.employee-feedback-admin-table .employee-feedback-admin-col-submitter { width: 130px; }
.employee-feedback-admin-table .employee-feedback-admin-col-recipient { width: 180px; }
.employee-feedback-admin-table .employee-feedback-admin-col-privacy { width: 108px; }
.employee-feedback-admin-table .employee-feedback-admin-col-action { width: 98px; }
.employee-feedback-admin-detail-pane { display: none; }

.employee-feedback-admin-detail-layer {
  position: fixed;
  z-index: 1202;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.employee-feedback-admin-detail-shield {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}

.employee-feedback-admin-detail-modal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 48px));
  height: min(820px, calc(100dvh - 48px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid #a9bfd9;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 20px 58px rgba(15, 23, 42, .3);
}

.employee-feedback-admin-detail-modal > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid #cbd8e8;
  background: #fff;
  color: #0f365f;
  font-size: 16px;
  font-weight: 700;
}

.employee-feedback-admin-detail-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #315677;
  font-size: 25px;
  line-height: 28px;
  cursor: pointer;
}

.employee-feedback-admin-detail-close:hover { background: #eef5ff; color: #0b66bc; }
.employee-feedback-admin-detail-body, .employee-feedback-admin-detail-modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; }
.employee-feedback-admin-detail-body > .employee-feedback-admin-record, .employee-feedback-admin-detail-modal-body > .employee-feedback-admin-record { margin: 0; border: 0; box-shadow: none; }
.employee-feedback-admin-detail-loading { padding: 44px 16px; color: #60728c; text-align: center; }
.employee-feedback-image-lightbox { z-index: 1203; overflow: hidden; }

@media (max-width: 780px) {
  .employee-feedback-shell {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    margin: 6px auto;
    border-radius: 10px;
  }
  .employee-feedback-compose,
  .employee-feedback-list-view:not(.is-admin) { width: 100%; padding: 14px; }
  .employee-feedback-admin-detail-layer { padding: 6px; }
  .employee-feedback-admin-detail-modal { width: 100%; height: calc(100dvh - 12px); border-radius: 10px; }
  .employee-feedback-admin-detail-body, .employee-feedback-admin-detail-modal-body { padding: 10px; }
}

.supplier-purchase-panel {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.supplier-purchase-board {
  padding: 18px;
  background: #ffffff;
}

.supplier-purchase-card {
  max-width: 1180px;
  min-height: 520px;
  padding: 4px 2px 18px;
  background: #ffffff;
  color: #283642;
}

.supplier-purchase-workspace {
  min-height: 520px;
  background: #fbfdff;
  border: 1px solid #c5d2df;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(15, 23, 42, 0.06);
}

.supplier-purchase-list-only-workspace {
  min-height: auto;
  border: 0;
  background: transparent;
}

.supplier-purchase-empty-workspace {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: #687580;
  text-align: center;
}

.supplier-purchase-empty-workspace strong {
  color: #26333f;
  font-size: 18px;
  font-weight: 900;
}

.supplier-purchase-empty-workspace span {
  max-width: 620px;
  line-height: 1.6;
  font-size: 13px;
}

.supplier-purchase-main-workspace {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px 18px 18px;
  background: #f2f6fb;
}

.supplier-purchase-main-workspace-a {
  border: 0;
  background: transparent;
  padding: 0 36px 18px;
}

.supplier-purchase-main-intro {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 2px 0 0;
}

.supplier-purchase-main-intro strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.supplier-purchase-main-intro span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.supplier-purchase-todo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.supplier-purchase-todo-card {
  position: relative;
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px 12px 18px;
  border: 1px solid #c7d5e3;
  border-left-width: 5px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.supplier-purchase-todo-card span {
  color: #596879;
  font-size: 13px;
  font-weight: 800;
}

.supplier-purchase-todo-card strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.supplier-purchase-todo-card em {
  color: #687789;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.supplier-purchase-todo-card:hover,
.supplier-purchase-quick-entry:hover,
.supplier-purchase-recent-row:hover {
  border-color: #8fb7e8;
  background: #f8fbff;
  box-shadow: 0 3px 8px rgba(31, 110, 212, 0.12);
}

.supplier-purchase-todo-red {
  border-left-color: #e11d2e;
}

.supplier-purchase-todo-amber {
  border-left-color: #b96914;
}

.supplier-purchase-todo-blue {
  border-left-color: #1f6ed4;
}

.supplier-purchase-todo-green {
  border-left-color: #138052;
}

.supplier-purchase-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.supplier-purchase-main-panel {
  min-height: 206px;
  padding: 16px;
  border: 1px solid #c7d5e3;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.supplier-purchase-main-workspace-a .supplier-purchase-main-panel {
  min-height: 226px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.supplier-purchase-main-panel h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.supplier-purchase-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid #cbd8e6;
}

.supplier-purchase-section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: #1f6ed4;
}

.supplier-purchase-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.supplier-purchase-home-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.supplier-purchase-home-entry {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  border: 1px solid #c7d5e3;
  border-left: 5px solid #1f6ed4;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

.supplier-purchase-home-entry-green {
  border-left-color: #138052;
}

.supplier-purchase-home-entry-amber {
  border-left-color: #b96914;
}

.supplier-purchase-home-entry-red {
  border-left-color: #e11d2e;
}

.supplier-purchase-home-entry-main,
.supplier-purchase-home-entry-side {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.supplier-purchase-home-entry-main {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 11px 12px;
  text-align: left;
}

.supplier-purchase-home-entry-main strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.supplier-purchase-home-entry-main span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.supplier-purchase-home-entry-side {
  display: grid;
  place-items: center;
  border-left: 1px solid #e2e8f0;
  color: #0f5fc8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.supplier-purchase-home-entry:hover {
  border-color: #8fb7e8;
  background: #f8fbff;
}

.supplier-purchase-home-entry:hover .supplier-purchase-home-entry-side {
  background: #eff6ff;
}

.inventory-menu-grid {
  grid-template-columns: minmax(0, 1fr);
}

.inventory-home-entry {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: stretch;
  min-width: 0;
}

.inventory-home-entry .supplier-purchase-home-entry-icon {
  display: grid;
  place-items: center;
  min-width: 0;
  color: #0f5fc8;
  font-size: 14px;
  font-weight: 900;
}

.inventory-home-entry .supplier-purchase-home-entry-main {
  min-width: 0;
}

.inventory-home-entry .supplier-purchase-home-entry-main strong,
.inventory-home-entry .supplier-purchase-home-entry-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.inventory-home-entry .supplier-purchase-home-entry-main small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.inventory-home-entry .supplier-purchase-home-entry-side {
  min-width: 52px;
  padding: 0 12px;
}

.inventory-admin-pending-note {
  margin-top: 14px;
  border: 1px solid #d7e0e8;
  background: #f8fafc;
}

.inventory-admin-pending-note > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px;
  color: #475569;
  cursor: pointer;
  list-style: none;
}

.inventory-admin-pending-note > summary::-webkit-details-marker {
  display: none;
}

.inventory-admin-pending-note > summary span {
  font-size: 13px;
  font-weight: 800;
}

.inventory-admin-pending-note > summary small {
  color: #94a3b8;
  font-size: 12px;
}

.inventory-admin-pending-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.inventory-admin-pending-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.inventory-admin-pending-row strong,
.inventory-admin-pending-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-admin-pending-row strong {
  color: #475569;
  font-size: 13px;
}

.inventory-admin-pending-row span {
  color: #94a3b8;
  font-size: 12px;
}

@media (max-width: 720px) {
  .inventory-home-entry {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .inventory-home-entry .supplier-purchase-home-entry-side {
    min-width: 48px;
    padding: 0 9px;
  }

  .inventory-admin-pending-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.supplier-purchase-quick-entry,
.supplier-purchase-recent-row {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  background: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.supplier-purchase-quick-entry strong,
.supplier-purchase-recent-row strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.supplier-purchase-quick-entry span,
.supplier-purchase-recent-row span {
  color: #667789;
  font-size: 12px;
  line-height: 1.35;
}

.supplier-purchase-recent-list {
  display: grid;
  gap: 8px;
}

.supplier-purchase-recent-list-a {
  gap: 9px;
}

.supplier-purchase-recent-row-a {
  min-height: 60px;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.supplier-purchase-recent-row-a strong,
.supplier-purchase-recent-row-a > span:not(.supplier-purchase-recent-row-status) {
  grid-column: 2;
}

.supplier-purchase-recent-row-status {
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: stretch;
  display: grid;
  place-items: center;
  min-height: 28px;
  border: 1px solid #f3cf8b;
  background: #fff7ed;
  color: #a65f00;
  font-size: 12px;
  font-weight: 900;
}

.supplier-purchase-main-risk {
  padding: 12px 14px;
  border: 1px solid #e2c36f;
  background: #fff8df;
  color: #755517;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.transfer-home-flat-workspace {
  min-height: 520px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 0 40px 18px;
  background: transparent;
}

.transfer-home-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  background: transparent;
}

.transfer-home-status-item {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid #d8e2ed;
  border-top: 3px solid transparent;
  background: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.transfer-home-status-item:first-child {
  border-left: 1px solid #d8e2ed;
}

.transfer-home-status-item:hover,
.transfer-home-action-row:hover {
  background: #f4f8fd;
}

.transfer-home-status-label {
  color: #5d6b7c;
  font-size: 13px;
  font-weight: 800;
}

.transfer-home-status-item strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.transfer-home-status-item em {
  color: #687789;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.transfer-home-status-blue {
  border-top-color: #1f6ed4;
}

.transfer-home-status-green {
  border-top-color: #138052;
}

.transfer-home-status-amber {
  border-top-color: #b96914;
}

.transfer-home-status-red {
  border-top-color: #d42131;
}

.transfer-home-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
}

.transfer-home-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.transfer-home-section h3 {
  margin: 0;
  padding: 0 0 8px;
  border-bottom: 1px solid #d7e0ea;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.transfer-home-action-list {
  display: grid;
  gap: 10px;
}

.transfer-home-action-row {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dde7f1;
  border-left: 4px solid #d3dfeb;
  background: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.transfer-home-action-row strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.transfer-home-action-row span {
  color: #667789;
  font-size: 12px;
  line-height: 1.35;
}

.transfer-home-action-primary strong::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border: 1px solid #1f6ed4;
  color: #1f6ed4;
  font-size: 13px;
  line-height: 1;
}

.transfer-home-action-primary {
  border-left-color: #1f6ed4;
}

.transfer-home-note {
  padding: 10px 12px;
  border-left: 4px solid #d79a1e;
  background: #fff8df;
  color: #755517;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.transfer-panel.transfer-panel-home {
  border: 0;
  background: transparent;
}

.transfer-panel.transfer-panel-home .transfer-list {
  padding: 0;
  background: transparent;
}

.dispatch-workspace {
  min-height: 520px;
  background: #ffffff;
  border: 1px solid #d8e0e8;
}

.dispatch-main-workspace {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px 18px 18px;
  background: #f6f8fb;
}

.dispatch-todo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-todo-card {
  position: relative;
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px 12px 18px;
  border: 1px solid #d6e0ea;
  border-left-width: 5px;
  background: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.dispatch-todo-card span {
  color: #596879;
  font-size: 13px;
  font-weight: 800;
}

.dispatch-todo-card strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.dispatch-todo-card em {
  color: #687789;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.dispatch-todo-card:hover,
.dispatch-quick-entry:hover,
.dispatch-recent-row:hover {
  border-color: #8fb7e8;
  background: #f8fbff;
}

.dispatch-todo-red {
  border-left-color: #e11d2e;
}

.dispatch-todo-amber {
  border-left-color: #b96914;
}

.dispatch-todo-orange {
  border-left-color: #c2410c;
}

.dispatch-todo-blue {
  border-left-color: #1f6ed4;
}

.dispatch-todo-green {
  border-left-color: #138052;
}

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

.dispatch-main-panel {
  min-height: 206px;
  padding: 16px;
  border: 1px solid #d6e0ea;
  background: #ffffff;
}

.dispatch-main-panel h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

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

.dispatch-quick-entry,
.dispatch-recent-row {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  background: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.dispatch-quick-entry strong,
.dispatch-recent-row strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.dispatch-quick-entry span,
.dispatch-recent-row span {
  color: #667789;
  font-size: 12px;
  line-height: 1.35;
}

.dispatch-recent-list {
  display: grid;
  gap: 8px;
}

.dispatch-main-risk {
  padding: 12px 14px;
  border: 1px solid #e2c36f;
  background: #fff8df;
  color: #755517;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.supplier-purchase-workspace-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #cbd8e6;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.supplier-purchase-workspace-head strong {
  color: #202d38;
  font-size: 18px;
  font-weight: 900;
}

.supplier-purchase-workspace-head span {
  color: #7a8793;
  font-size: 13px;
}

.supplier-purchase-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  border: 1px solid #ccd8e4;
  background: #ffffff;
}

.supplier-purchase-mode-switch button {
  min-width: 52px;
  height: 30px;
  border: 0;
  border-left: 1px solid #e1e8ef;
  background: #ffffff;
  color: #233241;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.supplier-purchase-mode-switch button:first-child {
  border-left: 0;
}

.supplier-purchase-mode-switch button.active {
  background: #1f6ed4;
  color: #ffffff;
}

.supplier-purchase-query-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.supplier-purchase-query-panel div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #cbd8e6;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.supplier-purchase-query-panel span {
  color: #7a8793;
  font-size: 12px;
}

.supplier-purchase-query-panel strong {
  color: #26333f;
  font-size: 16px;
}

.supplier-purchase-list-scaffold {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.standard-list-shared-scaffold[data-standard-list-scaffold="ordinary-v2"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.standard-list-shared-scaffold[data-standard-list-scaffold="ordinary-v2"] > .supplier-purchase-list-table-wrap,
.standard-list-shared-scaffold[data-standard-list-scaffold="ordinary-v2"] > .supplier-purchase-list-toolbar-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.supplier-purchase-list-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid #cbd8e6;
  border-bottom: 0;
  background: #f8fbff;
}

.supplier-purchase-list-title {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.supplier-purchase-list-toolbar strong {
  color: #1f2e3b;
  font-size: 14px;
  font-weight: 900;
}

.supplier-purchase-list-toolbar span {
  color: #667585;
  font-size: 12px;
}

.supplier-purchase-table-search {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #cbd8e6;
  border-bottom: 0;
  background: #f8fbff;
}

.supplier-purchase-query-wrap {
  flex-basis: 220px;
  min-width: 210px;
  max-width: 230px;
}

.supplier-purchase-clear-search {
  height: 34px;
  min-width: 52px;
  white-space: nowrap;
}

.supplier-purchase-apply-search {
  height: 34px;
  min-width: 54px;
  padding: 0 14px;
  white-space: nowrap;
}

.supplier-purchase-query-wrap .clearable-control-button {
  top: -5px;
  right: -2px !important;
  width: 16px;
  height: 16px;
  border: 2px solid #000000;
  background: #ffffff;
  color: #000000;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 10px;
  text-shadow: 0 0 0 #000000;
}

.supplier-purchase-list-table-wrap {
  width: 100%;
  max-height: min(68vh, 690px);
  overflow: auto;
  scrollbar-gutter: stable;
  border: 1px solid #c2cfdd;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}

.supplier-purchase-list-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.supplier-purchase-list-table th,
.supplier-purchase-list-table td {
  position: relative;
  height: 47px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  text-align: center;
  font-size: var(--ledger-font-size);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.supplier-purchase-list-table th {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 58px;
  padding: 3px 4px;
  background: #e8eef5;
  color: #102033;
  font-size: 12px;
  font-weight: 900;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.supplier-purchase-list-table th .ledger-head-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  line-height: 1.12;
  white-space: normal;
  word-break: break-word;
}

.supplier-purchase-filter-input {
  display: block;
  width: 100%;
  height: 24px;
  min-width: 0;
  margin-top: 3px;
  border: 1px solid #c9d5e2;
  background: #ffffff;
  color: #142136;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.supplier-purchase-report-filter-input:disabled {
  opacity: 1;
  color: #9aa6b2;
  background: #ffffff;
  cursor: default;
}

.supplier-purchase-filter-input:focus {
  border-color: var(--focus);
  outline: 2px solid rgba(45, 114, 232, 0.2);
}

.supplier-purchase-row-index {
  text-align: center !important;
  color: #526274;
  font-weight: 700;
}

.supplier-purchase-list-table th.supplier-purchase-row-index,
.supplier-purchase-list-table td.supplier-purchase-row-index {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #eef3f7;
}

.supplier-purchase-list-table th.supplier-purchase-row-index {
  z-index: 3;
}

.supplier-purchase-list-table th.supplier-purchase-col-select,
.supplier-purchase-list-table td.supplier-purchase-col-select {
  position: sticky;
  left: 0;
  z-index: 5;
  width: var(--supplier-purchase-list-select-width, 32px);
  min-width: var(--supplier-purchase-list-select-width, 32px);
  max-width: var(--supplier-purchase-list-select-width, 32px);
  padding: 0 !important;
  text-align: center !important;
  background: #eef3f7;
}

.supplier-purchase-list-table th.supplier-purchase-col-sequence,
.supplier-purchase-list-table td.supplier-purchase-col-sequence {
  position: sticky;
  left: var(--supplier-purchase-list-select-width, 32px);
  z-index: 4;
  background: #eef3f7;
}

.supplier-purchase-list-table th.supplier-purchase-col-select,
.supplier-purchase-list-table th.supplier-purchase-col-sequence {
  z-index: 11;
  background: #f4e6a3 !important;
}

.supplier-purchase-list-row:hover td.supplier-purchase-col-select,
.supplier-purchase-list-row:hover td.supplier-purchase-col-sequence,
.supplier-purchase-list-row.is-expanded td.supplier-purchase-col-select,
.supplier-purchase-list-row.is-expanded td.supplier-purchase-col-sequence {
  background: #f8fbff;
}

.supplier-purchase-list-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  margin: 0;
  cursor: pointer;
}

.supplier-purchase-list-select input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #0f65c8;
  cursor: pointer;
}

.supplier-purchase-list-select input:disabled {
  cursor: default;
  opacity: 0.55;
}

.supplier-purchase-list-select-all.is-partial::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #0f65c8;
  pointer-events: none;
}

.supplier-purchase-list-table th.supplier-purchase-col-action,
.supplier-purchase-list-table td.supplier-purchase-col-action {
  position: relative;
  right: auto;
  z-index: 1;
  background: #ffffff;
}

.supplier-purchase-list-table th.supplier-purchase-col-action {
  z-index: 8;
  background: #e8eef5;
}

.supplier-purchase-list-table td.supplier-purchase-col-billNo,
.supplier-purchase-list-table td.supplier-purchase-col-counterparty,
.supplier-purchase-list-table td.supplier-purchase-col-warehouse,
.supplier-purchase-list-table td.supplier-purchase-col-remark {
  text-align: left;
}

.supplier-purchase-list-table td.supplier-purchase-col-remark,
.supplier-purchase-list-table td.supplier-purchase-col-remark .supplier-purchase-list-remark {
  font-weight: 400 !important;
}

.supplier-purchase-list-remark {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-purchase-report-table {
  min-width: 1120px;
}

.supplier-purchase-report-table td {
  text-align: left;
}

.supplier-purchase-report-table td.business-list-action-cell {
  text-align: center;
}

.supplier-purchase-list-table td.supplier-purchase-col-qty,
.supplier-purchase-list-table td.supplier-purchase-col-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.supplier-purchase-list-table td.supplier-purchase-col-qty {
  font-weight: 700;
  color: #102033;
}

.supplier-purchase-list-table td.supplier-purchase-col-amount {
  font-weight: 400;
  color: #102033;
}

.supplier-purchase-list-table th.supplier-purchase-col-imageCount,
.supplier-purchase-list-table td.supplier-purchase-col-imageCount {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.supplier-purchase-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 18px;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #526274;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  cursor: default;
}

.supplier-purchase-status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.88;
}

.supplier-purchase-status-pill.ok {
  color: #0f6d33;
}

.supplier-purchase-status-pill.posted {
  color: #334155;
}

.supplier-purchase-status-pill.warn {
  color: #a65f00;
}

.supplier-purchase-status-pill.muted {
  color: #6b7785;
}

.supplier-purchase-status-pill.draft {
  color: #1d5ea8;
}

.supplier-purchase-status-pill.danger {
  color: #b4232f;
}

.supplier-purchase-list-muted {
  color: #71808f;
  font-size: 12px;
}

.supplier-purchase-list-error {
  color: #c2182b;
  font-weight: 800;
}

.supplier-purchase-list-row,
.business-list-row {
  cursor: pointer;
}

.supplier-purchase-list-row:nth-child(even) td {
  background: #fbfcfd;
}

.supplier-purchase-list-row:hover td,
.supplier-purchase-list-row.is-expanded td,
.business-list-row:hover td,
.business-list-row.is-expanded td {
  background: #f8fbff;
}

.supplier-purchase-list-row:hover td.supplier-purchase-col-action,
.supplier-purchase-list-row.is-expanded td.supplier-purchase-col-action {
  background: #f8fbff;
}

.supplier-purchase-list-detail-btn {
  min-height: 24px;
  min-width: 72px;
  padding: 2px 9px;
  border: 1px solid #9fc4f4;
  border-radius: 4px;
  background: #f3f8ff;
  color: #0f4c9d;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.supplier-purchase-list-detail-btn:hover,
.supplier-purchase-list-detail-btn:focus {
  border-color: #6c9fe6;
  background: #e8f1ff;
  outline: 2px solid rgba(45, 114, 232, 0.18);
  outline-offset: 1px;
}

.supplier-purchase-list-static-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 22px;
  padding: 1px 8px;
  border: 1px solid #dbe5ef;
  border-radius: 4px;
  background: #f7fafc;
  color: #526274;
  font-size: 12px;
}

.supplier-purchase-list-detail-row > td,
.business-list-detail-row > td {
  padding: 0;
  background: #fbfcfe;
}

.supplier-purchase-recent-bills {
  margin-top: 12px;
  border: 0;
  background: transparent;
}

.supplier-purchase-recent-bills-head {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 0;
  background: transparent;
}

.supplier-purchase-recent-bills-head strong {
  color: #1f2e3b;
  font-size: 14px;
  font-weight: 900;
}

.supplier-purchase-recent-bills-head span {
  color: #667585;
  font-size: 12px;
  text-align: right;
}

.supplier-purchase-recent-bills-table {
  min-width: 1584px;
}

.business-clickable-list {
  margin: 0 18px 16px;
  border: 1px solid #c5d2df;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}

.business-clickable-list-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid #cbd8e6;
  background: #f8fbff;
}

.business-clickable-list-head strong {
  color: #1f2e3b;
  font-size: 14px;
  font-weight: 900;
}

.business-clickable-list-head span {
  color: #667585;
  font-size: 12px;
}

.business-clickable-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.business-clickable-table th,
.business-clickable-table td {
  height: 36px;
  padding: 7px 10px;
  border: 1px solid #dbe5ef;
  text-align: left;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.business-clickable-table th {
  background: #173a57;
  color: #ffffff;
  font-weight: 900;
}

.business-list-action-cell {
  color: #0f4c9d;
  font-weight: 900;
}

.business-detail-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f1f5fa;
  border-top: 1px solid #cbd8e6;
}

.business-detail-section {
  border: 1px solid #c5d2df;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.business-detail-section h3 {
  margin: 0 0 8px;
  color: #1e2f41;
  font-size: 14px;
}

.business-detail-section-title {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.business-detail-section-title h3 {
  margin: 0;
}

.business-detail-section-title span {
  color: #4b6380;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.business-detail-empty {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c4cfda;
  background: #ffffff;
  color: #69788a;
  font-size: 12px;
  font-weight: 700;
}

.business-detail-remark-layout {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 38px;
  border: 1px solid #d9e3ee;
  background: #fbfdff;
}

.business-detail-remark-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-right: 1px solid #d9e3ee;
  color: #d11f3a;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.business-detail-remark-text {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .business-detail-section-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .business-detail-section-title span {
    white-space: normal;
  }

  .business-detail-remark-layout {
    grid-template-columns: 1fr;
  }

  .business-detail-remark-label {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #d9e3ee;
  }
}

.business-detail-note {
  margin: 0 0 8px;
  color: #667585;
  font-size: 12px;
  line-height: 1.5;
}

.business-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.business-detail-field {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 8px;
  border: 1px solid #cfdae6;
  background: #f8fbff;
}

.business-detail-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.business-detail-field strong {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.supplier-purchase-detail-lines-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #cbd8e6;
  background: #ffffff;
}

.supplier-purchase-detail-lines-table {
  width: max-content;
  min-width: 0;
  max-width: none;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.supplier-purchase-detail-lines-table th,
.supplier-purchase-detail-lines-table td {
  height: 30px;
  padding: 4px 6px;
  border: 1px solid #d9e3ee;
  color: #111827;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.supplier-purchase-detail-lines-table th {
  background: #eef4fb;
  font-weight: 900;
  white-space: nowrap;
}

.supplier-purchase-detail-seq {
  width: 48px;
  color: #244969;
}

.supplier-purchase-detail-code {
  width: 128px;
}

.supplier-purchase-detail-name {
  width: 190px;
  min-width: 190px;
  text-align: left;
}

.supplier-purchase-detail-matrix {
  width: 58px;
  min-width: 58px;
}

.supplier-purchase-detail-note {
  width: 180px;
  min-width: 180px;
  text-align: left;
}

.supplier-purchase-detail-qty {
  font-weight: 900;
}

.supplier-purchase-detail-number,
.supplier-purchase-detail-amount {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.supplier-purchase-detail-total-row td {
  height: 32px;
  background: #e7eef6;
  border-top: 2px solid #8da4bd;
  font-weight: 900;
}

.supplier-purchase-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-purchase-detail-fee-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.supplier-purchase-detail-section-lines {
  margin-top: 10px;
}

.supplier-purchase-detail-fee-section {
  margin-top: 10px;
}

.supplier-purchase-detail-empty {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd8e6;
  background: #ffffff;
  color: #526274;
  font-size: 13px;
}

.business-detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.business-detail-image-slot {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #d8e1ea;
  background: #fbfcfd;
}

.business-detail-image-slot > span {
  color: #304156;
  font-size: 13px;
  font-weight: 800;
}

.business-detail-image-slot input {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f4c9d;
  font-size: 12px;
  outline: 0;
}

.business-detail-image-slot input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(45, 114, 232, 0.14);
}

.business-detail-image-value {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f4c9d;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.business-detail-image-preview {
  display: block;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.business-detail-image-empty {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #b8c4d2;
  color: #7b8794;
  font-size: 12px;
  background: #ffffff;
}

.supplier-purchase-report-note {
  margin: 12px;
}

.supplier-purchase-workspace-note {
  margin: 0 18px 18px;
  padding: 12px;
  color: #5d6a76;
  background: #fff8df;
  border: 1px solid #f1dfaa;
  line-height: 1.6;
}

.generic-business-workspace {
  padding-bottom: 18px;
}

.generic-business-head {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #e7edf3;
  background: #ffffff;
}

.generic-business-head div {
  display: grid;
  gap: 6px;
}

.generic-business-head span {
  color: #66727f;
  font-size: 13px;
}

.generic-business-head strong {
  color: #17212f;
  font-size: 22px;
  line-height: 1.25;
}

.generic-business-head em {
  min-width: 74px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  color: #ffffff;
  background: #2f6ecb;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.generic-business-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.generic-business-action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 18px 16px;
  padding: 12px;
  border: 1px solid #d8e0e8;
  background: #f7faf8;
}

.generic-business-action-row span {
  color: #596775;
  font-size: 13px;
  line-height: 1.55;
}

.context-quick-add-panel {
  margin: 0 18px 16px;
  padding: 10px 12px;
  border: 1px solid #d7e3f2;
  background: #f8fbff;
}

.context-quick-add-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.context-quick-add-head strong {
  color: #123f78;
  font-size: 14px;
  font-weight: 900;
}

.context-quick-add-head span {
  color: #6b7785;
  font-size: 12px;
  line-height: 1.4;
}

.context-quick-add-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.context-quick-add-row {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.context-quick-add-row > span {
  color: #26384d;
  font-size: 12px;
  font-weight: 800;
}

.context-quick-add-row > em {
  min-height: 16px;
  color: #5c6f83;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-quick-add-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
}

.context-quick-add-control-with-type {
  grid-template-columns: minmax(0, 1fr) 96px 44px;
}

.context-quick-add-control-with-price {
  grid-template-columns: minmax(0, 1fr) 72px 44px;
}

.context-quick-add-control input {
  width: 100%;
  height: 28px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #cbd6e2;
  border-right: 0;
  background: #ffffff;
  font-size: 12px;
}

.context-quick-add-control select {
  width: 100%;
  height: 28px;
  min-width: 0;
  border: 1px solid #cbd6e2;
  border-left: 0;
  border-right: 0;
  background: #ffffff;
  color: #24384d;
  font-size: 12px;
}

.context-quick-add-control input[data-context-supplier-type] {
  border-left: 0;
  border-right: 0;
}

.context-quick-add-control button {
  height: 28px;
  border: 1px solid #cbd6e2;
  border-left: 0;
  background: #f8fbff;
  color: #0f5fb8;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.context-quick-add-control input:focus,
.context-quick-add-control select:focus,
.context-quick-add-control button:focus {
  border-color: #4aa3ff;
  box-shadow: 0 0 0 2px rgba(74, 163, 255, 0.14);
  outline: 0;
}

.supplier-reference-workspace {
  padding: 14px 18px 18px;
}

.supplier-reference-card {
  border: 1px solid #c5d2df;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.supplier-reference-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid #cbd8e6;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.supplier-reference-head > div {
  display: grid;
  gap: 4px;
}

.supplier-reference-head strong {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.supplier-reference-head span {
  color: #5b6877;
  font-size: 12px;
  line-height: 1.45;
}

.supplier-reference-body {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) 150px minmax(180px, 0.8fr) minmax(180px, 0.8fr);
  gap: 12px;
  padding: 14px;
}

.supplier-reference-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.supplier-reference-field span {
  color: #26384d;
  font-size: 12px;
  font-weight: 800;
}

.supplier-reference-field em {
  margin-right: 3px;
  color: #ff3850;
  font-style: normal;
}

.supplier-reference-field input,
.supplier-reference-field select {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid #cbd6e2;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
}

.supplier-reference-field input {
  padding: 0 9px;
}

.supplier-reference-field select {
  padding: 0 7px;
}

.supplier-reference-field input:focus,
.supplier-reference-field select:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.12);
  outline: 0;
}

.supplier-reference-field-remark {
  grid-column: 1 / -1;
}

.supplier-reference-actions {
  grid-column: 1 / -1;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.supplier-reference-actions span {
  margin-right: auto;
  color: #66788a;
  font-size: 12px;
}

.supplier-reference-actions button {
  min-width: 90px;
  height: 30px;
}

.supplier-reference-recent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #66788a;
  font-size: 12px;
}

.supplier-reference-recent button {
  height: 26px;
  border: 1px solid #d6e0ea;
  background: #ffffff;
  color: #0f4f93;
  font-weight: 800;
}

.generic-business-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 18px 16px;
}

.generic-business-steps div {
  min-height: 70px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
}

.generic-business-steps strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #1d7b65;
  font-size: 13px;
}

.generic-business-steps span {
  color: #26333f;
  font-size: 13px;
  font-weight: 800;
}

.generic-business-risk {
  border-color: #f0c774;
}

.supplier-purchase-inline-form {
  border: 0;
}

.supplier-purchase-inline-form [data-purchase-form-close],
.supplier-purchase-inline-form .supplier-purchase-form-close {
  display: none;
}

.supplier-purchase-inline-form .supplier-purchase-doc,
.supplier-purchase-inline-form .supplier-purchase-form-shell {
  min-height: 640px;
}

.supplier-purchase-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: #ff4158;
  font-size: 16px;
  font-weight: 700;
}

.supplier-purchase-title-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #ff4158;
  font-size: 17px;
  line-height: 1;
}

.supplier-purchase-flow-map {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  min-height: auto;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5ebf1;
  border-radius: 12px;
}

.supplier-flow-core {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.supplier-flow-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
}

.supplier-flow-stage-label,
.supplier-flow-support-title {
  color: #526273;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.supplier-flow-stage-primary .supplier-flow-stage-label {
  color: #ca3144;
}

.supplier-flow-arrow {
  display: none;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #98a5b3;
  background: #ffffff;
  border: 1px solid #e1e7ee;
  border-radius: 999px;
  font-size: 14px;
}

.supplier-flow-support {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
}

.supplier-flow-support-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.supplier-flow-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.supplier-flow-node {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #eef1f3;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18, 32, 48, 0.08);
}

.supplier-flow-compact {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 94px;
  padding: 10px;
  border-color: #e0e7ef;
  box-shadow: none;
}

.supplier-flow-mini {
  min-height: 74px;
}

.supplier-flow-primary {
  background: #ff4158;
  border-color: #ff4158;
  color: #ffffff;
}

.supplier-flow-node.active {
  border-color: #ff5a6a;
  box-shadow: 0 0 0 2px rgba(255, 90, 106, 0.16);
}

.supplier-flow-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.supplier-flow-compact .supplier-flow-icon {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.supplier-flow-green .supplier-flow-icon {
  background: #37d39f;
}

.supplier-flow-orange .supplier-flow-icon {
  background: #ff8a3d;
}

.supplier-flow-red .supplier-flow-icon,
.supplier-flow-primary .supplier-flow-icon {
  background: #ffffff;
  color: #ff4158;
}

.supplier-flow-blue .supplier-flow-icon {
  background: #4f90f8;
}

.supplier-flow-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.supplier-flow-heading strong {
  color: inherit;
  font-size: 15px;
}

.supplier-flow-compact .supplier-flow-heading strong {
  font-size: 14px;
}

.supplier-flow-heading span {
  flex: 0 0 auto;
  color: #7d8a94;
  font-size: 12px;
}

.supplier-flow-primary .supplier-flow-heading span {
  color: rgba(255, 255, 255, 0.82);
}

.supplier-flow-main p {
  margin: 0;
  color: #66737d;
  font-size: 12px;
  line-height: 1.45;
}

.supplier-flow-compact .supplier-flow-main p {
  display: none;
}

.supplier-flow-primary p {
  color: rgba(255, 255, 255, 0.88);
}

.supplier-flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #52616c;
  font-size: 12px;
}

.supplier-flow-compact .supplier-flow-actions {
  margin-top: 6px;
}

.supplier-flow-mini .supplier-flow-actions {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.supplier-flow-primary .supplier-flow-actions {
  color: rgba(255, 255, 255, 0.9);
}

.supplier-flow-link {
  display: none;
}

.supplier-purchase-field-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.supplier-purchase-field-group {
  padding: 12px;
  background: #f7f9fb;
  border: 1px solid #e6ebef;
  border-radius: 8px;
}

.supplier-purchase-field-group h3 {
  margin: 0 0 6px;
  color: #26333f;
  font-size: 14px;
}

.supplier-purchase-field-group p {
  margin: 0 0 10px;
  color: #687580;
  font-size: 12px;
  line-height: 1.4;
}

.supplier-purchase-field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supplier-purchase-field-tags span {
  padding: 3px 7px;
  color: #44515c;
  background: #ffffff;
  border: 1px solid #dce4ea;
  border-radius: 6px;
  font-size: 12px;
}

.supplier-purchase-governance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 20px;
}

.supplier-purchase-governance-card {
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e3eaf0;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(24, 38, 52, 0.05);
}

.supplier-purchase-governance-card h3 {
  margin: 0 0 6px;
  color: #24313b;
  font-size: 14px;
}

.supplier-purchase-governance-card p {
  margin: 0 0 10px;
  color: #63717d;
  font-size: 12px;
  line-height: 1.45;
}

.supplier-purchase-status-rail {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.supplier-purchase-status-rail span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #3f4d58;
  font-size: 12px;
}

.supplier-purchase-status-rail i {
  flex: 0 0 auto;
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #eef4f8;
  color: #526b7d;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.supplier-purchase-governance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supplier-purchase-governance-tags em {
  padding: 3px 7px;
  color: #755517;
  background: #fff8df;
  border: 1px solid #f0dfad;
  border-radius: 6px;
  font-style: normal;
  font-size: 12px;
}

.supplier-purchase-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr);
  gap: 16px;
  align-items: start;
}

.supplier-purchase-section h3 {
  margin: 0 0 14px;
  color: #4f5b64;
  font-size: 15px;
  font-weight: 500;
}

.supplier-purchase-entry-list {
  display: grid;
  gap: 10px;
}

.supplier-purchase-entry {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px auto;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  background: #f5f6f7;
  border: 1px solid #f0f1f2;
}

.supplier-purchase-entry.active {
  background: #fff7f8;
  border-color: #ffb3bd;
}

.supplier-purchase-entry-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.supplier-purchase-entry-main strong {
  color: #1f2d38;
  font-size: 14px;
  font-weight: 700;
}

.supplier-purchase-entry-main span {
  color: #88949d;
  font-size: 12px;
}

.supplier-purchase-divider {
  width: 1px;
  height: 18px;
  background: #d5dadd;
}

.supplier-purchase-add {
  border: 0;
  background: transparent;
  color: #ff4158;
  font-size: 14px;
  font-weight: 700;
  cursor: not-allowed;
}

.supplier-flow-primary .supplier-purchase-add {
  color: #ffffff;
}

.supplier-purchase-add.is-live {
  cursor: pointer;
}

.supplier-purchase-add.is-live:hover {
  text-decoration: underline;
}

.supplier-purchase-add:disabled {
  opacity: 0.8;
}

.supplier-purchase-status {
  color: #9aa4ab;
  font-size: 12px;
}

.supplier-purchase-footnote {
  margin-top: 18px;
  padding: 10px 12px;
  background: #fff8df;
  border: 1px solid #f1dfaa;
  color: #7a5a12;
  font-size: 12px;
  line-height: 1.45;
}

.production-craft-panel {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.production-craft-board {
  padding: 18px;
  background: #ffffff;
}

.production-craft-card {
  max-width: 1180px;
  min-height: 0;
  padding: 0 0 18px;
  color: #263440;
  background: #ffffff;
}

.production-craft-toolbar {
  display: grid;
  grid-template-columns: 180px 160px minmax(260px, 1fr);
  gap: 10px;
  max-width: 960px;
  margin-bottom: 12px;
}

.production-craft-toolbar label,
.production-craft-form-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.production-craft-toolbar span,
.production-craft-form-field span {
  color: #657480;
  font-size: 12px;
}

.production-craft-toolbar input,
.production-craft-toolbar select,
.production-craft-form-field input,
.production-craft-form-field select,
.production-craft-form-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd9e2;
  border-radius: 4px;
  background: #ffffff;
  color: #22313b;
  font-size: 13px;
}

.production-craft-toolbar input,
.production-craft-toolbar select,
.production-craft-form-field input,
.production-craft-form-field select {
  height: 34px;
  padding: 0 9px;
}

.production-craft-form-field textarea {
  min-height: 76px;
  padding: 8px 9px;
  resize: vertical;
}

.production-craft-search {
  max-width: 340px;
}

.production-craft-table-wrap {
  max-width: 1240px;
  overflow-x: auto;
  border: 1px solid #dce5ec;
  border-radius: 6px;
  background: #ffffff;
}

.production-craft-list-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
}

.production-craft-list-table th,
.production-craft-list-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e6edf2;
  color: #33434d;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  word-break: break-word;
}

.production-craft-list-table th {
  color: #263640;
  background: #f6f9fb;
  font-weight: 700;
}

.production-craft-list-table tr:last-child td {
  border-bottom: 0;
}

.production-craft-list-table th:first-child,
.production-craft-list-table td:first-child {
  width: 48px;
  color: #1f6d55;
  font-weight: 800;
}

.production-craft-list-table th:nth-child(2),
.production-craft-list-table td:nth-child(2) {
  width: 110px;
}

.production-craft-list-table th:nth-child(3),
.production-craft-list-table td:nth-child(3) {
  width: 105px;
  font-weight: 700;
}

.production-craft-list-table th:nth-child(4),
.production-craft-list-table td:nth-child(4),
.production-craft-list-table th:nth-child(7),
.production-craft-list-table td:nth-child(7) {
  width: 120px;
}

.production-craft-list-table th:nth-child(5),
.production-craft-list-table td:nth-child(5),
.production-craft-list-table th:nth-child(6),
.production-craft-list-table td:nth-child(6),
.production-craft-list-table th:nth-child(8),
.production-craft-list-table td:nth-child(8) {
  width: 96px;
}

.production-craft-list-table th:nth-child(9),
.production-craft-list-table td:nth-child(9),
.production-craft-list-table th:nth-child(11),
.production-craft-list-table td:nth-child(11) {
  width: 68px;
}

.production-craft-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 8px;
  border: 1px solid #bfe6d7;
  border-radius: 6px;
  background: #edf8f4;
  color: #1f6d55;
  font-size: 12px;
  font-weight: 700;
}

.production-craft-form {
  width: 100%;
  max-width: none;
}

.production-craft-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.production-craft-form-field.is-wide {
  grid-column: span 2;
}

.production-craft-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.production-craft-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.production-craft-title-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: #2f7d67;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
}

.production-craft-title div {
  display: grid;
  gap: 3px;
}

.production-craft-title strong {
  color: #1f2d38;
  font-size: 16px;
}

.production-craft-title span {
  color: #687580;
  font-size: 12px;
}

.production-craft-flow {
  margin-bottom: 16px;
  padding: 12px;
  background: #f7faf9;
  border: 1px solid #dfece7;
  border-radius: 8px;
}

.production-craft-flow ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.production-craft-flow li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.production-craft-flow li > i {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  background: #2f7d67;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.production-craft-flow li div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-craft-flow strong {
  color: #24313b;
  font-size: 13px;
}

.production-craft-flow span {
  color: #5f6f78;
  font-size: 12px;
  line-height: 1.42;
}

.production-craft-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.production-craft-section-head strong {
  color: #22313b;
  font-size: 14px;
}

.production-craft-section-head span {
  color: #687580;
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.production-craft-template-grid,
.production-craft-field-layout,
.production-craft-governance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.production-craft-template,
.production-craft-field-group,
.production-craft-governance-card {
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e3eaf0;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(24, 38, 52, 0.05);
}

.production-craft-template-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.production-craft-template-head span {
  color: #6b7b83;
  font-size: 12px;
}

.production-craft-template-head strong,
.production-craft-field-group h3,
.production-craft-governance-card h3 {
  margin: 0;
  color: #24313b;
  font-size: 14px;
}

.production-craft-template dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.production-craft-template dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.production-craft-template dt {
  color: #8a969d;
  font-size: 12px;
}

.production-craft-template dd {
  margin: 0;
  color: #33434d;
  font-size: 12px;
  line-height: 1.4;
}

.production-craft-template-foot,
.production-craft-governance-tags,
.production-craft-field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.production-craft-template-foot {
  justify-content: space-between;
  margin-top: 10px;
}

.production-craft-template-foot em,
.production-craft-template-foot span,
.production-craft-governance-tags em,
.production-craft-field-tags span {
  padding: 3px 7px;
  border-radius: 6px;
  font-style: normal;
  font-size: 12px;
}

.production-craft-template-foot em,
.production-craft-field-tags span {
  color: #44515c;
  background: #f7f9fb;
  border: 1px solid #dce4ea;
}

.production-craft-template-foot span {
  color: #1f6d55;
  background: #ecf8f4;
  border: 1px solid #cce9de;
}

.production-craft-profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-craft-profile {
  border-color: #d8e5ed;
}

.production-craft-profile-links {
  justify-content: flex-start;
}

.production-craft-route {
  margin-bottom: 16px;
}

.production-craft-route-wrap {
  overflow-x: auto;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #ffffff;
}

.production-craft-route-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
}

.production-craft-route-table th,
.production-craft-route-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e6edf2;
  color: #33434d;
  font-size: 12px;
  line-height: 1.42;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.production-craft-route-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #263640;
  background: #f5f8fb;
  font-weight: 700;
}

.production-craft-route-table tr:last-child td {
  border-bottom: 0;
}

.production-craft-route-table th:first-child,
.production-craft-route-table td:first-child {
  width: 52px;
  color: #1f6d55;
  font-weight: 800;
}

.production-craft-linkage {
  margin-bottom: 16px;
}

.production-craft-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.production-craft-link-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #dfe8ee;
  border-radius: 8px;
  background: #fbfdfe;
}

.production-craft-link-card strong {
  color: #22313b;
  font-size: 13px;
}

.production-craft-link-card span,
.production-craft-link-card p {
  margin: 0;
  color: #63717d;
  font-size: 12px;
  line-height: 1.42;
}

.production-craft-link-card span {
  color: #2f6659;
  font-weight: 700;
}

.production-craft-field-group p,
.production-craft-governance-card p {
  margin: 6px 0 10px;
  color: #63717d;
  font-size: 12px;
  line-height: 1.45;
}

.production-craft-status-rail {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.production-craft-status-rail span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #3f4d58;
  font-size: 12px;
}

.production-craft-status-rail i {
  flex: 0 0 auto;
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #2f5d51;
  background: #eaf5f1;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.production-craft-governance-tags em {
  color: #235c4e;
  background: #edf8f4;
  border: 1px solid #cde8df;
}

.production-craft-footnote {
  padding: 10px 12px;
  color: #235c4e;
  background: #eef8f4;
  border: 1px solid #cde8df;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.production-craft-main-overview {
  width: 100%;
  min-width: 0;
}

.production-craft-in-production-workspace .production-craft-card,
.production-craft-board .production-craft-card,
.production-craft-add-overview .production-craft-card {
  max-width: none;
  width: 100%;
  padding: 0;
}

.production-craft-list {
  display: grid;
  gap: 0;
}

.production-craft-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #d6e0ec;
  border-bottom: 0;
  background: #ffffff;
}

.production-craft-metric-strip div {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 7px 10px;
  border-right: 1px solid #d6e0ec;
}

.production-craft-metric-strip div:last-child {
  border-right: 0;
}

.production-craft-metric-strip span {
  color: #586b82;
  font-size: 12px;
  line-height: 1.2;
}

.production-craft-metric-strip strong {
  color: #081c35;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.production-craft-list-tools {
  border: 1px solid #d6e0ec;
  border-bottom: 0;
}

.production-craft-list-tools select.production-main-search-input {
  min-width: 96px;
  padding-right: 20px;
}

.production-craft-table-wrap {
  width: 100%;
  max-width: none;
  max-height: min(62vh, 640px);
  min-height: 360px;
  border-radius: 0;
}

.production-craft-list-table {
  width: max-content;
  min-width: max(1860px, 100%);
}

.production-craft-list-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.production-craft-list-table td:nth-child(3),
.production-craft-list-table td:nth-child(6),
.production-craft-list-table td:nth-child(8) {
  color: #071a36;
  font-weight: 900;
}

.production-craft-list-table td:nth-child(5),
.production-craft-list-table td:nth-child(9),
.production-craft-list-table td:nth-child(12),
.production-craft-list-table td:nth-child(14) {
  font-size: 11px;
}

.production-craft-list-image-cell {
  min-width: 0;
  padding: 4px 6px;
}

.production-craft-list-image-list {
  grid-template-columns: repeat(auto-fill, 66px);
  max-height: 148px;
  min-width: 66px;
  padding: 0;
  overflow: auto;
}

.production-craft-list-image-list .supplier-doc-image-empty {
  width: 66px;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  text-align: center;
}

.standard-list-data-grid {
  table-layout: fixed;
  border-collapse: collapse;
}

.generic-ordinary-list-table {
  width: max-content;
  min-width: 100%;
}

.standard-list-data-grid th,
.standard-list-data-grid td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standard-list-data-grid thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 36px;
  padding: 3px 4px;
  background: #f4e6a3;
  color: #102033;
  font-size: var(--lhfs, 12px);
  font-weight: 900;
  line-height: 1.12;
  vertical-align: middle;
  border-color: #c9d3df;
}

.generic-ordinary-list-table thead th .generic-list-head-label,
.production-main-table thead th .production-main-head-label,
.supplier-purchase-list-table thead th .ledger-head-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  box-sizing: border-box;
  padding: 0 6px;
  border: 1px solid #c9d5e2;
  background: #ffffff;
  color: #102033;
  font-size: inherit;
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generic-ordinary-list-table thead th .production-main-filter-shell,
.production-main-table thead th .production-main-filter-shell,
.supplier-purchase-list-table thead th .supplier-purchase-filter-shell,
.operating-table thead th .supplier-purchase-filter-shell {
  height: 28px;
  min-height: 28px;
  border: 1px solid #c9d5e2;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.generic-ordinary-list-table thead th .production-main-filter-input,
.production-main-table thead th .production-main-filter-input,
.supplier-purchase-list-table thead th .supplier-purchase-filter-input,
.operating-table thead th .supplier-purchase-filter-input {
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: #102033;
  font-size: inherit;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generic-ordinary-list-table thead th .production-main-filter-input::placeholder,
.production-main-table thead th .production-main-filter-input::placeholder,
.supplier-purchase-list-table thead th .supplier-purchase-filter-input::placeholder,
.operating-table thead th .supplier-purchase-filter-input::placeholder {
  color: #102033;
  opacity: 1;
}

.generic-ordinary-list-table thead th > .generic-column-resize-handle,
.supplier-purchase-list-table thead th > .generic-column-resize-handle,
.production-main-table thead th > .ledger-column-resize-handle {
  right: -4px;
  width: 8px;
  z-index: 12;
}

.production-craft-mapping-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #b9d7c6;
  background: #ecf8f0;
  color: #067647;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.production-craft-mapping-chip.is-missing {
  border-color: #f1c27d;
  background: #fff7ed;
  color: #b45309;
}

.production-craft-status-pill.is-off {
  border-color: #d7dee8;
  background: #f4f6f8;
  color: #64748b;
}

.production-craft-add-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.production-craft-add-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.production-craft-basic-panel {
  display: grid;
  min-width: 0;
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.production-craft-basic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border-bottom: 1px solid #d6e0ec;
  background: #f8fafc;
}

.production-craft-basic-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.production-craft-basic-head span {
  color: #667585;
  font-size: 12px;
  font-weight: 700;
}

.production-craft-basic-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(236px, 268px);
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 8px;
}

.production-craft-form-card {
  padding: 8px;
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.production-craft-page-label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.production-craft-page-hint {
  color: #667585;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.production-craft-add-layout .production-craft-form-grid {
  grid-template-columns:
    minmax(136px, 0.9fr)
    minmax(132px, 0.9fr)
    minmax(166px, 1.05fr)
    minmax(114px, 0.68fr)
    minmax(130px, 0.8fr)
    minmax(142px, 0.92fr);
  gap: 6px 8px;
  align-items: end;
  padding: 0;
  border: 0;
  background: transparent;
}

.production-craft-add-layout .production-craft-form-field.is-wide {
  grid-column: span 3;
}

.production-craft-add-layout .production-craft-form-field {
  gap: 4px;
}

.production-craft-add-layout .production-craft-form-field.production-craft-field-requirement,
.production-craft-add-layout .production-craft-form-field.production-craft-field-otherRequirement {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.production-craft-add-layout .production-craft-form-field.production-craft-field-requirement span,
.production-craft-add-layout .production-craft-form-field.production-craft-field-otherRequirement span {
  min-height: 28px;
  align-items: center;
  line-height: 28px;
  white-space: nowrap;
}

.production-craft-add-layout .production-craft-form-field span {
  min-height: 15px;
}

.production-craft-add-layout .production-craft-form-field input,
.production-craft-add-layout .production-craft-form-field select {
  height: 30px;
  padding: 0 7px;
  font-size: 12px;
}

.production-craft-add-layout .production-craft-form-field textarea {
  height: 42px;
  min-height: 42px;
  padding: 6px 7px;
  font-size: 12px;
}

.production-craft-add-layout .production-craft-form-field.production-craft-field-requirement input {
  height: 28px;
}

.production-craft-image-attachments {
  grid-template-columns: 1fr;
  align-self: stretch;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 146px;
  height: 100%;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e5ebf1;
  background: #ffffff;
  overflow: hidden;
}

.production-craft-image-attachments .supplier-doc-image-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 0;
}

.production-craft-image-attachments .supplier-doc-image-head > label {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.production-craft-image-attachments .supplier-doc-image-actions {
  min-height: 26px;
}

.production-craft-image-attachments .supplier-doc-image-add-btn {
  height: 26px;
  min-width: 72px;
  padding: 0 8px;
  white-space: nowrap;
}

.production-craft-image-attachments .supplier-doc-image-add-btn span {
  white-space: nowrap;
}

.production-craft-image-attachments .supplier-doc-image-list {
  min-height: 0;
  overflow: auto;
  grid-template-columns: repeat(auto-fill, 66px);
  gap: 6px;
  padding: 0;
}

.production-craft-image-attachments .supplier-doc-image-empty {
  min-height: 86px;
  justify-content: center;
  padding: 0 6px;
  text-align: center;
}

@media (max-width: 1100px) {
  .production-craft-basic-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .production-craft-add-layout .production-craft-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .production-craft-add-layout .production-craft-form-field.is-wide {
    grid-column: auto;
  }

  .production-craft-image-attachments {
    max-height: none;
  }
}

[data-standard-operation-form] {
  --operation-control-width: 142px;
  --operation-control-height: 28px;
  min-width: 0;
}

[data-standard-operation-form] .supplier-doc-basic-grid,
.supplier-purchase-doc.sales-document-surface [data-standard-operation-form] .supplier-doc-basic-grid {grid-template-columns:repeat(6,minmax(210px,1fr));gap:10px 14px;padding:12px 16px 14px}
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field {grid-template-columns:72px var(--operation-control-width);justify-content:start;gap:var(--standard-list-filter-label-control-gap)}
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field > input,
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field > select,
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field > textarea,
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field > .supplier-doc-lookup,
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field > .clearable-control {width:var(--operation-control-width);min-width:var(--operation-control-width);max-width:var(--operation-control-width)}

[data-standard-operation-form] .supplier-doc-basic-grid input,
[data-standard-operation-form] .supplier-doc-basic-grid select,
[data-standard-operation-form] .supplier-doc-basic-grid textarea {
  height: var(--operation-control-height);
  min-height: var(--operation-control-height);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-standard-operation-form] .supplier-doc-basic-grid .clearable-control.operation-form-has-value,
[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-lookup.operation-form-has-value,
[data-standard-operation-form] .supplier-doc-basic-grid input.operation-form-has-value,
[data-standard-operation-form] .supplier-doc-basic-grid select.operation-form-has-value,
[data-standard-operation-form] .supplier-doc-basic-grid textarea.operation-form-has-value {
  border-color: #9fc2eb;
  background: #eef6ff;
  color: #0d4fb3;
  font-weight: 700;
}

[data-standard-operation-form][data-operation-form-surface="readonly"] .supplier-doc-basic-grid .clearable-control.operation-form-has-value,
[data-standard-operation-form][data-operation-form-surface="readonly"] .supplier-doc-basic-grid .supplier-doc-lookup.operation-form-has-value,
[data-standard-operation-form][data-operation-form-surface="readonly"] .supplier-doc-basic-grid input.operation-form-has-value,
[data-standard-operation-form][data-operation-form-surface="readonly"] .supplier-doc-basic-grid select.operation-form-has-value,
[data-standard-operation-form][data-operation-form-surface="readonly"] .supplier-doc-basic-grid textarea.operation-form-has-value {
  border-color: #d2dce8;
  background: #f6f8fb;
  color: #5b6c80;
  font-weight: 500;
  box-shadow: none;
}

[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid input:not(:disabled),
[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid select:not(:disabled),
[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid textarea:not(:disabled),
[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid .supplier-doc-lookup:has(input:not(:disabled)),
[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid .clearable-control:has(input:not(:disabled)) {
  border-color: #8fb8e7;
  color: #173d6d;
  font-weight: 600;
}

[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid input:not(:disabled):focus,
[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid select:not(:disabled):focus,
[data-standard-operation-form]:not([data-operation-form-surface="readonly"]) .supplier-doc-basic-grid textarea:not(:disabled):focus {
  border-color: #2f78d8;
  outline: 1px solid rgba(47, 120, 216, .22);
  outline-offset: 0;
}

[data-standard-operation-form] .supplier-doc-basic-grid .supplier-doc-field:first-child {
  justify-self: start;
  margin-left: 0;
}

[data-standard-operation-form] .supplier-doc-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: min(340px, calc(100vh - 470px));
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
}

[data-standard-operation-form] table[data-standard-operation-matrix] {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

[data-standard-operation-form] table[data-standard-operation-matrix] thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

[data-standard-operation-form] table[data-standard-operation-matrix] tfoot th,
[data-standard-operation-form] table[data-standard-operation-matrix] tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 3;
}

[data-standard-operation-form] table[data-standard-operation-matrix] .doc-col-row-action,
[data-standard-operation-form] table[data-standard-operation-matrix] .col-delete,
[data-standard-operation-form] table[data-standard-operation-matrix] th:last-child,
[data-standard-operation-form] table[data-standard-operation-matrix] td:last-child {
  overflow: visible;
}

[data-standard-operation-form] .supplier-doc-payment-row {
  display: grid;
  grid-template-columns:
    minmax(138px, 1fr)
    minmax(230px, 1fr)
    minmax(288px, 1.2fr)
    minmax(230px, 1fr)
    minmax(150px, 1fr)
    minmax(230px, 1.15fr);
  align-items: center;
  gap: 8px 0;
  padding: 8px 12px;
}

[data-standard-operation-form] .supplier-doc-payment-row > * {
  min-width: 0;
  margin: 0;
}

[data-standard-operation-form] .supplier-doc-payment-discount,
[data-standard-operation-form] .supplier-doc-payment-account,
[data-standard-operation-form] .supplier-doc-payment-amount {
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  padding-inline: 12px;
}

[data-standard-operation-form] .supplier-doc-payment-discount input,
[data-standard-operation-form] .supplier-doc-payment-amount input {
  flex: 0 0 142px;
  width: 142px;
  min-width: 142px;
  height: 28px;
}

[data-standard-operation-form] .supplier-doc-payment-account select {
  flex: 0 0 200px;
  width: 200px;
  min-width: 200px;
  height: 28px;
}

[data-standard-operation-form] .supplier-doc-payment-row > :last-child {
  padding-right: 16px;
  justify-self: stretch;
}

.standard-operation-form-bottom-dock {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
  min-height: 76px;
  padding: 8px 12px;
  border-top: 1px solid #dbe4ee;
  background: #fff;
}

.standard-operation-form-attachments {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.standard-operation-form-attachments .supplier-doc-image-attachments,
[data-standard-operation-form] .standard-operation-form-attachments.supplier-doc-image-attachments {
  min-height: 0;
  padding: 0;
  border-top: 0;
}

.standard-operation-form-attachments .supplier-doc-image-list,
[data-standard-operation-form] .standard-operation-form-attachments .supplier-doc-image-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

[data-standard-operation-form] .standard-operation-form-actions,
.supplier-purchase-doc.sales-document-surface [data-standard-operation-form] .standard-operation-form-actions {
  position: static;
  inset: auto;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
  min-width: max-content;
  margin: 0 0 2px auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1500px) {
  [data-standard-operation-form] .supplier-doc-basic-grid,
  .supplier-purchase-doc.sales-document-surface [data-standard-operation-form] .supplier-doc-basic-grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }

  [data-standard-operation-form] .supplier-doc-payment-row {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  [data-standard-operation-form] .supplier-doc-basic-grid,
  .supplier-purchase-doc.sales-document-surface [data-standard-operation-form] .supplier-doc-basic-grid {
    grid-template-columns: 1fr;
  }

  [data-standard-operation-form] .supplier-doc-payment-row {
    grid-template-columns: 1fr;
  }

  .standard-operation-form-bottom-dock {
    align-items: stretch;
    flex-direction: column;
  }

  [data-standard-operation-form] .standard-operation-form-actions {
    width: 100%;
  }
}

.operating-view .panel { min-height: 0; }
.operating-data-list, .operating-editor { display: grid; gap: 10px; min-width: 0; }
.operating-list-heading, .operating-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 2px; }
.operating-list-heading h2, .operating-editor h2 { margin: 0; color: #102b4e; font-size: 23px; }
.operating-list-heading p, .operating-editor header p { margin: 5px 0 0; color: #62748a; font-size: 12px; }
.operating-list-heading > span { padding: 5px 8px; border: 1px solid #c9d8ed; color: #1d5e9e; font-size: 12px; }
.operating-data-tools { min-width: 0; }
.operating-data-tools .production-main-list-tools { border: 1px solid #d6e0ec; }
.operating-data-tools .production-main-list-search { min-width: 0; }
.operating-data-tools .production-main-search-wide { flex: 1 1 250px; min-width: 180px; }
.operating-data-tools .production-main-list-actions { flex: 0 0 auto; }
.operating-result-count { min-width: max-content; color: #5f7389; font-size: 12px; }
.operating-data-manager { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 10px 12px; border: 1px solid #d5e0ec; background: #fff; }
.operating-filter-bar input, .operating-filter-bar select, .operating-form-grid input, .operating-form-grid select, .operating-handle-form textarea { min-width: 104px; height: 30px; padding: 0 7px; border: 1px solid #b8c9dc; color: #1d3654; background: #fff; font: inherit; }
.operating-data-manager > .operating-import-summary { display: grid; gap: 3px; margin-right: auto; }
.operating-data-manager strong { color: #173b68; }.operating-data-manager span { color: #61758b; font-size: 12px; }
.operating-media-row { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: end; gap: 8px; padding-top: 8px; border-top: 1px solid #e1e9f2; }
.operating-media-summary { display: grid; flex: 1 1 300px; gap: 3px; margin-right: auto; }
.operating-file-button { position: relative; overflow: hidden; cursor: pointer; }.operating-file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.operating-paste { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }.operating-paste textarea { min-height: 90px; padding: 8px; border: 1px solid #b8c9dc; font: 12px/1.5 Consolas, "Microsoft YaHei", monospace; resize: vertical; }
.operating-list-surface, .operating-handle-form, .operating-readonly, .operating-attachments, .operating-audit { border: 1px solid #d5e0ec; background: #fff; }
.operating-table-wrap { max-height: min(61vh, 620px); overflow: auto; overscroll-behavior: contain; }
.operating-table { width: 100%; min-width: 1460px; border-collapse: collapse; table-layout: fixed; }
.operating-table th, .operating-table td { padding: 7px 8px; border-right: 1px solid #dce6f0; border-bottom: 1px solid #e2eaf3; color: #203953; font-size: 12px; text-align: left; vertical-align: top; word-break: break-word; }
.operating-table th { position: sticky; top: 0; z-index: 1; background: #f2f7fc; color: #183b67; font-weight: 800; white-space: nowrap; }
.operating-link, .operating-attachment-link { padding: 0; border: 0; color: #155bc4; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }.operating-link:hover, .operating-attachment-link:hover { text-decoration: underline; }
.operating-row-action { min-width: 46px; padding: 3px 6px; }.operating-empty { height: 82px; color: #6c7e91 !important; text-align: center !important; }
.operating-status { display: inline-block; padding: 2px 5px; color: #35546f; background: #edf4fa; white-space: nowrap; }.operating-status.status-processing { color: #a56700; background: #fff2d9; }.operating-status.status-resolved, .operating-status.status-closed { color: #16735a; background: #e4f6ed; }
.operating-list-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 5px 10px; color: #64778b; font-size: 12px; }
.operating-editor { max-width: 1280px; }.operating-editor-loading { padding: 28px; color: #62748a; }.operating-handle-form, .operating-readonly, .operating-attachments, .operating-audit { display: grid; gap: 9px; padding: 12px; }.operating-handle-form h3, .operating-readonly h3, .operating-attachments h3, .operating-audit h3 { margin: 0; color: #173b68; font-size: 14px; }.operating-handle-form > label { display: grid; gap: 4px; color: #526b84; font-size: 12px; font-weight: 700; }.operating-handle-form textarea { height: 78px; padding: 7px; resize: vertical; }.operating-form-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }.operating-form-grid label { display: grid; gap: 4px; color: #526b84; font-size: 12px; font-weight: 700; }.operating-form-grid input, .operating-form-grid select { width: 100%; min-width: 0; }
.operating-readonly > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }.operating-readonly p { margin: 0; }.operating-readonly dt { color: #5b7089; font-size: 12px; font-weight: 800; }.operating-readonly dd { margin: 3px 0 0; color: #21374f; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }.operating-readonly > div > div { padding: 7px; border: 1px solid #e2eaf3; background: #f9fbfe; }
.operating-attachments p, .operating-audit p { margin: 0; color: #64778b; font-size: 12px; }.operating-attachment-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 7px; }.operating-attachment-item { display: grid; gap: 2px; padding: 8px; border: 1px solid #c9d8e8; color: #165bb0; background: #f8fbff; text-align: left; font: 12px/1.4 inherit; cursor: pointer; }.operating-attachment-item small { color: #6c7e91; }.operating-audit ol { display: grid; gap: 4px; margin: 0; padding-left: 18px; color: #536d88; font-size: 12px; }.operating-editor > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 2px 0 12px; }
@media (max-width: 980px) { .operating-list-heading, .operating-editor > header { flex-direction: column; }.operating-data-tools .production-main-list-tools { min-height: auto; max-height: none; flex-wrap: wrap; overflow: visible; }.operating-data-tools .production-main-list-search, .operating-data-tools .production-main-list-actions { flex-wrap: wrap; }.operating-data-tools .production-main-search-wide { max-width: none; }.operating-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.operating-readonly > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }.operating-paste { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .operating-form-grid, .operating-readonly > div { grid-template-columns: 1fr; }.operating-data-tools .production-main-list-search, .operating-data-tools .production-main-list-actions { width: 100%; }.operating-data-tools label:not(.production-main-search-wide) .production-main-search-input, .operating-data-tools .production-main-search-wide { width: 100%; max-width: none; } }

.operating-view .panel { min-height: 0; }
.operating-workspace { display: grid; gap: 12px; min-width: 0; }
.operating-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 4px 2px; }
.operating-heading h2 { margin: 0; color: #102b4e; font-size: 24px; line-height: 1.3; }
.operating-heading p { margin: 6px 0 0; color: #62748a; font-size: 13px; line-height: 1.55; }
.operating-source-badge { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #c9d8ed; background: #f7fbff; color: #1d5e9e; font-size: 12px; font-weight: 700; }
.operating-metrics { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.operating-metrics > div { min-height: 84px; padding: 13px 15px; border: 1px solid #d7e2ee; background: #fff; }
.operating-metrics span { display: block; color: #6b7d90; font-size: 12px; }
.operating-metrics strong { display: block; margin-top: 7px; color: #102b4e; font-size: 25px; line-height: 1.1; }
.operating-metrics .operating-metric-time { font-size: 13px; line-height: 1.5; }
.operating-import-card, .operating-list-card, .operating-detail { border: 1px solid #d4dfec; background: #fff; }
.operating-import-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; }
.operating-import-card > div { display: grid; gap: 3px; margin-right: auto; }
.operating-import-card strong { color: #153a66; }
.operating-import-card span { color: #68788a; font-size: 12px; }
.operating-file-button { position: relative; overflow: hidden; cursor: pointer; }
.operating-file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.operating-import-paste { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }
.operating-import-paste textarea { min-height: 96px; padding: 8px 9px; border: 1px solid #bbcce0; color: #152d4d; font: 12px/1.45 Consolas, "Microsoft YaHei", monospace; resize: vertical; }
.operating-list-tools { display: flex; align-items: end; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #dce6f0; }
.operating-list-tools label { display: grid; gap: 4px; color: #4f6275; font-size: 12px; font-weight: 700; }
.operating-list-tools input { width: min(330px, 48vw); height: 32px; padding: 0 9px; border: 1px solid #bbcce0; color: #152d4d; }
.operating-list-tools > span { margin-left: auto; padding-bottom: 8px; color: #64748b; font-size: 12px; }
.operating-table-wrap { max-height: min(54vh, 590px); overflow: auto; }
.operating-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.operating-table th, .operating-table td { padding: 8px 9px; border-right: 1px solid #dde6f0; border-bottom: 1px solid #e1e9f2; color: #1f354f; font-size: 12px; text-align: left; vertical-align: top; word-break: break-word; }
.operating-table th { position: sticky; top: 0; z-index: 1; background: #f2f7fc; color: #183b67; font-weight: 800; white-space: nowrap; }
.operating-link-button { border: 0; background: transparent; color: #155bc4; cursor: pointer; font: inherit; font-weight: 700; padding: 0; text-align: left; }
.operating-link-button:hover { text-decoration: underline; }
.operating-empty-cell { padding: 36px !important; color: #718096 !important; text-align: center !important; }
.operating-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 10px 14px; color: #61738a; font-size: 12px; }
.operating-detail { padding: 13px 14px; }
.operating-detail-empty { display: grid; gap: 5px; color: #60748b; }
.operating-detail-empty strong { color: #314963; }
.operating-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #dce6f0; }
.operating-detail-head div { display: grid; gap: 3px; }
.operating-detail-head strong { color: #153a66; }
.operating-detail-head span { color: #6e7e90; font-size: 12px; }
.operating-detail-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding-top: 12px; }
.operating-detail-fields > div { min-width: 0; padding: 8px 9px; background: #f8fbfe; border: 1px solid #e4ecf4; }
.operating-detail-fields dt { color: #5b7089; font-size: 12px; font-weight: 800; }
.operating-detail-fields dd { margin: 4px 0 0; color: #21374f; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.operating-detail-attachments { display: grid; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #dce6f0; color: #526a84; font-size: 12px; }
.operating-detail-attachments strong { color: #304b6b; }
.operating-detail-attachments ul { margin: 0; padding-left: 18px; }
.operating-detail-attachments li { margin: 3px 0; }
@media (max-width: 980px) {
  .operating-heading, .operating-import-card { align-items: flex-start; flex-direction: column; }
  .operating-import-card > div { margin-right: 0; }
  .operating-import-paste { grid-template-columns: minmax(0, 1fr); }
  .operating-metrics { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .operating-list-tools { align-items: stretch; flex-wrap: wrap; }
  .operating-list-tools > span { width: 100%; margin-left: 0; padding-bottom: 0; }
  .operating-detail-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .operating-metrics, .operating-detail-fields { grid-template-columns: minmax(0, 1fr); }
  .operating-list-tools input { width: 100%; }
}

.operating-data-list .operating-table-wrap { max-height: min(61vh, 620px); }
.operating-data-list .operating-table { min-width: 1460px; }
.operating-data-list .operating-table th,
.operating-data-list .operating-table td { height: 32px; min-height: 32px; padding: 4px 7px; line-height: 20px; vertical-align: middle; word-break: normal; }
.operating-data-list .operating-table tbody td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operating-data-list .operating-link,
.operating-data-list .operating-attachment-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.operating-data-list .operating-row-action { min-width: 0; min-height: 22px; height: 22px; padding: 0 5px; font-size: 12px; line-height: 20px; vertical-align: middle; }
.operating-data-list .operating-column-filter-shell { display: flex; align-items: center; justify-content: space-between; width: 100%; min-width: 0; padding: 0 6px; border: 1px solid #c9d5e2; background: #fff; color: #102033; text-align: left; font: inherit; cursor: pointer; }
.operating-data-list .operating-column-filter-shell:hover, .operating-data-list .operating-column-filter-shell:focus { border-color: #6ea6e8; outline: 0; }
.operating-data-list .operating-column-filter-shell.is-active { border-color: #2b78d0; background: #eef6ff; }
.operating-column-filter-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operating-column-filter-caret { flex: 0 0 auto; margin-left: 5px; color: #53718f; font-size: 13px; }
.operating-action-header { display: inline-flex; align-items: center; height: 28px; padding: 0 7px; }
.operating-list-end { color: #2d6f4f; font-weight: 800; }
.operating-list-limit { color: #8b5b12; font-weight: 700; }
.operating-editor { max-width: none; }
.operating-editor > header { align-items: center; padding: 2px 0; }
.operating-editor-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.operating-case-top { display: grid; grid-template-columns: minmax(480px, 2fr) minmax(290px, 1fr); gap: 10px; }
.operating-context,
.operating-attachments-primary { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 11px 12px; border: 1px solid #d5e0ec; background: #fff; }
.operating-context h3,
.operating-attachments-primary h3 { margin: 0; color: #173b68; font-size: 14px; }
.operating-context > p { margin: 0; color: #64778b; font-size: 12px; }
.operating-context-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.operating-context-fields > div { min-width: 0; padding: 6px 7px; border: 1px solid #e2eaf3; background: #f9fbfe; }
.operating-context-fields dt { color: #5b7089; font-size: 12px; font-weight: 800; }
.operating-context-fields dd { margin: 2px 0 0; overflow: hidden; color: #21374f; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.operating-attachments-primary p { margin: 0; color: #64778b; font-size: 12px; line-height: 1.45; }
.operating-attachments-primary .operating-attachment-items { grid-template-columns: 1fr; max-height: 210px; overflow: auto; }
.operating-attachment-item.is-unavailable { color: #61758b; background: #f7f9fc; cursor: default; }
.operating-attachment-item.is-unavailable small { color: #8a6641; }
.operating-readonly { display: block; padding: 0; }
.operating-readonly > summary { padding: 11px 12px; color: #173b68; font-size: 14px; font-weight: 700; cursor: pointer; }
.operating-readonly[open] > summary { border-bottom: 1px solid #d5e0ec; }
.operating-readonly-fields { padding: 10px 12px 12px; }
.operating-readonly-fields > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
@media (max-width: 980px) {
  .operating-case-top { grid-template-columns: 1fr; }
  .operating-context-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .operating-editor > header { align-items: flex-start; flex-direction: column; }
  .operating-editor-actions { width: 100%; }
  .operating-editor-actions button { flex: 1; }
  .operating-context-fields { grid-template-columns: 1fr; }
}

.operating-data-list.supplier-purchase-list-scaffold { display: grid; gap: 0; min-width: 0; }
.operating-list-toolbar { border-color: #cbd8e6; }
.operating-list-toolbar-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.operating-data-list .operating-data-tools { border: 0; }
.operating-data-list .operating-data-tools .production-main-list-tools { min-height: 42px; border-color: #cbd8e6; border-bottom: 0; background: #f8fbff; }
.operating-data-list .operating-list-surface { border: 0; }
.operating-data-list .operating-table-wrap { min-height: 180px; max-height: min(68vh, 690px); border-color: #c2cfdd; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07); }
.operating-table { background: #ffffff; }
.operating-table th { height: 36px; padding: 3px 4px; background: #f4e6a3; color: #102033; vertical-align: middle; }
.operating-table td { height: 36px; padding: 5px 8px; color: #203953; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.operating-table td:nth-child(1), .operating-table td:nth-child(5), .operating-table td:nth-child(6), .operating-table td:nth-child(9), .operating-table td:nth-child(10), .operating-table td:nth-child(11), .operating-table td:nth-child(12), .operating-table td:nth-child(13) { text-align: center; }
.operating-table td:nth-child(2) { font-weight: 800; }
.operating-table td:nth-child(4) { font-variant-numeric: tabular-nums; }
.operating-data-list .operating-row-actions { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.operating-data-list .operating-row-action { min-width: 46px; min-height: 24px; height: 24px; padding: 0 7px; border-color: #b9cde4; background: #ffffff; color: #1257a2; line-height: 22px; }
.operating-data-list .operating-row-action:hover { border-color: #2d72e8; background: #eef6ff; }
.operating-data-list .operating-row-action.is-danger { border-color: #efb7b7; color: #c83030; }
.operating-data-list .operating-row-action.is-danger:hover { border-color: #dc5252; background: #fff1f1; }
.operating-data-list .operating-empty { height: 72px; }
.operating-data-list .operating-list-tail td { height: 34px; min-height: 34px; padding: 6px 10px; color: #64778b; background: #ffffff; text-align: center; white-space: normal; }
.operating-data-list .operating-list-tail-end td { color: #2d6f4f; font-weight: 800; }
.operating-data-list .operating-list-tail-limit td { color: #8b5b12; font-weight: 700; }
.operating-data-list .operating-list-tail-error td,
.operating-data-list .operating-empty-error { color: #a23a3a !important; }
dialog.operating-handle-modal-shell {
  width: min(760px, calc(100vw - 28px));
  height: fit-content;
  max-height: min(640px, calc(100vh - 28px));
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #9db2c8;
  border-radius: 8px;
  background: #f5f8fb;
  box-shadow: 0 18px 54px rgba(16, 35, 56, 0.32);
}
dialog.operating-handle-modal-shell::backdrop { background: rgba(16, 31, 48, 0.46); }
.operating-handle-modal-close {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 6;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid #bdcddd;
  border-radius: 4px;
  background: #ffffff;
  color: #27435f;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.operating-handle-modal-close:hover { border-color: #2d72e8; background: #eef6ff; color: #1257a2; }
.operating-handle-modal-body { min-height: 0; max-height: min(640px, calc(100vh - 28px)); overflow: hidden; }
.operating-detail-workspace { min-height: 0; max-height: min(640px, calc(100vh - 28px)); display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.operating-detail-workspace > .supplier-purchase-detail-page-head { min-height: 40px; padding: 4px 48px 4px 12px; }
.operating-detail-workspace .supplier-purchase-detail-page-title { flex-direction: column; align-items: flex-start; gap: 1px; }
.operating-detail-workspace .supplier-purchase-detail-page-head-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.operating-detail-status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 7px; border: 1px solid #d5e0ec; background: #edf4fa; color: #35546f; font-size: 12px; font-weight: 700; white-space: nowrap; }
.operating-detail-status.status-processing { color: #a56700; background: #fff2d9; }
.operating-detail-status.status-resolved,
.operating-detail-status.status-closed { color: #16735a; background: #e4f6ed; }
.operating-detail-body { display: grid; flex: 0 1 auto; min-height: 0; align-content: start; gap: 6px; padding: 6px 8px 8px; overflow: auto; overscroll-behavior: contain; }
.operating-detail-body > [data-operating-detail-feedback]:empty { display: none; }
.operating-detail-workspace .business-detail-section { margin: 0; padding: 9px 12px; border: 1px solid #d4dfeb; background: #ffffff; }
.operating-detail-workspace .business-detail-section > h3 { margin: 0 0 7px; color: #172333; font-size: 13px; font-weight: 800; }
.operating-detail-workspace .operating-context-fields { grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 0; border: 1px solid #d5e0ea; }
.operating-detail-workspace .operating-context-fields > div { min-height: 38px; padding: 6px 9px; border: 0; border-right: 1px solid #d5e0ea; border-bottom: 1px solid #d5e0ea; background: #ffffff; }
.operating-detail-workspace .operating-context-fields > div:nth-child(4n) { border-right: 0; }
.operating-detail-workspace .operating-context-fields > div:nth-last-child(-n + 4) { border-bottom: 0; }
.operating-detail-workspace .operating-context-fields strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operating-detail-workspace .operating-attachments-primary { display: grid; gap: 5px; padding: 8px; border-radius: 4px; }
.operating-detail-workspace .operating-attachments-primary[hidden] { display: none; }
.operating-detail-workspace .operating-attachments-primary .operating-attachment-items { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: none; overflow: visible; }
.operating-detail-workspace .operating-attachment-item { min-width: 0; min-height: 74px; align-content: start; overflow: hidden; text-decoration: none; }
.operating-detail-workspace .operating-attachment-name { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.operating-detail-workspace .operating-attachment-item.is-empty { border-color: #dbe4ee; background: #fbfcfe; cursor: default; pointer-events: none; }
.operating-detail-workspace .operating-attachment-error { margin: 0; color: #a23a3a; font-size: 12px; }
.operating-detail-workspace .operating-handle-form { display: grid; gap: 6px; padding: 8px; border: 1px solid #d5e0ec; border-radius: 4px; background: #ffffff; }
.operating-detail-workspace .operating-handle-form h3 { margin: 0; color: #173b68; font-size: 14px; }
.operating-detail-workspace .operating-section-note { margin: -3px 0 0; color: #64778b; font-size: 12px; }
.operating-handling-conclusion { display: grid; gap: 5px; color: #526b84; font-size: 12px; font-weight: 700; }
.operating-handling-conclusion textarea { width: 100%; min-width: 0; height: 58px; max-height: 120px; padding: 7px 8px; border: 1px solid #b8c9dc; background: #ffffff; color: #1d3654; font: inherit; line-height: 1.45; resize: vertical; }
.operating-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.operating-result-grid label { display: grid; gap: 5px; color: #526b84; font-size: 12px; font-weight: 700; }
.operating-result-grid select { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #b8c9dc; background: #ffffff; color: #1d3654; font: inherit; }
.operating-detail-feedback { margin: 0; padding: 8px 10px; border: 1px solid #c9d8e8; color: #365a79; background: #f7fbff; font-size: 12px; }
.operating-detail-feedback.is-success { border-color: #b8dfcb; color: #176842; background: #edf9f1; }
.operating-detail-feedback.is-error { border-color: #e7c1c1; color: #a23a3a; background: #fff6f6; }
.operating-detail-error { display: grid; gap: 8px; }
.operating-detail-error > div { display: flex; gap: 8px; }
.operating-detail-workspace .operating-readonly { display: block; padding: 0; }
.operating-detail-workspace .operating-readonly > summary { padding: 10px 12px; color: #173b68; font-size: 13px; font-weight: 800; cursor: pointer; }
.operating-detail-workspace .operating-readonly[open] > summary { border-bottom: 1px solid #d5e0ec; }
.operating-detail-workspace .operating-readonly-fields { padding: 10px 12px 12px; }
.operating-data-list .operating-table th.supplier-purchase-col-select,
.operating-data-list .operating-table td.supplier-purchase-col-select {
  box-sizing: border-box;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
}
.operating-data-list .operating-table th.supplier-purchase-col-sequence,
.operating-data-list .operating-table td.supplier-purchase-col-sequence {
  box-sizing: border-box;
  min-width: 34px;
}
.operating-data-list .operating-table th.supplier-purchase-col-sequence .ledger-head-label {
  padding-right: 2px;
  padding-left: 2px;
}
@media (max-width: 980px) {
  .operating-list-toolbar { align-items: flex-start; flex-direction: column; }
  .operating-list-toolbar-actions { width: 100%; justify-content: flex-start; }
  .operating-detail-workspace .operating-context-fields { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .operating-detail-workspace .operating-context-fields > div:nth-child(4n) { border-right: 1px solid #d5e0ea; }
  .operating-detail-workspace .operating-context-fields > div:nth-child(2n) { border-right: 0; }
  .operating-detail-workspace .operating-context-fields > div:nth-last-child(-n + 4) { border-bottom: 1px solid #d5e0ea; }
  .operating-detail-workspace .operating-context-fields > div:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 620px) {
  .operating-handle-modal-shell { width: calc(100vw - 12px); height: fit-content; max-height: calc(100vh - 12px); }
  .operating-handle-modal-body,
  .operating-detail-workspace { max-height: calc(100vh - 12px); }
  .operating-list-toolbar-actions { align-items: stretch; flex-direction: column; }
  .operating-detail-workspace .supplier-purchase-detail-page-head-actions { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .operating-result-grid { grid-template-columns: 1fr; }
  .operating-detail-workspace .operating-context-fields { grid-template-columns: 1fr; }
  .operating-detail-workspace .operating-context-fields > div { border-right: 0 !important; border-bottom: 1px solid #d5e0ea !important; }
  .operating-detail-workspace .operating-context-fields > div:last-child { border-bottom: 0 !important; }
}

.production-craft-add-layout [data-production-craft-mapping-preview] {
  min-width: 0;
}

.production-craft-route-editor {
  display: grid;
  min-width: 0;
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.production-craft-route-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  border-bottom: 1px solid #d6e0ec;
  background: #f8fafc;
}

.production-craft-route-editor-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.production-craft-route-editor-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.production-craft-route-editor-head span {
  color: #667585;
  font-size: 12px;
  font-weight: 700;
}

.production-craft-route-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.production-craft-route-add-btn {
  min-height: 28px;
  padding: 4px 10px;
  white-space: nowrap;
}

.production-craft-process-group-add-btn {
  min-height: 28px;
  padding: 4px 10px;
  white-space: nowrap;
}

.production-craft-process-group-dialog {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.28);
}

.production-craft-process-group-dialog.hidden {
  display: none;
}

.production-craft-process-group-card {
  width: min(360px, 100%);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbd8e6;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
}

.production-craft-process-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.production-craft-process-group-head strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.production-craft-process-group-close {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #d6e0ec;
  background: #ffffff;
  color: #475569;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.production-craft-process-group-field {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.production-craft-process-group-field input {
  height: 32px;
  padding: 4px 8px;
  border: 1px solid #cbd8e6;
  border-radius: 0;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
}

.production-craft-process-group-error {
  display: none;
  min-height: 18px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}

.production-craft-process-group-error.is-visible {
  display: block;
}

.production-craft-process-group-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.production-craft-route-editor-table-wrap {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.production-craft-route-editor-table {
  width: calc(100% - 2px);
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

.production-craft-route-editor-table th,
.production-craft-route-editor-table td {
  border-right: 1px solid #e3ebf4;
  border-bottom: 1px solid #e3ebf4;
  padding: 3px 4px;
  color: #14233a;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: middle;
}

.production-craft-route-editor-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  color: #34465e;
  font-weight: 900;
  text-align: left;
}

.production-craft-route-editor-table th:nth-child(1),
.production-craft-route-editor-table td:nth-child(1) {
  width: 56px;
}

.production-craft-route-editor-table th:nth-child(2),
.production-craft-route-editor-table td:nth-child(2) {
  width: 18%;
}

.production-craft-route-editor-table th:nth-child(3),
.production-craft-route-editor-table td:nth-child(3) {
  width: 14%;
}

.production-craft-route-editor-table th:nth-child(4),
.production-craft-route-editor-table td:nth-child(4) {
  width: 76px;
}

.production-craft-route-editor-table th:nth-child(5),
.production-craft-route-editor-table td:nth-child(5) {
  width: 62px;
}

.production-craft-route-editor-table th:nth-child(6),
.production-craft-route-editor-table td:nth-child(6) {
  width: 24%;
}

.production-craft-route-editor-table th:nth-child(7),
.production-craft-route-editor-table td:nth-child(7) {
  width: 18%;
}

.production-craft-route-editor-table th:nth-child(8),
.production-craft-route-editor-table td:nth-child(8) {
  width: 50px;
  text-align: center;
}

.production-craft-route-editor-table input {
  width: 100%;
  min-width: 0;
  height: 27px;
  padding: 3px 5px;
  border: 1px solid #cbd8e6;
  border-radius: 0;
  color: #0f172a;
  font: inherit;
  background: #ffffff;
}

.production-craft-route-remove-btn {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #d6e0ec;
  border-radius: 0;
  background: #ffffff;
  color: #475569;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.production-craft-route-remove-btn:hover {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fff7f7;
}

.production-craft-form-field span {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 16px;
  color: #405268;
  font-weight: 800;
}

.production-craft-form-field span b {
  color: #c2410c;
  font-weight: 900;
}

.production-craft-form-field input,
.production-craft-form-field select,
.production-craft-form-field textarea {
  border-radius: 0;
}

.production-craft-form-field input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.production-craft-form-actions {
  align-items: center;
  min-height: 34px;
  margin-top: 8px;
  padding: 8px 0 0;
  border-top: 1px solid #edf2f7;
}

.production-craft-save-status {
  margin-right: auto;
  color: #586b82;
  font-size: 12px;
  font-weight: 800;
}

.production-craft-save-status.is-error {
  color: #b91c1c;
}

.production-craft-save-status.is-ok {
  color: #047857;
}

.production-craft-mapping-preview {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.production-craft-mapping-preview .production-craft-section-head {
  display: grid;
  gap: 4px;
  margin: 0;
}

.production-craft-mapping-preview .production-craft-section-head span {
  text-align: left;
}

.production-craft-mapping-grid {
  display: grid;
  gap: 8px;
}

.production-craft-mapping-grid div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5edf5;
}

.production-craft-mapping-grid div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.production-craft-mapping-grid span {
  color: #586b82;
  font-size: 12px;
  font-weight: 800;
}

.production-craft-mapping-grid strong {
  min-width: 0;
  color: #102033;
  font-size: 12px;
  font-weight: 900;
  word-break: break-word;
}

.production-craft-mapping-grid em {
  grid-column: 2;
  color: #667585;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.supplier-purchase-form-modal.hidden {
  display: none;
}

.supplier-purchase-form-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
}

.supplier-purchase-form-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 38, 0.48);
}

.supplier-purchase-form-dialog {
  position: relative;
  width: min(920px, calc(100vw - 24px));
  max-height: min(860px, calc(100dvh - 24px));
  overflow: hidden;
  border: 1px solid #d7e0e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(14, 27, 41, 0.28);
}

.supplier-purchase-form-modal.is-document-form {
  padding: 10px;
}

.supplier-purchase-form-modal.is-document-form .supplier-purchase-form-dialog {
  width: min(1780px, calc(100vw - 20px));
  max-height: min(940px, calc(100dvh - 20px));
  border-radius: 4px;
}

#supplierPurchaseFormContent {
  max-height: min(860px, calc(100dvh - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.supplier-purchase-form-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e6edf2;
  background: #f8fafc;
}

.supplier-purchase-form-head h2 {
  margin: 4px 0 5px;
  color: #1e2d38;
  font-size: 22px;
  line-height: 1.15;
}

.supplier-purchase-form-head p {
  max-width: 720px;
  margin: 0;
  color: #62727f;
  font-size: 13px;
  line-height: 1.5;
}

.supplier-purchase-form-badge {
  color: #d9364f;
  font-size: 12px;
  font-weight: 800;
}

.supplier-purchase-form-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #d8e0e6;
  border-radius: 6px;
  background: #ffffff;
  color: #2d3b45;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.supplier-purchase-form-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
}

.supplier-purchase-form {
  display: grid;
  gap: 14px;
}

.supplier-purchase-form-section {
  display: grid;
  gap: 10px;
}

.supplier-purchase-form-section h3 {
  margin: 0;
  color: #2a3a45;
  font-size: 15px;
}

.supplier-purchase-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.supplier-purchase-form-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.supplier-purchase-form-field.is-wide {
  grid-column: span 2;
}

.supplier-purchase-form-field span {
  color: #52616d;
  font-size: 12px;
  font-weight: 700;
}

.supplier-purchase-form-field em {
  margin-right: 3px;
  color: #d9364f;
  font-style: normal;
  font-size: 11px;
}

.supplier-purchase-form-field input,
.supplier-purchase-form-field select,
.supplier-purchase-form-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d6e0e8;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2c35;
  font: inherit;
  font-size: 13px;
}

.supplier-purchase-form-field input,
.supplier-purchase-form-field select {
  height: 36px;
  padding: 0 9px;
}

.supplier-purchase-form-field textarea {
  min-height: 72px;
  padding: 8px 9px;
  resize: vertical;
}

.supplier-purchase-form-flow {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #f0dfad;
  border-radius: 6px;
  background: #fff9e8;
}

.supplier-purchase-form-flow strong {
  display: block;
  margin-bottom: 4px;
  color: #755517;
  font-size: 13px;
}

.supplier-purchase-form-flow p {
  margin: 0;
  color: #7b6527;
  font-size: 12px;
  line-height: 1.5;
}

.supplier-purchase-form-message {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #d8e6f2;
  border-radius: 6px;
  background: #f5faff;
  color: #31506a;
  font-size: 12px;
  line-height: 1.45;
}

.supplier-purchase-form-message:empty {
  display: none;
}

.supplier-purchase-form-message.hidden {
  display: none;
}

.supplier-purchase-form-message.is-warning {
  border-color: #f0c9c2;
  background: #fff5f3;
  color: #9a3a2e;
}

.supplier-purchase-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #e6edf2;
  background: #ffffff;
}

.supplier-purchase-form-actions button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.supplier-purchase-form-secondary {
  border: 1px solid #d7e0e7;
  background: #ffffff;
  color: #3a4b57;
}

.supplier-purchase-form-check {
  border: 1px solid #ffced6;
  background: #fff4f6;
  color: #cf3049;
}

.supplier-purchase-form-submit {
  border: 1px solid #d6dde4;
  background: #eef2f5;
  color: #8b98a2;
  cursor: not-allowed;
}

.supplier-purchase-inline-form > .supplier-purchase-form-head {
  display: none;
}

.supplier-purchase-inline-form > .supplier-purchase-form-body {
  overflow: visible;
  padding: 0;
}

.supplier-purchase-inline-form .supplier-purchase-form {
  gap: 8px;
}

.supplier-purchase-inline-form .supplier-purchase-form-section {
  gap: 10px;
  padding: 12px 14px 14px;
  border: 1px solid #c5d2df;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}

.supplier-purchase-inline-form .supplier-purchase-form-section h3 {
  position: relative;
  margin: 0;
  padding-left: 10px;
  color: #111827;
  font-size: 15px;
  line-height: 20px;
}

.supplier-purchase-inline-form .supplier-purchase-form-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background: #ff3850;
}

.supplier-purchase-inline-form .supplier-purchase-form-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px 14px;
}

.supplier-purchase-inline-form .supplier-purchase-form-field span {
  color: #172232;
}

.supplier-purchase-inline-form .supplier-purchase-form-field input,
.supplier-purchase-inline-form .supplier-purchase-form-field select,
.supplier-purchase-inline-form .supplier-purchase-form-field textarea {
  border-color: #cbd6e2;
  border-radius: 0;
  background: #fbfdff;
}

.supplier-purchase-inline-form .supplier-purchase-form-reference-lookup input {
  height: 30px;
  padding-left: 26px;
}

.supplier-purchase-inline-form .supplier-purchase-form-actions {
  padding: 10px 0 0;
  border-top: 0;
  background: transparent;
}

.supplier-purchase-inline-form .supplier-purchase-form-submit {
  border-color: #0f5fb8;
  background: #0f5fb8;
  color: #ffffff;
  cursor: pointer;
}

.supplier-purchase-doc {
  min-height: 0;
  height: min(820px, calc(100dvh - 132px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #f0f3f6;
  color: #111827;
  font-size: 13px;
}

.supplier-purchase-doc > .standard-document-page-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  border-bottom: 1px solid #d9e0e7;
  background: #ffffff;
}

.supplier-purchase-doc > .standard-document-page-head h2 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.supplier-doc-topbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #d9e0e7;
  background: #ffffff;
}

.supplier-purchase-doc > .supplier-doc-topbar {
  display: none;
}

.supplier-doc-topbar strong {
  display: inline-block;
  margin-right: 12px;
  color: #d71935;
  font-size: 15px;
}

.supplier-doc-topbar span {
  color: #667280;
  font-size: 12px;
}

.supplier-purchase-doc-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 8px;
  overflow: visible;
  padding: 8px 10px 10px;
  background: #eef2f5;
}

.supplier-doc-section {
  border: 1px solid #e0e6ec;
  background: #ffffff;
}

.supplier-doc-section-title {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid #e7edf2;
  background: #ffffff;
}

.supplier-doc-section-title strong {
  position: relative;
  padding-left: 10px;
  color: #111827;
  font-size: 15px;
}

.supplier-doc-section-title strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background: #ff3850;
}

.supplier-doc-section-title span {
  margin-left: auto;
  color: #1e80ff;
  font-size: 12px;
}

.supplier-doc-entry-mode {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #c7d9ee;
  border-radius: 3px;
  background: #f4f9ff;
  white-space: nowrap;
}

.supplier-doc-basic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px 20px;
  padding: 14px 20px 16px;
}

.supplier-doc-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.supplier-doc-field.is-wide {
  grid-column: span 2;
}

.supplier-doc-field span {
  color: #111827;
  font-size: 12px;
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.supplier-doc-field em {
  margin-right: 3px;
  color: #ff3850;
  font-style: normal;
}

.supplier-doc-field input,
.supplier-doc-total-remark input,
.supplier-doc-total-remark textarea,
.supplier-doc-payment-row input,
.supplier-doc-payment-row select {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #cbd6e2;
  border-radius: 0;
  background: #f8fbff;
  color: #111827;
  font: inherit;
  font-size: 13px;
  padding: 0 8px;
}

.supplier-doc-field.is-system-generated input {
  color: #111827;
  background: #f3f7fb;
  font-weight: 700;
}

.supplier-doc-fixed-operator {
  grid-template-columns: minmax(0, 1fr);
}

.supplier-doc-fixed-operator input,
.supplier-purchase-form [data-fixed-current-operator="1"] {
  border-right: 1px solid #cbd6e2;
  background: #f3f7fb;
  color: #111827;
  font-weight: 700;
  cursor: default;
}

.supplier-doc-fixed-operator input:focus,
.supplier-purchase-form [data-fixed-current-operator="1"]:focus {
  border-color: #b8c6d5;
  box-shadow: none;
}

.supplier-doc-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
}

.supplier-doc-lookup input {
  border-right: 0;
}

.supplier-doc-lookup.supplier-doc-fixed-operator input {
  border-right: 1px solid #cbd6e2;
}

.supplier-doc-search-lookup {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.supplier-doc-search-lookup::before {
  content: "\2315";
  position: absolute;
  left: 8px;
  top: 50%;
  z-index: 2;
  color: #5f7184;
  font-size: 16px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.supplier-doc-search-lookup input {
  border-right: 1px solid #cbd6e2;
  padding-left: 26px;
}

.supplier-doc-date-lookup {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.supplier-doc-date-lookup::before {
  content: "";
  position: absolute;
  left: auto;
  right: 8px;
  top: 50%;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 1px solid #66788a;
  border-radius: 2px;
  background:
    linear-gradient(#66788a, #66788a) 0 3px / 100% 1px no-repeat,
    linear-gradient(#66788a, #66788a) 3px 0 / 1px 4px no-repeat,
    linear-gradient(#66788a, #66788a) 9px 0 / 1px 4px no-repeat;
  box-sizing: border-box;
  transform: translateY(-50%);
  pointer-events: none;
}

.supplier-doc-date-lookup input {
  border-right: 1px solid #cbd6e2;
  padding-left: 7px;
  padding-right: 30px;
}

.supplier-doc-date-lookup:has(.clearable-control-button)::before {
  right: 26px;
}

.supplier-doc-date-lookup:has(.clearable-control-button) input {
  padding-right: 48px !important;
}

.supplier-doc-date-lookup .clearable-control-button,
.supplier-doc-date-lookup .clearable-control.is-date .clearable-control-button {
  right: 3px;
}

.supplier-doc-lookup > button {
  height: 28px;
  border: 1px solid #cbd6e2;
  border-left: 0;
  background: #f8fbff;
  color: #7b8794;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
}

.supplier-doc-lookup > button:hover,
.supplier-doc-lookup > button:focus {
  color: #1e80ff;
  outline: 0;
}

.supplier-doc-supplier-field .supplier-doc-lookup,
.supplier-doc-quick-add-field .supplier-doc-lookup,
.supplier-doc-line-lookup {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.supplier-doc-supplier-field .supplier-doc-search-lookup {
  grid-template-columns: minmax(0, 1fr);
}

.supplier-doc-reference-lookup,
.supplier-doc-supplier-field .supplier-doc-reference-lookup,
.supplier-doc-quick-add-field .supplier-doc-reference-lookup,
.supplier-doc-line-lookup.supplier-doc-reference-lookup {
  grid-template-columns: minmax(0, 1fr);
}

.supplier-doc-reference-lookup input {
  border-right: 1px solid #cbd6e2;
}

.supplier-doc-search-lookup:has([data-reference-selection-state]):focus-within:not(:has([data-reference-selection-state="selected"]))::before {
  opacity: 0;
}

.supplier-doc-search-lookup:has([data-reference-selection-state="selected"])::before {
  content: "✓";
  color: #1261c9;
  font-size: 15px;
  font-weight: 900;
  opacity: 1;
}

.supplier-doc-search-lookup:has([data-reference-selection-state]) .clearable-control::before {
  display: none;
}

.supplier-doc-search-lookup:has([data-reference-selection-state]) input[data-reference-selection-state="empty"]:focus,
.supplier-doc-search-lookup:has([data-reference-selection-state]) input[data-reference-selection-state="draft"] {
  padding-left: 8px;
}

[data-reference-selection-state="selected"] {
  color: #0d4fb3 !important;
  font-weight: 700 !important;
}

.clearable-control:has(> [data-reference-selection-state])::before {
  content: "\2315";
  position: absolute;
  left: 8px;
  top: 50%;
  z-index: 2;
  color: #5f7184;
  font-size: 16px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.clearable-control.is-select:has(> [data-reference-selection-state="empty"])::before,
.clearable-control:has(> [data-reference-selection-state="draft"])::before,
.clearable-control:has(> [data-reference-selection-state="empty"]:focus)::before {
  opacity: 0;
}

.clearable-control:has(> [data-reference-selection-state="selected"])::before {
  content: "✓";
  color: #1261c9;
  font-size: 15px;
  font-weight: 900;
  opacity: 1;
}

.clearable-control:has(> [data-reference-selection-state]) > input {
  padding-left: 26px !important;
}

.clearable-control:has(> input[data-reference-selection-state="selected"]) > input {
  padding-left: 26px !important;
}

.clearable-control:has(> [data-reference-selection-state="draft"]) > input,
.clearable-control:has(> [data-reference-selection-state="empty"]:focus) > input {
  padding-left: 8px !important;
}

.clearable-control:has(> [data-reference-selection-state="empty"]) > input,
.clearable-control:has(> [data-reference-selection-state="draft"]) > input {
  font-weight: 400 !important;
}

.clearable-control > select[data-reference-selection-state="selected"] {
  padding-left: 26px;
}

.clearable-control:has(> [data-reference-selection-state="empty"]) .clearable-control-button {
  display: none;
}

.shortage-fabric-picker:has([data-reference-selection-state]),
.shortage-style-id-picker:has([data-reference-selection-state]) {
  position: relative;
}

.shortage-fabric-picker:has([data-reference-selection-state])::before,
.shortage-style-id-picker:has([data-reference-selection-state])::before {
  content: "\2315";
  position: absolute;
  left: 5px;
  top: 50%;
  z-index: 2;
  color: #5f7184;
  font-size: 14px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.shortage-fabric-picker:has([data-reference-selection-state="selected"])::before,
.shortage-style-id-picker:has([data-reference-selection-state="selected"])::before {
  content: "✓";
  color: #1261c9;
  font-weight: 900;
}

.shortage-fabric-picker:has([data-reference-selection-state="draft"])::before,
.shortage-style-id-picker:has([data-reference-selection-state="draft"])::before,
.shortage-fabric-picker:has([data-reference-selection-state="empty"]:focus)::before,
.shortage-style-id-picker:has([data-reference-selection-state="empty"]:focus)::before {
  opacity: 0;
}

.shortage-fabric-picker [data-reference-selection-state],
.shortage-style-id-picker [data-reference-selection-state] {
  padding-left: 20px;
}

.shortage-fabric-picker [data-reference-selection-state="draft"],
.shortage-style-id-picker [data-reference-selection-state="draft"],
.shortage-fabric-picker [data-reference-selection-state="empty"]:focus,
.shortage-style-id-picker [data-reference-selection-state="empty"]:focus {
  padding-left: 2px;
}

.shortage-fabric-picker:has([data-reference-selection-state="empty"]) .shortage-fabric-clear,
.shortage-style-id-picker:has([data-reference-selection-state="empty"]) .shortage-style-id-clear {
  display: none;
}

.supplier-doc-date-lookup .clearable-control > input {
  padding-right: 20px !important;
}

.selection-search-popup-date {
  width: 238px;
}

.purchase-date-popup-head .purchase-date-today {
  min-width: 42px;
}

.purchase-date-panel {
  padding: 8px;
}

.purchase-date-month,
.purchase-date-weekdays,
.purchase-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.purchase-date-month {
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.purchase-date-month strong {
  text-align: center;
  color: #123047;
  font-size: 13px;
}

.purchase-date-month button,
.purchase-date-day {
  height: 28px;
  border: 1px solid #d7e2ec;
  background: #ffffff;
  color: #123047;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.purchase-date-month button:hover,
.purchase-date-month button:focus,
.purchase-date-day:hover,
.purchase-date-day:focus {
  border-color: #2d72e8;
  background: #eaf3ff;
  outline: 0;
}

.purchase-date-weekdays {
  margin-bottom: 4px;
}

.purchase-date-weekdays span {
  color: #6b7b8c;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.purchase-date-grid {
  gap: 2px;
}

.purchase-date-day.is-muted {
  color: #9aa8b6;
  background: #f8fafc;
}

.purchase-date-day.is-today {
  border-color: #93b9ee;
  color: #0f5fb8;
}

.purchase-date-day.is-selected {
  border-color: #1f65c2;
  background: #1f65c2;
  color: #ffffff;
}

.supplier-doc-supplier-field .supplier-doc-lookup > button,
.supplier-doc-quick-add-field .supplier-doc-lookup > button,
.supplier-doc-line-lookup > button {
  color: #0f5fb8;
  font-size: 12px;
  letter-spacing: 0;
}

.supplier-doc-field input:focus,
.supplier-doc-table input:focus,
.supplier-doc-total-remark textarea:focus,
.supplier-doc-payment-row input:focus,
.supplier-doc-payment-row select:focus {
  border-color: #4aa3ff;
  box-shadow: 0 0 0 2px rgba(74, 163, 255, 0.14);
  outline: 0;
}

.supplier-doc-toolbar {
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.supplier-doc-section-title .supplier-doc-more,
.supplier-doc-section-title .supplier-doc-more-menu {
  margin-left: 0;
  color: inherit;
  font-size: inherit;
}

.supplier-doc-toolbar button,
.supplier-doc-toolbar .supplier-doc-photo-tool,
.supplier-doc-section-title .supplier-doc-photo-tool,
.supplier-doc-more-menu button {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #b9c8d8;
  border-radius: 0;
  background: #f8fbff;
  color: #17324d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.supplier-doc-toolbar button:hover,
.supplier-doc-toolbar button:focus,
.supplier-doc-toolbar .supplier-doc-photo-tool:hover,
.supplier-doc-toolbar .supplier-doc-photo-tool:focus,
.supplier-doc-section-title .supplier-doc-photo-tool:hover,
.supplier-doc-section-title .supplier-doc-photo-tool:focus,
.supplier-doc-more-menu button:hover,
.supplier-doc-more-menu button:focus {
  border-color: #2d72e8;
  background: #eef6ff;
  color: #0f5fb8;
  outline: 0;
}

.supplier-doc-photo-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.supplier-doc-photo-tool input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.supplier-doc-title-photo-tool {
  margin-left: auto;
}

.supplier-doc-more {
  position: relative;
  display: inline-flex;
}

.supplier-doc-more-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  display: none;
  min-width: 112px;
  padding: 4px;
  border: 1px solid #cbd6e2;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 35, 55, 0.14);
}

.supplier-doc-more.is-open .supplier-doc-more-menu {
  display: grid;
  gap: 4px;
}

.supplier-doc-more-menu button {
  width: 100%;
  background: #ffffff;
  text-align: left;
}

.supplier-doc-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  height: auto;
  min-height: 0;
  max-height: min(340px, calc(100vh - 470px));
  border: 1px solid #d7e0ea;
  border-bottom: 0;
  background: #ffffff;
}

.supplier-doc-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.supplier-doc-matrix-table {
  min-width: 0;
  border: 0;
}

.supplier-doc-table th,
.supplier-doc-table td {
  height: 32px;
  border: 1px solid #dbe2ea;
  padding: 0 3px;
  text-align: center;
  vertical-align: middle;
}

.supplier-doc-table th {
  height: 28px;
  background: #f2f5f8;
  color: #2a3340;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-doc-table td {
  background: #ffffff;
}

.supplier-doc-table .is-active-line td {
  background: #edf5ff;
}

.supplier-doc-table input {
  width: 100%;
  height: 26px;
  border: 1px solid #c7d4e1;
  border-radius: 3px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  padding: 0 3px;
}

.supplier-doc-table input[readonly] {
  border-color: transparent;
  background: transparent;
}

.supplier-doc-matrix-table th,
.supplier-doc-matrix-table td {
  border-color: #e1e7ef;
}

.supplier-doc-matrix-table th {
  height: 32px;
  background: #f6f8fb;
  color: #1f2937;
  font-size: 12px;
  font-weight: 800;
}

.supplier-doc-matrix-table td {
  height: 44px;
  background: #fbfdff;
}

.supplier-doc-matrix-table .is-active-line td {
  background: #fbfdff;
}

.supplier-doc-matrix-table input {
  height: 28px;
  border-color: #cbd6e2;
  background: #ffffff;
  text-align: center;
}

.supplier-doc-matrix-table input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.supplier-doc-matrix-table input[type="number"]::-webkit-outer-spin-button,
.supplier-doc-matrix-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.supplier-doc-matrix-table input[readonly] {
  border-color: transparent;
  background: transparent;
  color: #1f2937;
  font-weight: 600;
}

.supplier-doc-matrix-table input:focus {
  border-color: #4aa3ff;
  background: #f8fbff;
}

.supplier-doc-matrix-table .doc-col-no {
  width: 44px;
}

.supplier-doc-matrix-table .doc-col-code {
  width: 128px;
}

.supplier-doc-matrix-table .doc-col-name {
  width: 190px;
}

.supplier-doc-matrix-table .doc-col-convert {
  width: 66px;
}

.supplier-doc-matrix-table .doc-col-unit {
  width: 62px;
}

.supplier-doc-matrix-table .doc-col-price {
  width: 70px;
}

.supplier-doc-matrix-table .doc-col-amount {
  width: 78px;
}

.supplier-doc-matrix-table .doc-col-note {
  width: 150px;
}

.supplier-doc-matrix-table [data-purchase-line-field="productSearch"],
.supplier-doc-matrix-table [data-purchase-line-field="itemName"],
.supplier-doc-matrix-table [data-purchase-line-field="unit"],
.supplier-doc-line-amount-cell,
.supplier-doc-matrix-table .doc-col-note input {
  text-align: center;
}

.supplier-doc-line-amount-cell {
  color: #111827;
  font-weight: 400;
}

.supplier-doc-line-amount-value {
  display: inline-block;
  min-width: 62px;
  text-align: right;
}

.supplier-doc-conversion-cell {
  color: #111827;
  font-weight: 700;
}

.supplier-doc-conversion-text {
  display: inline-block;
  min-width: 58px;
  text-align: center;
}

.supplier-purchase-doc-form[data-purchase-matrix-mode="finished"] .supplier-doc-raw-only,
.supplier-purchase-doc-form[data-purchase-matrix-mode="finished"] .supplier-doc-raw-detail-extra {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.supplier-purchase-doc-form[data-purchase-matrix-mode="finished"] col.supplier-doc-raw-only,
.supplier-purchase-doc-form[data-purchase-matrix-mode="finished"] col.supplier-doc-raw-detail-extra {
  width: 0 !important;
  min-width: 0;
  max-width: 0;
  display: none !important;
  visibility: collapse;
}

.supplier-purchase-doc-form[data-purchase-matrix-mode="finished"] .supplier-doc-matrix-table {
  min-width: 0;
}

.supplier-doc-table tfoot td {
  height: 38px;
  border-top: 2px solid #8797ab;
  border-bottom: 1px solid #aebdcc;
  background: #e9eef5;
  color: #111827;
  font-weight: 900;
}

.supplier-doc-summary-row td {
  background: #e9eef5 !important;
}

.supplier-doc-summary-label {
  text-align: right;
  color: #111827;
  background: #dde6f0 !important;
}

.supplier-doc-summary-number,
.supplier-doc-summary-amount {
  text-align: center;
}

.supplier-doc-summary-amount {
  color: #111827;
  text-align: right;
}

.supplier-doc-summary-number,
.supplier-doc-summary-amount {
  background: #edf2f7 !important;
}

.supplier-doc-total-remark {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px;
  border-top: 1px solid #e5ebf1;
  background: #ffffff;
}

.supplier-doc-total-remark label {
  align-self: center;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.supplier-doc-total-remark input,
.supplier-doc-total-remark textarea {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  resize: none;
  padding: 2px 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 23px;
  white-space: nowrap;
}

.supplier-doc-total-remark input:focus,
.supplier-doc-total-remark textarea:focus {
  border-color: #9fc2eb;
  background: #f8fbff;
  outline: 0;
  box-shadow: none;
}

.supplier-doc-image-attachments {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 92px;
  padding: 0 12px 12px;
  border-top: 1px solid #e5ebf1;
  background: #ffffff;
}

.supplier-doc-image-head {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.supplier-doc-image-head > label {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.supplier-doc-image-actions {
  min-height: 28px;
}

.supplier-doc-image-add-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 72px;
  padding: 0 10px;
  border: 1px solid #8fb3d9;
  background: #f4f9ff;
  color: #0b5cab;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.supplier-doc-image-add-btn:hover,
.supplier-doc-image-add-btn:focus-within {
  border-color: #2d72e8;
  background: #eef6ff;
  color: #0f5fb8;
}

.supplier-doc-image-add-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.supplier-doc-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 66px);
  gap: 8px;
  align-items: start;
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
}

.supplier-doc-image-saved-metadata {
  grid-column: span 3;
  min-width: 0;
  list-style: none;
}

.supplier-doc-image-saved-metadata .standard-attachment-list { display: block; }

.supplier-doc-image-saved-metadata .standard-attachment-item {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.supplier-doc-image-card {
  position: relative;
  min-width: 0;
  width: 66px;
  height: 66px;
  display: block;
  padding: 2px;
  border: 1px solid #d5e0ea;
  background: #f9fbfd;
}

.supplier-doc-image-card.is-uploading {
  border-color: #9bbdf0;
  background: #f2f7ff;
}

.supplier-doc-image-card.is-error {
  border-color: #f3a7b3;
  background: #fff7f8;
}

.supplier-doc-image-card.is-removal-pending {
  border-color: #e35368;
  background: #fff2f4;
  opacity: 0.74;
}

.supplier-doc-image-card.is-removal-pending::after {
  content: "\5F85\5220\9664";
  position: absolute;
  inset: auto 2px 2px;
  padding: 1px 2px;
  background: rgba(184, 28, 55, 0.88);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.supplier-doc-image-card.is-removal-pending .supplier-doc-image-remove {
  border-color: #8fb3d9;
  color: #0b5cab;
}

.supplier-doc-image-removal-summary {
  grid-column: span 2;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border: 1px dashed #e35368;
  background: #fff7f8;
  color: #9e2136;
  font-size: 12px;
  font-weight: 700;
}

.supplier-doc-image-removal-summary button {
  min-height: 26px;
  padding: 2px 9px;
  border: 1px solid #9bb6d4;
  border-radius: 2px;
  background: #ffffff;
  color: #0b5cab;
  font: inherit;
  cursor: pointer;
}

.supplier-doc-image-thumb {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #c8d7e8;
  background: #ffffff;
  overflow: hidden;
}

.supplier-doc-image-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #ffffff;
}

.supplier-doc-image-thumb-empty {
  background:
    linear-gradient(135deg, transparent 48%, #d7e1ec 49%, #d7e1ec 51%, transparent 52%),
    #f5f7fa;
}

.supplier-doc-image-meta {
  display: none;
  min-width: 0;
  gap: 2px;
}

.supplier-doc-image-meta strong,
.supplier-doc-image-meta span,
.supplier-doc-image-meta em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-doc-image-meta strong {
  color: #17324d;
  font-size: 12px;
  font-weight: 800;
}

.supplier-doc-image-meta span,
.supplier-doc-image-meta em {
  color: #667085;
  font-size: 11px;
  font-style: normal;
}

.supplier-doc-image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.86);
  color: #64748b;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  line-height: 16px;
}

.supplier-doc-image-remove:hover,
.supplier-doc-image-remove:focus-visible {
  border-color: #f2a7b4;
  color: #cf3049;
  outline: none;
}

.supplier-doc-image-empty {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px dashed #d5e0ea;
  background: #f9fbfd;
  color: #64748b;
  font-size: 12px;
}

.supplier-purchase-doc-form .supplier-doc-image-attachments {
  display: block;
  min-height: 0;
  padding: 8px 12px 12px;
}

.supplier-purchase-doc-form .supplier-doc-image-list.supplier-doc-image-entry-list {
  grid-template-columns: repeat(auto-fill, 72px);
  gap: 8px;
  padding: 0;
}

.supplier-purchase-doc-form .supplier-doc-image-list.supplier-doc-image-entry-list .supplier-doc-image-card {
  width: 72px;
  height: 72px;
}

.supplier-purchase-doc-form .supplier-doc-image-add-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.supplier-purchase-doc-form .supplier-doc-image-add-tile {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px dashed #8fb3d9;
  background: #fbfdff;
  color: #0b5cab;
  cursor: pointer;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.supplier-purchase-doc-form .supplier-doc-image-add-tile:hover,
.supplier-purchase-doc-form .supplier-doc-image-add-tile:focus-within {
  border-color: #2d72e8;
  background: #eef6ff;
  color: #0f5fb8;
  outline: none;
}

.supplier-purchase-doc-form .supplier-doc-image-add-tile input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.supplier-purchase-doc-form .supplier-doc-image-remove {
  z-index: 2;
}

.doc-col-no {
  width: 58px;
}

.doc-col-img {
  width: 90px;
}

.doc-col-code {
  width: 170px;
}

.doc-col-name {
  width: 270px;
}

.doc-col-note {
  width: 210px;
}

.supplier-doc-matrix-table .doc-col-row-action {
  width: 44px;
}

.supplier-doc-image-placeholder {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 1px dashed #d2dbe5;
  background: #f5f7fa;
}

.supplier-doc-empty-line td {
  color: #8a96a3;
  text-align: left;
}

.supplier-doc-clear-line {
  border: 0;
  background: transparent;
  color: #ff3850;
  font-weight: 800;
}

.supplier-doc-line-action-cell {
  padding: 0;
}

.supplier-doc-delete-line {
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 20px;
}

.supplier-doc-delete-line:hover,
.supplier-doc-delete-line:focus-visible {
  border-color: #f2a7b4;
  background: #fff5f6;
  color: #cf3049;
  outline: none;
}

.supplier-doc-amount-line {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid #e2e8ef;
  background: #ffffff;
}

.supplier-doc-amount-line strong,
.supplier-doc-payment-row strong {
  color: #111827;
  font-size: 14px;
}

.supplier-doc-amount-line em,
.supplier-doc-payment-row em {
  color: #ff2f42;
  font-style: normal;
  font-size: 18px;
  font-weight: 500;
}

.supplier-doc-amount-line label,
.supplier-doc-payment-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  font-weight: 700;
}

.supplier-doc-amount-line input {
  width: 200px;
  height: 28px;
  border: 1px solid #cbd6e2;
  padding: 0 8px;
}

.supplier-doc-payment-row {
  min-height: 42px;
  display: grid;
  grid-template-columns:
    minmax(132px, .84fr)
    minmax(150px, .98fr)
    minmax(176px, 1.08fr)
    minmax(262px, 1.58fr)
    minmax(176px, 1.08fr)
    minmax(150px, .98fr)
    minmax(228px, 1.5fr);
  align-items: center;
  column-gap: 24px;
  row-gap: 10px;
  padding: 8px 18px;
  overflow-x: auto;
  background: #ffffff;
}

.supplier-doc-payment-row label,
.supplier-doc-payment-row strong,
.supplier-doc-payment-row > span {
  color: #111827;
  font-weight: 700;
  white-space: nowrap;
}

.supplier-doc-payment-item {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.supplier-doc-payment-item em {
  min-width: 0;
  text-align: left;
  flex: 0 0 auto;
}

.supplier-doc-payment-account select {
  min-width: 0;
  width: 100%;
}

.supplier-doc-payment-discount input,
.supplier-doc-payment-amount input {
  width: 100%;
  min-width: 86px;
}

.supplier-doc-payment-row > span b {
  font-size: 15px;
}

.supplier-doc-payment-counterparty {
  min-width: 0;
  color: #1d4f91 !important;
}

.supplier-doc-payment-counterparty em {
  min-width: 0;
  text-align: left;
  flex: 0 0 auto;
}

.supplier-doc-payment-counterparty span {
  overflow: visible;
  text-overflow: clip;
}

.sales-customer-balance-link {
  border: 0;
  padding: 0;
  color: #075dbb;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-decoration: underline dotted rgba(7, 93, 187, .68);
  text-underline-offset: 3px;
}

.sales-customer-balance-link:hover,
.sales-customer-balance-link:focus-visible {
  color: #034a98;
  text-decoration-style: solid;
}

.sales-customer-ledger-dialog {
  width: min(1040px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.sales-customer-ledger-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-bottom: 1px solid #d9e2ed;
  background: #f8fbff;
}

.sales-customer-ledger-summary strong {
  font-size: 15px;
}

.sales-customer-ledger-summary span {
  color: #526273;
}

.sales-customer-ledger-summary em {
  margin-left: 8px;
  color: #e12739;
  font-size: 18px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.sales-customer-ledger-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #e4ebf3;
}

.sales-customer-ledger-tabs button {
  min-width: 96px;
  height: 30px;
  border: 1px solid #b8c8db;
  color: #38516d;
  background: #fff;
  cursor: pointer;
}

.sales-customer-ledger-tabs button.active,
.sales-customer-ledger-tabs button[aria-pressed="true"] {
  border-color: #1677d2;
  color: #fff;
  background: #1677d2;
}

.sales-customer-ledger-table-wrap {
  min-height: 160px;
  overflow: auto;
  padding: 0 16px 12px;
}

.sales-customer-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sales-customer-ledger-table th,
.sales-customer-ledger-table td {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d7e0eb;
  white-space: nowrap;
  text-align: left;
}

.sales-customer-ledger-table th {
  background: #fff1b6;
  color: #26384d;
}

.sales-customer-ledger-table td.sales-customer-ledger-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sales-customer-ledger-empty {
  height: 120px;
  color: #718198;
  text-align: center !important;
}

.supplier-doc-payment-row select {
  width: 100%;
}

.supplier-doc-payment-row input {
  width: 100%;
}

.finance-view,
.finance-panel,
.finance-board {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.finance-panel {
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}

.finance-reconcile-workspace {
  display: flex;
  min-height: calc(100vh - 154px);
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  color: #10233f;
  background: #f4f7fb;
}

.finance-reconcile-toolbar,
.finance-query-fields,
.finance-query-result {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.finance-reconcile-toolbar {
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid #b8c9dc;
  background: #ffffff;
}

.finance-reconcile-status,
.finance-query-result {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
}

.finance-reconcile-status button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #bfd0e5;
  background: #fff;
  color: #19589f;
  cursor: pointer;
}

.finance-reconcile-toolbar {
  min-height: 46px;
}

.finance-query-fields {
  min-width: 0;
}

.finance-reconcile-toolbar label {
  display: grid;
  gap: 3px;
  color: #425775;
  font-size: 11px;
  font-weight: 700;
}

.finance-reconcile-toolbar input {
  width: 132px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #b7c8dc;
  border-radius: 2px;
  color: #0e315c;
  background: #fff;
  box-sizing: border-box;
  font: 12px "Microsoft YaHei", sans-serif;
}

.finance-reconcile-toolbar input.finance-query-main,
.finance-reconcile-toolbar .finance-query-main input {
  width: min(340px, 28vw);
}

.finance-boundary-note {
  border-left: 3px solid #f59e0b;
  background: #fff8e8;
  color: #8a5300;
  padding: 9px 12px;
  font-size: 13px;
}

.finance-error {
  color: #d92d20;
}

.finance-table-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 360px;
  max-height: calc(100vh - 278px);
  overflow: auto;
  border: 1px solid #b8c9dc;
  background: #ffffff;
}

.finance-reconcile-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #132238;
  font: 12px "Microsoft YaHei", sans-serif;
}

.finance-reconcile-table th,
.finance-reconcile-table td {
  height: 34px;
  padding: 4px 7px;
  overflow: hidden;
  border-right: 1px solid #c9d5e2;
  border-bottom: 1px solid #c9d5e2;
  box-sizing: border-box;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.finance-reconcile-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 38px;
  padding: 2px 4px;
  color: #101828;
  background: #fff0ad;
  font-weight: 800;
  text-align: center;
}

.finance-reconcile-table tbody tr:nth-child(even):not(.standard-list-summary-row):not(.standard-list-page-state-row) td {
  background: #f8fbff;
}

.finance-reconcile-table tbody tr:hover:not(.standard-list-summary-row):not(.standard-list-page-state-row) td {
  background: #eef6ff;
}

.finance-structural-head,
.finance-header-field,
.finance-header-filter-shell,
.finance-header-filter-open {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 26px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.finance-header-filter-shell {
  position: relative;
  border: 1px solid #cad4df;
  background: #ffffff;
}

.finance-header-filter-shell.is-active {
  border-color: #a8c9ec;
  background: #e7f2ff;
}

.finance-header-filter-open {
  padding: 0 18px 0 5px;
  overflow: hidden;
  border: 0;
  color: #111827;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

input.finance-header-filter-input {
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: 0;
}

input.finance-header-filter-input::-webkit-search-cancel-button {
  display: none;
}

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

.finance-header-filter-shell.is-active .finance-header-filter-open {
  color: #075fbd;
}

.finance-header-filter-clear {
  position: absolute;
  top: 50%;
  right: 2px;
  z-index: 4;
  width: 16px;
  height: 18px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  color: #075fbd;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.finance-sequence-head,
.finance-sequence-cell {
  text-align: center;
}

.finance-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.finance-operation-head,
.finance-operation-cell {
  text-align: center;
}

.finance-reconcile-workspace .finance-operation-cell {
  white-space: nowrap;
}

.finance-reconcile-workspace .finance-operation-cell .finance-detail-open-button + .finance-detail-open-button {
  margin-left: 4px;
}

.finance-summary-row td {
  height: 56px;
  color: #0c315e;
  background: #edf5ff !important;
  font-weight: 800;
}

.finance-summary-label {
  text-align: center;
}

.finance-empty {
  height: 120px !important;
  color: #64748b !important;
  text-align: center !important;
}

.finance-filter-popup [data-finance-filter-options-host] {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

#financeReconciliationDetailModal .finance-reconciliation-detail-layer {
  z-index: 10080;
}

#financeReconciliationDetailModal .standard-record-detail-dialog.finance-reconciliation-detail-dialog {
  width: min(1330px, calc(100vw - 36px));
  height: min(74vh, 700px);
  min-height: 330px;
}

.finance-reconciliation-detail-body {
  display: flex;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.finance-detail-surface {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 4px;
  padding: 3px 10px 7px;
  background: #f8fafc;
}

.finance-detail-summary-cards {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #c8d6e5;
  border-left: 1px solid #c8d6e5;
  background: #fff;
}

.finance-detail-summary-cards-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.finance-detail-summary-cards > div {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  border-right: 1px solid #c8d6e5;
  border-bottom: 1px solid #c8d6e5;
}

.finance-detail-summary-cards span {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.finance-detail-summary-cards strong {
  overflow: hidden;
  color: #0f365f;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-detail-boundary {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #f0c99f;
  background: #fff8ef;
  color: #9a5412;
  font-size: 12px;
  line-height: 1.4;
}

.finance-detail-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 3px 7px;
  border: 1px solid #c8d6e5;
  background: #fff;
}

.finance-detail-toolbar .supplier-purchase-list-search,
.finance-detail-toolbar .supplier-purchase-list-tool-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.finance-detail-toolbar label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #425775;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.finance-detail-toolbar input {
  height: 26px;
}

.finance-detail-table-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.finance-detail-table th,
.finance-detail-table td {
  height: 32px;
}

.finance-detail-table thead th {
  padding: 3px 4px;
}

.finance-detail-table .finance-header-filter-shell {
  height: 26px;
}

.finance-detail-cell {
  text-align: center;
}

.finance-detail-summary-row td {
  height: 56px;
  background: #edf5ff !important;
  color: #0c315e;
  font-weight: 800;
}

.finance-source-bill-button,
.finance-detail-open-button {
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid #8eb2da;
  border-radius: 2px;
  background: #fff;
  color: #075fbd;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.finance-source-bill-button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-source-bill-button:hover,
.finance-source-bill-button:focus-visible,
.finance-detail-open-button:hover,
.finance-detail-open-button:focus-visible {
  border-color: #075fbd;
  background: #edf5ff;
  outline: 0;
}

.finance-source-unbound {
  color: #64748b;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.finance-detail-state {
  min-height: 110px;
  padding: 18px !important;
  color: #64748b !important;
  text-align: center !important;
}

.finance-detail-state.is-error {
  color: #b42318 !important;
}

.finance-detail-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  color: #64748b;
  font-size: 12px;
}

.finance-detail-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-detail-filter-popup {
  z-index: 10140;
}

.finance-detail-filter-popup [data-finance-detail-filter-options-host] {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#financeReconciliationSourceDocumentModal .finance-source-document-layer {
  z-index: 10120;
}

#financeReconciliationSourceDocumentModal .standard-record-detail-dialog.finance-source-document-dialog {
  width: min(1280px, calc(100vw - 36px));
  height: min(86vh, 900px);
}

.finance-source-document-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 8px;
}

.finance-source-document-native {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.finance-source-document-native .supplier-purchase-detail-panel,
.finance-source-document-native .sales-readonly-surface,
.finance-source-document-native .cut-order-runtime-host,
.finance-source-document-native .finance-inbound-source-readonly {
  min-width: min-content;
}

.finance-inbound-source-readonly {
  display: grid;
  min-width: 980px;
  gap: 10px;
}

.finance-inbound-source-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #c8d6e5;
  border-left: 1px solid #c8d6e5;
  background: #fff;
}

.finance-inbound-source-facts > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px 9px;
  border-right: 1px solid #c8d6e5;
  border-bottom: 1px solid #c8d6e5;
}

.finance-inbound-source-facts span,
.finance-inbound-source-remark > span {
  color: #64748b;
  font-size: 11px;
}

.finance-inbound-source-facts strong {
  overflow: hidden;
  color: #0f365f;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-inbound-source-lines,
.finance-inbound-source-remark {
  border: 1px solid #c8d6e5;
  background: #fff;
}

.finance-inbound-source-lines h3 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #c8d6e5;
  color: #173b68;
  font-size: 14px;
}

.finance-inbound-source-lines > div {
  overflow: auto;
}

.finance-inbound-source-lines table {
  width: 100%;
  border-collapse: collapse;
}

.finance-inbound-source-lines th,
.finance-inbound-source-lines td {
  height: 34px;
  padding: 4px 8px;
  border-right: 1px solid #d5e0ec;
  border-bottom: 1px solid #d5e0ec;
  text-align: center;
}

.finance-inbound-source-lines th {
  background: #fff3b0;
  color: #173b68;
}

.finance-inbound-source-remark {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}

.finance-inbound-source-remark p {
  margin: 0;
  color: #173b68;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .finance-reconcile-workspace {
    min-height: calc(100vh - 132px);
    padding: 5px;
  }

  .finance-reconcile-toolbar,
  .finance-query-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-reconcile-toolbar input.finance-query-main,
  .finance-reconcile-toolbar .finance-query-main input,
  .finance-reconcile-toolbar input,
  .finance-query-fields > button {
    width: 100%;
  }

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

  .finance-detail-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-detail-toolbar,
  .finance-detail-toolbar .supplier-purchase-list-search {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-detail-toolbar .standard-list-query-group,
  .finance-detail-toolbar label,
  .finance-detail-toolbar input {
    width: 100%;
  }
}

.supplier-doc-actions {
  min-height: 82px;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 18px 44px;
  border-top: 1px solid #d9e1e8;
  background: #f0f3f6;
}

.supplier-doc-actions button {
  width: auto;
  min-width: 72px;
  height: 32px;
  min-height: 32px;
  padding: 0 9px;
  box-sizing: border-box;
  line-height: 1;
  white-space: nowrap;
}

.supplier-doc-actions .supplier-doc-draft-btn,
.supplier-doc-actions .supplier-doc-submit-btn {
  border: 1px solid #1f65c2;
  border-radius: 0;
  background: #1f65c2;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.supplier-doc-actions .supplier-doc-draft-btn {
  border-color: #2f557f;
  background: #2f557f;
}

.supplier-doc-actions .supplier-purchase-form-secondary {
  border: 1px solid #d7e0e7;
  background: #ffffff;
  color: #3a4b57;
  border-radius: 0;
}

.supplier-doc-post-btn {
  border: 1px solid #ff3850;
  background: #ffffff;
  color: #ff3850;
  border-radius: 0;
  font-weight: 800;
}

.supplier-doc-void-btn {
  border: 1px solid #f3c0c7;
  background: #fff7f8;
  color: #cf3049;
  border-radius: 0;
  font-weight: 800;
}

.supplier-purchase-doc > .supplier-purchase-form-message {
  margin: 0 10px 8px;
}

.purchase-operator-modal.hidden {
  display: none;
}

.purchase-operator-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
}

.purchase-operator-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 36, 0.36);
}

.purchase-operator-dialog {
  position: relative;
  width: min(1000px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 28px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid #b9c2cc;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(16, 24, 36, 0.28);
  overflow: hidden;
}

.purchase-operator-head {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #f6f7f9;
  border-bottom: 1px solid #e2e7ed;
}

.purchase-operator-head strong {
  color: #111827;
  font-size: 15px;
}

.purchase-operator-head button {
  border: 0;
  background: transparent;
  color: #9aa3ad;
  font-size: 22px;
  cursor: pointer;
}

.manual-dispatch-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(560px, calc(100dvh - 28px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.manual-dispatch-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 12px;
  background: #ffffff;
}

.manual-dispatch-form-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) minmax(140px, 1fr) minmax(120px, 0.9fr) minmax(120px, 0.9fr);
  gap: 10px 12px;
}

.manual-dispatch-field,
.manual-dispatch-size-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.manual-dispatch-field span,
.manual-dispatch-size-field span {
  color: #26384d;
  font-size: 12px;
  font-weight: 850;
}

.manual-dispatch-field input,
.manual-dispatch-size-field input {
  width: 100%;
  height: 31px;
  min-width: 0;
  border: 1px solid #d6dde6;
  background: #f8fbff;
  color: #0f1f33;
  font: inherit;
  padding: 0 8px;
}

.manual-dispatch-field input.field-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.manual-dispatch-field-wide {
  grid-column: span 2;
}

.manual-dispatch-size-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.manual-dispatch-size-field input {
  text-align: center;
}

.manual-dispatch-size-field input::-webkit-outer-spin-button,
.manual-dispatch-size-field input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.manual-dispatch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #e2e7ed;
  background: #f6f7f9;
}

.manual-dispatch-actions button {
  height: 34px;
  min-width: 76px;
  padding: 0 14px;
}

.purchase-operator-toolbar {
  display: grid;
  grid-template-columns: 300px 88px minmax(12px, 1fr) 130px 180px 132px;
  gap: 10px;
  align-items: center;
  padding: 14px 20px 8px;
  background: #ffffff;
}

.purchase-operator-toolbar input {
  height: 31px;
  border: 1px solid #d6dde6;
  padding: 0 10px;
  font: inherit;
}

.purchase-operator-toolbar input[data-purchase-operator-search] {
  border-color: #ff4c61;
}

.purchase-operator-toolbar button {
  height: 31px;
  border: 1px solid #ff4c61;
  background: #ff4c61;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.purchase-operator-toolbar button[data-purchase-operator-add] {
  background: #ffffff;
  color: #ff3850;
}

.purchase-supplier-toolbar {
  grid-template-columns: minmax(220px, 1.2fr) 110px minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(220px, 1fr);
}

.purchase-supplier-modal .purchase-operator-dialog,
.purchase-warehouse-modal .purchase-operator-dialog {
  width: min(660px, calc(100vw - 32px));
  grid-template-rows: auto auto auto;
}

.master-dictionary-reference-modal .purchase-operator-dialog {
  width: min(680px, calc(100vw - 32px));
  grid-template-rows: auto auto auto;
}

.purchase-factory-modal .purchase-operator-dialog,
.purchase-product-modal .purchase-operator-dialog {
  width: min(980px, calc(100vw - 32px));
  grid-template-rows: auto auto auto;
}

.purchase-supplier-modal,
.purchase-warehouse-modal,
.purchase-product-modal,
.master-dictionary-reference-modal,
.ai-recognition-match-modal {
  z-index: 10070;
}

.purchase-product-modal .purchase-operator-dialog {
  width: min(735px, calc(100vw - 32px));
}

.purchase-product-import-modal .purchase-operator-dialog {
  width: min(820px, calc(100vw - 32px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.purchase-product-import-body {
  min-height: 0;
  padding: 14px 16px 12px;
  background: #ffffff;
}

.purchase-product-import-filebar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.purchase-product-import-filepick {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d6dde6;
  background: #f8fbff;
  color: #0f3767;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-product-import-filepick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.purchase-product-import-filebar button {
  height: 34px;
  border: 1px solid #cbd6e2;
  background: #ffffff;
  color: #10243f;
  font-size: 13px;
  font-weight: 800;
}

.purchase-product-import-filebar strong {
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-product-import-result {
  min-height: 20px;
  margin-top: 8px;
  color: #1f4c7d;
  font-size: 13px;
  font-weight: 800;
}

.purchase-product-import-result.is-error {
  color: #b42318;
}

.purchase-product-import-preview {
  min-height: 230px;
  margin-top: 8px;
  border: 1px solid #d6dde6;
  background: #ffffff;
  overflow: hidden;
}

.purchase-product-import-empty {
  min-height: 230px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.purchase-product-import-table-wrap {
  max-height: min(420px, calc(100dvh - 210px));
  overflow: auto;
}

.purchase-product-import-table {
  min-width: 760px;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.purchase-product-import-table th,
.purchase-product-import-table td {
  height: 32px;
  padding: 5px 6px;
  border-right: 1px solid #dce3eb;
  border-bottom: 1px solid #dce3eb;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-product-import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7fb;
  color: #172a44;
  font-weight: 900;
}

.purchase-product-import-table tr.is-ready td:last-child {
  color: #006a44;
  font-weight: 900;
}

.purchase-product-import-table tr.is-blocked td:last-child {
  color: #b42318;
  font-weight: 900;
}

.ai-recognition-doubt-btn {
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid #d97706;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.ai-recognition-doubt-btn:hover {
  background: #ffedd5;
  border-color: #b45309;
}

.ai-recognition-missing-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.purchase-product-import-clipped {
  padding: 7px 10px;
  border-top: 1px solid #dce3eb;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.purchase-slip-recognition-modal {
  place-items: start center;
  padding: 72px 20px 22px;
  pointer-events: none;
}

.purchase-slip-recognition-modal .purchase-operator-backdrop {
  display: none;
}

.purchase-slip-recognition-modal .purchase-operator-dialog {
  pointer-events: auto;
  width: min(980px, calc(100vw - 54px));
  max-height: min(720px, calc(100dvh - 82px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-color: #aeb9c7;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.22);
}

.purchase-slip-recognition-modal .purchase-operator-head {
  height: 38px;
  padding: 0 14px;
}

.purchase-slip-recognition-modal .purchase-operator-foot {
  padding: 10px 14px;
}

@media (max-width: 1080px) {
  .purchase-slip-recognition-modal {
    padding: 66px 14px 18px;
  }

  .purchase-slip-recognition-modal .purchase-operator-dialog {
    width: min(960px, calc(100vw - 28px));
  }

}

.purchase-slip-recognition-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.purchase-slip-photo-pane {
  display: grid;
  gap: 8px;
  align-content: start;
}

.purchase-slip-photo-preview {
  display: grid;
  place-items: center;
  min-height: 210px;
  border: 1px solid #d4dfeb;
  background: #f8fbff;
}

.purchase-slip-photo-frame {
  position: relative;
  width: 100%;
  min-height: 210px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.purchase-slip-photo-preview-trigger {
  width: 100%;
  min-height: 210px;
  display: grid;
  place-items: center;
}

.purchase-slip-photo-preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.purchase-slip-photo-frame.is-recognizing img {
  opacity: 0.48;
}

.purchase-slip-photo-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: rgba(248, 251, 255, 0.52);
}

.purchase-slip-photo-loading span {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(31, 110, 212, 0.2);
  border-top-color: #1f6ed4;
  border-radius: 50%;
  animation: purchase-slip-spin 0.9s linear infinite;
}

.purchase-slip-photo-loading strong {
  color: #1f6ed4;
  font-size: 13px;
  font-weight: 950;
}

@keyframes purchase-slip-spin {
  to {
    transform: rotate(360deg);
  }
}

.purchase-slip-photo-pane strong {
  min-height: 20px;
  color: #40566f;
  font-size: 12px;
  word-break: break-all;
}

.purchase-slip-result-pane {
  min-width: 0;
}

@media (max-width: 1080px) {
  .purchase-slip-recognition-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .purchase-slip-recognition-layout {
    grid-template-columns: 1fr;
  }

  .purchase-slip-confirm-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .purchase-slip-confirm-actions {
    justify-content: flex-start;
  }
}

.purchase-slip-recognition-body .purchase-product-import-preview {
  max-height: min(520px, calc(100dvh - 178px));
  overflow: auto;
  background: #f8fafc;
}

.purchase-slip-inline-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #ccd8e6;
  background: #ffffff;
}

.purchase-slip-inline-summary > div {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-right: 1px solid #e2e8f0;
}

.purchase-slip-inline-summary > div:last-child {
  border-right: 0;
}

.purchase-slip-inline-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.purchase-slip-inline-summary strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.purchase-slip-inline-summary.is-block strong {
  color: #b42318;
}

.purchase-slip-inline-summary.is-warn strong {
  color: #9a5a00;
}

.purchase-slip-inline-review-list {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.purchase-slip-inline-review-item {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #d8e2ee;
  background: #ffffff;
}

.purchase-slip-inline-review-item.is-ok {
  border-color: #9bd5bb;
  background: #f4fff9;
}

.purchase-slip-inline-review-item.is-doubt {
  border-color: #f3c26b;
  background: #fffaf0;
}

.purchase-slip-inline-review-item.is-block {
  border-color: #f3aaaa;
  background: #fff7f7;
}

.purchase-slip-inline-review-item strong,
.purchase-slip-inline-review-item span {
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-slip-inline-review-item span {
  color: #475569;
}

.purchase-slip-inline-review-more,
.purchase-slip-inline-help {
  padding: 6px 8px;
  border: 1px dashed #cbd5e1;
  color: #475569;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.purchase-slip-inline-help {
  margin-top: 4px;
  border-color: #d8e2ee;
  background: #f8fbff;
}

.purchase-slip-confirm-list {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #ccd8e6;
  border-top: 0;
  background: #ffffff;
}

.purchase-slip-confirm-row {
  display: grid;
  grid-template-columns: 116px minmax(150px, 0.82fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #d8e2ee;
  background: #ffffff;
}

.purchase-slip-confirm-row.is-ok {
  border-color: #9bd5bb;
  background: #f4fff9;
}

.purchase-slip-confirm-row.is-doubt {
  border-color: #f3c26b;
  background: #fffaf0;
}

.purchase-slip-confirm-row.is-block {
  border-color: #f3aaaa;
  background: #fff7f7;
}

.purchase-slip-confirm-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.purchase-slip-confirm-label strong,
.purchase-slip-confirm-row > strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-slip-recognized-text,
.purchase-slip-confirm-date-note {
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-slip-confirm-date-note {
  color: #64748b;
}

.purchase-slip-review-select {
  width: 100%;
  height: 30px;
  box-sizing: border-box;
  border: 1px solid #c7d6e6;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  outline: none;
}

.purchase-slip-review-select:focus {
  border-color: #1f6ed4;
  box-shadow: 0 0 0 1px rgba(31, 110, 212, 0.14);
}

.purchase-slip-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.purchase-slip-confirm-actions > button:not(.purchase-slip-maintain-btn) {
  height: 24px;
  padding: 0 9px;
  border: 1px solid #1f6ed4;
  background: #1f6ed4;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.purchase-slip-confirm-actions > button:not(.purchase-slip-maintain-btn):disabled {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #94a3b8;
  cursor: not-allowed;
}

.purchase-slip-ai-anchor {
  position: relative;
  outline: 2px solid transparent;
  outline-offset: -2px;
}

.purchase-slip-ai-anchor.is-ok {
  outline-color: rgba(22, 163, 74, 0.72);
}

.purchase-slip-ai-anchor.is-doubt {
  outline-color: rgba(217, 119, 6, 0.82);
}

.purchase-slip-ai-anchor.is-block {
  outline-color: rgba(220, 38, 38, 0.82);
}

.purchase-slip-ai-note {
  position: absolute;
  left: 6px;
  top: -21px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: min(260px, 100%);
  height: 22px;
  color: #b42318;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
}

.purchase-slip-ai-note.is-ok {
  color: #047857;
}

.purchase-slip-ai-note.is-doubt {
  color: #d97706;
}

.purchase-slip-ai-note.is-block {
  color: #dc2626;
}

.purchase-slip-ai-control.is-ok {
  border-color: #16a34a !important;
}

.purchase-slip-ai-control.is-doubt {
  border-color: #d97706 !important;
}

.purchase-slip-ai-control.is-block {
  border-color: #dc2626 !important;
}

.purchase-slip-review-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #ccd8e6;
  border-bottom: 0;
  background: #ffffff;
}

.purchase-slip-review-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-right: 1px solid #e2e8f0;
}

.purchase-slip-review-summary > div:last-child {
  border-right: 0;
}

.purchase-slip-review-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.purchase-slip-review-summary strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.purchase-slip-review-summary.is-block strong {
  color: #b42318;
}

.purchase-slip-review-summary.is-warn strong {
  color: #a15c00;
}

.purchase-slip-review-section {
  border: 1px solid #ccd8e6;
  background: #ffffff;
}

.purchase-slip-review-section + .purchase-slip-review-section,
.purchase-slip-review-summary + .purchase-slip-review-section {
  margin-top: 10px;
}

.purchase-slip-review-title {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f3f7fb;
}

.purchase-slip-review-title strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.purchase-slip-review-title span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.purchase-slip-review-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(130px, 0.7fr);
  gap: 8px;
  padding: 10px;
}

.purchase-slip-review-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 9px;
  border: 1px solid #d8e2ee;
  background: #ffffff;
}

.purchase-slip-review-card.is-ok {
  border-color: #9bd5bb;
  background: #f4fff9;
}

.purchase-slip-review-card.is-doubt {
  border-color: #f3c26b;
  background: #fffaf0;
}

.purchase-slip-review-card.is-block {
  border-color: #f3aaaa;
  background: #fff7f7;
}

.purchase-slip-review-card.is-warn {
  border-color: #d8e2ee;
  background: #fbfdff;
}

.purchase-slip-review-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.purchase-slip-review-card-head span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.purchase-slip-review-card strong {
  min-width: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-slip-review-card small {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-slip-review-card-action {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.purchase-slip-maintain-btn {
  height: 22px;
  padding: 0 8px;
  border: 1px solid #1f6ed4;
  background: #f4f8ff;
  color: #0f4f9c;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.purchase-slip-maintain-btn:hover {
  border-color: #164f9b;
  background: #e8f1ff;
}

.purchase-slip-status-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid #d8e2ee;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-slip-status-pill.is-ok {
  border-color: #86cdae;
  background: #eafaf2;
  color: #006a44;
}

.purchase-slip-status-pill.is-doubt,
.purchase-slip-status-pill.is-warn {
  border-color: #f0bd63;
  background: #fff7e8;
  color: #9a5a00;
}

.purchase-slip-status-pill.is-block {
  border-color: #f0aaaa;
  background: #fff1f1;
  color: #b42318;
}

.purchase-slip-review-table {
  min-width: 820px;
}

.purchase-slip-review-table td:last-child {
  min-width: 128px;
}

.purchase-slip-review-table .purchase-slip-maintain-btn {
  margin-left: 6px;
}

.purchase-slip-validation-list {
  display: grid;
}

.purchase-slip-validation-item {
  display: grid;
  grid-template-columns: 76px 86px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.purchase-slip-validation-item:last-child {
  border-bottom: 0;
}

.purchase-slip-validation-item strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.purchase-slip-validation-item span:last-child {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.purchase-slip-header-preview {
  border-bottom: 1px solid #dce3eb;
  background: #f8fbff;
}

.purchase-slip-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px;
  gap: 0;
}

.purchase-slip-header-field {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 8px;
  border-right: 1px solid #dce3eb;
  border-bottom: 1px solid #dce3eb;
  color: #1f2937;
}

.purchase-slip-header-field span,
.purchase-slip-header-field em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-slip-header-field strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-slip-header-field.is-suspicious {
  background: #fffaf0;
}

.purchase-slip-header-note {
  padding: 6px 8px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.ai-recognition-match-modal .purchase-operator-dialog {
  width: min(560px, calc(100vw - 36px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.ai-recognition-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  overflow: auto;
}

.ai-recognition-body p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.ai-recognition-candidate-search {
  height: 32px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c7d6e6;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.ai-recognition-candidate-search:focus {
  border-color: #1f6ed4;
  box-shadow: 0 0 0 1px rgba(31, 110, 212, 0.14);
}

.ai-recognition-candidate-list {
  display: grid;
  gap: 6px;
}

.ai-recognition-candidate-empty {
  padding: 10px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.ai-recognition-candidate {
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #d7e2ee;
  background: #ffffff;
  cursor: pointer;
}

.ai-recognition-candidate:hover,
.ai-recognition-candidate:has(input:checked) {
  border-color: #1f6ed4;
  background: #f4f8ff;
}

.ai-recognition-candidate strong {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-recognition-candidate span,
.ai-recognition-candidate em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-audit-modal .purchase-operator-dialog {
  width: min(880px, calc(100vw - 32px));
  grid-template-rows: auto minmax(0, 1fr);
}

.purchase-audit-body {
  min-height: 220px;
  max-height: min(620px, calc(100dvh - 96px));
  padding: 14px 16px 16px;
  overflow: auto;
  background: #ffffff;
}

.purchase-audit-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #c8d4e0;
  background: #ffffff;
}

.purchase-audit-table {
  min-width: 770px;
}

.purchase-audit-table th {
  height: 42px;
}

.purchase-audit-table td {
  height: 38px;
  text-align: left;
}

.purchase-audit-loading,
.purchase-audit-error {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.purchase-audit-error {
  color: #b91c1c;
}

.purchase-supplier-form-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) 140px minmax(160px, 0.8fr) minmax(160px, 0.8fr);
  gap: 12px;
  padding: 16px 18px 14px;
  background: #ffffff;
}

.purchase-reference-form-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.86fr) minmax(150px, 0.86fr) minmax(150px, 0.86fr);
  gap: 10px 12px;
  padding: 14px 18px 12px;
}

.purchase-supplier-modal .purchase-reference-form-grid {
  grid-template-columns: minmax(180px, 1.45fr) minmax(92px, 0.72fr) minmax(116px, 0.9fr) minmax(126px, 0.98fr);
}

.purchase-warehouse-modal .purchase-reference-form-grid {
  grid-template-columns: minmax(150px, 1.28fr) minmax(92px, 0.78fr) minmax(92px, 0.76fr) minmax(104px, 0.88fr) minmax(112px, 0.94fr);
}

.purchase-supplier-modal-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.master-dictionary-reference-modal [data-master-dictionary-reference-related-field][hidden] {
  display: none !important;
}

.master-reference-material-modal .purchase-supplier-modal-field {
  align-content: start;
  align-self: start;
  grid-auto-rows: max-content;
}

.purchase-supplier-modal-field span {
  color: #26384d;
  font-size: 12px;
  font-weight: 800;
}

.purchase-supplier-modal-field em {
  margin-right: 3px;
  color: #ff3850;
  font-style: normal;
}

.purchase-supplier-modal-field input,
.purchase-supplier-modal-field select {
  width: 100%;
  height: 31px;
  min-width: 0;
  border: 1px solid #d6dde6;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.purchase-supplier-modal-field input {
  padding: 0 10px;
}

.purchase-supplier-modal-field select {
  padding: 0 8px;
}

.purchase-supplier-modal-remark {
  grid-column: 1 / -1;
}

.purchase-supplier-modal-code input[readonly] {
  background: #f4f8fb;
  color: #475569;
  cursor: default;
}

.master-dictionary-reference-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.master-dictionary-reference-modal .purchase-supplier-modal-field input[readonly] {
  background: #f4f8fb;
  color: #475569;
  cursor: default;
}

.master-dictionary-delete-protected {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 6px;
  border: 1px solid #d7dee8;
  border-radius: 3px;
  background: #f6f8fb;
  color: #68788c;
  font-size: 12px;
  white-space: nowrap;
}

.master-reference-closure-modal [data-master-reference-stable-identity="1"] {
  background: #f4f8fb;
  color: #475569;
  cursor: default;
}

.master-reference-identity-details {
  grid-column: 1 / -1;
  border: 1px solid #d8e3ee;
  background: #f8fbfe;
  color: #29445f;
}

.master-reference-identity-details summary {
  padding: 8px 10px;
  color: #174b7a;
  font-weight: 800;
  cursor: pointer;
}

.master-reference-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 8px;
}

.master-reference-identity-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.master-reference-identity-grid label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.master-reference-identity-grid input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d5e0ea;
  background: #ffffff;
  color: #475569;
  font: inherit;
}

.master-reference-identity-details p {
  margin: 0;
  padding: 0 10px 9px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.master-reference-material-modal .purchase-operator-dialog {
  width: min(528px, calc(100vw - 32px));
  grid-template-rows: auto auto auto;
}

.master-reference-material-modal .master-reference-material-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(92px, 0.72fr) minmax(116px, 0.9fr) minmax(126px, 0.98fr);
}

.master-reference-material-form-grid [data-master-reference-field-wrap="fabricModel"],
.master-reference-material-form-grid [data-master-reference-field-wrap="fabricName"],
.master-reference-material-form-grid [data-master-reference-field-wrap="materialCode"],
.master-reference-material-form-grid [data-master-reference-field-wrap="materialName"] {
  grid-column: span 2;
}

.master-reference-material-form-grid [data-master-reference-field-wrap="composition"],
.master-reference-material-form-grid [data-master-reference-field-wrap="remark"] {
  grid-column: 1 / -1;
}

.master-reference-fabric-modal .purchase-operator-dialog {
  width: min(688px, calc(100vw - 32px));
}

.master-reference-fabric-modal .master-reference-material-form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="fabricModel"],
.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="fabricName"],
.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="supplierName"],
.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="itemType"],
.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="materialCode"],
.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="materialName"] {
  grid-column: span 3;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="colorName"] {
  grid-column: 1 / span 6;
  grid-row: 2 / span 2;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="unit"] {
  grid-column: 10 / span 3;
  grid-row: 2;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="weight"] {
  grid-column: 7 / span 3;
  grid-row: 4;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="shrinkage"] {
  grid-column: 10 / -1;
  grid-row: 4;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="priceByOriginalYard"] {
  grid-column: 7 / -1;
  grid-row: 3;
}

.master-reference-pricing-basis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}

.master-reference-pricing-basis > .master-reference-pricing-label {
  font-size: 13px;
}

.master-reference-pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: #173a67;
  font-weight: 800;
}

.master-reference-pricing-toggle input {
  width: 16px;
  height: 16px;
}

.master-reference-pricing-basis small {
  grid-column: 1 / -1;
  color: #687c91;
  font-size: 11px;
  line-height: 1.35;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="itemCategory"] {
  grid-column: 7 / span 3;
  grid-row: 2;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="composition"] {
  grid-column: 1 / span 9;
  grid-row: 5;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="remark"] {
  grid-column: 1 / span 6;
  grid-row: 4;
}

.master-reference-fabric-modal .master-reference-material-form-grid .master-reference-material-save-wrap {
  grid-column: 10 / -1;
  grid-row: 5;
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.master-reference-material-save-wrap button {
  min-width: 96px;
  min-height: 36px;
  border: 1px solid #1f6bc8;
  background: #1769c2;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.master-reference-material-save-wrap button:hover,
.master-reference-material-save-wrap button:focus {
  border-color: #0f55a0;
  background: #0f5fb8;
  outline: 0;
}

.master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="composition"] > span {
  align-self: center;
  white-space: nowrap;
}

.master-reference-material-modal .clearable-control:not(.has-value) .clearable-control-button {
  display: none !important;
}

.master-reference-material-modal .purchase-supplier-modal-field input:focus,
.master-reference-material-modal .master-reference-fabric-color-price-row input:focus {
  border-color: #2d72e8;
  outline: 2px solid rgba(45, 114, 232, 0.18);
  outline-offset: -1px;
}

.master-reference-fabric-color-editor-body {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid #d6dde6;
  background: #f8fbfe;
  padding: 8px;
}

.master-reference-fabric-color-price-row i {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, .2);
  border-radius: 50%;
  background: var(--selection-color, #cbd5e1);
}

.master-reference-fabric-color-price-empty {
  display: block;
  padding: 9px 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.master-reference-fabric-color-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.master-reference-fabric-color-search-row button {
  min-width: 66px;
  border: 1px solid #0f74a8;
  background: #0f74a8;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.master-reference-fabric-color-price-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe5ef;
  background: #ffffff;
}

.master-reference-fabric-color-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 44px 48px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 7px;
}

.master-reference-fabric-color-price-row {
  border-bottom: 1px solid #eef3f7;
}

.master-reference-fabric-color-price-row:last-child {
  border-bottom: 0;
}

.master-reference-fabric-color-price-row > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #26384d;
  font-size: 12px;
  font-weight: 800;
}

.master-reference-fabric-color-price-row input {
  height: 27px;
  background: #ffffff;
  font-size: 12px;
}

.master-reference-fabric-color-price-row small {
  color: #687c91;
  font-size: 10px;
  white-space: nowrap;
}

.master-reference-fabric-color-price-row button {
  min-height: 27px;
  border: 1px solid #d6dde6;
  background: #ffffff;
  color: #55708a;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.master-reference-fabric-color-price-row button:hover,
.master-reference-fabric-color-price-row button:focus {
  border-color: #d45a5a;
  color: #b42318;
  outline: 0;
}

@media (max-width: 520px) {
  .master-reference-fabric-color-price-row {
    grid-template-columns: minmax(0, 1fr) 88px 42px;
    gap: 6px;
    padding-inline: 6px;
  }
}

.purchase-operator-foot button[data-purchase-supplier-save],
.purchase-operator-foot button[data-master-dictionary-reference-save],
.purchase-operator-foot button[data-master-reference-closure-save],
.purchase-operator-foot button[data-purchase-warehouse-save],
.purchase-operator-foot button[data-reference-factory-save],
.purchase-operator-foot button[data-purchase-product-save],
.purchase-operator-foot button[data-purchase-product-import-apply] {
  border-color: #0f5fb8;
  background: #0f5fb8;
  color: #ffffff;
}

.purchase-warehouse-form-grid {
  grid-template-columns: minmax(150px, 1.28fr) minmax(92px, 0.78fr) minmax(92px, 0.76fr) minmax(104px, 0.88fr) minmax(112px, 0.94fr);
}

.purchase-factory-form-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
}

.purchase-product-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px 8px;
  padding: 12px 14px 10px;
}

.purchase-product-form-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.purchase-product-form-row-main,
.purchase-product-form-row-secondary {
  grid-template-columns: 104px 78px 86px 86px minmax(180px, 1fr);
}

.purchase-product-form-grid .purchase-supplier-modal-field {
  gap: 5px;
}

.purchase-product-form-grid .purchase-supplier-modal-field input {
  height: 30px;
}

.purchase-product-form-grid .purchase-product-field-code {
  grid-column: 1;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-name {
  grid-column: 5;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-color {
  grid-column: 2;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-unit {
  grid-column: 3;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-price {
  grid-column: 4;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-type {
  grid-column: 1;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-category,
.purchase-product-form-grid .purchase-product-field-spec {
  grid-column: 2;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-spec {
  grid-column: 3;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-supplier {
  grid-column: 4;
  grid-row: 1;
}

.purchase-product-form-grid .purchase-product-field-remark {
  grid-column: 5;
  grid-row: 1;
}

.purchase-supplier-toolbar select,
.purchase-warehouse-form-grid select,
.purchase-product-form-grid select {
  height: 31px;
  border: 1px solid #d6dde6;
  padding: 0 8px;
  font: inherit;
  background: #ffffff;
}

@media (max-width: 880px) {
  .purchase-product-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-product-form-row {
    display: contents;
  }

  .purchase-product-form-grid .purchase-product-field-spec,
  .purchase-product-form-grid .purchase-product-field-unit,
  .purchase-product-form-grid .purchase-product-field-price,
  .purchase-product-form-grid .purchase-product-field-supplier,
  .purchase-product-form-grid .purchase-product-field-color,
  .purchase-product-form-grid .purchase-product-field-code,
  .purchase-product-form-grid .purchase-product-field-name,
  .purchase-product-form-grid .purchase-product-field-type,
  .purchase-product-form-grid .purchase-product-field-category,
  .purchase-product-form-grid .purchase-product-field-remark {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .purchase-supplier-modal .purchase-reference-form-grid,
  .purchase-warehouse-modal .purchase-reference-form-grid,
  .master-dictionary-reference-modal .purchase-reference-form-grid,
  .master-reference-material-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-reference-fabric-modal .master-reference-material-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap] {
    grid-column: auto;
    grid-row: auto;
  }

  .master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="fabricName"],
  .master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="supplierName"],
  .master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="composition"],
  .master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap="remark"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .purchase-supplier-modal .purchase-reference-form-grid,
  .purchase-warehouse-modal .purchase-reference-form-grid,
  .master-dictionary-reference-modal .purchase-reference-form-grid,
  .master-reference-material-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .master-reference-fabric-modal .master-reference-material-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .master-reference-material-form-grid [data-master-reference-field-wrap="fabricModel"],
  .master-reference-material-form-grid [data-master-reference-field-wrap="fabricName"],
  .master-reference-material-form-grid [data-master-reference-field-wrap="materialCode"],
  .master-reference-material-form-grid [data-master-reference-field-wrap="materialName"] {
    grid-column: auto;
  }

  .master-reference-fabric-modal .master-reference-material-form-grid [data-master-reference-field-wrap] {
    grid-column: auto;
  }
}

/* codex-cut-ledger-purchase-list-parity-r484:start */
html:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace),
body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace),
html:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace),
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .app-shell,
body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .main,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) .app-shell,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .main,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) .main {
  display: flex;
  flex-direction: column;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .summary-grid,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) .summary-grid,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) .topbar {
  display: none !important;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar {
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 4px;
  align-items: center;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar-title-row {
  min-height: 30px;
  align-items: center;
  gap: 8px;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar-field.topbar-fixed-title {
  min-height: 30px;
}

body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) #ledgerView,
body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) #ledgerView > .full-panel,
body:has(#ledgerView:not(.hidden) .supplier-purchase-list-only-workspace) .ledger-workspace-host,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) #ledgerView,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) #ledgerView > .full-panel,
body:has(#ledgerView:not(.hidden) .supplier-purchase-detail-page-workspace) .ledger-workspace-host {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#ledgerView > .full-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.ledger-list-workspace .ledger-cell-editor,
.ledger-list-workspace .ledger-image-value {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: 0;
}

.ledger-list-workspace .ledger-row-selected > td,
.cut-order-list-workspace .ledger-row-selected > td {
  background: #fff8d7 !important;
}

.ledger-detail-page-workspace .ledger-detail-image-slot {
  min-width: 140px;
  padding: 6px;
  border: 1px solid #d4dfeb;
  background: #fff;
}

.ledger-detail-page-workspace .ledger-detail-image-preview {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
}
/* codex-cut-ledger-purchase-list-parity-r484:end */

.purchase-operator-table-wrap {
  min-height: 0;
  margin: 0 20px;
  border: 1px solid #dde5ee;
  overflow: auto;
}

.purchase-operator-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.purchase-operator-table th,
.purchase-operator-table td {
  height: 38px;
  border-bottom: 1px solid #e5ebf1;
  padding: 0 10px;
  text-align: left;
}

.purchase-operator-table th {
  height: 30px;
  background: #f5f7fa;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.purchase-operator-table th:nth-child(1),
.purchase-operator-table th:nth-child(2),
.purchase-operator-table td:nth-child(1),
.purchase-operator-table td:nth-child(2) {
  width: 62px;
  text-align: center;
}

.purchase-operator-table tr {
  cursor: pointer;
}

.purchase-operator-table tr.selected td {
  background: #edf5ff;
}

.purchase-operator-radio {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #cfd8e3;
  border-radius: 50%;
  background: #ffffff;
}

.purchase-operator-radio.checked {
  border-color: #ff4c61;
  box-shadow: inset 0 0 0 3px #ffffff;
  background: #ff4c61;
}

.purchase-operator-empty {
  height: 90px;
  color: #8b98a5;
  text-align: center !important;
}

.purchase-operator-foot {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid #e3e8ee;
  background: #ffffff;
}

.master-reference-material-modal .purchase-operator-foot {
  border-top: 0;
}

.purchase-operator-foot span {
  margin-right: auto;
  color: #6b7280;
  font-size: 12px;
}

.purchase-supplier-modal .purchase-operator-foot span:empty,
.purchase-warehouse-modal .purchase-operator-foot span:empty,
.purchase-factory-modal .purchase-operator-foot span:empty,
.purchase-product-modal .purchase-operator-foot span:empty {
  display: none;
}

.purchase-operator-foot button {
  min-width: 80px;
  height: 32px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
}

.purchase-operator-foot button[data-purchase-product-save],
.purchase-operator-foot button[data-purchase-product-import-apply],
.purchase-operator-foot button[data-reference-factory-save] {
  border-color: #0f5fb8;
  background: #0f5fb8;
  color: #ffffff;
}

.purchase-operator-foot button[data-purchase-operator-confirm] {
  border-color: #ff4c61;
  background: #ff4c61;
  color: #ffffff;
}

.shortage-mosaic-block {
  flex: 0 0 var(--shortage-block-width);
  min-width: var(--shortage-block-width);
  overflow: hidden;
}

.block-frame {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.photo-rail {
  background: #e2eadc;
  border-right: 1px solid var(--line);
  display: grid;
  place-items: center;
  min-height: 334px;
  overflow: hidden;
}

.photo-box {
  width: 72px;
  height: 110px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(210, 226, 218, 0.95)),
    linear-gradient(#d7d7d7, #ffffff);
  border: 1px solid #ccd4d0;
  display: grid;
  place-items: center;
  color: #73808a;
  font-size: 12px;
  text-align: center;
  padding: 4px;
}

.matrix-scroll {
  overflow-x: auto;
}

.matrix {
  min-width: 666px;
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.matrix th,
.matrix td {
  position: relative;
  border: 1px solid var(--line);
  height: 32px;
  min-width: 48px;
  padding: 0 5px;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.15;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.resizable-head {
  position: relative;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  cursor: col-resize;
  z-index: 12;
  pointer-events: auto;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 6px;
  width: 2px;
  background: rgba(45, 114, 232, 0.32);
  opacity: 0;
}

.column-resize-handle:hover,
.column-resize-handle.dragging {
  background: rgba(45, 114, 232, 0.28);
}

.column-resize-handle:hover::after,
.column-resize-handle.dragging::after {
  opacity: 1;
}

.row-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  z-index: 7;
  height: 8px;
  cursor: row-resize;
  opacity: 0;
  background: rgba(45, 114, 232, 0.22);
}

.row-resize-handle:hover,
.row-resize-handle.dragging {
  opacity: 1;
  background: rgba(45, 114, 232, 0.45);
}

.summary-item:hover > .row-resize-handle,
.global-tile:hover > .row-resize-handle,
.panel-header:hover > .row-resize-handle,
.archive-card:hover > .row-resize-handle,
.custom-module-body:hover > .row-resize-handle,
.nav-item:hover > .row-resize-handle,
.matrix th:hover > .row-resize-handle,
.matrix td:hover > .row-resize-handle,
.ledger-table th:hover > .row-resize-handle,
.ledger-table td:hover > .row-resize-handle {
  opacity: 1;
}

.ledger-table .row-resize-handle {
  bottom: -6px;
  z-index: 12;
  height: 12px;
}

.ledger-table .row-resize-handle::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  height: 2px;
  background: rgba(45, 114, 232, 0.5);
  border-radius: 999px;
}

.matrix .title-cell {
  height: 34px;
  font-size: 15px;
  font-weight: 800;
  background: #ffffff;
}

.matrix .title-blue {
  color: #1767e8;
}

.matrix .length-cell {
  color: var(--red);
  font-weight: 800;
}

.matrix .ship-date {
  color: var(--red);
  font-weight: 800;
}

.matrix .head-cell,
.matrix .system-cell {
  background: var(--green);
  font-weight: 700;
}

.matrix .label-cell {
  background: #ffffff;
  font-weight: 700;
}

.matrix .green-cell {
  background: var(--shortage-inventory-bg);
}

.matrix .gray-cell {
  background: var(--gray-cell);
}

.matrix .red-text {
  color: var(--shortage-remark-color);
  font-weight: 800;
}

.matrix .blue-text {
  color: var(--shortage-layout-color);
  font-weight: 800;
}

.matrix .teal-text {
  color: var(--teal);
  font-weight: 800;
}

.shortage-matrix,
.cut-matrix {
  width: var(--shortage-block-width);
  min-width: var(--shortage-block-width);
  table-layout: fixed;
}

.shortage-matrix col.label-col,
.cut-matrix col.label-col {
  width: var(--shortage-label-column-width);
}

.shortage-matrix col.size-col,
.cut-matrix col.size-col {
  width: var(--shortage-size-column-width);
}

.shortage-matrix col.total-col,
.cut-matrix col.total-col {
  width: var(--shortage-total-column-width);
}

.shortage-matrix col.bed-col,
.cut-matrix col.bed-col {
  width: var(--shortage-bed-column-width);
}

.shortage-matrix th,
.shortage-matrix td,
.cut-matrix th,
.cut-matrix td {
  height: var(--shortage-row-height);
  min-width: 0;
  padding: 0 3px;
  font-size: var(--shortage-font-size);
  font-weight: var(--shortage-font-weight);
  border: 1px solid #1f1f1f;
  background: #ffffff;
  overflow-wrap: normal;
  word-break: keep-all;
  text-align: center;
  vertical-align: middle;
}

.shortage-matrix .title-cell,
.cut-matrix .title-cell {
  height: var(--shortage-title-row-height);
  font-size: var(--shortage-title-font-size);
  font-weight: var(--shortage-title-font-weight);
}

.shortage-matrix .shortage-main-info-cell {
  color: #145fca;
  background: #ffffff;
  letter-spacing: 0;
}

.shortage-matrix .shortage-style-id-cell {
  padding: 0 2px;
}

.shortage-style-id-picker {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 24px;
}

.shortage-style-id-input {
  width: 100%;
  height: 100%;
  min-height: 24px;
  min-width: 0;
  border: 1px solid #2d72e8;
  background: #f8fbff;
  color: #0f55b3;
  font: inherit;
  font-weight: 900;
  text-align: center;
  padding: 0 15px 0 2px;
  outline: 0;
  box-sizing: border-box;
}

.shortage-style-id-input::placeholder {
  color: rgba(20, 95, 202, 0.58);
  font-weight: 800;
}

.shortage-style-id-input:focus {
  border-color: #145fca;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(20, 95, 202, 0.18);
}

.shortage-style-id-clear {
  position: absolute;
  top: -4px;
  right: -5px;
  width: 15px;
  height: 15px;
  border: 1px solid #9bbdf3;
  border-radius: 50%;
  background: #ffffff;
  color: #5b6977;
  font-size: 12px;
  font-weight: 700;
  line-height: 12px;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.shortage-style-id-clear:hover,
.shortage-style-id-clear:focus {
  border-color: #2d72e8;
  color: #0d4fb3;
  outline: 2px solid rgba(45, 114, 232, 0.16);
}

.shortage-matrix .shortage-custom-cell {
  color: #e1192d;
}

.shortage-matrix .shortage-custom-cell[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: rgba(225, 25, 45, 0.48);
  font-weight: 700;
  pointer-events: none;
}

.shortage-matrix .shortage-custom-cell[data-placeholder]:focus:empty::before {
  color: rgba(225, 25, 45, 0.34);
}

.shortage-matrix .shortage-fabric-cell {
  padding: 0 2px;
}

.shortage-fabric-picker {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 24px;
}

.shortage-fabric-input {
  width: 100%;
  height: 100%;
  min-height: 24px;
  min-width: 0;
  border: 1px solid #b9cde8;
  background: #f8fbff;
  color: #0f55b3;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 0 15px 0 2px;
  outline: none;
  box-sizing: border-box;
}

.shortage-fabric-input::placeholder {
  color: #6f8db7;
  opacity: 1;
}

.shortage-fabric-input:focus {
  border-color: #2d72e8;
  box-shadow: inset 0 0 0 1px rgba(45, 114, 232, 0.18);
  background: #ffffff;
}

.shortage-fabric-clear {
  position: absolute;
  top: -4px;
  right: -5px;
  width: 15px;
  height: 15px;
  border: 1px solid #9bbdf3;
  border-radius: 50%;
  background: #ffffff;
  color: #5b6977;
  font-size: 12px;
  font-weight: 700;
  line-height: 12px;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.shortage-fabric-clear:hover,
.shortage-fabric-clear:focus {
  border-color: #2d72e8;
  color: #0d4fb3;
  outline: 2px solid rgba(45, 114, 232, 0.16);
}

.shortage-fabric-popup {
  position: fixed;
  z-index: 1300;
  max-height: 230px;
  border: 1px solid #8fb7ee;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 36, 66, 0.18);
  overflow: hidden;
}

.shortage-fabric-popup.hidden {
  display: none;
}

.shortage-fabric-popup-add {
  display: inline-flex;
  width: auto;
  height: 24px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  padding: 0 9px;
}

.shortage-fabric-popup-list {
  max-height: 194px;
  overflow-y: auto;
  scrollbar-color: #f05a5a #f5f7fb;
  scrollbar-width: thin;
}

.shortage-fabric-popup-list::-webkit-scrollbar {
  width: 8px;
}

.shortage-fabric-popup-list::-webkit-scrollbar-track {
  background: #f5f7fb;
}

.shortage-fabric-popup-list::-webkit-scrollbar-thumb {
  background: #f05a5a;
  border-radius: 6px;
}

.shortage-fabric-popup-option {
  display: block;
  width: 100%;
  min-height: 28px;
  border: 0;
  border-bottom: 1px solid #edf2f8;
  background: #ffffff;
  color: #12324f;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  padding: 5px 10px;
  cursor: pointer;
}

.shortage-fabric-popup-option:hover,
.shortage-fabric-popup-option:focus,
.shortage-fabric-popup-add:hover,
.shortage-fabric-popup-add:focus {
  background: #e8f1ff;
  outline: none;
}

.shortage-fabric-popup-empty {
  padding: 9px 10px;
  color: #60748c;
  font-size: 12px;
}

.cut-ai-fabric-search-popup {
  position: fixed;
  z-index: 10040;
  max-height: 232px;
  border: 1px solid #8fb7ee;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 36, 66, 0.2);
  overflow: hidden;
}

.cut-ai-fabric-search-popup.hidden {
  display: none;
}

.cut-ai-fabric-search-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 4px;
  align-items: center;
  padding: 5px;
  border-bottom: 1px solid #dbe7f7;
  background: #eef5ff;
}

.cut-ai-fabric-search-title {
  min-width: 0;
  color: #24435f;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-ai-fabric-search-input {
  grid-column: 1 / -1;
  width: 100%;
  height: 26px;
  min-width: 0;
  border: 1px solid #aac5e5;
  background: #ffffff;
  color: #002f72;
  font-size: 12px;
  font-weight: 800;
  padding: 0 7px;
}

.cut-ai-fabric-search-add {
  min-width: 44px;
  height: 24px;
  border: 1px solid #aac5e5;
  background: #ffffff;
  color: #0057b8;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.cut-ai-fabric-search-close {
  width: 26px;
  height: 26px;
  border: 1px solid #aac5e5;
  background: #ffffff;
  color: #0f2c4b;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.cut-ai-fabric-search-list {
  max-height: 194px;
  overflow-y: auto;
  scrollbar-color: #f05a5a #f5f7fb;
  scrollbar-width: thin;
}

.cut-ai-fabric-search-list::-webkit-scrollbar {
  width: 8px;
}

.cut-ai-fabric-search-list::-webkit-scrollbar-track {
  background: #f5f7fb;
}

.cut-ai-fabric-search-list::-webkit-scrollbar-thumb {
  background: #f05a5a;
  border-radius: 6px;
}

.cut-ai-fabric-search-option {
  display: block;
  width: 100%;
  min-height: 28px;
  border: 0;
  border-bottom: 1px solid #edf2f8;
  background: #ffffff;
  color: #12324f;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  padding: 5px 10px;
  cursor: pointer;
}

.cut-ai-fabric-search-option:hover,
.cut-ai-fabric-search-option:focus,
.cut-ai-fabric-search-add:hover,
.cut-ai-fabric-search-add:focus,
.cut-ai-fabric-search-close:hover,
.cut-ai-fabric-search-close:focus {
  background: #e8f1ff;
  outline: none;
}

.cut-ai-fabric-search-empty {
  padding: 9px 10px;
  color: #60748c;
  font-size: 12px;
}

.current-dispatch-meta-label {
  padding: 0;
}

.shortage-dispatch-meta-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 24px;
}

.shortage-dispatch-date-input,
.shortage-dispatch-factory-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 24px;
  border: 1px solid #b9cde8;
  background: #f8fbff;
  color: #0f55b3;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 0 3px;
  outline: none;
  box-sizing: border-box;
}

.shortage-dispatch-date-input:focus,
.shortage-dispatch-factory-input:focus {
  border-color: #2d72e8;
  box-shadow: inset 0 0 0 1px rgba(45, 114, 232, 0.18);
  background: #ffffff;
}

.shortage-dispatch-factory-picker {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
}

.shortage-factory-popup .shortage-fabric-popup-list {
  max-height: 132px;
}

.shortage-matrix tr[data-row-resize-field="headRowHeight"] th,
.cut-matrix tr[data-row-resize-field="headRowHeight"] th {
  height: var(--shortage-head-row-height);
}

.shortage-matrix .length-cell,
.shortage-matrix .ship-date,
.cut-matrix .length-cell,
.cut-matrix .ship-date {
  font-size: var(--shortage-title-font-size);
  white-space: nowrap;
}

.shortage-matrix .label-cell,
.shortage-matrix .head-cell:first-child,
.cut-matrix .label-cell,
.cut-matrix .head-cell:first-child {
  width: var(--shortage-label-column-width);
  white-space: normal;
}

.shortage-matrix .head-cell,
.shortage-matrix .label-cell,
.cut-matrix .head-cell,
.cut-matrix .label-cell {
  font-size: var(--shortage-label-font-size);
  font-weight: var(--shortage-label-font-weight);
  text-align: center;
  vertical-align: middle;
}

.shortage-matrix [data-cell-style-role="detail"],
.cut-matrix [data-cell-style-role="detail"] {
  font-size: var(--shortage-detail-font-size);
  font-weight: var(--shortage-detail-font-weight);
}

.shortage-matrix [data-cell-style-role="total"],
.cut-matrix [data-cell-style-role="total"] {
  width: var(--shortage-total-column-width);
  white-space: nowrap;
  font-size: var(--shortage-total-font-size);
  font-weight: var(--shortage-total-font-weight);
}

.shortage-matrix td[data-cell-style-role="total"],
.cut-matrix td[data-cell-style-role="total"],
.ledger-total-cell,
.migration-total-value {
  font-weight: 800 !important;
}

.shortage-number-positive {
  color: #0f4a9c;
  font-weight: 800;
}

.shortage-number-zero {
  color: #9aa3ad;
  font-weight: 400;
}

.shortage-number-negative {
  color: #a4acb5;
  font-weight: 400;
}

.shortage-matrix tr[data-shortage-row="suggest"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="suggest"] .shortage-total-value {
  color: #0f4a9c;
  font-size: var(--shortage-detail-font-size);
  font-weight: 700;
  background: #ffffff;
}

.shortage-matrix tr[data-shortage-row="suggest"] .shortage-number-positive,
.shortage-matrix tr[data-shortage-row="suggest"] .shortage-number-zero,
.shortage-matrix tr[data-shortage-row="suggest"] .shortage-number-negative {
  color: #0f4a9c;
  font-size: var(--shortage-detail-font-size);
  font-weight: 700;
}

.shortage-matrix tr[data-shortage-row="suggest"] .shortage-total-value {
  font-size: var(--shortage-total-font-size);
  font-weight: var(--shortage-total-font-weight);
}

.shortage-matrix tr[data-shortage-row="available"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="available"] .shortage-total-value,
.shortage-matrix tr[data-shortage-row="forecast"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="forecast"] .shortage-total-value {
  color: #0f4a9c;
  font-size: var(--shortage-detail-font-size);
  font-weight: 400;
}

.shortage-matrix tr[data-shortage-row="available"] .shortage-total-value,
.shortage-matrix tr[data-shortage-row="forecast"] .shortage-total-value {
  font-size: var(--shortage-total-font-size);
  font-weight: var(--shortage-total-font-weight);
}

.shortage-matrix .current-dispatch-row td {
  height: var(--shortage-current-row-height);
}

.shortage-matrix .shortage-manual-row .label-cell {
  background: #ffffff;
  color: #111111;
}

.shortage-matrix .shortage-manual-row .editable {
  background: #ffffff;
  box-shadow: none;
}

.shortage-matrix .shortage-manual-row .blank-manual-label {
  background: #ffffff;
}

.shortage-matrix .shortage-mapped-row .label-cell {
  background: #ffffff;
  color: #111111;
}

.shortage-matrix .shortage-mapped-row td[data-cell-style-role="detail"]:not(.green-cell) {
  background: #ffffff;
}

.shortage-matrix .shortage-mapped-row .green-cell {
  background: #e4f0e5;
}

.shortage-matrix th:nth-last-child(2),
.shortage-matrix td:nth-last-child(2),
.cut-matrix th:nth-last-child(2),
.cut-matrix td:nth-last-child(2) {
  width: var(--shortage-total-column-width);
  white-space: nowrap;
}

.shortage-matrix [data-cell-style-role="bed"],
.cut-matrix [data-cell-style-role="bed"] {
  width: var(--shortage-bed-column-width);
  white-space: nowrap;
  font-size: var(--shortage-bed-font-size);
  font-weight: var(--shortage-bed-font-weight) !important;
}

.shortage-matrix td[data-cell-style-role="bed"],
.cut-matrix td[data-cell-style-role="bed"],
.bed-value-cell,
.ledger-bed-value,
.migration-bed-value {
  color: var(--blue) !important;
  font-weight: 400 !important;
}

.editable {
  background: #ffffff;
  cursor: text;
}

.editable:focus {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  background: #f7fbff;
}

.cell-empty {
  color: transparent;
}

.block-actions {
  display: flex;
  gap: 8px;
  padding: 3px 8px 5px 5px;
  border: 1px solid #1f1f1f;
  border-top: 0;
  background: #f8fbff;
  align-items: flex-start;
  justify-content: space-between;
}

.shortage-block .block-actions {
  display: block;
  box-sizing: border-box;
  min-height: var(--shortage-block-actions-height);
  height: var(--shortage-block-actions-height);
  padding: 1px 4px;
  overflow: hidden;
}

.shortage-block .block-action-row,
.shortage-block .block-actions .action-group {
  align-items: center;
}

.shortage-block .block-action-row {
  height: var(--shortage-action-row-height);
  min-height: var(--shortage-action-row-height);
  gap: var(--shortage-action-gap);
}

.shortage-block .block-actions .action-group {
  gap: var(--shortage-action-gap);
  flex-wrap: nowrap;
  height: var(--shortage-action-row-height);
}

.block-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.shortage-suggest-button {
  min-width: 92px;
  height: 30px;
  color: #117b43;
  border-color: #b9ead0;
  background: #effdf5;
  font-weight: 800;
}

.shortage-status-label {
  min-width: 92px;
  height: 30px;
  color: #117b43;
  border: 1px solid #b9ead0;
  background: #effdf5;
  font-weight: 800;
  user-select: none;
}

.shortage-hide-style-key {
  min-width: 74px;
  height: 30px;
  color: #334155;
  border-color: #cbd5e1;
  background: #ffffff;
  font-weight: 700;
}

.hidden-style-search-notice {
  grid-column: 1 / -1;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
}

.shortage-search-pinned {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--shortage-block-gap);
  align-items: start;
  min-width: max-content;
}

.shortage-search-pinned .hidden-style-search-notice,
.shortage-search-pinned .shortage-style-group {
  margin: 0;
}

.shortage-pin-preview {
  position: fixed;
  top: 92px;
  right: 28px;
  z-index: 1200;
  width: min(920px, calc(100vw - 56px));
  max-height: calc(100vh - 124px);
  display: flex;
  flex-direction: column;
  border: 1px solid #b7c9e8;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.shortage-pin-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e2f3;
  background: #f5f8fd;
}

.shortage-pin-preview-head strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
}

.shortage-pin-preview-head span {
  display: block;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.shortage-pin-preview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.shortage-pin-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.shortage-pin-preview-body .shortage-style-group {
  pointer-events: none;
}

.abnormal-reason {
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 6px;
  border: 1px solid #ffc9cf;
  background: #fff8f8;
  color: #7f1d1d;
  font-size: 11px;
  line-height: 1;
}

.abnormal-reason strong {
  flex: 0 0 auto;
  color: #b4232f;
  font-weight: 800;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-reason-inline {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-weight: 700;
}

.status-abnormal {
  color: #b4232f;
  background: var(--danger-bg);
  border-color: #ffc9cf;
}

.status-normal {
  color: #087443;
  background: var(--ok-bg);
  border-color: #c7ead6;
}

.status-archived {
  color: #5c6670;
  background: #eef1f4;
  border-color: #d6dde3;
}

.action-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.block-actions .ghost-btn,
.block-actions .danger-btn {
  height: 30px;
  padding: 0 12px;
}

.shortage-block .block-actions .shortage-status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--shortage-action-row-height);
  width: var(--shortage-status-label-width);
  min-width: var(--shortage-status-label-width);
  padding: 0;
  border-width: 1px;
  border-style: solid;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: var(--shortage-status-label-font-size);
  line-height: 1;
  text-align: center;
}

.shortage-block .block-actions .shortage-status-label {
  position: relative;
  font-weight: 850;
  flex-direction: column;
  gap: 0;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.shortage-block .block-actions .shortage-status-label,
.shortage-block .block-actions .shortage-status-label.shortage-suggest-primary,
.shortage-block .block-actions .shortage-status-label.shortage-suggest-related {
  width: var(--shortage-status-label-width);
  min-width: var(--shortage-status-label-width);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #111827;
}

.shortage-block .block-actions .shortage-status-label.shortage-suggest-primary {
  border: 0;
  background: transparent;
  color: #078c45;
  font-weight: 950;
}

.shortage-block .block-actions .shortage-status-label.shortage-suggest-related {
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 700;
}

.shortage-block .block-actions .shortage-status-label.shortage-suggest-manual {
  width: var(--shortage-status-label-width);
  min-width: var(--shortage-status-label-width);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #9a3412;
  font-weight: 950;
}

.manual-dispatch-source-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.shortage-block .block-actions .shortage-status-label em {
  display: block;
  width: 100%;
  color: #64748b;
  font-size: var(--shortage-status-label-em-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--shortage-status-label-em-line-height);
  text-align: center;
}

.shortage-block .block-actions .shortage-status-label span {
  display: block;
  width: 100%;
  line-height: var(--shortage-status-label-line-height);
  text-align: center;
}

.shortage-block .block-actions .shortage-suggest-primary {
  color: #ffffff;
  border-color: #9f1f2b;
  background: linear-gradient(#bd2434, #a91727);
}

.shortage-block .block-actions .shortage-suggest-related {
  color: #ffffff;
  border-color: #1d4ed8;
  background: linear-gradient(#2563eb, #1d4ed8);
  font-weight: 800;
}

.unused-dispatch-style-hide-obsolete::before {
  content: "隐藏\A本款";
  color: #ffffff;
  white-space: pre;
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  text-align: center;
}

.unused-dispatch-style-hide-obsolete::before {
  display: block;
  width: 100%;
  line-height: 10px;
}

.shortage-action-abnormal-reason {
  margin: 0;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
}

.shortage-block .block-actions .shortage-action-key {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--shortage-action-key-size);
  width: var(--shortage-action-key-size);
  height: var(--shortage-action-key-size);
  padding: 0;
  border: 1px solid #c9d5e2;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-size: var(--shortage-action-key-font-size);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.shortage-block .block-actions .shortage-confirm-key {
  color: #111111;
  border-color: #64b87b;
  background: linear-gradient(#d9f7df, #8ed99d);
}

.shortage-block .block-actions .shortage-cut-entry-key {
  color: #0f4c2b;
  border-color: #64b87b;
  background: linear-gradient(#ecfff1, #a8e7b6);
}

.shortage-block .block-actions .shortage-cut-photo-key {
  color: #0f3f80;
  border-color: #88b9f3;
  background: linear-gradient(#eef6ff, #b8d8ff);
}

.shortage-block .block-actions .shortage-archive-key {
  border-color: #9f1f2b;
  background: linear-gradient(#bd2434, #a91727);
}

.shortage-block .block-actions .shortage-action-key:focus {
  outline: none;
}

.shortage-block .block-actions .shortage-action-key:focus-visible {
  outline: 2px solid rgba(31, 111, 209, 0.35);
  outline-offset: 2px;
}

.cut-block-actions {
  align-items: flex-start;
}

.cut-block-readonly .cut-matrix {
  cursor: default;
}

.cut-block-readonly .cut-matrix .column-resize-handle,
.cut-block-readonly .cut-matrix .row-resize-handle {
  display: none;
}

.cut-photo-only-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 4px 8px;
  background: #ffffff;
}

.cut-photo-only-actions .cut-capture-btn {
  min-width: 58px;
  height: 31px;
  padding: 0 12px;
  color: #ffffff;
  border: 1px solid #8f1724;
  background: linear-gradient(#d83a46 0%, #b4232f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 2px 0 #76131d,
    0 3px 8px rgba(180, 35, 47, 0.22);
  font-size: 15px;
  font-weight: 800;
}

.cut-photo-only-actions .cut-capture-btn:hover,
.cut-photo-only-actions .cut-capture-btn:focus {
  border-color: #74141d;
  background: linear-gradient(#e34652 0%, #c52735 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 2px 0 #74141d,
    0 0 0 3px rgba(180, 35, 47, 0.16);
  outline: 0;
}

.cut-photo-only-actions .cut-capture-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 4px rgba(80, 0, 0, 0.32),
    0 1px 0 #74141d;
}

.cut-queue-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--shortage-action-gap);
  min-height: var(--shortage-queue-inline-height);
  padding: 0 var(--shortage-queue-inline-padding-x);
  color: #9b1c28;
  border: 1px solid #ffd2d7;
  background: linear-gradient(#fffdfd 0%, #fff1f2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(146, 38, 48, 0.12);
  font-size: var(--shortage-queue-inline-font-size);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.cut-queue-inline strong {
  font-weight: 800;
}

.cut-action-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cut-action-group {
  flex-shrink: 0;
}

.cut-ai-status {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  padding: 0 6px;
  border: 1px solid #cfe0f5;
  background: #f6faff;
  color: #275078;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-photo-input {
  display: none;
}

.cut-photo-input.cut-ai-photo-file-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  display: block;
  overflow: hidden;
  opacity: 0.01;
}

.cut-photo-input.cut-ai-photo-direct-input {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 96px;
  opacity: 0.001;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.cut-ai-modal.hidden {
  display: none;
}

.cut-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
}

.cut-ai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.5);
}

.cut-ai-dialog {
  position: relative;
  width: min(468px, calc(100vw - 8px));
  height: min(820px, calc(100dvh - 8px));
  max-height: calc(100dvh - 8px);
  overflow: hidden;
  border: 1px solid #1c2d42;
  background: #ffffff;
  box-shadow: 0 26px 78px rgba(8, 18, 32, 0.3);
}

.cut-ai-content {
  height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: hidden;
}

.cut-ai-photo-viewer.hidden {
  display: none;
}

.cut-ai-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
}

.cut-ai-photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.72);
}

.cut-ai-photo-viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 28px));
  height: min(860px, calc(100dvh - 28px));
  display: grid;
  place-items: center;
  border: 1px solid #101820;
  background: #ffffff;
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.36);
}

.cut-ai-photo-viewer-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fbff;
}

.cut-ai-photo-viewer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.cut-ai-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fbff;
}

.cut-ai-modal-head h2 {
  margin: 4px 0;
  font-size: 24px;
}

.cut-ai-modal-head p {
  margin: 0;
  color: var(--muted);
}

.cut-ai-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.cut-ai-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #1c2d42;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cut-ai-close:hover {
  border-color: #2f80ed;
  color: #0054d6;
}

.cut-ai-sheet {
  position: relative;
  width: 100%;
  max-width: 468px;
  overflow-x: hidden;
  border: 0;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
}

.cut-ai-sheet-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 38px 5px 6px;
  border-bottom: 1px solid #cfd6dc;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  flex-wrap: wrap;
}

.cut-ai-sheet-title strong {
  font-weight: 900;
}

.cut-ai-sheet-queue {
  margin-left: 6px;
  color: #ff0000;
  font-size: 16px;
}

.cut-ai-sheet-tip {
  padding: 5px 6px;
  border-bottom: 1px solid #cfd6dc;
  color: #7a7a7a;
  font-size: 13px;
  font-weight: 700;
}

.cut-ai-sheet-body {
  display: block;
  min-height: 0;
}

.cut-ai-sheet-form {
  min-width: 0;
  width: 100%;
}

.cut-ai-analysis-box {
  min-height: 70px;
  padding: 7px 10px;
  background: #ffe8d8;
  color: #0000ff;
  font-size: 14px;
  font-weight: 900;
}

.cut-ai-analysis-box strong {
  display: block;
  margin-bottom: 4px;
  color: #111111;
}

.cut-ai-analysis-box strong span {
  color: #ff0000;
}

.cut-ai-analysis-box ol {
  margin: 0;
  padding-left: 20px;
  line-height: 1.5;
}

.cut-ai-consistency-title {
  padding: 5px 0 3px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
}

.cut-ai-band-label {
  width: 145px;
  margin: 8px 0 0;
  padding: 2px 5px;
  background: #d9d9d9;
  font-size: 13px;
  font-weight: 900;
}

.cut-ai-simple-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cut-ai-simple-table th,
.cut-ai-simple-table td {
  height: 32px;
  border: 1px solid #111111;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.cut-ai-simple-table th {
  height: 24px;
  font-size: 13px;
  font-weight: 900;
}

.cut-ai-simple-table input {
  width: 100%;
  height: 100%;
  min-height: 32px;
  border: 0;
  background: #ffffff;
  text-align: center;
  font: inherit;
  font-weight: 800;
}

.cut-ai-simple-table input[readonly] {
  background: #ffffff;
  color: #7030a0;
}

.cut-ai-style-header {
  color: #b36b00;
}

.cut-ai-fabric-header {
  color: #7030a0;
}

.cut-ai-consistency-table th:nth-child(4),
.cut-ai-consistency-table th:nth-child(5),
.cut-ai-order-info-table th {
  font-size: 16px;
}

.cut-ai-material-table td {
  width: 50%;
}

.cut-ai-field-error input,
.cut-ai-simple-table td.cut-ai-field-error input {
  background: #fff1f1;
  color: #b4232f;
}

.cut-ai-invalid-flash,
.cut-ai-invalid-flash input,
.cut-ai-invalid-flash strong,
.cut-ai-invalid-flash output,
input.cut-ai-invalid-flash {
  animation: cut-ai-invalid-field-flash 1.6s ease-in-out 1;
}

[data-cut-ai-fabric-cell].cut-ai-invalid-flash,
[data-cut-ai-fabric-cell].cut-ai-invalid-flash input {
  animation: cut-ai-invalid-fabric-cell-flash 2s ease-in-out 1;
}

@keyframes cut-ai-invalid-field-flash {
  0%,
  100% {
    box-shadow: none;
  }
  14%,
  42%,
  70% {
    border-color: #ff2f2f;
    background: #fff0f0;
    box-shadow: 0 0 0 2px rgba(255, 47, 47, 0.72), inset 0 0 0 2px rgba(255, 47, 47, 0.32);
    color: #c0152f;
  }
  28%,
  56%,
  84% {
    border-color: #ffb000;
    background: #fff8d8;
    box-shadow: 0 0 0 2px rgba(255, 176, 0, 0.65), inset 0 0 0 2px rgba(255, 176, 0, 0.28);
    color: #b4232f;
  }
}

@keyframes cut-ai-invalid-fabric-cell-flash {
  0%,
  100% {
    border-color: #c9d7e8;
    background: #ffffff;
    box-shadow: none;
  }
  14%,
  42%,
  70% {
    border-color: #ff2020;
    background: #fff0f0;
    box-shadow: inset 0 0 0 2px rgba(255, 32, 32, 0.45), 0 0 0 2px rgba(255, 32, 32, 0.38);
  }
  28%,
  56%,
  84% {
    border-color: #ffb000;
    background: #fff8d6;
    box-shadow: inset 0 0 0 2px rgba(255, 176, 0, 0.42), 0 0 0 2px rgba(255, 176, 0, 0.3);
  }
}

.cut-ai-sheet-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  position: sticky;
  bottom: 0;
  margin-top: 10px;
  padding: 8px 8px 10px;
  border-top: 1px solid #cfd6dc;
  background: #ffffff;
}

.cut-ai-sheet-actions button {
  min-height: 44px;
  border: 1px solid #111111;
  border-radius: 0;
  background: #e6e6e6;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
}

.cut-ai-sheet-actions .cut-ai-calc-btn {
  white-space: normal;
  line-height: 1.1;
}

.cut-ai-sheet-actions button[data-cut-ai-action="rephoto"] {
  grid-column: auto;
}

.cut-ai-sheet-actions button[data-cut-ai-action="apply"] {
  grid-column: auto;
}

.cut-ai-sheet-actions button:disabled {
  color: #777777;
  cursor: not-allowed;
  opacity: 0.55;
}

.cut-ai-mobile-sheet {
  width: 100%;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  font-size: 12px;
}

.cut-ai-mobile-title {
  position: relative;
  min-height: 42px;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 7px 50px;
  border-bottom: 1px solid #d6e0ec;
  background: #ffffff;
  text-align: center;
}

.cut-ai-mobile-title strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.cut-ai-top-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 9px;
  border-bottom: 1px solid #d6e0ec;
  background: #f7fbff;
}

.cut-ai-top-actions button,
.cut-ai-top-actions .cut-ai-photo-pick-label {
  min-height: 32px;
  border: 1px solid #b9cee6;
  border-radius: 3px;
  background: #ffffff;
  color: #003f8f;
  font-size: 13px;
  font-weight: 900;
}

.cut-ai-top-actions button:hover,
.cut-ai-top-actions .cut-ai-photo-pick-label:hover,
.cut-ai-top-actions .cut-ai-photo-pick-label:focus-visible {
  border-color: #2f80ed;
  background: #eef6ff;
}

.cut-ai-photo-pick-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  user-select: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.cut-ai-photo-pick-label > span {
  pointer-events: none;
}

.cut-ai-mobile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid #d8e0ea;
  background: #f8fbff;
}

.cut-ai-mobile-summary div,
.cut-ai-recognition-summary label {
  min-width: 0;
  border: 1px solid #d4dfeb;
  background: #ffffff;
}

.cut-ai-mobile-summary span,
.cut-ai-recognition-summary span {
  display: block;
  color: #49627e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.cut-ai-mobile-summary strong {
  display: block;
  padding: 4px 2px 5px;
  overflow: hidden;
  color: #001a3d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-ai-mobile-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 9px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #f4f8fc;
}

.cut-ai-mobile-section {
  margin-bottom: 8px;
  border: 1px solid #d6e0ec;
  border-radius: 3px;
  background: #ffffff;
  overflow: hidden;
}

.cut-ai-mobile-section:last-child {
  margin-bottom: 0;
}

.cut-ai-mobile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 27px;
  padding: 4px 7px;
  border-bottom: 1px solid #cfd8e3;
  background: #f8fbff;
}

.cut-ai-mobile-section-head strong {
  color: #001a3d;
  font-size: 14px;
  font-weight: 900;
}

.cut-ai-mobile-section-head small {
  color: #3e5b78;
  font-size: 12px;
  font-weight: 800;
}

.cut-ai-fabric-section-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.cut-ai-fabric-section-tools button {
  min-width: 42px;
  height: 24px;
  border: 1px solid #2b6fd8;
  border-radius: 3px;
  background: #eef5ff;
  color: #004aa8;
  font-size: 12px;
  font-weight: 900;
}

.cut-ai-recognition-status {
  flex: 0 1 auto;
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.cut-ai-recognition-ok {
  border: 1px solid #86d5ab;
  background: #edfff5;
  color: #05733f;
}

.cut-ai-recognition-warn {
  border: 1px solid #f2c06c;
  background: #fff7e5;
  color: #8a5200;
}

.cut-ai-recognition-loading {
  border: 1px solid #8eb7ee;
  background: #eef6ff;
  color: #075fbd;
}

.cut-ai-shot-and-summary {
  display: grid;
  grid-template-columns: minmax(120px, 0.95fr) minmax(0, 1.55fr);
  gap: 6px;
  padding: 5px 6px;
}

.cut-ai-recognition-main,
.cut-ai-recognition-ledger {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #ffffff;
}

.cut-ai-recognition-photo {
  display: grid;
  align-content: stretch;
  min-height: 136px;
}

.cut-ai-recognition-panel {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
}

.cut-ai-recognition-state {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 6px;
  border: 1px solid #d3deeb;
  background: #f8fbff;
}

.cut-ai-recognition-state span {
  color: #2d4c6c;
  font-size: 12px;
  font-weight: 900;
}

.cut-ai-recognition-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-content: start;
}

.cut-ai-recognition-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-content: start;
}

.cut-ai-ledger-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 50px;
  padding: 5px 7px;
  border: 1px solid #d3deeb;
  background: #fafdff;
}

.cut-ai-recognition-fields .cut-ai-ledger-field:nth-child(-n + 2) {
  min-height: 34px;
  padding: 3px 6px;
}

.cut-ai-ledger-field-wide {
  grid-column: 1 / -1;
}

.cut-ai-ledger-field span {
  color: #4d6783;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.cut-ai-ledger-field strong,
.cut-ai-ledger-field input,
.cut-ai-ledger-field .cut-ai-linked-total-view {
  color: #0054d6;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.cut-ai-ledger-field strong {
  min-height: 18px;
  overflow-wrap: anywhere;
}

.cut-ai-ledger-field input {
  width: 100%;
  min-width: 0;
  height: 24px;
  border: 1px solid #c7d6e7;
  background: #ffffff;
  color: #0054d6;
  font: inherit;
  text-align: left;
}

.cut-ai-ledger-field input[data-cut-ai-field="bedNo"],
.cut-ai-ledger-field input[data-cut-ai-field="materialUsage"] {
  font-weight: 900;
}

.cut-ai-recognition-row {
  display: none;
  min-height: 32px;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  background: #f8fbff;
}

.cut-ai-recognition-row strong,
.cut-ai-recognition-row span {
  height: 100%;
  display: grid;
  align-items: center;
  padding: 2px 8px;
}

.cut-ai-recognition-row span {
  justify-items: end;
  background: transparent;
}

.cut-ai-shot-preview {
  position: relative;
  min-height: 154px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid #d3deeb;
  background: #f8fbff;
  color: #263b52;
  text-align: center;
}

button.cut-ai-shot-preview {
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  appearance: none;
  font: inherit;
}

label.cut-ai-shot-picker {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(47, 128, 237, 0.16);
}

.cut-ai-shot-preview-has-image {
  min-height: 154px;
  padding: 0;
  align-content: stretch;
  justify-items: stretch;
  overflow: hidden;
  background: #ffffff;
}

.cut-ai-shot-preview img {
  width: 100%;
  height: 100%;
  min-height: 154px;
  max-height: 182px;
  object-fit: contain;
  background: #f8fbff;
}

.cut-ai-photo-recognizing {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #075fbd;
  font-size: 13px;
  font-weight: 900;
}

.cut-ai-photo-recognizing i {
  width: 26px;
  height: 26px;
  border: 3px solid #9ec5ff;
  border-top-color: #075fbd;
  border-radius: 50%;
  animation: cut-ai-spin 0.8s linear infinite;
}

.cut-ai-photo-recognizing em {
  font-style: normal;
}

@keyframes cut-ai-spin {
  to {
    transform: rotate(360deg);
  }
}

.cut-ai-shot-preview strong {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 900;
}

.cut-ai-shot-preview span {
  color: #49627e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.cut-ai-recognition-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.cut-ai-recognition-summary label {
  position: relative;
  display: grid;
  min-height: 39px;
  padding: 3px 4px 4px;
}

.cut-ai-recognition-summary input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #001a3d;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
}

.cut-ai-recognition-summary input[readonly] {
  color: #001a3d;
}

.cut-ai-trust-ok input,
.cut-ai-mobile-size-table input.cut-ai-trust-ok,
.cut-ai-mobile-fabric-table input.cut-ai-trust-ok {
  color: #003f8f;
}

.cut-ai-trust-low input,
.cut-ai-mobile-size-table input.cut-ai-trust-low,
.cut-ai-mobile-fabric-table input.cut-ai-trust-low {
  color: #c0152f;
}

.cut-ai-just-written,
.cut-ai-just-written input,
input.cut-ai-just-written,
output.cut-ai-just-written {
  animation: cut-ai-just-written-flash 1.9s ease-out 1;
}

@keyframes cut-ai-just-written-flash {
  0%,
  70% {
    border-color: #2f80ed;
    background: #fff7c7;
    box-shadow: inset 0 0 0 2px rgba(47, 128, 237, 0.45), 0 0 0 2px rgba(255, 211, 77, 0.65);
  }
  100% {
    box-shadow: none;
  }
}

.cut-ai-matchable input {
  padding-right: 42px;
  cursor: default;
}

.cut-ai-matchable.is-suspicious input {
  border-color: #d97706;
  background: #fffaf0;
}

.cut-ai-inline-matchable {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 4px;
  align-items: end;
}

.cut-ai-inline-matchable span {
  grid-column: 1 / -1;
}

.cut-ai-inline-matchable input {
  grid-column: 1;
  grid-row: 2;
  padding-right: 2px;
}

.cut-ai-match-btn {
  display: none;
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 36px;
  height: 22px;
  border: 1px solid #2b6fd8;
  border-radius: 3px;
  background: #eef5ff;
  color: #004aa8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.cut-ai-inline-matchable .cut-ai-match-btn {
  display: none;
  position: static;
  grid-column: 2;
  grid-row: 2;
  align-items: center;
  justify-content: center;
}

.cut-ai-matchable:focus-within .cut-ai-match-btn,
.cut-ai-matchable:hover .cut-ai-match-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cut-ai-linked-total-view {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 24px;
  padding: 2px 0;
  color: #003f8f;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.cut-ai-recognition-wide {
  grid-column: 1 / -1;
}

.cut-ai-photo-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 6px 6px;
}

.cut-ai-photo-actions button,
.cut-ai-mobile-actions button {
  min-height: 30px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 900;
}

.cut-ai-mobile-size-table,
.cut-ai-mobile-fabric-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cut-ai-size-col,
.cut-ai-size-total-col {
  width: 12.5%;
}

.cut-ai-fabric-col-model {
  width: 36%;
}

.cut-ai-fabric-col-color {
  width: 21.333%;
}

.cut-ai-fabric-col-code {
  width: 21.333%;
}

.cut-ai-fabric-col-quantity {
  width: 21.333%;
}

.cut-ai-fabric-col-action {
  width: 76px;
}

.cut-ai-mobile-size-table th,
.cut-ai-mobile-size-table td,
.cut-ai-mobile-fabric-table th,
.cut-ai-mobile-fabric-table td {
  border: 1px solid #d3deeb;
  text-align: center;
  vertical-align: middle;
}

.cut-ai-mobile-size-table th,
.cut-ai-mobile-fabric-table th {
  height: 24px;
  background: #eef4fb;
  color: #2d4c6c;
  font-size: 11px;
  font-weight: 900;
}

.cut-ai-mobile-size-table td {
  height: 35px;
  padding: 3px;
  background: #f8fbff;
}

.cut-ai-mobile-size-table .cut-ai-size-cell {
  background: #ffffff;
}

.cut-ai-mobile-size-table .cut-ai-size-total-head,
.cut-ai-mobile-size-table .cut-ai-size-total-cell {
  background: #eef4fb;
}

.cut-ai-mobile-size-table input,
.cut-ai-mobile-fabric-table input {
  width: 100%;
  height: 27px;
  min-width: 0;
  border: 1px solid #c7d6e7;
  background: #ffffff;
  color: #001a3d;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.cut-ai-mobile-size-table input[data-cut-ai-size-nav] {
  border-color: #bfd0e4;
  background: #ffffff;
  color: #0046a3;
}

.cut-ai-mobile-size-table input[data-cut-ai-size-nav]:focus {
  border-color: #0b64d8;
  box-shadow: inset 0 0 0 1px #0b64d8;
  outline: none;
}

.cut-ai-mobile-size-table input[readonly] {
  background: #f8fbff;
  color: #001a3d;
  font-weight: 900;
}

.cut-ai-mobile-fabric-table td {
  height: 32px;
  padding: 3px 4px;
}

.cut-ai-mobile-fabric-table .cut-ai-fabric-delete-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 1px;
}

.cut-ai-fabric-partial-toggle {
  min-width: 43px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid #c5d4e5;
  border-radius: 2px;
  background: #ffffff;
  color: #45627f;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.cut-ai-fabric-partial-toggle.is-partial {
  border-color: #e8ad4f;
  background: #fff3dc;
  color: #a75b00;
  font-weight: 800;
}

.cut-ai-mobile-fabric-table tr.cut-ai-fabric-partial-row > td {
  height: auto;
  padding: 5px 7px;
  background: #fffaf1;
  text-align: left;
}

.cut-ai-fabric-partial-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 34px;
  color: #4b5f75;
  font-size: 12px;
}

.cut-ai-fabric-partial-editor label {
  display: grid;
  grid-template-columns: max-content minmax(72px, 110px);
  align-items: center;
  gap: 6px;
}

.cut-ai-fabric-partial-editor input {
  height: 26px;
  font-weight: 600;
}

.cut-ai-fabric-partial-editor strong {
  color: #193a5b;
}

.cut-ai-fabric-partial-editor.is-valid {
  box-shadow: inset 3px 0 0 #e59a27;
  padding-left: 8px;
}

.cut-ai-fabric-partial-editor.is-invalid input {
  border-color: #d85b67;
  background: #fff7f7;
}

.cut-ai-fabric-partial-editor em {
  padding: 2px 5px;
  border: 1px solid #edb457;
  border-radius: 2px;
  background: #fff4df;
  color: #a55d00;
  font-style: normal;
}

.cut-ai-fabric-partial-editor button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #58718c;
  font: inherit;
  cursor: pointer;
}

.cut-ai-fabric-delete {
  width: 22px;
  height: 22px;
  border: 1px solid #d3deeb;
  border-radius: 2px;
  background: #ffffff;
  color: #7a1f2c;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.cut-ai-fabric-delete:hover,
.cut-ai-fabric-delete:focus {
  border-color: #e16772;
  background: #fff1f3;
  outline: none;
}

.cut-ai-fabric-table-toolbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-bottom: 1px solid #d6e0ec;
  background: #f8fbff;
}

.cut-ai-fabric-table-toolbar span {
  color: #001a3d;
  font-size: 13px;
  font-weight: 900;
}

.cut-ai-fabric-table-toolbar button {
  min-width: 54px;
  height: 25px;
  border: 1px solid #2f80ed;
  border-radius: 3px;
  background: #ffffff;
  color: #004aa8;
  font-size: 12px;
  font-weight: 900;
}

.cut-ai-fabric-table-toolbar button:hover {
  background: #eef6ff;
}

.cut-ai-fabric-table-toolbar button:disabled {
  border-color: #c9d6e4;
  background: #f4f7fb;
  color: #8aa0b6;
  cursor: default;
}

.cut-ai-calculation-strip {
  margin: 0 0 8px;
  padding: 7px 8px;
  border: 1px solid #c7d6e7;
  border-radius: 3px;
  background: #ffffff;
  color: #001a3d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.cut-ai-calculation-strip strong {
  margin-left: 4px;
  color: #e00000;
  font-weight: 900;
}

.cut-ai-accuracy-strip {
  display: grid;
  gap: 3px;
  margin: -2px 0 8px;
  padding: 7px 8px;
  border: 1px solid #c7d6e7;
  border-radius: 3px;
  background: #f8fbff;
  color: #1b3857;
  font-size: 12px;
  line-height: 1.35;
}

.cut-ai-accuracy-strip strong {
  color: #003f8f;
  font-weight: 900;
}

.cut-ai-accuracy-strip-warn {
  border-color: #f1a33c;
  background: #fff8ec;
  color: #6d3c00;
}

.cut-ai-accuracy-strip-warn strong {
  color: #b04400;
}

.cut-ai-accuracy-strip-pending {
  border-color: #b9c6d5;
  background: #f7f9fc;
  color: #31465f;
}

.cut-ai-accuracy-strip span {
  overflow-wrap: anywhere;
  color: #395672;
  font-weight: 800;
}

.cut-ai-accuracy-strip-warn span {
  color: #70420a;
}

.cut-ai-mobile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 8px;
  position: sticky;
  bottom: 0;
  padding: 8px;
  border-top: 1px solid #d6e0ec;
  background: #ffffff;
}

.cut-ai-mobile-actions button,
.cut-ai-mobile-actions .cut-ai-photo-pick-label {
  min-height: 36px;
  border-radius: 3px;
}

@media (max-width: 390px) {
  .cut-ai-dialog {
    width: calc(100vw - 6px);
    height: calc(100dvh - 6px);
    max-height: calc(100dvh - 6px);
  }

  .cut-ai-mobile-title {
    min-height: 38px;
    padding: 6px 44px;
  }

  .cut-ai-top-actions {
    gap: 4px;
    padding: 6px;
  }

  .cut-ai-top-actions button,
  .cut-ai-top-actions .cut-ai-photo-pick-label {
    min-height: 30px;
    font-size: 12px;
  }

  .cut-ai-mobile-body {
    padding: 6px;
  }

  .cut-ai-recognition-main,
  .cut-ai-recognition-ledger {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 5px;
    padding: 5px;
  }

  .cut-ai-recognition-state {
    min-height: 19px;
    padding: 1px 5px;
  }

  .cut-ai-recognition-fields {
    gap: 3px;
  }

  .cut-ai-ledger-field {
    min-height: 42px;
    padding: 3px 4px;
  }

  .cut-ai-recognition-fields .cut-ai-ledger-field:nth-child(-n + 2) {
    min-height: 31px;
    padding: 2px 4px;
  }

  .cut-ai-ledger-field strong,
  .cut-ai-ledger-field input,
  .cut-ai-ledger-field .cut-ai-linked-total-view,
  .cut-ai-mobile-size-table input,
  .cut-ai-mobile-fabric-table input {
    font-size: 12px;
  }

  .cut-ai-shot-preview,
  .cut-ai-shot-preview-has-image {
    min-height: 124px;
  }

  .cut-ai-shot-preview img {
    min-height: 124px;
    max-height: 148px;
  }

  .cut-ai-mobile-size-table th,
  .cut-ai-mobile-fabric-table th {
    font-size: 10px;
  }
}

@media (orientation: landscape) and (max-height: 430px) {
  .cut-ai-modal {
    place-items: center;
    padding: 3px;
  }

  .cut-ai-dialog {
    width: min(520px, calc(100vw - 6px));
    height: calc(100dvh - 6px);
    max-height: calc(100dvh - 6px);
  }

  .cut-ai-mobile-title {
    min-height: 34px;
    padding: 4px 44px;
  }

  .cut-ai-mobile-title strong {
    font-size: 15px;
  }

  .cut-ai-top-actions {
    gap: 5px;
    padding: 5px 7px;
  }

  .cut-ai-top-actions button {
    min-height: 28px;
    font-size: 12px;
  }

  .cut-ai-mobile-body {
    padding: 6px 7px 8px;
  }

  .cut-ai-mobile-section {
    margin-bottom: 6px;
  }

  .cut-ai-recognition-main,
  .cut-ai-recognition-ledger {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 5px;
    padding: 5px;
  }

  .cut-ai-recognition-photo,
  .cut-ai-shot-preview,
  .cut-ai-shot-preview-has-image {
    min-height: 112px;
  }

  .cut-ai-shot-preview img {
    min-height: 112px;
    max-height: 132px;
  }

  .cut-ai-recognition-state {
    min-height: 19px;
    padding: 1px 5px;
  }

  .cut-ai-recognition-status {
    padding: 1px 7px;
    font-size: 12px;
  }

  .cut-ai-recognition-fields {
    gap: 3px;
  }

  .cut-ai-ledger-field {
    min-height: 38px;
    padding: 2px 4px;
  }

  .cut-ai-recognition-fields .cut-ai-ledger-field:nth-child(-n + 2) {
    min-height: 29px;
    padding: 2px 4px;
  }

  .cut-ai-ledger-field strong,
  .cut-ai-ledger-field input,
  .cut-ai-ledger-field .cut-ai-linked-total-view {
    font-size: 12px;
  }

  .cut-ai-ledger-field input {
    height: 22px;
  }

  .cut-ai-mobile-size-table th,
  .cut-ai-mobile-fabric-table th {
    height: 22px;
    font-size: 10px;
  }

  .cut-ai-mobile-size-table td {
    height: 31px;
    padding: 2px;
  }

  .cut-ai-mobile-size-table input,
  .cut-ai-mobile-fabric-table input {
    height: 25px;
    font-size: 12px;
  }

  .cut-ai-mobile-fabric-table td {
    height: 29px;
    padding: 2px 3px;
  }

  .cut-ai-fabric-table-toolbar {
    min-height: 30px;
    padding: 4px 6px;
  }

  .cut-ai-calculation-strip {
    margin-bottom: 6px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .cut-ai-mobile-actions {
    gap: 6px;
    padding: 6px 8px;
  }

  .cut-ai-mobile-actions button {
    min-height: 32px;
  }
}

.cut-ai-review-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.18fr);
  gap: 14px;
  padding: 16px 18px 18px;
}

.cut-ai-photo-pane,
.cut-ai-form-pane {
  border: 1px solid var(--line-soft);
  background: #fff;
  padding: 12px;
}

.cut-ai-photo-pane h3,
.cut-ai-section h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.cut-ai-photo-preview {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border: 1px solid var(--line-soft);
  background: #f4f7fb;
}

.cut-ai-photo-placeholder {
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed #b8c7d8;
  background: #f7fafc;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.cut-ai-photo-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin: 12px 0 0;
}

.cut-ai-photo-meta div {
  min-width: 0;
}

.cut-ai-photo-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.cut-ai-photo-meta dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-ai-banner {
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid #f1d19a;
  background: #fff7e8;
  color: #6b3d00;
  font-size: 13px;
  font-weight: 700;
}

.cut-ai-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.cut-ai-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cut-ai-field-grid label {
  display: grid;
  gap: 5px;
  color: #2f4054;
  font-size: 12px;
  font-weight: 800;
}

.cut-ai-field-grid input {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.cut-ai-field-grid label.cut-ai-field-error {
  color: #b4232f;
}

.cut-ai-field-grid label.cut-ai-field-error input {
  border-color: #e5484d;
  background: #fff7f7;
}

.cut-ai-field-grid input[readonly] {
  background: #eef6ff;
  color: var(--blue);
}

.cut-ai-field-wide {
  grid-column: span 2;
}

.cut-ai-validation {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  background: #fbfdff;
}

.cut-ai-issues {
  border-color: #f3c2c6;
  background: #fff8f8;
}

.cut-ai-validation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.cut-ai-validation ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.65;
}

.cut-ai-validation-ok {
  color: #087443;
}

.cut-ai-validation-warn {
  color: #9a5a00;
}

.cut-ai-validation-error {
  color: #b4232f;
}

.cut-ai-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.cut-ai-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.cut-ai-open {
  overflow: hidden;
}

@media (max-width: 860px) {
  .cut-ai-review-grid {
    grid-template-columns: 1fr;
  }

  .cut-ai-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cut-ai-field-wide {
    grid-column: span 2;
  }
}

.cut-block {
  width: var(--shortage-block-width);
  min-width: var(--shortage-block-width);
  overflow: hidden;
}

.cut-matrix th,
.cut-matrix td {
  height: var(--shortage-row-height);
  font-size: var(--shortage-font-size);
}

.queue-badge {
  color: var(--red);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.full-panel {
  width: 100%;
}

.table-wrap {
  overflow: auto;
}

.ledger-view .table-wrap {
  overflow-x: hidden;
  overflow-y: visible;
}

#ledgerView:not(.hidden) ~ #migrationView {
  display: none !important;
}

.ledger-top-scroll {
  height: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fbff;
}

.ledger-top-scroll-spacer {
  height: 1px;
}

.ledger-selection-float {
  position: fixed;
  top: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  min-width: 118px;
  padding: 10px 18px;
  border: 2px solid #ef4444;
  border-radius: 4px;
  background: #fff1f2;
  color: #b4232f;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(180, 35, 47, 0.22);
  text-align: center;
  pointer-events: none;
}

.ledger-virtual-spacer td,
.migration-virtual-spacer td,
.transfer-virtual-spacer td,
.production-main-virtual-spacer td {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.table-end-spacer > td {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 6px !important;
  border-color: #cfd8e3 !important;
  background: #ffffff !important;
  color: #66758a !important;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

.table-load-spacer .table-loading-cell {
  color: var(--muted);
  text-align: center;
  vertical-align: top;
}

.table-loading {
  position: sticky;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px auto;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  font-weight: 700;
}

.table-end-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
}

.table-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #b6c5da;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: table-loading-spin 0.8s linear infinite;
}

@keyframes table-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.ledger-panel-tools {
  min-height: 42px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

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

.ledger-table-search {
  grid-column: span 8;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  align-self: stretch;
}

.ledger-table-date-input,
.ledger-table-query-wrap {
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.ledger-table-date-input {
  width: 128px;
  padding: 0 8px;
}

.clearable-control:has(.ledger-table-date-input) {
  width: 128px;
  flex: 0 0 128px;
}

.clearable-control:has(.ledger-table-date-input) > input {
  padding-right: 20px !important;
}

.clearable-control:has(.ledger-table-date-input) .clearable-control-button {
  top: -5px;
  right: -2px !important;
  width: 16px;
  height: 16px;
  border: 2px solid #000000;
  background: #ffffff;
  color: #000000;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 10px;
  text-shadow: 0 0 0 #000000;
}

.ledger-table-date-input::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.ledger-table-date-separator {
  color: var(--muted);
  font-size: 13px;
}

.ledger-table-query-wrap {
  position: relative;
  flex: 0 0 330px;
  max-width: 330px;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.ledger-table-query-wrap .clearable-control {
  flex: 1 1 auto;
  height: 100%;
}

.ledger-table-query {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.ledger-table-query::placeholder {
  color: #7a8794;
}

.ledger-table-search-icon {
  width: 38px;
  height: 100%;
  border-left: 1px solid var(--line);
  background: #f6f8fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5d6b7a;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.ledger-table-search .production-main-search-button,
.ledger-table-search .production-main-clear-btn {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  line-height: 32px;
}

.topbar-title-row .supplier-purchase-topbar-search {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  flex: 0 0 auto;
  width: 650px;
  min-width: 630px;
  max-width: 680px;
  margin: 0;
}

.topbar-title-row .supplier-purchase-topbar-search .supplier-purchase-query-wrap {
  flex: 0 0 220px;
  width: 220px;
  min-width: 210px;
  max-width: 230px;
}

.topbar-title-row .supplier-purchase-topbar-search .supplier-purchase-query-wrap .clearable-control-button {
  top: -5px;
  right: -2px !important;
  width: 16px;
  height: 16px;
  border: 2px solid #000000;
  background: #ffffff;
  color: #000000;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 10px;
  text-shadow: 0 0 0 #000000;
}

.ledger-filter-count {
  color: var(--muted);
  font-size: 13px;
  min-width: 92px;
  text-align: right;
}

.ledger-filter-count.topbar-status {
  min-width: 0;
  max-width: 460px;
  text-align: left;
  white-space: normal;
}

.ledger-batch-count {
  min-width: 58px;
  color: #304156;
  font-size: 13px;
  font-weight: 800;
}

.ledger-batch-count.topbar-status {
  justify-content: center;
  min-width: 58px;
}

.ledger-mode-label {
  min-width: 68px;
  padding: 5px 9px;
  border: 1px solid var(--line-soft);
  background: #f8fbff;
  color: #304156;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ledger-size-chips {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
  gap: 0;
  padding: 0 12px 10px 64px;
}

.ledger-size-chip {
  min-height: 30px;
  border: 1px solid #d7e0ea;
  border-left: 0;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  background: #fbfcfd;
}

.ledger-size-chip:first-child {
  border-left: 1px solid #d7e0ea;
}

.ledger-size-chip small {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7ef;
  color: #1f4d2f;
  font-weight: 800;
}

.ledger-size-chip b {
  padding: 0 8px;
  color: #0f172a;
  text-align: center;
  overflow-wrap: anywhere;
}

.ledger-row-details {
  border-top: 1px solid #dce4ee;
  padding: 12px;
  display: grid;
  gap: 12px;
  background: #fbfcfe;
  margin-left: 75px;
  max-width: calc(100vw - 350px);
  min-width: 720px;
}

.ledger-table-detail-row > td {
  padding: 0 !important;
  background: #f8fafc;
  border-top: 1px solid #cdd9e7;
  border-bottom: 1px solid #cdd9e7;
}

.ledger-table-details {
  min-width: 720px;
  max-width: none;
  margin-left: 0;
  border-top: 0;
}

.ledger-detail-section {
  border: 1px solid #d8e1ea;
  background: #ffffff;
  padding: 10px;
}

.ledger-detail-section h3 {
  margin: 0 0 8px;
  color: #1e2f41;
  font-size: 14px;
}

.ledger-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.ledger-detail-field {
  min-height: 44px;
  border: 1px solid #e0e7ef;
  background: #fbfcfd;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-detail-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.ledger-detail-field strong {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ledger-detail-empty {
  min-height: 42px;
  border: 1px dashed #c4cfda;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8794;
  font-size: 12px;
  background: #ffffff;
}

.ledger-detail-rowid strong {
  color: #0f4c9d;
}

.ledger-size-chips-detail {
  padding: 0;
}

.ledger-detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.ledger-detail-image-slot {
  border: 1px solid #d8e1ea;
  background: #fbfcfd;
  padding: 9px;
}

.ledger-detail-image-title {
  color: #304156;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.ledger-detail-image-value {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f4c9d;
  padding: 5px 7px;
  font-size: 12px;
  outline: 0;
  overflow-wrap: anywhere;
}

.ledger-detail-image-value:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(45, 114, 232, 0.14);
}

.ledger-detail-image-preview {
  display: block;
  max-width: 100%;
  max-height: 180px;
  margin-top: 8px;
  object-fit: contain;
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.ledger-detail-image-empty {
  min-height: 80px;
  margin-top: 8px;
  border: 1px dashed #b8c4d2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8794;
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

.ledger-detail-empty-value {
  color: #8993a0;
  font-weight: 600;
}

@media (max-width: 980px) {
  .ledger-size-chips {
    padding-left: 12px;
  }

  .ledger-row-details {
    max-width: calc(100vw - 70px);
    min-width: 640px;
  }
}

@media (max-width: 640px) {
  .ledger-panel-tools {
    justify-content: flex-start;
  }

  .ledger-row-details {
    min-width: 560px;
    margin-left: 0;
  }
}

.danger-text-btn {
  color: var(--red);
}

.danger-text-btn:disabled {
  color: #a7b0b9;
  cursor: not-allowed;
  opacity: 0.7;
}

.ledger-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ledger-table th,
.ledger-table td {
  position: relative;
  border: 1px solid var(--line-soft);
  height: var(--ledger-row-height);
  padding: 6px 8px;
  text-align: center;
  font-size: var(--ledger-font-size);
  font-weight: var(--ledger-font-weight);
  overflow-wrap: anywhere;
}

.ledger-table th {
  background: #f1e5b7;
  color: #22303b;
  height: var(--ledger-header-row-height);
  padding: 4px 8px 6px;
  vertical-align: top;
  font-size: var(--ledger-header-font-size);
  font-weight: var(--ledger-header-font-weight);
  white-space: normal;
  word-break: break-word;
}

.ledger-table th.ledger-column-selected {
  box-shadow: inset 0 0 0 2px var(--focus);
}

.ledger-row-index {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 46px !important;
  width: 46px;
  text-align: center;
  background: #eef3f7 !important;
  color: var(--muted);
  font-weight: 700;
}

.ledger-table th.ledger-row-index {
  z-index: 5;
}

.ledger-row-batch {
  position: relative;
  min-width: var(--ledger-batch-action-column-width) !important;
  width: var(--ledger-batch-action-column-width);
  padding: 4px 6px !important;
  text-align: center;
  background: #eef3f7 !important;
}

.ledger-table th.ledger-row-batch {
  z-index: 4;
}

.ledger-batch-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  cursor: pointer;
}

.ledger-batch-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.ledger-head-label {
  display: block;
  min-height: 18px;
  outline: 0;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.ledger-filter-input {
  display: block;
  width: 100%;
  height: 22px;
  margin-top: 4px;
  border: 1px solid #cad4df;
  background: #ffffff;
  color: #22303b;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.ledger-filter-input:focus {
  border-color: var(--focus);
  outline: 2px solid rgba(45, 114, 232, 0.2);
}

.ledger-column-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 6;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  background: rgba(45, 114, 232, 0.18);
  opacity: 0;
}

.ledger-table th:hover .ledger-column-resize-handle,
.ledger-column-resize-handle.dragging {
  opacity: 1;
}

.ledger-editable-cell,
.ledger-editable-pill,
.ledger-head-label,
.ledger-image-value {
  cursor: text;
  outline: 0;
}

.ledger-detail-entry-cell {
  background: #ffffff;
  padding: 4px 5px !important;
  text-align: center;
}

.ledger-detail-entry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #9fc4f4;
  border-radius: 4px;
  background: #f3f8ff;
  color: #0f5fbd;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}

.ledger-detail-entry-button:hover,
.ledger-detail-entry-button:focus {
  border-color: #6c9fe6;
  background: #e8f1ff;
  color: #064db2;
  outline: 2px solid rgba(45, 114, 232, 0.18);
  outline-offset: 1px;
}

.ledger-editable-cell:focus,
.ledger-editable-pill:focus,
.ledger-head-label:focus,
.ledger-image-value:focus {
  box-shadow: inset 0 0 0 2px var(--focus);
  background: #f7fbff;
}

.ledger-empty-cell {
  color: transparent;
}

.ledger-total-cell {
  background: #fbfcfd;
  font-weight: 800;
}

.ledger-doubt-cell {
  text-align: left;
  line-height: 1.25;
}

.ledger-bed-conflict-cell {
  color: #b4232f !important;
  background: #fff1f2 !important;
  box-shadow: inset 0 0 0 2px #ef4444;
  font-weight: 800 !important;
}

.ledger-row-selected td {
  background: #f2f7ff;
}

.ledger-table td.ledger-column-selected,
.ledger-list-workspace .supplier-purchase-list-table td.ledger-column-selected {
  box-shadow: inset 2px 0 0 rgba(45, 114, 232, 0.34), inset -2px 0 0 rgba(45, 114, 232, 0.34);
}

.ledger-table td.ledger-cell-selected,
.ledger-list-workspace .supplier-purchase-list-table td.ledger-cell-selected {
  box-shadow: inset 0 0 0 2px var(--focus);
  background: #eaf3ff;
}

.ledger-table td.ledger-bed-conflict-cell {
  color: #b4232f !important;
  background: #fff1f2 !important;
  box-shadow: inset 0 0 0 2px #ef4444;
}

.ledger-empty-row td {
  height: 76px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background: #ffffff;
}

.ledger-row-invalid {
  color: #69717a;
  background: #f7f8f9;
}

.ledger-switch-cell {
  font-size: var(--ledger-switch-font-size);
  font-weight: var(--ledger-switch-font-weight);
}

.void-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.void-switch input {
  width: 16px;
  height: 16px;
}

.ledger-image-cell {
  font-size: var(--ledger-image-font-size);
  font-weight: var(--ledger-image-font-weight);
  text-align: left;
  background: #fbfcfd;
}

.ledger-image-value {
  min-height: 22px;
  color: #0f4c9d;
}

.ledger-image-value:empty::before {
  content: "图片链接/路径";
  color: #8a96a3;
}

.ledger-image-preview {
  display: block;
  max-width: 100%;
  max-height: 72px;
  margin-top: 4px;
  object-fit: contain;
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.archive-snapshot-panel {
  width: 100%;
}

.archive-snapshot-panel > .panel-header {
  display: none;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--shortage-block-width), var(--shortage-block-width)));
  gap: var(--shortage-block-gap);
  align-items: start;
  align-content: start;
  min-height: calc(100vh - 88px);
  padding: 10px;
  overflow-x: auto;
  background-image:
    linear-gradient(#e9eef3 1px, transparent 1px),
    linear-gradient(90deg, #e9eef3 1px, transparent 1px);
  background-size: 38px 30px;
  background-color: #ffffff;
}

.archive-batch {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.archive-batch:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.archive-batch-head {
  min-height: var(--archive-row-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.archive-batch-head strong,
.archive-snapshot-meta strong {
  display: block;
  font-weight: 800;
}

.archive-batch-head span,
.archive-snapshot-meta span {
  color: var(--muted);
  font-size: 13px;
}

.archive-block-grid {
  display: grid;
  grid-template-columns: repeat(var(--shortage-blocks-per-row), minmax(var(--shortage-block-width), var(--shortage-block-width)));
  gap: 18px;
  align-items: start;
}

.archive-snapshot-card {
  border: 0;
  background: transparent;
}

.archive-snapshot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.archive-snapshot-card .cut-block {
  border: 1px solid #15191e;
}

.archive-snapshot-card .cut-matrix {
  border: 0;
}

.archive-inline-panel {
  width: 100%;
  min-height: calc(100vh - 260px);
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  overflow: auto;
}

.archive-inline-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #f7f9fc;
}

.archive-inline-query {
  width: 420px;
  max-width: min(46vw, 620px);
  flex: 0 1 420px;
}

.archive-inline-toolbar .primary-btn,
.archive-inline-toolbar .ghost-btn {
  min-width: 64px;
  height: 32px;
  padding: 0 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.archive-inline-table-wrap {
  overflow: auto;
}

.archive-inline-table {
  width: max-content;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: var(--archive-inline-font-size);
  background: #ffffff;
}

.archive-inline-table th,
.archive-inline-table td {
  position: relative;
  height: var(--archive-inline-row-height);
  padding: 2px 6px;
  border: 1px solid #cfd8e3;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #102033;
  font-size: var(--archive-inline-font-size);
  font-weight: var(--archive-inline-font-weight);
}

.archive-inline-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--archive-inline-header-row-height);
  font-size: var(--archive-inline-header-font-size);
  font-weight: var(--archive-inline-header-font-weight);
  background: #fff0bd;
}

.archive-inline-table thead tr:first-child th {
  top: 0;
}

.archive-inline-table thead tr.archive-inline-filter-row th {
  top: var(--archive-inline-header-row-height);
  background: #f8fbff;
}

.archive-inline-filter {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 22px;
  padding: 0 3px;
  border: 1px solid #cfd8e3;
  box-sizing: border-box;
  font-size: 12px;
  text-align: center;
  background: #ffffff;
}

.archive-index-cell {
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  background: #edf4fa !important;
}

.archive-style-color-col {
  color: #005bd8 !important;
}

.archive-inline-table tbody .archive-total-col {
  font-weight: var(--archive-inline-font-weight);
}

.archive-number-cell {
  color: #0050b8 !important;
}

.archive-inline-table th:hover .archive-inline-column-resize-handle,
.archive-inline-column-resize-handle.dragging {
  opacity: 1;
}

.archive-inline-table tr:hover > .archive-index-cell .row-resize-handle,
.archive-inline-table .row-resize-handle.dragging {
  opacity: 1;
}

.archive-inline-empty {
  height: 120px !important;
  color: var(--muted) !important;
  background: #fbfcfd;
}

.archive-empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-soft);
  background: rgba(255, 255, 255, 0.78);
}

.archive-empty-state strong {
  color: var(--text);
  font-size: 16px;
}

.empty-state {
  color: var(--muted);
  padding: 16px;
  text-align: center;
  background: #fbfcfd;
  border: 1px dashed var(--line-soft);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .status-panel {
    display: none !important;
    margin-top: 0;
  }

  .board-layout {
    grid-template-columns: 1fr;
  }

  .layout-width-half,
  .board-layout > .layout-module.layout-width-half {
    flex-basis: 100%;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .sidebar {
    padding: 10px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
    padding: 0 4px 8px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand-title {
    font-size: 14px;
    line-height: 1.15;
  }

  .brand-subtitle {
    margin-top: 1px;
    font-size: 11px;
    line-height: 1.15;
  }

  .nav-list {
    gap: 4px;
  }

  .nav-item {
    min-height: 34px;
    padding: 0 8px;
  }

  .nav-business-popover {
    left: 8px !important;
    right: 8px;
    width: auto;
    max-height: min(70vh, 520px);
    overflow: auto;
  }

  .nav-business-popover-grid {
    grid-template-columns: 1fr;
  }

  .supplier-purchase-main-workspace,
  .dispatch-main-workspace {
    padding: 12px;
  }

  .supplier-purchase-todo-grid,
  .supplier-purchase-main-layout,
  .supplier-purchase-quick-grid,
  .transfer-home-status-strip,
  .transfer-home-flow,
  .dispatch-todo-grid,
  .dispatch-main-layout,
  .dispatch-quick-grid {
    grid-template-columns: 1fr;
  }

  .transfer-home-flat-workspace {
    padding: 12px;
  }

  .transfer-home-status-item {
    border-left: 0;
    border-top: 0;
    border-bottom: 1px solid #e1e8f0;
    border-left: 3px solid transparent;
  }

  .transfer-home-status-blue {
    border-left-color: #1f6ed4;
  }

  .transfer-home-status-green {
    border-left-color: #138052;
  }

  .transfer-home-status-amber {
    border-left-color: #b96914;
  }

  .transfer-home-status-red {
    border-left-color: #d42131;
  }

  .main {
    padding: calc(14px + var(--business-tabs-height)) 10px 20px;
  }

  .global-business-tabs {
    left: 0;
  }

  .topbar {
    display: grid;
  }

  .topbar-title-row {
    align-items: flex-start;
    gap: 8px;
  }

  .top-business-bar {
    align-items: center;
    padding: 0 8px;
  }

  .top-business-tabs {
    width: max-content;
  }

  .top-business-tab {
    max-width: 220px;
  }

  .common-task-hero,
  .common-task-body,
  .common-task-lanes,
  .common-todo-grid,
  .common-role-filter {
    grid-template-columns: 1fr;
  }

  .common-task-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generic-business-metrics,
  .generic-business-steps,
  .generic-business-action-row {
    grid-template-columns: 1fr;
  }

  .supplier-purchase-query-panel {
    grid-template-columns: 1fr;
  }

  .supplier-purchase-workspace {
    min-height: 420px;
  }

  .production-center-workspace {
    min-height: 420px;
    padding: 20px;
  }

  .production-center-workspace-head {
    display: grid;
  }

  .production-center-action-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-item {
    grid-column: 1 / -1 !important;
  }

  .summary-grid[data-summary-view="cutboard"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .summary-grid[data-summary-view="cutboard"] .summary-item {
    grid-column: span 1 !important;
    min-height: 64px !important;
    padding: 7px 6px;
    overflow: hidden;
  }

  .summary-grid[data-summary-view="cutboard"] .summary-item span {
    font-size: 11px;
    line-height: 1.15;
  }

  .summary-grid[data-summary-view="cutboard"] .summary-item strong {
    margin-top: 5px;
    font-size: 19px;
    line-height: 1;
  }

  .transfer-panel .transfer-list {
    overflow-x: auto;
  }

  .transfer-style-grid {
    grid-template-columns: var(--shortage-block-width);
  }

  .supplier-purchase-board {
    padding: 12px;
    overflow-x: auto;
  }

  .supplier-purchase-card {
    min-width: 0;
  }

  .supplier-purchase-flow-map,
  .supplier-purchase-field-layout,
  .supplier-purchase-governance {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .supplier-purchase-flow-map {
    min-height: 0;
    padding: 12px;
  }

  .supplier-flow-core,
  .supplier-flow-support,
  .supplier-flow-report-grid {
    grid-template-columns: 1fr;
  }

  .supplier-flow-arrow {
    width: 24px;
    height: 24px;
    transform: rotate(90deg);
  }

  .supplier-flow-node {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .supplier-flow-icon {
    width: 36px;
    height: 36px;
  }

  .supplier-purchase-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .production-craft-board {
    padding: 12px;
  }

  .production-craft-title {
    align-items: start;
  }

  .production-craft-toolbar,
  .production-craft-form-grid {
    grid-template-columns: 1fr;
  }

  .production-craft-search {
    max-width: none;
  }

  .production-craft-form-field.is-wide {
    grid-column: auto;
  }

  .production-craft-form-actions {
    justify-content: stretch;
  }

  .production-craft-form-actions button {
    flex: 1 1 auto;
  }

  .production-craft-section-head {
    display: grid;
    align-items: start;
  }

  .production-craft-section-head span {
    text-align: left;
  }

  .production-craft-flow ol,
  .production-craft-template-grid,
  .production-craft-profile-grid,
  .production-craft-field-layout,
  .production-craft-governance,
  .production-craft-link-grid {
    grid-template-columns: 1fr;
  }

  .production-craft-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-craft-metric-strip div {
    border-bottom: 1px solid #d6e0ec;
  }

  .production-craft-add-layout {
    grid-template-columns: 1fr;
  }

  .production-craft-basic-body {
    grid-template-columns: 1fr;
  }

  .production-craft-add-layout .production-craft-form-grid,
  .production-craft-route-editor {
    grid-column: 1;
  }

  .production-craft-list-tools {
    align-items: stretch;
  }

  .supplier-purchase-form-modal {
    padding: 6px;
  }

  .supplier-purchase-form-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .supplier-purchase-form-head {
    padding: 14px 14px 12px;
  }

  .supplier-purchase-form-head h2 {
    font-size: 20px;
  }

  .supplier-purchase-form-body {
    padding: 12px 14px;
  }

  .supplier-purchase-form-grid {
    grid-template-columns: 1fr;
  }

  .supplier-purchase-form-field.is-wide {
    grid-column: auto;
  }

  .supplier-purchase-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px 14px;
  }

  .module-row {
    grid-template-columns: 1fr 92px;
  }

  .global-board-head {
    display: grid;
  }

  .block-frame {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .photo-rail {
    min-height: 312px;
  }

  .cut-desktop-list {
    display: none;
  }

  .cut-mobile-list {
    display: grid;
    gap: 14px;
    align-items: start;
    min-width: max-content;
  }

  .cut-mobile-item {
    display: grid;
    gap: 6px;
  }

  .cut-photo-only-actions {
    min-height: 42px;
    padding: 4px 8px;
  }

  .cut-photo-only-actions .cut-capture-btn {
    min-width: 68px;
    height: 38px;
    font-size: 16px;
  }

  .shortage-block.shortage-mosaic-block .block-actions {
    height: 30px;
    min-height: 30px;
    padding: 1px 4px;
    overflow: hidden;
  }

  .shortage-block .block-action-row,
  .shortage-block .block-actions .action-group {
    height: 26px;
    min-height: 26px;
    align-items: center;
  }

  .shortage-block .block-action-row {
    gap: 4px;
  }

  .shortage-block .block-actions .action-group {
    gap: 4px;
  }

  .shortage-block .block-actions .cut-queue-inline {
    min-height: 26px;
    height: 26px;
    padding: 0 5px;
    gap: 2px;
    box-sizing: border-box;
    line-height: 1;
  }

  .shortage-block .block-actions .shortage-cut-entry-key {
    width: 52px;
    min-width: 52px;
    height: 26px;
    font-size: 11px;
    font-weight: 850;
  }

  .shortage-block .block-actions .shortage-archive-key {
    display: none !important;
  }
}

.migration-view {
  min-width: 0;
}

.migration-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0;
}

.migration-panel-head {
  min-height: var(--panel-header-row-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.migration-view.master-module-view .migration-panel-head {
  display: none;
}

.migration-panel-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.migration-panel-head span,
.migration-source,
.migration-edit-hint {
  color: var(--muted);
  font-size: 12px;
}

.migration-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.migration-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 700;
}

.migration-tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.migration-tabs button span {
  margin-left: 8px;
  font-size: 11px;
  opacity: 0.72;
}

.migration-tabs.master-module-tabs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  overflow-x: visible;
  background: #f6f8fb;
  padding: 8px 10px 7px;
}

.master-module-switchbar,
.master-source-sheet-strip,
.master-field-modebar {
  display: flex;
  align-items: center;
  min-width: 0;
}

.master-module-switchbar {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 5px;
  align-items: stretch;
}

.master-module-groupbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.master-module-group {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.master-module-group strong {
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
}

.master-module-group.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.master-compact-selector-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.master-compact-selector {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
}

.master-module-groupbar,
.master-compact-selector-row {
  position: relative;
  z-index: 32;
}

.master-compact-selector:focus-within {
  z-index: 40;
}

.master-compact-selector span {
  flex: 0 0 auto;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  white-space: nowrap;
}

.master-compact-selector :is(select, .master-compact-picker-trigger) {
  width: min(240px, 62vw);
  min-width: 132px;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  line-height: 26px;
  padding: 0 24px 0 8px;
  outline: 0;
}

.master-compact-picker {
  position: relative;
  flex: 0 0 auto;
  min-width: 132px;
}

.master-compact-picker-trigger {
  width: min(240px, 62vw);
  padding-right: 24px;
  text-align: left;
  cursor: pointer;
}

.master-compact-picker-trigger::after {
  content: "▾";
  position: absolute;
  right: 8px;
  color: #64748b;
}

.master-compact-picker-trigger:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.master-compact-picker-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 60;
  width: min(240px, 62vw);
  max-height: 220px;
  overflow: auto;
  border: 1px solid #b9c7d8;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.master-compact-picker-menu button {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-bottom: 1px solid #e7edf5;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.master-compact-picker-menu button:hover,
.master-compact-picker-menu button:focus { background: #eaf3ff; }

.master-object-group {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  background: transparent;
}

.master-object-group-label {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6dee8;
  background: #eef3f8;
  color: #475569;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  white-space: nowrap;
}

.master-object-group-tabs {
  min-width: 0;
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 4px;
}

.master-object-group-tabs .master-module-tab {
  border: 1px solid #cfd8e3;
}

.master-object-group-tabs .master-module-tab:first-child {
  border-left: 1px solid #cfd8e3;
}

.master-linkage-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.master-linkage-chip {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid #d7dee8;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  white-space: nowrap;
}

.master-linkage-chip strong {
  font-size: 11px;
}

.master-linkage-chip em {
  color: #2563eb;
  font-style: normal;
}

.master-linkage-chip-pending {
  border-color: #f1d49a;
}

.master-linkage-chip-pending em {
  color: #a16207;
}

.master-linkage-chip-warn {
  border-color: #f0c4be;
}

.master-linkage-chip-warn em {
  color: #b91c1c;
}

.master-product-priority-cards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.master-product-priority-cards-topbar {
  flex: 0 1 auto;
  max-width: 720px;
}

.master-product-priority-card {
  width: 156px;
  min-width: 128px;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "caption value";
  align-items: center;
  gap: 1px 8px;
  border: 1px solid #d6dee8;
  border-left: 3px solid #64748b;
  background: #ffffff;
  color: #0f172a;
  padding: 5px 8px;
  cursor: pointer;
  text-align: left;
}

.master-product-priority-card:hover,
.master-product-priority-card:focus-visible {
  border-color: #9ab4d6;
  background: #f8fbff;
  outline: none;
}

.master-product-priority-card.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  background: #eef6ff;
}

.master-product-priority-card-danger {
  border-left-color: #ef4444;
}

.master-product-priority-card-warn {
  border-left-color: #f59e0b;
}

.master-product-priority-card-muted {
  border-left-color: #64748b;
}

.master-product-priority-card-label {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-priority-card-value {
  grid-area: value;
  color: #dc2626;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.master-product-priority-card-warn .master-product-priority-card-value {
  color: #b45309;
}

.master-product-priority-card-muted .master-product-priority-card-value {
  color: #475569;
}

.master-product-priority-card-caption {
  grid-area: caption;
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-module-tab,
.migration-tabs .master-source-sheet,
.master-field-mode {
  flex: 0 0 auto;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.master-module-tab {
  min-height: 30px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.master-module-tab strong {
  font-size: 13px;
  line-height: 16px;
}

.master-module-tab span,
.migration-tabs .master-source-sheet span {
  margin-left: 0;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
}

.master-module-tab.active,
.migration-tabs .master-source-sheet.active,
.master-field-mode.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.master-module-tab.active span,
.migration-tabs .master-source-sheet.active span {
  color: #ffffff;
}

.master-source-sheet-list {
  padding: 0;
}

.master-source-sheet-strip {
  flex-wrap: wrap;
  gap: 4px;
}

.migration-tabs .master-source-sheet {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.migration-tabs .master-source-sheet strong {
  font-size: 12px;
  line-height: 15px;
}

.master-field-modebar {
  justify-content: flex-end;
  gap: 0;
}

.master-module-action-btn {
  min-height: 28px;
  margin-right: 8px;
  padding: 3px 10px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.master-field-mode {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 12px;
}

.master-field-mode + .master-field-mode {
  border-left: 0;
}

.purchase-style-color-rename-modal .purchase-operator-dialog {
  width: min(760px, calc(100vw - 40px));
}

.style-color-rename-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr;
  gap: 12px;
  padding: 16px;
}

.style-color-rename-old-field,
.style-color-rename-preview-field {
  grid-column: span 2;
}

.style-color-rename-preview-field input {
  color: #0f4fb8;
  font-weight: 900;
}

.migration-view.master-module-view .migration-edit-hint,
.migration-view.master-module-view .migration-source {
  display: none;
}

.migration-view.master-module-view .migration-table-tools {
  display: none;
}

.migration-view.master-module-view .migration-table-count {
  flex: 1;
  color: #0f172a;
}

html:has(#migrationView.master-module-view:not(.hidden)),
body:has(#migrationView.master-module-view:not(.hidden)) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#migrationView.master-module-view:not(.hidden)) .app-shell {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body:has(#migrationView.master-module-view:not(.hidden)) .main {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

body:has(#migrationView.master-module-view:not(.hidden)) .topbar {
  min-height: 36px;
  margin-bottom: 8px;
}

body:has(#migrationView.master-module-view:not(.hidden)) #migrationView {
  min-height: 0;
  overflow: hidden;
}

body:has(#migrationView.master-module-view:not(.hidden)) #migrationView .migration-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body:has(#migrationView.master-module-view:not(.hidden)) #migrationView .migration-tabs,
body:has(#migrationView.master-module-view:not(.hidden)) #migrationView .migration-top-scroll {
  flex: 0 0 auto;
}

.migration-row-action-cell {
  padding: 3px 4px !important;
  background: #ffffff;
}

.master-product-row-actions {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.master-product-row-action {
  min-height: 24px;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: #0f172a;
  padding: 0 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
}

#migrationView.master-module-view .master-product-row-action,
#migrationView.master-module-view .master-reference-status-switch {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.master-product-row-action:disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}

.master-product-row-action-danger {
  color: #dc2626;
  border-color: #f1c8c8;
}

.master-product-row-action-detail {
  color: #1d4ed8;
  border-color: #b9c9ee;
  background: #f8fbff;
}

.master-product-row-action-edit {
  color: #0f6b4f;
  border-color: #9ccfb8;
  background: #f1fbf6;
}

.master-product-row-action-save {
  border-color: #0f8f5b;
  background: #ecfdf5;
  color: #04704a;
}

.migration-table td.master-product-field-candidate-cell,
.migration-table td.master-product-field-identity-cell,
.migration-table td.master-product-field-direct-cell,
.migration-table td.master-product-field-readonly-cell {
  padding: 0;
  vertical-align: middle;
}

.master-product-field-control {
  width: 100%;
  min-width: 72px;
  min-height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  padding: 6px 7px;
}

.master-product-field-control:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #2563eb;
}

.master-product-field-direct-cell:has(.master-product-field-control:focus) {
  background: #fffdf4;
}

.master-product-field-candidate-cell {
  background: #f8fbff;
}

.master-product-field-candidate {
  color: #083b78;
  cursor: pointer;
  font-weight: 800;
}

.master-product-field-identity-cell {
  background: #fffdf4;
}

.master-product-field-identity {
  color: #0f172a;
  cursor: pointer;
  font-weight: 800;
}

.master-product-field-readonly-cell {
  background: #f6f8fb;
  color: #5f6f84;
}

.master-product-field-direct-cell {
  background: #ffffff;
}

.master-product-list-readonly-cell {
  color: #0f172a;
  background: #ffffff;
}

.migration-table td.master-product-variant-search-cell {
  padding: 0;
  background: #f8fbff;
}

.master-product-variant-search-control {
  color: #083b78;
  font-weight: 900;
  cursor: pointer;
}

.master-product-variant-search-control::placeholder {
  color: #64748b;
  font-weight: 700;
}

.master-product-date-cell {
  color: #0f172a;
  font-weight: 400;
  white-space: nowrap;
}

.master-product-title-cell {
  max-width: 132px;
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-lifecycle-cell {
  color: #0f172a;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.master-product-lifecycle-cell.is-disabled {
  color: #b91c1c;
  background: #fff5f5;
}

.master-product-status-cell {
  text-align: center;
  vertical-align: middle !important;
  line-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.master-product-status-cell > .master-product-status-switch,
.master-reference-status-switch {
  width: 48px;
  min-width: 48px;
  height: 18px;
  min-height: 18px;
  margin: 0 auto;
  vertical-align: middle;
}

.master-dictionary-scope-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.2;
}

.master-dictionary-scope-cell small {
  color: #5f6f82;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.master-product-status-cell > .master-product-status-switch .permission-status-switch-label,
.master-reference-status-switch .permission-status-switch-label {
  font-size: 10px;
}

.master-product-status-cell > .master-product-status-switch .permission-status-switch-thumb,
.master-reference-status-switch .permission-status-switch-thumb {
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
}

.master-product-status-cell > .master-product-status-switch.is-on .permission-status-switch-label,
.master-reference-status-switch.is-on .permission-status-switch-label {
  left: 6px;
}

.master-product-status-cell > .master-product-status-switch.is-on .permission-status-switch-thumb,
.master-reference-status-switch.is-on .permission-status-switch-thumb {
  transform: translateX(30px);
}

.master-product-status-cell > .master-product-status-switch.is-off .permission-status-switch-label,
.master-reference-status-switch.is-off .permission-status-switch-label {
  right: 6px;
}

.master-reference-status-switch {
  margin: 0 auto;
}

.master-product-detail-row > td {
  padding: 0 !important;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #d6dee8;
}

.master-product-inline-detail {
  display: grid;
  gap: 8px;
  padding: 8px;
  background: #f8fafc;
}

.master-product-identity-card,
.master-product-edit-section {
  min-width: 0;
  border: 1px solid #d6dee8;
  background: #ffffff;
}

.master-product-identity-card .master-product-detail-head {
  background: #f7fbff;
}

.master-product-identity-mode {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c7d7ee;
  background: #eef6ff;
  color: #1d4ed8 !important;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.master-product-identity-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #edf1f5;
}

.master-product-identity-chips > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border-right: 1px solid #edf1f5;
}

.master-product-identity-chips > span:last-child {
  border-right: 0;
}

.master-product-identity-chips em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 14px;
}

.master-product-identity-chips strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-edit-panel {
  min-width: 0;
  border: 1px solid #b8c7d9;
  border-left: 3px solid #0f6b4f;
  background: #ffffff;
}

.master-product-edit-modal .master-product-edit-dialog {
  width: min(1220px, calc(100vw - 28px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 24px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.master-product-edit-modal .master-product-edit-panel {
  overflow-y: auto;
  overflow-x: hidden;
  border-left-width: 1px;
}

.master-product-edit-modal .purchase-operator-head {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.master-product-edit-command-row {
  min-height: 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 5px 8px 0;
}

.master-product-edit-command-row .master-product-editing-status {
  display: none;
}

.master-product-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 10px;
  align-items: stretch;
  padding: 8px;
}

.master-product-edit-fields {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
}

.master-product-edit-grid {
  min-width: 0;
  gap: 8px;
  padding: 0;
}

.master-product-edit-grid-row-one {
  grid-template-columns: minmax(112px, 0.75fr) minmax(180px, 1.35fr) minmax(92px, 0.7fr) minmax(92px, 0.7fr) minmax(72px, 0.55fr);
}

.master-product-edit-grid-row-two {
  grid-template-columns: minmax(110px, 0.82fr) minmax(110px, 0.82fr) minmax(86px, 0.62fr) minmax(92px, 0.7fr) minmax(92px, 0.7fr);
}

.master-product-edit-field-cost .master-product-edit-input[readonly],
.master-product-edit-modal .master-product-edit-readonly-value {
  min-height: 30px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid #d8e1ed;
  border-radius: 2px;
  background: #f8fafc;
  color: #475569;
  cursor: default;
  font-weight: 800;
}

.master-product-media-quick {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px;
}

.master-product-media-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.master-product-media-slot,
.master-product-media-entry.is-compact {
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 1px dashed #9fb7dc;
  background: #fbfdff;
}

.master-product-media-slot {
  display: grid;
  place-items: center;
  color: #4b6f9e;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.master-product-media-entry {
  position: relative;
  min-width: 0;
  border: 1px solid #cfdae9;
  background: #f8fbff;
}

.master-product-media-preview {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.master-product-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.master-product-media-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 1px solid #fca5a5;
  border-radius: 50%;
  background: #fff;
  color: #dc2626;
  cursor: pointer;
  font-size: 15px;
  line-height: 14px;
}

.master-product-media-manager-open {
  min-height: 27px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.master-product-title-rows {
  display: grid;
  gap: 5px;
  padding: 0 8px 8px;
}

.master-product-title-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: end;
}

.master-product-title-label {
  min-height: 28px;
  display: flex;
  align-items: center;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.master-product-title-primary,
.master-product-title-add,
.master-product-title-set-primary,
.master-product-title-remove {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.master-product-title-primary { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.master-product-title-add, .master-product-title-set-primary { cursor: pointer; color: #1d4ed8; }
.master-product-title-remove { cursor: pointer; border-color: #fecaca; color: #dc2626; }

.master-product-set-section { padding-top: 0; }
.master-product-set-board { overflow: visible; }
.master-product-set-editor { flex: 1 1 0; min-width: 0; max-width: none; }
.master-product-set-head { border-bottom: 0; }
.master-product-set-head [data-master-product-set-count] { margin-left: auto; }
.master-product-set-expand { min-height: 24px; border: 0; background: transparent; color: #1d4ed8; cursor: pointer; font-size: 12px; font-weight: 800; }
.master-product-set-body-wrap[hidden] { display: none; }
.master-product-set-body-wrap { border-top: 1px solid #d8e2ee; }

.master-product-media-manager { position: fixed; inset: 0; z-index: 95; }
.master-product-media-manager-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.42); }
.master-product-media-manager-dialog { position: relative; z-index: 1; width: min(920px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 32px)); margin: min(8vh, 64px) auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border: 1px solid #b8c7d9; background: #fff; box-shadow: 0 20px 50px rgba(15,23,42,.28); }
.master-product-media-manager-head, .master-product-media-manager-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #d8e2ee; }
.master-product-media-manager-head strong { font-size: 15px; }
.master-product-media-manager-head > div { display: inline-flex; align-items: center; gap: 7px; }
.master-product-media-manager-head button, .master-product-media-manager-foot button, .master-product-media-entry-actions button { border: 1px solid #cbd5e1; background: #fff; color: #1d4ed8; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.master-product-media-manager-foot { border-top: 1px solid #d8e2ee; border-bottom: 0; justify-content: flex-end; }
.master-product-media-manager-foot span { margin-right: auto; color: #64748b; font-size: 12px; }
.master-product-media-manager-groups { min-height: 160px; overflow: auto; display: grid; align-content: start; gap: 12px; padding: 12px; background: #f8fafc; }
.master-product-media-group { min-width: 0; border: 1px solid #d8e2ee; background: #fff; }
.master-product-media-group-head { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; background: #f8fbff; }
.master-product-media-group-head label { min-width: 0; flex: 1 1 auto; display: inline-grid; grid-template-columns: auto minmax(160px, 1fr); align-items: center; gap: 8px; color: #475569; font-size: 12px; font-weight: 800; }
.master-product-media-group-head input { min-width: 0; height: 27px; box-sizing: border-box; border: 1px solid #cbd5e1; background: #fff; padding: 3px 7px; color: #0f172a; font: inherit; }
.master-product-media-group-head > span { color: #64748b; font-size: 12px; white-space: nowrap; }
.master-product-media-group-head button { min-height: 25px; border: 1px solid #fecaca; background: #fff; color: #dc2626; cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap; }
.master-product-media-group-list { min-height: 118px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; padding: 10px; }
.master-product-media-group-list .master-product-media-entry { aspect-ratio: 1 / 1; }
.master-product-media-group-add { min-height: 118px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px dashed #8eafe0; background: #fbfdff; color: #1d4ed8; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.master-product-media-group-add b { font-size: 26px; font-weight: 400; line-height: 1; }
.master-product-media-entry-actions { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 3px; }
.master-product-media-entry-actions button { padding: 2px 5px; background: rgba(255,255,255,.92); }
.master-product-media-empty { color: #64748b; font-size: 13px; }

.master-product-edit-command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.master-product-edit-command-row > div {
  justify-self: start;
}

.master-product-editing-status {
  justify-self: center;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2563eb;
  background: #dbeafe;
  color: #1d4ed8 !important;
  padding: 0 10px;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.master-product-edit-command-row .master-product-confirm-button {
  justify-self: end;
}

.master-product-edit-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid #d8e2ee;
  background: #f1fbf6;
}

.master-product-edit-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.master-product-edit-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.master-product-edit-head span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.master-product-edit-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(104px, 1fr)) repeat(2, minmax(180px, 1.5fr));
  gap: 6px;
  padding: 8px;
}

.master-product-edit-field {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.master-product-edit-field-long .master-product-edit-input {
  text-align: left;
}

.master-product-edit-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
}

.master-product-edit-input {
  width: 100%;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 4px 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
}

.master-product-edit-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.master-product-edit-item-id {
  color: #111827;
  background: #fffdf4;
}

.master-product-set-section {
  display: grid;
  gap: 0;
  padding: 0 8px 8px;
}

.master-product-set-board {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding-top: 6px;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.master-product-set-editor,
.master-product-set-preview {
  position: relative;
  flex: 0 0 360px;
  min-width: 0;
  border: 1px solid #cbd5e1;
  background: #fbfdff;
}

.master-product-set-editor {
  min-width: 180px;
  max-width: 760px;
}

.master-product-set-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 4;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  background: rgba(45, 114, 232, 0.18);
  opacity: 0;
}

.master-product-set-editor:hover .master-product-set-resize-handle,
.master-product-set-resize-handle.dragging {
  opacity: 1;
}

.master-product-set-head,
.master-product-set-preview-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid #d8e2ee;
  background: #eef6fb;
}

.master-product-set-head strong,
.master-product-set-preview-head strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-head span,
.master-product-set-preview-head span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-body {
  display: grid;
  gap: 6px;
  padding: 6px;
}

.master-product-set-chips,
.master-product-set-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.master-product-set-chip {
  max-width: 180px;
  min-height: 24px;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 4px;
  border: 1px solid #b9c9ee;
  background: #ffffff;
  color: #0f2d5c;
  padding: 1px 4px 1px 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-set-chip b {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef2f7;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
}

.master-product-set-chip:hover b {
  background: #fee2e2;
  color: #b91c1c;
}

.master-product-set-empty {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-add-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 54px;
  gap: 5px;
}

.master-product-set-add-input {
  width: 100%;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 4px 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
}

.master-product-set-add-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.master-product-set-add-button {
  min-height: 28px;
  border: 1px solid #0f74a8;
  background: #0f74a8;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-preview-chips {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.master-product-set-preview-chips span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6dee8;
  background: #ffffff;
  color: #334155;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-preview-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.master-product-set-preview-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 16px;
}

.master-product-set-preview-table th,
.master-product-set-preview-table td {
  border: 1px solid #d6dee8;
  padding: 5px 8px;
  text-align: center;
  vertical-align: middle;
}

.master-product-set-preview-table th {
  background: #f6e9b5;
  color: #0f172a;
  font-weight: 900;
}

.master-product-set-preview-table td {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
}

.master-product-set-preview-status {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #b45309;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-preview-status.is-synced {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.master-product-set-preview-status.is-new {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.master-product-set-preview-status.is-inactive {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #64748b;
}

.master-product-set-preview-empty {
  color: #64748b !important;
  font-weight: 800 !important;
}

.master-product-edit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 8px 8px;
}

.master-product-confirm-button {
  min-height: 26px;
  border: 1px solid #0f6b4f;
  background: #0f6b4f;
  color: #ffffff;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.master-product-confirm-button-secondary {
  border-color: #b9c9ee;
  background: #f8fbff;
  color: #1d4ed8;
}

@media (max-width: 900px) {
  .master-product-edit-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .master-product-media-quick {
    min-height: 96px;
  }

  .master-product-edit-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .master-product-identity-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-product-set-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }

  .master-product-set-editor {
    width: auto !important;
    max-width: none;
    flex-basis: auto !important;
  }

  .master-product-set-resize-handle {
    display: none;
  }
}

/* Employee-feedback administrator detail: keep the right-side review pane scannable at a glance. */
.employee-feedback-admin-detail-pane {
  background: #f4f8fc;
}

.employee-feedback-admin-detail-pane > .employee-feedback-admin-record {
  gap: 12px;
  padding: 14px;
  background: #f4f8fc;
}

.employee-feedback-admin-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b9d3eb;
  border-left: 4px solid #176fae;
  background: linear-gradient(135deg, #fafdff 0%, #edf6ff 100%);
}

.employee-feedback-admin-detail-hero > div {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.employee-feedback-admin-detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.employee-feedback-admin-detail-hero h3 {
  color: #123b62;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.employee-feedback-admin-detail-hero time {
  margin-top: 2px;
  color: #5d778e;
  font-variant-numeric: tabular-nums;
}

.employee-feedback-admin-detail-section,
.employee-feedback-admin-record > .employee-feedback-workflow,
.employee-feedback-admin-record > .employee-feedback-workflow-action,
.employee-feedback-admin-record > .employee-feedback-admin-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cad9e8;
  background: #ffffff;
}

.employee-feedback-admin-detail-section > header,
.employee-feedback-admin-record > .employee-feedback-workflow > strong,
.employee-feedback-admin-record > .employee-feedback-workflow-action > label > strong,
.employee-feedback-admin-action-header > div {
  color: #214e76;
  font-size: 13px;
  font-weight: 800;
}

.employee-feedback-admin-detail-section > header {
  display: flex;
  align-items: center;
  min-height: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #deebf5;
}

.employee-feedback-admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.employee-feedback-admin-meta-grid > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid #e0eaf3;
  background: #f8fbfe;
}

.employee-feedback-admin-meta-grid small {
  color: #6a8196;
  font-size: 11px;
}

.employee-feedback-admin-meta-grid b {
  overflow-wrap: anywhere;
  color: #29445e;
  font-size: 12px;
  line-height: 1.5;
}

.employee-feedback-admin-content-section .employee-feedback-record-body {
  min-height: 54px;
  padding: 1px 1px 0;
  color: #25425f;
  font-size: 13px;
  line-height: 1.75;
}

.employee-feedback-admin-record > .employee-feedback-resolution {
  gap: 6px;
  border-left: 3px solid #4b88ba;
  background: #f6fbff;
}

.employee-feedback-admin-record > .employee-feedback-resolution strong {
  color: #24537c;
}

.employee-feedback-admin-attachments .employee-feedback-images {
  display: grid;
  gap: 9px;
}

.employee-feedback-admin-attachments .employee-feedback-images > strong {
  color: #214e76;
  font-size: 13px;
}

.employee-feedback-admin-attachments .employee-feedback-images > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-feedback-admin-record > .employee-feedback-workflow {
  border-left: 3px solid #2e7eaf;
  background: #f8fcff;
}

.employee-feedback-admin-record > .employee-feedback-workflow > strong {
  padding-bottom: 7px;
  border-bottom: 1px solid #dceaf5;
}

.employee-feedback-admin-record > .employee-feedback-workflow p {
  color: #61788d;
}

.employee-feedback-admin-record > .employee-feedback-workflow ol {
  gap: 9px;
}

.employee-feedback-admin-record > .employee-feedback-workflow li {
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #d8e6f1;
  border-bottom: 1px solid #d8e6f1;
  background: #ffffff;
}

.employee-feedback-admin-record > .employee-feedback-workflow li header {
  color: #28567e;
}

.employee-feedback-admin-record > .employee-feedback-workflow li time {
  color: #658097;
  font-variant-numeric: tabular-nums;
}

.employee-feedback-admin-record > .employee-feedback-workflow-action {
  border-left: 3px solid #1f76b5;
  background: #f4faff;
}

.employee-feedback-admin-record > .employee-feedback-workflow-action > label {
  display: grid;
  gap: 8px;
}

.employee-feedback-admin-record > .employee-feedback-admin-actions {
  gap: 10px;
  border-color: #bcd4e8;
  border-top: 3px solid #2b76ad;
  background: #f8fbfe;
}

.employee-feedback-admin-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.employee-feedback-admin-action-header > div {
  display: grid;
  gap: 3px;
}

.employee-feedback-admin-action-header strong {
  font-size: 14px;
}

.employee-feedback-admin-action-header span {
  color: #6b8296;
  font-size: 11px;
  font-weight: 400;
}

.employee-feedback-admin-record .employee-feedback-admin-followup {
  grid-template-columns: minmax(126px, .38fr) minmax(0, 1fr);
  gap: 9px;
}

.employee-feedback-admin-record .employee-feedback-admin-followup > button {
  grid-column: 1 / -1;
  justify-self: end;
}

.employee-feedback-admin-record .employee-feedback-admin-followup textarea {
  min-height: 72px;
}

.employee-feedback-admin-record .employee-feedback-admin-reason {
  grid-template-columns: 1fr;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px solid #dce8f1;
}

.employee-feedback-admin-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 2px;
}

.employee-feedback-admin-action-notice {
  display: grid !important;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e4d7ba;
  background: #fffdf7;
  color: #705a2e;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 520px) {
  .employee-feedback-admin-detail-hero {
    display: grid;
  }

  .employee-feedback-admin-meta-grid,
  .employee-feedback-admin-record .employee-feedback-admin-followup {
    grid-template-columns: 1fr;
  }

  .employee-feedback-admin-record .employee-feedback-admin-followup > button {
    grid-column: auto;
    width: 100%;
  }
}

/* Employee feedback is a lazy, single-dialog surface. It does not participate in page layout or business-table rendering. */
.employee-feedback-entry {
  position: relative;
  min-width: 42px;
  height: 28px;
  margin-right: 6px;
  padding: 0 8px;
  border: 1px solid #1e6ebd;
  border-radius: 4px;
  background: #1f6fc1;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(23, 74, 125, 0.22);
}

.employee-feedback-entry:hover {
  border-color: #155a9e;
  background: #195fa8;
}

.employee-feedback-entry.has-unread::after {
  content: attr(data-unread);
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  line-height: 14px;
}

.employee-feedback-portal,
.employee-feedback-portal * {
  box-sizing: border-box;
}

.employee-feedback-portal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  color: #152235;
  font-size: 13px;
}

.employee-feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.employee-feedback-shell {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  margin: 12px auto;
  overflow: hidden;
  border: 1px solid #c7d4e2;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 20px 56px rgba(15, 23, 42, 0.28);
}

.employee-feedback-head {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid #d8e2ec;
  background: #ffffff;
}

.employee-feedback-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.employee-feedback-head strong {
  color: #174a7d;
  font-size: 18px;
}

.employee-feedback-head span {
  display: none;
  color: #64748b;
  font-size: 12px;
}

.employee-feedback-head > button,
.employee-feedback-detail > header > button,
.employee-feedback-image-lightbox > button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475569;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.employee-feedback-head > button:hover,
.employee-feedback-detail > header > button:hover {
  background: #edf2f7;
  color: #0f172a;
}

.employee-feedback-tabs {
  min-height: 40px;
  display: flex;
  align-items: end;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid #d8e2ec;
  background: #ffffff;
  overflow-x: auto;
}

.employee-feedback-tabs button {
  position: relative;
  min-height: 35px;
  padding: 0 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #526477;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.employee-feedback-tabs button.active {
  border-bottom-color: #1f6fc1;
  color: #174a7d;
}

.employee-feedback-tabs b {
  position: absolute;
  top: 7px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
}

.employee-feedback-main {
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
  display: block;
  overflow: auto;
  background: #f8fafc;
}

.employee-feedback-main.is-compose {
  overflow: auto;
}

.employee-feedback-compose,
.employee-feedback-list-view,
.employee-feedback-detail {
  min-width: 0;
  overflow: auto;
}

.employee-feedback-compose {
  max-width: none;
  margin: 0;
  padding: 14px 18px 12px;
}

.employee-feedback-intro h2,
.employee-feedback-list-view h2 {
  margin: 0;
  color: #102d4c;
  font-size: 18px;
}

.employee-feedback-intro > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 10px;
}

.employee-feedback-intro > div > span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.employee-feedback-intro p,
.employee-feedback-list-view header p,
.employee-feedback-alias-manager header p {
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.employee-feedback-notice {
  margin: 12px 0;
  padding: 8px 10px;
  border: 1px solid #bad3ee;
  background: #eff7ff;
  color: #174a7d;
  line-height: 1.45;
}

.employee-feedback-notice.error {
  border-color: #f1b7bd;
  background: #fff5f5;
  color: #b4232f;
}

.employee-feedback-notice.success {
  border-color: #a9d8bf;
  background: #f0fbf4;
  color: #157347;
}

.employee-feedback-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.employee-feedback-form-grid label,
.employee-feedback-message-field,
.employee-feedback-admin-resolve label {
  display: grid;
  gap: 5px;
  color: #30445a;
  font-weight: 800;
}

.employee-feedback-form-grid input,
.employee-feedback-form-grid select,
.employee-feedback-title-field input,
.employee-feedback-message-field textarea,
.employee-feedback-admin-resolve select,
.employee-feedback-admin-resolve textarea,
.employee-feedback-alias-create input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #bdcddd;
  border-radius: 4px;
  background: #ffffff;
  color: #102033;
  font: inherit;
}

.employee-feedback-message-field {
  margin-top: 14px;
}

.employee-feedback-title-field {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  color: #30445a;
  font-weight: 800;
}

.employee-feedback-message-field textarea,
.employee-feedback-admin-resolve textarea {
  min-height: 120px;
  resize: vertical;
  font-weight: 500;
  line-height: 1.55;
}

.employee-feedback-context-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  margin-top: 10px;
  color: #486078;
}

.employee-feedback-context-toggle,
.employee-feedback-anonymous-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.employee-feedback-context-toggle input,
.employee-feedback-anonymous-toggle input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
}

.employee-feedback-context-none {
  color: #64748b;
}

.employee-feedback-form-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #dbe5ef;
}

.employee-feedback-form-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.employee-feedback-form-label strong {
  color: #30445a;
}

.employee-feedback-form-label span,
.employee-feedback-anonymous-toggle small {
  color: #6b7d90;
  font-size: 12px;
  line-height: 1.45;
}

.employee-feedback-recipient-picker {
  position: relative;
  margin-top: 8px;
}

.employee-feedback-recipient-control {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  padding: 5px 34px 5px 8px;
  border: 1px solid #bdcddd;
  border-radius: 4px;
  background: #ffffff;
}

.employee-feedback-recipient-control::before {
  content: "⌕";
  flex: 0 0 auto;
  color: #47739f;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.employee-feedback-recipient-control:focus-within,
.employee-feedback-recipient-control:has(.employee-feedback-recipient-chip) {
  border-color: #5f94c9;
  box-shadow: 0 0 0 2px rgba(37, 111, 193, 0.1);
}

.employee-feedback-recipient-control:has(.employee-feedback-recipient-chip)::before,
.employee-feedback-recipient-control:has(input:not(:placeholder-shown))::before {
  display: none;
}

.employee-feedback-recipient-chips {
  display: contents;
}

.employee-feedback-recipient-chip {
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px 2px 6px;
  border: 1px solid #c9dbef;
  background: #f4f9ff;
  color: #0d4fb3;
  font-weight: 800;
}

.employee-feedback-recipient-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-feedback-recipient-chip button,
.employee-feedback-recipient-search-clear {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f7894;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.employee-feedback-recipient-chip button:hover,
.employee-feedback-recipient-chip button:focus,
.employee-feedback-recipient-search-clear:hover,
.employee-feedback-recipient-search-clear:focus {
  background: #dcecff;
  color: #0d4fb3;
  outline: 0;
}

.employee-feedback-recipient-control input {
  min-width: 110px;
  flex: 1 1 150px;
  min-height: 30px;
  padding: 3px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #102033;
  font: inherit;
}

.employee-feedback-recipient-control input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.employee-feedback-recipient-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.employee-feedback-recipient-control:has(input:placeholder-shown) .employee-feedback-recipient-search-clear {
  display: none;
}

.employee-feedback-recipient-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  margin-top: 0;
  overflow: hidden;
  border: 1px solid #9fbddb;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(30, 58, 95, 0.16);
}

.employee-feedback-recipient-menu-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid #e2e9f1;
  background: #f6f9fc;
  color: #34495f;
  font-size: 12px;
  font-weight: 800;
}

.employee-feedback-recipient-menu-head small {
  color: #6b7d90;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.employee-feedback-recipient-options {
  max-height: 240px;
  overflow: auto;
}

.employee-feedback-recipient-option {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid #edf2f7;
  border-right: 0;
  border-left: 0;
  border-top: 0;
  background: #ffffff;
  color: #123047;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* The option itself is a grid.  Keep its runtime `hidden` state stronger than
   that display declaration so non-matching recipients cannot remain visible. */
.employee-feedback-recipient-option[hidden],
.employee-feedback-recipient-match[hidden],
.employee-feedback-empty[hidden] {
  display: none !important;
}

.employee-feedback-recipient-option:hover,
.employee-feedback-recipient-option:focus {
  background: #eaf3ff;
  outline: 0;
}

.employee-feedback-recipient-option strong {
  min-width: 0;
  color: #1f3348;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-feedback-recipient-option small {
  color: #718096;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-feedback-recipient-match {
  justify-self: end;
  min-width: 34px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffb4b4;
  background: #fff5f5;
  color: #e02424;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.employee-feedback-anonymous-toggle {
  margin-top: 15px;
  padding: 9px 10px;
  border: 1px solid #bfd4e9;
  background: #f5faff;
}

.employee-feedback-anonymous-toggle strong {
  color: #30445a;
  white-space: nowrap;
}

.employee-feedback-anonymous-toggle small {
  flex: 1 1 250px;
}

.employee-feedback-upload-label span {
  margin-left: auto;
  text-align: right;
}

.employee-feedback-file-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 280px);
  margin: 10px 0 0;
}

.employee-feedback-file-slot,
.employee-feedback-file-card {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed #91b5da;
  border-radius: 2px;
  background: #ffffff;
}

.employee-feedback-file-slot {
  display: grid;
  place-items: center;
  color: #2e689f;
  cursor: pointer;
}

.employee-feedback-file-slot:hover {
  border-color: #2d6fab;
  background: #f3f8fe;
}

.employee-feedback-file-slot span {
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.employee-feedback-file-card {
  border-style: solid;
  border-color: #bfd0e1;
}

.employee-feedback-file-preview {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.employee-feedback-file-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.employee-feedback-file-card [data-feedback-file-remove] {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 1px solid #e7a8ae;
  border-radius: 50%;
  background: #ffffff;
  color: #b4232f;
  cursor: pointer;
}

@media (max-width: 420px) {
  .employee-feedback-upload-label span {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .employee-feedback-anonymous-toggle small {
    flex-basis: 100%;
  }
}

.employee-feedback-primary,
.employee-feedback-secondary {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 4px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.employee-feedback-primary {
  border: 1px solid #1d5e9f;
  background: #216bb3;
  color: #ffffff;
}

.employee-feedback-primary:hover {
  background: #18588f;
}

.employee-feedback-primary:disabled {
  cursor: wait;
  opacity: 0.65;
}

.employee-feedback-secondary {
  border: 1px solid #b8c8d8;
  background: #ffffff;
  color: #315675;
}

.employee-feedback-secondary:hover {
  border-color: #7797b7;
  background: #f4f8fc;
}

.employee-feedback-form-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 0 0;
  border-top: 1px solid #dbe5ef;
  background: #f8fafc;
}

.employee-feedback-form-footer span {
  color: #64748b;
  font-size: 12px;
}

.employee-feedback-list-view {
  padding: 14px;
  border-right: 0;
}

.employee-feedback-list-view > header,
.employee-feedback-alias-body > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.employee-feedback-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.employee-feedback-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid #d4dfeb;
  background: #ffffff;
  color: #1c2d40;
  text-align: left;
  cursor: pointer;
}

.employee-feedback-card:hover,
.employee-feedback-card.is-selected {
  border-color: #82acd5;
  background: #f3f8fe;
}

.employee-feedback-card > div,
.employee-feedback-card footer {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.employee-feedback-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-feedback-card p {
  margin: 0;
  color: #5b6c7d;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.employee-feedback-card-module,
.employee-feedback-card-flow {
  color: #4d6a84;
  font-size: 12px;
  line-height: 1.4;
}

.employee-feedback-card-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.employee-feedback-card-images img {
  width: 58px;
  height: 46px;
  border: 1px solid #cbd8e5;
  background: #f8fafc;
  object-fit: cover;
}

.employee-feedback-card footer {
  flex-wrap: wrap;
  color: #718096;
  font-size: 11px;
}

.employee-feedback-card time {
  margin-left: auto;
}

.employee-feedback-unread {
  padding: 1px 4px;
  border-radius: 3px;
  background: #fff1f2;
  color: #c02635;
  font-size: 11px;
}

.employee-feedback-type,
.employee-feedback-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e9f2fc;
  color: #245a90;
  font-size: 11px;
  font-weight: 850;
}

.employee-feedback-status {
  background: #f1f5f9;
  color: #526477;
}

.employee-feedback-status.status-processing { background: #fff8e6; color: #a15b00; }
.employee-feedback-status.status-answered { background: #eaf8ef; color: #177245; }
.employee-feedback-status.status-closed { background: #edf1f5; color: #475569; }

.employee-feedback-detail {
  padding: 14px;
  background: #ffffff;
}

.employee-feedback-detail-empty {
  display: grid;
  place-items: center;
  color: #718096;
}

.employee-feedback-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #dbe5ef;
  padding-bottom: 10px;
}

.employee-feedback-detail h3 {
  margin: 6px 0 0;
  color: #142f4d;
  font-size: 17px;
}

.employee-feedback-detail > header > .employee-feedback-back-to-list {
  width: auto;
  min-width: 66px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #b8c8d8;
  border-radius: 4px;
  background: #ffffff;
  color: #315675;
  font-size: 12px;
  white-space: nowrap;
}

.employee-feedback-detail dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin: 13px 0;
}

.employee-feedback-detail dl div { min-width: 0; }
.employee-feedback-detail dt { color: #718096; font-size: 11px; }
.employee-feedback-detail dd { margin: 2px 0 0; color: #273c52; font-weight: 750; overflow-wrap: anywhere; }

.employee-feedback-detail-body {
  min-height: 110px;
  padding: 11px;
  border: 1px solid #d9e4ee;
  background: #f8fafc;
  color: #23384e;
  white-space: pre-wrap;
  line-height: 1.65;
}

.employee-feedback-resolution,
.employee-feedback-images,
.employee-feedback-admin-resolve,
.employee-feedback-workflow,
.employee-feedback-workflow-action {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #dbe5ef;
}

.employee-feedback-resolution p { margin: 6px 0 0; color: #40566d; white-space: pre-wrap; line-height: 1.55; }
.employee-feedback-images > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.employee-feedback-image { width: 94px; height: 72px; padding: 0; border: 1px solid #cbd8e5; background: #f8fafc; cursor: zoom-in; }
.employee-feedback-image img { width: 100%; height: 100%; object-fit: cover; }
.employee-feedback-admin-resolve { display: grid; gap: 10px; }

.employee-feedback-workflow > strong,
.employee-feedback-workflow-action > strong {
  display: block;
  color: #30445a;
}

.employee-feedback-workflow > p,
.employee-feedback-workflow-action > span {
  display: block;
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.employee-feedback-workflow ol {
  display: grid;
  gap: 8px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.employee-feedback-workflow li {
  padding: 9px 10px;
  border: 1px solid #d7e4ef;
  background: #f8fbfe;
}

.employee-feedback-workflow li header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #30445a;
}

.employee-feedback-workflow li time {
  color: #718096;
  font-size: 11px;
  white-space: nowrap;
}

.employee-feedback-workflow li p {
  margin: 6px 0 0;
  color: #40566d;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.employee-feedback-workflow-action {
  display: grid;
  gap: 9px;
}

.employee-feedback-workflow-action label {
  display: grid;
  gap: 5px;
  color: #30445a;
}

.employee-feedback-workflow-action textarea {
  width: 100%;
  min-height: 96px;
  padding: 8px 10px;
  border: 1px solid #bdcddd;
  border-radius: 4px;
  background: #ffffff;
  color: #102033;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.employee-feedback-workflow-action.is-archived {
  border-color: #bfdbca;
  background: #f2fbf5;
}

.employee-feedback-workflow-action.is-waiting {
  padding: 9px 10px;
  border: 1px solid #d7e4ef;
  background: #f8fbfe;
}

.employee-feedback-alias-manager {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border-top: 1px solid #d8e2ec;
  background: #f5f8fb;
}

.employee-feedback-alias-manager summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #315675;
  font-weight: 800;
  cursor: pointer;
}

.employee-feedback-alias-manager[open] summary {
  border-bottom: 1px solid #d8e2ec;
}

.employee-feedback-alias-body {
  max-height: 240px;
  overflow: auto;
  padding: 12px 14px 14px;
}

.employee-feedback-alias-manager h3 { margin: 0; color: #263f5a; }
.employee-feedback-alias-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0; }
.employee-feedback-alias-list > span { display: grid; gap: 2px; padding: 5px 8px; border: 1px solid #d2dfec; background: #ffffff; }
.employee-feedback-alias-list small { color: #6b7d90; }
.employee-feedback-alias-create { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px; align-items: start; }
.employee-feedback-alias-create > div { display: flex; flex-wrap: wrap; gap: 5px 10px; max-height: 70px; overflow: auto; padding: 5px 7px; border: 1px solid #c7d4e2; background: #ffffff; }
.employee-feedback-alias-create label { color: #40566d; white-space: nowrap; }

.employee-feedback-empty { color: #718096; }
.employee-feedback-empty-card { display: grid; place-items: center; min-height: 130px; border: 1px dashed #c8d5e3; background: #ffffff; }

.employee-feedback-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 36px;
  background: rgba(2, 6, 23, 0.84);
}

.employee-feedback-image-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.employee-feedback-image-lightbox > button { position: absolute; top: 12px; right: 16px; color: #ffffff; font-size: 32px; }

/* Employee-feedback employee views stay direct-read.  The system-administrator
   center is intentionally a PC ledger: list metadata on the left, full detail
   (including images) and management actions on the right. */
.employee-feedback-shell.is-admin-shell { width: min(1480px, calc(100vw - 48px)); }
.employee-feedback-list { display: grid; gap: 10px; }
.employee-feedback-record {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #c8d6e5;
  border-left: 3px solid #1f6fb2;
  background: #ffffff;
}
.employee-feedback-record > header,
.employee-feedback-record > header > div,
.employee-feedback-record-meta,
.employee-feedback-admin-filters,
.employee-feedback-admin-actions > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.employee-feedback-record > header { justify-content: space-between; align-items: flex-start; }
.employee-feedback-record > header > div { min-width: 0; flex-wrap: wrap; }
.employee-feedback-record h3 { margin: 0; color: #18324c; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.employee-feedback-record time { flex: 0 0 auto; color: #6e8091; font-size: 11px; white-space: nowrap; }
.employee-feedback-record-meta { flex-wrap: wrap; color: #587089; font-size: 12px; }
.employee-feedback-record-meta span { padding-right: 8px; border-right: 1px solid #d8e2ec; }
.employee-feedback-record-meta span:last-child { border-right: 0; }
.employee-feedback-record-body { color: #2a4157; white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.employee-feedback-record .employee-feedback-images { margin: 0; }
.employee-feedback-record .employee-feedback-images > div { margin-top: 6px; }
.employee-feedback-workflow { display: grid; gap: 7px; padding: 10px; border: 1px solid #d8e4ef; background: #f8fbfe; }
.employee-feedback-workflow > strong { color: #244764; }
.employee-feedback-workflow > p { margin: 0; color: #708196; font-size: 12px; }
.employee-feedback-workflow ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.employee-feedback-workflow li { display: grid; gap: 5px; padding-bottom: 8px; border-bottom: 1px dashed #d4e0eb; }
.employee-feedback-workflow li:last-child { padding-bottom: 0; border-bottom: 0; }
.employee-feedback-workflow li header { display: flex; justify-content: space-between; gap: 8px; color: #31516b; font-size: 12px; }
.employee-feedback-workflow li p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.employee-feedback-event-reason { color: #6b7280; }
.employee-feedback-reply-composer { display: grid; gap: 8px; }
.employee-feedback-reply-composer textarea { min-height: 84px; }
.employee-feedback-reply-files { margin: 0; }
.employee-feedback-admin-filters { flex-wrap: wrap; padding: 10px; border: 1px solid #c8d9ea; background: #f4f9fd; }
.employee-feedback-admin-filters input { flex: 1 1 260px; min-width: 0; }
.employee-feedback-admin-filters select { flex: 0 1 140px; }
.employee-feedback-admin-ledger { gap: 12px; }
.employee-feedback-admin-record { border-left-color: #0d5f99; }
.employee-feedback-admin-workspace {
  display: grid;
  grid-template-columns: minmax(680px, 1.65fr) minmax(380px, .85fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.employee-feedback-admin-ledger-pane,
.employee-feedback-admin-detail-pane {
  min-width: 0;
  border: 1px solid #c7d7e7;
  background: #ffffff;
}
.employee-feedback-admin-ledger-pane > header,
.employee-feedback-admin-detail-pane > header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e5f0;
  background: #f5f9fd;
}
.employee-feedback-admin-ledger-pane h3,
.employee-feedback-admin-detail-pane h3 { margin: 0; color: #173d63; font-size: 15px; }
.employee-feedback-admin-ledger-pane header span,
.employee-feedback-admin-detail-pane header span { display: block; margin-top: 4px; color: #61778c; font-size: 12px; line-height: 1.45; }
.employee-feedback-admin-table-wrap { max-height: calc(100vh - 284px); overflow: auto; }
.employee-feedback-admin-table { width: 100%; min-width: 1060px; border-collapse: collapse; table-layout: fixed; color: #2a4157; font-size: 12px; }
.employee-feedback-admin-table th,
.employee-feedback-admin-table td { padding: 9px 10px; border-right: 1px solid #dbe5ef; border-bottom: 1px solid #dbe5ef; vertical-align: top; text-align: left; }
.employee-feedback-admin-table th { position: sticky; top: 0; z-index: 1; background: #edf5fc; color: #31516b; font-size: 12px; white-space: nowrap; }
.employee-feedback-admin-table td:last-child { border-right: 0; }
.employee-feedback-admin-table tbody tr { background: #ffffff; }
.employee-feedback-admin-table tbody tr:hover { background: #f7fbff; }
.employee-feedback-admin-table tbody tr.is-selected { background: #eaf4ff; box-shadow: inset 3px 0 0 #1f6fb2; }
.employee-feedback-admin-summary strong { display: block; color: #183b5d; font-size: 13px; line-height: 1.45; }
.employee-feedback-admin-summary p { max-height: 92px; margin: 5px 0 4px; overflow: auto; color: #415a70; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.employee-feedback-admin-summary small { color: #6b8094; }
.employee-feedback-admin-people,
.employee-feedback-admin-time { display: grid; gap: 4px; line-height: 1.4; }
.employee-feedback-admin-people strong,
.employee-feedback-admin-time strong { color: #314f69; font-weight: 700; }
.employee-feedback-admin-people span,
.employee-feedback-admin-time span { color: #61778c; overflow-wrap: anywhere; }
.employee-feedback-admin-people small { color: #7a5d2b; }
.employee-feedback-admin-detail-pane { position: sticky; top: 0; max-height: calc(100vh - 164px); overflow: auto; }
.employee-feedback-admin-detail-pane > .employee-feedback-record { margin: 0; border: 0; border-left: 3px solid #0d5f99; }
.employee-feedback-admin-detail-pane .employee-feedback-empty-card { margin: 12px; }
.employee-feedback-admin-actions { display: grid; gap: 8px; padding: 10px; border: 1px solid #cedceb; background: #f7fbff; }
.employee-feedback-admin-followup { display: grid; grid-template-columns: minmax(160px, .35fr) minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.employee-feedback-admin-followup label,
.employee-feedback-admin-reason { display: grid; gap: 4px; color: #4e657b; font-size: 12px; font-weight: 700; }
.employee-feedback-admin-followup textarea { min-height: 58px; }
.employee-feedback-admin-reason { grid-template-columns: 82px minmax(0, 1fr); align-items: center; }
.employee-feedback-danger { border: 1px solid #db5f5f; background: #fff7f7; color: #c23d3d; }
.employee-feedback-load-more { justify-self: center; min-width: 150px; }

/* Employee-feedback administrator PC ledger follows the compact purchase-list grid. */
.employee-feedback-shell.is-admin-shell {
  width: min(1560px, calc(100vw - 48px));
}

.employee-feedback-list-view.is-admin {
  gap: 8px;
}

.employee-feedback-list-view.is-admin > header {
  min-height: 32px;
  margin: 0;
  padding: 0 2px;
}

.employee-feedback-list-view.is-admin > header h2 {
  font-size: 16px;
}

.employee-feedback-list-view.is-admin > header p {
  margin: 2px 0 0;
  font-size: 12px;
}

.employee-feedback-admin-filters {
  min-height: 34px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid #c2cfdd;
  background: #ffffff;
  gap: 6px;
}

.employee-feedback-admin-filters input,
.employee-feedback-admin-filters select,
.employee-feedback-admin-filters .employee-feedback-secondary {
  min-height: 26px;
  height: 26px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 24px;
}

.employee-feedback-admin-workspace {
  gap: 8px;
  margin-top: 0;
}

.employee-feedback-admin-ledger-pane,
.employee-feedback-admin-detail-pane {
  border-color: #c2cfdd;
  box-shadow: none;
}

.employee-feedback-admin-ledger-pane > header,
.employee-feedback-admin-detail-pane > header {
  min-height: 34px;
  padding: 4px 8px;
  border-bottom-color: #c2cfdd;
  background: #ffffff;
}

.employee-feedback-admin-ledger-pane h3,
.employee-feedback-admin-detail-pane h3 {
  color: #102033;
  font-size: 13px;
  font-weight: 800;
}

.employee-feedback-admin-ledger-pane header span,
.employee-feedback-admin-detail-pane header span {
  margin-top: 1px;
  color: #61778c;
  font-size: 11px;
  line-height: 1.25;
}

.employee-feedback-admin-table-wrap {
  max-height: calc(100vh - 248px);
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: auto;
  scrollbar-gutter: auto;
}

.employee-feedback-admin-table {
  width: 100%;
  min-width: 1614px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
  color: #102033;
  font-size: 12px;
}

.employee-feedback-admin-table col.employee-feedback-admin-col-number { width: 54px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-status { width: 76px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-type { width: 102px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-submitter { width: 120px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-recipient { width: 170px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-privacy { width: 108px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-title { width: 180px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-content { width: 300px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-processing { width: 260px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-module { width: 126px; }
.employee-feedback-admin-table col.employee-feedback-admin-col-action { width: 92px; }

.employee-feedback-admin-table th,
.employee-feedback-admin-table td {
  height: 34px;
  padding: 4px 6px;
  border: 1px solid var(--line-soft);
  vertical-align: middle;
  text-align: center;
  line-height: 1.25;
}

.employee-feedback-admin-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 36px;
  padding: 2px 3px;
  background: #f4e7ad;
  color: #000000;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.employee-feedback-admin-table th .ledger-head-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-feedback-admin-table tbody tr:nth-child(even) td {
  background: #fbfcfd;
}

.employee-feedback-admin-table tbody tr:hover td {
  background: #f8fbff;
}

.employee-feedback-admin-table tbody tr.is-selected td {
  background: #edf5ff;
}

.employee-feedback-admin-table tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 #1f6fb2;
}

.employee-feedback-admin-row-number {
  color: #31516b;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.employee-feedback-admin-field {
  text-align: left !important;
  vertical-align: top !important;
  overflow-wrap: anywhere;
}

.employee-feedback-admin-title {
  color: #102033;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.employee-feedback-admin-content,
.employee-feedback-admin-processing {
  color: #415a70;
  line-height: 1.45;
  white-space: pre-wrap;
}

.employee-feedback-admin-processing {
  color: #526b82;
  font-size: 11px;
}

.employee-feedback-admin-privacy {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid #cbd9e7;
  border-radius: 10px;
  color: #526b82;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}

.employee-feedback-admin-privacy.is-anonymous {
  border-color: #d7bd75;
  background: #fff8e2;
  color: #795d1e;
}

.employee-feedback-admin-table .employee-feedback-secondary {
  min-height: 24px;
  height: 24px;
  padding: 0 6px;
  line-height: 22px;
  white-space: nowrap;
}

/* Desktop administrator ledger: keep the modal controls and pane headings in
   place, while only the table rows and selected-record content can scroll. */
@media (min-width: 1181px) {
  .employee-feedback-shell.is-admin-shell {
    height: calc(100vh - 24px);
  }

  .employee-feedback-shell.is-admin-shell .employee-feedback-main.is-list,
  .employee-feedback-shell.is-admin-shell .employee-feedback-list-view.is-admin {
    overflow: hidden;
  }

  .employee-feedback-shell.is-admin-shell .employee-feedback-list-view.is-admin {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
  }

  .employee-feedback-shell.is-admin-shell .employee-feedback-admin-workspace {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    align-items: stretch;
    overflow: hidden;
  }

  .employee-feedback-shell.is-admin-shell .employee-feedback-admin-ledger-pane,
  .employee-feedback-shell.is-admin-shell .employee-feedback-admin-detail-pane {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .employee-feedback-shell.is-admin-shell .employee-feedback-admin-table-wrap,
  .employee-feedback-shell.is-admin-shell .employee-feedback-admin-detail-pane > .employee-feedback-admin-record {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
  }

  .employee-feedback-shell.is-admin-shell .employee-feedback-admin-detail-pane {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .employee-feedback-shell.is-admin-shell { width: min(980px, calc(100vw - 28px)); }
  .employee-feedback-admin-workspace { grid-template-columns: 1fr; }
  .employee-feedback-admin-table-wrap { max-height: 420px; }
  .employee-feedback-admin-detail-pane { position: static; max-height: none; }
}

@media (max-width: 780px) {
  .employee-feedback-shell { width: min(560px, calc(100vw - 16px)); max-height: calc(100vh - 16px); margin: 8px auto; }
  .employee-feedback-shell.is-admin-shell { width: min(560px, calc(100vw - 16px)); }
  .employee-feedback-main { max-height: none; }
  .employee-feedback-list-view { min-height: 0; max-height: none; }
  .employee-feedback-detail { min-height: 0; }
  .employee-feedback-compose { padding: 14px; }
  .employee-feedback-alias-create { grid-template-columns: 1fr; }
  .employee-feedback-admin-followup { grid-template-columns: 1fr; }
  .employee-feedback-admin-reason { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .employee-feedback-entry { min-width: 38px; margin-right: 4px; padding: 0 6px; font-size: 11px; }
  .employee-feedback-tabs { padding: 0 5px; }
  .employee-feedback-tabs button { padding: 0 8px; font-size: 12px; }
  .employee-feedback-form-footer { align-items: stretch; flex-direction: column; }
  .employee-feedback-detail dl { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .master-product-title-row {
    grid-template-columns: 1fr auto;
  }

  .master-product-title-label {
    display: none;
  }

  .master-product-title-row .master-product-title-input {
    grid-column: 1 / -1;
  }

  .master-product-media-group-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-product-edit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .master-product-identity-chips {
    grid-template-columns: minmax(0, 1fr);
  }
}

.master-product-variant-panel {
  min-width: 0;
  border: 1px solid #b8c7d9;
  border-left: 3px solid #0f74a8;
  background: #ffffff;
}

.master-product-detail-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid #d8e2ee;
  background: #eef6fb;
}

.master-product-detail-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.master-product-detail-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.master-product-detail-head span {
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-variant-add,
.master-product-variant-action {
  min-height: 24px;
  border: 1px solid #0f74a8;
  background: #0f74a8;
  color: #ffffff;
  padding: 0 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.master-product-variant-action {
  min-height: 22px;
  border-color: #b9c9ee;
  background: #f8fbff;
  color: #1d4ed8;
}

.master-product-variant-action:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.master-product-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #fbfdff;
}

.master-product-variant-chips span {
  max-width: 100%;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6dee8;
  background: #ffffff;
  color: #334155;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
  word-break: break-word;
}

.master-product-variant-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.master-product-variant-table {
  width: max-content;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 16px;
}

.master-product-variant-table.generic-editable-table th,
.master-product-variant-table.generic-editable-table td,
.master-product-variant-table th,
.master-product-variant-table td {
  min-width: 68px;
  height: 26px !important;
  border: 1px solid #d6dee8;
  padding: 1px 5px !important;
  text-align: center;
  font-size: 12px !important;
  line-height: 14px !important;
  white-space: nowrap !important;
}

.master-product-variant-table.generic-editable-table th,
.master-product-variant-table th {
  height: 22px !important;
  background: #f2e6b5;
  color: #0f172a;
  font-weight: 900;
}

.master-product-variant-table td {
  background: #f8fbff;
  color: #0f172a;
}

.master-product-variant-table tr.is-inactive td {
  background: #f8fafc;
  color: #64748b;
}

.master-product-variant-table th:first-child,
.master-product-variant-table td:first-child,
.master-product-variant-table th:nth-child(2),
.master-product-variant-table td:nth-child(2) {
  min-width: 76px;
}

.master-product-variant-table th:nth-child(4),
.master-product-variant-table td:nth-child(4) {
  min-width: 128px;
  text-align: left;
}

.master-product-variant-table th:nth-child(5),
.master-product-variant-table td:nth-child(5) {
  min-width: 150px;
}

.master-product-variant-integrated-table th:nth-child(5),
.master-product-variant-integrated-table td:nth-child(5) {
  min-width: 156px;
}

.master-product-variant-integrated-table th:nth-child(7),
.master-product-variant-integrated-table td:nth-child(7) {
  min-width: 180px;
}

.master-product-variant-composition {
  max-width: 260px;
  white-space: normal !important;
  word-break: break-word;
}

.master-product-variant-price-cell {
  color: #0f4c81;
  font-weight: 900;
}

.master-product-variant-status {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #92400e;
  padding: 0 6px;
  font-weight: 900;
}

.master-product-variant-status.is-ready {
  border-color: #059669;
  background: #ecfdf5;
  color: #047857;
}

.master-product-variant-status.is-inactive {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #475569;
}

.master-product-color-detail-table {
  min-width: 360px;
}

.master-product-color-detail-table th,
.master-product-color-detail-table td {
  min-width: 160px;
}

.master-product-price-cell {
  white-space: nowrap;
}

.master-product-price-cell span {
  display: block;
  color: #64748b;
  font-size: 11px;
  line-height: 14px;
}

.master-product-price-cell strong {
  display: block;
  color: #0f4c81;
  font-weight: 900;
}

.master-product-variant-fabric-input {
  width: 142px;
  min-height: 22px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 1px 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
}

.master-product-variant-fabric-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.master-product-variant-size-head,
.master-product-variant-size-cell {
  width: 44px;
  min-width: 44px !important;
  max-width: 44px;
}

.master-product-variant-size-cell.active {
  background: #e8f7ef;
  color: #047857;
  font-weight: 900;
}

.master-product-variant-sync-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 20px;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #92400e;
  margin-left: 6px;
  padding: 0 5px;
  font-weight: 900;
}

.master-product-variant-sync-status.is-synced {
  border-color: #059669;
  background: #ecfdf5;
  color: #047857;
}

.master-product-variant-sync-status.is-inactive {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #475569;
}

.master-product-variant-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.master-product-variant-action-danger {
  border-color: #fecaca;
  background: #fffafa;
  color: #dc2626;
}

.master-product-variant-action-print {
  border-color: #86efac;
  background: #f0fdf4;
  color: #047857;
}

.master-product-label-care-list-panel {
  min-width: 0;
  margin-top: 8px;
  border: 1px solid #b8c7d9;
  border-left: 3px solid #047857;
  background: #ffffff;
}

.master-product-label-care-list-chips span {
  background: #f7fffb;
}

.master-product-label-care-list-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.master-product-label-care-list-table {
  width: max-content;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 16px;
}

.master-product-label-care-list-table th,
.master-product-label-care-list-table td {
  min-width: 74px;
  height: 26px !important;
  border: 1px solid #d6dee8;
  padding: 1px 5px !important;
  text-align: center;
  font-size: 12px !important;
  line-height: 14px !important;
  white-space: nowrap !important;
}

.master-product-label-care-list-table th {
  height: 22px !important;
  background: #f2e6b5;
  color: #0f172a;
  font-weight: 900;
}

.master-product-label-care-list-table td {
  background: #fbfdff;
  color: #0f172a;
}

.master-product-label-care-list-table tr.is-inactive td {
  background: #f8fafc;
  color: #64748b;
}

.master-product-label-care-list-table th:nth-child(4),
.master-product-label-care-list-table td:nth-child(4),
.master-product-label-care-list-table th:nth-child(7),
.master-product-label-care-list-table td:nth-child(7) {
  min-width: 140px;
  text-align: left;
}

.master-product-label-care-list-composition {
  max-width: 260px;
  white-space: normal !important;
  word-break: break-word;
}

.master-product-label-care-list-status {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #92400e;
  padding: 0 6px;
  font-weight: 900;
}

.master-product-label-care-list-status.is-ready {
  border-color: #059669;
  background: #ecfdf5;
  color: #047857;
}

.master-product-label-care-list-status.is-pending {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #92400e;
}

.master-product-label-care-list-status.is-inactive {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #475569;
}

.master-product-label-care-modal .master-product-label-care-dialog {
  width: min(1080px, calc(100vw - 28px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.master-product-label-care-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  background: #ffffff;
}

.master-product-label-care-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.master-product-label-care-field {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid #d6dee8;
  background: #f8fbff;
  padding: 6px 8px;
}

.master-product-label-care-field span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.master-product-label-care-field strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-label-care-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.4fr);
  gap: 10px;
  align-items: start;
}

.master-product-label-care-panel {
  min-width: 0;
  border: 1px solid #d6dee8;
  background: #ffffff;
}

.master-product-label-care-panel header {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 5px 8px;
  border-bottom: 1px solid #d6dee8;
  background: #f2e6b5;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.master-product-label-care-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
  padding: 10px;
}

.master-product-label-care-size {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.master-product-label-care-size span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.master-product-label-care-size input {
  width: 100%;
  height: 30px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 0 6px;
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.master-product-label-care-size input::-webkit-outer-spin-button,
.master-product-label-care-size input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.master-product-label-care-cut-wrap {
  max-height: 330px;
  overflow: auto;
}

.master-product-label-care-cut-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}

.master-product-label-care-cut-table th,
.master-product-label-care-cut-table td {
  border: 1px solid #d6dee8;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}

.master-product-label-care-cut-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2e6b5;
  color: #0f172a;
  font-weight: 900;
}

.master-product-label-care-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
}

.master-product-label-care-cells span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #047857;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 900;
}

.master-product-label-care-print-area {
  display: none;
}

.master-product-label-care-print-sheet {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #0f172a;
}

.master-product-label-care-print-sheet h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.master-product-label-care-print-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

.master-product-label-care-print-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.master-product-label-care-print-sheet th,
.master-product-label-care-print-sheet td {
  border: 1px solid #111827;
  padding: 4px 6px;
  text-align: center;
}

@media (max-width: 900px) {
  .master-product-label-care-summary,
  .master-product-label-care-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.master-product-variant-empty {
  color: #64748b !important;
  text-align: left !important;
  white-space: normal !important;
}

.master-product-source-detail {
  padding: 6px 8px;
  border-left: 3px solid #64748b;
  background: #f8fafc;
}

.master-product-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 4px;
}

.master-product-source-field {
  min-width: 0;
  min-height: 28px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid #d6dee8;
  background: #ffffff;
  padding: 3px 6px;
  font-size: 12px;
  line-height: 16px;
}

.master-product-source-field strong {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.master-product-source-field span {
  min-width: 0;
  color: #0f172a;
  word-break: break-word;
}

.master-product-raw-source-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  max-height: 280px;
  overflow: auto;
}

.master-product-raw-source {
  min-width: 0;
  border: 1px solid #d6dee8;
  background: #ffffff;
}

.master-product-raw-source-title,
.master-product-raw-source-empty {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  border-bottom: 1px solid #e2e8f0;
  background: #eef3f8;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.master-product-raw-source-title span,
.master-product-raw-source-empty span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.master-product-raw-source-empty {
  margin-top: 6px;
  border: 1px solid #d6dee8;
  background: #ffffff;
}

.master-product-raw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: #e2e8f0;
}

.master-product-raw-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  background: #ffffff;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 16px;
}

.master-product-raw-field strong {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  word-break: break-word;
}

.master-product-raw-field span {
  min-width: 0;
  color: #0f172a;
  word-break: break-word;
}

@media (max-width: 900px) {
  .migration-tabs.master-module-tabs {
    grid-template-columns: 1fr;
  }

  .master-product-priority-cards {
    width: 100%;
  }

  .master-product-priority-cards-topbar {
    max-width: none;
  }

  .master-product-priority-card {
    flex: 1 1 128px;
  }

  .master-module-groupbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-module-switchbar,
  .master-source-sheet-strip,
  .master-compact-selector-row,
  .master-field-modebar {
    grid-column: 1 / -1;
  }

  .master-compact-selector {
    flex: 1 1 220px;
  }

  .master-compact-selector :is(select, .master-compact-picker, .master-compact-picker-trigger) {
    width: 100%;
    min-width: 0;
  }

  .master-field-modebar {
    justify-content: flex-start;
  }

  .master-product-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .master-product-detail-head > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.migration-table-tools {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.migration-table-tools .migration-edit-hint {
  flex: 1;
}

.migration-view.production-compact .migration-panel-head,
.migration-view.production-compact .migration-tabs,
.migration-view.production-compact .migration-table-tools {
  display: none;
}

.migration-table-count {
  font-weight: 800;
}

.migration-top-scroll {
  height: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fbff;
}

.migration-top-scroll-spacer {
  height: 1px;
}

.migration-table-wrap {
  min-height: 520px;
  overflow: auto;
}

.migration-table {
  border-collapse: collapse;
  min-width: 100%;
  width: max-content;
  background: #ffffff;
  font-size: var(--ledger-font-size);
}

.migration-table th,
.migration-table td {
  min-width: 92px;
  max-width: 280px;
  height: var(--ledger-row-height);
  border: 1px solid var(--line-soft);
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: pre-wrap;
  word-break: break-word;
  outline: 0;
}

.migration-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3e8b1;
  font-weight: var(--ledger-header-font-weight);
  height: var(--migration-header-row-height);
  padding: 6px 8px 8px;
  vertical-align: top;
  white-space: normal;
}

.migration-head-label {
  display: block;
  min-height: 30px;
  line-height: 15px;
  text-align: center;
  outline: 0;
  cursor: text;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.migration-filter-input {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 16px 0 3px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #142136;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.migration-filter-shell {
  position: relative;
  display: block;
  width: 100%;
  height: 28px;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 0;
  border: 1px solid #c9d5e2;
  background: #ffffff;
  cursor: text;
}

.migration-filter-shell.is-active {
  border-color: #2d72e8;
  box-shadow: inset 0 -2px 0 #2d72e8;
}

.migration-filter-input:focus {
  outline: 0;
}

.migration-filter-input::placeholder {
  color: #142136;
  font-weight: 900;
  opacity: 1;
}

.migration-filter-clear {
  position: absolute;
  right: 1px;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid #c7d2df;
  border-radius: 50%;
  background: #f4f7fb;
  color: #617185;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.migration-view.master-module-view .migration-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border: 1px solid #d3dce8;
  background: #ffffff;
}

.migration-view.master-module-view .migration-table {
  table-layout: fixed;
  font-size: 12px;
}

.migration-view.master-module-view .migration-table th,
.migration-view.master-module-view .migration-table td {
  min-width: 0;
  height: 32px;
  padding: 3px 5px;
  border-color: #d3dce8;
  line-height: 16px;
}

.migration-view.master-module-view .migration-table th {
  height: 48px;
  padding: 2px 3px;
  background: #f4e7ad;
  color: #0f172a;
  font-weight: 900;
  vertical-align: top;
}

.migration-view.master-module-view .migration-head-label {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.08;
}

.migration-view.master-module-view .migration-filter-shell {
  height: 24px;
  margin-top: 0;
  border-color: #b7c6d8;
  background: #ffffff;
}

.migration-view.master-module-view .migration-filter-input {
  height: 100%;
  margin: 0;
  padding: 0 14px 0 3px;
  border: 0;
  background: transparent;
  color: #142136;
  font-size: 12px;
  font-weight: 800;
}

#migrationView.master-module-view .migration-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

#migrationView.master-module-view .migration-top-scroll {
  display: none;
}

#migrationView.master-module-view .migration-table-tools {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0;
  border: 1px solid #d3dce8;
  border-bottom: 0;
  background: #ffffff;
  display: flex;
}

#migrationView.master-module-view .migration-table-tools .migration-edit-hint,
#migrationView.master-module-view .migration-table-tools #clearMigrationFilters {
  display: none;
}

#migrationView.master-embedded-business-mode .migration-table-tools,
#migrationView.master-embedded-business-mode .migration-top-scroll,
#migrationView.master-embedded-business-mode .migration-table-wrap {
  display: none !important;
}

#migrationView.master-embedded-business-mode .master-embedded-business-host {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

#migrationView.master-embedded-business-mode .sales-customer-master-embedded,
#migrationView.master-embedded-business-mode .sales-customer-master-embedded .supplier-purchase-list-scaffold {
  min-height: 0;
  height: 100%;
}

.master-embedded-business-state {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

#migrationView.master-module-view .migration-table-count {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
}

#migrationView.master-module-view .master-data-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 32px;
  max-height: 32px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  overflow: hidden;
}

#migrationView.master-module-view .master-data-list-tools .supplier-purchase-list-search,
#migrationView.master-module-view .master-data-list-tools .supplier-purchase-list-tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

#migrationView.master-module-view .master-data-list-tools .supplier-purchase-list-search {
  flex: 1 1 auto;
  overflow: hidden;
}

#migrationView.master-module-view .master-data-list-tools .supplier-purchase-list-tool-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

#migrationView.master-module-view .master-data-list-tools label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  margin: 0;
}

#migrationView.master-module-view .master-data-list-tools .supplier-purchase-search-wide {
  flex: 0 1 195px;
  min-width: 135px;
  max-width: 270px;
  margin-left: 4px;
}

#migrationView.master-module-view .master-data-list-tools .supplier-purchase-search-input {
  height: 26px;
  padding: 0 6px;
}

#migrationView.master-module-view .master-data-list-tools label:not(.supplier-purchase-search-wide) .supplier-purchase-search-input {
  width: 142px;
  min-width: 142px;
}

#migrationView.master-module-view .master-data-list-tools .supplier-purchase-apply-search,
#migrationView.master-module-view .master-data-list-tools .supplier-purchase-list-batch-btn {
  min-height: 26px;
  height: 26px;
  padding: 0 11px;
  line-height: 24px;
}

#migrationView.master-module-view .migration-table-wrap {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: auto;
  border-color: #c2cfdd;
  background: #ffffff;
}

#migrationView.master-module-view .migration-table {
  width: max-content;
  min-width: max-content;
  table-layout: fixed;
  background: #ffffff;
}

#migrationView.master-module-view .migration-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 36px;
  min-height: 36px;
  padding: 2px 3px;
  overflow: visible;
  vertical-align: middle;
  background: #f4e7ad !important;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

#migrationView.master-module-view .migration-table > thead > tr > th.migration-row-select-cell {
  z-index: 10;
  width: 32px;
  min-width: 32px !important;
  max-width: 32px;
  text-align: center;
}

#migrationView.master-module-view .migration-table > thead > tr > th.migration-row-index {
  z-index: 9;
  width: 46px;
  min-width: 46px !important;
  max-width: 46px;
}

#migrationView.master-module-view .migration-table > thead > tr > th:has(.migration-filter-shell) .migration-head-label {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 2px;
  z-index: 1;
  min-height: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid #d7e0ea;
  background: #ffffff;
  box-shadow: none;
  color: #000000;
  font-weight: 800;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

#migrationView.master-module-view .migration-table > thead > tr > th:has(.migration-filter-shell.is-active) .migration-head-label,
#migrationView.master-module-view .migration-table > thead > tr > th:has(.migration-filter-input:not(:placeholder-shown)) .migration-head-label {
  display: none;
}

#migrationView.master-module-view .migration-table > thead > tr > th:not(:has(.migration-filter-shell)):not(.migration-row-select-cell):not(.migration-row-index) .migration-head-label {
  min-height: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid #d7e0ea;
  background: #ffffff;
  box-shadow: none;
  color: #000000;
  font-weight: 800;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#migrationView.master-module-view .migration-table > thead > tr > th .migration-filter-shell {
  position: relative;
  width: 100%;
  height: 28px;
  min-width: 0;
  margin: 0;
  border: 1px solid #d7e0ea;
  background: #ffffff;
  box-shadow: none;
}

#migrationView.master-module-view .migration-table > thead > tr > th:has(.migration-filter-shell):not(:has(.migration-filter-shell.is-active)):not(:has(.migration-filter-input:not(:placeholder-shown))) .migration-filter-shell {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

#migrationView.master-module-view .migration-table > thead > tr > th .migration-filter-input {
  width: 100%;
  height: 28px;
  min-width: 0;
  margin: 0;
  padding: 0 16px 0 4px;
  border: 0;
  background: transparent;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: 0;
}

#migrationView.master-module-view .migration-table > thead > tr > th .migration-filter-input::placeholder {
  color: transparent;
  opacity: 1;
}

#migrationView.master-module-view .migration-table > thead > tr > th:has(.migration-filter-shell.is-active) .migration-filter-input::placeholder {
  color: #000000;
  opacity: 1;
}

#migrationView.master-module-view .migration-table > thead > tr > th .migration-filter-input:focus {
  outline: 2px solid rgba(45, 114, 232, 0.18);
  outline-offset: -2px;
}

#migrationView.master-module-view .migration-table > tbody > tr:not(.master-product-detail-row):not(.standard-list-summary-row) > td {
  height: 31px;
  padding: 3px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  background: #ffffff !important;
}

#migrationView.master-module-view .migration-table > tbody > tr:not(.master-product-detail-row):not(.standard-list-summary-row):hover > td {
  background: #ffffff !important;
}

#migrationView.master-module-view .migration-row-index {
  background: #ffffff !important;
  color: #000000;
}

#migrationView.master-module-view .migration-table > thead > tr > th.migration-row-index {
  background: #f4e7ad !important;
}

#migrationView.master-module-view .master-product-field-control,
#migrationView.master-module-view .master-product-list-readonly-cell,
#migrationView.master-module-view .master-product-field-readonly-cell,
#migrationView.master-module-view .master-product-title-cell,
#migrationView.master-module-view .master-product-date-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}

#migrationView.master-module-view .master-product-field-control {
  padding: 0 6px;
}

#migrationView.master-module-view .migration-row-action-cell {
  white-space: nowrap;
}

#migrationView.master-module-view .master-product-row-actions {
  flex-wrap: nowrap;
}

#migrationView.master-module-view .migration-table td:focus,
#migrationView.master-module-view .migration-table th:focus,
#migrationView.master-module-view .migration-head-label:focus,
#migrationView.master-module-view .migration-table .selected {
  box-shadow: none;
}

.migration-column-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 6;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  background: rgba(45, 114, 232, 0.18);
  opacity: 0;
}

.migration-table th:hover .migration-column-resize-handle,
.migration-column-resize-handle.dragging {
  opacity: 1;
}

.migration-row-index {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 46px !important;
  width: 46px;
  text-align: center;
  background: #eef3f7 !important;
  color: var(--muted);
  font-weight: 700;
}

.migration-view.master-module-view .migration-row-select-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 32px !important;
  width: 32px;
  max-width: 32px;
  padding: 0 3px !important;
  text-align: center;
  background: #ffffff !important;
}

.migration-view.master-module-view .migration-row-select-cell input {
  width: 14px;
  height: 14px;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
}

.migration-view.master-module-view th.migration-row-select-cell {
  z-index: 14;
  background: #f4e7ad !important;
  vertical-align: middle;
}

.migration-view.master-module-view .migration-row-index {
  position: sticky;
  left: 32px;
  z-index: 4;
  min-width: 46px !important;
  width: 46px;
  max-width: 46px;
  color: #0050a4;
  font-weight: 900;
  background: #ffffff !important;
}

.migration-view.master-module-view th.migration-row-index {
  z-index: 13;
  background: #f4e7ad !important;
  color: #0f172a;
  vertical-align: middle;
}

.migration-view.master-module-view .migration-table tbody tr:nth-child(odd) > td {
  background: #ffffff;
}

.migration-view.master-module-view .migration-table tbody tr:nth-child(even) > td {
  background: #ffffff;
}

.migration-view.master-module-view .migration-table tbody tr:nth-child(odd) > .migration-row-select-cell,
.migration-view.master-module-view .migration-table tbody tr:nth-child(odd) > .migration-row-index {
  background: #ffffff !important;
}

.migration-view.master-module-view .migration-table tbody tr:nth-child(even) > .migration-row-select-cell,
.migration-view.master-module-view .migration-table tbody tr:nth-child(even) > .migration-row-index {
  background: #ffffff !important;
}

.migration-view.master-module-view .migration-table tbody tr.master-product-detail-row > td {
  background: #ffffff !important;
}

.migration-empty-row {
  height: 96px !important;
  text-align: center;
  color: var(--muted);
}

.migration-combined-qty {
  font-weight: 800;
}

.migration-strong-value {
  font-weight: 800;
}

.migration-table td:focus,
.migration-table th:focus,
.migration-head-label:focus,
.migration-table .selected {
  box-shadow: inset 0 0 0 2px var(--focus);
  background: #eef5ff;
}
.ai-read-card {
  position: relative;
  min-height: var(--summary-row-height);
  border: 1px solid #1e5fb8;
  background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 100%);
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(30, 95, 184, 0.08);
}

.ai-read-card:hover,
.ai-read-card:focus-visible {
  border-color: #0f4fa8;
  box-shadow: 0 0 0 3px rgba(45, 114, 232, 0.16);
  outline: 0;
}

.ai-read-card span,
.ai-read-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #0f4fa8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ai-read-card strong {
  display: block;
  margin-top: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.ai-read-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.ai-read-modal.hidden {
  display: none;
}

.ai-read-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
}

.ai-read-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.48);
}

.ai-read-dialog {
  position: relative;
  width: min(940px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(8, 18, 32, 0.28);
}

.ai-read-content {
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
}

.ai-read-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line-soft);
}

.ai-read-modal-head h2 {
  margin: 4px 0 4px;
  font-size: 24px;
}

.ai-read-modal-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ai-read-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ai-read-warning {
  margin: 16px 20px 0;
  padding: 12px 14px;
  color: #6b3d00;
  background: #fff7e8;
  border: 1px solid #f1d19a;
  line-height: 1.6;
  font-weight: 600;
}

.ai-read-section-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
}

.ai-read-section {
  border: 1px solid var(--line-soft);
  background: #fff;
  padding: 14px 16px;
}

.ai-read-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.ai-read-section ul {
  margin: 0;
  padding-left: 18px;
  color: #2d3a4a;
  line-height: 1.65;
}

.ai-read-section li + li {
  margin-top: 5px;
}

body.ai-read-open {
  overflow: hidden;
}

@media (max-width: 860px) {
  .ai-read-section-list {
    grid-template-columns: 1fr;
  }

  .ai-read-modal-head {
    align-items: flex-start;
  }
}

.rule-hint-popover {
  position: fixed;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(168px, calc(100vw - 16px));
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #d7dde3;
  border-left: 3px solid #8b949e;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.14);
  color: #20262d;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  white-space: nowrap;
  overflow: hidden;
}

.rule-hint-popover.visible {
  opacity: 1;
  transform: translateY(0);
}

.rule-hint-popover.hidden {
  display: none;
}

.rule-hint-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1f4f7;
  color: #3d4651;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.rule-hint-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.2;
  color: #36414d;
}

.rule-hint-top,
.rule-hint-popover p,
.rule-hint-popover small {
  display: none;
}

.rule-hint-popover[data-rule-hint-category="manual"] {
  border-left-color: #2f7d51;
}

.rule-hint-popover[data-rule-hint-category="rule"] {
  border-left-color: #b56a1f;
}

.rule-hint-popover[data-rule-hint-category="system"] {
  border-left-color: #b4232f;
}

.rule-hint-popover[data-rule-hint-category="check"] {
  border-left-color: #3c6fd1;
}

[data-rule-hint-active="1"] {
  box-shadow: inset 0 0 0 1px rgba(60, 111, 209, 0.34);
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  width: 0;
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="search"]::-ms-clear,
input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

input[list]::-webkit-calendar-picker-indicator,
input[data-selection-search-auto-open]::-webkit-calendar-picker-indicator,
input[data-purchase-reference-picker]::-webkit-calendar-picker-indicator,
input[data-purchase-supplier-picker]::-webkit-calendar-picker-indicator,
input[data-context-supplier-picker]::-webkit-calendar-picker-indicator,
input[data-product-master-picker]::-webkit-calendar-picker-indicator {
  display: none !important;
  width: 0;
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.clearable-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.clearable-control > input,
.clearable-control > select {
  width: 100%;
  padding-right: 22px !important;
  box-sizing: border-box;
}

.clearable-control.is-date > input,
.clearable-control.is-select > select,
.clearable-control.is-list-date > input {
  padding-right: 42px !important;
}

.clearable-control-button {
  position: absolute;
  top: 50%;
  right: 3px;
  width: 14px;
  height: 14px;
  border: 1px solid #c6d4e1;
  border-radius: 50%;
  background: #ffffff;
  color: #5f7184;
  font-size: 10px;
  line-height: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
}

.clearable-control.is-date .clearable-control-button,
.clearable-control.is-select .clearable-control-button,
.clearable-control.is-list-date .clearable-control-button {
  right: 24px;
}

.production-main-list-toolbar-card .clearable-control.is-date > input,
.supplier-purchase-list-toolbar-card .clearable-control.is-date > input,
.ledger-table-search .clearable-control.is-date > input,
.transfer-list-search .clearable-control.is-date > input,
.production-main-list-toolbar-card .clearable-control.is-list-date > input,
.supplier-purchase-list-toolbar-card .clearable-control.is-list-date > input,
.ledger-table-search .clearable-control.is-list-date > input,
.transfer-list-search .clearable-control.is-list-date > input {
  padding-right: 24px !important;
}

.production-main-list-toolbar-card .clearable-control.is-date .clearable-control-button,
.supplier-purchase-list-toolbar-card .clearable-control.is-date .clearable-control-button,
.ledger-table-search .clearable-control.is-date .clearable-control-button,
.transfer-list-search .clearable-control.is-date .clearable-control-button,
.production-main-list-toolbar-card .clearable-control.is-list-date .clearable-control-button,
.supplier-purchase-list-toolbar-card .clearable-control.is-list-date .clearable-control-button,
.ledger-table-search .clearable-control.is-list-date .clearable-control-button,
.transfer-list-search .clearable-control.is-list-date .clearable-control-button,
.clearable-control:has(.ledger-table-date-input).is-date .clearable-control-button {
  top: 50%;
  right: 3px !important;
  width: 14px;
  height: 14px;
  border: 1px solid #c6d4e1;
  background: #ffffff;
  color: #5f7184;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 12px;
  text-shadow: none;
  transform: translateY(-50%);
}

.clearable-control-button:hover,
.clearable-control-button:focus {
  border-color: #2d72e8;
  color: #0d4fb3;
  outline: 2px solid rgba(45, 114, 232, 0.16);
}

.clearable-control:not(.has-value) .clearable-control-button {
  opacity: 0.68;
}

.selection-search-popup {
  position: fixed;
  z-index: 12120;
  max-width: min(520px, calc(100vw - 16px));
  max-height: min(380px, calc(100vh - 16px));
  display: flex;
  flex-direction: column;
  border: 1px solid #c7d6e5;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 48, 71, 0.18);
  overflow: hidden;
}

/* 通用两级业务候选骨架：桌面端固定规格，只有视口不足时才等比收缩可用空间。 */
.candidate-popover-level-1,
.candidate-popover-level-2 {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.candidate-popover-level-1,
.candidate-popover-level-2 {
  width: min(550px, calc(100vw - 24px)) !important;
  min-width: min(550px, calc(100vw - 24px)) !important;
  max-width: min(550px, calc(100vw - 24px)) !important;
  height: min(300px, calc(100vh - 24px));
  min-height: min(300px, calc(100vh - 24px));
  max-height: min(300px, calc(100vh - 24px)) !important;
}

.candidate-popover-level-1 > .selection-search-popup-head,
.candidate-popover-level-2 > .selection-search-popup-head,
.candidate-popover-level-1 > .cut-order-output-picker-head,
.candidate-popover-level-2 > .cut-order-output-picker-head,
.candidate-popover-level-1 > footer,
.candidate-popover-level-2 > footer,
.candidate-popover-level-1 > .purchase-doc-style-picker-title,
.candidate-popover-level-2 > .purchase-doc-style-picker-title,
.candidate-popover-level-1 > .purchase-doc-style-picker-foot,
.candidate-popover-level-2 > .purchase-doc-style-picker-foot {
  flex: 0 0 auto;
}

.candidate-popover-level-1 > .selection-search-popup-list,
.candidate-popover-level-2 > .selection-search-popup-list,
.candidate-popover-level-1 > .purchase-doc-style-picker-list,
.candidate-popover-level-2 > .purchase-doc-style-picker-list,
.candidate-popover-level-1 > .cut-order-output-picker-list,
.candidate-popover-level-2 > .cut-order-output-picker-list,
.candidate-popover-level-1 > .cut-order-manual-item-list,
.candidate-popover-level-2 > .cut-order-manual-item-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.candidate-business-option {
  display: grid;
  grid-template-columns: minmax(72px, .9fr) minmax(54px, .68fr) minmax(82px, 1.2fr) minmax(86px, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid #e5edf5;
  background: #fff;
  color: #123047;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.candidate-business-option.has-recent-column {
  grid-template-columns: minmax(68px, .82fr) minmax(48px, .58fr) minmax(72px, 1fr) minmax(76px, .88fr) 58px;
}

.candidate-business-option.is-grouped-product{grid-template-columns:minmax(96px,120px) minmax(0,1fr) auto}
.candidate-business-option.is-grouped-product > .candidate-business-summary { color: #475569; }

.candidate-business-option:hover,
.candidate-business-option:focus-visible {
  background: #eaf3ff;
  outline: 0;
}

.candidate-business-option > strong,
.candidate-business-option > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-business-option > strong { color: #0f172a; font-weight: 900; }
.candidate-business-option > span { color: #52667e; font-size: 12px; }
.candidate-business-option > em {
  justify-self: end;
  color: #c2410c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.selection-search-popup-purchase-product-code {
  max-width: min(620px, calc(100vw - 16px));
  max-height: min(520px, calc(100vh - 16px));
}

.selection-search-popup-reference {
  z-index: 12130;
}

.selection-search-popup-compact-reference {
  max-width: min(204px, calc(100vw - 16px));
}

.selection-search-popup.hidden {
  display: none;
}

.master-product-set-picker-popup {
  /* Shared by finished-product and material color/size candidate pickers. */
  z-index: 30010;
  max-width: min(460px, calc(100vw - 16px));
  max-height: min(410px, calc(100vh - 16px));
  pointer-events: auto;
}

.master-reference-material-color-picker-popup {
  max-width: min(430px, calc(100vw - 16px));
  max-height: min(460px, calc(100vh - 16px));
}

.master-reference-material-color-picker-popup .master-product-set-picker-grid {
  min-height: 0;
}

.master-reference-material-color-picker-popup .master-product-set-picker-list {
  max-height: 330px;
}

.master-product-set-picker-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #dbe5ef;
  background: #f4f8fb;
  color: #0f172a;
}

.master-product-set-picker-head strong {
  font-size: 13px;
  font-weight: 900;
}

.master-product-set-picker-head span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-picker-search {
  display: block;
  padding: 8px 10px 0;
}

.master-product-set-picker-search input {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 1px solid #bfdbfe;
  border-radius: 3px;
  padding: 6px 10px;
  color: #0f172a;
  font-size: 13px;
  line-height: 20px;
  outline: none;
}

.master-product-set-picker-search input:focus {
  border-color: #1677c8;
  box-shadow: 0 0 0 2px rgba(22, 119, 200, 0.12);
}

.master-product-set-picker-grid {
  display: grid;
  min-height: 214px;
  border-bottom: 1px solid #dbe5ef;
  background: #ffffff;
}

.master-product-color-picker-grid {
  grid-template-columns: minmax(0, 1fr);
}

.master-product-size-picker-grid {
  grid-template-columns: 156px minmax(0, 1fr);
}

.master-product-set-picker-side {
  min-width: 0;
  max-height: 274px;
  overflow: auto;
  border-right: 1px solid #dbe5ef;
  background: #f8fafc;
}

.master-product-set-picker-family,
.master-product-set-picker-size {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #e6edf4;
  background: transparent;
  color: #0f172a;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-picker-family span,
.master-product-set-picker-size span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-set-picker-family b,
.master-product-set-picker-size b {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-picker-family:hover,
.master-product-set-picker-family:focus,
.master-product-set-picker-size:hover,
.master-product-set-picker-size:focus,
.master-product-set-picker-family.is-active,
.master-product-set-picker-size.is-active {
  background: #eaf3ff;
  outline: 0;
}

.master-product-set-picker-size.is-selected {
  color: #0f5fb8;
}

.master-product-set-picker-size.is-selected b {
  color: #0f5fb8;
}

.master-product-set-picker-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.master-product-size-picker-grid .master-product-set-picker-main {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.master-product-set-picker-actions {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid #e6edf4;
  background: #ffffff;
}

.master-product-size-picker-create {
  gap: 6px;
}

.master-product-size-create-name,
.master-product-size-create-keys {
  min-width: 0;
  height: 26px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 3px 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.master-product-size-create-name {
  flex: 1 1 118px;
}

.master-product-size-create-keys {
  flex: 1.4 1 150px;
}

.master-product-size-create-name:focus,
.master-product-size-create-keys:focus {
  border-color: #0f74a8;
  box-shadow: 0 0 0 2px rgba(15, 116, 168, 0.14);
  outline: 0;
}

.master-product-size-picker-add {
  flex: 0 0 auto;
}

.master-product-set-picker-placeholder {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-picker-add-query {
  max-width: 100%;
  min-height: 26px;
  border: 1px solid #0f74a8;
  background: #0f74a8;
  color: #ffffff;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-set-picker-add-query:disabled {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #64748b;
  cursor: default;
}

.master-product-set-picker-list {
  max-height: 236px;
  overflow: auto;
}

.master-product-set-picker-option {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 18px 14px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid #eef3f7;
  background: #ffffff;
  color: #123047;
  padding: 6px 9px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.master-product-set-picker-option:hover,
.master-product-set-picker-option:focus,
.master-product-set-picker-option.is-selected {
  background: #eaf3ff;
  outline: 0;
}

.master-product-set-picker-check {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b6c7db;
  background: #ffffff;
  color: #0f5fb8;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-picker-option.is-selected .master-product-set-picker-check {
  border-color: #0f5fb8;
  background: #dbeeff;
}

.master-product-set-picker-option strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-picker-empty {
  min-height: 36px;
  display: flex;
  align-items: center;
  color: #64748b;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.master-product-set-picker-size-title {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #e6edf4;
  background: #ffffff;
}

.master-product-set-picker-size-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.master-product-set-picker-size-title span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.master-product-size-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  padding: 12px;
}

.master-product-size-preview-list span {
  min-width: 42px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 900;
}

.master-product-set-picker-foot {
  min-height: 38px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #f8fafc;
}

.master-product-set-picker-confirm {
  min-width: 76px;
  min-height: 26px;
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.master-product-set-picker-confirm:hover,
.master-product-set-picker-confirm:focus {
  border-color: #0f5f59;
  background: #0f5f59;
  outline: 0;
}

.selection-search-popup-purchase-style-multi {
  max-width: min(420px, calc(100vw - 24px));
  max-height: min(300px, calc(100vh - 24px));
}

.selection-search-popup-purchase-style-multi.is-material-color-picker {
  max-width: min(420px, calc(100vw - 24px));
}

.purchase-doc-style-picker-title {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(86px, 118px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid #e6edf4;
  background: #ffffff;
}

.purchase-doc-style-picker-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.purchase-doc-style-picker-title .purchase-doc-product-code-summary {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.purchase-doc-style-picker-statuses,
.purchase-doc-product-code-statuses {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.purchase-doc-style-picker-statuses em,
.purchase-doc-product-code-statuses em {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 5px;
  border: 1px solid #b8d4f4;
  border-radius: 3px;
  background: #f1f7ff;
  color: #0f5fb8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.purchase-doc-style-picker-statuses em.is-default,
.purchase-doc-product-code-statuses em.is-default {
  border-color: #f0c36d;
  background: #fff8e7;
  color: #a35300;
}

.purchase-doc-style-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: #ffffff;
}

.purchase-doc-style-option {
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #eef3f7;
  color: #123047;
  cursor: pointer;
}

.purchase-doc-style-option:hover,
.purchase-doc-style-option:focus-within {
  background: #eaf3ff;
}

.purchase-doc-style-option input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.purchase-doc-style-option span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.purchase-doc-style-option strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.purchase-doc-style-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.purchase-doc-style-option input:checked + span strong {
  color: #0f5fb8;
}

.candidate-replenishment-badge {
  margin-left: 5px; color: #e60012; font-size: 11px; font-weight: 900;
}

.purchase-doc-style-option.purchase-doc-material-color-option {
  min-height: 38px;
  grid-template-columns: 18px minmax(0, 1fr);
  padding-top: 5px;
  padding-bottom: 5px;
}

.purchase-doc-style-option.purchase-doc-material-color-option > span {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.purchase-doc-style-option.purchase-doc-material-color-option strong,
.purchase-doc-style-option.purchase-doc-material-color-option small {
  white-space: nowrap;
}

.purchase-doc-style-option.purchase-doc-material-color-option small {
  color: #475569;
  font-weight: 800;
}

.purchase-doc-style-option.purchase-doc-finished-style-option > span {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(100px, 0.9fr) auto auto;
  align-items: center;
  gap: 12px;
}

.purchase-doc-style-option.purchase-doc-finished-style-option strong,
.purchase-doc-style-option.purchase-doc-finished-style-option small {
  white-space: nowrap;
}

.purchase-doc-product-code-option {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(86px, 118px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #eef3f7;
  background: #fff;
  color: #123047;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.purchase-doc-product-code-option:hover,
.purchase-doc-product-code-option:focus {
  background: #eaf3ff;
  outline: 0;
}

.purchase-doc-product-code-option > strong,
.purchase-doc-product-code-option > .purchase-doc-product-code-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.purchase-doc-product-code-option > strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.purchase-doc-product-code-option .purchase-doc-product-code-summary {
  color: #475569;
}

.purchase-doc-product-code-option > .purchase-doc-product-code-statuses {
  justify-content: flex-end;
}

.purchase-doc-style-picker-foot {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid #e2e9f1;
  background: #f8fafc;
}

.purchase-doc-style-picker-foot span {
  margin-right: auto;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.purchase-doc-style-picker-foot button {
  min-width: 68px;
  min-height: 26px;
  border: 1px solid #c7d6e5;
  background: #ffffff;
  color: #123047;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.purchase-doc-style-picker-foot button:hover,
.purchase-doc-style-picker-foot button:focus {
  border-color: #2d72e8;
  outline: 0;
}

.purchase-doc-style-picker-foot [data-purchase-doc-style-confirm] {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.purchase-doc-style-picker-foot [data-purchase-doc-style-confirm]:hover,
.purchase-doc-style-picker-foot [data-purchase-doc-style-confirm]:focus {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.selection-search-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e9f1;
  background: #f6f9fc;
  color: #34495f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selection-search-popup-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selection-search-popup-compact-reference .selection-search-popup-head {
  min-height: 40px;
  padding: 9px 10px;
}

.selection-search-popup-add {
  flex: 0 0 auto;
  min-width: 48px;
  width: auto;
  height: 24px;
  border: 1px solid #c7d6e5;
  background: #eaf4ff;
  color: #0f5fb8;
  font-size: 13px;
  font-weight: 800;
  padding: 0 9px;
  cursor: pointer;
}

.selection-search-popup-add:hover,
.selection-search-popup-add:focus {
  border-color: #2d72e8;
  background: #dbeeff;
  outline: 0;
}

.selection-search-popup-add:disabled {
  border-color: #dbe3ec;
  background: #f3f6f9;
  color: #94a3b8;
  cursor: default;
}

.selection-search-popup-compact-reference .selection-search-popup-add {
  min-width: 52px;
  height: 28px;
}

.selection-search-popup-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 332px;
  overflow: auto;
}

.selection-search-popup-reference .selection-search-popup-list,
.selection-search-popup-supplier .selection-search-popup-list {
  max-height: none;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.selection-search-popup-compact-reference .selection-search-popup-list {
  max-height: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.selection-search-popup-reference .selection-search-popup-list::-webkit-scrollbar,
.selection-search-popup-supplier .selection-search-popup-list::-webkit-scrollbar {
  width: 10px;
}

.selection-search-popup-reference .selection-search-popup-list::-webkit-scrollbar-track,
.selection-search-popup-supplier .selection-search-popup-list::-webkit-scrollbar-track {
  background: #eef4fb;
}

.selection-search-popup-reference .selection-search-popup-list::-webkit-scrollbar-thumb,
.selection-search-popup-supplier .selection-search-popup-list::-webkit-scrollbar-thumb {
  background: #9db8d5;
  border: 2px solid #eef4fb;
  border-radius: 8px;
}

.selection-search-popup-reference .selection-search-popup-list::-webkit-scrollbar-thumb:hover,
.selection-search-popup-supplier .selection-search-popup-list::-webkit-scrollbar-thumb:hover {
  background: #6f95bd;
}

.selection-search-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eef3f7;
  background: #fff;
  color: #123047;
  text-align: left;
  cursor: pointer;
}

.selection-search-popup-reference .selection-search-option,
.selection-search-popup-supplier .selection-search-option {
  grid-template-columns: minmax(0, 1fr) auto;
}

.selection-search-popup-compact-reference .selection-search-option {
  min-height: 34px;
  padding: 7px 9px;
}

.selection-search-popup-color .selection-search-option {
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  min-height: 32px;
  padding: 6px 9px;
  position: relative;
}

.selection-search-popup-color .selection-search-option.is-selected {
  background: #eaf3ff;
}

.selection-search-popup-color .selection-search-option.is-selected::after {
  content: "\2713";
  position: absolute;
  right: 9px;
  color: #0f5fb8;
  font-size: 12px;
  font-weight: 800;
}

.selection-search-color-swatch {
  width: 10px;
  height: 10px;
  border: 1px solid #9fb0c3;
  border-radius: 999px;
  background: var(--selection-color, #e5e7eb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.selection-search-option:hover,
.selection-search-option:focus {
  background: #eaf3ff;
  outline: none;
}

.selection-search-option.is-category-match {
  border-left: 3px solid #1264c7;
  background: #f1f7ff;
  padding-left: 7px;
}

.selection-search-option.is-category-match:hover,
.selection-search-option.is-category-match:focus {
  background: #e4f0ff;
}

.selection-search-option.is-default-supplier-match {
  border-left: 3px solid #d97706;
  background: #fff8eb;
  padding-left: 7px;
}

.selection-search-option.is-default-supplier-match:hover,
.selection-search-option.is-default-supplier-match:focus {
  background: #fff0cf;
}

.selection-search-option.is-default-supplier-match.is-category-match {
  border-left-color: #0f766e;
  background: #eefbf7;
}

.selection-search-option strong {
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-search-option span:not(.selection-search-match-badge) {
  color: #6b7b8c;
  font-size: 12px;
  white-space: nowrap;
}

.selection-search-option.is-category-match span:not(.selection-search-match-badge) {
  color: #0f5fb8;
  font-weight: 900;
}

.selection-search-match-badge {
  justify-self: end;
  min-width: 34px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffb4b4;
  background: #fff5f5;
  color: #e02424;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.selection-search-match-badge.is-default-supplier {
  border-color: #f0c36d;
  background: #fff8e7;
  color: #a35300;
}

.selection-search-empty {
  padding: 14px 12px;
  color: #6b7b8c;
  font-size: 13px;
}

.selection-search-popup-empty {
  padding: 14px 12px;
  color: #6b7b8c;
  font-size: 13px;
  text-align: center;
}

.cost-accounting-panel {
  padding: 20px;
  background: #f3f7fa;
}

.cost-accounting-board {
  display: grid;
  gap: 12px;
  color: #123047;
}

.cost-accounting-header,
.cost-accounting-section {
  border: 1px solid #cbd7e4;
  background: #fff;
}

.cost-accounting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
}

.cost-accounting-header h2,
.cost-accounting-section h3 {
  margin: 0;
  color: #123047;
  font-weight: 800;
  letter-spacing: 0;
}

.cost-accounting-header h2 {
  font-size: 22px;
}

.cost-accounting-header p,
.cost-accounting-section p {
  margin: 8px 0 0;
  color: #5d7186;
  font-size: 13px;
  line-height: 1.5;
}

.cost-accounting-header-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
  min-width: 300px;
}

.cost-accounting-flow-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 280px;
}

.cost-accounting-flow-tags span {
  border: 1px solid #cfe0ed;
  background: #f7fbfd;
  color: #264760;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-header-metrics span,
.cost-accounting-system-grid > div {
  border: 1px solid #d5e0ec;
  background: #f8fbfe;
  padding: 10px 12px;
}

.cost-accounting-header-metrics span {
  color: #66798e;
  font-size: 12px;
}

.cost-accounting-header-metrics strong,
.cost-accounting-system-grid strong {
  display: block;
  margin-top: 4px;
  color: #0f2c44;
  font-size: 18px;
  line-height: 1.2;
}

.cost-accounting-section {
  padding: 14px;
}

.cost-accounting-search-row-section {
  padding: 6px 14px;
}

.cost-accounting-search-section {
  padding: 14px;
}

.cost-accounting-search-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) auto auto;
  gap: 10px;
  align-items: end;
}

.cost-accounting-bom-search-form.cost-accounting-search-grid {
  grid-template-columns: minmax(220px, 360px) 64px 74px;
  gap: 8px;
  align-items: center;
}

.cost-accounting-bom-search-form-topbar.cost-accounting-search-grid {
  grid-template-columns: minmax(170px, 260px) 62px 70px;
}

.cost-accounting-bom-search-form .supplier-doc-field {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.cost-accounting-bom-search-form .supplier-doc-field input {
  height: 32px;
  border-radius: 0;
}

.cost-accounting-bom-search-form .supplier-doc-field span {
  min-width: 42px;
  color: #526579;
  line-height: 32px;
  text-align: right;
  white-space: nowrap;
}

.cost-accounting-bom-search-form .cost-accounting-search-query-btn,
.cost-accounting-bom-search-form .cost-accounting-search-reset-btn {
  height: 32px;
  min-width: 0;
  padding: 0 14px;
  justify-content: center;
}

.cost-accounting-bom-search-form .cost-accounting-search-reset-btn {
  border-color: #cbd7e4;
  background: #ffffff;
  color: #173d56;
}

.cost-accounting-bom-connect-btn {
  min-width: 92px;
  height: 32px;
  border: 1px solid #f0b35b;
  background: #fff8e8;
  color: #9a5a00;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cost-accounting-bom-connect-btn:disabled {
  border-color: #cbd7e4;
  background: #f3f6f9;
  color: #8a99aa;
  cursor: not-allowed;
}

.cost-accounting-pending-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cost-accounting-reference-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cost-accounting-reference-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 37, 56, 0.46);
}

.cost-accounting-reference-picker {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  margin: 0;
  border: 1px solid #d6e0ec;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(18, 47, 72, 0.24);
  overflow: hidden;
}

.cost-accounting-reference-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 7px 12px;
  border-bottom: 1px solid #d6e0ec;
  background: #f5f9fd;
}

.cost-accounting-reference-picker-head strong {
  color: #102f48;
  font-size: 14px;
  font-weight: 800;
}

.cost-accounting-reference-picker-head span,
.cost-accounting-reference-empty {
  color: #5f7185;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-reference-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #5f7185;
  font-size: 20px;
  line-height: 28px;
  cursor: pointer;
}

.cost-accounting-reference-close:hover,
.cost-accounting-reference-close:focus {
  border-color: #aac2da;
  background: #ffffff;
  color: #173d56;
  outline: none;
}

.cost-accounting-reference-search-row {
  padding: 10px 12px;
  border-bottom: 1px solid #e1e8f0;
  background: #ffffff;
}

.cost-accounting-reference-search-row input {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #b9c9d9;
  border-radius: 2px;
  background: #ffffff;
  color: #173d56;
  font-size: 13px;
  outline: none;
}

.cost-accounting-reference-search-row input:focus {
  border-color: #2d72e8;
  box-shadow: 0 0 0 2px rgba(45, 114, 232, 0.12);
}

.cost-accounting-reference-list {
  display: grid;
  gap: 0;
  max-height: 360px;
  overflow-y: auto;
}

.cost-accounting-reference-option {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e1e8f0;
  background: #ffffff;
  color: #123047;
  text-align: left;
  cursor: pointer;
}

.cost-accounting-reference-option:hover,
.cost-accounting-reference-option:focus {
  background: #eef6ff;
  outline: 2px solid rgba(45, 114, 232, 0.16);
  outline-offset: -2px;
}

.cost-accounting-reference-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.cost-accounting-reference-main strong {
  color: #092f4e;
  font-size: 14px;
  font-weight: 900;
}

.cost-accounting-reference-main em {
  min-width: 0;
  color: #37536d;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-reference-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #5b7085;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-reference-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-reference-note {
  color: #12633f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cost-accounting-reference-empty {
  padding: 12px 10px;
}

.cost-accounting-reference-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border-top: 1px solid #d6e0ec;
  background: #f8fafc;
}

.cost-accounting-reference-footer span {
  color: #5f7185;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-reference-option[hidden],
.cost-accounting-reference-empty[hidden] {
  display: none;
}

.cost-accounting-bom-new-btn {
  border-color: #cbd7e4;
  background: #ffffff;
  color: #173d56;
}

.cost-accounting-bom-connect-btn:hover,
.cost-accounting-bom-connect-btn:focus {
  border-color: #d08418;
  background: #fff1cf;
  outline: 2px solid rgba(208, 132, 24, 0.18);
}

.cost-accounting-bom-connect-btn:disabled:hover,
.cost-accounting-bom-connect-btn:disabled:focus {
  border-color: #cbd7e4;
  background: #f3f6f9;
  outline: none;
}

.cost-accounting-search-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cost-accounting-search-grid span {
  color: #66798e;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-search-grid input,
.cost-accounting-search-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid #cbd7e4;
  border-radius: 0;
  background: #ffffff;
  color: #132c43;
  font-size: 13px;
  padding: 0 10px;
}

.cost-accounting-search-grid input:focus,
.cost-accounting-search-grid select:focus {
  border-color: var(--focus);
  outline: 2px solid rgba(45, 114, 232, 0.18);
}

.cost-accounting-search-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #5d7186;
  font-size: 13px;
}

.cost-accounting-search-result-head strong {
  color: #123047;
  font-size: 14px;
}

.cost-accounting-search-scroll {
  margin-top: 8px;
}

.cost-accounting-search-table {
  min-width: 1120px;
}

.cost-accounting-search-table tr[data-cost-search-result] {
  cursor: pointer;
}

.cost-accounting-search-table tr[data-cost-search-result]:hover td,
.cost-accounting-search-table tr[data-cost-search-result]:focus td {
  background: #eef6ff;
}

.cost-accounting-search-table tr.selected td {
  background: #fff6df;
}

.cost-accounting-result-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #cbd7e4;
  background: #ffffff;
  color: #44556a;
  font-size: 12px;
  font-weight: 800;
}

.cost-accounting-result-status.ready {
  border-color: #b7ddcc;
  background: #eefbf4;
  color: #137447;
}

.cost-accounting-result-status.pending {
  border-color: #f3c881;
  background: #fff8e8;
  color: #94620f;
}

.cost-accounting-result-status.draft {
  border-color: #9ec5fe;
  background: #eff6ff;
  color: #1454a6;
}

.cost-accounting-empty-cell {
  height: 56px;
  color: #6a7d92;
  text-align: center;
}

.cost-accounting-empty-detail {
  min-height: 92px;
  background: #fbfdff;
}

.cost-accounting-pending-detail {
  min-height: 0;
}

.cost-accounting-pending-head {
  align-items: center;
}

.cost-accounting-pending-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  max-width: 1180px;
}

.cost-accounting-pending-item {
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.cost-accounting-pending-item span {
  color: #66798e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.cost-accounting-pending-item strong {
  color: #0f2f4a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.cost-accounting-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.cost-accounting-system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cost-accounting-system-grid-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cost-accounting-subject-section .cost-accounting-system-grid-six {
  grid-template-columns: repeat(auto-fill, minmax(132px, 170px));
  justify-content: start;
  align-items: stretch;
  max-width: min(100%, 1160px);
}

.cost-accounting-subject-section {
  padding-top: 10px;
  padding-bottom: 10px;
}

.cost-accounting-subject-section .cost-accounting-section-header {
  margin-bottom: 6px;
}

.cost-accounting-subject-section .cost-accounting-system-grid > div {
  min-height: 48px;
  padding: 6px 8px;
}

.cost-accounting-subject-card {
  resize: both;
  overflow: auto;
  min-width: 132px;
  min-height: 48px;
  max-width: 360px;
  max-height: 180px;
  box-sizing: border-box;
}

.cost-accounting-subject-strip-section {
  padding: 6px 14px;
}

.cost-accounting-subject-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 34px;
  color: #123047;
}

.cost-accounting-subject-strip > strong {
  flex: 0 0 auto;
  color: #102033;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.cost-accounting-subject-strip dl {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  min-width: 0;
  margin: 0;
}

.cost-accounting-subject-strip dl > div {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.cost-accounting-subject-strip dt {
  color: #6a7d92;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-subject-strip dd {
  margin: 0;
  color: #173d56;
  font-size: 14px;
  font-weight: 850;
}

.cost-accounting-system-grid span {
  display: block;
  color: #6a7d92;
  font-size: 12px;
}

.cost-accounting-system-grid strong,
.cost-accounting-system-cell {
  background: #eef5fa;
  color: #173d56;
  font-weight: 700;
}

.cost-accounting-subject-section .cost-accounting-system-grid strong {
  display: inline-block;
  max-width: 100%;
  padding: 0;
  font-size: 15px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.cost-accounting-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #cbd7e4;
  background: #f7fbfd;
  color: #123047;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 13px;
}

.cost-accounting-status-badge.ok {
  border-color: #b7ddcc;
  background: #eefbf4;
  color: #137447;
}

.cost-accounting-status-badge.warn {
  border-color: #f3c881;
  background: #fff8e8;
  color: #94620f;
}

.cost-accounting-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cost-accounting-source-card {
  border: 1px solid #d5e0ec;
  background: #f8fbfe;
  padding: 10px 12px;
}

.cost-accounting-source-card.ok {
  border-color: #b7ddcc;
  background: #f2fbf6;
}

.cost-accounting-source-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cost-accounting-source-card strong {
  color: #123047;
}

.cost-accounting-source-card span {
  color: #137447;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cost-accounting-source-card p {
  margin: 8px 0 0;
  color: #314f67;
}

.cost-accounting-source-card small {
  display: block;
  margin-top: 6px;
  color: #6a7d92;
  line-height: 1.4;
}

.cost-accounting-support-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cost-accounting-support-summary article {
  border: 1px solid #cbd7e4;
  background: #f8fbfe;
  padding: 12px;
  min-width: 0;
}

.cost-accounting-support-summary article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cost-accounting-support-summary h3 {
  margin: 0;
  color: #123047;
  font-size: 15px;
  font-weight: 800;
}

.cost-accounting-support-summary strong:not(.cost-accounting-status-badge) {
  color: #137447;
  font-size: 12px;
  white-space: nowrap;
}

.cost-accounting-support-summary p {
  margin: 8px 0 0;
  color: #456176;
  font-size: 12px;
  line-height: 1.45;
}

.cost-accounting-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 12px;
}

.cost-accounting-doubt-panel {
  border: 1px solid #d5e0ec;
  background: #f8fbfe;
  padding: 10px 12px;
  color: #456176;
}

.cost-accounting-doubt-panel.has-doubt {
  border-color: #f3c881;
  background: #fff8e8;
  color: #7c4f08;
}

.cost-accounting-doubt-panel span {
  display: block;
  line-height: 1.6;
}

.cost-accounting-scroll {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid #d9e3ee;
  background-color: #fff;
}

.cost-accounting-table,
.cost-accounting-kv-table {
  width: max-content;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
  border-right: 2px solid #9db0bf;
}

.cost-accounting-compact-table {
  min-width: 0;
}

.cost-accounting-bom-table {
  min-width: 1280px;
  width: max-content;
  table-layout: fixed;
  border: 1px solid #9db0bf;
  border-right: 1px solid #9db0bf;
}

.cost-accounting-size-rule-table {
  min-width: 0;
}

.cost-accounting-jst-export-table {
  min-width: 2380px;
}

.cost-accounting-table th:last-child,
.cost-accounting-table td:last-child,
.cost-accounting-kv-table th:last-child,
.cost-accounting-kv-table td:last-child {
  border-right: 2px solid #9db0bf;
}

.cost-accounting-jst-export-table th:nth-child(1),
.cost-accounting-jst-export-table td:nth-child(1),
.cost-accounting-jst-export-table th:nth-child(6),
.cost-accounting-jst-export-table td:nth-child(6),
.cost-accounting-jst-export-table th:nth-child(16),
.cost-accounting-jst-export-table td:nth-child(16),
.cost-accounting-jst-export-table th:nth-child(20),
.cost-accounting-jst-export-table td:nth-child(20) {
  width: 180px;
}

.cost-accounting-bom-row-shared td {
  background: #fbfdff;
}

.cost-accounting-bom-row-group td {
  background: #fffdfa;
}

.cost-accounting-bom-table td.strong {
  color: #123047;
  font-weight: 800;
}

.cost-accounting-bom-amount {
  color: #0f172a;
}

.cost-accounting-template-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 22px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #173d56;
  font-weight: 700;
  padding: 0;
  box-sizing: border-box;
}

.cost-accounting-table th,
.cost-accounting-table td,
.cost-accounting-kv-table th,
.cost-accounting-kv-table td {
  border: 1px solid #cbd7e4;
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.cost-accounting-table th,
.cost-accounting-kv-table th {
  background: #15344f;
  color: #fff;
  font-weight: 800;
}

.cost-accounting-kv-table td {
  background: #fff;
}

.cost-accounting-input,
.cost-accounting-select {
  width: 100%;
  min-width: 72px;
  height: 30px;
  border: 1px solid #c6d4e1;
  background: #fff;
  color: #123047;
  font: inherit;
  padding: 4px 8px;
  box-sizing: border-box;
}

.cost-accounting-auto-cell {
  background: #f4f8fb;
  color: #173d56;
  font-weight: 700;
}

.cost-accounting-system-cell {
  box-shadow: inset 3px 0 0 #8bb2cf;
}

.cost-accounting-result-table th {
  background: #1c5548;
  color: #ffffff;
}

.cost-accounting-result-table td {
  background: #f6fbf7;
  color: #17362f;
  font-weight: 650;
}

.cost-accounting-result-table td.strong,
.cost-accounting-system-cell.strong {
  color: #0f6b4b;
  font-weight: 800;
}

.cost-accounting-result-table td.strong {
  background: #edf8f1;
  box-shadow: inset 3px 0 0 #61a982;
}

.cost-accounting-style-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  line-height: 1.2;
  white-space: nowrap;
}

.cost-accounting-style-inline span {
  color: #123047;
  font-size: 12px;
  font-weight: 800;
}

.cost-accounting-style-inline strong {
  color: #1c6b94;
  font-size: 13px;
  font-weight: 900;
}

.cost-accounting-result-table .cost-accounting-style-inline strong {
  color: #0f6b4b;
}

@media (max-width: 900px) {
  .cost-accounting-header {
    flex-direction: column;
  }

  .cost-accounting-header-metrics,
  .cost-accounting-system-grid,
  .cost-accounting-system-grid-six,
  .cost-accounting-source-grid,
  .cost-accounting-support-summary,
  .cost-accounting-main-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-accounting-main-grid {
    grid-template-columns: 1fr;
  }

  .cost-accounting-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-accounting-flow-tags {
    min-width: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 1320px) {
  .topbar-title-row .cost-accounting-topbar-search {
    flex-basis: 100%;
    min-width: 0;
    max-width: none;
    margin-left: 0;
  }

  .cost-accounting-bom-search-form-topbar.cost-accounting-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.transfer-list-search {
  display: grid;
  grid-template-columns: 120px 140px 140px minmax(260px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0 12px;
}

.transfer-list-search input,
.transfer-list-search select {
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  font-size: 13px;
}

.transfer-list-search .production-main-search-button,
.transfer-list-search .production-main-clear-btn {
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  line-height: 30px;
}

.transfer-structured-table {
  table-layout: fixed;
  width: max-content;
}

.transfer-structured-table th,
.transfer-structured-table td {
  white-space: normal;
  word-break: break-word;
}

.transfer-structured-table th {
  vertical-align: top;
}

.transfer-structured-table .ledger-head-label {
  display: block;
  min-height: 18px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.transfer-structured-table .ledger-filter-input {
  width: 100%;
  min-width: 0;
  height: 26px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 12px;
  background: #fff;
}

.transfer-ledger-cell {
  min-height: 34px;
}

.transfer-ledger-size-cell,
.transfer-ledger-total-cell,
.transfer-document-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.transfer-ledger-size-cell {
  font-weight: 700;
}

.transfer-ledger-total-cell {
  font-weight: 700;
  color: #111827;
  background: #f8fafc;
}

.transfer-ledger-actions-head,
.transfer-ledger-actions-cell {
  width: 150px;
  min-width: 150px;
  background: #fff;
}

.transfer-ledger-actions-head {
  background: #f3f4f6;
}

.transfer-ledger-actions-cell .primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .transfer-list-search {
    grid-template-columns: 1fr 1fr;
  }

  .transfer-list-search input[type="search"],
  .transfer-list-search .ledger-filter-count {
    grid-column: 1 / -1;
  }
}

.transfer-document-table.transfer-factory-ledger-table {
  table-layout: fixed;
  width: max-content;
}

.transfer-document-table.transfer-factory-ledger-table th,
.transfer-document-table.transfer-factory-ledger-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.transfer-document-table.transfer-factory-ledger-table th {
  vertical-align: top;
}

.transfer-document-table.transfer-factory-ledger-table .ledger-head-label {
  display: block;
  min-height: 18px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.transfer-document-table.transfer-factory-ledger-table .ledger-filter-input {
  width: 100%;
  min-width: 0;
  height: 26px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 12px;
  background: #fff;
}

/* codex-nondispatch-purchase-style-20260616:start */
/* Visual-only alignment for non-dispatch boards. Excludes shortage/cut/ledger/archive blocks. */
.common-panel,
.production-main-overview,
.production-center-workspace,
.piecework-workspace,
.transfer-panel,
.transfer-workbench-shell,
.permissions-board,
.production-craft-board,
.migration-panel,
.cost-accounting-board {
  color: #102033;
}

.common-panel,
.common-business-workspace,
.production-main-overview,
.production-center-workspace,
.piecework-workspace,
.transfer-panel,
.transfer-workbench-shell,
.permissions-board,
.production-craft-board,
.migration-panel,
.cost-accounting-panel {
  background: #f6f8fb;
}

.common-empty-workspace,
.common-task-hero,
.common-todo-panel,
.common-task-lane,
.common-task-side,
.production-main-head,
.production-main-table-wrap,
.production-center-workspace,
.production-center-action-grid div,
.production-center-boundary,
.piecework-card,
.piecework-scan-card,
.piecework-workbench-card,
.piecework-bed-card,
.piecework-process-box,
.piecework-rate-panel,
.piecework-review-panel,
.transfer-block,
.transfer-workbench-card,
.transfer-document-card,
.transfer-structured-wrap,
.permissions-toolbar,
.permissions-notice,
.permission-role-card,
.permission-settings-panel,
.permission-matrix-group,
.production-craft-card,
.production-craft-template,
.production-craft-field-group,
.production-craft-governance-card,
.migration-panel-head,
.migration-tabs,
.migration-table-tools,
.migration-table-wrap,
.cost-accounting-header,
.cost-accounting-section,
.cost-accounting-source-card,
.cost-accounting-support-summary article,
.cost-accounting-doubt-panel,
.cost-accounting-scroll {
  border-color: #d6e0ea;
  border-radius: 0;
  background-color: #ffffff;
  box-shadow: none;
}

.common-task-hero strong,
.common-todo-panel h3,
.common-task-lane h3,
.common-task-side strong,
.production-main-head strong,
.production-center-workspace-head strong,
.piecework-card-head strong,
.transfer-block h3,
.transfer-workbench-card h3,
.permissions-board h2,
.production-craft-card h3,
.migration-panel-head h2,
.cost-accounting-header h2,
.cost-accounting-section h3 {
  color: #0f172a;
  letter-spacing: 0;
}

.production-main-head span,
.production-main-head em,
.production-main-note,
.production-center-workspace-head span,
.production-center-action-grid span,
.piecework-card-head span,
.migration-panel-head span,
.migration-source,
.migration-edit-hint,
.cost-accounting-header p,
.cost-accounting-section p {
  color: #667585;
}

.production-main-table,
.piecework-table,
.piecework-small-table,
.piecework-review-table,
.transfer-structured-table,
.transfer-document-table,
.migration-table,
.cost-accounting-table,
.cost-accounting-kv-table,
.cost-accounting-search-table {
  background: #ffffff;
}

.production-main-table th,
.piecework-table th,
.piecework-small-table th,
.piecework-review-table th,
.transfer-structured-table th,
.transfer-document-table th,
.migration-table th,
.cost-accounting-table th,
.cost-accounting-kv-table th,
.cost-accounting-search-table th {
  background: #f1e5b7;
  color: #22303b;
  font-weight: var(--ledger-header-font-weight);
}

.production-main-table th,
.production-main-table td,
.piecework-table th,
.piecework-table td,
.piecework-small-table th,
.piecework-small-table td,
.piecework-review-table th,
.piecework-review-table td,
.transfer-structured-table th,
.transfer-structured-table td,
.transfer-document-table th,
.transfer-document-table td,
.migration-table th,
.migration-table td,
.cost-accounting-table th,
.cost-accounting-table td,
.cost-accounting-kv-table th,
.cost-accounting-kv-table td,
.cost-accounting-search-table th,
.cost-accounting-search-table td {
  border-color: var(--line-soft);
}

.production-main-table tbody tr:nth-child(even) td,
.piecework-table tbody tr:nth-child(even) td,
.piecework-small-table tbody tr:nth-child(even) td,
.piecework-review-table tbody tr:nth-child(even) td,
.transfer-structured-table tbody tr:nth-child(even) td,
.transfer-document-table tbody tr:nth-child(even) td,
.migration-table tbody tr:nth-child(even) td,
.cost-accounting-table tbody tr:nth-child(even) td,
.cost-accounting-kv-table tbody tr:nth-child(even) td,
.cost-accounting-search-table tbody tr:nth-child(even) td {
  background-color: #fbfcfd;
}

.production-main-table tbody tr:hover td,
.piecework-table tbody tr:hover td,
.piecework-small-table tbody tr:hover td,
.piecework-review-table tbody tr:hover td,
.transfer-structured-table tbody tr:hover td,
.transfer-document-table tbody tr:hover td,
.migration-table tbody tr:hover td,
.cost-accounting-table tbody tr:hover td,
.cost-accounting-kv-table tbody tr:hover td,
.cost-accounting-search-table tbody tr:hover td {
  background-color: #f8fbff;
}

.production-main-status,
.cost-accounting-status-badge,
.cost-accounting-result-status {
  border-radius: 0;
  font-weight: 800;
}

.transfer-list-search input,
.transfer-list-search select,
.migration-filter-input,
.cost-accounting-search-grid input,
.cost-accounting-search-grid select,
.cost-accounting-input,
.cost-accounting-select {
  border-color: #cad4df;
  border-radius: 0;
  background: #ffffff;
}
/* codex-nondispatch-purchase-style-20260616:end */

/* codex-global-list-ledger-style-20260618:start */
/* Keep business fields intact; align ordinary list tables to the cut-ledger visual language. */
.business-clickable-list {
  margin: 0 18px 16px;
  border: 1px solid #cfd8e3;
  border-radius: 0;
  background: #ffffff;
  overflow: auto;
}

.business-clickable-list-head {
  display: none;
}

.permission-employee-table-wrap,
.jst-task-table-wrap,
.supplier-purchase-list-table-wrap,
.piecework-table-wrap,
.production-main-table-wrap,
.transfer-structured-wrap,
.transfer-document-table-wrap,
.migration-table-wrap,
.cost-accounting-scroll,
.cost-accounting-search-scroll {
  border: 1px solid #cfd8e3;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: auto;
  padding: 0;
}

.business-clickable-table,
.permission-employee-table,
.jst-task-table,
.supplier-purchase-list-table,
.production-main-table,
.piecework-table,
.piecework-small-table,
.piecework-review-table,
.transfer-structured-table,
.transfer-document-table,
.migration-table,
.cost-accounting-table,
.cost-accounting-kv-table,
.cost-accounting-search-table {
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.business-clickable-table th,
.permission-employee-table th,
.jst-task-table th,
.supplier-purchase-list-table th,
.production-main-table th,
.piecework-table th,
.piecework-small-table th,
.piecework-review-table th,
.transfer-structured-table th,
.transfer-document-table th,
.migration-table th,
.cost-accounting-table th,
.cost-accounting-kv-table th,
.cost-accounting-search-table th {
  height: 58px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  background: #f1e5b7;
  color: #22303b;
  font-size: var(--ledger-header-font-size);
  font-weight: var(--ledger-header-font-weight);
  line-height: 1.25;
  text-align: center;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.business-clickable-table td,
.permission-employee-table td,
.jst-task-table td,
.supplier-purchase-list-table td,
.production-main-table td,
.piecework-table td,
.piecework-small-table td,
.piecework-review-table td,
.transfer-structured-table td,
.transfer-document-table td,
.migration-table td,
.cost-accounting-table td,
.cost-accounting-kv-table td,
.cost-accounting-search-table td {
  height: 46px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  color: #102033;
  font-size: var(--ledger-font-size);
  line-height: 1.28;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.business-clickable-table tbody tr:nth-child(even) td,
.permission-employee-table tbody tr:nth-child(even) td,
.jst-task-table tbody tr:nth-child(even) td,
.supplier-purchase-list-table tbody tr:nth-child(even) td,
.production-main-table tbody tr:nth-child(even) td,
.piecework-table tbody tr:nth-child(even) td,
.piecework-small-table tbody tr:nth-child(even) td,
.piecework-review-table tbody tr:nth-child(even) td,
.transfer-structured-table tbody tr:nth-child(even) td,
.transfer-document-table tbody tr:nth-child(even) td,
.migration-table tbody tr:nth-child(even) td,
.cost-accounting-table tbody tr:nth-child(even) td,
.cost-accounting-kv-table tbody tr:nth-child(even) td,
.cost-accounting-search-table tbody tr:nth-child(even) td {
  background: #fbfcfd;
}

.business-clickable-table tbody tr:hover td,
.permission-employee-table tbody tr:hover td,
.jst-task-table tbody tr:hover td,
.supplier-purchase-list-table tbody tr:hover td,
.production-main-table tbody tr:hover td,
.piecework-table tbody tr:hover td,
.piecework-small-table tbody tr:hover td,
.piecework-review-table tbody tr:hover td,
.transfer-structured-table tbody tr:hover td,
.transfer-document-table tbody tr:hover td,
.migration-table tbody tr:hover td,
.cost-accounting-table tbody tr:hover td,
.cost-accounting-kv-table tbody tr:hover td,
.cost-accounting-search-table tbody tr:hover td {
  background: #f8fbff;
}

.permission-employee-table th,
.permission-employee-table td,
.jst-task-table th,
.jst-task-table td,
.business-clickable-table th,
.business-clickable-table td {
  text-align: center;
}

.permission-employee-table td:nth-child(4),
.permission-employee-table td:nth-child(5),
.business-clickable-table td:nth-child(2),
.business-clickable-table td:nth-child(4),
.jst-task-table td {
  text-align: left;
}

.ledger-filter-input,
.supplier-purchase-filter-input,
.migration-filter-input,
.transfer-structured-table .ledger-filter-input,
.cost-accounting-input,
.cost-accounting-select {
  border-radius: 0;
}
/* codex-global-list-ledger-style-20260618:end */

/* codex-permission-fixed-tree-table-compact-20260621:start */
.permission-workspace {
  grid-template-columns: 340px minmax(0, 1fr);
}

.permission-dept-sidebar {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
  overflow-x: hidden;
  box-sizing: border-box;
}

.permission-dept-sidebar *,
.permission-main-panel *,
.permission-detail-panel * {
  box-sizing: border-box;
}

.permission-dept-list,
.permission-admin-zone,
.permission-department-group,
.permission-department-card,
.permission-department-expand-panel,
.permission-department-position-list,
.permission-department-position {
  min-width: 0;
}

.permission-department-group {
  overflow: hidden;
  border-color: #c8d8ec;
  background: #ffffff;
}

.permission-department-group.active {
  border-color: #1d4ed8;
  background: #e7f1ff;
  box-shadow: inset 4px 0 0 #1d4ed8;
}

.permission-department-card {
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  background: #edf5ff;
}

.permission-department-group.active .permission-department-card {
  background: #dbeafe;
  border-bottom: 1px solid #abc7ed;
}

.permission-department-main {
  min-height: 44px;
  padding: 8px 4px 8px 12px;
}

.permission-department-card-main {
  min-width: 0;
}

.permission-department-arrow {
  flex-basis: 22px;
  font-size: 19px;
}

.permission-department-expand-panel {
  gap: 6px;
  padding: 8px 8px 10px 38px;
  border-left: 4px solid #1d4ed8;
  background: #ffffff;
}

.permission-department-expand-panel::before {
  left: 22px;
  top: 9px;
  bottom: 10px;
  width: 2px;
  background: #8aa7cc;
}

.permission-department-position {
  min-height: 32px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.permission-department-position::before {
  left: -14px;
  top: 16px;
  width: 14px;
  background: #8aa7cc;
}

.permission-position-main {
  min-height: 32px;
  padding: 5px 8px 5px 20px;
  border-color: #cbd9ea;
  border-left: 3px solid #93b4df;
  background: #ffffff;
}

.permission-position-main::before {
  left: 9px;
  width: 5px;
  height: 5px;
  background: #6b7d90;
}

.permission-department-position.active .permission-position-main,
.permission-position-main:hover {
  border-color: #2563eb;
  border-left-color: #2563eb;
  background: #f1f6ff;
}

.permission-department-position.active .permission-position-main {
  box-shadow: none;
}

.permission-position-main span {
  font-size: 13px;
}

.permission-node-actions {
  flex: 0 0 auto;
  gap: 3px;
}

.permission-node-actions button {
  min-width: 36px;
  min-height: 24px;
  padding: 0 5px;
}

.permission-department-add-position {
  min-height: 26px;
  padding: 4px 8px;
}

.permission-department-add-position::before {
  left: -14px;
  width: 14px;
}

.permission-main-panel {
  min-width: 0;
}

.permission-detail-panel {
  overflow: hidden;
  border-color: #cfdbe8;
  background: #eef3f8;
}

.permission-detail-head {
  min-height: 52px;
  margin: 0 0 8px;
  padding: 9px 12px 9px 14px;
  border-bottom: 1px solid #c9d8e8;
  background: #f8fbff;
  box-shadow: inset 4px 0 0 #2563eb;
}

.permission-detail-head strong {
  font-size: 17px;
  line-height: 1.2;
}

.permission-detail-actions button,
.permission-row-actions button {
  min-height: 26px;
  padding: 3px 7px;
}

.permission-employee-table-wrap {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid #cfd8e3;
  border-left: 0;
  border-right: 0;
  background: #ffffff;
  padding: 0;
}

.permission-employee-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.permission-employee-table th {
  height: 34px;
  min-height: 34px;
  padding: 4px 8px;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}

.permission-employee-table td {
  height: 38px;
  padding: 5px 8px;
  vertical-align: middle;
}

.permission-employee-table th:nth-child(1),
.permission-employee-table td:nth-child(1) {
  width: 8%;
}

.permission-employee-table th:nth-child(2),
.permission-employee-table td:nth-child(2) {
  width: 13%;
}

.permission-employee-table th:nth-child(3),
.permission-employee-table td:nth-child(3) {
  width: 11%;
}

.permission-employee-table th:nth-child(5),
.permission-employee-table td:nth-child(5) {
  width: 16%;
}

.permission-row-actions {
  justify-content: flex-start;
  gap: 6px;
}

.permission-scope-tags {
  gap: 4px;
}

.permission-scope-tags span {
  min-height: 20px;
  padding: 1px 6px;
}

.permission-operation-log-board {
  padding: 0;
  height: min(720px, calc(100vh - 146px));
  min-height: 430px;
}

.permission-operation-log-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 1px solid #cfd8e3;
  background: #ffffff;
}

.permission-operation-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 7px 10px 6px;
  background: #f7fafc;
  flex: 0 0 auto;
}

.permission-operation-log-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 170px;
}

.permission-operation-log-subtitle {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.permission-operation-log-head strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.permission-operation-log-refresh {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid #0f67b1;
  border-radius: 4px;
  background: #0f67b1;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.permission-operation-log-filterbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  min-height: 42px;
  padding: 6px 10px 7px;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #d8e2ea;
  background: #ffffff;
  flex: 0 0 auto;
}

.permission-operation-log-count {
  flex: 0 0 auto;
  min-width: 78px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #d8e2ea;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.permission-operation-log-category-filter,
.permission-operation-log-search {
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #102033;
  font-size: 12px;
  line-height: 1.2;
}

.permission-operation-log-category-filter {
  flex: 0 0 118px;
  width: 118px;
  padding: 0 8px;
}

.permission-operation-log-search {
  flex: 1 1 280px;
  width: min(360px, 100%);
  max-width: 420px;
  min-width: 220px;
  padding: 0 10px;
}

.permission-operation-log-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.permission-operation-log-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.permission-operation-log-table th,
.permission-operation-log-table td {
  height: 34px;
  padding: 5px 7px;
  border: 1px solid #e2e8f0;
  color: #102033;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  word-break: break-word;
}

.permission-operation-log-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 32px;
  background: #eef4f7;
  color: #334155;
  font-weight: 800;
  text-align: center;
}

.permission-operation-log-table th:nth-child(1),
.permission-operation-log-table td:nth-child(1) {
  width: 132px;
}

.permission-operation-log-table th:nth-child(2),
.permission-operation-log-table td:nth-child(2) {
  width: 146px;
}

.permission-operation-log-table th:nth-child(3),
.permission-operation-log-table td:nth-child(3) {
  width: 86px;
}

.permission-operation-log-table th:nth-child(4),
.permission-operation-log-table td:nth-child(4) {
  width: 128px;
}

.permission-operation-log-table th:nth-child(5),
.permission-operation-log-table td:nth-child(5) {
  width: 220px;
}

.permission-operation-log-detail {
  color: #334155;
}

.permission-operation-log-category {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  white-space: nowrap;
}

.permission-operation-log-empty {
  height: 120px;
  color: #64748b;
  text-align: center;
}

.permission-operation-log-empty.is-error {
  color: #b91c1c;
}
/* codex-permission-fixed-tree-table-compact-20260621:end */

/* codex-cost-bom-maintenance-preview-20260621:start */
.cost-accounting-search-section.is-compact {
  padding: 10px 12px;
}

.cost-accounting-search-section.is-compact .cost-accounting-search-result-head {
  margin-top: 8px;
}

.cost-accounting-search-section.is-compact .cost-accounting-search-scroll {
  max-height: 166px;
}

.cost-accounting-selected-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  background: #f8fbff;
}

.cost-accounting-selected-context span {
  display: block;
  color: #667585;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-selected-context strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 14px;
}

.cost-accounting-bom-object-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid #cbd8e5;
  background: #f7fbff;
  color: #15324a;
}

.cost-accounting-bom-object-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
}

.cost-accounting-bom-object-main span,
.cost-accounting-bom-object-meta span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cost-accounting-bom-object-main strong {
  color: #082f49;
  font-size: 18px;
  font-weight: 900;
}

.cost-accounting-bom-maintained-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 7px;
  border: 1px solid #9fc3ab;
  border-radius: 3px;
  background: #edf9f0;
  color: #176534;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.cost-accounting-bom-maintained-state.is-pending {
  border-color: #e2bd72;
  background: #fff8e8;
  color: #8a5a00;
}

.cost-accounting-bom-active-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 7px;
  border: 1px solid #a7c7b1;
  border-radius: 3px;
  background: #f1faf3;
  color: #176534;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.cost-accounting-bom-active-state.is-inactive {
  border-color: #e0b4b4;
  background: #fff6f6;
  color: #a52f3a;
}

.cost-accounting-bom-active-state.is-pending {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.cost-accounting-bom-object-meta {
  display: flex;
  align-items: center;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-left: 22px;
  min-width: 0;
}

.cost-accounting-bom-object-meta div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.cost-accounting-bom-object-meta strong {
  max-width: 430px;
  overflow: hidden;
  color: #102a43;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.cost-accounting-save-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 2px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.cost-accounting-save-state.is-dirty {
  color: #9a5b00;
}

.cost-accounting-bom-object-strip > .cost-accounting-save-state {
  min-height: 24px;
  margin-left: auto;
  padding: 1px 8px;
  border: 1px solid #bfd0de;
  border-radius: 3px;
  background: #ffffff;
}

.cost-accounting-bom-object-strip > .cost-accounting-save-state.is-dirty {
  border-color: #e0b45f;
  background: #fff8e8;
}

.cost-accounting-edit-btn {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #173d56;
}

.cost-accounting-save-bom-btn {
  min-width: 86px;
}

.cost-accounting-section-actions button[disabled],
.cost-accounting-preview-export-head button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.cost-accounting-bom-maintenance-section .cost-accounting-section-header {
  align-items: center;
}

.cost-accounting-bom-maintenance-section .cost-accounting-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
}

.cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench input:disabled,
.cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench select:disabled,
.cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench textarea:disabled,
.cost-accounting-result-section [data-cost-result-note]:disabled {
  border-color: #d8e0e8;
  background: #f7f9fb;
  box-shadow: none;
  color: #334155;
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: #334155;
}

.cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench button:disabled {
  border-color: #d8e0e8;
  background: #f7f9fb;
  box-shadow: none;
  color: #64748b;
  cursor: default;
  opacity: 1;
}

.cost-accounting-bom-edit-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid #d8e2ec;
  border-top: 0;
  background: #ffffff;
}

.cost-accounting-bom-edit-footer > span {
  color: #64748b;
  font-size: 12px;
}

.cost-accounting-bom-edit-footer.is-editing {
  border-color: #e4c47b;
  background: #fffaf0;
}

.cost-accounting-bom-edit-footer.is-editing > span strong {
  color: #9a5b00;
}

.cost-accounting-bom-edit-footer .supplier-purchase-list-action-btn {
  min-width: 88px;
  height: 32px;
}

.cost-accounting-bom-edit-footer .supplier-purchase-list-action-btn:disabled {
  border-color: #d5dee7;
  background: #f3f6f9;
  color: #9aa8b6;
  cursor: not-allowed;
  opacity: 1;
}

.cost-accounting-bom-line-action {
  min-width: 72px;
}

.cost-accounting-bom-table {
  min-width: 1370px;
  width: max-content;
  table-layout: fixed;
}

.cost-accounting-bom-col-segment {
  width: 90px;
}

.cost-accounting-bom-col-group {
  width: 106px;
}

.cost-accounting-bom-col-item {
  width: 94px;
}

.cost-accounting-bom-col-model {
  width: 186px;
}

.cost-accounting-bom-col-supplier {
  width: 138px;
}

.cost-accounting-bom-col-usage {
  width: 118px;
}

.cost-accounting-bom-col-unit {
  width: 70px;
}

.cost-accounting-bom-col-price {
  width: 88px;
}

.cost-accounting-bom-col-amount {
  width: 78px;
}

.cost-accounting-bom-col-source {
  width: 128px;
}

.cost-accounting-bom-col-note {
  width: 214px;
}

.cost-accounting-bom-col-delete {
  width: 112px;
}

.cost-accounting-bom-group-title td {
  height: 28px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-top: 2px solid #64748b;
  border-bottom: 1px solid #cbd5e1;
  background: #eef3f8 !important;
  color: #102033;
}

.cost-accounting-bom-group-title-shared td {
  background: #eaf3ff !important;
  box-shadow: inset 4px 0 0 #2d72e8;
}

.cost-accounting-bom-group-title-group td {
  background: #eef8ed !important;
  box-shadow: inset 4px 0 0 #138a55;
}

.cost-accounting-bom-group-title strong {
  margin-right: 10px;
  color: #0f172a;
  font-size: 13px;
}

.cost-accounting-bom-group-title span {
  color: #526579;
  font-size: 12px;
}

.cost-accounting-bom-table th {
  position: relative;
  height: 32px;
  padding: 5px 8px;
  background: #f1e5b7;
  border-color: #9db0bf;
  color: #0f2337;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}

.cost-accounting-bom-table .cost-accounting-bom-segment-head,
.cost-accounting-bom-table td.cost-accounting-bom-segment {
  border-right: 2px solid #9db0bf;
  background: #e7f1fa;
  color: #123047;
  font-weight: 800;
  text-align: center;
}

.cost-accounting-bom-section-head th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 32px;
  background: #f1e5b7;
  border-top: 1px solid #9db0bf;
  border-bottom: 1px solid #9db0bf;
}

.cost-accounting-bom-section-head .cost-accounting-bom-segment-head,
.cost-accounting-bom-row-group td.cost-accounting-bom-segment {
  background: #eef6e8;
}

.cost-accounting-bom-row-draft td {
  background: #fcfdff;
}

.cost-accounting-bom-origin-carry td {
  background: #f7fbff;
}

.cost-accounting-bom-origin-write td {
  background: #fffdf7;
}

.cost-accounting-bom-source-cell {
  padding: 3px 6px;
}

.cost-accounting-bom-source-cell .cost-accounting-bom-source-content {
  min-width: 0;
}

.cost-accounting-bom-source-cell .cost-accounting-input {
  min-height: 26px;
  padding-left: 6px;
  padding-right: 6px;
}

.cost-accounting-bom-source-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-right: 5px;
  padding: 0 5px;
  border: 1px solid #bfd1e0;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.cost-accounting-bom-source-cell.is-write .cost-accounting-bom-source-tag {
  border-color: #e7c46c;
  background: #fff8df;
  color: #8a5a00;
}

.cost-accounting-bom-source-cell.is-write .cost-accounting-input,
.cost-accounting-bom-origin-write .cost-accounting-input {
  background: #fffdf2;
}

.cost-accounting-bom-origin-carry .cost-accounting-input {
  background: #f5faff;
}

.cost-accounting-bom-delete-cell {
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
  background: #f8fafc;
}

.cost-accounting-bom-delete-head {
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

.cost-accounting-bom-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 24px;
}

.cost-accounting-bom-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.68;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease, outline-color 0.15s ease;
}

.cost-accounting-bom-table tr:hover .cost-accounting-bom-row-action,
.cost-accounting-bom-table tr.is-active .cost-accounting-bom-row-action,
.cost-accounting-bom-row-action:focus-visible {
  opacity: 1;
}

.cost-accounting-bom-row-action:hover,
.cost-accounting-bom-row-action:focus {
  border-color: #2563eb;
  background: #eff6ff;
  outline: 2px solid rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.cost-accounting-bom-row-delete:hover,
.cost-accounting-bom-row-delete:focus {
  border-color: #b42318;
  background: #fff1f0;
  outline: 2px solid rgba(180, 35, 24, 0.14);
  color: #b42318;
}

.cost-accounting-bom-table tr.is-active td {
  box-shadow: inset 0 0 0 999px rgba(255, 248, 220, 0.5);
}

.cost-accounting-bom-table .cost-accounting-input {
  display: block;
  height: 100%;
  min-height: 32px;
  min-width: 0;
  width: calc(100% - 8px);
  margin: 2px 4px;
  border: 1px solid #aac3dc;
  border-radius: 3px;
  background: #ffffff;
  padding: 0 7px;
  box-shadow: inset 0 1px 2px rgba(15, 47, 74, 0.05);
}

.cost-accounting-bom-table .clearable-control {
  display: flex;
  width: 100%;
  min-height: 32px;
}

.cost-accounting-bom-table td:has(.cost-accounting-input) {
  padding: 0;
  background: #f4f8fc;
}

.cost-accounting-bom-table td.cost-accounting-bom-source-cell:has(.cost-accounting-input) {
  padding: 3px 6px;
}

.cost-accounting-bom-table .cost-accounting-bom-model-input {
  background: #ffffff;
  color: #0d3b66;
  font-weight: 800;
}

.cost-accounting-bom-table .cost-accounting-input:focus {
  border-color: #2f76c7;
  outline: 2px solid rgba(37, 99, 235, 0.16);
  outline-offset: 0;
  background: #ffffff;
}

.cost-accounting-bom-table input[type="number"]::-webkit-outer-spin-button,
.cost-accounting-bom-table input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.cost-accounting-bom-table input[type="number"] {
  appearance: textfield;
}

.cost-accounting-bom-table td {
  height: 34px;
  border-color: #cbd7e4;
}

.cost-accounting-bom-table td.strong,
.cost-accounting-bom-table td:nth-child(3),
.cost-accounting-bom-table td:nth-child(9) {
  font-weight: 800;
}

.cost-accounting-bom-table td:nth-child(3),
.cost-accounting-bom-table td:nth-child(4),
.cost-accounting-bom-table td:nth-child(5),
.cost-accounting-bom-table td:nth-child(6),
.cost-accounting-bom-table td:nth-child(8),
.cost-accounting-bom-table td:nth-child(9),
.cost-accounting-bom-table td:nth-child(12) {
  text-align: center;
}

.cost-accounting-preview-section {
  padding-bottom: 12px;
}

.cost-accounting-preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.cost-accounting-preview-summary div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d6e0ea;
  background: #fbfdff;
  box-shadow: inset 3px 0 0 #9db0bf;
}

.cost-accounting-preview-summary div.is-primary {
  border-color: #8bc4a4;
  background: #f4fbf6;
  box-shadow: inset 3px 0 0 #0f8a56;
}

.cost-accounting-preview-summary span {
  display: block;
  color: #667585;
  font-size: 12px;
  line-height: 1.2;
}

.cost-accounting-preview-summary strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #0f2337;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-preview-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  max-width: 980px;
}

.cost-accounting-preview-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex: 0 0 288px;
  width: 288px;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid #d2dce7;
  background: #fbfdff;
  color: #102033;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
}

.cost-accounting-preview-toggle strong {
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-preview-toggle span {
  grid-column: 1 / 2;
  color: #667585;
  font-size: 12px;
  line-height: 1.35;
}

.cost-accounting-preview-toggle em {
  grid-column: 2 / 3;
  align-self: center;
  min-width: 34px;
  color: #0f5fb8;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.cost-accounting-preview-toggle[data-cost-preview-toggle="result"] {
  flex-basis: 274px;
  width: 274px;
}

.cost-accounting-preview-toggle[data-cost-preview-toggle="export"] {
  flex-basis: 238px;
  width: 238px;
}

.cost-accounting-preview-toggle.is-open {
  border-color: #9fc1e6;
  background: #edf6ff;
  box-shadow: inset 3px 0 0 #2d72e8;
}

.cost-accounting-preview-section .cost-accounting-scroll {
  margin-top: 10px;
}

.cost-accounting-result-table {
  min-width: 1040px;
}

.cost-accounting-result-table td[data-cost-result-column="fabric"],
.cost-accounting-result-table td[data-cost-result-column="craft"],
.cost-accounting-result-table td[data-cost-result-column="shared"] {
  color: #24495f;
  font-weight: 700;
}

/* codex-cost-bom-style-scope-r477:start */
.cost-accounting-pending-detail.is-compact {
  padding: 10px 14px;
}

.cost-accounting-pending-detail.is-compact .cost-accounting-pending-head {
  margin: 0;
}

.cost-accounting-pending-summary {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.cost-accounting-pending-summary h3 {
  margin: 0 6px 0 0;
}

.cost-accounting-pending-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #cbd8e5;
  background: #f8fbff;
  color: #42566c;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-bom-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 324px;
  grid-template-areas:
    "table preview"
    "average preview";
  align-items: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.cost-accounting-bom-workbench > .cost-accounting-scroll {
  grid-area: table;
  min-width: 0;
  border: 1px solid #cad6e2;
}

.cost-accounting-bom-table {
  min-width: 1414px;
}

.cost-accounting-bom-col-project { width: 96px; }
.cost-accounting-bom-col-model { width: 190px; }
.cost-accounting-bom-col-quantity { width: 84px; }
.cost-accounting-bom-col-loss { width: 84px; }
.cost-accounting-bom-col-costing-quantity { width: 94px; }
.cost-accounting-bom-col-price { width: 88px; }
.cost-accounting-bom-col-supplier { width: 148px; }
.cost-accounting-bom-col-unit { width: 72px; }
.cost-accounting-bom-col-amount { width: 82px; }
.cost-accounting-bom-col-scope { width: 190px; }
.cost-accounting-bom-col-note { width: 180px; }
.cost-accounting-bom-col-delete { width: 84px; }

.cost-accounting-bom-table .cost-accounting-bom-segment-head,
.cost-accounting-bom-table td.cost-accounting-bom-project {
  border-right: 2px solid #9db0bf;
  background: #e7f1fa;
  color: #123047;
  text-align: center;
}

.cost-accounting-bom-table td:nth-child(3),
.cost-accounting-bom-table td:nth-child(4),
.cost-accounting-bom-table td:nth-child(5),
.cost-accounting-bom-table td:nth-child(6),
.cost-accounting-bom-table td:nth-child(8),
.cost-accounting-bom-table td:nth-child(9),
.cost-accounting-bom-table td:nth-child(12) {
  text-align: center;
}

.cost-accounting-bom-table td:nth-child(11) {
  font-weight: 400;
  text-align: left;
}

.cost-accounting-loss-rate-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.cost-accounting-loss-rate-control .cost-accounting-input {
  width: 100%;
  padding-right: 24px;
  font-variant-numeric: tabular-nums;
}

.cost-accounting-loss-rate-control .cost-accounting-input::-webkit-inner-spin-button,
.cost-accounting-loss-rate-control .cost-accounting-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.cost-accounting-loss-rate-suffix {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 1;
  color: #60758a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-42%);
}

.cost-accounting-bom-scope-btn {
  display: block;
  width: calc(100% - 8px);
  min-height: 26px;
  margin: 2px 4px;
  overflow: hidden;
  border: 1px solid #9bbce0;
  border-radius: 3px;
  background: #f3f8ff;
  color: #0f5fb8;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.cost-accounting-bom-scope-btn.is-warning {
  border-color: #e2ae55;
  background: #fff8e8;
  color: #9a5b00;
}

.cost-accounting-bom-scope-popup {
  width: min(380px, calc(100vw - 16px)) !important;
  max-height: min(430px, calc(100vh - 16px)) !important;
  padding: 8px;
  overflow: auto;
}

.cost-accounting-bom-scope-all,
.cost-accounting-bom-scope-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border-bottom: 1px solid #e5ebf1;
  color: #17324a;
  cursor: pointer;
}

.cost-accounting-bom-scope-all span {
  margin-left: auto;
  color: #6b7c8f;
  font-size: 12px;
}

.cost-accounting-bom-scope-options {
  max-height: 250px;
  overflow: auto;
}

.cost-accounting-bom-scope-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.cost-accounting-bom-scope-foot > span {
  margin-right: auto;
  color: #526579;
  font-size: 12px;
  font-weight: 700;
}

.cost-accounting-preview-section {
  grid-area: preview;
  position: sticky;
  top: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #cad6e2;
  background: #f8fbfe;
}

.cost-accounting-preview-section .cost-accounting-section-header {
  margin-bottom: 8px;
}

.cost-accounting-preview-card {
  margin-top: 0;
  padding: 9px 10px;
  border: 1px solid #d6e0ea;
  background: #ffffff;
}

.cost-accounting-preview-card > strong {
  color: #0f2337;
  font-size: 15px;
}

.cost-accounting-preview-card + .cost-accounting-preview-card {
  margin-top: 8px;
}

.cost-accounting-preview-card dl {
  margin: 6px 0 0;
}

.cost-accounting-preview-card dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-top: 1px dashed #e4e9ef;
}

.cost-accounting-preview-card dt {
  color: #64748b;
  font-size: 13px;
}

.cost-accounting-preview-card dd {
  margin: 0;
  overflow: hidden;
  color: #102a43;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-preview-card.is-ok { box-shadow: inset 3px 0 0 #15803d; }
.cost-accounting-preview-card.is-warning { box-shadow: inset 3px 0 0 #d97706; }

.cost-accounting-preview-card p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 12px;
}

.cost-accounting-result-section {
  margin-top: 10px;
}

.cost-accounting-result-section .cost-accounting-scroll {
  overflow-x: auto;
}

.cost-accounting-result-table {
  min-width: 1180px;
}

.cost-accounting-result-table th[data-cost-result-column="styleNo"] { width: 105px; }
.cost-accounting-result-table th[data-cost-result-column="styleColorId"] { width: 150px; }
.cost-accounting-result-table th[data-cost-result-column="commonDetail"],
.cost-accounting-result-table th[data-cost-result-column="differenceDetail"] { width: 320px; }
.cost-accounting-result-table th[data-cost-result-column="totalCost"] { width: 110px; }
.cost-accounting-result-table th[data-cost-result-column="note"] { width: 220px; }

.cost-accounting-result-table td[data-cost-result-column="commonDetail"],
.cost-accounting-result-table td[data-cost-result-column="differenceDetail"] {
  color: #24495f;
  font-weight: 700;
  white-space: normal;
}

.cost-accounting-result-note-input {
  width: 100%;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
}

@media (max-width: 1180px) {
  .cost-accounting-bom-workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "table"
      "average"
      "preview";
  }

  .cost-accounting-preview-section {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .cost-accounting-preview-section .cost-accounting-section-header {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .cost-accounting-preview-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .cost-accounting-pending-detail.is-compact .cost-accounting-pending-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* codex-cost-bom-style-scope-r477:end */

/* codex-cost-bom-control-language-r482:start */
#pageToolbar .cost-accounting-page-layout-btn,
.cost-accounting-control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #b8c8d8;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 47, 74, 0.08);
  color: #26445f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

#pageToolbar .cost-accounting-page-layout-btn:hover,
.cost-accounting-control-btn.is-secondary:hover:not(:disabled),
.cost-accounting-control-btn.is-reference:hover:not(:disabled) {
  border-color: #6f9fd2;
  background: #f1f7ff;
  box-shadow: 0 1px 3px rgba(30, 95, 160, 0.14);
  color: #155fac;
}

.cost-accounting-control-btn.is-primary {
  border-color: #2468bb;
  background: #2f76c7;
  box-shadow: 0 1px 3px rgba(30, 91, 158, 0.22);
  color: #ffffff;
}

.cost-accounting-control-btn.is-primary:hover:not(:disabled) {
  border-color: #18589f;
  background: #2468b7;
}

.cost-accounting-control-btn.is-reference {
  border-color: #9bb9d8;
  background: #f7fbff;
  color: #245f98;
}

.cost-accounting-control-btn.is-danger {
  border-color: #dfaaa5;
  background: #fffafa;
  color: #ad382f;
}

.cost-accounting-control-btn.is-danger:hover:not(:disabled) {
  border-color: #c95b50;
  background: #fff0ee;
  color: #982a22;
}

.cost-accounting-section-actions .cost-accounting-control-btn:disabled,
.supplier-purchase-detail-page-head-actions .cost-accounting-control-btn:disabled,
.cost-accounting-bom-search-form .cost-accounting-control-btn:disabled {
  border-color: #d5dee7;
  background: #f3f6f9;
  box-shadow: none;
  color: #9aa8b6;
  cursor: not-allowed;
  opacity: 1;
}

.cost-accounting-bom-search-form .cost-accounting-search-query-btn,
.cost-accounting-bom-search-form .cost-accounting-search-reset-btn {
  height: 32px;
  min-width: 62px;
  padding: 0 15px;
}

.cost-accounting-bom-table .cost-accounting-input,
.cost-accounting-bom-scope-btn {
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 47, 74, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.cost-accounting-bom-table .cost-accounting-input:hover,
.cost-accounting-bom-scope-btn:hover {
  border-color: #6f9fd2;
  box-shadow: 0 1px 3px rgba(30, 95, 160, 0.13);
}

.cost-accounting-bom-scope-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px 0 10px;
  border-color: #a8c0d9;
  background: #ffffff;
  color: #245f98;
  text-align: left;
}

.cost-accounting-bom-scope-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-accounting-bom-scope-btn i {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg) translateY(-2px);
}

.cost-accounting-bom-row-actions {
  gap: 5px;
}

.cost-accounting-bom-row-action {
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 47, 74, 0.08);
  font-size: 15px;
  opacity: 1;
}

.cost-accounting-bom-row-action span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.cost-accounting-bom-row-insert {
  border-color: #9bb9d8;
  background: #f3f8ff;
  color: #2264a7;
}

.cost-accounting-bom-row-insert:hover,
.cost-accounting-bom-row-insert:focus {
  border-color: #3d7fca;
  background: #e9f3ff;
  color: #155aa0;
}

.cost-accounting-bom-row-delete {
  border-color: #d8bbb8;
  background: #fffafa;
  color: #a4524b;
}

.cost-accounting-bom-row-delete:hover,
.cost-accounting-bom-row-delete:focus {
  border-color: #c85b50;
  background: #fff0ee;
  color: #982a22;
}

.cost-accounting-bom-wash-process-input {
  color: #0d3b66;
  font-weight: 800;
}
/* codex-cost-bom-control-language-r482:end */

/* codex-cost-bom-picker-rowheight-r483:start */
.cost-accounting-bom-table tbody tr {
  height: 42px;
}

.cost-accounting-bom-table td {
  position: relative;
  vertical-align: middle;
}

.cost-accounting-bom-table td:has(.cost-accounting-input) {
  padding: 4px;
  background: #f7fafc;
}

.cost-accounting-bom-table .cost-accounting-input {
  width: 100%;
  height: 30px;
  min-height: 30px;
  margin: 0;
  border-color: #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  padding: 3px 6px;
  box-shadow: none;
  color: #243b53;
  font-weight: 400;
}

.cost-accounting-bom-table .cost-accounting-bom-picker {
  display: block;
  width: 100%;
  min-height: 30px;
}

.cost-accounting-bom-table .cost-accounting-bom-picker .cost-accounting-input {
  border-color: #9ebbd8;
  padding-right: 25px !important;
}

.cost-accounting-bom-table .cost-accounting-bom-picker .clearable-control-button {
  right: 7px;
}

.cost-accounting-bom-table input[type="number"] {
  border-radius: 0;
  color: #263b4f;
  font-weight: 400;
}

.cost-accounting-bom-row-resize-handle {
  z-index: 6;
}
/* codex-cost-bom-picker-rowheight-r483:end */

/* codex-cost-bom-compact-layout-r492:start */
.cost-accounting-panel:has(#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"]) {
  padding: 12px;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] {
  gap: 8px;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-bom-maintenance-section,
#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-result-section {
  padding: 10px 12px 12px;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-bom-maintenance-section > .cost-accounting-section-header,
#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-result-section > .cost-accounting-section-header {
  align-items: center;
  margin-bottom: 6px;
}

.cost-accounting-bom-workbench {
  grid-template-areas: "table preview";
  gap: 6px;
}

.cost-accounting-bom-table tbody tr {
  height: 38px;
}

.cost-accounting-bom-table td {
  height: 36px;
  padding: 2px 8px;
}

.cost-accounting-bom-table td:has(.cost-accounting-input) {
  padding: 2px;
}

.cost-accounting-result-section {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .cost-accounting-bom-workbench {
    grid-template-areas:
      "table"
      "preview";
  }
}
/* codex-cost-bom-compact-layout-r492:end */

/* codex-cost-bom-business-type-r494:start */
.cost-accounting-bom-table tbody tr {
  height: 36px;
}

.cost-accounting-bom-table td {
  height: 34px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.cost-accounting-bom-table td:has(.cost-accounting-input),
.cost-accounting-bom-table td:has(.cost-accounting-bom-business-type-control) {
  padding: 1px 2px;
}

.cost-accounting-bom-business-type-control {
  position: relative;
  width: 100%;
  min-width: 0;
}

.cost-accounting-bom-business-type-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  height: 30px;
  min-height: 30px;
  margin: 0;
  border: 1px solid #9ebbd8;
  border-radius: 4px;
  background: #ffffff;
  color: #164b7a;
  font-weight: 700;
  padding: 3px 7px;
  cursor: pointer;
}

.cost-accounting-bom-business-type-trigger i {
  width: 7px;
  height: 7px;
  border-right: 2px solid #3979b6;
  border-bottom: 2px solid #3979b6;
  transform: rotate(45deg) translateY(-2px);
}

.cost-accounting-bom-business-type-trigger[aria-expanded="true"] {
  border-color: #2f7dcc;
  box-shadow: 0 0 0 2px rgba(47, 125, 204, 0.12);
}

.cost-accounting-bom-business-type-control.is-locked .cost-accounting-bom-business-type-trigger {
  background: #f4f7fa;
  color: #31516e;
  cursor: default;
}

.cost-accounting-bom-business-type-control.is-locked .cost-accounting-bom-business-type-trigger i {
  display: none;
}

.cost-accounting-bom-business-type-control.is-warning .cost-accounting-bom-business-type-trigger {
  border-color: #d97706;
  background: #fffaf0;
  color: #9a4b00;
}

.cost-accounting-bom-business-type-popup {
  position: fixed;
  z-index: 10020;
  max-width: calc(100vw - 8px);
  max-height: 248px;
  overflow-y: auto;
  border: 1px solid #9ebbd8;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(25, 56, 86, 0.18);
}

.cost-accounting-bom-business-type-popup[hidden] {
  display: none;
}

.cost-accounting-bom-business-type-popup button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid #e6edf4;
  background: #ffffff;
  color: #164b7a;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cost-accounting-bom-business-type-popup button:last-child {
  border-bottom: 0;
}

.cost-accounting-bom-business-type-popup button:hover,
.cost-accounting-bom-business-type-popup button:focus,
.cost-accounting-bom-business-type-popup button[aria-selected="true"] {
  background: #eaf4ff;
  color: #0f5ca8;
}

.cost-accounting-bom-table .cost-accounting-input:disabled {
  border-color: #d5dee7;
  background: #f3f6f9;
  color: #8a99a8;
  cursor: not-allowed;
}

.cost-accounting-bom-table .cost-accounting-bom-picker:has(.cost-accounting-input:disabled) .clearable-control-button {
  display: none;
}

.cost-accounting-bom-table .cost-accounting-bom-model-input.is-unresolved {
  border-color: #d97706;
  background: #fffaf0;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-result-section {
  padding: 4px 12px 6px;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-result-section > .cost-accounting-section-header {
  min-height: 22px;
  margin-bottom: 2px;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] .cost-bom-detail-workspace .cost-accounting-result-section > .cost-accounting-section-header .cost-accounting-status-badge {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

.cost-accounting-result-table th {
  height: 30px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.cost-accounting-result-table td {
  height: 34px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.cost-accounting-result-table .cost-accounting-result-empty {
  height: 42px;
  color: #64748b;
  font-weight: 700;
  text-align: center;
}

.cost-accounting-bom-table tr.is-measurement-error {
  box-shadow: inset 3px 0 0 #d97706;
}

.cost-accounting-bom-table tr.is-measurement-error > td {
  background: #fffaf0;
}

.cost-accounting-bom-table tr.is-measurement-error .cost-accounting-input,
.cost-accounting-bom-table tr.is-measurement-error .cost-accounting-bom-business-type-trigger,
.cost-accounting-bom-table tr.is-measurement-error .cost-accounting-bom-scope-btn {
  border-color: #d97706;
}
/* codex-cost-bom-business-type-r494:end */

.cost-accounting-preview-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #d6e0ea;
  background: #fbfdff;
  color: #526579;
  font-size: 12px;
}

.cost-accounting-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  min-width: 150px;
}

.cost-accounting-route-btn {
  min-height: 26px;
  padding: 3px 8px;
  white-space: nowrap;
}

.cost-accounting-product-draft-section {
  margin-top: 8px;
}

.cost-accounting-product-table th:last-child,
.cost-accounting-product-table td:last-child,
.cost-accounting-group-diff-table th:last-child,
.cost-accounting-group-diff-table td:last-child {
  min-width: 150px;
}

@media (max-width: 900px) {
  .cost-accounting-preview-toggles {
    max-width: 100%;
  }

  .cost-accounting-preview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-accounting-preview-toggle,
  .cost-accounting-preview-toggle[data-cost-preview-toggle="result"],
  .cost-accounting-preview-toggle[data-cost-preview-toggle="export"] {
    flex: 1 1 220px;
    width: auto;
  }

  .cost-accounting-selected-context,
  .cost-accounting-section-actions,
  .cost-accounting-preview-export-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* codex-cost-bom-maintenance-preview-20260621:end */

@media (max-width: 980px) {
  .piecework-hero,
  .piecework-bed-detail,
  .piecework-split,
  .piecework-stage-grid,
  .piecework-register-grid {
    grid-template-columns: 1fr;
  }

  .piecework-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .piecework-rate-side {
    margin-left: 14px;
  }
}

@media (max-width: 640px) {
  .piecework-workspace {
    padding: 10px;
  }

  .piecework-card-head,
  .piecework-scan-row,
  .piecework-submit-row,
  .piecework-field-grid,
  .piecework-process-box,
  .piecework-summary-grid,
  .piecework-stage-grid,
  .piecework-register-grid {
    grid-template-columns: 1fr;
  }

  .piecework-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .piecework-card-head span {
    white-space: normal;
  }
}

/* codex-shortage-matrix-visual-20260616:start */
/* Style-only override for shortage blocks; does not change fields, rules, logic, or DOM structure. */
.shortage-mosaic-block {
  background: #ffffff;
}

.shortage-matrix {
  border: 2px solid #1f1f1f;
  background: #ffffff;
}

.shortage-matrix th,
.shortage-matrix td {
  border-color: #1f1f1f;
  background: #ffffff;
}

.shortage-matrix .title-cell {
  background: #ffffff;
  color: #0759c8;
  font-weight: 850;
}

.shortage-matrix .shortage-custom-cell {
  color: #e1192d;
  font-weight: 850;
}

.shortage-matrix .ship-date {
  color: #0759c8 !important;
  font-weight: 850;
}

.shortage-matrix .head-cell {
  background: #f3faef;
  color: #111111;
  font-weight: 800;
}

.shortage-matrix .label-cell {
  background: #ffffff;
  color: #111111;
  font-weight: 800;
}

.shortage-matrix tr[data-shortage-row="suggest"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="suggest"] .shortage-total-value {
  color: #0759c8;
  font-weight: 850;
  background: #ffffff;
}

.shortage-matrix .current-dispatch-row td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="layout"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="layout"] .shortage-total-value {
  color: #0759c8;
  font-weight: 700;
}

.shortage-matrix tr[data-shortage-row="remark"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="remark"] .shortage-total-value,
.shortage-matrix tr[data-shortage-row="remark"] td[data-cell-style-role="bed"] {
  color: #e1192d;
  font-weight: 700;
}

.shortage-matrix tr[data-shortage-row="available"] td,
.shortage-matrix tr[data-shortage-row="forecast"] td {
  background: #e5f1e7;
}

.shortage-matrix tr[data-shortage-row="available"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="available"] .shortage-total-value,
.shortage-matrix tr[data-shortage-row="forecast"] td[data-cell-style-role="detail"],
.shortage-matrix tr[data-shortage-row="forecast"] .shortage-total-value {
  color: #0f766e;
  font-weight: 500;
}

.shortage-matrix tr[data-shortage-row="available"] .shortage-total-value,
.shortage-matrix tr[data-shortage-row="forecast"] .shortage-total-value {
  font-weight: 850;
}

.shortage-matrix td[data-cell-style-role="bed"],
.shortage-matrix .bed-value-cell {
  color: #0759c8 !important;
}
/* codex-shortage-matrix-visual-20260616:end */

/* codex-dispatch-block-border-20260621:start */
/* Style-only refinement for dispatch shortage blocks; no field, state, sync, save, or DOM behavior changes. */
.shortage-pinned-style-zone {
  box-sizing: border-box;
  padding: 5px;
  border: 2px solid #ff2f2f;
  outline: 0;
  outline-offset: 0;
  background: #ffffff;
}

.shortage-style-group,
.shortage-style-grid {
  box-sizing: border-box;
}

.shortage-block.shortage-mosaic-block {
  box-sizing: border-box;
  width: var(--shortage-block-width);
  min-width: var(--shortage-block-width);
  border: 0;
  background: #ffffff;
  overflow: visible;
}

.shortage-block.shortage-mosaic-block .shortage-matrix {
  box-sizing: border-box;
  width: calc(100% - 1px);
  min-width: calc(100% - 1px);
  border: 1px solid #26313d;
  border-collapse: collapse;
  border-spacing: 0;
}

.shortage-block.shortage-mosaic-block .shortage-matrix th,
.shortage-block.shortage-mosaic-block .shortage-matrix td {
  border-color: #26313d;
}

.shortage-block.shortage-mosaic-block .block-actions {
  box-sizing: border-box;
  width: calc(100% + 1px);
  border: 1px solid #26313d;
  border-top: 0;
  background: #f8fbff;
}

.shortage-block.shortage-mosaic-block.is-shortage-pool-block .shortage-matrix {
  border-color: #1d5fbf;
}

.shortage-block.shortage-mosaic-block.is-shortage-pool-block .shortage-matrix th,
.shortage-block.shortage-mosaic-block.is-shortage-pool-block .shortage-matrix td,
.shortage-block.shortage-mosaic-block.is-shortage-pool-block .block-actions {
  border-color: #1d5fbf;
}

.shortage-block.shortage-mosaic-block.is-shortage-pool-block .block-actions {
  background: #eef6ff;
}

.shortage-block.shortage-mosaic-block.is-shortage-pool-block .shortage-matrix .head-cell {
  background: #eaf3ff;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix {
  border-color: #0f7a4f;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix th,
.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix td,
.shortage-block.shortage-mosaic-block.is-cut-queue-block .block-actions {
  border-color: #0f7a4f;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .block-actions {
  background: #ecfdf3;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix .title-cell,
.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix .ship-date,
.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix td[data-cell-style-role="bed"],
.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix .bed-value-cell {
  color: #087443 !important;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .shortage-matrix .head-cell {
  background: #dcfce7;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .block-actions .cut-queue-inline {
  border-color: #0f7a4f;
  background: #dff8e9;
  color: #075c38;
}

.shortage-block.shortage-mosaic-block.is-cut-queue-block .block-actions .shortage-status-label {
  border-color: #0f7a4f;
  background: #dff8e9;
  color: #075c38;
}

.shortage-block.shortage-mosaic-block:focus-within {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
/* codex-dispatch-block-border-20260621:end */

/* codex-auth-gate-20260617:start */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #eef2f6;
}

.auth-gate.hidden {
  display: none;
}

.auth-shell {
  width: min(960px, calc(100vw - 48px));
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 0;
  border: 1px solid #cfd8e3;
  background: #182233;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.2);
  color: #e5edf6;
}

.auth-console {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 34px;
  padding: 42px;
}

.auth-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #e5edf6;
  color: #182233;
  font-size: 18px;
  font-weight: 900;
}

.auth-console h1 {
  margin: 14px 0 0;
  color: #ffffff;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}

.auth-console p {
  max-width: 370px;
  margin: 16px 0 0;
  color: #aebbd0;
  font-size: 13px;
  line-height: 1.75;
}

.auth-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auth-status-grid div {
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.auth-status-grid span {
  color: #c9d5e6;
  font-size: 12px;
}

.auth-status-grid strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.auth-panel {
  margin: 42px 34px 42px 0;
  padding: 30px;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #d7e0ea;
  display: grid;
  align-content: center;
  gap: 14px;
}

.auth-card-head {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.auth-card-head strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.auth-card-head span {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.auth-form input,
.auth-form select {
  width: 100%;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;
  padding: 0 10px;
  font-size: 14px;
  color: #0f172a;
}

.auth-code-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  align-items: center;
}

.auth-code-row button {
  height: 38px;
  border: 1px solid #1f66d1;
  border-radius: 0;
  background: #1f66d1;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-code-row button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.auth-message {
  margin: 0;
  border: 1px solid #fed7aa;
  border-radius: 0;
  background: #fff7ed;
  color: #9a3412;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-submit-btn {
  height: 40px;
  border: 0;
  background: #1f66d1;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus {
  background: #1957b6;
  outline: 0;
}

.auth-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 860px) {
  .auth-gate {
    align-items: start;
    padding: 16px;
    overflow: auto;
  }

  .auth-shell {
    width: min(480px, calc(100vw - 32px));
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .auth-console {
    padding: 24px;
    gap: 18px;
  }

  .auth-console h1 {
    font-size: 26px;
  }

  .auth-status-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
}
/* codex-auth-gate-20260617:end */

.permission-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
}

.permission-picker-panel {
  width: min(570px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  color: #0f172a;
}

.permission-picker-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #dbe4ef;
  display: grid;
  gap: 0;
}

.permission-picker-head strong {
  font-size: 18px;
  font-weight: 900;
}

.permission-picker-head span {
  display: none;
  color: #64748b;
  font-size: 13px;
}

.permission-picker-body {
  overflow: auto;
  padding: 12px 16px 14px;
  display: grid;
  gap: 12px;
  background: #f8fafc;
}

.permission-picker-group {
  display: grid;
  gap: 7px;
}

.permission-picker-group h3 {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.permission-picker-packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 8px;
}

.permission-picker-package {
  min-height: 52px;
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #ccd8e6;
  background: #ffffff;
  color: #1f2f46;
  cursor: pointer;
}

.permission-picker-package:hover {
  border-color: #1f66d1;
  background: #f5f9ff;
}

.permission-picker-package.is-checked {
  border-color: #1f66d1;
  background: #eef6ff;
}

.permission-picker-package.is-partial {
  border-color: #8da2bd;
  background: #f8fafc;
}

.permission-picker-package.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.permission-picker-package input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
}

.permission-picker-package span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.permission-picker-package strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.permission-picker-package small {
  color: #526171;
  font-size: 12px;
  line-height: 1.25;
}

.permission-picker-group-select {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.permission-picker-group-select input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.permission-picker-module-matrix {
  display: grid;
  gap: 8px;
}

.permission-picker-module-toolbar {
  min-height: 26px;
  display: flex;
  align-items: center;
}

.permission-picker-module-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 76px 76px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.permission-picker-module-head,
.permission-picker-module-name,
.permission-picker-module-cell {
  min-height: 34px;
  display: flex;
  align-items: center;
  border-right: 1px solid #dbe4ef;
  border-bottom: 1px solid #dbe4ef;
}

.permission-picker-module-grid > :nth-child(3n) {
  border-right: 0;
}

.permission-picker-module-grid > :nth-last-child(-n + 3) {
  border-bottom: 0;
}

.permission-picker-module-head {
  justify-content: center;
  background: #edf3fb;
  color: #1f2f46;
  font-size: 13px;
  font-weight: 900;
}

.permission-picker-module-name {
  padding: 0 12px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.permission-picker-module-parent,
.permission-picker-module-cell.is-parent {
  background: #f8fbff;
  font-weight: 900;
}

.permission-picker-module-parent {
  cursor: pointer;
  user-select: none;
}

.permission-picker-module-parent:hover {
  background: #eef6ff;
}

.permission-picker-expand {
  width: 25px;
  height: 25px;
  margin: 0 6px 0 -5px;
  border: 0;
  background: transparent;
  color: #1f66d1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.permission-picker-module-child {
  padding-left: 35px;
  color: #334155;
  font-weight: 700;
  background: #ffffff;
}

.permission-picker-module-child::before {
  content: "";
  width: 8px;
  height: 1px;
  margin-right: 8px;
  background: #9fb0c5;
}

.permission-picker-module-grid > .is-collapsed {
  display: none;
}

.permission-picker-module-cell {
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  color: #1f2f46;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.permission-picker-module-cell:hover {
  background: #f4f8ff;
}

.permission-picker-module-cell.is-child {
  gap: 0;
}

.permission-picker-module-cell input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.permission-employee-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid #d7e0ea;
  background: #ffffff;
}

.permission-employee-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.permission-employee-form label > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.permission-employee-form input,
.permission-employee-form select {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
}

.permission-employee-form input:disabled {
  color: #64748b;
  background: #f1f5f9;
}

.permission-employee-password-input {
  -webkit-text-security: disc;
  text-security: disc;
}

.permission-employee-password-input::placeholder {
  -webkit-text-security: none;
  text-security: none;
}

.permission-employee-code-field {
  grid-column: 1 / -1;
}

.permission-employee-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
}

.permission-employee-code-row button {
  height: 34px;
  border: 1px solid #1f66d1;
  background: #1f66d1;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.permission-employee-code-row button:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.permission-employee-code-field small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.permission-fixed-admin-notice {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #d7e0ea;
  background: #ffffff;
}

.permission-fixed-admin-notice strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.permission-fixed-admin-notice span {
  color: #526171;
  font-size: 12px;
  line-height: 1.45;
}

.permission-picker-option {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  background: #ffffff;
  border: 1px solid #d7e0ea;
  cursor: pointer;
}

.permission-picker-option:hover {
  border-color: #2563eb;
  background: #f4f8ff;
}

.permission-picker-option.high {
  border-color: #f59e0b;
  background: #fffbeb;
}

.permission-picker-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.permission-picker-option-text {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.permission-picker-option strong {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
}

.permission-picker-option small {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.permission-picker-foot {
  padding: 12px 20px;
  border-top: 1px solid #dbe4ef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #ffffff;
}

.permission-picker-foot button {
  min-width: 88px;
  height: 34px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.permission-picker-foot button[data-permission-picker-confirm] {
  border-color: #1f66d1;
  background: #1f66d1;
  color: #ffffff;
}

/* codex-purchase-compact-grid-fit-20260621:start */
.supplier-doc-products {
  overflow: hidden;
}

.supplier-doc-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
}

.supplier-doc-matrix-table {
  width: calc(100% - 2px);
  min-width: 0;
  max-width: 100%;
}

.supplier-doc-matrix-table .doc-col-detail {
  width: 50px;
}

.supplier-doc-matrix-table .doc-col-row-action {
  width: 34px;
}

.supplier-purchase-list-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
}

.supplier-purchase-list-table {
  width: max-content;
  min-width: 0;
  max-width: none;
}

.supplier-purchase-list-table th.supplier-purchase-col-action,
.supplier-purchase-list-table td.supplier-purchase-col-action {
  position: relative;
  right: auto;
  z-index: 1;
}
/* codex-purchase-compact-grid-fit-20260621:end */

/* codex-purchase-list-tracking-20260622:start */
.supplier-purchase-list-toolbar {
  min-height: 34px;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.supplier-purchase-list-title {
  min-width: 120px;
  gap: 0;
}

.supplier-purchase-list-toolbar span {
  display: none;
}

.supplier-purchase-list-batchbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 6px;
}

.supplier-purchase-list-batch-btn {
  height: 24px;
  padding: 2px 8px;
  border: 1px solid #efb2b8;
  background: #fff7f7;
  color: #b4232f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.supplier-purchase-list-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #c7d3df;
  box-shadow: none;
}

.supplier-purchase-list-table {
  width: var(--supplier-purchase-list-table-width, max-content) !important;
  min-width: var(--supplier-purchase-list-table-width, max-content) !important;
  max-width: none !important;
  table-layout: fixed;
}

.supplier-purchase-list-table th {
  height: 50px;
  padding: 4px 5px;
  font-size: 12px;
  line-height: 1.18;
  vertical-align: top;
}

.supplier-purchase-list-table td {
  height: 34px;
  padding: 4px 5px;
  font-size: 12px;
  line-height: 1.2;
}

.supplier-purchase-filter-input {
  height: 20px;
  margin-top: 3px;
  padding: 1px 3px;
  font-size: 11px;
}

.supplier-purchase-list-actions,
.supplier-purchase-detail-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.supplier-purchase-list-detail-btn,
.supplier-purchase-type-detail-btn,
.supplier-purchase-list-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 22px;
  height: 22px;
  padding: 1px 6px;
  border: 1px solid #9fc4f4;
  border-radius: 2px;
  background: #f3f8ff;
  color: #0f4c9d;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.supplier-purchase-type-detail-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  background: #ffffff;
}

.supplier-purchase-type-detail-btn.is-expanded {
  border-color: #0b5cad;
  background: #eaf4ff;
  color: #073b73;
}

.supplier-purchase-list-action-btn.danger {
  border-color: #efb2b8;
  background: #fff6f7;
  color: #b4232f;
}

.supplier-purchase-list-action-btn.supplier-purchase-list-action-primary {
  border-color: #2d66c3;
  background: #eaf2ff;
  color: #124ea0;
}

.supplier-purchase-list-action-btn.force {
  border-color: #e8c17a;
  background: #fff8e7;
  color: #8a4b00;
}

.supplier-purchase-status-pill.force {
  color: #8a4b00;
}

.supplier-purchase-list-table td.supplier-purchase-col-remark,
.supplier-purchase-list-remark {
  color: #c2182b;
  font-weight: 900;
}

.supplier-purchase-list-row-voided td {
  background: #fff7f7;
  color: #6f2730;
}

.supplier-purchase-list-row-reversed td {
  background: #fff7f7;
  color: #6f2730;
}

.supplier-purchase-list-row-force_modified td {
  background: #fffaf0;
}

.supplier-purchase-list-detail-row > td {
  padding: 0;
  background: #f5f8fb;
}

.supplier-purchase-detail-panel {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid #c7d3df;
  background: #f5f8fb;
}

.supplier-purchase-detail-panel .business-detail-section {
  border: 0;
  border-top: 1px solid #cbd8e6;
  background: #ffffff;
  box-shadow: none;
  padding: 8px;
}

.supplier-purchase-detail-panel .supplier-purchase-detail-head {
  border-top: 0;
}

.supplier-purchase-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

.supplier-purchase-detail-section-title h3,
.supplier-purchase-detail-panel .business-detail-section h3 {
  margin: 0 0 6px;
  color: #172333;
  font-size: 13px;
  font-weight: 900;
}

.supplier-purchase-detail-card-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(78px, 1fr));
  gap: 6px;
}

.supplier-purchase-detail-card {
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid #d5e0ea;
  background: #f9fbfd;
  overflow: hidden;
}

.supplier-purchase-detail-card span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.supplier-purchase-detail-card strong {
  display: block;
  margin-top: 2px;
  color: #102033;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supplier-purchase-detail-card.remark strong {
  color: #c2182b;
}

.supplier-purchase-detail-source {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.supplier-purchase-detail-fee-row {
  grid-template-columns: repeat(5, minmax(90px, 1fr));
}

.supplier-purchase-detail-fee-layout {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 38px;
  border: 1px solid #c8d7e8;
  background: #ffffff;
  overflow: hidden;
}

.supplier-purchase-detail-fee-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 8px;
  border-right: 1px solid #c8d7e8;
  background: #fbfdff;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
}

.supplier-purchase-detail-fee-main {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.supplier-purchase-detail-fee-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: 0;
  min-height: 38px;
  width: max-content;
  min-width: 100%;
}

.supplier-purchase-detail-fee-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex: 1 0 108px;
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  box-shadow: inset -1px 0 0 #dbe5ef;
  overflow: hidden;
}

.supplier-purchase-detail-fee-item:last-child {
  box-shadow: none;
}

.supplier-purchase-detail-fee-item span {
  color: #667085;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-purchase-detail-fee-item strong {
  min-width: 0;
  color: #102033;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-purchase-detail-fee-item.primary strong {
  color: #d01830;
  font-size: 15px;
  letter-spacing: 0;
}

.supplier-purchase-detail-fee-item.primary.amount {
  flex-basis: 164px;
}

.supplier-purchase-detail-fee-item.remark {
  flex: 1.35 0 190px;
}

.supplier-purchase-detail-fee-item.remark strong {
  color: #c2182b;
}

.supplier-purchase-detail-remark-layout {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 38px;
  border: 1px solid #c8d7e8;
  background: #ffffff;
  overflow: hidden;
}

.supplier-purchase-detail-remark-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 8px;
  border-right: 1px solid #c8d7e8;
  background: #fbfdff;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
}

.supplier-purchase-detail-remark-text {
  min-width: 0;
  min-height: 38px;
  padding: 10px 12px;
  color: #c2182b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .supplier-purchase-detail-fee-layout,
  .supplier-purchase-detail-remark-layout,
  .supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-fee-layout,
  .supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-remark-layout {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .supplier-purchase-detail-fee-label,
  .supplier-purchase-detail-remark-label {
    min-height: 36px;
    padding: 0 6px;
    border-right: 1px solid #c8d7e8;
    border-bottom: 0;
  }

  .supplier-purchase-detail-fee-summary {
    min-height: 36px;
  }
}

.supplier-purchase-detail-audit-row {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.supplier-purchase-detail-lines-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d5e0ea;
}

.supplier-purchase-detail-lines-table th,
.supplier-purchase-detail-lines-table td {
  height: 28px;
  padding: 3px 5px;
  font-size: 12px;
  line-height: 1.15;
}

.supplier-purchase-attachment-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 56px;
  padding: 0 10px;
  border: 1px solid #8fb3d9;
  background: #f4f9ff;
  color: #0b5cab;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.supplier-purchase-attachment-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.supplier-purchase-attachment-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.supplier-purchase-attachment-row,
.supplier-purchase-attachment-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid #d5e0ea;
  background: #f9fbfd;
  font-size: 12px;
}

.supplier-purchase-attachment-row a {
  color: #0b5cab;
  font-weight: 800;
  text-decoration: none;
}

.supplier-purchase-attachment-row em {
  color: #667085;
  font-style: normal;
}

.supplier-purchase-detail-total-row td {
  background: #e8eef6;
  border-top: 2px solid #8da4bd;
}

.supplier-purchase-recent-bills-head {
  min-height: 24px;
  padding: 0 0 6px;
}

@media (max-width: 1280px) {
  .supplier-purchase-detail-card-row {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}
/* codex-purchase-list-tracking-20260622:end */

/* codex-purchase-list-tracking-final-20260622:start */
.supplier-purchase-list-table-wrap {
  background: #fff;
}

.supplier-purchase-list-table {
  border-collapse: collapse;
}

.supplier-purchase-list-table th,
.supplier-purchase-list-table td {
  white-space: normal;
  word-break: break-word;
}

.supplier-purchase-list-table th {
  height: 44px;
  padding: 3px 4px;
}

.supplier-purchase-list-table td {
  height: 30px;
  padding: 3px 4px;
}

.supplier-purchase-col-billNo,
.supplier-purchase-col-counterparty,
.supplier-purchase-col-warehouse,
.supplier-purchase-col-remark {
  text-align: left;
}

.supplier-purchase-col-qty,
.supplier-purchase-col-amount {
  text-align: center;
}

.supplier-purchase-col-qty {
  font-weight: 900;
}

.supplier-purchase-col-amount {
  font-weight: 400;
}

.supplier-purchase-col-remark .supplier-purchase-list-remark {
  display: block;
  max-width: 100%;
  min-width: 0;
  color: #c2182b;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.supplier-purchase-list-detail-row > td {
  padding: 6px 0 8px;
  background: #f7fafc;
}

.supplier-purchase-detail-panel {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.supplier-purchase-detail-panel .business-detail-section {
  margin: 0 0 7px;
  border: 1px solid #d4dfeb;
  border-radius: 0;
  background: #fff;
}

.supplier-purchase-detail-card-row {
  grid-template-columns: repeat(8, minmax(72px, 1fr));
  gap: 5px;
}

.supplier-purchase-detail-card {
  min-height: 34px;
  padding: 4px 6px;
  background: #fbfdff;
}

.supplier-purchase-detail-lines-wrap {
  max-height: 190px;
  overflow-y: auto;
  overflow-x: hidden;
}

.supplier-purchase-detail-lines-table {
  width: 100%;
  table-layout: fixed;
}

.supplier-purchase-detail-lines-table th,
.supplier-purchase-detail-lines-table td {
  height: 25px;
  padding: 2px 4px;
}

.supplier-purchase-list-batchbar {
  min-height: 26px;
  align-items: center;
}

.supplier-purchase-list-row.is-expanded td {
  border-bottom-color: #8da4bd;
}
/* codex-purchase-list-tracking-final-20260622:end */

/* 2026-07-11 inventory query filtering and statistics */
.inventory-query-workspace {
  min-height: 0;
  gap: 10px;
}

.inventory-query-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #dbe5ef;
  border-left: 4px solid #2563eb;
  background: linear-gradient(105deg, #f8fbff 0%, #ffffff 60%);
}

.inventory-query-title {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.inventory-query-title > span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.inventory-query-title strong {
  color: #172554;
  font-size: 21px;
  line-height: 1.15;
}

.inventory-query-title p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.inventory-query-summary-card {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 176px;
  padding: 10px 14px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #eff6ff;
  color: #0f3d91;
  text-align: left;
  cursor: pointer;
}

.inventory-query-summary-card:hover {
  background: #dbeafe;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.inventory-query-summary-card > span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}

.inventory-query-summary-card strong {
  color: #0f3d91;
  font-size: 16px;
  line-height: 1.15;
}

.inventory-query-summary-card small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.inventory-query-filterbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  background: #ffffff;
}

.inventory-query-date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding-right: 10px;
  border-right: 1px solid #e2e8f0;
}

.inventory-query-date-range > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-query-date-range i {
  color: #94a3b8;
  font-style: normal;
}

.inventory-query-date-range .ledger-table-date-input {
  min-width: 126px;
}

.inventory-query-keyword {
  flex: 1 1 290px;
  min-width: min(100%, 260px);
}

.inventory-query-summary-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 30px;
  color: #64748b;
  font-size: 12px;
}

.inventory-query-summary-strip > span {
  padding: 0 10px;
  border-right: 1px solid #dbe5ef;
}

.inventory-query-summary-strip > span:first-child {
  padding-left: 0;
}

.inventory-query-summary-strip > span:last-child {
  border-right: 0;
}

.inventory-query-current-dimension {
  color: #1d4ed8;
  font-weight: 850;
}

.inventory-query-list-scaffold {
  min-height: 0;
}

.inventory-query-table-wrap {
  min-height: 260px;
  max-height: calc(100vh - 286px);
}

.inventory-query-parent-row.is-expanded > td {
  background: #edf5ff !important;
}

.inventory-query-expand-btn,
.inventory-query-ledger-btn {
  min-width: 58px;
  height: 24px;
  border: 1px solid #8ba7c9;
  background: #ffffff;
  color: #0f4c97;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.inventory-query-expand-btn:hover,
.inventory-query-ledger-btn:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.inventory-query-detail-row > td,
.inventory-query-ledger-row > td {
  padding: 0 !important;
  background: #f6f9fd !important;
}

.inventory-query-detail-panel {
  padding: 8px 10px 10px;
  border-top: 1px solid #c9d9eb;
  border-bottom: 1px solid #c9d9eb;
  background: #f6f9fd;
}

.inventory-query-branch-state {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #64748b;
}

.inventory-query-branch-state.is-error {
  color: #b42318;
}

.inventory-query-branch-table,
.inventory-query-ledger-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  table-layout: fixed;
}

.inventory-query-branch-table th,
.inventory-query-branch-table td,
.inventory-query-ledger-table th,
.inventory-query-ledger-table td {
  height: 30px;
  padding: 3px 6px;
  border: 1px solid #d6e0eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.inventory-query-branch-table th,
.inventory-query-ledger-table th {
  background: #eaf1f8;
  color: #334155;
  font-weight: 800;
}

.inventory-query-ledger-row > td {
  padding: 7px 10px 9px 28px !important;
}

.inventory-query-branch-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.inventory-query-ledger-btn.is-primary-detail {
  color: #075fb8;
  border-color: #9fc9f3;
  background: #eef7ff;
}

.inventory-query-ledger-btn.is-quiet {
  min-width: 36px;
  padding-inline: 5px;
  color: #64748b;
  border-color: transparent;
  background: transparent;
}

.inventory-query-piece-row > td {
  padding: 8px 10px 10px 28px !important;
  background: #f7fbff !important;
}

.inventory-query-piece-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 7px;
  color: #1f3c5d;
}

.inventory-query-piece-summary strong {
  font-size: 14px;
}

.inventory-query-piece-summary span {
  color: #6b7d90;
  font-size: 12px;
}

.inventory-query-piece-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #9ed6b6;
  border-radius: 3px;
  background: #edf9f2;
  color: #187346;
  font-size: 12px;
}

.inventory-query-piece-status.is-partial {
  border-color: #efc16f;
  background: #fff7e8;
  color: #a55d00;
}

.inventory-query-footnote {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.inventory-query-modal.hidden {
  display: none;
}

.inventory-query-modal {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: grid;
  place-items: center;
  padding: 18px;
}

.inventory-query-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 36, 0.38);
}

.inventory-query-modal-dialog {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #c8d3df;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(16, 24, 36, 0.3);
}

.inventory-query-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.inventory-query-modal-head > div {
  display: grid;
  gap: 3px;
}

.inventory-query-modal-head strong {
  color: #0f172a;
  font-size: 16px;
}

.inventory-query-modal-head span {
  color: #64748b;
  font-size: 12px;
}

.inventory-query-modal-head button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.inventory-query-modal-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.inventory-query-modal-section {
  display: grid;
  gap: 9px;
}

.inventory-query-modal-section h3 {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.inventory-query-modal-dimension-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inventory-query-modal-dimension-card {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #ced9e6;
  border-radius: 5px;
  background: #ffffff;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.inventory-query-modal-dimension-card.is-active {
  border-color: #2563eb;
  background: #eff6ff;
}

.inventory-query-modal-dimension-card strong {
  color: #0f3d91;
  font-size: 14px;
}

.inventory-query-modal-dimension-card span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

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

.inventory-query-advanced-field {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inventory-query-advanced-field > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.inventory-query-candidate-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 32px;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
}

.inventory-query-candidate-control:focus-within {
  outline: 0;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.inventory-query-advanced-field .inventory-query-candidate-control input {
  flex: 1 1 auto;
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 5px 26px 5px 28px;
  border: 0;
  border-radius: 4px;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  box-shadow: none;
}

.inventory-query-candidate-control[data-inventory-query-selection-state="selected"] input {
  color: #075fbd;
  font-weight: 800;
}

.inventory-query-candidate-state-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  z-index: 1;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.inventory-query-candidate-control[data-inventory-query-selection-state="empty"] .inventory-query-candidate-state-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 6px;
  height: 6px;
  border: 1px solid #6b7b8c;
  border-radius: 50%;
}

.inventory-query-candidate-control[data-inventory-query-selection-state="empty"] .inventory-query-candidate-state-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 5px;
  height: 1px;
  transform: rotate(45deg);
  transform-origin: left center;
  background: #6b7b8c;
}

.inventory-query-candidate-control[data-inventory-query-selection-state="selected"] .inventory-query-candidate-state-icon::before {
  content: "✓";
  position: absolute;
  inset: -3px 0 0;
  color: #075fbd;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.inventory-query-candidate-control > button {
  position: absolute;
  right: 4px;
  top: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #718096;
  font-size: 15px;
  cursor: pointer;
}

.inventory-query-candidate-control:not([data-inventory-query-selection-state="empty"]) > button {
  display: inline-flex;
}

.inventory-query-modal-foot {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

@media (max-width: 720px) {
  .inventory-query-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px;
  }

  .inventory-query-summary-card {
    width: 100%;
  }

  .inventory-query-filterbar {
    align-items: stretch;
  }

  .inventory-query-date-range {
    width: 100%;
    padding: 0 0 8px;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .inventory-query-date-range .ledger-table-date-input {
    flex: 1;
    min-width: 0;
  }

  .inventory-query-keyword {
    flex-basis: 100%;
  }

  .inventory-query-filterbar > .primary-btn,
  .inventory-query-filterbar > .ghost-btn {
    flex: 1;
  }

  .inventory-query-modal-dimension-cards,
  .inventory-query-advanced-grid {
    grid-template-columns: 1fr;
  }

  .inventory-query-modal-foot {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-query-modal-foot > span {
    display: none;
  }
}

/* codex-purchase-list-read-final-20260622:start */
.supplier-purchase-list-table-wrap {
  max-height: calc(100vh - 270px);
  overflow-x: auto;
  overflow-y: auto;
}

.supplier-purchase-recent-bills .supplier-purchase-list-table-wrap {
  max-height: 220px;
}

.supplier-purchase-list-table.generic-editable-table th,
.supplier-purchase-list-table.generic-editable-table td {
  position: relative;
}

.supplier-purchase-list-table .generic-column-resize-handle {
  right: -4px;
  width: 8px;
}

.supplier-purchase-list-table .generic-row-resize-handle {
  bottom: -3px;
  height: 6px;
}

.supplier-purchase-list-table th {
  vertical-align: middle;
}

.supplier-purchase-list-table td {
  vertical-align: middle;
}

.supplier-purchase-list-actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
}

.supplier-purchase-col-action {
  white-space: normal;
}

.supplier-purchase-detail-panel .business-detail-section {
  padding: 6px 8px;
}

.supplier-purchase-detail-section-title {
  margin-bottom: 5px;
}

.supplier-purchase-detail-card-row {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.supplier-purchase-detail-fee-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.supplier-purchase-detail-card {
  min-width: 0;
}

.supplier-purchase-detail-lines-wrap {
  max-height: 168px;
}

.supplier-purchase-detail-lines-table th,
.supplier-purchase-detail-lines-table td {
  height: 24px;
  padding: 2px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supplier-purchase-recent-bills-head span {
  display: none;
}
/* codex-purchase-list-read-final-20260622:end */

/* codex-purchase-list-erp-detail-actions-20260626:start */
.supplier-purchase-type-detail-btn {
  height: 24px;
  min-height: 24px;
  border-color: transparent;
  background: transparent;
  color: #064f9f;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.supplier-purchase-type-detail-btn:hover,
.supplier-purchase-type-detail-btn:focus,
.supplier-purchase-type-detail-btn.is-expanded {
  border-color: #9fc4f4;
  background: #f4f9ff;
}

.supplier-purchase-list-detail-row > td {
  padding: 0;
  background: #ffffff;
}

.supplier-purchase-detail-panel {
  display: block;
  padding: 6px 8px 7px;
  border-top: 2px solid #8da4bd;
  border-bottom: 1px solid #cbd8e6;
  background: #f8fbff;
}

.supplier-purchase-detail-panel .business-detail-section {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.supplier-purchase-detail-panel .business-detail-section + .business-detail-section {
  margin-top: 6px;
}

.supplier-purchase-detail-section-title {
  min-height: 22px;
  margin: 0;
  padding: 0 0 3px;
}

.supplier-purchase-detail-section-title h3,
.supplier-purchase-detail-panel .business-detail-section h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

.supplier-purchase-detail-card-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #cbd8e6;
  border-left: 1px solid #cbd8e6;
  background: #ffffff;
}

.supplier-purchase-detail-card {
  min-width: 0;
  min-height: 30px;
  padding: 3px 6px;
  border: 0;
  border-right: 1px solid #cbd8e6;
  border-bottom: 1px solid #cbd8e6;
  background: #fbfdff;
}

.supplier-purchase-detail-card span {
  font-size: 10px;
  line-height: 1.1;
}

.supplier-purchase-detail-card strong {
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.15;
}

.supplier-purchase-detail-lines-wrap {
  max-height: 156px;
  border: 1px solid #cbd8e6;
  background: #fff;
}

.supplier-purchase-detail-lines-table th,
.supplier-purchase-detail-lines-table td {
  height: 23px;
  padding: 2px 4px;
  font-size: 12px;
}

.supplier-purchase-detail-fee-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.supplier-purchase-detail-audit-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-purchase-detail-audit-note {
  margin: 7px 0 0;
  color: #52667d;
  font-size: 12px;
  line-height: 1.45;
}

.supplier-purchase-detail-actions {
  justify-content: flex-end;
}

.supplier-purchase-detail-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-height: 28px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #cbd8e6;
}

.supplier-purchase-detail-footer-actions .supplier-purchase-list-action-btn {
  min-width: 54px;
  height: 24px;
}
/* codex-purchase-list-erp-detail-actions-20260626:end */

/* codex-purchase-list-erp-table-r20:start */
.supplier-purchase-list-only-workspace {
  height: calc(100dvh - 236px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  padding: 0 18px 12px;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-scaffold {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.supplier-purchase-list-scaffold {
  min-height: 0;
}

.supplier-purchase-table-search {
  min-height: 42px;
  justify-content: flex-end;
  padding: 6px 10px;
  border: 1px solid #d4deea;
  border-bottom: 0;
  background: #ffffff;
}

.supplier-purchase-list-batchbar {
  min-height: 28px;
  padding: 0 0 4px;
  border-left: 1px solid #d4deea;
  border-right: 1px solid #d4deea;
  background: #ffffff;
}

.supplier-purchase-list-table-wrap {
  max-height: min(58vh, 640px);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.supplier-purchase-list-table th {
  height: 36px;
  padding: 2px 3px;
  vertical-align: middle;
  background: #e8eef5;
}

.supplier-purchase-list-table td {
  height: 31px;
  padding: 3px 4px;
}

.supplier-purchase-filter-shell {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0;
  border-color: #bfd0e3;
  background: #fbfdff;
}

.supplier-purchase-filter-shell.is-active {
  background: #ffffff;
}

.supplier-purchase-filter-input,
.supplier-purchase-list-table th .supplier-purchase-filter-input {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 18px 0 4px;
  border: 0;
  background: transparent;
  color: #102033;
  font-size: 12px;
  font-weight: 900;
  line-height: 28px;
  text-align: center;
  outline: 0;
}

.supplier-purchase-filter-input::placeholder {
  color: #102033;
  opacity: 1;
}

.supplier-purchase-filter-input:focus {
  border: 0;
  outline: 2px solid rgba(45, 114, 232, 0.18);
  outline-offset: -2px;
}

.supplier-purchase-filter-clear {
  position: absolute;
  top: 1px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid #c7d2df;
  border-radius: 50%;
  background: #f4f7fb;
  color: #617185;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.supplier-purchase-list-actions {
  gap: 4px;
  flex-wrap: nowrap;
}

.supplier-purchase-list-action-btn {
  min-width: 34px;
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  line-height: 1;
}

.supplier-purchase-list-expand-btn {
  min-width: 38px;
}

.supplier-purchase-col-action {
  white-space: nowrap;
}

.supplier-purchase-detail-panel {
  max-width: 100%;
  overflow: hidden;
}

.supplier-purchase-detail-lines-wrap {
  max-height: 178px;
  overflow-x: hidden;
  overflow-y: auto;
  border-color: #b8cfe6;
}

.supplier-purchase-detail-lines-table th {
  background: #dbeafe;
  border-color: #b8cfe6;
  color: #0c365e;
}

.supplier-purchase-detail-lines-table td {
  border-color: #c8d7e8;
}

.supplier-purchase-force-edit-panel,
.supplier-purchase-draft-edit-panel,
.supplier-purchase-force-edit-panel .supplier-purchase-doc,
.supplier-purchase-draft-edit-panel .supplier-purchase-doc,
.supplier-purchase-force-edit-doc,
.supplier-purchase-draft-edit-doc {
  max-width: 100%;
  overflow-x: hidden;
}

.supplier-purchase-force-edit-panel .supplier-purchase-doc,
.supplier-purchase-draft-edit-panel .supplier-purchase-doc {
  max-height: min(62vh, 620px);
  overflow-y: auto;
}

.supplier-purchase-force-edit-doc .supplier-doc-actions,
.supplier-purchase-draft-edit-doc .supplier-doc-actions {
  min-height: 40px;
  padding: 6px 12px;
  align-items: center;
}

.supplier-purchase-force-edit-doc .supplier-doc-actions .supplier-doc-draft-btn,
.supplier-purchase-force-edit-doc .supplier-doc-actions .supplier-doc-submit-btn,
.supplier-purchase-force-edit-doc .supplier-doc-actions button,
.supplier-purchase-draft-edit-doc .supplier-doc-actions .supplier-doc-draft-btn,
.supplier-purchase-draft-edit-doc .supplier-doc-actions .supplier-doc-submit-btn,
.supplier-purchase-draft-edit-doc .supplier-doc-actions button {
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  line-height: 1;
}

.supplier-purchase-detail-footer-actions {
  min-height: 28px;
  align-items: center;
}

.supplier-purchase-detail-footer-actions .supplier-purchase-list-action-btn {
  height: 26px;
  min-height: 26px;
}
/* codex-purchase-list-erp-table-r20:end */

/* codex-purchase-secondary-detail-page-r401:start */
.supplier-purchase-detail-page-workspace {
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 0 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.supplier-purchase-detail-page-head {
  flex: 0 0 auto;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid #d4deea;
  background: #ffffff;
}

.supplier-purchase-detail-back {
  min-width: 118px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #9ebbe1;
  background: #f7fbff;
  color: #0d5cab;
  font-weight: 700;
}

.supplier-purchase-detail-page-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.supplier-purchase-detail-page-title strong {
  color: #172333;
  font-size: 16px;
}

.supplier-purchase-detail-page-title span {
  min-width: 0;
  color: #65778a;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-purchase-detail-page-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b5cab;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.supplier-purchase-detail-page-status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
}

.supplier-purchase-detail-page-status.is-posted,
.supplier-purchase-detail-page-status.is-settled {
  color: #176d4d;
}

.supplier-purchase-detail-page-status.is-reversed,
.supplier-purchase-detail-page-status.is-voided {
  color: #bd1b2c;
}

.supplier-purchase-detail-page-status.is-force_modified {
  color: #6d359d;
}

.supplier-purchase-detail-page-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 0 0;
  scrollbar-gutter: auto;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-panel {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-panel .business-detail-section {
  margin: 0 0 6px;
  padding: 8px 12px;
  border: 1px solid #d4dfeb;
  background: #ffffff;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-section-title,
.supplier-purchase-detail-page-workspace .supplier-purchase-detail-panel .business-detail-section h3 {
  min-height: 20px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  color: #172333;
  font-size: 13px;
  font-weight: 800;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card-row {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-basic-row {
  gap: 0;
  border: 1px solid #d5e0ea;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-fee-row {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card {
  min-height: 38px;
  padding: 6px 9px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  border-right: 1px solid #d5e0ea;
  border-bottom: 1px solid #d5e0ea;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card.inline:nth-child(4n) {
  border-right: 0;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card.inline:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card span {
  font-size: 12px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card.inline span {
  display: inline;
  flex: 0 0 auto;
  white-space: nowrap;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card strong {
  margin-top: 2px;
  font-size: 14px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-card.inline strong {
  min-width: 0;
  margin-top: 0;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-lines-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-lines-table th,
.supplier-purchase-detail-page-workspace .supplier-purchase-detail-lines-table td {
  height: 27px;
  padding: 3px 6px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-image-section {
  min-height: 124px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-image-list {
  min-height: 84px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-footer-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 50px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #d4dfeb;
  background: rgba(255, 255, 255, 0.98);
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-footer-actions .supplier-purchase-list-action-btn {
  min-width: 76px;
  height: 32px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-force-edit-panel .supplier-purchase-doc,
.supplier-purchase-detail-page-workspace .supplier-purchase-draft-edit-panel .supplier-purchase-doc {
  max-height: none;
  overflow: visible;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-force-edit-panel,
.supplier-purchase-detail-page-workspace .supplier-purchase-draft-edit-panel {
  overflow: visible;
}

.supplier-purchase-detail-page-skeleton {
  display: grid;
  gap: 10px;
}

.supplier-purchase-detail-page-skeleton span {
  display: block;
  height: 72px;
  border: 1px solid #d8e2ed;
  background: linear-gradient(90deg, #f4f7fa 25%, #fbfdff 37%, #f4f7fa 63%);
  background-size: 400% 100%;
  animation: supplier-purchase-detail-skeleton 1.2s ease infinite;
}

.supplier-purchase-list-row.is-detail-return-target > td {
  background: #fff8d7 !important;
  transition: background-color 260ms ease;
}

@keyframes supplier-purchase-detail-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

html:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace),
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .app-shell,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .main {
  display: flex;
  flex-direction: column;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .topbar,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .summary-grid {
  display: none !important;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) #supplierPurchaseView,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .supplier-purchase-panel,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .supplier-purchase-board {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .supplier-purchase-panel,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-detail-page-workspace) .supplier-purchase-board {
  padding: 0;
}

@media (max-width: 980px) {
  .supplier-purchase-detail-page-head {
    grid-template-columns: 1fr auto;
  }

  .supplier-purchase-detail-page-title {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .supplier-purchase-detail-back {
    grid-row: 2;
  }

  .supplier-purchase-detail-page-status {
    grid-column: 2;
    grid-row: 2;
  }

  .supplier-purchase-detail-page-workspace .supplier-purchase-detail-card-row,
  .supplier-purchase-detail-page-workspace .supplier-purchase-detail-fee-row {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}
/* codex-purchase-secondary-detail-page-r401:end */

/* codex-purchase-list-repeat-actions-r24:start */
.supplier-purchase-list-detail-row > td {
  border-top: 0;
}

.supplier-purchase-detail-panel {
  border-top: 0;
  padding-top: 4px;
}

.supplier-purchase-detail-footer-actions {
  padding-top: 4px;
}

.supplier-purchase-force-edit-panel,
.supplier-purchase-draft-edit-panel {
  padding: 0;
}

.supplier-purchase-force-edit-panel .supplier-purchase-doc,
.supplier-purchase-draft-edit-panel .supplier-purchase-doc,
.supplier-purchase-force-edit-doc,
.supplier-purchase-draft-edit-doc {
  min-height: 0;
  height: auto;
  max-height: none;
  display: block;
  overflow: visible;
}

.supplier-purchase-force-edit-doc .supplier-purchase-doc-form,
.supplier-purchase-draft-edit-doc .supplier-purchase-doc-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
  overflow: visible;
  padding: 6px 8px 8px;
}

.supplier-purchase-force-edit-doc .supplier-doc-section-title,
.supplier-purchase-draft-edit-doc .supplier-doc-section-title {
  min-height: 30px;
}

.supplier-purchase-force-edit-doc .supplier-doc-basic-grid,
.supplier-purchase-draft-edit-doc .supplier-doc-basic-grid {
  padding: 8px 14px;
  gap: 8px 14px;
}

.supplier-purchase-force-edit-doc .supplier-doc-table-wrap,
.supplier-purchase-draft-edit-doc .supplier-doc-table-wrap {
  height: clamp(146px, 22vh, 236px);
  min-height: 146px;
  max-height: 236px;
}

/* codex-purchase-total-row-r404:start */
.supplier-purchase-doc .supplier-doc-basic-grid .supplier-doc-field > span {
  font-size: 12px;
  font-weight: 700;
}

.supplier-purchase-doc .supplier-doc-basic-grid .supplier-doc-field input,
.supplier-purchase-doc .supplier-doc-basic-grid .supplier-doc-field select {
  font-size: 14px;
  font-weight: 700;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-lines-table tbody td,
.supplier-purchase-doc .supplier-doc-matrix-table tbody td,
.supplier-purchase-doc .supplier-doc-matrix-table input {
  font-size: 13px;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-lines-table tfoot td,
.supplier-purchase-doc .supplier-doc-matrix-table tfoot td {
  font-size: 14px;
  font-weight: 900;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-code,
.supplier-purchase-doc .supplier-doc-matrix-table [data-purchase-line-field="productSearch"] {
  font-weight: 700;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-name,
.supplier-purchase-doc .supplier-doc-matrix-table [data-purchase-line-display="identity"],
.supplier-purchase-doc .supplier-doc-matrix-table input[readonly] {
  font-weight: 400;
}

.supplier-purchase-detail-page-workspace .supplier-purchase-detail-number,
.supplier-purchase-detail-page-workspace .supplier-purchase-detail-amount {
  font-weight: 400;
}

.supplier-purchase-doc .supplier-doc-matrix-table [data-purchase-size-total],
.supplier-purchase-doc .supplier-doc-conversion-cell {
  font-weight: 900;
}

.supplier-purchase-force-edit-doc .supplier-doc-table-wrap {
  position: relative;
}

.supplier-purchase-force-edit-doc .supplier-doc-matrix-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.supplier-purchase-doc .supplier-doc-delete-line {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #64748b;
  border-radius: 3px;
  background: #ffffff;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.supplier-purchase-doc .supplier-doc-delete-line:hover,
.supplier-purchase-doc .supplier-doc-delete-line:focus-visible {
  border-color: #111827;
  background: #f8fafc;
  color: #000000;
  outline: 1px solid #111827;
  outline-offset: 1px;
}

.supplier-purchase-doc .supplier-doc-matrix-table .doc-col-row-action,
.supplier-purchase-doc .supplier-doc-matrix-table .supplier-doc-line-action-cell {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding: 0 3px;
  box-sizing: border-box;
}
/* codex-purchase-total-row-r404:end */

.supplier-purchase-force-edit-doc .supplier-doc-payment-row,
.supplier-purchase-draft-edit-doc .supplier-doc-payment-row {
  min-height: 34px;
  padding: 6px 12px;
}

.supplier-purchase-force-edit-doc .supplier-doc-total-remark,
.supplier-purchase-draft-edit-doc .supplier-doc-total-remark {
  padding: 6px 12px 8px;
}

.supplier-purchase-force-edit-doc .supplier-doc-total-remark input,
.supplier-purchase-draft-edit-doc .supplier-doc-total-remark input,
.supplier-purchase-force-edit-doc .supplier-doc-total-remark textarea,
.supplier-purchase-draft-edit-doc .supplier-doc-total-remark textarea {
  height: 28px;
  min-height: 28px;
}

.supplier-purchase-force-edit-doc .supplier-doc-image-attachments,
.supplier-purchase-draft-edit-doc .supplier-doc-image-attachments {
  min-height: 74px;
  padding-bottom: 8px;
}

.supplier-purchase-force-edit-doc .supplier-doc-actions,
.supplier-purchase-draft-edit-doc .supplier-doc-actions {
  min-height: 34px;
  margin-top: 6px;
  padding: 4px 8px;
  align-items: center;
}

.supplier-purchase-force-edit-doc .supplier-doc-actions .supplier-doc-draft-btn,
.supplier-purchase-force-edit-doc .supplier-doc-actions .supplier-doc-submit-btn,
.supplier-purchase-force-edit-doc .supplier-doc-actions button,
.supplier-purchase-draft-edit-doc .supplier-doc-actions .supplier-doc-draft-btn,
.supplier-purchase-draft-edit-doc .supplier-doc-actions .supplier-doc-submit-btn,
.supplier-purchase-draft-edit-doc .supplier-doc-actions button {
  height: 28px;
  min-height: 28px;
}
/* codex-purchase-list-repeat-actions-r24:end */

.site-icp-footer {
  display: none !important;
}

.site-icp-footer a {
  color: inherit;
  text-decoration: none;
}

.site-icp-footer a:hover {
  color: #1d4ed8;
}

@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  :root {
    --mobile-module-nav-height: 44px;
    --business-tabs-left: 0px;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    display: none !important;
  }

  .main {
    padding: calc(12px + var(--mobile-module-nav-height) + var(--business-tabs-height)) 8px 56px;
    overflow-x: hidden;
  }

  .mobile-module-nav:not(.hidden) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 220;
    display: flex;
    align-items: stretch;
    gap: 5px;
    height: var(--mobile-module-nav-height);
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    background: #17212f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .mobile-module-nav:not(.hidden)::-webkit-scrollbar {
    display: none;
  }

  .mobile-module-nav-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 54px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .mobile-module-nav-item.active {
    border-color: #ffffff;
    background: #ffffff;
    color: #17212f;
  }

  .mobile-module-nav-icon {
    font-size: 12px;
    line-height: 1;
  }

  .mobile-module-nav-label {
    line-height: 1;
  }

  .global-business-tabs {
    top: var(--mobile-module-nav-height);
    left: 0;
    z-index: 210;
  }

  .toolbar #toggleTemplatePanel {
    display: none !important;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 170px);
    column-gap: 6px;
    row-gap: 4px;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) .topbar-copy {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 4px;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) .topbar-title-row {
    min-height: 32px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) .page-meta {
    display: none;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) .topbar-title-main {
    min-height: 32px;
    font-size: 20px;
    white-space: nowrap;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) .topbar-title-dot {
    width: 7px;
    height: 7px;
  }

  .topbar:has(.toolbar[data-active-view="workbench"][data-active-filter="queued"]) .topbar-title-sub {
    min-height: 32px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: stretch;
    align-self: center;
    justify-content: end;
    justify-self: end;
    width: 100%;
    max-width: none;
    margin-left: auto;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .segmented {
    display: none !important;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .segment {
    min-width: 0;
    height: 32px;
    padding: 0 4px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .hidden-style-search,
  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .jst-style-sync {
    display: grid;
    gap: 6px;
    width: 100%;
    min-width: 0;
    min-height: 32px;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .hidden-style-search {
    grid-column: 1 / -1;
    justify-self: end;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 46px;
    min-height: 32px;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .jst-style-sync {
    display: none !important;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .hidden-style-search .clearable-control,
  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .jst-style-sync .clearable-control {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] input {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 24px 0 8px;
    font-size: 12px;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] button,
  .toolbar[data-active-view="workbench"][data-active-filter="queued"] #addManualDispatchBlock,
  .toolbar[data-active-view="workbench"][data-active-filter="queued"] #saveWorkbenchConfig {
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 850;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] .shortage-pin-search-button {
    width: 100%;
    justify-self: stretch;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] #addManualDispatchBlock,
  .toolbar[data-active-view="workbench"][data-active-filter="queued"] #saveWorkbenchConfig {
    display: none !important;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] #addManualDispatchBlock {
    grid-column: 3 / span 1;
  }

  .toolbar[data-active-view="workbench"][data-active-filter="queued"] #saveWorkbenchConfig {
    grid-column: 4 / span 1;
  }

  .summary-grid[data-summary-view="workbench"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 6px;
  }

  .summary-grid[data-summary-view="workbench"] .summary-item {
    grid-column: span 1 !important;
    min-height: 54px !important;
    display: grid;
    align-content: center;
    padding: 6px 8px;
    overflow: hidden;
  }

  .summary-grid[data-summary-view="workbench"] .summary-item span,
  .summary-grid[data-summary-view="workbench"] .summary-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .summary-grid[data-summary-view="workbench"] .summary-item span {
    font-size: 12px;
    line-height: 1.15;
  }

  .summary-grid[data-summary-view="workbench"] .summary-item strong {
    margin-top: 3px;
    font-size: 18px;
    line-height: 1.05;
  }

  .summary-grid[data-summary-view="workbench"][data-summary-filter="queued"] {
    gap: 4px;
    margin-bottom: 6px;
  }

  .summary-grid[data-summary-view="workbench"][data-summary-filter="queued"] .summary-item {
    min-height: 42px !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    align-content: center;
    column-gap: 6px;
    padding: 4px 7px;
  }

  .summary-grid[data-summary-view="workbench"][data-summary-filter="queued"] .summary-item span[data-summary-field="label"] {
    grid-column: 1;
    grid-row: 1;
    max-width: 5.2em;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.05;
    font-size: 11px;
  }

  .summary-grid[data-summary-view="workbench"][data-summary-filter="queued"] .summary-item strong[data-summary-field="value"] {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    max-width: 94px;
    margin-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
  }

  .summary-grid[data-summary-view="workbench"][data-summary-filter="queued"] [data-summary-item="workbench-summary-shortage-total"] {
    display: none !important;
  }

  #shortagePanel[data-dispatch-filter="queued"] {
    --shortage-block-width: calc(100vw - 20px);
    --shortage-blocks-per-row: 1;
    --shortage-label-column-width: 62px;
    --shortage-size-column-width: 28px;
    --shortage-total-column-width: 42px;
    --shortage-bed-column-width: 38px;
  }

  #shortagePanel[data-dispatch-filter="queued"] .block-list {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0 2px 40px;
    overflow-x: hidden;
    background: #f5f7fb;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-window-groups,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-pinned-style-zone,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-search-pinned,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group,
  #shortagePanel[data-dispatch-filter="queued"] .style-group-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group {
    margin: 0;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group .style-group-grid {
    grid-column: 1;
    grid-row: auto;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group.is-dispatch-pinned-style {
    padding-right: 0;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group.is-dispatch-pinned-style .style-group-grid {
    order: 2;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group.is-dispatch-pinned-style .shortage-unpin-style-key {
    order: 1;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-style-group-actions {
    grid-column: 1;
    grid-row: auto;
    order: 1;
    justify-self: end;
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding-top: 0;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-mosaic-block,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-block.shortage-mosaic-block {
    width: var(--shortage-block-width);
    min-width: 0;
    max-width: var(--shortage-block-width);
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-matrix,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-block.shortage-mosaic-block .shortage-matrix {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-unpin-style-key {
    position: static;
    z-index: auto;
    justify-self: end;
    width: auto;
    min-width: 58px;
    height: 24px;
    margin: 0 4px -2px 0;
    padding: 0 7px;
    line-height: 1;
    white-space: nowrap;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-unpin-style-key.shortage-style-rail-key {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-unpin-style-key span {
    display: inline;
    line-height: 1;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block.shortage-mosaic-block .block-actions {
    height: 30px;
    min-height: 30px;
    padding: 1px 4px;
    overflow: hidden;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-action-row,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-actions .action-group {
    height: 26px;
    min-height: 26px;
    align-items: center;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-action-row,
  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-actions .action-group {
    gap: 4px;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-actions .cut-queue-inline {
    min-height: 26px;
    height: 26px;
    padding: 0 5px;
    gap: 2px;
    box-sizing: border-box;
    line-height: 1;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-actions .shortage-cut-entry-key {
    width: 52px;
    min-width: 52px;
    height: 26px;
    font-size: 11px;
    font-weight: 850;
  }

  #shortagePanel[data-dispatch-filter="queued"] .shortage-block .block-actions .shortage-archive-key {
    display: none !important;
  }
}

@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  body.mobile-dispatch-surface {
    --shortage-block-width: calc(100vw - 20px);
    --shortage-blocks-per-row: 1;
    --shortage-label-column-width: 62px;
    --shortage-size-column-width: 28px;
    --shortage-total-column-width: 42px;
    --shortage-bed-column-width: 38px;
    background: #f5f7fb;
  }

  body.mobile-dispatch-surface .app-shell {
    display: block;
    min-height: 100vh;
  }

  body.mobile-dispatch-surface .sidebar,
  body.mobile-dispatch-surface .global-business-tabs,
  body.mobile-dispatch-surface .topbar,
  body.mobile-dispatch-surface .summary-grid,
  body.mobile-dispatch-surface .template-panel,
  body.mobile-dispatch-surface .global-board,
  body.mobile-dispatch-surface .custom-module-host,
  body.mobile-dispatch-surface .dispatch-main-workspace,
  body.mobile-dispatch-surface .ai-read-card {
    display: none !important;
  }

  body.mobile-dispatch-surface .main {
    min-height: 100vh;
    padding: 0 0 32px;
    overflow: visible;
    background: #f5f7fb;
  }

  body.mobile-dispatch-surface .workbench-view,
  body.mobile-dispatch-surface .board-layout,
  body.mobile-dispatch-surface .shortage-panel {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  body.mobile-dispatch-surface .shortage-panel .block-list {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0 10px 40px;
  }

  .mobile-dispatch-tabs {
    position: sticky;
    top: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0 -10px 10px;
    padding: 8px 10px 7px;
    background: #f5f7fb;
    border-bottom: 1px solid #d6dee9;
  }

  .mobile-dispatch-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #c9d5e6;
    border-radius: 7px;
    background: #ffffff;
    color: #24364b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
  }

  .mobile-dispatch-tab.active {
    border-color: #1f6ed4;
    background: #1f6ed4;
    color: #ffffff;
  }

  body.mobile-dispatch-surface .shortage-window-groups,
  body.mobile-dispatch-surface .shortage-pinned-style-zone,
  body.mobile-dispatch-surface .shortage-style-group,
  body.mobile-dispatch-surface .style-group-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  body.mobile-dispatch-surface .shortage-style-group {
    margin: 0;
  }

  body.mobile-dispatch-surface .shortage-style-group .style-group-grid {
    grid-column: 1;
    grid-row: auto;
  }

  body.mobile-dispatch-surface .shortage-style-group.is-dispatch-pinned-style {
    padding-right: 0;
  }

  body.mobile-dispatch-surface .shortage-style-group.is-dispatch-pinned-style .style-group-grid {
    order: 2;
  }

  body.mobile-dispatch-surface .shortage-style-group.is-dispatch-pinned-style .shortage-unpin-style-key {
    order: 1;
  }

  body.mobile-dispatch-surface .shortage-style-group-actions {
    grid-column: 1;
    grid-row: auto;
    order: 1;
    justify-self: end;
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding-top: 0;
  }

  body.mobile-dispatch-surface .shortage-block,
  body.mobile-dispatch-surface .shortage-mosaic-block,
  body.mobile-dispatch-surface .shortage-block.shortage-mosaic-block {
    width: var(--shortage-block-width);
    min-width: 0;
    max-width: var(--shortage-block-width);
  }

  body.mobile-dispatch-surface .shortage-matrix,
  body.mobile-dispatch-surface .shortage-block.shortage-mosaic-block .shortage-matrix {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.mobile-dispatch-surface .shortage-unpin-style-key {
    position: static;
    z-index: auto;
    justify-self: end;
    width: auto;
    min-width: 58px;
    height: 24px;
    margin: 0 4px -2px 0;
    padding: 0 7px;
    line-height: 1;
    white-space: nowrap;
  }

  body.mobile-dispatch-surface .shortage-unpin-style-key.shortage-style-rail-key {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
  }

  body.mobile-dispatch-surface .shortage-unpin-style-key span {
    display: inline;
    line-height: 1;
  }
}

@media print {
  .site-icp-footer {
    display: none;
  }

  body.master-product-label-care-printing > *:not(.master-product-label-care-print-area) {
    display: none !important;
  }

  body.master-product-label-care-printing .master-product-label-care-print-area {
    display: block !important;
    padding: 12mm;
  }
}


/* 2026-06-24 production center editable overlay */
.production-main-list-tools { align-items: center; justify-content: space-between; gap: 8px; }
.production-main-list-search,
.production-main-list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.production-main-batch-count { min-width: 68px; color: #475569; font-size: 12px; }
.production-main-autosave-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: default;
}
.production-main-autosave-status.is-saving {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.production-main-autosave-status.is-saved {
  border-color: #86efac;
  background: #f0fdf4;
  color: #047857;
}
.production-main-autosave-status.is-failed {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
}
.production-main-table th,
.production-main-table td { height: 34px; min-height: 34px; }
.production-main-table th { position: relative; height: 54px; min-height: 54px; vertical-align: top; }
.production-main-head-label[contenteditable="true"],
.production-main-editable-cell[contenteditable="true"] { outline: none; cursor: text; }
.production-main-head-label[contenteditable="true"]:focus,
.production-main-editable-cell[contenteditable="true"]:focus { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35); background: #eff6ff; }
.production-main-editable-cell { background: #fff; }
.production-main-wash-factory-cell { padding: 0; }
.production-main-wash-factory-cell .clearable-control {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
}
.production-main-wash-factory-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: center;
  outline: none;
  padding: 0 16px 0 4px;
}
.production-main-wash-factory-input:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.42);
  background: #eff6ff;
}
.production-main-wash-factory-cell .clearable-control-button {
  right: 1px;
}
.production-main-empty-cell { color: #94a3b8; }
.production-main-column-selected { background: #eff6ff; }
.production-main-table td.production-main-column-selected { background: inherit; }
.production-main-cell-selected,
.production-main-table td.production-main-cell-selected { box-shadow: inset 0 0 0 2px #2563eb; }
.production-main-switch { justify-content: center; min-width: 54px; gap: 4px; }
.production-main-status-cell { text-align: center; }

.ledger-list-workspace .supplier-purchase-col-select,
.ledger-list-workspace .supplier-purchase-col-sequence {
  box-sizing: border-box;
  vertical-align: middle;
}

.ledger-list-workspace td.ledger-status-switch-cell {
  padding-right: 4px;
  padding-left: 4px;
  text-align: center !important;
}

.ledger-row-status-switch {
  display: inline-flex;
  vertical-align: middle;
}

/* 2026-06-24 production center list compact header/table shell */
body:has(#migrationView.production-main-list-mode:not(.hidden)) {
  overflow-y: hidden;
}

body:has(#migrationView.production-main-list-mode:not(.hidden)) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#migrationView.production-main-list-mode:not(.hidden)) .topbar {
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 4px;
}

body:has(#migrationView.production-main-list-mode:not(.hidden)) .topbar-copy {
  min-width: 0;
}

body:has(#migrationView.production-main-list-mode:not(.hidden)) .topbar-title-row {
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

body:has(#migrationView.production-main-list-mode:not(.hidden)) .topbar-field.topbar-fixed-title {
  min-height: 30px;
}

.production-main-topbar-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.production-main-topbar-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  width: 132px;
  min-width: 100px;
  height: 45px;
  min-height: 42px;
  padding: 7px 10px 6px;
  border: 1px solid #d3dce8;
  background: #ffffff;
  line-height: 1.15;
  overflow: hidden;
}

.production-main-topbar-stat em {
  color: #607086;
  font-size: 12px;
  line-height: 1.1;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.production-main-topbar-stat strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}

body:has(#migrationView.production-main-list-mode:not(.hidden)) .summary-grid {
  display: none !important;
}

body:has(#commonView:not(.hidden)) #migrationView,
body:has(#workbenchView:not(.hidden)) #migrationView,
body:has(#transferView:not(.hidden)) #migrationView,
body:has(#permissionsView:not(.hidden)) #migrationView,
body:has(#supplierPurchaseView:not(.hidden)) #migrationView,
body:has(#costAccountingView:not(.hidden)) #migrationView,
body:has(#productionCraftView:not(.hidden)) #migrationView {
  display: none !important;
}

body:has(#ledgerView:not(.hidden)):has(#migrationView.production-main-list-mode:not(.hidden)) {
  overflow-y: auto;
}

body:has(#ledgerView:not(.hidden)):has(#migrationView.production-main-list-mode:not(.hidden)) .main {
  height: auto;
  min-height: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: visible;
  padding: calc(18px + var(--business-tabs-height)) 22px 28px;
}

body:has(#ledgerView:not(.hidden)):has(#migrationView.production-main-list-mode:not(.hidden)) .summary-grid {
  display: grid !important;
}

body:has(#templatePanel.production-layout-panel:not(.hidden)):has(#ledgerView:not(.hidden)) .summary-grid,
body:has(#templatePanel.production-layout-panel:not(.hidden)):has(#migrationView.production-main-list-mode:not(.hidden)) .summary-grid {
  display: none !important;
}

#migrationView.production-main-list-mode {
  min-height: 0;
  flex: 1 1 auto;
  display: flex !important;
}

#migrationView.production-main-list-mode .migration-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
}

#migrationView.production-main-list-mode #productionBusinessHost {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

#migrationView.production-main-list-mode .production-main-overview {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
}

.production-main-list-toolbar-card {
  flex: 0 0 auto;
  border: 1px solid #d3dce8;
  background: #ffffff;
}

.production-main-list-toolbar-card .production-main-list-tools {
  min-height: 34px;
  padding: 3px 10px;
  border: 0;
  background: transparent;
}

.production-main-list-toolbar-card .production-main-list-search,
.production-main-list-toolbar-card .production-main-list-actions {
  align-items: center;
}

.production-main-list-toolbar-card .production-main-search-input {
  height: 28px;
}

.production-main-list-toolbar-card .production-main-search-button,
.production-main-list-toolbar-card .production-main-clear-btn,
.production-main-list-toolbar-card .production-main-list-actions .ghost-btn {
  min-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
}

.production-main-count {
  display: none !important;
}

#migrationView.production-main-list-mode .production-main-table-wrap {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow: auto;
}

/* 2026-06-24 production center toolbar single-line tightening */
#migrationView.production-main-list-mode .production-main-overview {
  gap: 2px;
}

.production-main-list-toolbar-card {
  border-bottom: 0;
}

.production-main-list-toolbar-card .production-main-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 32px;
  max-height: 32px;
  padding: 2px 8px;
  overflow: hidden;
}

.production-main-list-toolbar-card .production-main-list-search,
.production-main-list-toolbar-card .production-main-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.production-main-list-toolbar-card .production-main-list-search {
  flex: 1 1 auto;
  overflow: hidden;
}

.production-main-list-toolbar-card .production-main-list-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.production-main-list-toolbar-card .production-main-list-tools label {
  flex: 0 0 auto;
  gap: 4px;
  margin: 0;
}

.production-main-list-toolbar-card .production-main-search-wide {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 330px;
}

.production-main-list-toolbar-card .production-main-search-input {
  height: 26px;
  padding: 0 6px;
}

.production-main-list-toolbar-card label:not(.production-main-search-wide) .production-main-search-input {
  width: 142px;
  min-width: 142px;
}

.production-main-list-toolbar-card .production-main-search-button,
.production-main-list-toolbar-card .production-main-clear-btn,
.production-main-list-toolbar-card .production-main-list-actions .ghost-btn {
  min-height: 26px;
  height: 26px;
  padding: 0 11px;
  line-height: 24px;
}

.production-main-list-toolbar-card .production-main-batch-count {
  min-width: 60px;
}

.standard-list-terminal-record-counts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.standard-list-terminal-record-counts > span + span {
  color: #c5221f;
}

.standard-list-terminal-record-toggle.is-active {
  border-color: #ef9a9a;
  color: #c5221f;
}

/* 2026-06-25 production progress formula columns and size maintenance matrix */
.production-main-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 116px;
  white-space: nowrap;
  color: #475569;
  font-size: 12px;
}

.production-main-pager button,
.production-main-page-state-actions button {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #aebdce;
  border-radius: 3px;
  background: #ffffff;
  color: #1e3a5f;
  cursor: pointer;
}

.production-main-pager button:disabled,
.production-main-page-state-actions button:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.production-main-table tbody tr.production-main-summary-row > td {
  height: 56px;
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #f8fafc !important;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
  border-top: 2px solid #cbd5e1;
}

.production-main-table tbody tr.production-main-summary-row > .production-main-summary-label {
  letter-spacing: 0.08em;
}

.production-main-end-row > td {
  position: relative;
  min-height: 32px;
  text-align: center;
}

.production-main-page-state-actions {
  display: inline-flex;
  gap: 6px;
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  transform: translateY(-50%);
}

/* Standard data-list v2: every ordinary list uses a 50 + 50 logical page. */
table[data-standard-list] tbody tr.standard-list-summary-row > td {
  height: 56px;
  min-height: 56px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-weight: 800;
  vertical-align: middle;
}

table[data-standard-list] tbody tr.standard-list-summary-row > td.standard-list-summary-label {
  text-align: center;
}

table[data-standard-list] tbody tr.standard-list-summary-row > td.standard-list-summary-value {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table[data-standard-list] tbody tr.standard-list-page-state-row > td {
  position: relative;
  min-height: 38px;
  padding: 9px 10px;
  text-align: center;
  color: var(--muted, #64748b);
}

.standard-list-page-actions {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  transform: translateY(-50%);
  white-space: nowrap;
}

.standard-list-page-actions button {
  min-width: 60px;
  height: 28px;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  background: #eff6ff;
  color: #1565c0;
  font-weight: 700;
  cursor: pointer;
}

.standard-list-page-actions button:disabled {
  border-color: #d8e0ea;
  background: #f4f6f8;
  color: #a0a9b5;
  cursor: default;
}

.production-main-table td.production-main-size-matrix-cell {
  height: 52px;
  min-height: 52px;
  padding: 0;
  vertical-align: middle;
  background: #ffffff;
}

.production-main-size-qty,
.production-main-size-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 3px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.production-main-size-qty {
  color: #0f172a;
  font-weight: 700;
}

.production-main-size-note {
  color: #ef0000;
  font-weight: 700;
  outline: none;
  cursor: text;
}

.production-main-size-note:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.production-main-table td.production-main-formula,
.production-main-table th.production-main-formula {
  background: #f8fafc;
}

.production-main-table td.production-main-progress-remark,
.production-main-table th.production-main-progress-remark {
  background: #fff200;
  color: #ef0000;
  font-weight: 700;
}

.production-main-table td.production-main-solution,
.production-main-table th.production-main-solution {
  color: #ef0000;
  font-weight: 750;
}

/* 2026-06-27 production compact progress grid */
.production-main-table th,
.production-main-table td {
  height: 32px;
  min-height: 32px;
  padding: 2px 3px;
  line-height: 1.15;
}

.production-main-table th {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 36px;
  min-height: 36px;
  padding: 2px 3px;
  vertical-align: middle;
  background: #f4e7ad !important;
  color: var(--production-main-header-text-color, #000000) !important;
  font-family: var(--production-main-header-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-header-font-size, 12px);
  font-weight: var(--production-main-header-font-weight, 800);
}

.production-main-head-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  height: 28px;
  max-height: 28px;
  line-height: 1.05;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--production-main-header-text-color, #000000) !important;
  font-family: var(--production-main-header-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-header-font-size, 12px);
  font-weight: var(--production-main-header-font-weight, 800);
}

.production-main-filter-input {
  height: 100%;
  margin-top: 0;
  padding: 0 3px;
}

.production-main-progress-pair-cell,
.production-main-total-length-cell,
.production-main-table td.production-main-size-matrix-cell {
  height: 50px;
  min-height: 50px;
  padding: 0 !important;
  vertical-align: middle;
}

.production-main-progress-pair-line,
.production-main-total-length-qty,
.production-main-total-length-note,
.production-main-size-qty,
.production-main-size-note {
  min-height: 24px;
  padding: 0 2px;
  line-height: 1.1;
}

.production-main-progress-pair-line,
.production-main-total-length-note {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef0000;
  font-family: var(--production-main-cell-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-cell-font-size, 12px);
  font-weight: var(--production-main-cell-font-weight, 400);
  outline: none;
  cursor: text;
  overflow-wrap: anywhere;
}

.production-main-progress-pair-qty,
.production-main-total-length-note,
.production-main-size-note {
  border-top: 1px solid #d3dce8;
}

.production-main-progress-pair-line:focus,
.production-main-total-length-note:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.production-main-total-length-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-family: var(--production-main-cell-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-cell-font-size, 12px);
  font-weight: var(--production-main-cell-font-weight, 400);
  overflow-wrap: anywhere;
}

.production-main-table td.production-main-formula {
  font-weight: 500;
}

.production-main-table th.production-main-formula,
.production-main-table th.production-main-progress-remark,
.production-main-table th.production-main-solution {
  background: #f4e7ad !important;
  color: var(--production-main-header-text-color, #000000) !important;
  font-weight: var(--production-main-header-font-weight, 800);
}

.production-main-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 20px;
  padding: 0 4px;
  border: 1px solid #9ed7b8;
  background: #e8fff2;
  color: #06723e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.production-main-status-badge.is-warning {
  border-color: #f2c17d;
  background: #fff7e8;
  color: #a34f00;
}

.production-main-table th.production-main-status-column,
.production-main-table td.production-main-status-column,
.production-main-table td.production-main-status-cell {
  white-space: nowrap;
}

.production-main-action-cell .production-main-action {
  min-height: 24px;
  padding: 0 5px;
}

/* 2026-06-27 production main dense editable grid polish */
.production-main-table tbody td {
  color: var(--production-main-cell-text-color, #001b3a);
  font-family: var(--production-main-cell-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-cell-font-size, 12px);
  font-weight: var(--production-main-cell-font-weight, 400);
}

.production-main-table tbody tr:nth-child(odd):not(.production-main-detail-row) > td {
  background: #ffffff !important;
}

.production-main-table tbody tr:nth-child(odd):not(.production-main-detail-row) {
  background: #ffffff;
}

.production-main-table tbody tr:nth-child(even):not(.production-main-detail-row) > td {
  background: #e9eef5 !important;
}

.production-main-table tbody tr:nth-child(even):not(.production-main-detail-row) {
  background: #e9eef5;
}

.production-main-table tbody td.production-main-row-index {
  color: #0f172a;
  font-weight: 600;
}

.production-main-table tbody td.production-main-bed-no {
  color: #005fe8;
  font-weight: 400;
}

.production-main-table tbody td.production-main-progress-remark {
  color: #ef0000;
  font-weight: 400;
}

.production-main-table tbody td.production-main-solution {
  color: #ef0000;
  font-weight: 400;
}

.production-main-table tbody td.production-main-size-matrix-cell,
.production-main-table tbody td.production-main-progress-pair-cell,
.production-main-table tbody td.production-main-total-length-cell,
.production-main-table tbody td.production-main-formula {
  background: transparent !important;
}

.production-main-size-qty,
.production-main-size-note,
.production-main-progress-pair-line,
.production-main-total-length-qty,
.production-main-total-length-note {
  font-family: var(--production-main-cell-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-cell-font-size, 12px);
  font-weight: var(--production-main-cell-font-weight, 400);
}

.production-main-progress-pair-date {
  color: #7c3aed;
}

.production-main-progress-pair-qty {
  color: #ef0000;
}

.production-main-wash-factory-input {
  color: inherit;
  font-family: var(--production-main-cell-font-family, "Microsoft YaHei", sans-serif);
  font-size: var(--production-main-cell-font-size, 12px);
  font-weight: var(--production-main-cell-font-weight, 400);
}

.production-main-table td.strong {
  font-weight: 500;
}

.production-main-table tbody td.production-main-total,
.production-main-table tbody td.production-main-formula,
.production-main-table tbody td.production-main-total-length-cell .production-main-total-length-qty {
  font-weight: 700;
}

.production-main-table th,
.production-main-table th *:not(input) {
  color: var(--production-main-header-text-color, #000000) !important;
}

/* 2026-07-07 production progress sticky header lock */
#migrationView.production-main-list-mode .production-main-table-wrap {
  position: relative;
  scroll-padding-top: 38px;
  isolation: isolate;
}

#migrationView.production-main-list-mode .production-main-table thead th {
  position: sticky !important;
  top: 0;
  z-index: 30;
  background: #f4e7ad !important;
  background-clip: padding-box;
  color: #000000 !important;
  box-shadow: 0 1px 0 #c8b56d, 0 2px 4px rgba(15, 23, 42, 0.12);
}

#migrationView.production-main-list-mode .production-main-table thead th.production-main-formula,
#migrationView.production-main-list-mode .production-main-table thead th.production-main-progress-remark,
#migrationView.production-main-list-mode .production-main-table thead th.production-main-solution {
  background: #f4e7ad !important;
  color: #000000 !important;
}

#migrationView.production-main-list-mode .production-main-table thead th .production-main-head-label,
#migrationView.production-main-list-mode .production-main-table thead th .production-main-filter-input,
#migrationView.production-main-list-mode .production-main-table thead th .production-main-filter-input::placeholder {
  color: #000000 !important;
}

#migrationView.production-main-list-mode .production-main-table thead th .production-main-filter-shell {
  background: #ffffff;
}

.production-main-status-cell {
  text-align: center;
}

.standard-list-record-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #1f2937;
  font-weight: 400;
  white-space: nowrap;
}

.standard-list-record-status-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.standard-list-record-status.is-terminal {
  color: #c5221f;
}

.standard-list-record-status.is-terminal .standard-list-record-status-dot {
  background: #dc2626;
}

.production-main-table td.production-main-column-selected {
  background: transparent !important;
  box-shadow: none;
}

.production-main-table td.production-main-cell-selected {
  background: transparent !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.55);
}

#migrationView.production-main-list-mode .production-main-table thead th.production-main-column-selected .production-main-head-label {
  border-color: #7aa2ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
}

.production-main-table tbody [data-production-main-cell]:focus,
.production-main-table tbody .production-main-progress-pair-line:focus,
.production-main-table tbody .production-main-total-length-note:focus,
.production-main-table tbody .production-main-size-note:focus {
  background: transparent !important;
}

/* 2026-07-10 production progress stable Excel-style resize */
#migrationView.production-main-list-mode .production-main-table {
  table-layout: fixed;
  border-collapse: collapse;
}

#migrationView.production-main-list-mode .production-main-table th,
#migrationView.production-main-list-mode .production-main-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

#migrationView.production-main-list-mode .production-main-table thead th > .generic-column-resize-handle,
#migrationView.production-main-list-mode .production-main-table thead th > .generic-row-resize-handle {
  display: none !important;
}

#migrationView.production-main-list-mode .production-main-table thead th > .ledger-column-resize-handle {
  right: -5px;
  width: 10px;
  z-index: 40;
}

#migrationView.production-main-list-mode .production-main-progress-pair-cell,
#migrationView.production-main-list-mode .production-main-total-length-cell,
#migrationView.production-main-list-mode .production-main-size-matrix-cell {
  height: 50px;
  min-height: 50px;
  max-height: 50px;
}

#migrationView.production-main-list-mode .production-main-progress-pair-line,
#migrationView.production-main-list-mode .production-main-total-length-qty,
#migrationView.production-main-list-mode .production-main-total-length-note,
#migrationView.production-main-list-mode .production-main-size-qty,
#migrationView.production-main-list-mode .production-main-size-note {
  min-width: 0;
  max-width: 100%;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* 2026-07-01 purchase list production-style toolbar/filter shell */
html:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar {
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 4px;
  align-items: center;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar-copy {
  min-width: 0;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar-title-row {
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .topbar-field.topbar-fixed-title {
  min-height: 30px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-inline-form) .main,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-receipt"]) .main,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-return"]) .main,
body:has(.toolbar[data-active-source-view="sales"][data-active-business-mode="add"]) .main {
  padding-top: calc(6px + var(--business-tabs-height));
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-inline-form) .topbar,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-receipt"]) .topbar,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-return"]) .topbar,
body:has(.toolbar[data-active-source-view="sales"][data-active-business-mode="add"]) .topbar {
  gap: 8px;
  margin-bottom: 6px;
  align-items: center;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-inline-form) .topbar-title-row,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-receipt"]) .topbar-title-row,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-return"]) .topbar-title-row,
body:has(.toolbar[data-active-source-view="sales"][data-active-business-mode="add"]) .topbar-title-row {
  min-height: 30px;
  align-items: center;
  gap: 8px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-inline-form) .topbar-field.topbar-fixed-title,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-receipt"]) .topbar-field.topbar-fixed-title,
body:has(.toolbar[data-active-source-view="supplierPurchase"][data-active-business-mode="add"][data-active-business-id="purchase-return"]) .topbar-field.topbar-fixed-title,
body:has(.toolbar[data-active-source-view="sales"][data-active-business-mode="add"]) .topbar-field.topbar-fixed-title {
  min-height: 30px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-inline-form) .supplier-purchase-board {
  padding: 10px 18px 14px;
}

body:has(.toolbar[data-active-source-view="sales"][data-active-business-mode="add"]) .sales-panel {
  padding: 10px 18px 14px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .summary-grid {
  display: none !important;
}

/* Sales bill lists use the same compact list shell as purchase bill lists. */
body:has(#salesView:not(.hidden) .sales-list-surface) {
  overflow-y: hidden;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .topbar {
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 4px;
  align-items: center;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .topbar-copy {
  min-width: 0;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .topbar-title-row,
body:has(#salesView:not(.hidden) .sales-list-surface) .topbar-field.topbar-fixed-title {
  min-height: 30px;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .topbar-title-row {
  align-items: center;
  gap: 8px;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .summary-grid {
  display: none !important;
}

body:has(#salesView:not(.hidden) .sales-list-surface) #salesView,
body:has(#salesView:not(.hidden) .sales-list-surface) .sales-panel,
body:has(#salesView:not(.hidden) .sales-list-surface) .sales-board,
body:has(#salesView:not(.hidden) .sales-list-surface) .sales-list-surface {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#salesView:not(.hidden) .sales-list-surface) .sales-panel,
body:has(#salesView:not(.hidden) .sales-list-surface) .sales-board {
  padding: 0;
}

.sales-topbar-stat {
  width: 132px;
  min-width: 100px;
  height: 45px;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) #supplierPurchaseView,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .supplier-purchase-panel,
body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .supplier-purchase-board {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .supplier-purchase-panel {
  padding: 0;
}

body:has(#supplierPurchaseView:not(.hidden) .supplier-purchase-list-only-workspace) .supplier-purchase-board {
  padding: 0;
}

.supplier-purchase-topbar-stat {
  width: 132px;
  min-width: 100px;
  height: 45px;
}

.supplier-purchase-list-only-workspace {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto;
  padding: 0 0 6px;
  overflow: hidden;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-scaffold {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.supplier-purchase-list-toolbar-card {
  flex: 0 0 auto;
  border: 1px solid #d3dce8;
  border-bottom: 0;
  background: #ffffff;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-list-tools {
  min-height: 32px;
  max-height: 32px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-list-search,
.supplier-purchase-list-toolbar-card .supplier-purchase-list-tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-list-search {
  flex: 1 1 auto;
  overflow: hidden;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-list-tool-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-list-tools label {
  flex: 0 0 auto;
  gap: 4px;
  margin: 0;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-search-wide {
  flex: 1 1 260px;
  min-width: 180px;
  max-width: 360px;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-search-input {
  height: 26px;
  padding: 0 6px;
}

.supplier-purchase-list-toolbar-card label:not(.supplier-purchase-search-wide) .supplier-purchase-search-input {
  width: 142px;
  min-width: 142px;
}

.supplier-purchase-list-toolbar-card .supplier-purchase-apply-search,
.supplier-purchase-list-toolbar-card .supplier-purchase-clear-search,
.supplier-purchase-list-toolbar-card .supplier-purchase-list-batch-btn {
  min-height: 26px;
  height: 26px;
  padding: 0 11px;
  line-height: 24px;
}

.supplier-purchase-list-result-count {
  min-width: 62px;
  color: #475569;
  font-size: 12px;
}

.supplier-purchase-list-table td.supplier-purchase-col-status {
  text-align: center;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table-wrap {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-gutter: auto;
  border-color: #c2cfdd;
  background: #ffffff;
  box-shadow: none;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table th {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 36px;
  min-height: 36px;
  padding: 2px 3px;
  vertical-align: middle;
  background: #f4e7ad !important;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table th.supplier-purchase-col-action {
  background: #f4e7ad !important;
}

.supplier-purchase-list-only-workspace .supplier-purchase-filter-shell {
  height: 28px;
  border-color: #c9d38e;
  background: #fbf7e7;
}

.supplier-purchase-list-only-workspace .supplier-purchase-filter-shell.is-active {
  background: #ffffff;
}

.supplier-purchase-list-only-workspace .supplier-purchase-filter-input,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table th .supplier-purchase-filter-input {
  color: #000000;
  font-weight: 800;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row > td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:nth-child(even) > td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:hover > td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row.is-expanded > td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:hover > td.supplier-purchase-col-action,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row.is-expanded > td.supplier-purchase-col-action,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row-voided > td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row-reversed > td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row-force_modified > td {
  background: #ffffff !important;
}

.supplier-purchase-filter-popup {
  width: min(292px, calc(100vw - 16px));
}

/* 2026-07-02 purchase list expanded detail auto-height */
.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-list-detail-row > td {
  background: #f5f8fb !important;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-panel {
  gap: 6px;
  padding: 4px 8px 6px;
  overflow: visible;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-panel .business-detail-section {
  padding: 6px 8px;
  border-top: 0;
  background: #ffffff;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-section-lines {
  padding: 0 8px 4px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-lines-wrap {
  max-height: none;
  overflow: visible;
  border-color: #b8cfe6;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-lines-table {
  width: 100%;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-lines-table thead th {
  position: static;
  top: auto;
  z-index: auto;
  height: 32px;
  min-height: 32px;
  background: #dbeafe !important;
  border-color: #b8cfe6;
  color: #0c365e;
  font-size: 12px;
  font-weight: 800;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-lines-table tbody td,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-lines-table tfoot td {
  background: #ffffff !important;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-total-row td {
  background: #eef4fb !important;
  border-top: 1px solid #9fb7d1;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-attachment-section {
  padding: 4px 8px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-attachment-section .supplier-purchase-detail-section-title {
  margin-bottom: 4px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-fee-section {
  padding: 4px 8px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-remark-section {
  padding: 4px 8px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-fee-layout {
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 34px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-remark-layout {
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 34px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-fee-label {
  min-height: 34px;
  padding: 0 6px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-remark-label {
  min-height: 34px;
  padding: 0 6px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-fee-summary {
  display: flex;
  flex-wrap: nowrap;
  min-height: 34px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-fee-item {
  min-height: 34px;
  padding: 0 8px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-remark-text {
  min-height: 34px;
  padding: 8px 10px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-image-list {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  padding-top: 0;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-attachment-list {
  gap: 3px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-attachment-empty {
  min-height: 18px;
  padding: 0 2px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: #64748b;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-attachment-row {
  min-height: 34px;
  padding: 3px 6px;
}

.supplier-purchase-attachment-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.supplier-purchase-attachment-main > a,
.supplier-purchase-attachment-main > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-purchase-attachment-thumb {
  flex: 0 0 auto;
  width: 42px;
  height: 30px;
  border: 1px solid #c8d7e8;
  background: #ffffff;
  overflow: hidden;
}

.supplier-purchase-attachment-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table .supplier-purchase-detail-footer-actions {
  min-height: 30px;
  padding: 2px 0 0;
  align-items: center;
}

/* 2026-07-04 purchase list global DataGrid baseline */
.supplier-purchase-list-only-workspace .supplier-purchase-list-scaffold {
  width: 100%;
  overflow: hidden;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table-wrap {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: auto;
  border: 1px solid #c2cfdd;
  box-shadow: none;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table {
  width: var(--supplier-purchase-list-table-width, max-content);
  min-width: var(--supplier-purchase-list-table-width, max-content);
  max-width: none;
  table-layout: fixed;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table th,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table td {
  padding: 3px 4px;
  line-height: 1.18;
  vertical-align: middle;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table th {
  height: 36px;
  min-height: 36px;
  padding: 2px 3px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td {
  height: 34px;
  min-height: 34px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-filter-shell {
  height: 28px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #c9d38e;
}

.supplier-purchase-list-only-workspace .supplier-purchase-filter-input,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table th .supplier-purchase-filter-input {
  height: 100%;
  padding: 0 17px 0 4px;
  line-height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-purchase-list-only-workspace .supplier-purchase-filter-clear {
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  border-radius: 50%;
  line-height: 1;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-actions {
  gap: 4px;
  justify-content: center;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-billType {
  white-space: nowrap;
}

.supplier-purchase-list-only-workspace .supplier-purchase-bill-type-detail-button {
  flex: 0 0 auto;
  min-width: max-content;
  max-width: none;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-action-delete-only {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: max-content;
  gap: 0;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-action-delete-only .supplier-purchase-list-action-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 2026-07-22 purchase list outer quick actions */
.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-actions {
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-action-btn.danger {
  margin-left: 0;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-action-unposted {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: max-content;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-action-unposted .supplier-purchase-list-action-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table td.supplier-purchase-col-action .supplier-purchase-list-action-slots {
  display: grid;
  grid-template-columns: minmax(38px, 1fr) minmax(34px, 1fr);
  align-items: center;
  column-gap: 6px;
  justify-content: stretch;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-action-slot {
  display: flex;
  align-items: center;
  min-width: 0;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-action-slot-left {
  justify-content: flex-start;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-action-slot-right {
  justify-content: flex-end;
}

.supplier-purchase-list-only-workspace .supplier-purchase-type-detail-btn,
.supplier-purchase-list-only-workspace .supplier-purchase-list-action-btn {
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  line-height: 1;
}

/* 2026-07-09 purchase list narrowed columns clip like remark cells */
.supplier-purchase-list-only-workspace .supplier-purchase-list-table thead th .ledger-head-label,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row > td:not(.supplier-purchase-col-action) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row > td:not(.supplier-purchase-col-action) > * {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* 2026-06-25 global PC top whitespace compact baseline */
@media (min-width: 769px) {
  body:not(.mobile-dispatch-surface) .main {
    padding-top: calc(8px + var(--business-tabs-height));
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 18px;
  }

  body:not(.mobile-dispatch-surface) .topbar {
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
  }

  body:not(.mobile-dispatch-surface) .topbar:has(.purchase-main-action-btn),
  body:not(.mobile-dispatch-surface) .topbar:has(.cost-main-action-btn),
  body:not(.mobile-dispatch-surface) .topbar:has(.production-main-action-btn),
  body:not(.mobile-dispatch-surface) .topbar:has(.transfer-main-action-btn) {
    gap: 8px;
    margin-bottom: 6px;
  }

  body:not(.mobile-dispatch-surface) .topbar-copy {
    gap: 4px;
  }

  body:not(.mobile-dispatch-surface) .topbar-title-row {
    gap: 8px;
    min-height: 30px;
    align-items: center;
  }

  body:not(.mobile-dispatch-surface) .topbar-title {
    line-height: 1.1;
  }

  body:not(.mobile-dispatch-surface) .summary-grid,
  body:not(.mobile-dispatch-surface) .permission-summary-grid,
  body:not(.mobile-dispatch-surface) .piecework-summary-grid {
    gap: 6px;
    margin-bottom: 6px;
  }

  body:not(.mobile-dispatch-surface) .summary-item,
  body:not(.mobile-dispatch-surface) .permission-summary-grid > *,
  body:not(.mobile-dispatch-surface) .piecework-summary-grid > * {
    min-height: 40px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

.sku-doubt-queue-panel {
  padding: 0;
  border: 1px solid #d6e0ec;
  background: #ffffff;
}

.sku-doubt-queue-wrap {
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.sku-doubt-queue-table {
  min-width: 980px;
}

.sku-doubt-queue-table th,
.sku-doubt-queue-table td {
  height: 34px;
  padding: 4px 8px;
  vertical-align: middle;
}

.sku-doubt-reason-cell {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.sku-doubt-action-btn {
  min-height: 26px;
  padding: 0 10px;
  line-height: 24px;
}

.sku-doubt-focus {
  animation: sku-doubt-focus-flash 1.6s ease-out 1;
}

@keyframes sku-doubt-focus-flash {
  0%,
  60% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .45), inset 0 0 0 2px rgba(245, 158, 11, .5);
  }

  100% {
    box-shadow: none;
  }
}

/* 2026-07-07 cross-module business-list sticky header baseline */
:where(
  .table-wrap,
  .ledger-view .table-wrap,
  .migration-table-wrap,
  .supplier-purchase-list-table-wrap,
  .permission-employee-table-wrap,
  .permission-operation-log-table-wrap,
  .jst-task-table-wrap,
  .piecework-table-wrap,
  .transfer-document-table-wrap,
  .production-craft-table-wrap,
  .supplier-doc-table-wrap,
  .purchase-product-import-table-wrap,
  .purchase-audit-table-wrap,
  .purchase-operator-table-wrap,
  .archive-inline-table-wrap,
  .master-product-variant-table-wrap,
  .master-product-label-care-list-table-wrap,
  .master-product-set-preview-table-wrap,
  .cost-accounting-scroll,
  .cost-accounting-search-scroll
) {
  position: relative;
  scroll-padding-top: 38px;
}

:where(
  .ledger-table,
  .migration-table,
  .supplier-purchase-list-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .piecework-table,
  .transfer-document-table,
  .production-main-table,
  .production-craft-list-table,
  .supplier-doc-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .archive-inline-table,
  .master-product-variant-table,
  .master-product-label-care-list-table,
  .master-product-set-preview-table,
  .cost-accounting-table,
  .business-clickable-table
) > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 24;
  background: #f4e7ad !important;
  background-clip: padding-box;
  color: #000000 !important;
  box-shadow: 0 1px 0 #c8b56d, 0 2px 4px rgba(15, 23, 42, 0.12);
}

:where(
  .ledger-table,
  .migration-table,
  .supplier-purchase-list-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .piecework-table,
  .transfer-document-table,
  .production-main-table,
  .production-craft-list-table,
  .supplier-doc-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .archive-inline-table,
  .master-product-variant-table,
  .master-product-label-care-list-table,
  .master-product-set-preview-table,
  .cost-accounting-table,
  .business-clickable-table
) > thead > tr > th :where(.ledger-head-label, .production-main-head-label, .migration-head-label, .supplier-purchase-head-label) {
  color: #000000 !important;
}

:where(.ledger-filter-input, .migration-filter-input, .supplier-purchase-filter-input, .production-main-filter-input) {
  color: #000000 !important;
}

:where(.ledger-filter-input, .migration-filter-input, .supplier-purchase-filter-input, .production-main-filter-input)::placeholder {
  color: #000000 !important;
  opacity: 1;
}

:where(.migration-filter-shell, .supplier-purchase-filter-shell, .production-main-filter-shell) {
  background: #ffffff;
}

/* 2026-07-09 ordinary business lists clip narrowed columns instead of wrapping */
:is(
  .ledger-table,
  .migration-table,
  .business-clickable-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .supplier-purchase-list-table,
  .production-main-table,
  .piecework-table,
  .piecework-small-table,
  .piecework-review-table,
  .transfer-structured-table,
  .transfer-document-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .archive-inline-table,
  .master-product-label-care-list-table,
  .cost-accounting-compact-table,
  .cost-accounting-search-table,
  .cost-accounting-result-table,
  .cost-accounting-product-table,
  .cost-accounting-jst-export-table,
  .cost-accounting-group-diff-table,
  .cost-accounting-size-rule-table
) > tbody > tr:not(.supplier-purchase-list-detail-row):not(.production-main-detail-row) > td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

:is(
  .ledger-table,
  .migration-table,
  .business-clickable-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .supplier-purchase-list-table,
  .production-main-table,
  .piecework-table,
  .piecework-small-table,
  .piecework-review-table,
  .transfer-structured-table,
  .transfer-document-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .archive-inline-table,
  .master-product-label-care-list-table,
  .cost-accounting-compact-table,
  .cost-accounting-search-table,
  .cost-accounting-result-table,
  .cost-accounting-product-table,
  .cost-accounting-jst-export-table,
  .cost-accounting-group-diff-table,
  .cost-accounting-size-rule-table
) > tbody > tr:not(.supplier-purchase-list-detail-row):not(.production-main-detail-row) > td > :where(a, span, strong, em, small, mark, button, div) {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

:is(
  .ledger-table,
  .migration-table,
  .business-clickable-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .supplier-purchase-list-table,
  .production-main-table,
  .piecework-table,
  .piecework-small-table,
  .piecework-review-table,
  .transfer-structured-table,
  .transfer-document-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .archive-inline-table,
  .master-product-label-care-list-table,
  .cost-accounting-search-table,
  .cost-accounting-result-table,
  .cost-accounting-product-table,
  .cost-accounting-jst-export-table,
  .cost-accounting-group-diff-table,
  .cost-accounting-size-rule-table
) > thead > tr > th > :where(.ledger-head-label, .production-main-head-label, .migration-head-label, .supplier-purchase-head-label) {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* 2026-07-09 stable Excel-style independent widths for ordinary business lists */
:where(
  .business-clickable-list,
  .permission-employee-table-wrap,
  .permission-operation-log-table-wrap,
  .jst-task-table-wrap,
  .piecework-table-wrap,
  .production-craft-table-wrap,
  .transfer-document-table-wrap,
  .purchase-product-import-table-wrap,
  .purchase-audit-table-wrap,
  .purchase-operator-table-wrap,
  .master-product-label-care-list-table-wrap,
  .cost-accounting-scroll,
  .cost-accounting-search-scroll
) {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}

:where(
  .business-clickable-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .piecework-table,
  .piecework-small-table,
  .piecework-review-table,
  .production-craft-list-table,
  .transfer-document-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .master-product-label-care-list-table,
  .cost-accounting-compact-table,
  .cost-accounting-search-table,
  .cost-accounting-result-table,
  .cost-accounting-product-table,
  .cost-accounting-jst-export-table,
  .cost-accounting-group-diff-table,
  .cost-accounting-size-rule-table
).generic-editable-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

:where(
  .business-clickable-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .piecework-table,
  .piecework-small-table,
  .piecework-review-table,
  .production-craft-list-table,
  .transfer-document-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .master-product-label-care-list-table,
  .cost-accounting-compact-table,
  .cost-accounting-search-table,
  .cost-accounting-result-table,
  .cost-accounting-product-table,
  .cost-accounting-jst-export-table,
  .cost-accounting-group-diff-table,
  .cost-accounting-size-rule-table
).generic-editable-table > thead > tr > th,
:where(
  .business-clickable-table,
  .permission-employee-table,
  .permission-operation-log-table,
  .jst-task-table,
  .piecework-table,
  .piecework-small-table,
  .piecework-review-table,
  .production-craft-list-table,
  .transfer-document-table,
  .purchase-product-import-table,
  .purchase-audit-table,
  .purchase-operator-table,
  .master-product-label-care-list-table,
  .cost-accounting-compact-table,
  .cost-accounting-search-table,
  .cost-accounting-result-table,
  .cost-accounting-product-table,
  .cost-accounting-jst-export-table,
  .cost-accounting-group-diff-table,
  .cost-accounting-size-rule-table
).generic-editable-table > tbody > tr > td {
  min-width: 0;
  max-width: none;
}

.production-craft-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
}

.production-craft-list-table.generic-editable-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.generic-editable-table[data-generic-resize-only="1"] .generic-column-resize-handle {
  right: -5px;
  width: 11px;
  z-index: 36;
}

/* standard-list-page-v4 keeps resize hit targets inside clipped header/body cells */
.standard-list-data-grid.generic-editable-table[data-generic-resize-only="1"] thead th > .generic-column-resize-handle {
  right: 0;
  width: 10px;
  z-index: 36;
  pointer-events: auto;
  touch-action: none;
}

.standard-list-data-grid.generic-editable-table[data-generic-resize-only="1"] tr > :first-child > .generic-row-resize-handle {
  bottom: 0;
  height: 6px;
  z-index: 36;
  pointer-events: auto;
  touch-action: none;
}

/* 2026-07-11 purchase list left utility columns: compact shell with resizable sequence column */
.supplier-purchase-list-table col.supplier-purchase-col-select {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
}

.supplier-purchase-list-table th.supplier-purchase-col-select,
.supplier-purchase-list-table td.supplier-purchase-col-select {
  position: sticky !important;
  left: 0 !important;
  border-right: 1px solid #d6dee9 !important;
  box-shadow: none !important;
}

.supplier-purchase-list-table th.supplier-purchase-col-sequence,
.supplier-purchase-list-table td.supplier-purchase-col-sequence {
  position: sticky !important;
  left: var(--supplier-purchase-list-select-width, 32px) !important;
  text-align: center !important;
  border-right: 1px solid #d6dee9 !important;
  box-shadow: none !important;
}

.supplier-purchase-list-table th.supplier-purchase-col-select > .generic-column-resize-handle {
  display: none !important;
}

.supplier-purchase-list-table th.supplier-purchase-col-billNo,
.supplier-purchase-list-table td.supplier-purchase-col-billNo {
  border-left: 0 !important;
  padding-left: 4px;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row > td.supplier-purchase-col-select,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:nth-child(even) > td.supplier-purchase-col-select,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row > td.supplier-purchase-col-sequence,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:nth-child(even) > td.supplier-purchase-col-sequence {
  background: #f6f8fb !important;
}

.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:hover > td.supplier-purchase-col-select,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row:hover > td.supplier-purchase-col-sequence,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row.is-expanded > td.supplier-purchase-col-select,
.supplier-purchase-list-only-workspace .supplier-purchase-list-table tbody tr.supplier-purchase-list-row.is-expanded > td.supplier-purchase-col-sequence {
  background: #edf5ff !important;
}

/* 2026-07-14 inventory query: inherit the purchase-list viewport and inner-scroll contract. */
html:has(#transferView:not(.hidden) .inventory-query-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .topbar {
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 4px;
  align-items: center;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .topbar-copy {
  min-width: 0;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .topbar-title-row,
body:has(#transferView:not(.hidden) .inventory-query-workspace) .topbar-field.topbar-fixed-title {
  min-height: 30px;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .topbar-title-row {
  align-items: center;
  gap: 8px;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .summary-grid {
  display: none !important;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) #transferView,
body:has(#transferView:not(.hidden) .inventory-query-workspace) .transfer-panel,
body:has(#transferView:not(.hidden) .inventory-query-workspace) .transfer-list {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#transferView:not(.hidden) .inventory-query-workspace) .transfer-panel,
body:has(#transferView:not(.hidden) .inventory-query-workspace) .transfer-list {
  padding: 0;
}

/* 2026-07-14 inventory query: use the purchase-list toolbar and read-only grid contract. */
.inventory-query-workspace.supplier-purchase-list-only-workspace {
  gap: 0;
}

.inventory-query-toolbar-card {
  flex: 0 0 auto;
}

.inventory-query-workspace .inventory-query-list-scaffold {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.inventory-query-workspace .inventory-query-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  border-top: 0;
}

.inventory-query-table {
  width: var(--inventory-query-table-width);
  /* The generic column resizer owns the live inline width/min-width values. */
  min-width: 0;
  max-width: none;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.inventory-query-table th,
.inventory-query-table td {
  position: relative;
  height: 31px;
  padding: 3px 4px;
  border: 1px solid var(--line-soft);
  color: #102033;
  font-size: var(--ledger-font-size);
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-query-table th {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 36px;
  padding: 3px 4px;
  background: #f4e7ad;
  font-size: 12px;
  font-weight: 900;
}

.inventory-query-filter-shell {
  width: 100%;
  min-width: 0;
}

.inventory-query-filter-input {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.inventory-query-table th.inventory-query-col-select,
.inventory-query-table td.inventory-query-col-select {
  position: sticky;
  left: 0;
  z-index: 5;
  width: var(--inventory-query-select-width);
  min-width: var(--inventory-query-select-width);
  max-width: var(--inventory-query-select-width);
  padding: 0 !important;
  border-right: 1px solid #d6dee9;
  background: #f6f8fb;
  text-align: center !important;
}

.inventory-query-table th.inventory-query-col-sequence,
.inventory-query-table td.inventory-query-col-sequence {
  position: sticky;
  left: 0;
  z-index: 4;
  border-right: 1px solid #d6dee9;
  background: #f6f8fb;
  color: #526274;
  font-weight: 700;
  text-align: center !important;
}

.inventory-query-table th.inventory-query-col-select,
.inventory-query-table th.inventory-query-col-sequence {
  z-index: 11;
  background: #f4e7ad;
}

.inventory-query-table th.inventory-query-col-select > .generic-column-resize-handle {
  display: none;
}

.inventory-query-table tbody tr.inventory-query-parent-row:hover > td {
  background: #f8fbff;
}

.inventory-query-table tbody tr.inventory-query-parent-row:hover > td.inventory-query-col-select,
.inventory-query-table tbody tr.inventory-query-parent-row:hover > td.inventory-query-col-sequence,
.inventory-query-table tbody tr.inventory-query-parent-row.is-expanded > td.inventory-query-col-select,
.inventory-query-table tbody tr.inventory-query-parent-row.is-expanded > td.inventory-query-col-sequence {
  background: #edf5ff;
}

.inventory-query-table .supplier-purchase-col-action {
  white-space: nowrap;
}

.inventory-query-image-thumb {
  width: 46px;
  height: 26px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  cursor: zoom-in;
}

.inventory-query-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-query-detail-button,
.inventory-query-warehouse-count-button,
.inventory-query-detail-table button,
.inventory-query-state-row button {
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid #8eb2da;
  border-radius: 2px;
  background: #fff;
  color: #075fbd;
  font-weight: 800;
  cursor: pointer;
}

.inventory-query-warehouse-count-button {
  min-width: 28px;
  color: #075fbd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inventory-query-state-row,
.inventory-query-loading-row td,
.inventory-query-limit-row td {
  padding: 14px 8px !important;
  color: #64748b !important;
  text-align: center !important;
}

.inventory-query-state-row.is-error {
  color: #b42318 !important;
}

.inventory-query-source-label {
  color: #526274;
  font-size: 12px;
  font-weight: 700;
}

.inventory-query-candidate-menu {
  position: fixed;
  z-index: 12160;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #b9c9da;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
}

.inventory-query-candidate-menu button {
  display: block;
  width: 100%;
  min-height: 27px;
  padding: 5px 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #17233d;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.inventory-query-candidate-menu button:hover,
.inventory-query-candidate-menu button:focus-visible {
  background: #edf5ff;
  outline: 0;
}

.inventory-query-detail-modal.hidden {
  display: none;
}

.inventory-query-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  padding: 18px;
}

/* A source document opens above the inventory dialog.  Its shield is inert:
   only the explicit close button or Escape dismisses the topmost dialog. */
#inventoryQuerySourceDocumentModal .inventory-query-source-document-layer {
  z-index: 10120;
}

#inventoryQuerySourceDocumentModal .standard-record-detail-dialog.inventory-query-source-document-dialog {
  width: min(1280px, calc(100vw - 36px));
  height: min(86vh, 900px);
}

.inventory-query-source-document-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.inventory-query-source-document-body .inventory-query-detail-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.inventory-query-source-document-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  color: #64748b;
  font-size: 12px;
}

.inventory-query-source-document-foot > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-query-source-document-native {
  min-height: 0;
  overflow: auto;
}

.inventory-query-source-document-native .supplier-purchase-detail-panel,
.inventory-query-source-document-native .sales-readonly-surface,
.inventory-query-source-document-native .cut-order-runtime-host {
  min-width: min-content;
}

.inventory-query-size-matrix-notice {
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid #f2c8a6;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.45;
}

/* Standard list rule: Query/Search follows the full-text search box on the
   same flex item; date controls remain outside that pair. */
.standard-list-query-group {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  min-width: 0;
  gap: var(--standard-list-filter-field-gap, 8px);
}

.standard-list-query-group > label {
  flex: 1 1 auto;
  min-width: 0;
}

.standard-list-query-group > label input[type="search"] {
  min-width: 0;
  width: 100%;
}

.standard-list-query-group > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.inventory-query-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 36, .48);
}

.inventory-query-detail-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1540px, 80vw);
  height: min(900px, 82dvh);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #b7c7d8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 28px 84px rgba(15, 23, 42, .35);
}

.inventory-query-detail-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 12px;
  border-bottom: 1px solid #dce5ee;
  background: #f7f9fc;
}

.inventory-query-detail-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.inventory-query-detail-head > div > div { min-width: 0; }

.inventory-query-detail-head strong {
  color: #0f172a;
  font-size: 16px;
}

.inventory-query-detail-head span {
  color: #64748b;
  font-size: 12px;
}

.inventory-query-detail-head span[hidden] { display: none; }

.inventory-query-detail-head > button {
  width: 27px;
  height: 27px;
  border: 0;
  background: transparent;
  color: #526274;
  font-size: 21px;
  cursor: pointer;
}

.inventory-query-detail-back-button {
  width: auto;
  min-height: 25px;
  padding: 2px 6px;
  border: 1px solid #c5d5e8;
  background: #fff;
  color: #075fbd;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.inventory-query-detail-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 2px 10px 0;
  border-bottom: 1px solid #dce5ee;
  background: #fff;
}

.inventory-query-detail-tabs button {
  padding: 4px 11px;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: #526274;
  font-weight: 800;
  cursor: pointer;
}

.inventory-query-detail-tabs button.is-active {
  border-color: #b9cbe0;
  background: #edf5ff;
  color: #075fbd;
}

.inventory-query-detail-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 6px 10px;
  background: #f8fafc;
}

.inventory-query-detail-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inventory-query-detail-content > .inventory-query-detail-table-wrap,
.inventory-query-detail-content > .inventory-query-size-matrix-wrap {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.inventory-query-detail-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 100%;
  overflow: auto;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.inventory-query-detail-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.inventory-query-detail-table th,
.inventory-query-detail-table td {
  box-sizing: border-box;
  min-width: 0;
  max-width: none;
  padding: 3px 6px;
  border: 1px solid #dbe3ec;
  color: #17233d;
  font-size: 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.inventory-query-detail-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4e7ad;
  font-weight: 900;
  line-height: 1.2;
}

.inventory-query-detail-total-row,
.inventory-query-detail-total-row td {
  background: #edf3fa;
  color: #0f2f54;
  font-weight: 900;
}

.inventory-query-distribution-reconciliation {
  flex: 0 0 auto;
  margin: 0 0 6px;
  padding: 5px 8px;
  border: 1px solid #f0c99f;
  background: #fff8ef;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.35;
}

.inventory-query-source-bill-button {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid #8fb5dd;
  background: #fff;
  color: #075fbd;
  font: inherit;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.inventory-query-detail-table td:last-child > button {
  box-sizing: border-box;
  max-width: calc(50% - 2px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.inventory-query-source-bill-button:hover,
.inventory-query-source-bill-button:focus-visible {
  border-color: #075fbd;
  background: #edf5ff;
  outline: none;
}

.inventory-query-source-type.is-red {
  color: #c3261e;
  font-weight: 800;
}

.inventory-query-fine-code-wrap {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
}

.inventory-query-fine-code-matrix {
  width: max-content;
  min-width: 0;
  table-layout: fixed;
}

.inventory-query-fine-code-matrix th,
.inventory-query-fine-code-matrix td {
  min-width: 0;
  max-width: none;
  height: 31px;
  padding: 2px 3px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.inventory-query-fine-code-matrix th {
  height: 25px;
  padding: 2px 3px;
}

.inventory-query-fine-code-source,
.inventory-query-fine-code-change {
  display: grid;
  height: 100%;
  justify-items: center;
  align-content: center;
  min-width: 0;
  gap: 2px;
  overflow: hidden;
  white-space: nowrap;
}

.inventory-query-fine-code-source > *,
.inventory-query-fine-code-change > * {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-query-fine-code-matrix .inventory-query-source-bill-button {
  min-height: 20px;
  padding: 2px 4px;
}

.inventory-query-fine-code-piece {
  position: relative;
  display: grid;
  box-sizing: border-box;
  justify-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  gap: 1px;
  padding: 2px 1px;
  overflow: hidden;
  border: 1px solid #b8cde3;
  border-radius: 3px;
  background: #fff;
}

.inventory-query-fine-code-piece strong {
  color: #0f172a;
  font-size: 12px;
  line-height: 1;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.inventory-query-fine-code-piece span:last-child {
  color: #51647a;
  font-size: 9px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.inventory-query-fine-code-split {
  position: absolute;
  top: 2px;
  left: 2px;
  color: #d52a1f;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.inventory-query-detail-state {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 180px;
  color: #64748b;
}

.inventory-query-detail-state.is-error {
  color: #b42318;
}

.inventory-query-detail-foot {
  flex: 0 0 auto;
  min-height: 42px;
  box-sizing: border-box;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-top: 1px solid #dce5ee;
  background: #f7f9fc;
  color: #64748b;
  font-size: 12px;
}

.inventory-query-detail-foot > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Inventory rows use the standard resizable-list contract, while retaining
   their inventory-specific filter source and compact matrix presentation. */
.inventory-query-standard-list {
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.inventory-query-standard-list th,
.inventory-query-standard-list td {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.inventory-query-filter-label {
  display: block;
  min-width: 0;
  padding: 0 2px 2px;
  overflow: hidden;
  color: #102033;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-query-table th:has(.inventory-query-filter-label),
.inventory-query-detail-table th:has(.inventory-query-filter-label) {
  height: 43px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.inventory-query-table th:has(.inventory-query-filter-label) .inventory-query-filter-shell,
.inventory-query-detail-table th:has(.inventory-query-filter-label) .inventory-query-filter-shell {
  height: 24px;
  min-height: 24px;
}

.inventory-query-detail-toolbar {
  flex: 0 0 auto;
  margin-bottom: 8px;
  padding: 5px 7px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

@media (max-width: 760px) {
  .inventory-query-detail-dialog {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    max-width: none;
    max-height: none;
  }
}

.inventory-query-size-matrix-wrap {
  flex: 0 1 auto;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.inventory-query-size-matrix {
  min-width: max-content;
}

.inventory-query-size-matrix tbody .inventory-query-size-matrix-warehouse {
  position: static;
  z-index: auto;
  background: #fff;
}

.inventory-query-size-matrix tbody .inventory-query-size-matrix-row-total {
  font-weight: 900;
}

.inventory-query-size-matrix tfoot .inventory-query-size-matrix-grand-total > th,
.inventory-query-size-matrix tfoot .inventory-query-size-matrix-grand-total > td {
  position: static;
  z-index: auto;
  background: #dcecff;
  color: #17233d;
  font-weight: 900;
}

/* PRODUCT MASTER EDIT r406: fixed-size editor with always-open sets and inline style-color size detail. */
.master-product-edit-modal .master-product-edit-command-row {
  min-height: 28px;
  padding: 3px 8px 1px;
}

.master-product-edit-modal .master-product-edit-layout {
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 8px;
  padding: 4px 8px 6px;
}

.master-product-edit-modal .master-product-edit-fields {
  gap: 7px;
}

.master-product-edit-modal .master-product-edit-grid {
  gap: 8px;
  padding: 0;
}

.master-product-edit-modal .master-product-edit-grid-row-one {
  grid-template-columns: 1.05fr 1.55fr 0.9fr 0.9fr 0.68fr;
}

.master-product-edit-modal .master-product-edit-grid-row-two {
  grid-template-columns: 0.9fr 0.9fr 0.64fr 0.75fr 0.75fr;
}

.master-product-edit-modal .master-product-media-quick {
  gap: 5px;
}

.master-product-edit-modal .master-product-media-slots {
  gap: 6px;
}

.master-product-edit-modal .master-product-title-rows {
  padding: 0 8px 6px;
}

.master-product-edit-modal .master-product-set-section {
  gap: 7px;
  padding: 0 8px 8px;
}

.master-product-edit-modal .master-product-set-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding-top: 0;
  overflow: visible;
  scrollbar-gutter: auto;
}

.master-product-edit-modal .master-product-set-editor {
  min-width: 0;
  max-width: none;
  width: auto !important;
  flex: none;
}

.master-product-edit-modal .master-product-set-head {
  min-height: 26px;
  padding: 3px 7px;
}

.master-product-edit-modal .master-product-set-body {
  gap: 5px;
  padding: 5px 6px 6px;
}

.master-product-edit-modal .master-product-set-add-row {
  grid-template-columns: minmax(0, 1fr) 52px;
}

.master-product-edit-modal .master-product-variant-detail {
  min-width: 0;
  border: 1px solid #cbd5e1;
  background: #fbfdff;
}

.master-product-edit-modal .master-product-variant-detail-head {
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  border-bottom: 1px solid #d8e2ee;
  background: #eef6fb;
}

.master-product-edit-modal .master-product-variant-detail-head strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.master-product-edit-modal .master-product-variant-detail-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.master-product-edit-modal .master-product-variant-detail-list {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.master-product-edit-modal .master-product-variant-detail-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(0, 2.25fr);
  gap: 6px;
  align-items: stretch;
}

.master-product-edit-modal .master-product-variant-detail-id,
.master-product-edit-modal .master-product-variant-detail-size {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6dee8;
  background: #ffffff;
  color: #0f172a;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 900;
}

.master-product-edit-modal .master-product-variant-detail-id {
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-product-edit-modal .master-product-variant-detail-sizes {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 5px;
}

.master-product-edit-modal .master-product-variant-detail-size {
  color: #64748b;
  font-weight: 800;
}

.master-product-edit-modal .master-product-variant-detail-size.is-active {
  border-color: #9bbced;
  background: #eff6ff;
  color: #1d4ed8;
}

.master-product-edit-modal .master-product-variant-detail-empty {
  min-height: 28px;
  display: flex;
  align-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .master-product-edit-modal .master-product-edit-layout {
    grid-template-columns: 1fr;
  }

  .master-product-edit-modal .master-product-media-quick {
    max-width: 340px;
  }

  .master-product-edit-modal .master-product-set-board {
    grid-template-columns: 1fr;
  }
}

/* PRODUCT MASTER EDIT r418: shared five-column field grid, stable two-row media zone, and resizable finished-product variants. */
.master-product-edit-modal .master-product-edit-layout {
  grid-template-columns: minmax(0, 1fr) 314px;
}

.master-product-edit-modal .master-product-edit-fields {
  --master-product-edit-base-columns: minmax(112px, 0.98fr) minmax(96px, 0.84fr) minmax(92px, 0.8fr) minmax(78px, 0.64fr) minmax(190px, 1.74fr);
}

.master-product-edit-modal .master-product-edit-grid-row-one,
.master-product-edit-modal .master-product-edit-grid-row-two {
  grid-template-columns: var(--master-product-edit-base-columns);
}

.master-product-edit-modal .master-product-media-quick {
  min-height: 118px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 88px 24px;
  gap: 6px;
}

.master-product-edit-modal .master-product-media-slots {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.master-product-edit-modal .master-product-media-slot,
.master-product-edit-modal .master-product-media-entry.is-compact {
  height: 88px;
  aspect-ratio: 1 / 1;
}

.master-product-edit-modal .master-product-media-manager-open,
.master-product-edit-modal .master-product-media-manager-link {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1.2;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.master-product-edit-modal .master-product-media-manager-link {
  border: 1px solid #d8e2ee;
  background: #f8fbff;
  color: #0f6ecd;
  font-weight: 800;
}

.master-product-edit-modal .master-product-media-manager-link small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.master-product-edit-modal .master-product-set-size-keys,
.master-product-secondary-workspace .master-product-set-size-keys {
  min-height: 24px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.master-product-edit-modal .master-product-set-size-keys b,
.master-product-secondary-workspace .master-product-set-size-keys b {
  font: inherit;
}

.master-product-edit-modal .master-product-set-size-gap,
.master-product-secondary-workspace .master-product-set-size-gap {
  flex: 0 0 auto;
  white-space: pre;
}

.master-product-edit-modal .master-product-variant-detail-list {
  display: block;
  overflow: auto;
  max-width: 100%;
  padding: 0;
  scrollbar-gutter: stable both-edges;
}

.master-product-edit-modal .master-product-variant-detail-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.master-product-edit-modal .master-product-variant-detail-table th,
.master-product-edit-modal .master-product-variant-detail-table td {
  height: 29px;
  box-sizing: border-box;
  border-right: 1px solid #d8e2ee;
  border-bottom: 1px solid #d8e2ee;
  padding: 4px 8px;
  vertical-align: middle;
  font-size: 12px;
}

.master-product-edit-modal .master-product-variant-detail-table th {
  position: relative;
  min-width: 68px;
  background: #fff3bf;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
  text-align: center;
}

.master-product-edit-modal .master-product-variant-detail-table .generic-row-resize-handle {
  display: none;
  pointer-events: none;
}

.master-product-edit-modal .master-product-variant-detail-table th:first-child,
.master-product-edit-modal .master-product-variant-detail-table td:first-child {
  min-width: 170px;
}

.master-product-edit-modal .master-product-variant-detail-table th:nth-child(2),
.master-product-edit-modal .master-product-variant-detail-table td:nth-child(2) {
  min-width: 126px;
}

.master-product-edit-modal .master-product-variant-detail-table th:nth-child(3),
.master-product-edit-modal .master-product-variant-detail-table td:nth-child(3) {
  min-width: 82px;
}

.master-product-edit-modal .master-product-variant-detail-table td {
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.master-product-edit-modal .master-product-variant-detail-table td.master-product-variant-detail-id,
.master-product-edit-modal .master-product-variant-detail-table td.master-product-variant-detail-fabric {
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.master-product-edit-modal .master-product-variant-detail-table td.master-product-variant-detail-id {
  color: #0f172a;
  font-weight: 900;
}

.master-product-edit-modal .master-product-variant-detail-table td.master-product-variant-detail-cost {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.master-product-edit-modal .master-product-variant-detail-table td.master-product-variant-detail-size {
  min-width: 68px;
  color: #94a3b8;
}

.master-product-edit-modal .master-product-variant-detail-table td.master-product-variant-detail-size.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.master-product-edit-modal .master-product-variant-detail-sku {
  min-width: 94px;
  color: #64748b !important;
}

.master-product-edit-modal .master-product-variant-detail-status {
  min-width: 76px;
}

.master-product-edit-modal .master-product-variant-detail-status > span {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
}

.master-product-edit-modal .master-product-variant-detail-status > .is-on {
  background: #e8f7ee;
  color: #16803e;
}

.master-product-edit-modal .master-product-variant-detail-status > .is-off {
  background: #f1f5f9;
  color: #64748b;
}

.master-product-edit-modal .master-product-variant-detail-table .master-product-variant-detail-empty {
  min-width: 0;
  justify-content: center;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 900px) {
  .master-product-edit-modal .master-product-media-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 96px;
  }

  .master-product-edit-modal .master-product-media-slots {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-product-edit-modal .master-product-media-slot,
  .master-product-edit-modal .master-product-media-entry.is-compact {
    height: auto;
  }

  .master-product-edit-modal .master-product-media-manager-open {
    grid-column: 1 / -1;
    grid-row: auto;
    height: auto;
    min-height: 27px;
    writing-mode: horizontal-tb;
  }
}

/* Final cascade for the administrator's right-side feedback review panel. */
.employee-feedback-admin-detail-pane {
  background: #f4f8fc;
}

.employee-feedback-admin-detail-pane > .employee-feedback-admin-record {
  gap: 12px;
  padding: 14px;
  background: #f4f8fc;
}

.employee-feedback-admin-record > .employee-feedback-admin-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b9d3eb;
  border-left: 4px solid #176fae;
  background: linear-gradient(135deg, #fafdff 0%, #edf6ff 100%);
}

.employee-feedback-admin-record > .employee-feedback-admin-detail-hero > div {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.employee-feedback-admin-record .employee-feedback-admin-detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.employee-feedback-admin-record > .employee-feedback-admin-detail-hero h3 {
  color: #123b62;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.employee-feedback-admin-record > .employee-feedback-admin-detail-hero time {
  margin-top: 2px;
  color: #5d778e;
  font-variant-numeric: tabular-nums;
}

.employee-feedback-admin-record > .employee-feedback-admin-detail-section,
.employee-feedback-admin-record > .employee-feedback-workflow,
.employee-feedback-admin-record > .employee-feedback-workflow-action,
.employee-feedback-admin-record > .employee-feedback-admin-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cad9e8;
  background: #ffffff;
}

.employee-feedback-admin-record > .employee-feedback-admin-detail-section > header {
  display: flex;
  align-items: center;
  min-height: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #deebf5;
  color: #214e76;
  font-size: 13px;
  font-weight: 800;
}

.employee-feedback-admin-record .employee-feedback-admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.employee-feedback-admin-record .employee-feedback-admin-meta-grid > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid #e0eaf3;
  background: #f8fbfe;
}

.employee-feedback-admin-record .employee-feedback-admin-meta-grid small {
  color: #6a8196;
  font-size: 11px;
}

.employee-feedback-admin-record .employee-feedback-admin-meta-grid b {
  overflow-wrap: anywhere;
  color: #29445e;
  font-size: 12px;
  line-height: 1.5;
}

.employee-feedback-admin-record .employee-feedback-admin-content-section .employee-feedback-record-body {
  min-height: 54px;
  padding: 1px 1px 0;
  color: #25425f;
  font-size: 13px;
  line-height: 1.75;
}

.employee-feedback-admin-record > .employee-feedback-resolution {
  gap: 6px;
  border-left: 3px solid #4b88ba;
  background: #f6fbff;
}

.employee-feedback-admin-record > .employee-feedback-resolution strong {
  color: #24537c;
}

.employee-feedback-admin-record .employee-feedback-admin-attachments .employee-feedback-images {
  display: grid;
  gap: 9px;
}

.employee-feedback-admin-record .employee-feedback-admin-attachments .employee-feedback-images > strong {
  color: #214e76;
  font-size: 13px;
}

.employee-feedback-admin-record .employee-feedback-admin-attachments .employee-feedback-images > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-feedback-admin-record > .employee-feedback-workflow {
  border-left: 3px solid #2e7eaf;
  background: #f8fcff;
}

.employee-feedback-admin-record > .employee-feedback-workflow > strong {
  padding-bottom: 7px;
  border-bottom: 1px solid #dceaf5;
  color: #214e76;
  font-size: 13px;
  font-weight: 800;
}

.employee-feedback-admin-record > .employee-feedback-workflow p {
  color: #61788d;
}

.employee-feedback-admin-record > .employee-feedback-workflow ol {
  gap: 9px;
}

.employee-feedback-admin-record > .employee-feedback-workflow li {
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #d8e6f1;
  border-bottom: 1px solid #d8e6f1;
  background: #ffffff;
}

.employee-feedback-admin-record > .employee-feedback-workflow li header {
  color: #28567e;
}

.employee-feedback-admin-record > .employee-feedback-workflow li time {
  color: #658097;
  font-variant-numeric: tabular-nums;
}

.employee-feedback-admin-record > .employee-feedback-workflow-action {
  border-left: 3px solid #1f76b5;
  background: #f4faff;
}

.employee-feedback-admin-record > .employee-feedback-workflow-action > label {
  display: grid;
  gap: 8px;
}

.employee-feedback-admin-record > .employee-feedback-workflow-action > label > strong {
  color: #214e76;
  font-size: 13px;
  font-weight: 800;
}

.employee-feedback-admin-record > .employee-feedback-admin-actions {
  gap: 10px;
  border-color: #bcd4e8;
  border-top: 3px solid #2b76ad;
  background: #f8fbfe;
}

.employee-feedback-admin-record .employee-feedback-admin-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.employee-feedback-admin-record .employee-feedback-admin-action-header > div {
  display: grid;
  gap: 3px;
  color: #214e76;
  font-size: 13px;
  font-weight: 800;
}

.employee-feedback-admin-record .employee-feedback-admin-action-header strong {
  font-size: 14px;
}

.employee-feedback-admin-record .employee-feedback-admin-action-header span {
  color: #6b8296;
  font-size: 11px;
  font-weight: 400;
}

.employee-feedback-admin-record .employee-feedback-admin-followup {
  grid-template-columns: minmax(126px, .38fr) minmax(0, 1fr);
  gap: 9px;
}

.employee-feedback-admin-record .employee-feedback-admin-followup > button {
  grid-column: 1 / -1;
  justify-self: end;
}

.employee-feedback-admin-record .employee-feedback-admin-followup textarea {
  min-height: 72px;
}

.employee-feedback-admin-record .employee-feedback-admin-reason {
  grid-template-columns: 1fr;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px solid #dce8f1;
}

.employee-feedback-admin-record .employee-feedback-admin-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 2px;
}

.employee-feedback-admin-record .employee-feedback-admin-action-notice {
  display: grid !important;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e4d7ba;
  background: #fffdf7;
  color: #705a2e;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 520px) {
  .employee-feedback-admin-record > .employee-feedback-admin-detail-hero {
    display: grid;
  }

  .employee-feedback-admin-record .employee-feedback-admin-meta-grid,
  .employee-feedback-admin-record .employee-feedback-admin-followup {
    grid-template-columns: 1fr;
  }

  .employee-feedback-admin-record .employee-feedback-admin-followup > button {
    grid-column: auto;
    width: 100%;
  }
}
/* r537: active ordinary-list filters show only the prominent selected value and clear action. */
.list-filter-header-active {
  background: #e7f2ff !important;
  box-shadow: none !important;
}

:where(.production-main-filter-shell, .supplier-purchase-filter-shell, .migration-filter-shell, .global-list-filter-shell).is-active {
  position: relative;
  border-color: #a8c9ec !important;
  background: #e7f2ff !important;
  box-shadow: none !important;
}

.list-filter-header-active > :where(.ledger-head-label, .production-main-head-label, .migration-head-label, .supplier-purchase-head-label) {
  visibility: hidden !important;
}

.list-header-filter-active-summary {
  position: absolute;
  inset: 0 20px 0 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 4px 0 6px;
  color: #075fbd;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  pointer-events: auto;
}

.list-header-filter-active-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.production-main-filter-shell, .supplier-purchase-filter-shell, .migration-filter-shell, .global-list-filter-shell).is-active:not(:focus-within) > :where(input, .inventory-query-header-filter-main) {
  color: transparent !important;
  caret-color: transparent;
}

:where(.production-main-filter-shell, .supplier-purchase-filter-shell, .migration-filter-shell, .global-list-filter-shell).is-active:not(:focus-within) > input {
  opacity: 0 !important;
}

:where(.production-main-filter-shell, .supplier-purchase-filter-shell, .migration-filter-shell, .global-list-filter-shell).is-active:focus-within .list-header-filter-active-summary {
  visibility: hidden;
}

:where(.production-main-filter-shell, .supplier-purchase-filter-shell, .migration-filter-shell, .global-list-filter-shell).is-active:focus-within > input {
  color: #000000 !important;
  caret-color: auto;
  opacity: 1 !important;
}

.global-list-filter-shell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 26px;
  border: 1px solid #cad4df;
  box-sizing: border-box;
  background: #ffffff;
}

.global-list-filter-shell > :where(.ledger-filter-input, .archive-inline-filter) {
  width: 100%;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-sizing: border-box;
}

.list-header-filter-clear {
  position: absolute;
  top: 50%;
  right: 2px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #075fbd;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

[data-standard-list-header-filter-shell] {
  position: relative;
}

[data-standard-list-header-filter-shell] > [data-standard-list-header-filter-clear] {
  display: none !important;
}

[data-standard-list-header-filter-shell].is-active > [data-standard-list-header-filter-clear],
[data-standard-list-header-filter-shell].has-value > [data-standard-list-header-filter-clear] {
  display: inline-flex !important;
}

.production-main-filter-clear,
.supplier-purchase-filter-clear,
.migration-filter-clear {
  z-index: 4;
}

:where(.production-main-filter-shell, .supplier-purchase-filter-shell, .migration-filter-shell).is-active > :where(.production-main-filter-clear, .supplier-purchase-filter-clear, .migration-filter-clear) {
  top: 50% !important;
  right: 2px !important;
  width: 16px !important;
  min-width: 16px !important;
  height: 18px !important;
  min-height: 18px !important;
  transform: translateY(-50%);
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #075fbd !important;
  font-size: 14px !important;
  font-weight: 900;
}

.archive-inline-filter-row .global-list-filter-shell {
  height: 22px;
}

/* 裁床单：独立懒加载业务模块 */
.cut-order-runtime-host {
  min-width: 0;
  color: #17233d;
}

.cut-order-page {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  background: #f5f8fc;
}

.cut-order-page-head,
.cut-order-section-title,
.cut-order-form-footer,
.cut-order-head-actions,
.cut-order-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cut-order-page-head {
  padding: 13px 15px;
  border: 1px solid #c9d8ea;
  background: #fff;
}

.cut-order-page-head h2,
.cut-order-section-title h3 {
  margin: 0;
  color: #102b55;
}

.cut-order-page-head p,
.cut-order-section-title span,
.cut-order-bom-card p,
.cut-order-list-footer,
.cut-order-empty span {
  margin: 4px 0 0;
  color: #60728c;
  font-size: 12px;
}

.cut-order-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cut-order-filterbar {
  display: grid;
  grid-template-columns: 150px 150px 150px minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 9px 11px;
  border: 1px solid #d4deeb;
  background: #fff;
}

.cut-order-filterbar label,
.cut-order-form-grid label,
.cut-order-bom-card label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #40536f;
  font-size: 12px;
  font-weight: 700;
}

.cut-order-filterbar input,
.cut-order-filterbar select,
.cut-order-form-grid input,
.cut-order-form-grid textarea,
.cut-order-bom-card input,
.cut-order-detail-table input,
.cut-order-detail-table select,
.cut-order-size-grid input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #b8c9df;
  border-radius: 3px;
  background: #fff;
  color: #12233f;
  font: inherit;
}

.cut-order-filterbar input,
.cut-order-filterbar select,
.cut-order-form-grid input,
.cut-order-bom-card input {
  height: 31px;
  padding: 4px 7px;
}

.cut-order-form-grid textarea {
  padding: 7px;
  resize: vertical;
}

.cut-order-table-scroll {
  min-width: 0;
  overflow: auto;
  border: 1px solid #cbd7e5;
  background: #fff;
}

.cut-order-detail-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

.cut-order-detail-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 34px;
  padding: 4px 6px;
  border-right: 1px solid #cdbf72;
  border-bottom: 1px solid #cdbf72;
  background: #fff3b6;
  color: #28344b;
  white-space: nowrap;
}

.cut-order-detail-table td {
  height: 35px;
  padding: 3px 6px;
  border-right: 1px solid #d9e2ed;
  border-bottom: 1px solid #d9e2ed;
  background: #fff;
  text-align: center;
  white-space: nowrap;
}

.cut-order-detail-table input,
.cut-order-detail-table select {
  height: 27px;
  padding: 2px 5px;
  border-color: #cad7e7;
}

.cut-order-detail-table input:disabled,
.cut-order-detail-table select:disabled,
.cut-order-form-grid input:disabled,
.cut-order-form-grid textarea:disabled,
.cut-order-size-grid input:disabled,
.cut-order-bom-card input:disabled {
  opacity: 1;
  background: #f2f5f9;
  color: #44536a;
}

.cut-order-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 23px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a5700;
  font-size: 12px;
  font-weight: 800;
}

.cut-order-status.is-ok { background: #ddf7e8; color: #08723a; }
.cut-order-status.is-info { background: #e2efff; color: #075fbd; }
.cut-order-status.is-danger { background: #ffe4e4; color: #b42318; }
.cut-order-status.is-warn { background: #fff3cd; color: #8a5700; }

.cut-order-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d0dceb;
  background: #fff;
}

.cut-order-section-title {
  margin-bottom: 9px;
}

.cut-order-section-title > div {
  min-width: 0;
}

.cut-order-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.cut-order-form-grid.is-one {
  grid-template-columns: minmax(0, 1fr);
}

.cut-order-size-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(70px, 1fr)) minmax(90px, 1.1fr);
  gap: 7px;
}

.cut-order-size-grid label,
.cut-order-total-card {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid #c9d8e9;
  background: #f8fbff;
  text-align: center;
}

.cut-order-size-grid input {
  height: 34px;
  padding: 4px;
  text-align: center;
  font-weight: 800;
}

.cut-order-total-card {
  align-content: center;
  background: #e8f2ff;
  color: #075fbd;
}

.cut-order-total-card strong {
  font-size: 20px;
}

.cut-order-summary-strip {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #c7d8ec;
  background: #f4f9ff;
  font-size: 12px;
}

.cut-order-summary-strip span {
  padding-right: 14px;
}

.cut-order-bom-card {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  padding: 10px;
  border: 1px dashed #9fb8d7;
  background: #f8fbff;
}

.cut-order-bom-card p {
  align-self: center;
}

.cut-order-bom-table {
  min-width: 1120px;
}

.cut-order-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cut-order-timeline span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #cbd8e7;
  background: #fff;
  color: #556984;
  font-size: 12px;
}

.cut-order-timeline b {
  color: #15365f;
}

.cut-order-form-footer {
  position: sticky;
  bottom: 0;
  z-index: 6;
  padding: 10px 13px;
  border: 1px solid #b8c9df;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -4px 12px rgba(25, 59, 99, .08);
}

.cut-order-form-footer > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cut-order-form-error,
.cut-order-error {
  padding: 9px 11px;
  background: #fff0f0;
  color: #b42318;
  font-weight: 700;
}

.cut-order-empty {
  display: grid;
  place-content: center;
  min-height: 220px;
  text-align: center;
}

.cut-order-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 2px;
}

.cut-order-list-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cut-order-grid-wide {
  grid-column: span 2;
}

.cut-order-output-list,
.cut-order-output-card {
  display: grid;
  gap: 9px;
}

.cut-order-output-card {
  padding: 10px;
  border: 1px solid #c7d6e8;
  background: #fbfdff;
}

.cut-order-output-meta {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(110px, .6fr) minmax(150px, .8fr) auto;
  gap: 10px;
  align-items: end;
  color: #526983;
  font-size: 12px;
}

.cut-order-output-meta label,
.cut-order-source-fields label,
.cut-order-fee-fields label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #40536f;
  font-size: 11px;
  font-weight: 700;
}

.cut-order-output-meta select,
.cut-order-source-fields input,
.cut-order-source-fields select,
.cut-order-fee-fields input {
  width: 100%;
  min-width: 0;
  height: 28px;
  box-sizing: border-box;
  padding: 2px 5px;
  border: 1px solid #b8c9df;
  border-radius: 3px;
  background: #fff;
  color: #12233f;
}

.cut-order-size-grid label.is-size-disabled {
  opacity: .45;
}

.cut-order-style-col {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cut-order-actual-table {
  min-width: 2260px;
}

.cut-order-actual-table td {
  height: 44px;
  vertical-align: middle;
  white-space: nowrap;
}

.cut-order-actual-table td.is-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cut-order-formal-unit {
  display: inline-flex;
  min-width: 36px;
  justify-content: center;
  color: #1d4f7b;
  font-weight: 600;
}

.cut-order-unmatched-reference {
  display: block;
  margin-top: 2px;
  color: #c63c4d;
  font-size: 11px;
  line-height: 1.25;
}

.cut-order-origin {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
}

.cut-order-origin.is-bom {
  background: #e5f2ff;
  color: #075fbd;
}

.cut-order-origin.is-extra {
  background: #fff0d3;
  color: #8a5700;
}

.cut-order-sources-cell {
  padding: 6px !important;
}

.cut-order-sources {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  text-align: left;
}

.cut-order-source-card {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  width: max-content;
  min-height: 32px;
  padding: 3px 5px;
  border: 1px solid #b9cbe0;
  border-radius: 4px;
  background: #f8fbff;
}

.cut-order-source-head,
.cut-order-source-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cut-order-source-head span,
.cut-order-source-card small {
  color: #60728c;
  font-size: 10px;
  white-space: nowrap;
}

.cut-order-source-head .danger-link {
  padding: 0 3px;
}

.cut-order-source-fields {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
}

.cut-order-source-fields label {
  display: flex;
  flex: 0 0 auto;
  grid-template-columns: none;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.cut-order-source-fields input,
.cut-order-source-fields select {
  width: 68px;
  height: 25px;
}

.cut-order-source-fields label:first-child select {
  width: 210px;
}

.cut-order-source-fields [data-source-field="warehouseCode"] {
  width: 82px;
}

.cut-order-source-fields [data-source-field="sourceKind"] {
  width: 82px;
}

.cut-order-source-fields [data-source-field="sourceUnit"] {
  width: 54px;
}

.cut-order-source-fields [data-source-field="unitPrice"],
.cut-order-source-fields [data-source-derived="amount"] {
  width: 76px;
}

.cut-order-source-actions {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cut-order-source-actions button {
  min-height: 25px;
  padding: 2px 7px;
  font-size: 11px;
}

.cut-order-fee-fields {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.cut-order-fee-fields label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.cut-order-fee-fields input {
  width: 76px;
  height: 25px;
}

@media (max-width: 1080px) {
  .cut-order-filterbar { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .cut-order-filterbar .is-wide { grid-column: 1 / -1; }
  .cut-order-form-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .cut-order-size-grid { grid-template-columns: repeat(4, minmax(70px, 1fr)); }
  .cut-order-output-meta { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 680px) {
  .cut-order-page { padding: 7px; }
  .cut-order-page-head,
  .cut-order-section-title,
  .cut-order-form-footer,
  .cut-order-list-footer { align-items: stretch; flex-direction: column; }
  .cut-order-head-actions { justify-content: flex-start; }
  .cut-order-filterbar,
  .cut-order-form-grid,
  .cut-order-size-grid,
  .cut-order-bom-card { grid-template-columns: minmax(0, 1fr); }
  .cut-order-filterbar .is-wide { grid-column: auto; }
  .cut-order-output-meta,
  .cut-order-fee-fields { grid-template-columns: minmax(0, 1fr); }
  .cut-order-grid-wide { grid-column: auto; }
}

/* 裁床单详情：同 BOM 多款规色的紧凑单屏工作面 */
body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 7px;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .topbar,
body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .summary-grid {
  display: none !important;
}

body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) #costAccountingView,
body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cost-accounting-board,
body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cut-order-runtime-host {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cost-accounting-board {
  padding: 0;
}

.cut-order-form-workspace {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
  gap: 7px;
  padding: 7px;
  overflow: hidden;
}

.cut-order-form-workspace button {
  box-sizing: border-box;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid #aebfd4;
  border-radius: 3px;
  background: #ffffff;
  color: #17345d;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.cut-order-form-workspace button:hover:not(:disabled) {
  border-color: #2878bb;
  background: #eef7ff;
}

.cut-order-form-workspace button.primary-button {
  border-color: #0868ad;
  background: #0877c9;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(8, 86, 145, .18);
}

.cut-order-form-workspace button.primary-button:hover:not(:disabled) {
  border-color: #075b99;
  background: #0868ad;
}

.cut-order-form-workspace button.danger-button {
  border-color: #d85b5b;
  background: #fff5f5;
  color: #b42318;
}

.cut-order-form-workspace button.danger-link {
  min-height: 24px;
  padding: 1px 5px;
  border-color: transparent;
  background: transparent;
  color: #c22b25;
  box-shadow: none;
}

.cut-order-form-workspace button:disabled {
  opacity: .46;
  cursor: not-allowed;
}

.cut-order-form-workspace .cut-order-page-head {
  min-height: 40px;
  padding: 5px 8px;
}

.cut-order-page-identity,
.cut-order-section-heading,
.cut-order-cost-summary,
.cut-order-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cut-order-page-identity h2 {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-back-button {
  min-width: 66px;
}

.cut-order-head-fact {
  color: #65758a;
  font-size: 12px;
}

.cut-order-form-workspace .cut-order-section {
  padding: 7px 8px;
}

.cut-order-form-workspace .cut-order-section-title {
  min-height: 28px;
  margin-bottom: 5px;
}

.cut-order-form-workspace .cut-order-section-title h3 {
  font-size: 15px;
  line-height: 1.2;
}

.cut-order-section-heading {
  flex-wrap: wrap;
}

.cut-order-section-heading > span {
  margin: 0;
  padding-left: 8px;
  border-left: 1px solid #c9d5e4;
  color: #526883;
  line-height: 18px;
}

.cut-order-section-heading > span strong {
  color: #075fbd;
  font-size: 13px;
}

.cut-order-basic-section {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.cut-order-basic-section .cut-order-section-title {
  align-self: center;
  margin: 0;
}

.cut-order-form-workspace .cut-order-form-grid {
  grid-template-columns: 126px 92px minmax(132px, 1fr) minmax(132px, 1fr) minmax(118px, .9fr) minmax(116px, .85fr) minmax(170px, 1.35fr);
  gap: 6px;
}

.cut-order-form-workspace .cut-order-form-grid label {
  gap: 2px;
  font-size: 11px;
}

.cut-order-form-workspace .cut-order-form-grid input {
  height: 28px;
  padding: 3px 6px;
}

.cut-order-output-matrix-scroll {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #bdcde0;
  background: #ffffff;
}

.cut-order-output-matrix {
  min-width: 1180px;
}

.cut-order-output-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) 96px 132px repeat(7, minmax(62px, .52fr)) 76px 44px;
  gap: 0;
  align-items: stretch;
}

.cut-order-output-grid > * {
  min-width: 0;
  border: 0;
  border-right: 1px solid #d3deea;
  border-radius: 0;
}

.cut-order-output-grid > *:last-child {
  border-right: 0;
}

.cut-order-output-grid.is-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 28px;
  border-bottom: 1px solid #cdbf72;
  background: #fff1aa;
  color: #2d3748;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.cut-order-output-grid.is-head > span {
  display: grid;
  place-items: center;
  padding: 3px 5px;
}

.cut-order-output-grid.is-row {
  min-height: 34px;
  border-bottom: 1px solid #dbe4ee;
  background: #ffffff;
}

.cut-order-output-grid.is-row:last-child {
  border-bottom: 0;
}

.cut-order-output-grid.is-row select,
.cut-order-output-grid.is-row input {
  width: 100%;
  height: 33px;
  box-sizing: border-box;
  padding: 3px 6px;
  background: #ffffff;
  color: #12233f;
  font: inherit;
  text-align: center;
}

.cut-order-output-grid.is-row select {
  text-align: left;
}

.cut-order-output-grid.is-row input:disabled,
.cut-order-output-grid.is-row select:disabled {
  opacity: 1;
  background: #f3f6fa;
  color: #536176;
}

.cut-order-output-grid.is-row input.is-size-disabled {
  background: #eef1f5;
  color: #a3acb9;
}

.cut-order-output-readonly,
.cut-order-output-total,
.cut-order-output-lock {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-output-total {
  background: #e8f2ff;
  color: #075fbd;
  font-size: 15px;
}

.cut-order-output-lock {
  color: #7b8797;
  font-size: 10px;
}

.cut-order-form-workspace .cut-order-row-remove {
  min-height: 33px;
  border-radius: 0;
  font-size: 16px;
}

.cut-order-actual-section {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cut-order-actual-section .cut-order-table-scroll {
  min-height: 0;
  flex: 1 1 auto;
}

.cut-order-form-workspace .cut-order-actual-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.cut-order-form-workspace .cut-order-actual-table th {
  height: 29px;
  padding: 3px 5px;
}

.cut-order-form-workspace .cut-order-actual-table td {
  height: 37px;
  padding: 2px 4px;
}

.cut-order-form-workspace .cut-order-actual-table input,
.cut-order-form-workspace .cut-order-actual-table select {
  height: 25px;
  padding: 2px 4px;
}

.cut-order-project-cell {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  align-items: center;
}

.cut-order-project-cell > strong,
.cut-order-project-cell > span:not(.cut-order-origin) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-project-cell > input {
  min-width: 0;
  width: 58px;
}

.cut-order-project-cell > input[data-row-field="materialModel"],
.cut-order-project-cell > input[data-row-field="feeItem"],
.cut-order-project-cell > input[data-row-field="processorName"] { width: 78px; }

.cut-order-project-cell > input[data-row-field="colorName"] { width: 44px; }

.cut-order-form-workspace .cut-order-sources-cell {
  padding: 2px 4px !important;
}

.cut-order-form-workspace .cut-order-sources {
  width: 100%;
  min-width: 100%;
  gap: 4px;
}

.cut-order-form-workspace .cut-order-source-card {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 27px;
  gap: 3px;
  padding: 1px 3px;
  border: 0;
  border-left: 2px solid #9db8d8;
  border-radius: 0;
  background: #f8fbff;
}

.cut-order-source-index {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 21px;
  border-radius: 2px;
  background: #dcecff;
  color: #075fbd;
  font-size: 10px;
}

.cut-order-form-workspace .cut-order-source-card > input,
.cut-order-form-workspace .cut-order-source-card > select,
.cut-order-form-workspace .cut-order-source-field input {
  width: 52px;
  height: 23px;
  box-sizing: border-box;
  padding: 1px 3px;
  border: 1px solid #bdccde;
  border-radius: 2px;
  background: #ffffff;
  color: #12233f;
  font-size: 11px;
}

.cut-order-form-workspace .cut-order-source-card > .cut-order-source-candidate { width: 172px; }
.cut-order-form-workspace .cut-order-source-card > .cut-order-source-warehouse { width: 94px; }
.cut-order-form-workspace .cut-order-source-card > .cut-order-source-kind { width: 76px; }
.cut-order-form-workspace .cut-order-source-card > .cut-order-source-unit { width: 44px; }

.cut-order-form-workspace .cut-order-source-card > .clearable-control {
  min-width: 0;
  flex: 0 0 auto;
}

.cut-order-form-workspace .cut-order-source-card > .clearable-control:has(> .cut-order-source-candidate) { width: 172px; }
.cut-order-form-workspace .cut-order-source-card > .clearable-control:has(> .cut-order-source-warehouse) { width: 94px; }
.cut-order-form-workspace .cut-order-source-card > .clearable-control:has(> .cut-order-source-kind) { width: 76px; }
.cut-order-form-workspace .cut-order-source-card > .clearable-control:has(> .cut-order-source-unit) { width: 44px; }

.cut-order-form-workspace .cut-order-source-card > .clearable-control > input,
.cut-order-form-workspace .cut-order-source-card > .clearable-control > select {
  width: 100%;
}

.cut-order-source-field {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
}

.cut-order-source-field b {
  color: #526883;
  font-size: 10px;
  font-weight: 800;
}

.cut-order-form-workspace .cut-order-source-field.is-derived input {
  width: 60px;
  background: #eef3f8;
}

.cut-order-form-workspace .cut-order-source-field.is-amount input {
  width: 68px;
}

.cut-order-form-workspace .cut-order-source-remove {
  width: 22px;
  min-width: 22px;
  min-height: 23px;
  padding: 0;
  font-size: 15px;
}

.cut-order-form-workspace .cut-order-source-card > .cut-order-source-candidate {
  flex: 0 0 105px;
  width: 105px;
  height: 23px;
}

.cut-order-source-fact,
.cut-order-source-edit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  min-width: 0;
  color: #243a58;
  font-size: 10px;
  white-space: nowrap;
}

.cut-order-source-fact b,
.cut-order-source-edit b {
  color: #6b7d92;
  font-size: 9px;
}

.cut-order-source-fact {
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cut-order-source-edit input {
  width: 48px !important;
  height: 23px !important;
}

.cut-order-source-edit em {
  color: #60748c;
  font-style: normal;
}

.cut-order-locked {
  color: #7a8799;
  font-size: 10px;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-source-actions {
  gap: 3px;
}

.cut-order-form-workspace .cut-order-source-actions button {
  min-height: 25px;
  padding: 2px 6px;
  font-size: 10px;
}

.cut-order-form-workspace .cut-order-fee-fields {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
}

.cut-order-form-workspace .cut-order-fee-fields span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #526883;
  font-size: 10px;
  font-weight: 800;
}

.cut-order-form-workspace .cut-order-fee-fields input {
  width: 62px;
  height: 23px;
}

.cut-order-form-workspace .cut-order-fee-fields > input[data-row-field="verificationNote"] {
  width: 145px;
}

.cut-order-not-occurred {
  display: inline-flex !important;
  flex: 0 0 auto;
  grid-template-columns: none !important;
  align-items: center;
  gap: 2px !important;
  white-space: nowrap;
}

.cut-order-not-occurred input {
  width: 14px !important;
  height: 14px !important;
}

.cut-order-form-workspace .cut-order-form-footer {
  position: relative;
  bottom: auto;
  display: grid;
  gap: 4px;
  padding: 5px 8px;
}

.cut-order-audit-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #5c6d84;
  font-size: 10px;
  white-space: nowrap;
}

.cut-order-audit-strip > strong {
  color: #15365f;
}

.cut-order-audit-strip > span {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 2px 5px;
  border: 1px solid #d2ddea;
  background: #f8fafc;
}

.cut-order-audit-strip b {
  color: #284766;
}

.cut-order-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cut-order-cost-summary {
  flex-wrap: wrap;
  color: #40536f;
  font-size: 12px;
}

.cut-order-cost-summary strong {
  color: #075fbd;
  font-size: 13px;
}

.cut-order-cost-summary .is-ready {
  color: #08733d;
}

.cut-order-cost-summary .is-pending {
  color: #a45c00;
}

.cut-order-footer-actions {
  justify-content: flex-end;
}

.cut-order-footer-actions .primary-button {
  min-width: 92px;
}

@media (max-width: 1280px) {
  .cut-order-form-workspace {
    grid-template-rows: auto auto auto minmax(170px, 1fr) auto;
  }

  .cut-order-basic-section {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .cut-order-form-workspace .cut-order-form-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .main,
  body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) #costAccountingView,
  body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cost-accounting-panel,
  body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cost-accounting-board,
  body:has(#costAccountingView:not(.hidden) .cut-order-form-workspace) .cut-order-runtime-host {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .cut-order-form-workspace {
    height: auto;
    grid-template-rows: none;
    overflow: visible;
  }

  .cut-order-basic-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .cut-order-form-workspace .cut-order-form-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .cut-order-form-workspace .cut-order-page-head,
  .cut-order-footer-main {
    align-items: stretch;
    flex-direction: column;
  }

  .cut-order-audit-strip {
    overflow-x: auto;
  }
}

/* 2026-07-27 裁床单：列表继承进货单列表，编辑页继承 BOM 明细维护 */
html:has(#costAccountingView:not(.hidden) .cut-order-list-workspace),
body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) {
  height: 100%;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .app-shell,
body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .main {
  display: flex;
  flex-direction: column;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .summary-grid {
  display: none !important;
}

body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) #costAccountingView,
body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .cost-accounting-board,
body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .cut-order-runtime-host {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cut-order-list-workspace) .cost-accounting-board {
  padding: 0;
}

.cut-order-list-workspace {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background: #fff;
}

.cut-order-list-workspace .supplier-purchase-list-scaffold,
.cut-order-list-workspace .supplier-purchase-list-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
}

.cut-order-list-workspace .supplier-purchase-list-table-wrap {
  overflow: auto;
}

.cut-order-list-workspace .supplier-purchase-list-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-list-workspace .supplier-purchase-list-table td.is-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cut-order-list-workspace .cut-order-list-summary,
.cut-order-list-workspace .supplier-purchase-list-remark {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-list-workspace .supplier-purchase-col-action .supplier-purchase-list-actions {
  justify-content: center;
  gap: 4px;
}

.cut-order-form-workspace {
  display: block;
  height: 100%;
  padding: 0;
  background: #f5f8fc;
}

.cut-order-form-workspace > .supplier-purchase-detail-page-workspace {
  height: 100%;
  min-height: 0;
}

.cut-order-form-workspace .supplier-purchase-detail-page-body {
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 5px;
  min-height: 0;
  padding: 7px;
  overflow: hidden;
}

.cut-order-form-workspace .cut-order-section {
  padding: 4px 8px;
}

.cut-order-form-workspace .cost-accounting-section-header {
  min-height: 27px;
  margin-bottom: 5px;
}

.cut-order-form-workspace .cut-order-basic-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px;
}

.cut-order-form-workspace .cut-order-basic-section .cost-accounting-section-header {
  margin: 0;
}

.cut-order-form-workspace .cut-order-section-title h3 {
  font-size: 16px;
  line-height: 20px;
}

.cut-order-form-workspace .cut-order-form-grid {
  display: grid;
  grid-template-columns: 160px 100px 190px 190px 170px 160px;
  gap: 6px 10px;
  align-items: center;
  justify-content: start;
}

.cut-order-form-workspace .cut-order-form-grid .supplier-doc-field {
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}

.cut-order-form-workspace .cut-order-form-grid .supplier-doc-field > span {
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-form-grid input {
  height: 28px;
  min-height: 28px;
  padding: 2px 7px;
  border: 1px solid #b8c9df;
  border-radius: 2px;
  background: #fff;
}

.cut-order-form-workspace .cut-order-form-grid .clearable-control {
  min-width: 0;
}

.cut-order-form-workspace .cut-order-form-grid .cut-order-remark-field {
  grid-column: 1 / -1;
  grid-template-columns: max-content minmax(0, 1fr);
  width: 100%;
  margin-top: 1px;
}

.cut-order-output-shell {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 126px minmax(112px, 132px);
  gap: 4px;
  min-width: 0;
}

.cut-order-form-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cut-order-form-error > span {
  min-width: 0;
}

.cut-order-form-error > button {
  flex: 0 0 auto;
}

.cut-order-output-match-actions {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #b8c9df;
  background: #f8fbff;
}

.cut-order-output-match-actions .secondary-button {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 2px 5px;
  white-space: nowrap;
}

.cut-order-output-match-actions .secondary-button.is-selected {
  border-color: #075fbd;
  background: #dcecff;
  color: #075fbd;
  font-weight: 700;
}

.cut-order-output-summary {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 2px 5px;
  border: 1px solid #b8c9df;
  background: #eef5ff;
  color: #344b68;
  font-size: 12px;
  line-height: 1.25;
}

.cut-order-output-summary > strong {
  display: grid;
  gap: 1px;
  place-items: center;
  color: #102f55;
  font-size: 16px;
  line-height: 1.05;
}

.cut-order-output-summary > strong span {
  overflow: visible;
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.cut-order-output-summary > span,
.cut-order-output-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-output-summary b {
  color: #075fbd;
  font-size: 12px;
}

.cut-order-output-dynamic-cost {
  display: grid;
  align-content: center;
  justify-items: end;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid #b8c9df;
  background: #f8fbff;
  color: #50647e;
  text-align: right;
}

.cut-order-output-dynamic-cost > span {
  font-size: 12px;
  font-weight: 700;
}

.cut-order-output-dynamic-cost > strong {
  color: #075fbd;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.cut-order-output-matrix-scroll {
  max-height: 86px;
  min-width: 0;
  overflow: auto;
}

.cut-order-output-table {
  width: auto;
  min-width: 0;
  max-width: none;
  table-layout: fixed;
}

.cut-order-output-table th,
.cut-order-output-table td {
  height: 25px;
  padding: 1px 3px;
  line-height: 1.05;
  text-align: center;
}

.cut-order-output-table input {
  width: 100%;
  height: 22px;
  min-width: 0;
  box-sizing: border-box;
  padding: 1px 4px;
  border: 1px solid #c6d4e5;
  border-radius: 2px;
  background: #fff;
  text-align: center;
}

.cut-order-output-table .cut-order-output-style-cell input {
  cursor: pointer;
  text-align: left;
}

.cut-order-output-table .cut-order-readonly-cell {
  overflow: hidden;
  color: #344b68;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-output-table .cut-order-output-total {
  color: #075fbd;
  font-weight: 900;
}

.cut-order-stock-value {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #075fbd;
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-decoration: underline dotted transparent;
}

button.cut-order-stock-value {
  cursor: pointer;
}

button.cut-order-stock-value:hover,
button.cut-order-stock-value:focus-visible {
  color: #00458c;
  outline: 0;
  text-decoration-color: currentColor;
}

.cut-order-stock-value.is-muted {
  color: #8493a6;
  font-weight: 500;
}

.cut-order-stock-cell,
.cut-order-output-inventory {
  text-align: center;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-output-table td.cut-order-output-total,
.cut-order-form-workspace .cut-order-output-table td.cut-order-row-actions {
  display: table-cell;
  vertical-align: middle;
}

.cut-order-form-workspace .cut-order-output-table td.cut-order-row-actions {
  text-align: center;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-output-table td.cut-order-row-actions .cost-accounting-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
  vertical-align: middle;
}

.cut-order-output-table input.is-size-disabled {
  background: #f1f4f8;
  color: #9aa7b7;
}

.cut-order-actual-section {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.cut-order-form-workspace .cut-order-actual-section .cut-order-table-scroll {
  min-height: 0;
  max-height: min(390px, calc(100vh - 425px));
  overflow: auto;
  border: 1px solid #cbd7e5;
}

.cut-order-form-workspace .cut-order-actual-table {
  width: auto;
  min-width: 0;
  max-width: none;
  table-layout: fixed;
}

.cut-order-form-workspace .cut-order-actual-table th,
.cut-order-form-workspace .cut-order-actual-table td {
  height: 29px;
  padding: 2px 4px;
  vertical-align: middle;
}

.cut-order-form-workspace .cut-order-actual-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-actual-table th:nth-child(-n+2),
.cut-order-form-workspace .cut-order-actual-table td:nth-child(-n+2) {
  position: sticky;
  background: #fff;
}

.cut-order-form-workspace .cut-order-actual-table th:last-child,
.cut-order-form-workspace .cut-order-actual-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
}

.cut-order-form-workspace .cut-order-actual-table th:nth-child(-n+2) {
  z-index: 7;
  background: #fff0ad;
}

.cut-order-form-workspace .cut-order-actual-table th:nth-child(1),
.cut-order-form-workspace .cut-order-actual-table td:nth-child(1) {
  left: 0;
  z-index: 5;
}

.cut-order-form-workspace .cut-order-actual-table th:nth-child(2),
.cut-order-form-workspace .cut-order-actual-table td:nth-child(2) {
  left: var(--cut-order-sticky-left-2, 85px);
  z-index: 5;
}

.cut-order-form-workspace .cut-order-actual-table td.is-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cut-order-form-workspace .cut-order-actual-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  height: 29px;
  border-top: 1px solid #9fb6d2;
  background: #edf4fc;
  color: #143a69;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.cut-order-form-workspace .cut-order-actual-table tfoot td:first-child {
  left: 0;
  z-index: 6;
  text-align: left;
}

.cut-order-form-workspace .cut-order-actual-table tfoot td:nth-child(2) {
  left: var(--cut-order-sticky-left-2, 85px);
  z-index: 6;
}

.cut-order-form-workspace .cut-order-actual-table tfoot td.is-total {
  color: #075fbd;
}

.cut-order-form-workspace .cut-order-actual-table td.cut-order-business-cell,
.cut-order-form-workspace .cut-order-actual-table td.cut-order-project-cell,
.cut-order-form-workspace .cut-order-actual-table td.cut-order-row-actions {
  display: table-cell;
}

.cut-order-form-workspace .cut-order-actual-table td.cut-order-business-cell,
.cut-order-form-workspace .cut-order-actual-table td.cut-order-project-cell {
  text-align: left;
}

.cut-order-form-workspace .cut-order-actual-table td.cut-order-project-cell {
  padding: 3px 4px !important;
  overflow: hidden;
}

.cut-order-type-cell > span,
.cut-order-unit-cell {
  color: #344b68;
  font-weight: 700;
}

.cut-order-business-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.cut-order-business-cell > span:not(.cut-order-origin) {
  display: inline-block;
  min-width: 0;
  max-width: calc(100% - 42px);
  overflow: hidden;
  color: #344b68;
  font-weight: 700;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.cut-order-business-cell > input {
  width: 100%;
  min-width: 0;
  height: 25px !important;
  box-sizing: border-box;
}

.cut-order-business-type-control {
  display: inline-flex;
  width: calc(100% - 40px);
  min-width: 0;
  vertical-align: middle;
}

.cut-order-business-type-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 24px;
  min-width: 0;
  padding: 1px 5px;
  border: 1px solid #b8c9df;
  border-radius: 2px;
  background: #fff;
  color: #102f55;
  text-align: left;
}

.cut-order-business-type-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cut-order-business-type-trigger i { width: 0; height: 0; margin-left: 4px; border: 4px solid transparent; border-top-color: #48627f; transform: translateY(2px); }
.cut-order-business-type-trigger:disabled { background: #f1f4f8; color: #8493a6; }
.cut-order-business-type-popup {
  position: fixed;
  inset: auto;
  z-index: 13130;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #9db8d8;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .2);
}

.cut-order-business-type-popup[hidden] { display: none; }
.cut-order-business-type-popup:popover-open { display: block; }
.cut-order-business-type-popup button { display: block; width: 100%; min-height: 29px; padding: 3px 8px; border: 0; border-bottom: 1px solid #e1e8f1; background: #fff; color: #102f55; text-align: left; }
.cut-order-business-type-popup button:hover,
.cut-order-business-type-popup button[aria-selected="true"] { background: #e6f1ff; color: #075fbd; }

.cut-order-type-cell input,
.cut-order-project-cell input,
.cut-order-number-input,
.cut-order-unit-input,
.cut-order-fee-source input {
  width: 100%;
  height: 25px !important;
  min-width: 0;
  box-sizing: border-box;
  padding: 1px 4px !important;
}

.cut-order-project-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 25px;
  overflow: hidden;
  box-sizing: border-box;
  text-align: left;
}

.cut-order-project-content > .clearable-control {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 25px;
  overflow: hidden;
  box-sizing: border-box;
}

.cut-order-project-content > .clearable-control > .cut-order-project-picker-input {
  display: block;
  width: 100% !important;
  max-width: none !important;
}

.cut-order-project-content.has-color {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.cut-order-project-content > strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.cut-order-project-content > span {
  display: block;
  min-width: 0;
  max-width: 72px;
  overflow: hidden;
  color: #60728c;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.cut-order-sources-cell {
  padding: 2px 4px !important;
}

.cut-order-sources {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.cut-order-source-line {
  display: grid;
  grid-template-columns: minmax(92px, 1.45fr) repeat(3, minmax(72px, .9fr)) 26px 20px;
  gap: 3px;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
  padding-right: 4px;
  border-right: 1px solid #d6e0ec;
}

.cut-order-source-line.is-aggregate {
  grid-template-columns: minmax(80px, 1fr) 30px;
}

.cut-order-source-line.is-concealed,
.cut-order-fabric-source-data {
  display: none;
}

.cut-order-material-pending {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #b42318;
  font-size: 12px;
  white-space: nowrap;
}

.cut-order-material-pending b {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.cut-order-fabric-usage {
  display: flex;
  flex-flow: row nowrap;
  gap: 5px;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.cut-order-fabric-piece-count {
  flex: 0 0 auto;
  color: #40536f;
  font-size: 12px;
  white-space: nowrap;
}

.cut-order-fabric-piece-values {
  display: flex;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  color: #183b66;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cut-order-fabric-piece-values b {
  flex: 0 0 auto;
  font-weight: 700;
}

.cut-order-fabric-piece-count.is-unmatched,
.cut-order-fabric-piece-values.is-unmatched,
.cut-order-fabric-piece-values.is-unmatched b {
  color: #d43838;
}

.cut-order-fabric-base-total {
  flex: 0 0 auto;
  color: #40536f;
  font-size: 12px;
}

.cut-order-fabric-base-total strong {
  margin-left: 1px;
  color: #075fbd;
  font-variant-numeric: tabular-nums;
}

.cut-order-project-picker-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  width: 100%;
  height: 24px;
  min-width: 0;
  padding: 1px 5px;
  border: 1px solid #b8c9df;
  border-radius: 2px;
  background: #fff;
  color: #102f55;
  text-align: left;
}

.cut-order-project-picker-button.has-color {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.cut-order-project-picker-button strong,
.cut-order-project-picker-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cut-order-project-picker-button span { color: #60728c; }
.cut-order-project-picker-button:disabled { background: #f1f4f8; color: #8493a6; }

.cut-order-project-picker-input {
  width: 100%;
  min-width: 0;
  height: 25px;
  box-sizing: border-box;
  padding: 2px 7px;
  border: 1px solid #b8c9df;
  border-radius: 2px;
  background: #fff;
  color: #102f55;
}

.cut-order-project-picker-input:focus {
  border-color: #2b78d0;
  outline: 1px solid rgba(43, 120, 208, .18);
}

.cut-order-project-picker-input:disabled { background: #f1f4f8; color: #8493a6; }

.cut-order-manual-item-picker {
  position: fixed;
  z-index: 13125;
  max-height: min(420px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid #9db8d8;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
  display: flex;
  flex-direction: column;
}

.cut-order-manual-item-list { max-height: 330px; overflow: auto; border-top: 1px solid #d6e0ec; }
.cut-order-manual-item-list > button { display: grid; grid-template-columns: minmax(125px, 1fr) 58px 100px; gap: 6px; align-items: center; width: 100%; min-height: 33px; padding: 2px 8px; border: 0; border-bottom: 1px solid #e1e8f1; background: #fff; color: #102f55; text-align: left; }
.cut-order-manual-item-list > button:hover { background: #eaf4ff; }
.cut-order-manual-item-list > button span,
.cut-order-manual-item-list > button small { overflow: hidden; color: #60728c; text-overflow: ellipsis; white-space: nowrap; }

.cut-order-manual-material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 4px 9px;
  border-bottom: 1px solid #d6e0ec;
  background: #f4f8fd;
  color: #102f55;
}

.cut-order-manual-material-head span {
  color: #60728c;
  font-size: 12px;
}

.cut-order-manual-material-colors {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.cut-order-manual-material-color {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 4px 10px;
  border-bottom: 1px solid #e1e8f1;
  background: #fff;
  color: #102f55;
  text-align: left;
  cursor: pointer;
}

.cut-order-manual-material-color:hover,
.cut-order-manual-material-color:focus-within {
  background: #eaf4ff;
  outline: 0;
}

.cut-order-manual-material-color.is-selected { background: #dcecff; }
.cut-order-manual-material-color input { width: 14px; height: 14px; margin: 0; padding: 0 !important; }
.cut-order-manual-material-color small { font-size: 11px; font-weight: 600; white-space: nowrap; }
.cut-order-manual-material-color small.is-positive { color: #08783f; }
.cut-order-manual-material-color small.is-warning { color: #b35400; }

.cut-order-manual-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 5px 8px;
  border-top: 1px solid #c8d6e6;
  background: #f8fbff;
}

.cut-order-manual-item-footer > div { display: flex; gap: 6px; }

.cut-order-manual-material-model {
  grid-template-columns: minmax(68px, .82fr) minmax(48px, .58fr) minmax(72px, 1fr) minmax(76px, .88fr) 58px !important;
}

.cut-order-manual-material-model > strong,
.cut-order-manual-material-model > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-manual-material-model > em {
  justify-self: end;
  color: #c2410c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.cut-order-manual-material-color {
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
}

.cut-order-manual-material-color > span,
.cut-order-manual-material-color > small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-fabric-piece-count strong {
  color: #075fbd;
  font-variant-numeric: tabular-nums;
}

.cut-order-source-line:last-of-type {
  border-right: 0;
}

.cut-order-source-line > select,
.cut-order-source-line > input,
.cut-order-source-compact-field input {
  width: 100%;
  height: 24px !important;
  min-width: 0;
  box-sizing: border-box;
  padding: 1px 3px !important;
  border: 1px solid #c6d4e5;
  border-radius: 2px;
}

.cut-order-source-warehouse,
.cut-order-source-origin,
.cut-order-source-unit {
  overflow: hidden;
  color: #40536f;
  font-size: 12px;
  text-overflow: clip;
  white-space: nowrap;
}

.cut-order-source-compact-field {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  min-width: 0;
}

.cut-order-source-compact-field b {
  color: #60728c;
  font-size: 11px;
  text-align: right;
}

.cut-order-source-actions,
.cut-order-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  white-space: nowrap;
}

.cut-order-source-actions {
  justify-content: flex-start;
  flex: 0 0 auto;
}

.cut-order-form-workspace .cost-accounting-row-btn {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid #9db8d8;
  border-radius: 2px;
  background: #fff;
  color: #075fbd;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.cut-order-form-workspace .cost-accounting-row-btn.danger {
  border-color: #e0aaaa;
  color: #bd2c25;
  font-size: 12px;
}

.cut-order-form-workspace .cost-accounting-row-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.cut-order-source-line .cost-accounting-row-btn {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  line-height: 18px;
}

.cut-order-form-workspace .compact-table-button {
  min-height: 24px;
  height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

.cut-order-fee-source {
  display: block;
  min-width: 0;
  align-items: center;
}

.cut-order-fee-source > .clearable-control,
.cut-order-fee-source > input,
.cut-order-project-cell > .clearable-control,
.cut-order-business-cell > .clearable-control {
  width: 100%;
  min-width: 0;
}

.cut-order-actual-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
}

.cut-order-form-workspace .clearable-control-button {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-radius: 50%;
  font-size: 10px;
  line-height: 12px;
}

.cut-order-actual-table td.is-number small {
  margin-left: 2px;
  color: #60728c;
  font-size: 10px;
  font-weight: 400;
}

.cut-order-form-workspace [data-cut-reference-picker] {
  cursor: pointer;
}

.cut-order-form-workspace [data-cut-reference-picker]:focus {
  border-color: #3f86d9;
  box-shadow: 0 0 0 1px rgba(63, 134, 217, .14);
  outline: 0;
}

.cut-order-origin {
  min-width: 36px;
  justify-content: center;
  padding: 2px 4px;
}

.cut-order-empty-actual {
  height: 36px !important;
  color: #60728c;
  text-align: center !important;
}

.cut-order-empty-actual-row .cut-order-row-actions {
  justify-content: center;
}

.cut-order-form-workspace .cost-accounting-row-btn.cut-order-empty-add {
  width: 32px;
  min-width: 32px;
  font-size: 10px;
}

.cut-order-form-workspace .cut-order-form-footer {
  display: grid;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid #b8c9df;
  background: #fff;
}

.cut-order-fabric-picker-layer {
  position: fixed;
  z-index: 13100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cut-order-form-workspace .cut-order-fabric-picker-backdrop,
.cut-order-form-workspace .cut-order-fabric-picker-backdrop:hover:not(:disabled) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, .38);
  box-shadow: none;
}

.cut-order-fabric-picker {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto;
  width: min(920px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #c7d4e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(15, 23, 42, .28);
}

.cut-order-fabric-picker > header,
.cut-order-fabric-picker > footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #cfdae7;
  background: #fff;
}

.cut-order-fabric-picker > header > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cut-order-fabric-picker > header h3 {
  margin: 0;
  color: #102f55;
  font-size: 16px;
  line-height: 1.25;
}

.cut-order-fabric-picker > header span,
.cut-order-fabric-picker > footer > span {
  overflow: hidden;
  color: #60728c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-picker-close {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #c6d4e5;
  border-radius: 2px;
  background: #fff;
  color: #536983;
  font-size: 16px;
  line-height: 20px;
}

.cut-order-fabric-picker-body {
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.cut-order-fabric-inventory-summary {
  padding: 7px 9px;
  border: 1px solid #bfd1e7;
  border-radius: 3px;
  background: #f4f8fd;
  color: #35506f;
  font-size: 12px;
  line-height: 1.45;
}

.cut-order-fabric-picker-scroll {
  height: 100%;
  overflow: auto;
  border: 1px solid #b8c9df;
}

.cut-order-fabric-picker table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cut-order-fabric-picker th,
.cut-order-fabric-picker td {
  min-width: 106px;
  height: 56px;
  padding: 4px;
  border-right: 1px solid #c8d4e2;
  border-bottom: 1px solid #c8d4e2;
  text-align: center;
}

.cut-order-fabric-picker thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 32px;
  padding: 4px 8px;
  background: #fff0ad;
  color: #18283d;
}

.cut-order-fabric-picker tbody th {
  position: sticky;
  z-index: 1;
  left: 0;
  min-width: 128px;
  background: #f8fbff;
}

.cut-order-fabric-picker tbody th strong,
.cut-order-fabric-picker tbody th span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-fabric-picker tbody th span {
  margin-top: 2px;
  color: #60728c;
  font-size: 10px;
  font-weight: 400;
}

.cut-order-fabric-piece {
  display: grid;
  place-items: center;
  gap: 1px;
  width: 100%;
  height: 44px;
  padding: 3px 6px;
  border: 1px solid #aebfd2;
  border-radius: 2px;
  background: #fff;
  color: #183b66;
  cursor: pointer;
}

.cut-order-fabric-piece-wrap {
  position: relative;
  width: 100%;
  height: 44px;
}

.cut-order-fabric-piece-wrap .cut-order-fabric-piece {
  padding-right: 22px;
}

.cut-order-fabric-partial-button {
  position: absolute;
  z-index: 1;
  top: 4px;
  right: 4px;
  display: grid;
  width: 17px;
  min-width: 17px;
  height: 17px;
  min-height: 17px;
  place-items: center;
  padding: 0;
  border: 1px solid #9db8d8;
  border-radius: 50%;
  background: #fff;
  color: #075fbd;
  font-size: 13px;
  line-height: 15px;
}

.cut-order-fabric-partial-button:hover:not(:disabled) {
  border-color: #1674d1;
  background: #eaf4ff;
}

.cut-order-fabric-piece strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.cut-order-fabric-split-mark {
  margin-right: 2px;
  color: #d43838;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.cut-order-fabric-piece span {
  color: #60728c;
  font-size: 10px;
}

.cut-order-fabric-piece.is-used {
  border-color: #aeb4bc;
  background: #aeb0b3;
  color: #4c5158;
  cursor: not-allowed;
}

.cut-order-fabric-piece.is-used span {
  color: #5b6066;
}

.cut-order-fabric-piece.is-selected {
  border-color: #1674d1;
  background: #dceeff;
  color: #075fbd;
  box-shadow: inset 0 0 0 1px #1674d1;
}

.cut-order-fabric-piece.is-selected span {
  color: #075fbd;
  font-weight: 700;
}

.cut-order-picker-state {
  display: grid;
  min-height: 150px;
  place-items: center;
  color: #60728c;
  font-size: 13px;
}

.cut-order-picker-state.is-error {
  color: #b42318;
}

.cut-order-unmatched-entry {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #efb2b2;
  border-radius: 4px;
  background: #fff8f7;
}

.cut-order-unmatched-entry-heading {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.cut-order-unmatched-entry-heading strong {
  flex: 0 0 auto;
  color: #c52828;
  font-size: 13px;
}

.cut-order-unmatched-entry-heading span,
.cut-order-unmatched-code-list small {
  overflow: hidden;
  color: #8a5a5a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-unmatched-entry-control {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cut-order-unmatched-entry-control input {
  width: 145px;
  height: 30px;
  padding: 3px 7px;
  border: 1px solid #d49b9b;
  border-radius: 3px;
}

.cut-order-unmatched-entry-control button {
  height: 30px;
  min-height: 30px;
}

.cut-order-unmatched-code-list {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
  align-items: center;
  min-height: 23px;
  overflow-x: auto;
}

.cut-order-unmatched-code-list > span {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 5px 2px 7px;
  border: 1px solid #e5a1a1;
  border-radius: 12px;
  background: #fff;
  color: #c52828;
  font-size: 12px;
}

.cut-order-unmatched-code-list > span button {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c52828;
  line-height: 18px;
}

@media (max-width: 760px) {
  .cut-order-unmatched-entry {
    grid-template-columns: 1fr;
  }

  .cut-order-unmatched-entry-control {
    justify-content: flex-start;
  }
}

.cut-order-fabric-picker > footer {
  border-top: 1px solid #cfdae7;
  border-bottom: 0;
}

.cut-order-fabric-picker > footer > div {
  display: flex;
  gap: 8px;
}

.cut-order-fabric-partial-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cut-order-fabric-partial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .28);
}

.cut-order-fabric-partial-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  width: min(420px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #b8c9df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .3);
}

.cut-order-fabric-partial-dialog > header,
.cut-order-fabric-partial-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #cfdae7;
}

.cut-order-fabric-partial-dialog > header h3 {
  margin: 0;
  color: #102f55;
  font-size: 15px;
}

.cut-order-fabric-partial-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid #cfdae7;
  border-bottom: 0;
}

.cut-order-fabric-partial-body {
  display: grid;
  gap: 8px;
  padding: 14px 16px 10px;
}

.cut-order-fabric-partial-body label {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.cut-order-fabric-partial-body output,
.cut-order-fabric-partial-body input {
  width: 100%;
  height: 28px;
  box-sizing: border-box;
  padding: 3px 7px;
  border: 1px solid #b8c9df;
  border-radius: 2px;
  background: #fff;
  color: #102f55;
  font-variant-numeric: tabular-nums;
}

.cut-order-fabric-partial-body output {
  background: #f4f7fb;
}

.cut-order-fabric-partial-body b {
  color: #40536f;
  font-size: 12px;
}

.cut-order-fabric-partial-body p {
  min-height: 17px;
  margin: 0 0 0 88px;
  color: #b42318;
  font-size: 11px;
}

.cut-order-material-stock-layer {
  position: fixed;
  z-index: 13100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cut-order-material-stock-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(96px, 1fr) auto;
  width: min(700px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid #b8c9df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(15, 23, 42, .28);
}

.cut-order-material-stock-dialog > header,
.cut-order-material-stock-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 12px;
}

.cut-order-material-stock-dialog > header {
  border-bottom: 1px solid #cfdae7;
}

.cut-order-material-stock-dialog h3 {
  margin: 0;
  color: #102f55;
  font-size: 16px;
}

.cut-order-material-stock-dialog header span {
  color: #60728c;
  font-size: 12px;
}

.cut-order-material-stock-summary {
  padding: 8px 12px;
  border-bottom: 1px solid #dce5ef;
  color: #40536f;
  text-align: right;
}

.cut-order-material-stock-summary strong {
  color: #075fbd;
}

.cut-order-material-stock-scroll {
  overflow: auto;
}

.cut-order-material-stock-dialog table {
  width: 100%;
  border-collapse: collapse;
}

.cut-order-material-stock-dialog th,
.cut-order-material-stock-dialog td {
  height: 32px;
  padding: 4px 8px;
  border-right: 1px solid #c8d4e2;
  border-bottom: 1px solid #c8d4e2;
  text-align: center;
}

.cut-order-material-stock-dialog th {
  position: sticky;
  top: 0;
  background: #fff0ad;
}

.cut-order-material-stock-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid #cfdae7;
}

@media (max-width: 1280px) {
  .cut-order-form-workspace .supplier-purchase-detail-page-body {
    grid-template-rows: auto auto minmax(160px, 1fr) auto;
  }

  .cut-order-form-workspace .cut-order-basic-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .cut-order-form-workspace .cut-order-basic-section .cost-accounting-section-header {
    display: none;
  }

  .cut-order-form-workspace .cut-order-form-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .cut-order-output-shell {
    grid-template-columns: 64px minmax(0, 1fr) 120px 112px;
  }
}

/* 2026-07-22 BOM list: purchase-list parity without changing BOM facts */
html:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace),
body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .app-shell,
body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .main {
  display: flex;
  flex-direction: column;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .summary-grid {
  display: none !important;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) #costAccountingView,
body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .cost-accounting-board {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cost-bom-list-workspace) .cost-accounting-board {
  padding: 0;
}

.cost-bom-list-workspace .supplier-purchase-list-toolbar-card .cost-bom-list-count {
  min-width: 112px;
  color: #475569;
  font-size: 12px;
  text-align: right;
}

.cost-bom-list-workspace .supplier-purchase-list-table td {
  height: 40px;
  padding: 5px 7px;
  color: #102033;
  font-size: 13px;
}

.cost-bom-list-workspace .supplier-purchase-col-effectiveBomRows,
.cost-bom-list-workspace .supplier-purchase-col-averageCost,
.cost-bom-list-workspace .supplier-purchase-col-bomStatus {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cost-bom-list-workspace .cost-bom-list-status-switch {
  margin: 0 auto;
}

.cost-bom-list-workspace .cost-bom-list-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cost-bom-list-workspace .cost-bom-list-actions .supplier-purchase-list-action-btn {
  min-width: 48px;
}

.cost-bom-list-end {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 6px;
  border-top: 1px solid #d7e0ea;
  background: #ffffff;
  color: #526579;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.cost-bom-detail-workspace,
.cost-bom-create-workspace {
  width: 100%;
  min-height: 0;
}

.cost-bom-detail-workspace .supplier-purchase-detail-page-body,
.cost-bom-create-workspace .supplier-purchase-detail-page-body {
  padding: 0;
}

.cost-bom-list-workspace tr.is-detail-return-target > td {
  animation: cost-bom-return-target 0.9s ease-out;
}

@keyframes cost-bom-return-target {
  0% { background: #dbeafe !important; }
  100% { background: #ffffff !important; }
}

/* 2026-07-24 BOM master list and compact detail r549 */
.cost-bom-list-workspace .supplier-purchase-col-bomCoverage,
.cost-bom-list-workspace .supplier-purchase-col-effectiveBomRows,
.cost-bom-list-workspace .supplier-purchase-col-averageCost,
.cost-bom-list-workspace .supplier-purchase-col-maintenanceStatus,
.cost-bom-list-workspace .supplier-purchase-col-bomStatus,
.cost-bom-list-workspace .supplier-purchase-col-firstMaintainedAt,
.cost-bom-list-workspace .supplier-purchase-col-updatedAt {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cost-bom-list-workspace .supplier-purchase-col-maintenanceStatus .supplier-purchase-status-pill {
  min-width: 66px;
  justify-content: center;
}

.cost-bom-list-workspace .cost-bom-list-status-switch:disabled,
.cost-bom-list-workspace .cost-bom-list-status-switch.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

html:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace),
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) {
  height: 100%;
  overflow-y: hidden;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .app-shell,
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .main {
  display: flex;
  flex-direction: column;
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 8px;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .topbar,
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .summary-grid {
  display: none !important;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) #costAccountingView,
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .cost-accounting-board,
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .cost-bom-detail-workspace {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .cost-accounting-panel,
body:has(#costAccountingView:not(.hidden) .cost-bom-detail-workspace) .cost-accounting-board {
  padding: 0;
}

.cost-bom-detail-workspace .cost-accounting-bom-workbench {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) 244px;
}

.cost-bom-detail-workspace .cost-accounting-bom-workbench > .cost-accounting-scroll {
  align-self: stretch;
  min-height: 100%;
  margin-top: 0;
  background: #ffffff;
}

/* BOM detail r925: compact operation layout without inheriting ordinary-list header/filter treatment. */
.cost-bom-detail-workspace > .supplier-purchase-detail-page-head {
  position: relative;
}

.cost-bom-detail-workspace .supplier-purchase-detail-page-title {
  align-items: center;
  flex-wrap: wrap;
}

.cost-bom-detail-workspace .cost-bom-detail-header-states {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cost-bom-detail-workspace .supplier-purchase-detail-page-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 8px;
}

.cost-bom-detail-workspace .cost-bom-detail-centered-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cost-bom-detail-workspace .cost-accounting-bom-edit-state {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #dfa7a1;
  border-radius: 3px;
  background: #fff6f4;
  color: #a93b32;
  box-shadow: 0 1px 3px rgba(158, 56, 47, 0.12);
}

.cost-bom-detail-workspace .cost-accounting-bom-object-main {
  flex: 0 0 auto;
  min-width: 0;
}

.cost-bom-detail-workspace .cost-accounting-bom-object-meta {
  flex: 1 1 0;
  margin-left: 0;
}

.cost-bom-detail-workspace .cost-accounting-bom-object-meta > div {
  flex: 1 1 auto;
}

.cost-bom-detail-workspace .cost-accounting-bom-object-meta strong {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.cost-bom-detail-workspace .cost-accounting-preview-section {
  padding: 6px;
}

.cost-bom-detail-workspace .cost-accounting-preview-card {
  padding: 3px 8px;
}

.cost-bom-detail-workspace .cost-accounting-preview-card + .cost-accounting-preview-card {
  margin-top: 3px;
}

.cost-bom-detail-workspace .cost-accounting-preview-card dl {
  margin-top: 2px;
}

.cost-bom-detail-workspace .cost-accounting-preview-card dl > div {
  padding: 0;
  min-height: 20px;
  line-height: 20px;
}

.cost-bom-detail-workspace .cost-accounting-result-section > .cost-accounting-scroll {
  margin-top: 0;
}

#costAccountingBoard[data-cost-accounting-render-kind="cost-bom-detail"] {
  align-content: start;
  grid-auto-rows: max-content;
}

@media (max-width: 720px) {
  .cost-accounting-reference-modal {
    padding: 12px;
  }

  .cost-accounting-reference-picker {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .cost-accounting-reference-picker-head {
    grid-template-columns: minmax(0, 1fr) 32px;
  }

  .cost-accounting-reference-picker-head [data-cost-bom-reference-count] {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cost-accounting-reference-option {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .cost-accounting-reference-meta {
    flex-wrap: wrap;
  }

  .cost-accounting-reference-note {
    white-space: normal;
  }

  .cost-accounting-reference-footer {
    align-items: flex-end;
  }
}

@media (max-width: 1180px) {
  .cost-bom-detail-workspace .cost-accounting-bom-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .cost-bom-detail-workspace .supplier-purchase-detail-page-head-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    flex-wrap: wrap;
  }

  .cost-bom-detail-workspace .cost-bom-detail-centered-status {
    position: static;
    transform: none;
  }

  .cost-accounting-bom-object-meta {
    margin-left: 0;
  }
}

.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(5),
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(7),
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(9),
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(10),
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(5) *,
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(7) *,
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(9) *,
.cost-bom-detail-workspace .cost-accounting-bom-table td:nth-child(10) * {
  font-weight: 400 !important;
}

.cost-bom-detail-workspace .cost-accounting-bom-table input[data-reference-selection-state="selected"] {
  color: #0d4fb3 !important;
  font-weight: 700 !important;
}

.cost-bom-detail-workspace .cost-accounting-bom-picker .cost-bom-material-presentation {
  position: absolute;
  inset: 50% 25px auto 26px;
  z-index: 2;
  display: none;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.cost-bom-detail-workspace .cost-accounting-bom-picker:has(> input[data-reference-selection-state="selected"]:not(:focus)) > .cost-bom-material-presentation {
  display: flex;
}

.cost-bom-detail-workspace .cost-accounting-bom-picker.has-material-presentation:has(> input[data-reference-selection-state="selected"]:not(:focus)) > input {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.cost-bom-detail-workspace .cost-accounting-bom-picker .cost-bom-material-presentation span {
  min-width: 0;
  overflow: hidden;
  color: #0d4fb3;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-bom-detail-workspace .cost-accounting-result-table th {
  position: relative;
  height: 28px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid #9db0bf;
  background: #f1e5b7 !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #0f2337;
  line-height: 22px;
}

.cost-bom-detail-workspace .cost-accounting-result-column-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 6;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.cost-bom-detail-workspace .cost-accounting-result-table th:hover > .cost-accounting-result-column-resize-handle,
.cost-bom-detail-workspace .cost-accounting-result-column-resize-handle:hover,
.cost-bom-detail-workspace .cost-accounting-result-column-resize-handle.dragging {
  opacity: 1;
  background: rgba(45, 114, 232, 0.28);
}

.cost-bom-detail-workspace .cost-accounting-operation-result-table {
  border-collapse: collapse;
}

.cost-bom-detail-workspace .cost-accounting-result-table td,
.cost-bom-detail-workspace .cost-accounting-result-table td.strong {
  background: #ffffff;
  box-shadow: none;
  color: #102033;
}

.cost-bom-detail-workspace .cost-accounting-result-table tbody td[data-cost-result-column="commonDetail"],
.cost-bom-detail-workspace .cost-accounting-result-table tbody td[data-cost-result-column="differenceDetail"] {
  font-weight: 400;
}

.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-table tbody td,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-system-value,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-preview-card dt,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-preview-card dd,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-bom-material-presentation span,
.cost-bom-detail-workspace .cost-accounting-result-section.is-readonly .cost-accounting-result-table td,
.cost-bom-detail-workspace .cost-accounting-result-section.is-readonly .cost-accounting-result-table td.strong {
  color: #607086 !important;
  font-weight: 400 !important;
}

.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench input:disabled,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench select:disabled,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench textarea:disabled,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-workbench button:disabled,
.cost-bom-detail-workspace .cost-accounting-result-section.is-readonly [data-cost-result-note]:disabled {
  color: #607086 !important;
  font-weight: 400 !important;
  -webkit-text-fill-color: #607086 !important;
}

.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-picker:has(> input[data-reference-selection-state="selected"]:not(:focus)) > input {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly col[data-cost-bom-col="11"],
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-delete-head,
.cost-bom-detail-workspace .cost-accounting-bom-maintenance-section.is-readonly .cost-accounting-bom-table tbody tr > td:last-child {
  display: none;
}

/* Finished-product master: full workspace secondary page, not a centered modal. */
html:has(#migrationView.master-product-secondary-mode:not(.hidden)),
body:has(#migrationView.master-product-secondary-mode:not(.hidden)) {
  height: 100%;
  overflow: hidden;
}

body:has(#migrationView.master-product-secondary-mode:not(.hidden)) .main {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr);
  padding-top: calc(6px + var(--business-tabs-height));
  padding-bottom: 6px;
}

body:has(#migrationView.master-product-secondary-mode:not(.hidden)) .topbar,
body:has(#migrationView.master-product-secondary-mode:not(.hidden)) .summary-grid {
  display: none !important;
}

#migrationView.master-product-secondary-mode .migration-panel-head,
#migrationView.master-product-secondary-mode .migration-table-tools,
#migrationView.master-product-secondary-mode .migration-top-scroll,
#migrationView.master-product-secondary-mode .migration-table-wrap {
  display: none !important;
}

#migrationView.master-product-secondary-mode .migration-panel {
  display: block;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.master-product-secondary-host {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #f4f7fa;
}

.master-product-secondary-workspace {
  --master-product-secondary-media-width: 334px;
  --master-product-secondary-image-size: 164px;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #f4f7fa;
}

.master-product-secondary-workspace .supplier-purchase-detail-page-body {
  min-height: 0;
  overflow: auto;
  padding: 7px 10px 0;
}

.master-product-secondary-workspace .master-product-edit-panel {
  border: 1px solid #b8c7d9;
  border-left-width: 1px;
  background: #fff;
}

.master-product-secondary-workspace .master-product-edit-main {
  position: relative;
}

.master-product-secondary-workspace .master-product-edit-command-row {
  min-height: 30px;
  padding: 4px 10px 0;
}

.master-product-secondary-workspace .supplier-purchase-detail-page-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.master-product-secondary-draft-status,
.master-product-media-draft-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #e2a736;
  border-radius: 3px;
  padding: 0 10px;
  background: #fff6d9;
  color: #9a6700;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.master-product-secondary-draft-status[hidden],
.master-product-media-draft-status[hidden] {
  display: none !important;
}

.master-product-secondary-save-button,
.master-product-media-manager-save {
  min-width: 76px;
  min-height: 30px;
  border-color: #1769c2;
  background: #1769c2;
  color: #fff;
  font: inherit;
  font-weight: 900;
}

.master-product-secondary-workspace .master-product-edit-layout {
  grid-template-columns: minmax(0, 1fr) var(--master-product-secondary-media-width);
  gap: 8px;
  align-items: start;
  padding: 6px 10px 7px;
}

.master-product-secondary-workspace .master-product-edit-form {
  min-width: 0;
  display: block;
}

.master-product-secondary-workspace .master-product-edit-fields {
  display: grid;
  align-content: start;
  gap: 11px;
}

.master-product-secondary-workspace .master-product-edit-grid {
  display: grid;
  gap: 6px;
  padding: 0;
}

.master-product-secondary-workspace .master-product-edit-grid-row-one {
  /* 上市日期由系统记录；第六槽商品名称保持加宽。 */
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.5fr);
}

.master-product-secondary-workspace .master-product-edit-grid-row-two {
  /* 第七槽备注保持加宽。 */
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.5fr);
}

.master-product-secondary-workspace .master-product-edit-field {
  gap: 1px;
}

.master-product-secondary-workspace .master-product-edit-field > span {
  line-height: 14px;
}

.master-product-secondary-workspace .master-product-edit-input,
.master-product-secondary-workspace .master-product-edit-field .clearable-control {
  min-height: 27px;
}

.master-product-secondary-workspace .master-product-edit-field-name,
.master-product-secondary-workspace .master-product-edit-field-remark {
  min-width: 0;
}

.master-product-secondary-workspace .master-product-edit-input[readonly] {
  background: #f4f7fb;
  color: #475569;
  cursor: default;
}

.master-product-secondary-workspace .master-product-edit-field-spacer {
  min-height: 43px;
}

.master-product-secondary-workspace .master-product-media-quick {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 2;
  min-width: var(--master-product-secondary-media-width);
  width: var(--master-product-secondary-media-width);
  align-self: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: var(--master-product-secondary-image-size) 28px;
  gap: 6px;
}

.master-product-secondary-workspace .master-product-media-slots {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  height: var(--master-product-secondary-image-size);
  gap: 6px;
}

.master-product-secondary-workspace .master-product-media-slot,
.master-product-secondary-workspace .master-product-media-entry.is-compact {
  width: 100%;
  height: var(--master-product-secondary-image-size);
  aspect-ratio: 1 / 1;
}

.master-product-secondary-workspace .master-product-media-manager-link {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d8e2ee;
  background: #f8fbff;
  color: #1265c0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.master-product-secondary-workspace .master-product-media-manager-link small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.master-product-secondary-workspace .master-product-title-rows {
  padding: 0 calc(18px + var(--master-product-secondary-media-width)) 7px 10px;
}

.master-product-secondary-workspace .master-product-title-row {
  grid-template-columns: 58px minmax(0, 1fr) auto 30px;
  gap: 5px;
  align-items: center;
}

.master-product-secondary-workspace .master-product-title-label {
  min-height: 27px;
}

.master-product-secondary-workspace .master-product-title-primary {
  min-width: 54px;
  min-height: 27px;
}

.master-product-secondary-workspace .master-product-title-add {
  width: 28px;
  min-width: 28px;
  min-height: 27px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.master-product-secondary-workspace .master-product-set-section {
  padding: 0 10px 8px;
}

.master-product-secondary-workspace .master-product-set-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.master-product-secondary-workspace .master-product-set-editor {
  width: auto !important;
  max-width: none;
  min-width: 0;
  flex-basis: auto !important;
}

.master-product-secondary-workspace .master-product-set-reserved {
  min-width: 0;
}

.master-product-secondary-workspace .master-product-set-head {
  min-height: 26px;
  padding: 3px 6px;
}

.master-product-secondary-workspace .master-product-set-body {
  gap: 4px;
  padding: 4px;
}

.master-product-secondary-workspace .master-product-set-add-row input,
.master-product-secondary-workspace .master-product-set-add-button {
  min-height: 27px;
}

.master-product-secondary-workspace .master-product-set-chips:empty {
  display: none;
}

.master-product-secondary-workspace .master-product-variant-detail {
  margin-top: 10px;
  border: 1px solid #c5d2df;
  background: #fff;
}

.master-product-secondary-workspace .master-product-variant-detail-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 9px;
  border-bottom: 1px solid #c5d2df;
  background: #eef6fb;
  color: #0f172a;
  font-size: 12px;
}

.master-product-secondary-workspace .master-product-variant-batch-price-button {
  margin-left: auto;
  min-height: 26px;
  padding: 2px 9px;
  border: 1px solid #0f68b8;
  background: #ffffff;
  color: #075ea8;
  font-weight: 800;
  cursor: pointer;
}

.master-product-secondary-workspace .master-product-variant-detail-price {
  min-width: 88px;
}

.master-product-secondary-workspace .master-product-variant-detail-price input {
  width: 100%;
  min-width: 68px;
  height: 25px;
  box-sizing: border-box;
  border: 1px solid #b8c9dc;
  background: #fff;
  color: #0f172a;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.master-product-secondary-workspace .master-product-variant-detail-list {
  max-width: 100%;
  overflow: auto;
}

.master-product-secondary-workspace .master-product-variant-detail-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.master-product-secondary-workspace .master-product-variant-detail-table th,
.master-product-secondary-workspace .master-product-variant-detail-table td {
  min-width: 78px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #d1dbe7;
  padding: 4px 7px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.master-product-secondary-workspace .master-product-variant-detail-table td.master-product-variant-detail-id,
.master-product-secondary-workspace .master-product-variant-detail-table td.master-product-variant-detail-size {
  display: table-cell;
}

.master-product-secondary-workspace .master-product-variant-detail-table th {
  height: 36px;
  background: #f4e7ad;
  color: #0f172a;
  font-weight: 900;
}

.master-product-secondary-workspace .master-product-variant-detail-table th:first-child,
.master-product-secondary-workspace .master-product-variant-detail-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 170px;
  background: #fff;
  text-align: left;
  font-weight: 900;
}

.master-product-secondary-workspace .master-product-variant-detail-table th:first-child {
  z-index: 3;
  background: #f4e7ad;
  text-align: center;
}

.master-product-secondary-workspace .master-product-variant-detail-table tfoot td {
  height: 36px;
  background: #eef6fb;
  color: #0f172a;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.master-product-secondary-workspace .master-product-variant-detail-table tfoot td:first-child {
  z-index: 3;
  background: #eef6fb;
  text-align: center;
}

.master-product-size-check {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.master-product-size-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.master-product-size-check span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 1px solid #111827;
  border-radius: 2px;
  background: #fff;
  color: transparent;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.master-product-size-check input:checked + span {
  border-color: #111827;
  box-shadow: none;
  color: #047857;
}

.master-product-size-check input:focus-visible + span {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.master-product-secondary-workspace .master-product-variant-detail-status > .master-product-status-switch {
  min-width: 58px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  padding: 0 4px 0 8px;
  background: #cbd5e1;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.master-product-secondary-workspace .master-product-variant-detail-status > .master-product-status-switch i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
}

.master-product-secondary-workspace .master-product-variant-detail-status > .master-product-status-switch.is-on {
  background: #0877cf;
  color: #fff;
}

.shortage-size-unavailable {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

/* The large-image manager replaces the editor body inside the same workspace. */
.master-product-secondary-workspace .master-product-edit-panel.is-media-manager-mode .master-product-edit-main {
  display: none;
}

.master-product-secondary-workspace:has(.master-product-edit-panel.is-media-manager-mode) > .supplier-purchase-detail-page-head {
  display: none;
}

.master-product-secondary-workspace .master-product-media-manager {
  position: static;
  inset: auto;
  z-index: auto;
  min-height: 520px;
  background: #f4f7fa;
}

.master-product-media-manager-workspace {
  min-height: 520px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid #c5d2df;
  background: #fff;
}

.master-product-media-manager-workspace .master-product-media-manager-head {
  min-height: 46px;
  justify-content: flex-start;
  border-bottom: 1px solid #d7e0ea;
  background: #fff;
}

.master-product-media-manager-workspace .master-product-media-manager-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-product-media-manager-workspace .master-product-media-manager-head > .master-product-media-manager-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.master-product-media-manager-workspace .master-product-media-manager-head > [data-master-product-media-group-create] {
  margin-left: auto;
}

.master-product-media-manager-workspace .master-product-media-manager-head > button,
.master-product-media-manager-back {
  min-height: 28px;
  border: 1px solid #b9c9dd;
  background: #fff;
  color: #1769c2;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.master-product-media-manager-workspace .master-product-media-manager-head span,
.master-product-media-upload-progress {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.master-product-media-group-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 8px 0;
  border-bottom: 1px solid #d7e0ea;
  background: #f8fbff;
}

.master-product-media-group-tab {
  min-height: 30px;
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  background: #fff;
  color: #475569;
  padding: 0 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.master-product-media-group-tab.is-active {
  background: #eaf3ff;
  color: #1769c2;
  box-shadow: inset 0 -2px 0 #1769c2;
}

.master-product-media-current-group {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.master-product-media-current-group-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid #e1e7ef;
}

.master-product-media-current-group-head > label {
  width: min(210px, 28vw);
  min-width: 150px;
  flex: 0 1 210px;
  display: block;
  align-items: center;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.master-product-media-current-group-head input,
.master-product-media-current-group-head select {
  box-sizing: border-box;
  width: 100%;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  padding: 3px 7px;
  font: inherit;
}

.master-product-media-batch-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.master-product-media-batch-actions select {
  width: auto;
  min-width: 112px;
  max-width: 190px;
}

.master-product-media-batch-actions button {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1769c2;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.master-product-media-batch-actions button:disabled {
  opacity: .45;
  cursor: default;
}

.master-product-media-batch-actions select:disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: default;
}

.master-product-media-drop-zone {
  min-height: 360px;
  overflow: auto;
  padding: 8px;
  background: #f8fafc;
}

.master-product-media-manager.is-dragging-files .master-product-media-drop-zone {
  outline: 3px dashed #2563eb;
  outline-offset: -8px;
  background: #eff6ff;
}

.master-product-media-current-group .master-product-media-group-list {
  grid-template-columns: repeat(auto-fill, minmax(132px, 160px));
  align-content: start;
  justify-content: start;
  padding: 0;
}

.master-product-media-current-group .master-product-media-entry {
  min-height: 160px;
  aspect-ratio: 1 / 1;
}

.master-product-media-select {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 3;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.master-product-media-select input {
  position: absolute;
  opacity: 0;
}

.master-product-media-select span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #94a3b8;
  background: rgba(255, 255, 255, .95);
  color: transparent;
  font-size: 16px;
  font-weight: 900;
}

.master-product-media-select input:checked + span {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.master-product-media-entry.is-selected {
  box-shadow: 0 0 0 2px #2563eb;
}

.master-product-media-entry.is-recently-moved {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .35);
  animation: master-product-media-moved-highlight 1.6s ease-out;
}

.master-product-media-main-badge {
  position: absolute;
  top: 6px;
  left: 34px;
  z-index: 3;
  padding: 2px 6px;
  border: 1px solid #1d4ed8;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
}

.master-product-media-entry-actions button:disabled {
  opacity: .48;
  cursor: default;
}

.master-product-media-upload-progress.is-error {
  color: #c2410c;
}

@keyframes master-product-media-moved-highlight {
  0% { background: #dcfce7; }
  100% { background: #fff; }
}

.master-product-media-group-add small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .master-product-secondary-workspace .master-product-edit-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .master-product-secondary-workspace .master-product-media-quick {
    position: static;
    width: var(--master-product-secondary-media-width);
  }

  .master-product-secondary-workspace .master-product-title-rows {
    padding-right: 10px;
  }

  .master-product-secondary-workspace .master-product-edit-grid-row-one,
  .master-product-secondary-workspace .master-product-edit-grid-row-two {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .master-product-secondary-workspace .master-product-set-board {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Sales module r618: standard five-surface document shell. */
.sales-view,
.sales-panel,
.sales-board {
  width: 100%;
  min-width: 0;
}

.sales-panel {
  padding: 10px;
}

.sales-board {
  --sales-line-height: 34px;
  color: #132238;
  font-size: 14px;
}

.sales-loading,
.sales-empty-row {
  padding: 28px;
  color: #6a7787;
  text-align: center;
}

.sales-page-head,
.sales-list-head,
.sales-section-title,
.sales-modal header,
.sales-modal footer,
.sales-doc-actions,
.sales-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sales-page-head,
.sales-list-head {
  min-height: 40px;
  padding: 4px 8px;
  border: 1px solid #c9d7e8;
  background: #fff;
}

.sales-page-head h2,
.sales-list-head h2 {
  margin: 0;
  font-size: 18px;
}

.sales-list-head {
  justify-content: space-between;
}

.sales-status-badge,
.sales-list-status {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.sales-status-badge {
  padding: 5px 12px;
  border: 1px solid currentColor;
  color: #087443;
  background: #f3fff8;
}

.sales-doc-section {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #c9d7e8;
  background: #fff;
}

.sales-doc-section h3 {
  margin: 0 0 7px;
  padding-left: 8px;
  border-left: 2px solid #ef3340;
  font-size: 14px;
}

.sales-basic-grid,
.sales-readonly-basic {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 8px;
}

.sales-basic-grid label,
.sales-readonly-basic span,
.sales-fee-grid label,
.sales-modal-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sales-basic-grid label > span,
.sales-modal-grid label > span {
  flex: 0 0 auto;
  font-weight: 700;
}

.sales-basic-grid input,
.sales-basic-grid select,
.sales-modal-grid input,
.sales-modal-grid select,
.sales-document-table input,
.sales-document-table select,
.sales-list-filter input {
  box-sizing: border-box;
  min-width: 0;
  height: 28px;
  border: 1px solid #b9cce1;
  background: #f9fcff;
  color: #152235;
  font: inherit;
}

.sales-basic-grid input,
.sales-basic-grid select,
.sales-modal-grid input,
.sales-modal-grid select {
  flex: 1 1 auto;
  width: 100%;
}

.sales-customer-field > div {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.sales-section-title {
  justify-content: space-between;
}

.sales-section-title h3 {
  margin-bottom: 0;
}

.sales-section-title span {
  color: #1769c2;
  font-size: 13px;
}

.sales-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.sales-document-table,
.sales-list-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  table-layout: fixed;
}

.sales-document-table.is-raw_material-mode,
.sales-document-table.is-unselected-mode {
  min-width: 1450px;
}

.sales-document-table th,
.sales-document-table td,
.sales-list-table th,
.sales-list-table td {
  height: var(--sales-line-height);
  padding: 3px 5px;
  overflow: hidden;
  border: 1px solid #b9cee5;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-document-table thead th,
.sales-list-table thead th {
  background: #f9eaaa;
  color: #152235;
  font-weight: 700;
}

.sales-list-toolbar-card {
  flex: 0 0 auto;
  margin-top: 0;
  border: 1px solid #d3dce8;
  border-bottom: 0;
  background: #ffffff;
}

.sales-list-tools,
.sales-list-search {
  min-width: 0;
}

.sales-list-table thead th {
  height: 34px;
  padding: 2px 4px;
  vertical-align: middle;
}

.sales-list-table .sales-list-utility-header,
.sales-list-table .sales-list-action-header {
  padding: 2px 5px;
  text-align: center;
}

.sales-list-table th.supplier-purchase-col-select,
.sales-list-table td.supplier-purchase-col-select {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
}

.sales-list-table th.supplier-purchase-col-sequence,
.sales-list-table td.supplier-purchase-col-sequence {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}

.sales-list-sequence {
  color: #36516f;
  font-variant-numeric: tabular-nums;
}

.sales-column-filter-shell {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid #c7d6e5;
  background: #fff;
  color: #152235;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sales-column-filter-shell:hover,
.sales-column-filter-shell:focus-visible,
.sales-column-filter-shell.is-active {
  border-color: #2d72e8;
  background: #f6faff;
  outline: 0;
}

.sales-column-filter-shell > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-column-filter-shell > input[data-sales-list-filter-input] {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: center;
  text-overflow: ellipsis;
}

.sales-column-filter-shell > input[data-sales-list-filter-input]::-webkit-search-cancel-button {
  display: none;
}

.sales-list-end-row td,
.sales-list-page-row td {
  height: 36px;
  padding: 6px 10px;
  border-top-color: #d6e0eb;
  background: #fff;
  color: #087443;
  font-weight: 700;
  text-align: center;
}

.sales-list-page-row td {
  color: #53687d;
  font-weight: 400;
}

.sales-list-page-row button {
  margin: 0 8px;
}

.sales-list-error-row td {
  padding: 7px 10px;
  background: #fff9f7;
  color: #a3352d;
  text-align: center;
}

.sales-list-error-row .ghost-btn {
  margin-left: 8px;
}

.sales-document-table tfoot th,
.sales-document-table tfoot td {
  background: #e7eef7;
  font-size: 15px;
  font-weight: 700;
}

.sales-document-table .col-seq { width: 46px; }
.sales-document-table .col-product { width: 150px; }
.sales-document-table .col-identity { width: 145px; }
.sales-document-table .col-detail { width: 62px; }
.sales-document-table .col-total { width: 75px; }
.sales-document-table .col-stock { width: 75px; }
.sales-document-table .col-unit { width: 65px; }
.sales-document-table .col-price { width: 90px; }
.sales-document-table .col-amount { width: 112px; }
.sales-document-table .col-remark { width: 230px; }
.sales-document-table .col-delete { width: 44px; }

.sales-product-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.sales-product-picker-control {
  display: block;
  width: 100%;
  min-width: 0;
  height: 28px;
  overflow: hidden;
  padding: 0 27px 0 8px;
  border: 1px solid #b9cce1;
  background: #f9fcff;
  color: #5c6876;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.sales-product-picker-control.has-value {
  color: #0d4fb3;
  font-weight: 700;
  padding-left: 27px;
}

.sales-product-picker-control.has-value::before {
  content: "✓";
  position: absolute;
  left: 8px;
  color: #1261c9;
  font-weight: 900;
}

.sales-product-clear {
  position: absolute;
  right: 4px;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid #afbdd0;
  border-radius: 50%;
  background: #fff;
  color: #667483;
  font-size: 13px;
  line-height: 16px;
  cursor: pointer;
}

.sales-stock-cell {
  font-weight: 700;
  color: #0a6a45;
}

.sales-stock-cell.is-insufficient {
  color: #d40000;
  background: #fff1f1;
}

.sales-delete-cell {
  width: 44px;
  padding: 2px !important;
}

.sales-delete-line {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #202832;
  border-radius: 3px;
  background: #fff;
  color: #111;
  font-size: 18px;
  font-weight: 900;
  line-height: 24px;
  cursor: pointer;
}

.sales-delete-line:hover {
  border-color: #d40000;
  color: #d40000;
  background: #fff4f4;
}

.sales-fee-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 8px;
}

.sales-fee-grid label {
  justify-content: space-between;
}

.sales-fee-grid strong {
  color: #e21724;
}

.sales-remark-section label {
  display: flex;
  gap: 10px;
}

.sales-remark-section textarea {
  flex: 1;
  min-height: 32px;
  border: 1px solid #b9cce1;
}

.sales-attachment-section {
  min-height: 105px;
}

.sales-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 62px;
  margin: 6px 0;
}

.sales-attachment-tile {
  position: relative;
  width: 70px;
  height: 60px;
  overflow: hidden;
  border: 1px solid #c6d5e5;
  background: #fff;
}

.sales-attachment-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sales-attachment-tile.is-pending::after {
  content: "待上传";
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 4px;
  background: rgba(17, 29, 45, 0.78);
  color: #fff;
  font-size: 11px;
}

.sales-attachment-picker {
  position: relative;
  display: inline-flex;
  width: max-content;
  overflow: hidden;
}

.sales-attachment-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sales-empty-attachment {
  width: 70px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px dashed #c6d5e5;
  color: #788697;
}

.sales-doc-actions,
.sales-detail-actions {
  justify-content: flex-end;
  padding: 10px 0 0;
}

.sales-list-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
}

.sales-list-filter .supplier-doc-lookup {
  width: 154px;
}

.sales-list-filter .supplier-doc-lookup input {
  width: 100%;
}

.sales-list-filter input[type="search"] {
  width: min(360px, 40vw);
}

.sales-detail-link {
  border: 1px solid #4a8fe7;
  background: #fff;
  color: #0863c9;
  font-weight: 700;
  white-space: nowrap;
}

.sales-list-actions button {
  min-width: max-content;
  white-space: nowrap;
}

.sales-readonly-basic span {
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid #c9d7e8;
}

.sales-readonly-basic em {
  color: #6a7787;
  font-style: normal;
}

.sales-modal-backdrop {
  position: fixed;
  z-index: 13000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 31, 47, .34);
}

.sales-modal {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid #aebfd2;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
}

.sales-modal header,
.sales-modal footer {
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #d6e0eb;
}

.sales-modal footer {
  justify-content: flex-end;
  border-top: 1px solid #d6e0eb;
  border-bottom: 0;
}

.sales-modal header h3 {
  margin: 0;
}

.sales-modal header button {
  border: 0;
  background: transparent;
  font-size: 24px;
}

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

.sales-modal-grid label {
  align-items: stretch;
  flex-direction: column;
}

.sales-modal-grid .span-2 {
  grid-column: span 2;
}

.sales-product-picker {
  width: min(620px, calc(100vw - 32px));
}

.sales-product-picker-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sales-product-picker-title .ghost-btn {
  height: 28px;
  border: 1px solid #aec2d9;
  font-size: 13px;
}

.sales-product-picker-search {
  padding: 10px 14px;
  border-bottom: 1px solid #d6e0eb;
}

.sales-product-picker-search input {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  border: 1px solid #9fb8d4;
  background: #fff;
}

.sales-product-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: min(56vh, 460px);
  overflow-y: auto;
  padding: 12px 14px 16px;
}

.sales-product-picker-option {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: 6px 9px;
  border: 1px solid #bed0e3;
  background: #fff;
  color: #142033;
  text-align: left;
  cursor: pointer;
}

.sales-product-picker-option:hover,
.sales-product-picker-option:focus-visible {
  border-color: #1671d9;
  background: #eef6ff;
}

.sales-product-picker-option strong,
.sales-product-picker-option span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-product-picker-option span {
  margin-top: 3px;
  color: #667689;
  font-size: 12px;
}

.sales-product-picker-empty {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #7c8998;
}

/* 销售引用控件直接复用进货的正式候选视觉；销售只适配客户/仓库/来源单据数据。 */
.supplier-purchase-doc.sales-document-surface .sales-basic-grid.sales-basic-grid-dispatch {
  grid-template-columns: minmax(152px, .82fr) minmax(152px, .82fr) minmax(152px, .82fr) minmax(198px, 1.04fr) minmax(244px, 1.28fr) minmax(218px, 1.08fr);
}

.supplier-purchase-doc.sales-document-surface .sales-basic-grid.sales-basic-grid-return {
  grid-template-columns: minmax(176px, .8fr) minmax(176px, .8fr) minmax(176px, .8fr) minmax(280px, 1.28fr) minmax(220px, 1fr) minmax(244px, 1.12fr);
}

.supplier-purchase-doc.sales-document-surface .sales-basic-grid > .supplier-doc-field.sales-reference-field {
  grid-template-columns: max-content minmax(0, 1fr);
}

.sales-reference-lookup {
  position: relative;
  min-width: 0;
}

.sales-reference-lookup > .clearable-control {
  display: block;
  width: 100%;
}

.sales-reference-lookup input[type="search"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sales-reference-popup {
  position: absolute;
  z-index: 12220;
  top: calc(100% + 4px);
  left: 0;
  width: min(420px, calc(100vw - 46px));
  max-height: 360px;
  overflow: hidden;
}

.sales-reference-popup .selection-search-popup-list {
  max-height: 300px;
  overflow-y: auto;
}

.sales-reference-popup .selection-search-option,
.sales-product-group-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.sales-reference-popup .selection-search-option strong,
.sales-reference-popup .selection-search-option small,
.sales-product-group-option strong,
.sales-product-group-option small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-reference-popup .selection-search-option small,
.sales-product-group-option small,
.sales-product-picker-caption {
  color: #64748b;
  font-size: 12px;
}

.sales-product-group-option b { color: #0f5fb8; font-size: 12px; }
.sales-reference-empty { padding: 20px 14px; color: #64748b; font-size: 12px; }

.purchase-product-modal .purchase-operator-dialog.sales-product-picker {
  width: min(680px, calc(100vw - 32px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.sales-product-picker-body { min-height: 0; padding: 0; overflow: hidden; }
.sales-product-picker-search { padding: 10px 14px 8px; border-bottom: 0; }
.sales-product-picker-caption { padding: 0 14px 8px; }
.sales-product-picker .purchase-doc-style-picker-title { padding: 0 14px 8px; }
.sales-product-picker .selection-search-popup-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 0 14px 14px;
}

.sales-product-variant-option { min-height: 42px; }
.sales-product-variant-option small { margin-left: 6px; color: #64748b; font-size: 12px; }

.sales-reference-maintain-modal .sales-reference-maintain-form { display: contents; }

.purchase-operator-foot button[data-sales-reference-save] {
  border-color: #0f5fb8;
  background: #0f5fb8;
  color: #ffffff;
}

.supplier-doc-line-lookup {
  position: relative;
}

.supplier-doc-stock-cell,
.supplier-doc-table .doc-col-stock {
  text-align: center;
  white-space: nowrap;
}

.supplier-doc-stock-cell [data-purchase-line-stock] {
  color: #e60012;
  font-weight: 700;
}

.supplier-doc-stock-cell button[data-purchase-line-stock],
.sales-stock-button {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.supplier-doc-stock-cell button[data-purchase-line-stock]:disabled,
.sales-stock-button:disabled {
  cursor: default;
}

.supplier-doc-stock-cell button[data-purchase-line-stock]:not(:disabled):hover,
.supplier-doc-stock-cell button[data-purchase-line-stock]:not(:disabled):focus-visible,
.sales-stock-button:not(:disabled):hover,
.sales-stock-button:not(:disabled):focus-visible {
  text-decoration: underline;
  outline: 1px solid #1677ff;
  outline-offset: 2px;
}

.standard-size-stock-dialog {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 29, 46, 0.38);
}

.standard-size-stock-dialog.hidden {
  display: none;
}

.standard-size-stock-panel {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid #9fb7d4;
  background: #fff;
  box-shadow: 0 12px 36px rgba(18, 43, 70, 0.28);
}

.standard-size-stock-panel header,
.standard-size-stock-panel footer,
.standard-size-stock-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
}

.standard-size-stock-panel header {
  justify-content: space-between;
  border-bottom: 1px solid #c8d7e8;
  font-size: 16px;
}

.standard-size-stock-panel header button {
  border: 0;
  background: transparent;
  color: #111;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.standard-size-stock-meta {
  flex-wrap: wrap;
}

.standard-size-stock-meta b {
  margin-left: auto;
  color: #e60012;
}

.standard-size-stock-panel table {
  width: calc(100% - 28px);
  margin: 0 14px;
  border-collapse: collapse;
  table-layout: fixed;
}

.standard-size-stock-panel th,
.standard-size-stock-panel td {
  height: 38px;
  border: 1px solid #a9c1dc;
  text-align: center;
}

.standard-size-stock-panel th {
  background: #f8e9a6;
}

.standard-size-stock-panel td.has-stock {
  color: #0b6b39;
  font-weight: 800;
}

.standard-size-stock-warning {
  margin: 10px 14px 0;
  padding: 8px 10px;
  border: 1px solid #efb0b0;
  background: #fff4f4;
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
}

.standard-size-stock-warning.hidden {
  display: none;
}

.standard-size-stock-panel footer {
  justify-content: flex-end;
}

.standard-size-stock-panel footer button {
  min-width: 72px;
  padding: 6px 14px;
  border: 1px solid #7ea3cc;
  background: #fff;
  cursor: pointer;
}

.standard-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.standard-attachment-item {
  display: grid;
  min-width: 180px;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid #bdd0e6;
  background: #fff;
  color: #164f8f;
  text-align: left;
  cursor: pointer;
}

.standard-attachment-item strong,
.standard-attachment-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standard-attachment-item span,
.standard-attachment-empty {
  color: #6b7f95;
  font-size: 12px;
  line-height: 18px;
}

.standard-attachment-dialog {
  position: fixed;
  z-index: 1900;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 35, 55, .45);
}

.standard-attachment-dialog.hidden { display: none; }

.standard-attachment-panel {
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto;
  width: min(900px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid #98b2d0;
  background: #fff;
  box-shadow: 0 16px 42px rgba(8, 31, 61, .28);
}

.standard-attachment-panel header,
.standard-attachment-panel footer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border-color: #c9d8e9;
}

.standard-attachment-panel header { justify-content: space-between; border-bottom: 1px solid #c9d8e9; }
.standard-attachment-panel footer { justify-content: flex-end; border-top: 1px solid #c9d8e9; }
.standard-attachment-panel header button { border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.standard-attachment-panel footer button,
.standard-attachment-panel footer a { min-width: 72px; padding: 6px 12px; border: 1px solid #b6c9df; background: #fff; color: #0b55a2; text-align: center; }
.standard-attachment-content { display: grid; min-height: 160px; overflow: auto; place-items: center; padding: 12px; background: #f7fafc; }
.standard-attachment-image { display: block; max-width: 100%; max-height: calc(100vh - 180px); object-fit: contain; }
.standard-attachment-pdf { width: 100%; height: min(620px, calc(100vh - 190px)); border: 0; background: #fff; }
.standard-attachment-download-note { color: #5e7188; }

/* 销售模块必须使用进货单据/列表的真实骨架；这里仅保留销售字段适配。 */
.supplier-purchase-doc.sales-document-surface {
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(820px, calc(100dvh - 132px));
}

.supplier-purchase-doc.sales-document-surface.sales-surface-create {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.supplier-purchase-doc.sales-document-surface > .supplier-sales-page-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #d9e0e7;
  background: #ffffff;
}

.supplier-purchase-doc.sales-document-surface > .supplier-sales-page-head h2 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.supplier-purchase-doc.sales-document-surface .supplier-doc-basic-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.supplier-purchase-doc.sales-document-surface .sales-basic-grid > label,
.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic > span {
  min-width: 0;
}

.supplier-purchase-doc.sales-document-surface .sales-basic-grid > .supplier-doc-field {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.supplier-purchase-doc.sales-document-surface .sales-basic-grid > .supplier-doc-field.is-wide { grid-column: span 2; }

.supplier-purchase-doc.sales-document-surface .sales-basic-grid > label > span {
  flex: 0 0 auto;
  color: #111827;
  font-weight: 700;
}

.supplier-purchase-doc.sales-document-surface .supplier-doc-table-wrap,
.supplier-purchase-detail-page-workspace.sales-readonly-surface .supplier-doc-table-wrap {
  min-width: 0;
  overflow: auto;
}

.supplier-purchase-doc.sales-document-surface .supplier-doc-table,
.supplier-purchase-detail-page-workspace.sales-readonly-surface .supplier-doc-table {
  min-width: 1560px;
  table-layout: fixed;
}

.supplier-purchase-doc.sales-document-surface .supplier-doc-table input,
.supplier-purchase-doc.sales-document-surface .supplier-doc-table select,
.supplier-purchase-doc.sales-document-surface .sales-product-picker-control,
.supplier-purchase-doc.sales-document-surface .sales-product-select-wrap {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.supplier-purchase-doc.sales-document-surface .supplier-doc-table td {
  padding: 3px 5px;
  vertical-align: middle;
}

.supplier-purchase-doc.sales-document-surface .sales-attachment-section,
.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-attachment-section {
  min-height: 112px;
}

.supplier-purchase-workspace.sales-list-surface,
.supplier-purchase-workspace.sales-customer-master {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.supplier-purchase-workspace.sales-list-surface {
  height: auto !important;
  padding: 0 0 6px;
}

.sales-list-surface .sales-list-scaffold {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.sales-list-surface .sales-list-head,
.sales-customer-master .sales-list-head {
  min-height: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.sales-list-surface .sales-list-head h2,
.sales-customer-master .sales-list-head h2 {
  color: #102033;
  font-size: 23px;
  line-height: 32px;
}

.sales-list-surface .supplier-purchase-list-table-wrap,
.sales-customer-master .supplier-purchase-list-table-wrap,
.operating-data-list .supplier-purchase-list-table-wrap {
  max-height: min(68vh, 690px);
  overflow: auto;
  border: 1px solid #c2cfdd;
}

.sales-list-surface .supplier-purchase-list-table,
.sales-customer-master .supplier-purchase-list-table {
  width: var(--supplier-purchase-list-table-width, max-content);
  min-width: var(--supplier-purchase-list-table-width, max-content);
  max-width: none;
  table-layout: fixed;
}

.sales-list-surface .supplier-purchase-list-table th,
.sales-customer-master .supplier-purchase-list-table th {
  height: 39px;
  min-height: 39px;
  padding: 2px 3px 2px 4px;
  color: #000000;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.18;
  vertical-align: middle;
  white-space: normal;
}

.sales-list-surface .supplier-purchase-list-table td,
.sales-customer-master .supplier-purchase-list-table td {
  height: 34px;
  min-height: 34px;
  padding: 3px 4px;
  color: #001b3a;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.18;
  vertical-align: middle;
}

.sales-list-surface .sales-list-sequence,
.sales-customer-master .sales-list-sequence {
  color: #526274;
  font-weight: 700;
}

.sales-list-surface .sales-column-filter-shell,
.sales-customer-master .sales-column-filter-shell {
  height: 28px;
  min-height: 0;
  padding: 0 17px 0 4px;
  border-color: #c9d38e;
  background: #fbf7e7;
  color: #000000;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 26px;
}

.sales-list-surface .sales-column-filter-shell:hover,
.sales-list-surface .sales-column-filter-shell:focus-visible,
.sales-list-surface .sales-column-filter-shell.is-active,
.sales-customer-master .sales-column-filter-shell:hover,
.sales-customer-master .sales-column-filter-shell:focus-visible,
.sales-customer-master .sales-column-filter-shell.is-active {
  border-color: #c9d38e;
  background: #ffffff;
}

.sales-list-summary-row td {
  background: #e7eef7;
  color: #102033;
  font-weight: 800;
}

.operating-data-list .supplier-purchase-list-table-wrap { min-width: 0; }
.operating-data-list .operating-table { min-width: 1460px; }
.operating-data-list .operating-table th { width: auto !important; }
.operating-table td.supplier-purchase-col-businessDate,
.operating-table td.supplier-purchase-col-styleNo,
.operating-table td.supplier-purchase-col-stage,
.operating-table td.supplier-purchase-col-priority,
.operating-table td.supplier-purchase-col-handlingStatus,
.operating-table td.supplier-purchase-col-owner,
.operating-table td.supplier-purchase-col-attachment,
.operating-table td.supplier-purchase-col-action { text-align: center; }
.operating-table td.supplier-purchase-col-conversationId { font-weight: 800; }
.operating-data-list .operating-list-tail { padding: 8px 10px; color: #64778b; text-align: center; font-size: 12px; }
.operating-data-list .operating-list-tail-limit { color: #8b5b12; font-weight: 700; }
.operating-data-list .operating-list-tail-error { color: #a23a3a; }

/* 2026-08-02 裁床单：统一为进货单表格密度，弹窗不暴露内部库存术语。 */
.cut-order-output-picker-layer {
  position: fixed;
  z-index: 13110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cut-order-output-picker {
  position: fixed;
  z-index: 13120;
  width: min(620px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid #b8c9df;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
  transform: none;
  display: flex;
  flex-direction: column;
}

.cut-order-output-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 9px;
  border-bottom: 1px solid #cfdae7;
  color: #102f55;
  font-size: 14px;
}

.cut-order-output-picker-head > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cut-order-picker-back {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid #b8c9df;
  border-radius: 2px;
  background: #fff;
  color: #075fbd;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cut-order-picker-back:hover,
.cut-order-picker-back:focus-visible {
  border-color: #2f7ed8;
  background: #eef6ff;
  outline: 0;
}

.cut-order-output-picker-list {
  max-height: 330px;
  overflow: auto;
  border-top: 1px solid #d6e0ec;
}

.cut-order-output-picker-group + .cut-order-output-picker-group { border-top: 1px solid #c8d6e6; }
.cut-order-output-picker-style { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; min-height: 28px; padding: 0 9px; background: #f4f8fd; color: #344b68; text-align: left; }
.cut-order-output-picker-style span { overflow: hidden; color: #60728c; text-overflow: ellipsis; white-space: nowrap; }
.cut-order-output-picker-style-choice { display: grid; grid-template-columns: minmax(68px, .82fr) minmax(48px, .58fr) minmax(72px, 1fr) minmax(76px, .88fr) 58px; gap: 7px; align-items: center; width: 100%; min-height: 38px; padding: 4px 9px; border: 0; border-top: 1px solid #e1e8f1; background: #fff; color: #102f55; text-align: left; cursor: pointer; }
.cut-order-output-picker-style-choice:hover, .cut-order-output-picker-style-choice:focus-visible { background: #eef6ff; outline: 0; }
.cut-order-output-picker-style-choice span { min-width: 0; overflow: hidden; color: #60728c; text-overflow: ellipsis; white-space: nowrap; }
.cut-order-output-picker-style-choice em { justify-self: end; color: #c2410c; font-size: 11px; font-style: normal; font-weight: 900; white-space: nowrap; }
.cut-order-output-picker-option { display: grid; grid-template-columns: 18px minmax(125px, .65fr) minmax(0, 1fr); align-items: center; min-height: 34px; padding: 0 9px; border-top: 1px solid #e1e8f1; background: #fff; text-align: left; cursor: pointer; }
.cut-order-output-picker-option:hover:not(.is-disabled) { background: #eef6ff; }
.cut-order-output-picker-option.is-selected { background: #dcecff; }
.cut-order-output-picker-option.is-disabled { color: #9aa7b7; cursor: not-allowed; }
.cut-order-output-picker-option input { margin: 0; }
.cut-order-output-picker-option span { overflow: hidden; color: #60728c; text-overflow: ellipsis; white-space: nowrap; }
.cut-order-output-picker > footer { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 5px 8px; border-top: 1px solid #c8d6e6; background: #f8fbff; }
.cut-order-output-picker > footer > div { display: flex; gap: 6px; }
.cut-order-output-picker .cut-order-picker-close { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; border: 1px solid #b8c9df; border-radius: 2px; background: #fff; color: #344b68; font-size: 15px; line-height: 22px; }
.cut-order-output-picker-button { width: 100%; height: 22px; overflow: hidden; padding: 1px 5px; border: 1px solid #c6d4e5; border-radius: 2px; background: #fff; color: #102f55; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cut-order-output-picker-button:hover:not(:disabled), .cut-order-output-picker-button:focus-visible { border-color: #2f7ed8; outline: 0; }
.cut-order-output-style-input { width: 100%; height: 22px; min-width: 0; box-sizing: border-box; padding: 1px 5px; border: 1px solid #c6d4e5; border-radius: 2px; background: #fff; color: #102f55; font: inherit; text-align: left; }
.cut-order-output-style-input:hover:not(:disabled), .cut-order-output-style-input:focus { border-color: #2f7ed8; outline: 0; }
.cut-order-reconciliation-section { display: grid; gap: 7px; min-height: 0; }
.cut-order-reconciliation-section .cost-accounting-section-header p { margin: 1px 0 0; color: #60728c; font-size: 12px; }
.cut-order-reconciliation-status-field { display: inline-flex; align-items: center; gap: 5px; }
.cut-order-reconciliation-status-field select { box-sizing: border-box; min-width: 92px; height: 28px; }
.cut-order-reconciliation-table { min-width: 1100px; }
.cut-order-reconciliation-table th, .cut-order-reconciliation-table td { height: 30px; padding: 3px 6px; }

/* 备注属于单据明细尾部；底部仅承载成本和操作，避免挤占主表。 */
.cut-order-form-workspace .cut-order-actual-section { grid-template-rows: auto auto auto; align-content: start; gap: 3px; }
.cut-order-form-workspace .cut-order-actual-section > .cost-accounting-section-header { min-height: 28px; height: 28px; margin: 0; padding: 0; }
.cut-order-form-workspace .cut-order-actual-section > .cost-accounting-section-header h3 { line-height: 28px; }
.cut-order-form-workspace .cut-order-actual-section .cut-order-remark-field { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 5px; width: 100%; font-size: 13px; font-weight: 600; }
.cut-order-form-workspace .cut-order-actual-section .cut-order-remark-field input { height: 28px; box-sizing: border-box; }
.cut-order-form-workspace .cut-order-form-footer { margin-top: 0; }
.cut-order-form-workspace .cut-order-footer-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cut-order-form-workspace .cut-order-cost-summary { min-width: 0; margin-right: auto; }
.cut-order-form-workspace .cut-order-footer-readiness { flex: 1 1 auto; min-width: 220px; overflow: hidden; color: #101828; font-size: 12px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.cut-order-form-workspace .cut-order-footer-readiness.is-ready,
.cut-order-form-workspace .cut-order-footer-readiness.is-pending { color: #101828; }
.cut-order-form-workspace .cut-order-footer-actions { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 7px; margin-left: auto; }

/* 2026-08-04 裁床单详情闭环：成品矩阵、匹配方式、总件数和动态成本保持同高紧凑。 */
.cut-order-form-workspace .cut-order-form-grid {
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  width: 100%;
  gap: 7px 16px;
}

.cut-order-form-workspace[data-standard-operation-form] .cut-order-form-grid .supplier-doc-field {
  grid-template-columns: 72px 142px;
  justify-content: start;
  gap: 6px;
}

.cut-order-form-workspace[data-standard-operation-form] .cut-order-form-grid .supplier-doc-field > input,
.cut-order-form-workspace[data-standard-operation-form] .cut-order-form-grid .supplier-doc-field > select,
.cut-order-form-workspace[data-standard-operation-form] .cut-order-form-grid .supplier-doc-field > .supplier-doc-lookup,
.cut-order-form-workspace[data-standard-operation-form] .cut-order-form-grid .supplier-doc-field > .clearable-control {
  width: 142px;
  min-width: 142px;
  max-width: 142px;
}

.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-form-grid .supplier-doc-field > span,
.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-head-fact,
.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-detail-table td {
  color: #56687d;
  font-weight: 500;
}

.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-form-grid input:disabled,
.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-detail-table input:disabled,
.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-detail-table select:disabled,
.cut-order-form-workspace[data-operation-form-surface="readonly"] .cut-order-output-table input:disabled {
  border-color: #d5dee9;
  background: #f6f8fb;
  color: #5f7083;
  font-weight: 500;
  box-shadow: none;
  opacity: 1;
  -webkit-text-fill-color: #5f7083;
}

.cut-order-form-workspace:not([data-operation-form-surface="readonly"]) .cut-order-detail-table input:not(:disabled),
.cut-order-form-workspace:not([data-operation-form-surface="readonly"]) .cut-order-detail-table select:not(:disabled),
.cut-order-form-workspace:not([data-operation-form-surface="readonly"]) .cut-order-output-table input:not(:disabled) {
  border-color: #91b8e5;
  background: #fff;
  color: #143a69;
  font-weight: 600;
}

.cut-order-form-workspace:not([data-operation-form-surface="readonly"]) .cut-order-detail-table input:not(:disabled):focus,
.cut-order-form-workspace:not([data-operation-form-surface="readonly"]) .cut-order-detail-table select:not(:disabled):focus,
.cut-order-form-workspace:not([data-operation-form-surface="readonly"]) .cut-order-output-table input:not(:disabled):focus {
  border-color: #2f78d8;
  outline: 1px solid rgba(47, 120, 216, .22);
  outline-offset: 0;
}

.cut-order-output-shell {
  grid-template-columns: 64px minmax(0, 1fr) 112px 108px;
  align-items: stretch;
  gap: 5px;
}

.cut-order-output-shell.has-output-total {
  grid-template-columns: 64px minmax(0, 1fr) 112px 94px 108px;
}

.cut-order-output-shell:not(.has-output-total) .cut-order-output-total-card {
  display: none;
}

.cut-order-output-match-actions {
  align-content: center;
  padding: 3px;
}

.cut-order-output-match-actions .secondary-button {
  height: 26px;
  min-height: 26px;
  padding: 1px 3px;
  line-height: 20px;
}

.cut-order-output-total-card,
.cut-order-output-dynamic-cost {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid #b8c9df;
  background: #f8fbff;
  color: #50647e;
  text-align: center;
}

.cut-order-output-total-card > span,
.cut-order-output-dynamic-cost > span {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cut-order-output-total-card > strong,
.cut-order-output-dynamic-cost > strong {
  color: #075fbd;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cut-order-output-matrix-scroll {
  max-height: 100px;
  margin-top: 0;
  align-self: start;
}

.cut-order-output-table th {
  height: 29px;
  line-height: 1.2;
  vertical-align: middle;
}

.cut-order-output-table tbody td {
  height: 32px;
  vertical-align: middle;
}

.cut-order-output-table input,
.cut-order-output-picker-button,
.cut-order-output-style-input {
  height: 25px;
}

.cut-order-size-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

.cut-order-size-input::-webkit-inner-spin-button,
.cut-order-size-input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.cut-order-force-edit-centered-status {
  color: #f04438;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.cut-order-form-workspace .cut-order-actual-section .cut-order-remark-field {
  min-height: 56px;
  color: #c62828;
  font-weight: 400;
}

.cut-order-form-workspace .cut-order-actual-section .cut-order-remark-field > span {
  color: #c62828;
}

.cut-order-form-workspace .cut-order-actual-section .cut-order-remark-field input {
  height: 56px;
  padding: 6px 8px;
  border-color: #d6a7a7;
  background: #fff;
  color: #c62828;
  font-weight: 400;
}

.cut-order-form-workspace .cut-order-footer-main,
.cut-order-form-workspace .cut-order-footer-actions {
  justify-content: flex-end;
  width: 100%;
}

.cut-order-form-workspace .cut-order-form-footer {
  grid-template-columns: minmax(0, 1fr);
}

.cut-order-form-workspace .cut-order-footer-main {
  grid-column: 1 / -1;
}

.cut-order-form-workspace .cut-order-footer-actions .danger-button {
  min-height: 29px;
}

@media (max-width: 1440px) {
  .cut-order-form-workspace .cut-order-form-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

  .cut-order-output-shell,
  .cut-order-output-shell.has-output-total {
    grid-template-columns: 58px minmax(0, 1fr) 106px 88px 104px;
  }

  .cut-order-output-shell:not(.has-output-total) {
    grid-template-columns: 58px minmax(0, 1fr) 106px 104px;
  }
}

@media (max-width: 980px) {
  .cut-order-form-workspace .cut-order-form-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .cut-order-output-shell,
  .cut-order-output-shell.has-output-total {
    grid-template-columns: 58px minmax(620px, 1fr) 106px 88px 104px;
  }
}

.cut-order-status-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #60728c;
  font-size: 11px;
  white-space: nowrap;
}

.cut-order-status-strip > strong { color: #15365f; }
.cut-order-status-strip > span {
  padding: 2px 5px;
  border: 1px solid #d2ddea;
  background: #f8fafc;
}
.cut-order-status-strip > span.is-done { color: #08733d; border-color: #b9d9c6; background: #f2fbf5; }

/* Sales documents deliberately share the purchase document contract in every surface. */
.supplier-purchase-doc.sales-document-surface .sales-section-title span {
  color: #1e80ff;
  font-size: 12px;
}

.supplier-purchase-doc.sales-document-surface .sales-document-table th,
.supplier-purchase-doc.sales-document-surface .sales-document-table td {
  height: 44px;
  padding: 3px;
  border-color: #e1e7ef;
  background: #fbfdff;
  color: #1f2937;
  font-size: 13px;
}

.supplier-purchase-doc.sales-document-surface .sales-document-table thead th {
  height: 32px;
  background: #f6f8fb;
  color: #1f2937;
  font-size: 12px;
  font-weight: 800;
}

.supplier-purchase-doc.sales-document-surface .sales-document-table input,
.supplier-purchase-doc.sales-document-surface .sales-document-table select {
  height: 28px;
  border-color: #cbd6e2;
  background: #fff;
  color: #172333;
  font-size: 13px;
}

.supplier-purchase-doc.sales-document-surface .sales-document-table tfoot th,
.supplier-purchase-doc.sales-document-surface .sales-document-table tfoot td {
  height: 34px;
  background: #e7eef7;
  color: #172333;
  font-size: 14px;
  font-weight: 900;
}

.supplier-purchase-doc.sales-document-surface .sales-delete-line {
  border-color: #64748b;
  color: #111827;
  line-height: 1;
}

.supplier-purchase-doc.sales-document-surface .sales-delete-line:hover,
.supplier-purchase-doc.sales-document-surface .sales-delete-line:focus-visible {
  border-color: #111827;
  background: #f8fafc;
  color: #111827;
  outline: 0;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface > .sales-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid #ccd9e8;
  background: #fff;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 0;
  border: 1px solid #d5e0ea;
  background: #fff;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 9px;
  border-right: 1px solid #d5e0ea;
  border-bottom: 1px solid #d5e0ea;
  color: #172333;
  font-size: 13px;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic > span:nth-child(4n) {
  border-right: 0;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic > span:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic em {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-readonly-basic strong {
  min-width: 0;
  overflow: hidden;
  color: #172333;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-document-table th,
.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-document-table td {
  height: 27px;
  padding: 3px 6px;
  border-color: #c8d7e8;
  background: #fff;
  color: #172333;
  font-size: 13px;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-document-table thead th {
  background: #dbeafe;
  border-color: #b8cfe6;
  color: #0c365e;
  font-size: 12px;
  font-weight: 800;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-document-table tfoot th,
.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-document-table tfoot td {
  background: #edf4fb;
  color: #172333;
  font-size: 13px;
  font-weight: 900;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-fee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0;
  border: 1px solid #d5e0ea;
  background: #fff;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-fee-grid label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 6px 9px;
  border-right: 1px solid #d5e0ea;
  color: #172333;
  font-size: 12px;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-fee-grid label:last-child {
  border-right: 0;
}

.supplier-purchase-detail-page-workspace.sales-readonly-surface .sales-fee-grid strong {
  color: #ff2f42;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 1100px) {
  .sales-basic-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .sales-fee-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .supplier-purchase-doc.sales-document-surface .sales-basic-grid.sales-basic-grid-dispatch,
  .supplier-purchase-doc.sales-document-surface .sales-basic-grid.sales-basic-grid-return { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
}

@media (max-width: 720px) {
  .sales-panel { padding: 4px; }
  .sales-basic-grid,
  .sales-readonly-basic,
  .sales-fee-grid,
  .sales-modal-grid { grid-template-columns: 1fr; }
  .sales-modal-grid .span-2 { grid-column: auto; }
  .supplier-purchase-doc.sales-document-surface .sales-basic-grid.sales-basic-grid-dispatch,
  .supplier-purchase-doc.sales-document-surface .sales-basic-grid.sales-basic-grid-return { grid-template-columns: 1fr; }
}

.employee-feedback-shell { width: min(640px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
.employee-feedback-main.is-compose, .employee-feedback-main.is-list { overflow: auto; }
.employee-feedback-compose { width: 100%; max-width: none; box-sizing: border-box; margin: 0; padding: 18px 16px 16px; }
.employee-feedback-list-view:not(.is-admin) { width: 100%; max-width: none; box-sizing: border-box; margin: 0; padding: 18px 16px; }
.employee-feedback-shell .employee-feedback-list-view.is-admin { width: 100%; max-width: none; box-sizing: border-box; padding: 14px 10px 18px; }
.employee-feedback-admin-workspace { display: block; min-height: 0; margin-top: 0; }
.employee-feedback-admin-ledger-pane { min-height: 0; height: auto; }
.employee-feedback-admin-table-wrap { width: 100%; max-height: calc(100dvh - 286px); }
.employee-feedback-admin-table { width: 100%; min-width: 0; max-width: none; }
.employee-feedback-admin-table .employee-feedback-admin-col-number { width: 8%; }
.employee-feedback-admin-table .employee-feedback-admin-col-status { width: 10%; }
.employee-feedback-admin-table .employee-feedback-admin-col-submitter { width: 15%; }
.employee-feedback-admin-table .employee-feedback-admin-col-recipient { width: 17%; }
.employee-feedback-admin-table .employee-feedback-admin-col-privacy { width: 14%; }
.employee-feedback-admin-table .employee-feedback-admin-col-title { width: 24%; }
.employee-feedback-admin-table .employee-feedback-admin-col-action { width: 12%; }
.employee-feedback-admin-detail-pane { display: none; }
.employee-feedback-admin-detail-layer { position: fixed; z-index: 1202; inset: 0; display: grid; place-items: center; padding: 24px; }
.employee-feedback-admin-detail-shield { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.employee-feedback-admin-detail-modal { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(640px, calc(100vw - 24px)); height: min(820px, calc(100dvh - 24px)); min-height: 0; overflow: hidden; border: 1px solid #a9bfd9; border-radius: 8px; background: #f8fbff; box-shadow: 0 20px 58px rgba(15, 23, 42, .3); }
.employee-feedback-admin-detail-modal > header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px 0 16px; border-bottom: 1px solid #cbd8e8; background: #fff; color: #0f365f; font-size: 16px; font-weight: 700; }
.employee-feedback-admin-detail-close { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: #315677; font-size: 25px; line-height: 28px; cursor: pointer; }
.employee-feedback-admin-detail-close:hover { background: #eef5ff; color: #0b66bc; }
.employee-feedback-admin-detail-body, .employee-feedback-admin-detail-modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; }
.employee-feedback-admin-detail-body > .employee-feedback-admin-record, .employee-feedback-admin-detail-modal-body > .employee-feedback-admin-record { margin: 0; border: 0; box-shadow: none; }
.employee-feedback-admin-detail-loading { padding: 44px 16px; color: #60728c; text-align: center; }
.employee-feedback-image-lightbox { z-index: 1203; }
.employee-feedback-image-card { display: grid; justify-items: start; gap: 5px; }
.employee-feedback-image { display: block; overflow: hidden; background: #ffffff; }
.employee-feedback-image img { object-fit: contain; background: #f8fafc; image-orientation: from-image; transform: rotate(var(--employee-feedback-image-rotation, 0deg)); transition: transform .16s ease; }
.employee-feedback-image-card.is-quarter-turn .employee-feedback-image { width: 72px; height: 94px; }
.employee-feedback-image-card.is-quarter-turn .employee-feedback-image img { width: 94px; height: 72px; max-width: none; max-height: none; }
.employee-feedback-image-rotation-controls { display: inline-flex; gap: 4px; }
.employee-feedback-image-rotation-controls button { min-height: 24px; padding: 2px 6px; border: 1px solid #adc8e0; border-radius: 3px; background: #fff; color: #245b86; font-size: 11px; line-height: 1.2; cursor: pointer; }
.employee-feedback-image-rotation-controls button:hover:not(:disabled) { border-color: #2879bd; background: #eef7ff; }
.employee-feedback-image-rotation-controls button:disabled { opacity: .55; cursor: wait; }
.employee-feedback-image-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 72px);
  max-height: calc(100dvh - 72px);
  object-fit: contain;
  transform: rotate(var(--employee-feedback-image-rotation, 0deg));
  transition: transform .16s ease;
}
.employee-feedback-image-lightbox.is-quarter-turn img {
  max-width: calc(100dvh - 72px);
  max-height: calc(100vw - 72px);
}

@media (min-width: 781px) {
  .employee-feedback-shell .employee-feedback-main.is-list:has(.employee-feedback-list-view.is-admin),
  .employee-feedback-shell .employee-feedback-list-view.is-admin { overflow: hidden; }
  .employee-feedback-shell .employee-feedback-list-view.is-admin { display: flex; flex-direction: column; min-height: 0; height: 100%; }
  .employee-feedback-shell .employee-feedback-admin-workspace { display: flex; flex: 1 1 auto; min-height: 0; height: 100%; margin-top: 0; overflow: hidden; }
  .employee-feedback-shell .employee-feedback-admin-ledger-pane { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; border: 1px solid #b7cadc; border-radius: 4px; background: #ffffff; }
  .employee-feedback-shell .employee-feedback-admin-table-wrap { flex: 1 1 auto; width: 100%; min-height: 0; height: auto; max-height: none; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
}
@media (max-width: 780px) {
  .employee-feedback-shell { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); margin: 6px auto; border-radius: 10px; }
  .employee-feedback-compose, .employee-feedback-list-view:not(.is-admin) { width: 100%; padding: 14px; }
  .employee-feedback-shell .employee-feedback-list-view.is-admin { padding: 12px; }
  .employee-feedback-admin-table { min-width: 620px; }
  .employee-feedback-admin-detail-layer { padding: 6px; }
  .employee-feedback-admin-detail-modal { width: 100%; height: calc(100dvh - 12px); border-radius: 10px; }
  .employee-feedback-admin-detail-body, .employee-feedback-admin-detail-modal-body { padding: 10px; }
}
.standard-multiselect { position: relative; min-width: 0; }
.standard-multiselect-control { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 40px; padding: 4px 34px 4px 10px; border: 1px solid #9bb8d5; border-radius: 4px; background: #fff; box-shadow: inset 0 1px 1px rgba(36, 91, 134, .04); }
.standard-multiselect-control:focus-within, .standard-multiselect-control:has(.standard-multiselect-chip) { border-color: #2d72b7; box-shadow: 0 0 0 2px rgba(45, 114, 183, .12); }
.standard-multiselect-chips { display: contents; }
.standard-multiselect-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 26px; gap: 4px; padding: 2px 5px 2px 7px; border: 1px solid #69a7ee; border-radius: 3px; background: #e7f2ff; color: #0d5ca8; font-size: 13px; line-height: 20px; }
.standard-multiselect-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standard-multiselect-chip button, .standard-multiselect-clear { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #27629a; font-size: 17px; line-height: 18px; cursor: pointer; }
.standard-multiselect-chip button:hover, .standard-multiselect-clear:hover, .standard-multiselect-chip button:focus-visible, .standard-multiselect-clear:focus-visible { background: #cfe6ff; outline: none; }
.standard-multiselect-control input { flex: 1 1 150px; min-width: 120px; height: 28px; padding: 0; border: 0; outline: 0; background: transparent; color: #173d63; font-size: 14px; }
.standard-multiselect-control input::-webkit-search-cancel-button { -webkit-appearance: none; }
.standard-multiselect-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }
.standard-multiselect-control:has(input:placeholder-shown) .standard-multiselect-clear { display: none; }
.standard-multiselect-menu { position: absolute; z-index: 8; inset: calc(100% + 4px) 0 auto; overflow: hidden; border: 1px solid #91b4d7; border-radius: 4px; background: #fff; box-shadow: 0 8px 20px rgba(22, 58, 91, .18); }
.standard-multiselect-menu-head { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 10px; border-bottom: 1px solid #d7e3ef; background: #f7fbff; color: #24557f; font-size: 12px; }
.standard-multiselect-menu-head small { color: #6b7d90; font-size: 12px; }
.standard-multiselect-options { max-height: 240px; overflow: auto; }
.standard-multiselect-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; min-height: 48px; gap: 4px 12px; padding: 8px 10px; border: 0; border-bottom: 1px solid #e3ecf5; background: #fff; color: #163b61; text-align: left; cursor: pointer; }
.standard-multiselect-option[hidden], .standard-multiselect-match[hidden], .standard-multiselect-empty[hidden] { display: none !important; }
.standard-multiselect-option:hover, .standard-multiselect-option:focus-visible { background: #eaf4ff; outline: 0; }
.standard-multiselect-option strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.standard-multiselect-option small { min-width: 0; overflow: hidden; color: #718096; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.standard-multiselect-match { align-self: center; grid-column: 2; grid-row: 1 / span 2; padding: 1px 5px; border: 1px solid #b5d4f5; border-radius: 10px; background: #f3f9ff; color: #2372ba; font-size: 11px; }
.standard-multiselect-empty { display: block; padding: 14px 10px; color: #6c7e90; font-size: 13px; text-align: center; }

.standard-image-slot-grid{min-width:0}
.standard-image-slot-list{display:flex;flex-wrap:wrap;gap:8px}
.standard-image-slot-grid.is-single-line .standard-image-slot-list{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}
.standard-image-slot-grid.is-single-line .standard-image-slot{flex:none}
.standard-image-slot{position:relative;width:96px;height:88px;overflow:hidden;border:1px dashed #7fb5ea;background:#fff}
.standard-image-slot-add{display:grid;place-items:center;color:#2d72b7;cursor:pointer}
.standard-image-slot-add:hover,.standard-image-slot-add:focus-visible{border-color:#1672c7;background:#eef7ff;outline:0}
.standard-image-slot-add span{font-size:30px;font-weight:300;line-height:1}
.standard-image-slot-filled{border-style:solid;border-color:#bfd2e5;background:#f7fbff}
.standard-image-slot-preview{display:grid;width:100%;height:100%;padding:0;border:0;background:#f8fafc;cursor:zoom-in}
.standard-image-slot-preview img {width:100%;height:100%;object-fit: contain;image-orientation: from-image;}
.standard-image-slot-remove{position:absolute;top:3px;right:3px;width:20px;height:20px;padding:0;border:1px solid #fffe;border-radius:50%;background:#1a344dc2;color:#fff;font-size:16px;line-height:17px;cursor:pointer}
.standard-image-slot-remove:hover,.standard-image-slot-remove:focus-visible{background:#c93838;outline:0}
.standard-image-slot-status{position:absolute;inset:auto 3px 3px;overflow:hidden;padding:2px 4px;background:#143758c2;color:#fff;font-size:10px;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.standard-operation-form-bounded-matrix,.standard-operation-form-bounded-matrix-frame{min-width:0;max-width:100%;overflow:hidden}
.standard-operation-form-bounded-matrix{width:100%}
.standard-operation-form-bounded-matrix-scroll{width:100%;max-height:min(360px,calc(100dvh - 410px));overflow:auto}
.standard-operation-form-bounded-matrix table{width:100%;table-layout:fixed;border-collapse:collapse}
.standard-operation-form-bounded-matrix thead{position:sticky;top:0;z-index:2}
.standard-operation-form-bounded-matrix th,.standard-operation-form-bounded-matrix td{height:34px;overflow:hidden;padding:3px 5px;text-overflow:ellipsis;white-space:nowrap}

.standard-record-detail-layer{position:fixed;z-index:1202;inset:0;display:grid;place-items:center;padding:24px}
.standard-record-detail-shield{position:absolute;inset:0;background:#0f172a73}
.standard-record-detail-dialog{position:relative;z-index:1;display:flex;flex-direction:column;width:min(640px,calc(100vw - 24px));height:min(820px,calc(100dvh - 24px));min-height:0;overflow:hidden;border:1px solid #a9bfd9;border-radius:8px;background:#f8fbff;box-shadow:0 20px 58px #0f172a4d}
.standard-record-detail-dialog>header{display:flex;flex:none;align-items:center;justify-content:space-between;min-height:48px;gap:12px;padding:0 14px 0 16px;border-bottom:1px solid #cbd8e8;background:#fff;color:#0f365f}
.standard-record-detail-dialog>header strong{display:block;font-size:16px}
.standard-record-detail-dialog>header span{display:block;margin-top:2px;color:#60728c;font-size:12px;font-weight:400}
.standard-record-detail-dialog>header button{width:30px;height:30px;flex:none;padding:0;border:0;border-radius:3px;background:transparent;color:#315677;font-size:25px;line-height:28px;cursor:pointer}
.standard-record-detail-dialog>header button:hover,.standard-record-detail-dialog>header button:focus-visible{background:#eef5ff;color:#0b66bc;outline:0}
.standard-record-detail-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; }
.standard-record-detail-dialog.standard-document-detail-dialog { width: min(1540px, 80vw); height: min(900px, 82dvh); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
.standard-document-detail-body { display: flex; min-width: 0; min-height: 0; flex-direction: column; padding: 8px; }
.standard-document-detail-body > * { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; }
.standard-document-detail-body [data-standard-document-detail-modal] { min-width: min-content; }
.transfer-document-detail-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #c8d6e5; border-left: 1px solid #c8d6e5; }
.transfer-document-detail-facts > span { display: grid; min-width: 0; gap: 3px; padding: 8px; border-right: 1px solid #c8d6e5; border-bottom: 1px solid #c8d6e5; background: #fff; }
.transfer-document-detail-facts em { color: #64748b; font-style: normal; }

@media (max-width: 760px) {
  .standard-record-detail-dialog.standard-document-detail-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-width: none; max-height: none; }
  .transfer-document-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.erp-image-preview-canvas.is-quarter-turn { display: grid; place-items: center; }
.erp-image-preview-canvas img { image-orientation: from-image; transform: rotate(var(--erp-image-preview-rotation, 0deg)); transform-origin: top center; transition: transform .16s ease; }
.erp-image-preview-canvas.is-quarter-turn img { max-width: min(calc(100dvh - 170px), 980px); max-height: min(calc(100vw - 68px), 1280px); }

@media (max-width: 700px) {
  .standard-record-detail-layer { padding: 6px; }
  .standard-record-detail-dialog { width: 100%; height: calc(100dvh - 12px); border-radius: 10px; }
  .standard-record-detail-body { padding: 10px; }
}
@media (max-width: 520px) {
  .standard-multiselect-menu-head small { display: none; }
  .standard-image-slot { width: 88px; height: 80px; }
}
.standard-document-force-edit-layer{position:fixed;inset:0;z-index:10080;display:grid;place-items:center;padding:16px}
.standard-document-force-edit-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.42)}
.standard-document-force-edit-dialog{position:relative;width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;border:1px solid #cbd5e1;border-radius:12px;background:#fff;box-shadow:0 20px 48px rgba(15,23,42,.24)}
.standard-document-force-edit-dialog>header,.standard-document-force-edit-dialog>footer{display:flex;align-items:center;padding:14px 18px}
.standard-document-force-edit-dialog>header{border-bottom:1px solid #e2e8f0}
.standard-document-force-edit-dialog>header h2{margin:0;font-size:18px}
.standard-document-force-edit-body{display:grid;gap:12px;padding:16px 18px}
.standard-document-force-edit-body p{margin:0;line-height:1.6}
.standard-document-force-edit-impact{padding:10px 12px;border:1px solid #fed7aa;border-radius:6px;background:#fff7ed;color:#9a3412}
.standard-document-force-edit-body label{display:grid;gap:6px;font-weight:600}
.standard-document-force-edit-body textarea{width:100%;min-height:78px;resize:vertical;padding:9px 10px;border:1px solid #94a3b8;border-radius:6px;font:inherit;font-weight:400}
.standard-document-force-edit-body textarea:focus{outline:2px solid rgba(37,99,235,.22);border-color:#2563eb}
.standard-document-force-edit-body textarea[aria-invalid="true"]{border-color:#dc2626}
.standard-document-force-edit-error{color:#b91c1c;font-size:13px}
.standard-document-force-edit-dialog>footer{justify-content:flex-end;gap:10px;border-top:1px solid #e2e8f0}
.standard-document-force-edit-dialog>footer button{min-height:36px}

.standard-list-filter-toolbar.hidden,
.standard-list-filter-toolbar[hidden],
.migration-view.production-business-mode .migration-table-tools.standard-list-filter-toolbar {
  display: none !important;
}

table[data-standard-list] > tbody > tr.standard-list-summary-row > td {
  display: table-cell !important;
  height: 56px !important;
  min-height: 56px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  vertical-align: middle !important;
}
.finance-settlement-workspace{display:grid;gap:12px;min-width:0}

.finance-settlement-heading,.finance-settlement-subheading,.finance-settlement-total,.finance-settlement-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}

.finance-settlement-heading h3,.finance-settlement-subheading h4{margin:0;color:#0a2b55}

.finance-settlement-heading p,.finance-settlement-subheading span{margin:4px 0 0;color:#61738b;font-size:12px}

.finance-settlement-fields{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:10px 12px;padding:14px;border:1px solid #c9d7e8;background:#f7faff}

.finance-settlement-fields label{display:grid;gap:5px;color:#23476f;font-size:12px}

.finance-settlement-fields input,.finance-settlement-fields select{min-height:34px;border:1px solid #aebfd4;background:#fff;padding:5px 8px;color:#0d294b}

.finance-settlement-remark{grid-column:span 3}

.finance-settlement-allocation{display:grid;gap:8px}

.finance-settlement-total{justify-content:flex-end;padding:12px 14px;border:1px solid #b9cce3;background:#edf5ff}

.finance-settlement-total strong{min-width:120px;color:#0758b4;font-size:20px;text-align:right}

.finance-settlement-total small{color:#63758d}

.finance-settlement-actions{justify-content:flex-end;flex-wrap:wrap}

.finance-settlement-form{gap:0;border:1px solid #c8d6e7;background:#fff}

.finance-settlement-document-bar{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 9px;border-bottom:1px solid #cfdae7;background:#fff}

.finance-settlement-document-primary{min-width:0;display:flex;align-items:center;gap:10px}

.finance-settlement-document-primary>[data-finance-settlement-back]{flex:0 0 auto}

.finance-settlement-document-state{min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:5px 11px;color:#52677f;font-size:12px}

.finance-settlement-document-state strong{color:#0b2f59;font-size:15px}

.finance-settlement-document-state span{padding-left:10px;border-left:1px solid #d9e2ec;white-space:nowrap}

.finance-settlement-document-body{min-width:0;display:grid;gap:8px;padding:8px;background:#f8fbff}

.finance-settlement-basic-section{min-width:0;border:1px solid #cedae8;background:#fff}

.finance-settlement-section-title{min-height:28px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 8px;border-bottom:1px solid #dce5ef;background:#f5f8fc}

.finance-settlement-section-title h4{margin:0;color:#0b315e;font-size:13px}

.finance-settlement-section-title span{color:#6c7e93;font-size:11px}

.finance-settlement-basic-fields{display:grid;gap:7px;padding:7px 9px}
.finance-settlement-required-row,.finance-settlement-optional-row{min-width:0;display:grid;align-items:center;gap:8px}
.finance-settlement-required-row{width:max-content;max-width:100%;grid-template-columns:repeat(4,228px) 278px;justify-content:start}
.finance-settlement-optional-row{width:100%;grid-template-columns:228px 228px minmax(400px,1fr);column-gap:8px}
.finance-settlement-field{min-width:0;display:grid;grid-template-columns:72px 150px;align-items:center;gap:6px;color:#23476f;font-size:12px}
.finance-settlement-field.is-required:not(.finance-settlement-business-date)>span::before{content:"*";margin-right:3px;color:#d92d20}
.finance-settlement-basic-fields label>span{min-width:0;white-space:nowrap}
.finance-settlement-field input,.finance-settlement-field select{box-sizing:border-box;width:150px;min-width:150px;max-width:150px;height:28px;min-height:28px;max-height:28px;padding:3px 7px;border:1px solid #aebfd4;background:#fff;color:#0d294b}
.finance-settlement-field>.clearable-control,.finance-settlement-field>.supplier-doc-date-lookup{width:150px;min-width:150px;max-width:150px}
.finance-settlement-internal-account{grid-template-columns:72px 200px;justify-self:start}
.finance-settlement-internal-account>.clearable-control,.finance-settlement-internal-account input{width:200px;min-width:200px;max-width:200px}
.finance-settlement-remark{grid-column:auto;grid-template-columns:72px minmax(150px,1fr)}
.finance-settlement-remark>.clearable-control,.finance-settlement-remark input{width:100%;min-width:150px;max-width:none}
.finance-settlement-basic-fields .finance-settlement-business-date .supplier-doc-date-lookup input{padding-left:30px;padding-right:24px}
.finance-settlement-attachments{min-width:0;border:1px solid #cedae8;background:#fff}
.finance-settlement-attachment-gallery{min-height:0;padding:8px;overflow:hidden}
.finance-settlement-attachment-gallery .standard-image-slot{width:96px;height:72px}
.finance-settlement-attachment-gallery .standard-attachment-empty{display:block;min-height:34px;padding:9px;color:#65778c}

.finance-settlement-form .finance-settlement-allocation{gap:4px;min-width:0;border:1px solid #cedae8;background:#fff}

.finance-settlement-form .finance-settlement-subheading{min-height:31px;padding:4px 8px;border-bottom:1px solid #dce5ef;background:#f5f8fc}

.finance-settlement-form .finance-settlement-subheading h4{font-size:13px}

.finance-settlement-form .finance-settlement-subheading span{max-width:72%;margin:0;text-align:right}

.finance-settlement-allocation .standard-list-filter-toolbar{min-width:0;margin:0;border:0;border-bottom:1px solid #dce5ef;border-radius:0}
.finance-settlement-allocation .standard-list-filter-fields{min-width:0;flex-wrap:wrap}
.finance-settlement-allocation .standard-list-filter-toolbar-trailing{display:flex;align-items:center;gap:8px;margin-left:auto;white-space:nowrap}
.finance-allocation-count{color:#536b84;font-size:12px}
.finance-allocation-state{color:#66788d;text-align:center}
.finance-allocation-state.is-error{color:#a72b2b}
.finance-allocation-state.is-error .ghost-btn{margin-left:10px}
.finance-settlement-allocation [data-standard-operation-form-matrix-scroll]{max-height:min(330px,calc(100dvh - 430px))}
.finance-settlement-allocation [data-standard-operation-form-matrix-table] th{background:#eaf3ff;color:#0a315d;font-weight:700}
.finance-settlement-allocation [data-standard-operation-form-matrix-table] td{border-top:1px solid #dce5ef;background:#fff}

.finance-settlement-form .finance-settlement-bottom-dock{position:sticky;bottom:0;z-index:5;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:62px;padding:7px 9px;border-top:1px solid #b9cbe0;background:#f3f8ff;box-shadow:0 -4px 12px rgb(27 62 103 / 8%)}

.finance-settlement-form .finance-settlement-total{width:min(920px,100%);min-width:0;display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));align-items:center;justify-self:center;gap:0;padding:0}

.finance-settlement-form .finance-settlement-total span{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 12px;border-right:1px solid #c7d7e9;color:#33526f;white-space:nowrap}
.finance-settlement-form .finance-settlement-total span:last-child{border-right:0}
.finance-settlement-form .finance-settlement-total strong{min-width:0;font-size:16px;text-align:right}

.finance-settlement-form .finance-settlement-total small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.finance-settlement-form .finance-settlement-actions{align-self:center;margin:0}

.finance-settlement-workspace .finance-operation-cell{display:table-cell;white-space:normal}

.finance-settlement-workspace .finance-operation-cell .finance-detail-open-button{margin:2px 4px 2px 0}

.finance-settlement-dialog-mask{position:fixed;inset:0;z-index:1450;display:grid;place-items:center;padding:24px;background:rgb(13 34 61 / 42%)}

.finance-settlement-dialog{display:grid;gap:12px;width:min(980px,calc(100vw - 48px));max-height:calc(100vh - 48px);overflow:auto;padding:16px;border:1px solid #9eb4cf;border-radius:6px;background:#fff;box-shadow:0 18px 48px rgb(10 43 85 / 28%)}

.finance-account-dialog{grid-template-rows:auto auto minmax(0,1fr);gap:8px;height:min(700px,calc(100vh - 48px));overflow:hidden}
.finance-account-dialog .finance-table-wrap{min-height:0;overflow:auto}
.finance-account-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}

.finance-settlement-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}

.finance-settlement-dialog>header h4,.finance-settlement-dialog>p{margin:0}

.finance-settlement-dialog>header button{min-width:34px;min-height:34px;border:1px solid #b4c4d7;background:#fff}

.finance-settlement-dialog textarea{width:100%;border:1px solid #aebfd4;padding:8px;resize:vertical}

@media (max-width:1280px){.finance-settlement-required-row,.finance-settlement-optional-row{overflow-x:auto}.finance-settlement-allocation .standard-list-filter-toolbar{overflow-x:auto}.finance-settlement-allocation .standard-list-filter-fields{flex-wrap:nowrap}}
@media (max-width:900px){.finance-settlement-fields{grid-template-columns:1fr}.finance-settlement-remark{grid-column:auto}.finance-settlement-required-row,.finance-settlement-optional-row{width:100%;grid-template-columns:minmax(228px,1fr)}.finance-settlement-internal-account{grid-column:auto;justify-self:start}.finance-settlement-form .finance-settlement-bottom-dock{grid-template-columns:1fr}.finance-settlement-form .finance-settlement-total{grid-template-columns:repeat(2,minmax(140px,1fr))}.finance-settlement-form .finance-settlement-actions{width:100%;justify-content:flex-end}}

.production-main-table tbody tr[data-production-main-row],.production-main-table tbody tr[data-production-main-row]>td{height:auto;min-height:38px}
.production-main-table tbody tr[data-production-main-row]>td{vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.production-main-table td.production-main-processing-parties-cell{white-space:normal !important;overflow-wrap:anywhere !important;word-break:break-word!important;line-height:1.35;color:#001b3a;cursor:default;padding-top:4px;padding-bottom:4px}
.production-main-table>tbody>tr>td.production-main-processing-parties-cell>.production-main-processing-party-line{display:block;max-width:none !important;overflow:visible !important;text-overflow:clip!important;white-space:normal !important;overflow-wrap:anywhere !important;word-break:break-word!important;color:#001b3a;text-decoration:none}
.production-main-source-bed-link{appearance:none;border:0;background:transparent;color:#0969da;font:inherit;padding:0;cursor:pointer}
.production-main-source-bed-link:hover,.production-main-source-bed-link:focus-visible{text-decoration:underline}
.production-main-table .is-dirty{box-shadow:inset 0 0 0 2px #f59e0b;background-color:#fff8db!important}
.production-main-save-status{color:#9a5b00;font-weight:700;white-space:nowrap}
.production-main-save-status.is-saving,.production-main-save-status.is-checking{color:#075db7}
.production-main-save-status.is-saved{color:#137333}.production-main-save-status.is-failed{color:#c5221f}
.production-main-formula-cell{text-align:center}
.production-main-table td.production-main-status-cell,.production-main-table td.production-main-action-cell{padding:0 4px!important;vertical-align:middle!important;text-align:center}
.production-main-row-confirm{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:24px;margin:0 auto;padding:1px 8px;border:1px solid #8eb5e0;border-radius:3px;background:#f3f8ff;color:#0969da;font-size:11px;font-weight:700;line-height:18px;cursor:pointer}
.production-main-row-confirm.is-confirmed{border-color:#8dc79b;background:#eef9f0;color:#137333}.production-main-row-confirm.is-locked{border-color:#c7cdd4;background:#f3f4f6;color:#60666d}.production-main-row-confirm:disabled{cursor:not-allowed;opacity:.62}
.production-main-progress-pair-cell.is-settlement-locked{color:#60666d;background-image:repeating-linear-gradient(135deg,transparent 0 6px,rgba(96,102,109,.06) 6px 12px)}
.production-main-source-document-dialog{width:min(86vw,1480px);height:min(86vh,860px);max-width:none;max-height:none}
.development-design-workspace{display:flex;flex-direction:column;min-width:0;min-height:calc(100dvh - 116px);gap:10px;padding:12px;background:#f5f8fc;color:#001b3a}
.development-design-toolbar{flex:0 0 auto;border:1px solid #c7d4e4;border-radius:5px;background:#fff}.development-design-table-scroll{position:relative;flex:1 1 auto;min-height:320px;overflow:auto;border:1px solid #aebed2;border-radius:4px;background:#fff}
.development-design-header-filter{position:relative;min-height:28px;border:1px solid #c9d5e2;border-radius:3px;background:#fff}.development-design-header-filter.is-active{border-color:#1f6fb2;box-shadow:inset 0 0 0 1px #1f6fb2}.development-design-header-filter input{box-sizing:border-box;width:100%;height:28px;padding:3px 24px 3px 5px;border:0;background:transparent;color:#001b3a;font-weight:700;outline:0}.development-design-header-filter .development-design-header-clear{position:absolute;top:50%;right:4px;transform:translateY(-50%)}
.development-design-state-cell{height:120px!important;color:#65758a;text-align:center;white-space:normal!important}.development-design-state-cell.is-error{color:#b42318}.development-design-layout-panel{max-height:54dvh;overflow:auto;border:1px solid #b7c8dc;border-radius:5px;background:#fff}.development-design-header-popup{z-index:1320;width:min(292px,calc(100vw - 16px))}
.standard-record-detail-layer.development-design-detail-layer{place-items:stretch end;padding:0}.development-design-detail-drawer{width:min(780px,92vw);height:100dvh;max-width:none;max-height:none;border-width:0 0 0 1px;border-radius:8px 0 0 8px}.development-design-detail-body{padding:0;overflow:auto;background:#f4f7fb}
.development-design-document-page{display:flex;flex-direction:column;min-width:0;min-height:calc(100dvh - 116px);background:#f4f7fb;color:#001b3a}.development-design-document-head{position:sticky;z-index:4;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:50px;padding:6px 12px;border-bottom:1px solid #b7c6d7;background:#fff}.development-design-document-head>div,.development-design-head-actions{display:flex;align-items:center;gap:8px}.development-design-document{display:grid;flex:1 1 auto;gap:8px;padding:8px 12px 14px}
.development-design-message{padding:8px 10px;border:1px solid #aac8e6;border-radius:4px;background:#edf6ff;color:#155d9d;font-size:12px}.development-design-message.is-error{border-color:#efb4b0;background:#fff2f1;color:#b42318}.development-design-message.is-success{border-color:#a7d5b1;background:#edf9f0;color:#137333}
.development-design-section{display:grid;gap:7px;padding:8px 10px;border:1px solid #bdcad9;border-radius:5px;background:#fff}.development-design-section>header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:28px;color:#153d67}.development-design-section>header span{color:#65758a;font-size:11px}
.development-design-basic-line{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;overflow-x:auto;padding:2px 0}.development-design-basic-field{display:grid;grid-template-columns:auto 142px;align-items:center;gap:5px;min-width:max-content;color:#3d5269;font-size:12px}.development-design-basic-field.is-name{grid-template-columns:auto 200px}.development-design-basic-field>span{font-weight:700;white-space:nowrap}.development-design-basic-field em{color:#c5221f;font-style:normal}.development-design-basic-field input,.development-design-basic-field select{box-sizing:border-box;width:142px;height:28px;padding:2px 6px;border:1px solid #aebed2;border-radius:3px;background:#fff;color:#001b3a;font:inherit}.development-design-basic-field.is-name input{width:200px}.development-design-basic-field.is-code input{font-weight:800}.development-design-basic-field input:read-only,.development-design-basic-field input:disabled,.development-design-basic-field select:disabled{background:#f2f4f7;color:#5c6876;opacity:1}.development-design-basic-field.is-invalid input,.development-design-basic-field.is-invalid select{border-color:#d93025;background:#fff8f7}.development-design-field-error{grid-column:2;color:#b42318;font-size:11px;font-weight:700}
.development-design-add-activity-wrap{position:relative}.development-design-activity-menu{position:absolute;z-index:20;top:32px;right:0;display:grid;width:172px;padding:4px;border:1px solid #aebed2;background:#fff;box-shadow:0 6px 18px #001b3a33}.development-design-activity-menu button{height:30px;padding:0 8px;border:0;background:#fff;text-align:left}.development-design-records{position:relative;display:grid;padding-left:20px}.development-design-records:before{position:absolute;inset:18px auto 18px 8px;width:1px;background:#9eb8d5;content:""}.development-design-record-row{position:relative;display:grid;gap:5px;margin-bottom:5px;padding:6px;border:1px solid #d4dce6}.development-design-timeline-dot{position:absolute;top:14px;left:-17px;width:8px;height:8px;border-radius:50%;background:#2b78c5}.development-design-record-main{display:grid;grid-template-columns:74px 148px 44px minmax(260px,1fr) 92px 226px;align-items:center;gap:6px}.development-design-record-time,.development-design-record-round,.development-design-record-meta{overflow:hidden;color:#65758a;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.development-design-record-round{text-align:center}.development-design-record-main select,.development-design-record-main input,.development-design-child-row select,.development-design-child-row input{box-sizing:border-box;width:100%;height:28px;padding:2px 5px;border:0;border-bottom:1px solid #aebed2;background:transparent;color:#001b3a}.development-design-record-main :disabled,.development-design-child-row :disabled{opacity:1}.development-design-record-main :focus,.development-design-child-row :focus{border-bottom-color:#075db7;outline:0}.development-design-record-actions,.development-design-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.development-design-record-remove{border:0;background:transparent}.development-design-child-head,.development-design-child-row{display:grid;grid-template-columns:116px minmax(220px,1fr) minmax(180px,1.2fr) 62px;align-items:center;gap:6px;margin-left:80px}.development-design-child-head{height:25px;background:#f3f6f9;font-size:11px;font-weight:700}.development-design-child-row{min-height:30px;border-bottom:1px solid #edf0f4}.development-design-row-actions{justify-content:center}.development-design-row-actions button{display:grid;width:25px;height:25px;place-items:center;border:1px solid #b7c8dc;background:#fff}.development-design-row-actions button:last-child,.development-design-record-remove{color:#b42318}.development-design-add-child{justify-self:end}.development-design-record-empty,.development-design-child-empty{padding:10px;color:#6c7887;text-align:center}
.development-design-final-history{display:grid;grid-template-columns:96px 1fr;gap:5px 8px;padding:7px 0 0 20px;border-top:1px solid #d8e0e9}.development-design-final-history>strong{grid-row:1/-1}.development-design-final-history>span{display:grid;grid-template-columns:74px 100px 90px 1fr;gap:8px}.development-design-final-history em,.development-design-final-history i{font-style:normal}.development-design-media-groups{display:grid;grid-template-columns:1.25fr .75fr;gap:10px}.development-design-media-group{display:grid;min-width:0;gap:7px;padding:8px;border:1px solid #d3dce7}.development-design-media-group>header{display:flex;justify-content:space-between}.development-design-media-group .standard-image-slot{width:104px;height:104px}.development-design-media-group .standard-image-slot img{width:100%;height:100%;object-fit:contain}.development-design-pdf-list{display:grid;gap:6px}.development-design-pdf-card{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px;min-height:46px;padding:6px;border:1px solid #c0cddd}.development-design-pdf-card>button:first-child{display:grid;min-width:0;padding:0;border:0;background:transparent;text-align:left}
.development-design-finalize-confirm{position:fixed;z-index:1600;inset:50% auto auto 50%;display:grid;width:min(520px,calc(100vw - 32px));grid-template-columns:1fr auto auto;gap:8px;padding:14px;border:1px solid #8caaca;background:#fff;transform:translate(-50%,-50%)}.development-design-finalize-confirm strong,.development-design-finalize-confirm textarea,.development-design-finalize-confirm span{grid-column:1/-1}.development-design-finalize-confirm textarea{min-height:74px}.development-design-drawer-state{display:grid;place-items:center}.development-design-quick-view,.development-design-quick-notes,.development-design-quick-notes article{display:grid}.development-design-quick-notes article{padding:6px;border:1px solid #d4dce6}.development-design-quick-notes p,.development-design-quick-notes ul{white-space:pre-wrap}
@media(max-width:900px){.development-design-basic-line{display:grid;grid-template-columns:1fr 1fr;overflow:visible}.development-design-basic-field,.development-design-basic-field.is-name{grid-template-columns:92px minmax(0,1fr);min-width:0}.development-design-basic-field input,.development-design-basic-field select,.development-design-basic-field.is-name input{width:100%}.development-design-record-row{overflow-x:auto}.development-design-record-main,.development-design-child-head,.development-design-child-row{min-width:860px}.development-design-media-groups{grid-template-columns:1fr}}
@media(max-width:620px){.development-design-workspace{min-height:calc(100dvh - 94px);padding:6px;gap:6px}.development-design-toolbar{overflow-x:auto}.development-design-detail-drawer{width:100vw;height:100dvh;border:0;border-radius:0}.development-design-document-page{min-height:calc(100dvh - 94px)}.development-design-document-head{align-items:flex-start;flex-wrap:wrap;padding:7px}.development-design-head-actions{width:100%;justify-content:flex-end}.development-design-document{gap:7px;padding:7px}.development-design-section{padding:7px}.development-design-basic-line{grid-template-columns:1fr}.development-design-media-group .standard-image-slot{width:84px;height:84px}.development-design-final-history{grid-template-columns:1fr}.development-design-final-history>span{grid-template-columns:70px 80px 80px minmax(160px,1fr)}}
.finance-account-dialog{display:flex;flex-direction:column;width:min(980px,calc(100vw - 24px));height:min(700px,calc(100vh - 24px))}

.finance-account-editor{border:1px solid #c0d1e5;background:#f7faff}

.finance-account-editor-heading,
.finance-account-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;padding:5px 12px;border-bottom:1px solid #c0d1e5;background:#edf4fc}

.finance-account-editor-heading>div:first-child{display:flex;align-items:baseline;gap:12px;min-width:0}

.finance-account-editor-heading strong,
.finance-account-list-heading strong{white-space:nowrap;color:#0c315f}

.finance-account-editor-heading small,
.finance-account-list-heading span{overflow:hidden;color:#55708e;text-overflow:ellipsis;white-space:nowrap}

.finance-account-fields{display:grid;grid-template-columns:minmax(246px,280px) minmax(246px,280px) minmax(360px,1fr);align-items:center;gap:8px 18px;padding:10px 12px;border:0;background:transparent}

.finance-account-fields label{display:grid;width:auto;min-width:0;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:6px;margin:0}

.finance-account-dialog .finance-account-fields label[hidden]{display:none}

.finance-account-fields label>span{overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}

.finance-account-fields input,
.finance-account-fields select{box-sizing:border-box;width:100%;min-width:0;max-width:none;height:28px;min-height:28px;max-height:28px;padding:3px 6px}

.finance-account-dialog>.finance-table-wrap{flex:1 1 auto;min-height:0}

.finance-account-row-state{display:inline-block;padding:2px 8px;border:1px solid #6d9fd6;background:#fff;color:#0f5fae;white-space:nowrap}

@media (max-width:900px){
  .finance-account-editor-heading{align-items:flex-start;flex-direction:column}
  .finance-account-editor-heading>div:first-child{align-items:flex-start;flex-direction:column;gap:2px}
  .finance-account-form-actions{width:100%;justify-content:flex-end}
  .finance-account-fields{grid-template-columns:minmax(0,1fr)}
}
.finance-account-reference-panel{flex:0 0 auto;max-height:190px;border:1px solid #c0d1e5;border-top:0;background:#fff}

.finance-account-reference-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;padding:4px 10px;border-bottom:1px solid #c0d1e5;background:#f4f8fd}

.finance-account-reference-panel>header>div{display:flex;align-items:baseline;gap:12px;min-width:0}

.finance-account-reference-panel>header span{color:#55708e}

.finance-account-reference-scroll{overflow:auto;max-height:150px}

.finance-account-dialog .finance-table-wrap .finance-reconcile-table tbody .finance-account-row-selected>td{background:#e7f2ff;box-shadow:inset 0 1px #8bb7ed,inset 0 -1px #8bb7ed}

.finance-account-dialog .finance-table-wrap .finance-reconcile-table tbody .finance-account-row-selected>td:first-child{box-shadow:inset 3px 0 #176cc8,inset 0 1px #8bb7ed,inset 0 -1px #8bb7ed}
.erp-image-preview-dialog {
  width: min(1280px, calc(100vw - 28px));
  height: calc(100dvh - 28px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.erp-image-preview-canvas {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  place-items: start center;
  overflow: auto;
}
.erp-image-preview-canvas img {
  width: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.erp-image-preview-canvas img[data-erp-image-preview-fit="actual"] { width: auto; }
.erp-image-preview-canvas img[data-erp-image-preview-fit="custom"] { width: calc(100% * var(--erp-image-preview-zoom, 1)); }
.erp-image-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 44px 8px;
}
.erp-image-preview-toolbar button {
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #b8c8da;
  background: #fff;
  color: #163b64;
  cursor: pointer;
}
.erp-image-preview-toolbar button[aria-pressed="true"] {
  border-color: #1677d2;
  background: #eaf4ff;
  color: #075dbb;
}
.standard-operation-form-bounded-matrix-scroll{min-height:0;max-height:min(340px,calc(100vh - 470px));overflow:auto}
.supplier-doc-section.standard-operation-form-bounded-matrix{min-height:0}
.standard-operation-form-bounded-matrix .supplier-doc-matrix-table th{background:#f4e7ad}
.standard-operation-form-bounded-matrix-footer{border-top:1px solid #c9d5e2;background:#e9eef5}
.standard-operation-form-matrix-summary{display:flex;align-items:center;justify-content:space-between;min-height:38px;padding:0 12px;font-size:12px;font-weight:700}
.standard-operation-form-row-delete{width:28px;height:28px;padding:0}
[data-standard-operation-form] [data-standard-document-section="remark"]{grid-template-columns:58px minmax(0,1fr);column-gap:8px}
[data-standard-operation-form] [data-standard-document-section="remark"]>label{text-align:right}
