.production-ledger-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.production-ledger-table {
  min-width: 1620px;
}

.production-ledger-table .ledger-col-seq {
  left: 0;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}

.production-ledger-table .ledger-col-date {
  left: 112px;
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}

.production-ledger-table .ledger-col-order {
  left: 228px;
  width: 158px;
  min-width: 158px;
  max-width: 158px;
}

.production-ledger-table .ledger-col-customer {
  left: 386px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.production-ledger-table .ledger-col-business,
.production-ledger-table .ledger-col-product-type,
.production-ledger-table .ledger-col-model,
.production-ledger-table .ledger-col-date-small,
.production-ledger-table .ledger-col-target,
.production-ledger-table .ledger-col-production-status {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.production-ledger-table .ledger-col-product,
.production-ledger-table .ledger-col-route {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

.production-ledger-table .ledger-col-quantity {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
  text-align: right;
}

.production-ledger-table th,
.production-ledger-table td {
  height: 34px;
  padding: 5px 8px;
  font-size: 12px;
}

.production-ledger-row td,
.production-ledger-detail-row td {
  max-width: 220px;
}

.production-ledger-row-open td {
  background: #eef6ff;
}

.production-ledger-seq {
  vertical-align: top;
  padding-left: 6px;
  padding-right: 6px;
}

.production-ledger-seq-controls {
  display: grid;
  grid-template-columns: 22px 22px 42px;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.production-ledger-seq-urgent strong {
  color: #d32f2f;
}

.production-urgent-toggle {
  height: 24px;
  min-width: 42px;
  border: 1px solid var(--blue-700);
  background: #fff;
  color: var(--blue-950);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.production-urgent-toggle:hover,
.production-urgent-toggle:focus-visible {
  background: var(--blue-700);
  color: #fff;
  outline: none;
}

.production-urgent-toggle.is-urgent {
  border-color: #d32f2f;
  background: #d32f2f;
  color: #fff;
}

.production-urgent-toggle.is-urgent:hover,
.production-urgent-toggle.is-urgent:focus-visible {
  background: #b71c1c;
  border-color: #b71c1c;
}

.production-ledger-row-urgent td {
  background: #fff7f7;
}

.production-ledger-row-urgent .ledger-sticky {
  background: #fff7f7;
}

.production-ledger-action {
  text-align: center;
  white-space: nowrap;
}

.production-ledger-action .btn {
  min-width: 72px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.production-ledger-action .btn.danger {
  border-color: #d32f2f;
  color: #d32f2f;
  background: #fff;
}

.production-ledger-action .btn.danger:hover,
.production-ledger-action .btn.danger:focus-visible {
  background: #d32f2f;
  color: #fff;
}

.production-item-detail-link {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue-950);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-item-detail-link:hover,
.production-item-detail-link:focus-visible {
  color: var(--blue-700);
  text-decoration: underline;
  outline: none;
}

.production-item-model-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.production-item-model-cell .production-item-detail-link {
  flex: 1;
  min-width: 0;
}

.production-ledger-detail-row td {
  padding: 10px 12px;
  background: #fbfdff;
  border-top: 0;
}

.production-ledger-detail-row .order-item-detail {
  padding: 0;
}

.production-ledger-detail-row .route-step-list {
  margin: 0;
}

@media (max-width: 760px) {
  .production-ledger-table {
    min-width: 1320px;
  }
}

.build-box-form-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.build-box-form-table {
  min-width: 1580px;
}

.build-box-form-table th,
.build-box-form-table td {
  height: 38px;
  padding: 5px 8px;
  font-size: 12px;
  vertical-align: middle;
}

.build-box-form-table .ledger-col-seq {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  text-align: center;
}

.build-box-form-table .ledger-col-date {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

.build-box-form-table .ledger-col-order {
  width: 158px;
  min-width: 158px;
  max-width: 158px;
}

.build-box-form-table .ledger-col-customer {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.build-box-form-table .ledger-col-product,
.build-box-form-table .ledger-col-route {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.build-box-form-table .ledger-col-quantity,
.build-box-form-table .ledger-col-date-small,
.build-box-form-table .ledger-col-target {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.build-box-form-table .ledger-col-box-state {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

.build-box-form-table .ledger-col-build-action {
  width: 390px;
  min-width: 390px;
  max-width: 390px;
}

.build-box-form-row td {
  background: #fff;
}

.build-box-form-row:hover td {
  background: #edf6ff;
}

.build-box-inline-form {
  display: grid;
  grid-template-columns: 92px repeat(3, 74px);
  gap: 6px;
  align-items: end;
}

.build-box-inline-form label {
  display: grid;
  gap: 3px;
  margin: 0;
  min-width: 0;
}

.build-box-inline-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.build-box-inline-form input {
  width: 100%;
  height: 28px;
  border: 1px solid var(--line-strong);
  padding: 0 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.build-box-inline-form .btn {
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

.box-state-pill,
.box-state-muted {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 6px;
  color: var(--blue-950);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.build-box-list-row td {
  padding: 8px;
  background: #fbfdff;
}

.build-box-list-row .box-label-table-wrap {
  margin: 0;
  border: 1px solid var(--line);
}

.build-box-order-ledger-wrap,
.build-box-detail-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.build-box-order-ledger {
  min-width: 1080px;
}

.build-box-detail-table {
  min-width: 1360px;
}

.build-box-order-ledger th,
.build-box-order-ledger td,
.build-box-detail-table th,
.build-box-detail-table td {
  height: 36px;
  padding: 5px 8px;
  font-size: 12px;
  vertical-align: middle;
}

.build-box-order-ledger .ledger-col-seq,
.build-box-detail-table .ledger-col-seq {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  text-align: center;
}

.build-box-order-ledger .ledger-col-date,
.build-box-detail-table .ledger-col-date {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

.build-box-order-ledger .ledger-col-order,
.build-box-detail-table .ledger-col-order {
  width: 158px;
  min-width: 158px;
  max-width: 158px;
}

.build-box-order-ledger .ledger-col-customer {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
}

.build-box-order-ledger .ledger-col-count,
.build-box-order-ledger .ledger-col-quantity,
.build-box-order-ledger .ledger-col-date-small {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.build-box-order-ledger .ledger-col-box-state {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.build-box-order-ledger-row:hover td,
.build-box-detail-row:hover td {
  background: #edf6ff;
}

.build-box-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfdff;
}

.build-box-detail-summary div {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
}

.build-box-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.build-box-detail-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-950);
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-box-detail-table .ledger-col-product,
.build-box-detail-table .ledger-col-route {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

.build-box-detail-table .ledger-col-material,
.build-box-detail-table .ledger-col-target {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.build-box-detail-table .ledger-col-quantity,
.build-box-detail-table .ledger-col-unit,
.build-box-detail-table .ledger-col-date-small {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.build-box-detail-table .ledger-col-box-state {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

.build-box-detail-table .ledger-col-build-action {
  width: 430px;
  min-width: 430px;
  max-width: 430px;
}

.build-box-detail-table .ledger-col-product,
.build-box-detail-table .ledger-col-material,
.build-box-detail-table .ledger-col-route,
.build-box-detail-table .ledger-col-target,
.build-box-order-ledger .ledger-col-customer,
.build-box-order-ledger .ledger-col-box-state {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-box-detail-table .build-box-inline-form {
  grid-template-columns: 96px repeat(3, 86px);
}

.build-box-model-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.build-box-model-tab {
  min-width: 160px;
  max-width: 220px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.build-box-model-tab.is-active {
  border-color: var(--blue-700);
  background: #eaf4ff;
  box-shadow: inset 0 3px 0 var(--blue-700);
}

.build-box-model-tab span,
.build-box-model-tab em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.build-box-model-tab strong {
  color: var(--blue-950);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-box-active-item {
  display: grid;
  gap: 10px;
}

.build-box-active-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fbfdff;
}

.build-box-active-meta div {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 9px;
}

.build-box-active-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.build-box-active-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-950);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-box-toolbar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.build-box-toolbar-form label {
  display: grid;
  gap: 3px;
  width: 120px;
  margin: 0;
}

.build-box-toolbar-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.build-box-toolbar-form input {
  height: 30px;
  border: 1px solid var(--line-strong);
  padding: 0 8px;
  font: inherit;
  font-weight: 800;
}

.build-box-toolbar-form .btn {
  height: 30px;
  min-width: 84px;
  padding: 0 10px;
  font-size: 12px;
}

.build-box-qr-table-wrap {
  border: 1px solid var(--line);
  background: #fff;
  overflow-x: auto;
}

.build-box-qr-table {
  min-width: 900px;
}

.build-box-qr-table th,
.build-box-qr-table td {
  height: 42px;
  padding: 6px 8px;
  font-size: 12px;
  vertical-align: middle;
}

.box-label-qr-thumb {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.box-label-qr-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px dashed var(--line-strong);
  background: #f8fbff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
