:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --surface-blue: #f1f6ff;
  --text: #172033;
  --muted: #687386;
  --muted-light: #99a2b1;

  --blue: #2563eb;
  --blue-soft: #edf4ff;
  --red: #dc2626;
  --red-soft: #fff1f1;
  --orange: #d97706;
  --orange-soft: #fff7ed;
  --green: #059669;
  --green-soft: #ecfdf5;
  --purple: #6d5bd0;
  --purple-soft: #f3f1ff;
  --teal: #0d9488;
  --teal-soft: #ecfdfa;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.07);
  --shadow-soft: 0 1px 2px rgba(23, 32, 51, 0.05);
  --workbench-section-gap: 10px;
  --workbench-control-height: 36px;
  --workbench-control-radius: 7px;
  --workbench-panel-radius: 11px;
  --workbench-badge-height: 22px;
  --workbench-chip-height: 28px;
  --workbench-row-hover: #fafaff;
  --workbench-row-selected: #f5f5ff;
  --workbench-focus-ring: rgba(98, 104, 241, 0.28);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: hidden;
  min-width: 0;
  color-scheme: light;
}

body {

  margin: 0;

}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--workbench-control-radius);
  background: #fff;
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input,
select {
  height: 40px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #eef2f7;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #eef2f7;
  border-radius: 999px;
  background: #aab7ca;
}

.brand-mark {

  flex: 0 0 auto;

}

.brand h1 {

  letter-spacing: 0;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 8px;

}

.top-metrics {
  display: grid;

  margin: 0;
}

.top-metrics div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.top-metrics dt {

  white-space: nowrap;
}

.top-metrics dd {
  overflow: hidden;
  margin: 0;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {

  display: flex;

  backdrop-filter: blur(18px);
}

.tab-button {

  border-bottom: 2px solid transparent;

  font-weight: 700;
}

.tab-button:hover {
  box-shadow: none;

}

.tab-button.is-active {
  border-bottom-color: var(--blue);

}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.notice {
  display: flex;
  align-items: center;

  margin-bottom: 0;

  padding: 9px 13px;
  font-size: 13.5px;
}

.notice::before {
  content: "i";
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  margin-right: 10px;

  font-size: 12px;
  font-weight: 800;
}

.panel {
  min-width: 0;

}

.workbench-split-layout--actions {
  display: grid;

  align-items: start;
}

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

.toolbar select,
.toolbar button {
  width: auto;
  min-width: 150px;
}

.reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 16px 16px;
}



.filter-chip-row {
  display: grid;

  gap: 8px;
  align-items: start;
}

.filter-chip-row > span {
  padding-top: 7px;

  font-size: 12px;

  white-space: nowrap;
}

.text-button {
  min-height: 26px;

  padding: 0;

  font-size: 12.5px;
  font-weight: 850;
}

.text-button[hidden] {
  display: none;
}

.filter-status-toggle {
  min-height: 30px;
  border: 2px solid var(--retro-ink);
  background: var(--retro-yellow);
  box-shadow: 2px 2px 0 var(--retro-ink);
  padding: 3px 10px;
  color: var(--retro-ink);
  text-decoration: none;
  white-space: nowrap;
}

.handled-empty-state {
  align-items: flex-start;
  border-style: dashed;
}

.handled-empty-action {
  min-height: 34px;
  border: 3px solid var(--retro-ink);
  background: var(--retro-yellow);
  box-shadow: 3px 3px 0 var(--retro-ink);
  padding: 5px 12px;
  color: var(--retro-ink);
  font-weight: 1000;
}

.status-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 0;

}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;

  padding: 4px 10px;

  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-pill:last-child {
  border-right: 0;
}

.summary-pill strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

.summary-pill.is-pending strong {
  color: var(--orange);
}

.summary-pill.is-progress strong {
  color: var(--blue);
}

.summary-pill.is-closed strong,
.summary-pill.is-muted strong {
  color: var(--teal);
}

.risk-card-list {
  display: grid;

}

.tag-row{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-facts div,
.detail-grid div{
  min-width: 0;
}

.no-replenish-alert {
  border-color: #fed7aa;
  background: #fff7ed;
}

.no-replenish-alert h3 {
  color: #9a4f00;
}

.bom-supply-block {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.bom-supply-block h3 {
  color: #1d4ed8;
}

.mini-facts dt,
.detail-grid dt{
  color: var(--muted);
  font-size: 12px;
}

.mini-facts dd,
.detail-grid dd{
  overflow-wrap: anywhere;
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.strong{

  font-weight: 900;
}

.empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--v1-radius, 8px);
  color: var(--muted);
  padding: 22px;
  text-align: center;
  background: #fbfcfe;
}

.empty-state.slim {
  min-height: 120px;
}

.empty-state strong {
  color: var(--text);
  font-size: 17px;
}

.empty-state p {
  max-width: 240px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.empty-illustration {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;

  font-size: 34px;
  font-weight: 900;
}

.quick-selected {
  display: grid;
  gap: 16px;
}

.selected-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.selected-summary.no-thumb {
  align-items: flex-start;
}

.selected-summary > div:last-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.selected-summary strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

.selected-summary span {
  color: var(--muted);
  font-size: 13px;
}

.mini-facts {
  display: grid;
  grid-template-columns: 1fr;

  margin: 12px 0 0;
  border-top: 1px solid var(--border);
}

.mini-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);

}

.note-form {
  display: grid;
  gap: 12px;
}

.note-form label,
.workbench-filter-grid label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.char-count {
  justify-self: end;
  margin-top: -4px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 500;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.primary:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.ghost {
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--muted);
  font-size: 20px;
}

.full {
  width: 100%;
  height: 42px;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.note-history {
  display: grid;
  gap: 10px;
}

.note-history-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 12px;
}

.history-line{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-line time{
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.history-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.history-list dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 8px 0 0;
}

.history-list dl div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
}

.history-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.history-list p {
  margin: 8px 0 0;
  color: #586275;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.filter-panel {
  padding: 14px 16px;
}

.workbench-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(118px, 0.8fr)) 150px;
  gap: 12px;
  align-items: end;
}

.workbench-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#tab-sku #skuNotice {
  display: none;
}

.workbench-split-layout--detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-width: 0;
  gap: 12px;
  align-items: start;
}

.workbench-split-layout--detail .workbench-table-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #34343b;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid #e8e7e2;
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

th {
  background: #f4f3ef;
  box-shadow: 0 1px 0 #deddd8;
  color: #74737c;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

th[data-sort-key],
th[data-inbound-sort-key] {
  cursor: pointer;
  user-select: none;
}

th[data-sort-key].is-sorted,
th[data-inbound-sort-key].is-sorted {
  color: var(--v1-primary-2);
  background: var(--v1-primary-soft);
}

th[data-sort-key].is-sorted::after,
th[data-inbound-sort-key].is-sorted::after {
  content: attr(data-sort-direction);
  display: inline-flex;
  margin-left: 6px;
  border: 0;
  padding: 0;
  font-size: 10px;
  line-height: 1.2;
}

tbody tr {
  cursor: pointer;
  transition:
    background 120ms ease,
    box-shadow 120ms ease;
}

.name-cell {
  min-width: 190px;
  max-width: 300px;
  white-space: normal;
}

.name-cell strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.sku-name-cell {
  min-width: 176px;
  max-width: 260px;
}

.risk-cell,
.reason-cell,
.status-cell {
  min-width: 72px;
  white-space: nowrap;
}

.stockout-cell {
  min-width: 92px;
  white-space: nowrap;
}

.stockout-cell strong,
.stockout-cell small {
  display: block;
  white-space: nowrap;
  word-break: keep-all;
}

.stockout-cell small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.workbench-data-table--inbound .inbound-batch-row td {
  vertical-align: middle;
}











.empty-cell {
  height: 160px;
  color: var(--muted);
  text-align: center;
}

.detail-content {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.detail-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.detail-block h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 14px;
}

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

.evidence-text,
.action-copy,
.empty-line {
  margin: 0;
  color: #586275;
  font-size: 13px;
  line-height: 1.7;
}

.action-copy {
  color: #1f2937;
  font-weight: 800;
}

.trace-grid {
  display: grid;
  gap: 8px;
}

.trace-grid div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}

.trace-grid div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.trace-grid strong {
  color: #273142;
}

.trace-grid span {
  color: var(--muted);
}

.mini-table {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}

.mini-table div {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 12px;
}

.mini-table div:last-child {
  border-bottom: 0;
}

.inbound-mini-table {
  overflow: auto;
}

.inbound-mini-table div {
  min-width: 780px;
  grid-template-columns: 1fr 0.85fr 0.75fr 0.75fr 0.75fr 1.1fr 1.1fr 0.85fr;
}

.inbound-mini-table span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inbound-mini-table strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.inbound-mini-table small {
  color: var(--muted);
  font-size: 11px;
}

.rules-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.rules-guide-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  border: 1px solid #e3e2dd;
  border-radius: 9px;
  background: #fcfcfa;
  padding: 16px;
}

.rules-guide-card h3 {
  margin: 0;
  color: #29292f;
  font-size: 15px;
}

.rules-guide-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #5d5c65;
  line-height: 1.55;
}

.rules-guide-card li {
  min-width: 0;
}

.rules-guide-card code {
  overflow-wrap: anywhere;
  border-radius: 5px;
  background: #f1f1ff;
  color: #4f55d6;
  padding: 1px 5px;
  font-size: 11.5px;
  font-weight: 800;
}

.import-status,
.assumption-cards,
.confidence-box,
.release-notes {
  padding: 0 16px 16px;
}

.file-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.file-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #d9daf8;
  border-radius: 12px;
  background: #f1f1ff;
  color: var(--v1-primary);
}

.file-icon .rules-file-icon {
  width: 24px;
  height: 24px;
}

.file-card dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.file-card dl div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  border-bottom: 1px solid #e8e7e2;
  padding: 9px 0;
}

.file-card dl div:last-child {
  border-bottom: 0;
}

.file-card dt {
  color: var(--muted);
}

.file-card dd {
  min-width: 0;
  margin: 0;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formula {
  color: var(--blue);
  font-weight: 900;
}

.assumption-cards {
  display: grid;
  gap: 12px;
}

.assumption-cards article {
  border: 1px solid #e3e2dd;
  border-radius: 9px;
  padding: 14px;
  background: #fcfcfa;
}

.assumption-cards h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.assumption-cards ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #5d5c65;
  line-height: 1.6;
}

.confidence-box {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.confidence-score {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  align-content: center;
  border: 6px solid #d9daf8;
  border-radius: 50%;
  background: #fff;
}

.confidence-score strong {
  color: var(--v1-primary);
  font-size: 28px;
}

.confidence-score span {
  color: var(--muted);
  font-size: 12px;
}

.confidence-box dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.confidence-box dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.confidence-box dt {
  color: var(--muted);
}

.confidence-box dd {
  margin: 0;
  font-weight: 800;
}

.confidence-box p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.data-health-list {
  grid-column: 1 / -1;
  border: 1px solid #e3e2dd;
  border-radius: 9px;
  background: #fcfcfa;
  box-shadow: none;
  padding: 12px 14px;
}

.data-health-list strong {
  color: #29292f;
  font-size: 15px;
}

.data-health-list li,
.ai-detail-list li {
  color: #5d5c65;
  font-size: 13px;
  line-height: 1.55;
}

.release-version {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: #4f55d6;
  background: #f1f1ff;
  font-size: 12px;
  font-weight: 900;
}

.release-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
}

.release-history {
  grid-column: 1 / -1;
}

.release-card {
  border: 1px solid #e3e2dd;
  border-radius: 9px;
  background: #fcfcfa;
  padding: 14px;
}

.release-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.release-card strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.release-card span,
.release-card p {
  color: var(--muted);
  font-size: 12px;
}

.release-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #4f5d74;
  line-height: 1.55;
}

.release-card p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.muted-release {
  background: #f8fafc;
}

.release-history details {
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

.release-history details:first-of-type {
  margin-top: 10px;
}

.release-history summary {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style-position: inside;
}

.release-history summary span {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 900;
}

.release-history summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-history summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.release-history details ul {
  margin-top: 10px;
}

.tag {
  display: inline-flex;

  min-height: var(--workbench-badge-height);
  align-items: center;

  padding: 2px 7px;
  font-size: 12px;

  line-height: 1.2;
  white-space: nowrap;
  word-break: keep-all;
}

.tag-danger {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.tag-warning {
  border-color: #fed7aa;
  background: var(--orange-soft);
  color: #d06c00;
}

.tag-purple {
  border-color: #ddd6fe;
  background: var(--purple-soft);
  color: var(--purple);
}

.tag-info {
  border-color: #bfdbfe;

}

.tag-success {
  border-color: #c4f0d7;
  background: var(--green-soft);
  color: var(--green);
}

.tag-neutral {
  border-color: #dfe6f1;
  background: #f3f6fa;
  color: #62708a;
}

.status-tag {
  min-width: 58px;
  justify-content: center;
}

.tag-status-pending {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.tag-status-missing {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.tag-status-urged {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.tag-status-replenished {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.tag-status-transfer {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.tag-status-controlled {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.tag-status-muted {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.tag-status-done {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 260px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  animation: toast-in 180ms var(--ease);
}

.toast strong {
  display: block;
  font-size: 14px;
}

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

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(18, 31, 27, 0.42);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-panel {
  width: min(980px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: var(--v1-surface);
  box-shadow: 0 26px 72px rgba(24, 35, 31, 0.24);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--v1-line);
  background: rgba(255, 254, 250, 0.96);
  padding: 16px 18px;
  backdrop-filter: blur(12px);
}

.modal-close {
  display: inline-flex;
  height: 34px;
  min-width: 72px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--v1-line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: var(--v1-text);
  padding: 0 10px;
  cursor: pointer;
}

.modal-close span {
  color: var(--v1-primary-2);
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.modal-close b {
  color: var(--v1-text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
}

.modal-close:hover {
  border-color: rgba(23, 79, 67, 0.34);
  background: var(--v1-primary-soft);
  box-shadow: none;
  transform: none;
}

.modal-close:active {
  transform: translateY(1px);
}

.modal-head span,
.modal-kicker {
  color: var(--v1-muted);
  font-size: 12px;
  font-weight: 820;
}

.modal-head h2 {
  margin: 2px 0 0;
  color: var(--v1-text);
  font-size: 22px;
  font-weight: 850;
}

.modal-head .modal-close span {
  color: var(--v1-primary-2);
  font-size: 20px;
}

.modal-head .modal-close b {
  color: var(--v1-text);
  font-size: 13px;
}

.modal-body {
  max-height: calc(min(820px, 100vh - 48px) - 67px);
  overflow: auto;
  padding: 16px 18px 0;
}

.inbound-modal-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: var(--v1-surface-alt);
  box-shadow: none;
  padding: 14px 16px;
}

.inbound-modal-summary h3 {
  margin: 4px 0 10px;
  color: var(--v1-text);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.35;
}

.inbound-modal-verdict {
  margin: 10px 0 0;
  border-top: 1px solid var(--v1-line);
  padding-top: 8px;
  color: var(--v1-muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.inbound-modal-summary dl,
.inbound-order-card dl,
.inbound-record-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inbound-modal-summary dl div,
.inbound-order-card dl div,
.inbound-record-facts div {
  display: grid;
  min-height: 58px;
  align-content: center;
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.inbound-modal-summary dt,
.inbound-order-card dt,
.inbound-record-facts dt {
  color: var(--v1-muted);
  font-size: 11px;
  font-weight: 780;
}

.inbound-modal-summary dd,
.inbound-order-card dd,
.inbound-record-facts dd {
  margin: 3px 0 0;
  color: var(--v1-text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.inbound-modal-list {
  display: grid;

}

.inbound-order-card,
.inbound-record-card {
  border: 1px solid var(--v1-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  padding: 14px;
}

.inbound-order-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--v1-line);
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.inbound-order-card header strong {
  display: block;
  margin-top: 2px;
  color: var(--v1-text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.inbound-order-advice,
.inbound-order-memo {
  margin: 10px 0 0;
  border-top: 1px solid var(--v1-line);
  padding-top: 10px;
  color: var(--v1-text);
  font-size: 13px;
  line-height: 1.45;
}

.inbound-order-advice,
.inbound-order-memo {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
}

.inbound-order-advice strong,
.inbound-order-memo strong {
  align-self: start;
  border: 1px solid rgba(23, 79, 67, 0.18);
  border-radius: 999px;
  background: var(--v1-primary-soft);
  box-shadow: none;
  color: var(--v1-primary-2);
  padding: 3px 8px;
  text-align: center;
  white-space: nowrap;
}

.inbound-modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--v1-line);
  background: rgba(255, 254, 250, 0.96);
  margin: 14px -18px 0;
  padding: 12px 18px;
  backdrop-filter: blur(12px);
}

.inbound-modal-actions button {
  min-height: 36px;
  border: 1px solid var(--v1-line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  padding: 6px 12px;
  color: var(--v1-text);
  font-size: 13px;
  font-weight: 820;
}

.inbound-modal-actions button:hover {
  border-color: rgba(23, 79, 67, 0.34);
  background: var(--v1-primary-soft);
  color: var(--v1-primary-2);
  box-shadow: none;
  transform: none;
}

.inbound-modal-actions button:first-child {
  border-color: var(--v1-primary);
  background: var(--v1-primary);
  color: #fff;
}

.inbound-modal-actions button:first-child:hover {
  border-color: var(--v1-primary-2);
  background: var(--v1-primary-2);
  color: #fff;
}

#tab-inbound .inbound-table-wrap {
  max-height: calc(100vh - 300px);
}

#tab-inbound .inbound-table-wrap th {
  top: 0;
  z-index: 6;
}

.inbound-record-title {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.inbound-record-title strong {
  color: var(--retro-ink);
  font-size: 17px;
  line-height: 1.35;
}

.load-error {
  padding: 24px;
}
