:root {
  --bg: #f4f6f3;
  --panel: #fff;
  --line: #dce4dc;
  --text: #17211b;
  --muted: #66736b;
  --green: #2e6b4f;
  --green-dark: #24563f;
  --red: #b42318;
  --amber: #9a5b00;
  --soft-green: #edf5ef;
}

.pre-drawing-panel {
  width: 100%;
  min-width: 0;
  padding: 10px 12px 12px;
}

.pre-drawing-head {
  margin-bottom: 8px;
}

.pre-drawing-head h2 {
  margin-bottom: 1px;
}

.pre-drawing-head p {
  margin: 0;
  font-size: 12px;
}

.pre-drawing-entry-bar {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-bottom: 7px;
}

.pre-drawing-entry-bar button {
  min-width: 150px;
}

.pre-drawing-record-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f6f9f6;
}

.pre-drawing-record-head strong {
  font-size: 14px;
}

.pre-drawing-record-head span {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-route-dialog.pre-drawing-create-dialog {
  width: min(820px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.pre-drawing-create-dialog .pre-drawing-create-form {
  margin: 0;
  padding: 10px;
  border: 0;
  background: #fff;
}

.pre-drawing-create-dialog-head {
  margin-bottom: 9px;
}

.pre-drawing-create-form {
  display: block;
  min-width: 0;
  margin-bottom: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: #f7faf8;
}

.pre-drawing-create-fields {
  display: grid;
  grid-template-columns: 100px 315px 180px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.pre-drawing-target-input {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pre-drawing-target-input legend {
  margin-bottom: 2px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.pre-drawing-target-options {
  box-sizing: border-box;
  display: flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border: 1px solid #cfd8d1;
  border-radius: 4px;
  background: #fff;
}

.pre-drawing-target-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pre-drawing-create-form .pre-drawing-target-options input {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
}

.pre-drawing-note-input {
  grid-column: 1 / -1;
}

.pre-drawing-note-input textarea {
  min-height: 72px;
  padding: 8px 9px;
  line-height: 1.45;
  resize: vertical;
}

.pre-drawing-create-form label {
  gap: 2px;
  margin: 0;
  font-size: 12px;
}

.pre-drawing-create-form input {
  height: 42px;
  padding: 6px 9px;
}

.pre-drawing-create-form button {
  height: 34px;
}

.pre-drawing-reference-bar {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 100px;
  grid-template-rows: minmax(106px, 1fr) 42px;
  align-items: stretch;
  gap: 8px 12px;
  min-height: 172px;
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed #a9bdb0;
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
}

.pre-drawing-reference-bar.is-dragging {
  border-color: var(--green);
  background: #eaf5ed;
}

.pre-drawing-reference-drop-label {
  display: flex;
  grid-column: 1;
  grid-row: 1 / 3;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 96px;
  border-right: 1px solid #dce6df;
  color: #516158;
  font-size: 20px;
  font-weight: 700;
}

.pre-drawing-reference-button,
.pre-drawing-reference-bar > button {
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
}

.pre-drawing-reference-button {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  min-width: 96px;
}

.pre-drawing-reference-summary {
  display: block;
  grid-column: 2 / 4;
  grid-row: 1;
  min-width: 0;
  padding: 7px 9px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #dce6df;
  background: #f8faf8;
  color: var(--muted);
  font-size: 13px;
}

.pre-drawing-reference-count {
  display: block;
  margin-bottom: 3px;
  color: var(--green-dark);
  font-weight: 800;
}

.pre-drawing-reference-file-name {
  display: block;
  overflow: hidden;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pre-drawing-reference-bar .pre-drawing-submit-button {
  grid-column: 3;
  grid-row: 2;
  min-width: 96px;
}

.pre-drawing-table-scroll {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
}

.pre-drawing-table {
  width: 100%;
  min-width: 1000px;
  table-layout: fixed;
}

.pre-drawing-table th,
.pre-drawing-table td {
  height: 29px;
  padding: 1px 4px;
  border-right: 1px solid #dfe5e1;
  border-bottom: 1px solid #dfe5e1;
  vertical-align: middle;
  font-size: 13px;
}

.pre-drawing-table th {
  height: 29px;
  background: #eef3ef;
  white-space: nowrap;
}

.pre-drawing-table td {
  overflow: hidden;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pre-drawing-record-row.pre-drawing-record-tone-0 td {
  background: #fff;
}

.pre-drawing-record-row.pre-drawing-record-tone-1 td {
  background: #edf5ef;
}

.pre-drawing-id-col { width: 40px; }
.pre-drawing-date-col { width: 82px; }
.pre-drawing-customer-col { width: 60px; }
.pre-drawing-sales-col { width: 40px; }
.pre-drawing-target-col { width: 116px; text-align: center; }

.pre-drawing-target-col span + span::before {
  content: " / ";
  color: #8a968e;
}
.pre-drawing-status-col {
  position: sticky;
  right: 76px;
  z-index: 2;
  width: 78px;
  text-align: center;
  box-shadow: -1px 0 #cfd8d1;
}
.pre-drawing-action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 76px;
  text-align: center;
}

.pre-drawing-files-col { width: 100px; }

.pre-drawing-table th.pre-drawing-id-col,
.pre-drawing-table td.pre-drawing-id-col,
.pre-drawing-table th.pre-drawing-date-col,
.pre-drawing-table td.pre-drawing-date-col,
.pre-drawing-table th.pre-drawing-customer-col,
.pre-drawing-table td.pre-drawing-customer-col,
.pre-drawing-table th.pre-drawing-sales-col,
.pre-drawing-table td.pre-drawing-sales-col {
  padding-right: 2px;
  padding-left: 2px;
  font-size: 12px;
}

.pre-drawing-table th.pre-drawing-status-col,
.pre-drawing-table th.pre-drawing-action-col {
  z-index: 3;
  background: #eef3ef;
}

.pre-drawing-table .mini-link {
  min-height: 23px;
  padding: 0 8px;
  font-size: 12px;
}

.pre-drawing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  min-height: 23px;
  border: 1px solid #d8b76c;
  border-radius: 999px;
  background: #fff8e5;
  color: #7a4d00;
  font-size: 12px;
  font-weight: 700;
}

.pre-drawing-status.is-completed {
  border-color: #9fc2ac;
  background: #eaf5ed;
  color: var(--green-dark);
}

.pre-drawing-action-col .danger-link {
  border-color: #d7aaa5;
  background: #fff;
  color: var(--red);
}

.pre-drawing-confirmed-name {
  color: #173f2a;
  font-weight: 700;
}

.pre-drawing-note-cell span {
  margin-left: 6px;
  color: #53635a;
}

.pre-drawing-file-list {
  display: inline-flex;
  gap: 4px;
  overflow: hidden;
}

.pre-drawing-file-list a {
  flex: 0 0 auto;
  color: var(--green);
  font-weight: 700;
}

.pre-drawing-process-dialog {
  width: min(720px, calc(100vw - 24px));
}

.pre-drawing-screenshot-dialog {
  width: min(460px, calc(100vw - 24px));
}

.pre-drawing-screenshot-dialog .warehouse-route-dialog-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pre-drawing-screenshot-dialog .warehouse-route-dialog-head,
.pre-drawing-paste-zone {
  grid-column: 1 / -1;
}

.pre-drawing-paste-zone {
  min-height: 120px;
  border: 1px dashed #9cb6a5;
  background: #f5faf6;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 800;
}

.pre-drawing-screenshot-picker {
  width: 100%;
}

.pre-drawing-process-dialog .warehouse-route-dialog-form {
  display: grid;
  gap: 9px;
}

.pre-drawing-process-dialog label {
  gap: 3px;
  margin: 0;
}

.pre-drawing-dialog-meta {
  overflow: hidden;
  padding: 5px 8px;
  border-left: 3px solid var(--green);
  background: #f2f7f3;
  color: #405148;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .pre-drawing-entry-bar button {
    width: 100%;
  }

  .warehouse-route-dialog.pre-drawing-create-dialog {
    width: calc(100vw - 14px);
  }

  .pre-drawing-create-fields {
    grid-template-columns: 1fr;
  }

  .pre-drawing-reference-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    width: 100%;
    min-width: 0;
    min-height: 230px;
  }

  .pre-drawing-reference-button {
    grid-column: 1;
    grid-row: 3;
  }

  .pre-drawing-reference-drop-label {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }

  .pre-drawing-reference-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 100px;
    max-height: 160px;
  }

  .pre-drawing-reference-drop-label {
    min-height: 100px;
    border-right: 0;
    border-bottom: 1px solid #dce6df;
  }

  .pre-drawing-reference-button {
    width: 100%;
  }

  .pre-drawing-reference-bar .pre-drawing-submit-button {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
  }
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

h1, h2, p { margin-top: 0; letter-spacing: 0; }

.eyebrow {
  font-size: 13px;
  color: var(--green);
  font-weight: 800;
}

.sub {
  color: var(--muted);
  margin-bottom: 20px;
}

input, select, textarea, button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  padding: 0 10px;
  background: #fbfcfb;
  color: var(--text);
}

textarea {
  min-height: 78px;
  padding-top: 9px;
  resize: vertical;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

button:hover, .button:hover { background: var(--green-dark); border-color: var(--green-dark); }

.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.secondary:hover {
  background: #f6f8f6;
  color: var(--text);
  border-color: var(--line);
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.user-admin-panel,
.user-list-panel {
  padding: 12px;
}

.user-admin-head,
.user-list-head {
  align-items: center;
  margin-bottom: 8px;
}

.user-account-summary {
  display: inline-flex;
  gap: 8px;
}

.user-account-summary span {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf7;
  color: var(--muted);
  font-size: 12px;
}

.user-account-summary strong {
  margin-left: 4px;
  color: var(--text);
  font-size: 14px;
}

.user-register-title {
  margin-bottom: 5px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.user-create-form {
  display: grid;
  grid-template-columns: 150px 170px 150px 150px auto;
  gap: 7px;
  align-items: end;
}

.user-create-form label {
  gap: 3px;
  margin: 0;
}

.user-create-form input,
.user-create-form select,
.user-create-form button {
  min-height: 34px;
}

.user-create-action {
  margin: 0;
}

.user-filter-form {
  display: grid;
  grid-template-columns: 220px 150px auto auto;
  gap: 6px;
}

.user-filter-form input,
.user-filter-form select,
.user-filter-form button,
.user-filter-form .button {
  min-height: 32px;
}

.user-table-scroll {
  border: 1px solid var(--line);
}

.user-permission-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.user-permission-table th,
.user-permission-table td {
  height: 38px;
  padding: 3px 6px;
  border-right: 1px solid #e1e6e2;
  border-bottom: 1px solid #e1e6e2;
  vertical-align: middle;
}

.user-permission-table th:nth-child(1) { width: 150px; }
.user-permission-table th:nth-child(2) { width: 150px; }
.user-permission-table th:nth-child(3) { width: 145px; }
.user-permission-table th:nth-child(4) { width: 100px; }
.user-permission-table th:nth-child(5) { width: 88px; }
.user-permission-table th:nth-child(6) { width: 160px; }
.user-permission-table th:nth-child(7) { width: 68px; }

.user-permission-table input,
.user-permission-table select,
.user-permission-table button {
  min-height: 29px;
  font-size: 13px;
}

.user-login-cell strong,
.user-login-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-login-cell small {
  color: var(--muted);
  font-size: 10px;
}

.user-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
}

.user-active-toggle input {
  width: 16px;
  min-height: 16px;
}

.user-password-state {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #bdd0c2;
  border-radius: 999px;
  background: #eef7f0;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.user-password-state.is-pending {
  border-color: #dec17e;
  background: #fff8e5;
  color: #7a4d00;
}

.user-disabled-row td {
  background: #f1f3f1;
  color: #7d867f;
}

.admin-module-panel,
.planner-operator-admin-panel,
.planner-operator-list-panel {
  padding: 12px;
}

.admin-module-head,
.planner-operator-admin-head {
  align-items: center;
  margin-bottom: 8px;
}

.admin-module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-module-button {
  width: 230px;
  min-height: 48px;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 15px;
}

.admin-module-button strong {
  display: inline-flex;
  min-width: 28px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 12px;
}

.planner-operator-create-form {
  display: grid;
  grid-template-columns: 220px auto;
  gap: 7px;
  align-items: end;
}

.planner-operator-create-form label {
  gap: 3px;
  margin: 0;
}

.planner-operator-create-form input {
  min-height: 34px;
}

.planner-operator-create-form button {
  width: 112px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.planner-operator-table-scroll {
  max-width: 640px;
  border: 1px solid var(--line);
}

.planner-operator-table {
  width: 100%;
  table-layout: fixed;
}

.planner-operator-table th,
.planner-operator-table td {
  height: 38px;
  padding: 3px 6px;
  border-right: 1px solid #e1e6e2;
  border-bottom: 1px solid #e1e6e2;
  vertical-align: middle;
}

.planner-operator-table th:nth-child(1) { width: 360px; }
.planner-operator-table th:nth-child(2) { width: 140px; }
.planner-operator-table th:nth-child(3) { width: 90px; }

.planner-operator-table input,
.planner-operator-table button {
  min-height: 29px;
  font-size: 13px;
}

.planner-operator-select-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.route-operation-record-panel {
  padding: 12px;
}

.route-operation-record-head {
  align-items: center;
  margin-bottom: 8px;
}

.route-operation-filter {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 150px auto auto;
  gap: 6px;
  margin-bottom: 8px;
}

.route-operation-filter input,
.route-operation-filter select,
.route-operation-filter button,
.route-operation-filter .button {
  min-height: 32px;
}

.route-operation-record-scroll {
  border: 1px solid var(--line);
}

.route-operation-record-table {
  width: 100%;
  min-width: 1660px;
  table-layout: fixed;
}

.route-operation-record-table th,
.route-operation-record-table td {
  height: 34px;
  padding: 2px 5px;
  overflow: hidden;
  border-right: 1px solid #dfe5e1;
  border-bottom: 1px solid #dfe5e1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-operation-record-table th:nth-child(1) { width: 140px; }
.route-operation-record-table th:nth-child(2) { width: 62px; }
.route-operation-record-table th:nth-child(3),
.route-operation-record-table th:nth-child(4) { width: 72px; }
.route-operation-record-table th:nth-child(5) { width: 120px; }
.route-operation-record-table th:nth-child(6) { width: 110px; }
.route-operation-record-table th:nth-child(7) { width: 400px; }
.route-operation-record-table th:nth-child(8),
.route-operation-record-table th:nth-child(9),
.route-operation-record-table th:nth-child(10) { width: 78px; }
.route-operation-record-table th:nth-child(11) { width: 130px; }
.route-operation-record-table th:nth-child(12) { width: 100px; }

.route-record-type {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid #afcdb8;
  border-radius: 999px;
  background: #edf7f0;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.desktop-device-panel,
.desktop-device-list-panel {
  padding: 12px;
}

.desktop-device-head {
  align-items: center;
  margin-bottom: 8px;
}

.desktop-device-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desktop-device-summary span {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7faf7;
  color: var(--muted);
  font-size: 12px;
}

.desktop-device-summary span.is-pending {
  border-color: #e1bd66;
  background: #fff8e4;
  color: #7c5500;
}

.desktop-device-summary strong {
  margin-left: 3px;
  color: var(--text);
  font-size: 14px;
}

.desktop-device-filter {
  display: grid;
  grid-template-columns: 260px 130px auto auto auto;
  gap: 6px;
  align-items: center;
  justify-content: start;
}

.desktop-device-filter input,
.desktop-device-filter select,
.desktop-device-filter button,
.desktop-device-filter .button {
  min-height: 32px;
}

.desktop-device-table-scroll {
  border: 1px solid var(--line);
}

.desktop-device-table {
  width: 100%;
  min-width: 1460px;
  table-layout: fixed;
}

.desktop-device-table th,
.desktop-device-table td {
  height: 38px;
  padding: 3px 6px;
  border-right: 1px solid #e1e6e2;
  border-bottom: 1px solid #e1e6e2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.desktop-device-table th:nth-child(1) { width: 110px; }
.desktop-device-table th:nth-child(2) { width: 190px; }
.desktop-device-table th:nth-child(3) { width: 150px; }
.desktop-device-table th:nth-child(4) { width: 70px; }
.desktop-device-table th:nth-child(5) { width: 78px; }
.desktop-device-table th:nth-child(6) { width: 150px; }
.desktop-device-table th:nth-child(7) { width: 100px; }
.desktop-device-table th:nth-child(8) { width: 150px; }
.desktop-device-table th:nth-child(9) { width: 150px; }
.desktop-device-table th:nth-child(10) { width: 150px; }

.desktop-device-row.status-pending td {
  background: #fffdf5;
}

.desktop-device-row.status-revoked td {
  background: #f3f4f3;
  color: #7b847e;
}

.desktop-machine-code {
  color: var(--green-dark);
  font-family: Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.desktop-device-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #bdd0c2;
  border-radius: 999px;
  background: #eef7f0;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
}

.desktop-device-status.status-pending {
  border-color: #e1bd66;
  background: #fff8e4;
  color: #7c5500;
}

.desktop-device-status.status-revoked {
  border-color: #cdd1ce;
  background: #ecefed;
  color: #68716b;
}

.desktop-device-actions {
  display: flex;
  gap: 4px;
}

.desktop-device-actions form {
  margin: 0;
}

.desktop-device-actions .small-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.desktop-device-reset-button {
  border-color: #b53f3f;
  background: #b53f3f;
  color: #fff;
}

.desktop-device-reset-button:hover {
  border-color: #8d2d2d;
  background: #8d2d2d;
}

.user-handover-panel,
.user-handover-record-panel {
  padding: 12px;
}

.user-handover-head {
  align-items: center;
  margin-bottom: 8px;
}

.user-handover-form {
  display: grid;
  grid-template-columns: minmax(250px, 360px) 28px minmax(250px, 360px) 110px;
  gap: 8px;
  align-items: end;
}

.user-handover-form label {
  gap: 3px;
  margin: 0;
}

.user-handover-form select,
.user-handover-form button {
  min-height: 36px;
}

.user-handover-arrow {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 900;
}

.user-handover-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.user-handover-table-scroll {
  border: 1px solid var(--line);
}

.user-handover-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
}

.user-handover-table th,
.user-handover-table td {
  height: 36px;
  padding: 3px 7px;
  border-right: 1px solid #e1e6e2;
  border-bottom: 1px solid #e1e6e2;
  vertical-align: middle;
}

.user-handover-table th:nth-child(1) { width: 170px; }
.user-handover-table th:nth-child(2),
.user-handover-table th:nth-child(3) { width: 210px; }
.user-handover-table th:nth-child(4) { width: 110px; }
.user-handover-table th:nth-child(5) { width: 140px; }

.user-handover-table strong,
.user-handover-table small {
  display: inline;
}

.user-handover-table small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
}

.route-record-type.is-replacement {
  border-color: #aebfda;
  background: #eef4fc;
  color: #285b91;
}

.danger-button {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.danger-button:hover {
  background: #b42318;
  color: #fff;
  border-color: #b42318;
}

.danger-mini-link {
  border-color: #f1b8b4;
  color: var(--red);
}

.danger-mini-link:hover {
  background: #fee4e2;
  border-color: #e89a94;
  color: var(--red);
}

.mini-link {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #c9d7c4;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.mini-link:hover {
  background: #f6fbf4;
  color: var(--green);
}

.uploaded-link {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.uploaded-link:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.proceed-link {
  border-color: #b9d0c3;
}

.disabled-mini-link, .disabled-mini-link:hover {
  background: #f1f3f0;
  border-color: #d9ded6;
  color: #9aa39d;
  cursor: not-allowed;
}

.drawing-name-link {
  display: inline-block;
  max-width: 220px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}

.drawing-name-link:hover {
  text-decoration: underline;
}

.order-action-col {
  white-space: nowrap;
}

.order-select-col {
  width: 42px;
  max-width: 42px;
  text-align: center;
}

.order-select-col input[type="checkbox"], .order-group-check input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0;
}

.order-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-action-form {
  margin: 0;
}

.inline-action-form .mini-link {
  min-height: 26px;
  padding: 0 9px;
  font-size: 13px;
}

.order-main-header td {
  padding: 7px 9px;
  border-top: 1px solid #cbd8c8;
  border-bottom: 1px solid #cbd8c8;
}

.order-main-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.order-main-head strong {
  font-size: 14px;
  margin-right: 6px;
}

.order-group-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.js-order-item-row.is-collapsed {
  display: none;
}

.shared-drawing-row.is-hidden {
  display: none;
}

.shared-drawing-row td {
  padding: 10px 12px;
  background: #fbfcfb;
}

.shared-drawing-form {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr auto;
  align-items: end;
  gap: 10px;
  margin: 0;
}

.shared-drawing-form label {
  margin: 0;
}

.shared-seq-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 38px;
}

.shared-seq-list label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #d6dfd2;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.shared-seq-list input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0;
}

.batch-action-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 10px;
}

.batch-action-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  margin: 0;
}

.batch-action-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.batch-action-box .form-actions {
  margin-top: 8px;
}

.tech-batch-panel {
  padding-bottom: 12px;
}

.batch-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.batch-toolbar button,
.batch-toolbar .button {
  min-height: 34px;
  padding: 0 12px;
}

.inline-toolbar-form {
  margin: 0;
}

.batch-select-all {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #d6dfd2;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.batch-select-all input,
.js-batch-select {
  width: auto;
  min-height: auto;
  margin: 0;
}

.batch-upload-panel {
  display: grid;
  grid-template-columns: minmax(420px, 650px) auto;
  justify-content: start;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.batch-upload-panel.is-hidden {
  display: none;
}

.batch-upload-panel label {
  margin: 0;
}

.batch-selected-summary {
  min-width: 138px;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-upload-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-self: start;
  align-items: start;
  gap: 8px;
  margin-top: 34px;
}

.batch-upload-button-stack {
  display: grid;
  gap: 6px;
}

.batch-upload-button-stack button {
  width: 92px;
  min-width: 92px;
  height: 36px;
  min-height: 36px;
  padding-left: 0;
  padding-right: 0;
}

.tech-batch-table {
  min-width: 1400px;
}

.drawing-status-col {
  width: 9em;
  max-width: 9em;
  white-space: nowrap;
}

.drawing-ready {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.drawing-empty {
  color: var(--muted);
  border-color: #d6dfd2;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 14px;
}

.login-card {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(23, 33, 27, .08);
}

.login-card h1 { margin-bottom: 6px; }

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

.login-card button {
  width: 100%;
  margin-top: 6px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 5px 12px;
  background: #edf1eb;
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.topbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.topbar form { margin: 0; }

.topbar nav .button,
.topbar nav button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 13px;
}

.topbar nav .topbar-refresh-button {
  width: 58px;
  min-width: 58px;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.topbar nav .topbar-refresh-button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.layout {
  width: calc(100vw - 28px);
  max-width: none;
  margin: 8px auto 30px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(23, 33, 27, .05);
}

.dashboard-summary-panel {
  padding: 9px 12px;
  margin-bottom: 8px;
}

.dashboard-summary-panel .section-head {
  align-items: center;
  margin-bottom: 0;
}

.dashboard-summary-panel .section-head p {
  font-size: 12px;
  line-height: 1.2;
}

.dashboard-summary-panel .action-button-row {
  gap: 6px;
}

.dashboard-summary-panel .action-button-row .button {
  min-height: 31px;
  font-size: 13px;
}

.sales-dashboard-summary-panel .section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
}

.sales-dashboard-summary-panel .section-head > div {
  width: 100%;
}

.sales-dashboard-summary-panel .section-head > div:first-child,
.sales-dashboard-summary-panel .sales-dashboard-title-line {
  display: contents;
}

.sales-dashboard-summary-panel .action-button-row {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  justify-content: flex-end;
}

.dashboard-summary-panel .stats-grid {
  gap: 6px;
  margin-top: 7px;
}

.sales-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}

.sales-dashboard-title-line {
  width: 100%;
}

.dashboard-summary-panel .sales-dashboard-title-line h2 {
  display: inline-flex;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  min-height: 34px;
  margin-bottom: 0;
}

.sales-status-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  width: 100%;
  margin-left: 0;
}

.dashboard-summary-panel .sales-status-pill {
  margin-bottom: 0;
}

.sales-status-grid .sales-status-pill {
  width: 100%;
  background: #f7fbf8;
  border-color: #b9d0c3;
  box-shadow: none;
  color: #254735;
}

.sales-status-grid .pending-label {
  color: var(--green-dark);
}

.sales-status-grid .pending-number {
  color: #526158;
}

.sales-status-grid .pending-number strong {
  color: var(--green);
}

.sales-status-grid .sales-fraction-count strong span + span::before {
  color: #74857b;
}

.sales-completed-view-button {
  min-width: 86px;
  text-decoration: none;
}

.sales-completed-view-button.is-active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}

.sales-completed-action-button.is-active {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.sales-completed-action-button {
  justify-content: center;
  width: 116px;
}

.button-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 9px;
  background: #fff;
  color: var(--green-dark);
  font-size: 11px;
  line-height: 1;
}

.sales-fraction-count {
  align-items: center;
  gap: 3px;
}

.dashboard-summary-panel .sales-fraction-count strong {
  display: inline-flex;
  align-items: baseline;
  min-width: auto;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

.sales-fraction-count strong span + span {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 14px;
}

.sales-fraction-count strong span + span::before {
  content: "/";
  margin: 0 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 700;
}

.sales-secondary-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 3px 10px;
  border-radius: 999px;
}

.completed-view-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid #b9d0c3;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.completed-view-summary strong {
  font-size: 16px;
}

.dashboard-summary-panel .stat-box {
  padding: 6px 9px;
}

.dashboard-summary-panel .stat-box strong {
  display: inline-block;
  margin: 0 0 0 7px;
  font-size: 19px;
}

.dashboard-summary-panel .stat-box span {
  display: inline-block;
}

.narrow-panel {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.import-panel {
  width: 100%;
}

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

.section-head h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.order-context-head {
  min-width: 0;
  flex: 1;
}

.product-focus {
  display: grid;
  gap: 3px;
  max-width: 100%;
  padding: 10px 13px;
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--soft-green);
}

.product-focus span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.product-focus strong {
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.22;
  word-break: break-word;
}

.product-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-button-row .button {
  width: 120px;
}

.dashboard-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.dashboard-summary-panel .dashboard-title-line {
  gap: 12px;
}

.dashboard-title-line h2 {
  margin-bottom: 4px;
  font-size: 28px;
  font-weight: 900;
}

.dashboard-summary-panel .dashboard-title-line h2 {
  margin-bottom: 2px;
  font-size: 22px;
}

.pending-inline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
  min-height: 48px;
  padding: 7px 20px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(46, 107, 79, .16);
  color: #fff;
  white-space: nowrap;
}

.dashboard-summary-panel .pending-inline {
  gap: 10px;
  min-height: 34px;
  margin-bottom: 2px;
  padding: 3px 12px;
  box-shadow: none;
}

.dashboard-summary-panel .pending-label {
  font-size: 15px;
}

.dashboard-summary-panel .pending-number {
  font-size: 12px;
}

.dashboard-summary-panel .pending-number strong {
  font-size: 20px;
}

.dashboard-summary-panel .pending-number.sales-fraction-count strong {
  display: inline-flex;
  align-items: baseline;
  min-width: auto;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

.dashboard-summary-panel .pending-number.sales-fraction-count strong span + span {
  font-size: 14px;
}

.pending-label {
  font-size: 19px;
  font-weight: 900;
}

.pending-number {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 15px;
  font-weight: 800;
}

.pending-number strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

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

.stat-box {
  border: 1px solid var(--line);
  background: var(--soft-green);
  border-radius: 8px;
  padding: 12px;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-box strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 6px 12px;
}

.grid-form.single-column {
  grid-template-columns: 1fr;
}

.manual-order-panel {
  max-width: 1280px;
}

.manual-order-form {
  display: grid;
  grid-template-columns: 150px minmax(300px, 1fr) 90px 150px 180px minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.manual-order-form label {
  margin: 0;
}

.manual-order-form input {
  min-height: 34px;
}

.sales-drawing-choice {
  width: 100%;
  min-width: 0;
  max-width: 300px;
  margin: 0;
  padding: 0;
  border: 0;
}

.sales-drawing-choice legend {
  margin-bottom: 4px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}

.sales-drawing-choice-options {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #cfd8d1;
  border-radius: 4px;
  background: #fff;
}

.sales-drawing-choice-options label {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.sales-drawing-choice-options label + label {
  border-left: 1px solid #d8e0da;
}

.sales-drawing-choice-options label:has(input:checked) {
  background: #e9f4ec;
  color: #1f6739;
  font-weight: 700;
}

.sales-drawing-choice-options input,
.manual-order-form .sales-drawing-choice-options input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.manual-order-actions {
  margin-top: 0;
  flex-wrap: nowrap;
}

.manual-order-actions button,
.manual-order-actions .button {
  min-height: 34px;
}

.stock-production-form {
  grid-template-columns: 145px minmax(280px, 1fr) 80px 110px 145px minmax(180px, 0.75fr) auto;
}

.stock-production-confirm {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(20, 37, 29, 0.22);
}

.stock-production-confirm::backdrop {
  background: rgba(20, 31, 26, 0.38);
}

.stock-production-confirm-content {
  padding: 22px;
}

.stock-production-confirm-content h2 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 20px;
}

.stock-production-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stock-production-confirm-actions .secondary {
  grid-column: 1 / -1;
}

.role-select-layout {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: start center;
  padding-top: 72px;
}

.role-select-panel {
  width: min(760px, 100%);
  padding: 24px;
}

.role-select-panel h2 {
  margin: 0 0 18px;
  text-align: center;
}

.role-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.role-select-grid form,
.role-select-grid button {
  width: 100%;
}

.role-select-grid button {
  min-height: 48px;
  font-size: 16px;
}

.full-row { grid-column: 1 / -1; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 28px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px 180px auto auto;
  gap: 8px;
  margin-bottom: 12px;
}

.tech-filter-bar {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}

.table-scroll {
  overflow-x: auto;
}

.order-list-panel {
  padding: 12px;
}

.order-list-panel .section-head {
  align-items: center;
  margin-bottom: 7px;
}

.order-list-panel .section-head h2 {
  font-size: 18px;
}

.order-list-panel .section-head p {
  line-height: 1.25;
}

.order-list-title-line {
  gap: 10px;
}

.order-list-panel .order-list-title-line h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.order-list-panel .pending-inline {
  gap: 9px;
  min-height: 30px;
  margin-bottom: 0;
  padding: 2px 10px;
  box-shadow: none;
}

.order-list-panel .pending-label {
  font-size: 13px;
}

.order-list-panel .pending-number {
  font-size: 12px;
}

.order-list-panel .pending-number strong {
  font-size: 18px;
}

.dashboard-right-tools {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.dashboard-right-tools .priority-filter-list {
  flex: 0 0 auto;
}

.priority-search-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-left: auto;
}

.notification-nav-button {
  min-height: 29px;
  padding: 0 10px;
  font-size: 13px;
}

.notification-nav-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  line-height: 1;
}

.planner-action-grid {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, 96px);
  gap: 3px 4px;
}

.planner-action-grid .notification-nav-button {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

.planner-dashboard-tools {
  gap: 4px;
}

.planner-dashboard-tools .priority-search-tools {
  margin-left: 0;
}

.planner-ticket-entry {
  width: 100%;
  justify-content: center;
}

.planner-primary-actions {
  display: grid;
  flex: 0 0 96px;
  width: 96px;
  gap: 3px;
  align-self: flex-start;
}

.planner-primary-actions .notification-nav-button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.planner-completed-table-entry.is-active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.shortage-alert-button.is-alerting {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.shortage-alert-button.is-alerting:hover,
.shortage-alert-button.is-alerting:focus-visible {
  border-color: #8f1c13;
  background: #8f1c13;
  color: #fff;
}

.shortage-alert-panel {
  padding: 10px 12px;
}

.shortage-alert-head {
  align-items: center;
  margin-bottom: 8px;
}

.shortage-alert-title-line,
.shortage-alert-summary {
  display: flex;
  align-items: center;
}

.shortage-alert-title-line {
  gap: 12px;
}

.shortage-alert-title-line h2 {
  margin: 0;
}

.shortage-alert-summary {
  min-height: 30px;
  padding: 2px 10px;
  border: 1px solid #efb0aa;
  border-radius: 4px;
  background: #fff1f0;
  color: #8f1c13;
  font-size: 13px;
  font-weight: 700;
}

.shortage-alert-summary strong {
  margin-left: 6px;
  font-size: 18px;
}

.shortage-alert-sync-error {
  margin-bottom: 8px;
  padding: 7px 10px;
  border: 1px solid #efb0aa;
  background: #fff1f0;
  color: #8f1c13;
}

.shortage-alert-table-scroll {
  border: 1px solid #bcc8bd;
}

.shortage-alert-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
}

.shortage-alert-table th,
.shortage-alert-table td {
  height: 31px;
  padding: 2px 5px;
  overflow: hidden;
  border-right: 1px solid #dfe5e1;
  border-bottom: 1px solid #dfe5e1;
  background: #fff;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 12px;
}

.shortage-alert-table th {
  background: #eef3ef;
  font-weight: 800;
}

.shortage-alert-table .shortage-main-col { width: 112px; }
.shortage-alert-table .shortage-seq-col { width: 44px; text-align: center; }
.shortage-alert-table .shortage-customer-col { width: 92px; }
.shortage-alert-table .shortage-product-col { width: 300px; }
.shortage-alert-table .shortage-number-col { width: 62px; text-align: center; }
.shortage-alert-table .shortage-route-col { width: 240px; }
.shortage-alert-table .shortage-date-col { width: 78px; text-align: center; }
.shortage-alert-table .shortage-status-col { width: 72px; text-align: center; }
.shortage-alert-table .shortage-sales-col { width: 72px; }
.shortage-alert-table .shortage-action-col { width: 86px; text-align: center; }

.shortage-alert-table .shortage-product-col {
  color: #173f2a;
  font-weight: 700;
}

.shortage-alert-table .shortage-value {
  color: #b42318;
  font-size: 14px;
  font-weight: 900;
}

.shortage-alert-table td.shortage-route-col {
  overflow: visible;
  white-space: normal;
}

.shortage-route-balance-list {
  display: grid;
  gap: 2px;
}

.shortage-route-balance-line {
  display: grid;
  grid-template-columns: 6ch repeat(3, minmax(3.5ch, auto));
  gap: 5px;
  align-items: center;
  min-height: 19px;
  white-space: nowrap;
}

.shortage-route-balance-line strong {
  color: #244b31;
}

.shortage-route-scrap {
  color: #a43327;
}

.shortage-route-remaining {
  color: #19633a;
  font-weight: 800;
}

.shortage-route-dialog {
  width: min(620px, calc(100vw - 24px));
}

.shortage-route-balance-button {
  min-width: 92px;
}

.shortage-route-total-shortage {
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px solid #e2aaa5;
  background: #fff5f3;
  color: #9b2c22;
  font-weight: 800;
}

.shortage-route-total-shortage strong {
  font-size: 16px;
}

.shortage-route-balance-panel {
  margin-top: 8px;
  border: 1px solid #d7e0d9;
  background: #fff;
}

.shortage-route-balance-head,
.shortage-route-dialog-line {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(4, 62px);
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
}

.shortage-route-balance-head {
  background: #eef3ef;
  color: #53635a;
  font-size: 12px;
  font-weight: 800;
}

.shortage-route-dialog-list {
  display: grid;
  max-height: 190px;
  overflow-y: auto;
}

.shortage-route-dialog-line {
  min-height: 29px;
  border-top: 1px solid #edf1ee;
  font-size: 13px;
  text-align: center;
}

.shortage-route-dialog-line strong {
  text-align: left;
}

.shortage-route-reuse {
  color: #87651b;
}

.shortage-route-add-title {
  margin-top: 10px;
  color: #315b40;
  font-size: 13px;
  font-weight: 800;
}

.shortage-route-fields {
  display: grid;
  grid-template-columns: 92px minmax(150px, 1fr) 110px;
  gap: 8px;
  margin-top: 8px;
}

.shortage-route-fields label {
  margin: 0;
}

.shortage-route-fields input,
.shortage-route-fields select {
  width: 100%;
}

@media (max-width: 560px) {
  .shortage-route-fields,
  .shortage-route-balance-head,
  .shortage-route-dialog-line {
    grid-template-columns: 1fr;
  }

  .shortage-route-balance-head {
    display: none;
  }

  .shortage-route-dialog-line {
    gap: 3px;
    grid-template-columns: 1fr 1fr;
  }
}

.dashboard-search-bar {
  display: grid;
  grid-template-columns: minmax(200px, 260px) auto auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.dashboard-search-bar input,
.dashboard-search-bar button,
.dashboard-search-bar .button {
  min-height: 29px;
  font-size: 13px;
}

.dashboard-search-bar button,
.dashboard-search-bar .button {
  padding: 0 10px;
}

.order-list-scroll {
  border: 1px solid #bcc8bd;
  background: #fff;
}

.virtual-order-list {
  height: calc(100vh - 160px);
  min-height: 360px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.virtual-order-spacer td {
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: #fff !important;
}

.virtual-order-spacer div {
  width: 1px;
  min-height: 0;
  pointer-events: none;
}

.virtual-order-loading-row td {
  height: 72px;
}

html.has-open-dialog,
body.has-open-dialog {
  overflow: hidden;
  overscroll-behavior: none;
}

body.has-open-dialog .virtual-order-list {
  overflow: hidden;
}

dialog[open] {
  overscroll-behavior: contain;
}

.order-grid-table {
  border-collapse: separate;
  border-spacing: 0;
}

.order-grid-table th,
.order-grid-table td {
  height: 29px;
  padding: 3px 6px;
  border-right: 1px solid #cbd4cb;
  border-bottom: 1px solid #cbd4cb;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.order-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  background: #e9eee9;
  color: #344139;
  font-weight: 900;
}

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

.order-grid-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-grid-table .product-table-cell {
  width: 34%;
  min-width: 400px;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.15;
}

.order-grid-table .order-main-header td {
  height: 27px;
  padding: 2px 6px;
  border-top: 1px solid #aebcaf;
  border-bottom-color: #aebcaf;
}

.order-grid-table .order-main-header:first-child td {
  border-top: 0;
}

.order-grid-table .order-main-head {
  display: grid;
  grid-template-columns: 26px 156px 8px 110px 8px 90px 8px 50px auto;
  gap: 3px;
  align-items: center;
  overflow: hidden;
}

.order-grid-table .order-main-head strong {
  min-width: 0;
  margin-right: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-grid-table .order-main-customer {
  width: 110px;
  max-width: 110px;
}

.order-grid-table .order-main-sales {
  width: 90px;
  max-width: 90px;
}

.order-grid-table .order-main-divider {
  text-align: center;
}

.order-grid-table .js-order-group-toggle {
  width: 50px;
  padding-left: 5px;
  padding-right: 5px;
}

.order-grid-table .tech-batch-link {
  width: max-content;
  justify-self: start;
  padding-left: 6px;
  padding-right: 6px;
}

.warehouse-batch-actions {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.order-grid-table .warehouse-batch-actions .tech-batch-link {
  padding-left: 5px;
  padding-right: 5px;
}

.order-main-summary {
  min-width: 0;
  overflow: hidden;
  color: #46544b;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-main-divider {
  color: #8d9990;
  font-size: 13px;
  font-weight: 700;
}

.order-main-customer {
  max-width: 180px;
}

.order-main-sales {
  max-width: 130px;
}

.order-grid-table .order-actions {
  gap: 4px;
  flex-wrap: nowrap;
}

.order-grid-table .order-actions > .js-open-tech-upload,
.order-grid-table .order-actions > .js-open-tech-drawing {
  order: 1;
}

.order-grid-table .order-actions > .tech-flow-action {
  order: 2;
}

.order-grid-table .mini-link,
.order-grid-table .planner-lock-pill,
.order-grid-table .status-pill {
  min-height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 19px;
}

.order-grid-table .inline-action-form .mini-link {
  min-height: 21px;
  padding: 0 7px;
  font-size: 13px;
}

.order-grid-table .sales-main-edit-link {
  width: 56px;
  min-width: 56px;
  padding: 0 2px;
  font-size: 12px;
}

.order-grid-table .drawing-name-link {
  max-width: 150px;
  font-size: 13px;
}

.order-grid-table .route-action-wrap {
  gap: 4px;
}

.order-grid-table .empty-cell {
  height: 44px;
  padding: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #e3e8df;
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  background: #f8faf8;
  font-weight: 800;
}

.order-main-no-col {
  width: 14ch;
  white-space: nowrap;
}

.order-no-heading {
  display: flex;
  align-items: center;
  gap: 2px;
}

.table-head-toggle {
  min-height: 20px;
  padding: 0 2px;
  border: 1px solid #b8c6b9;
  border-radius: 3px;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
}

.table-head-toggle:hover {
  border-color: var(--green);
  background: #f5faf6;
  color: var(--green-dark);
}

.order-sub-no-col {
  width: 4ch;
  white-space: nowrap;
  text-align: center;
}

.order-global-toggle-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center;
}

.order-global-toggle-col .table-head-toggle {
  width: 100%;
  min-height: 32px;
  padding: 1px 2px;
  line-height: 14px;
  white-space: normal;
  word-break: break-all;
}

.order-customer-col {
  width: 10ch;
  max-width: 10ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-quantity-col {
  width: 4ch;
  max-width: 4ch;
  white-space: nowrap;
  text-align: right;
}

.order-remark-col {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status-col {
  width: 6.5em;
  min-width: 76px;
  max-width: 6.5em;
  text-align: center;
  white-space: nowrap;
}

.order-grid-table .order-status-col .status-pill {
  box-sizing: border-box;
  min-width: 66px;
  max-width: 100%;
  justify-content: center;
  padding-right: 5px;
  padding-left: 5px;
}

.status-filter-form {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.order-grid-table thead .order-status-col:has(.status-filter-form) {
  padding-right: 2px;
  padding-left: 2px;
}

.status-filter-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0 14px 0 3px;
  border: 1px solid #bdc9c0;
  border-radius: 3px;
  background-color: #f7faf8;
  color: #34463a;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
}

.status-filter-select.is-active {
  border-color: #4f8d64;
  background-color: #e8f3eb;
  color: #1f6739;
}

.order-date-col {
  width: 10ch;
  max-width: 10ch;
  white-space: nowrap;
  text-align: center;
}

.order-flow-time-col {
  width: 9em;
  max-width: 9em;
  white-space: nowrap;
}

.order-route-action-col {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  text-align: center;
  white-space: nowrap;
}

.route-action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.route-no-text {
  display: inline-block;
  max-width: 76px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  vertical-align: middle;
}

.warehouse-route-button {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.warehouse-route-button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.change-notification-table td {
  vertical-align: top;
}

.change-detail-cell {
  width: 112px;
  min-width: 112px;
  text-align: center;
  vertical-align: middle !important;
}

.change-detail-cell .mini-link {
  min-width: 96px;
}

.change-notification-table .js-confirm-change-notification:disabled {
  border-color: #d8ddda;
  background: #eef0ef;
  color: #9aa29d;
  cursor: not-allowed;
  opacity: 1;
}

.warehouse-route-dialog.change-detail-dialog {
  width: min(820px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
}

.change-detail-dialog-content {
  box-sizing: border-box;
  display: flex;
  max-height: calc(100vh - 24px);
  flex-direction: column;
  overflow: hidden;
}

.change-detail-dialog-scroll {
  min-height: 0;
  margin-top: 10px;
  overflow-y: auto;
}

.change-detail-dialog-summary {
  padding: 8px 10px;
  border: 1px solid #cfd9d1;
  background: #f4f8f4;
  color: #26342a;
  font-size: 14px;
  font-weight: 900;
}

.change-detail-dialog-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.change-detail-dialog-list .change-detail-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 24px minmax(0, 1fr);
  max-width: none;
  min-height: 38px;
  padding: 6px 8px;
  font-size: 13px;
}

.change-detail-dialog-list .change-detail-field {
  max-width: none;
  white-space: normal;
}

.change-detail-dialog-list .change-detail-old,
.change-detail-dialog-list .change-detail-new {
  overflow: visible;
  padding: 4px 6px;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.change-detail-dialog-list .change-detail-note {
  display: block;
  max-width: none;
  min-height: 34px;
  padding: 6px 8px;
  line-height: 20px;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.notification-pending-row td {
  background: #fff9e8;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.change-summary {
  display: inline-block;
  margin-right: 6px;
  color: #26342a;
  font-size: 12px;
  font-weight: 900;
  line-height: 20px;
}

.change-detail-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  margin-top: 0;
  max-width: 100%;
  vertical-align: top;
}

.change-detail-item {
  display: inline-grid;
  grid-template-columns: max-content minmax(34px, 118px) 10px minmax(34px, 142px);
  gap: 2px;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 1px 4px;
  border: 1px solid #d7e3d7;
  border-radius: 4px;
  background: #fbfdfb;
  font-size: 12px;
  line-height: 18px;
}

.change-detail-field {
  max-width: 52px;
  overflow: hidden;
  color: #35433a;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-detail-old,
.change-detail-new {
  min-width: 0;
  overflow: hidden;
  padding: 0 4px;
  border-radius: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-detail-old {
  background: #fff0ef;
  color: #9b2c25;
}

.change-detail-new {
  background: #eaf6ee;
  color: #1f6b41;
  font-weight: 900;
}

.change-detail-arrow {
  color: #7c8980;
  text-align: center;
  font-weight: 900;
}

.change-detail-note {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  min-height: 20px;
  padding: 1px 5px;
  border: 1px solid #ead8a3;
  border-radius: 4px;
  background: #fff9e8;
  color: #7a5a12;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.notification-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.notification-status-pill.is-done {
  background: #edf5ef;
  color: var(--green);
}

.notification-status-pill.is-pending {
  background: #fff2cc;
  color: #8a5a00;
}

.notification-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.force-notification-dialog {
  width: min(620px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid #d3b05d;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(31, 37, 33, .28);
}

.force-notification-dialog::backdrop {
  background: rgba(23, 33, 27, .48);
}

.shortage-force-notification-dialog {
  border-color: #dc7a70;
}

.shortage-force-notification-dialog .force-notification-head {
  border-bottom-color: #efb0aa;
  background: #fff1f0;
}

.shortage-force-notification-dialog .force-notification-head span,
.shortage-force-notification-dialog .force-notification-item em {
  color: #9b2c25;
}

.shortage-force-notification-dialog .force-notification-item {
  border-color: #efd0cc;
  background: #fffafa;
}

.force-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #ead8a3;
  background: #fff8df;
}

.force-notification-head span {
  display: inline-flex;
  margin-bottom: 3px;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 900;
}

.force-notification-head h2 {
  margin: 0;
  font-size: 20px;
}

.force-notification-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #d33d2f;
  color: #fff;
  font-size: 22px;
}

.force-notification-body {
  padding: 14px 16px 4px;
}

.force-notification-body p {
  margin: 0 0 10px;
  color: #46544b;
  font-size: 14px;
  font-weight: 800;
}

.force-notification-list {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow: auto;
}

.force-notification-item {
  display: grid;
  grid-template-columns: 120px minmax(150px, 1fr) 96px;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #e6dcc0;
  background: #fffdf6;
  font-size: 13px;
}

.force-notification-item span,
.force-notification-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.force-notification-item em {
  color: #8a5a00;
  font-style: normal;
  font-weight: 900;
}

.force-notification-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.force-change-list {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 3px 5px;
}

.force-change-item {
  display: inline-grid;
  grid-template-columns: max-content minmax(34px, 105px) 10px minmax(34px, 125px);
  gap: 2px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 20px;
  padding: 1px 4px;
  border: 1px solid #d7e3d7;
  border-radius: 4px;
  background: #fbfdfb;
  font-size: 12px;
  line-height: 18px;
}

.force-change-item b {
  max-width: 52px;
  overflow: hidden;
  color: #35433a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.force-change-item i {
  min-width: 0;
  overflow: hidden;
  padding: 0 4px;
  border-radius: 3px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.force-change-old {
  background: #fff0ef;
  color: #9b2c25;
}

.force-change-new {
  background: #eaf6ee;
  color: #1f6b41;
  font-weight: 900;
}

.force-change-note {
  max-width: 320px;
  overflow: hidden;
  padding: 1px 5px;
  border: 1px solid #ead8a3;
  border-radius: 4px;
  background: #fff9e8;
  color: #7a5a12;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.force-notification-empty,
.force-notification-more {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.force-notification-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 14px;
}

.muted-action-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.warehouse-route-summary {
  margin-bottom: 12px;
}

.warehouse-route-page-form {
  grid-template-columns: minmax(240px, 1fr) 120px;
  max-width: 560px;
}

.warehouse-route-dialog {
  width: min(500px, calc(100vw - 24px));
  max-width: none;
  padding: 0;
  border: 1px solid #aebcaf;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 22px 60px rgba(23, 33, 27, .24);
}

.warehouse-route-dialog::backdrop {
  background: rgba(23, 33, 27, .42);
}

.warehouse-route-dialog-form {
  padding: 14px;
}

.warehouse-route-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.warehouse-route-dialog-head > div {
  min-width: 0;
}

.warehouse-route-dialog-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.warehouse-route-dialog-head strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  line-height: 1.25;
  word-break: break-word;
}

.warehouse-dialog-close {
  flex: 0 0 30px;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.warehouse-dialog-close:hover {
  border-color: #bcc8bd;
  background: #f2f5f2;
  color: var(--text);
}

.warehouse-route-dialog-order {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.warehouse-route-dialog-remark {
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faf8;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.warehouse-route-dialog-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px;
  gap: 8px;
  margin-top: 5px;
}

.warehouse-route-lines-wrap {
  grid-column: 1 / -1;
}

.warehouse-route-lines-head {
  display: grid;
  grid-template-columns: 72px 120px 74px 54px;
  gap: 6px;
  align-items: center;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.warehouse-route-lines-head span:nth-child(2) {
  text-align: center;
}

.warehouse-route-lines-head button {
  width: 100%;
  min-width: 0;
}

.warehouse-route-lines {
  display: grid;
  gap: 5px;
}

.warehouse-route-line {
  display: grid;
  grid-template-columns: 72px 120px 74px 54px;
  gap: 6px;
  align-items: center;
}

[data-editor-role="warehouse"] .warehouse-route-lines-head,
[data-editor-role="warehouse"] .warehouse-route-line {
  grid-template-columns: 72px 250px 74px 54px;
}

[data-editor-role="warehouse"] .warehouse-route-lines-head span:nth-child(2) {
  white-space: nowrap;
}

.warehouse-route-number-heading {
  display: block;
  width: max-content;
  max-width: none;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap !important;
}

.warehouse-route-line select,
.warehouse-route-line input {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 13px;
}

.warehouse-route-line .warehouse-route-no-button {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border-color: #2f7d4a;
  border-radius: 4px;
  background: #2f7d4a;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.warehouse-route-line .warehouse-route-no-button:hover,
.warehouse-route-line .warehouse-route-no-button:focus-visible {
  background: #24653b;
}

.warehouse-route-line .warehouse-route-no-button.is-changed {
  border-color: #b7791f;
  background: #f4c95d;
  color: #49320a;
}

.warehouse-route-line .warehouse-route-no-button:disabled {
  border-color: #c8ced2;
  background: #e5e8ea;
  color: #687078;
  cursor: default;
}

.warehouse-route-line .mini-link {
  min-height: 32px;
  padding: 0 8px;
}

.warehouse-route-line.is-readonly select,
.warehouse-route-line.is-readonly input {
  border-color: #d8dce1;
  background: #f1f3f5;
  color: #5f6872;
}

.warehouse-route-line.is-readonly .mini-link {
  opacity: 0.45;
}

.route-detail-box {
  margin-bottom: 10px;
}

.route-detail-table {
  display: grid;
  gap: 4px;
}

.route-detail-row {
  display: grid;
  grid-template-columns: 72px minmax(120px, 1fr) 90px;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}

.route-detail-row strong {
  font-size: 14px;
}

.warehouse-route-dialog-fields label {
  margin-bottom: 0;
}

.warehouse-route-dialog-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.route-split-dialog {
  width: min(1100px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.route-split-dialog .warehouse-route-dialog-form {
  display: grid;
  gap: 10px;
}

.route-operation-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(360px, 100%);
  gap: 8px;
}

.route-operation-tabs button {
  min-height: 42px;
  padding: 0 18px;
  border: 2px solid;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 900;
}

.route-operation-tabs button[data-operation="split"] {
  border-color: #5e9870;
  background: #f2f8f3;
  color: #24613a;
}

.route-operation-tabs button[data-operation="replacement"] {
  border-color: #7898bd;
  background: #f1f6fc;
  color: #315f91;
}

.route-operation-tabs button[data-operation="split"].is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(45, 109, 68, .15);
}

.route-operation-tabs button[data-operation="replacement"].is-active {
  background: #356fa8;
  border-color: #356fa8;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(53, 111, 168, .16);
}

.route-operation-tabs button:not(.is-active) {
  opacity: .78;
}

.route-split-lookup-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 88px;
  gap: 8px;
  align-items: end;
}

.route-split-lookup-row label,
.route-split-controls label {
  gap: 3px;
  margin: 0;
}

.route-split-lookup-row button {
  min-height: 38px;
}

.route-split-summary {
  min-width: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--green);
  background: #f2f7f3;
}

.route-split-summary strong,
.route-split-summary span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-split-summary strong {
  font-size: 16px;
}

.route-split-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.route-split-orders {
  overflow-x: auto;
  border: 1px solid #d8e1da;
}

.route-split-orders-head,
.route-split-order-row {
  display: grid;
  grid-template-columns: 118px 90px minmax(240px, 1fr) 66px 66px 76px 66px 158px;
  gap: 6px;
  align-items: center;
  min-width: 970px;
}

.route-split-dialog.is-replacement .route-split-orders-head,
.route-replacement-order-row {
  grid-template-columns: 118px 100px minmax(320px, 1fr) 86px 86px;
  min-width: 760px;
}

.route-split-orders-head {
  min-height: 30px;
  padding: 4px 7px;
  background: #edf3ee;
  color: #45534a;
  font-size: 12px;
  font-weight: 900;
}

.route-split-order-rows {
  display: grid;
}

.route-split-order-row {
  min-height: 36px;
  padding: 4px 7px;
  border-top: 1px solid #e0e6e1;
  background: #fff;
  font-size: 13px;
}

.route-split-order-row > span,
.route-split-order-row > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-split-order-row input[type="number"] {
  width: 70px;
  min-height: 28px;
  padding: 3px 5px;
}

.route-split-order-row select {
  width: 154px;
  min-height: 28px;
  padding: 3px 5px;
  font-size: 12px;
}

.route-split-order-row.is-invalid {
  background: #fff0ef;
}

.route-split-controls {
  display: grid;
  grid-template-columns: minmax(180px, 360px);
  gap: 8px;
}

.route-split-controls input,
.route-split-controls select {
  min-width: 0;
}

.route-split-equation {
  padding: 7px 10px;
  border: 1px solid #bfd2c4;
  background: #f7fbf8;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.route-split-equation.is-invalid {
  border-color: #e2aaa5;
  background: #fff0ef;
  color: var(--red);
}

@media (max-width: 700px) {
  .route-split-controls {
    grid-template-columns: 1fr;
  }
}

.tech-upload-dialog {
  width: min(580px, calc(100vw - 24px));
}

.tech-drawing-dialog {
  width: min(640px, calc(100vw - 24px));
}

.tech-batch-dialog {
  width: min(1080px, calc(100vw - 24px));
}

.order-view-dialog {
  width: min(980px, calc(100vw - 24px));
}

.sales-order-edit-dialog {
  width: min(760px, calc(100vw - 24px));
}

.sales-edit-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.sales-edit-dialog-form {
  display: grid;
  grid-template-columns: 120px minmax(240px, 1fr) 82px 138px;
  gap: 7px;
  align-items: end;
}

.sales-edit-dialog-form label,
.sales-main-edit-form label,
.sales-edit-delete-form {
  margin: 0;
}

.sales-edit-dialog-form input,
.sales-main-edit-form input {
  min-height: 32px;
}

.sales-edit-dialog-remark {
  grid-column: 1 / 4;
}

.sales-edit-dialog-actions {
  display: flex;
  align-items: end;
}

.sales-edit-dialog-actions button,
.sales-edit-delete-form .danger-button {
  width: 100%;
  min-height: 32px;
}

.sales-main-edit-form {
  display: grid;
  grid-template-columns: 150px 140px minmax(220px, 1fr) 118px;
  gap: 7px;
  align-items: end;
}

.sales-edit-delete-form {
  display: grid;
  gap: 7px;
  padding-top: 0;
  border-top: 0;
}

.sales-edit-single-delete-form {
  grid-template-columns: 120px minmax(240px, 1fr) 82px 138px;
}

.sales-edit-main-delete-form {
  grid-template-columns: 160px minmax(260px, 1fr) 118px;
}

.sales-edit-delete-form .danger-button {
  grid-column: -2 / -1;
}

.warehouse-route-dialog .sales-delete-danger-button:not(:disabled),
.warehouse-route-dialog .sales-delete-danger-button:not(:disabled):hover,
.warehouse-route-dialog .sales-delete-danger-button:not(:disabled):focus-visible {
  border-color: #d92d20;
  background: #d92d20;
  color: #fff;
}

.route-number-dialog {
  width: min(720px, calc(100vw - 24px));
}

.route-completion-dialog {
  width: min(820px, calc(100vw - 24px));
}

.route-number-list {
  margin-top: 10px;
  overflow-x: auto;
}

.route-number-dialog .warehouse-route-dialog-order {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.route-completion-list {
  margin-top: 10px;
}

.route-number-head,
.route-number-row {
  display: grid;
  grid-template-columns: 60px 74px 82px 68px 70px 74px 86px 100px 86px minmax(100px, 1fr);
  min-width: 850px;
  gap: 5px;
  align-items: center;
}

.route-number-head {
  padding: 5px 7px;
  border: 1px solid #d6dfd2;
  border-bottom: 0;
  background: #edf3ec;
  color: #425047;
  font-size: 13px;
  font-weight: 900;
}

.route-number-rows {
  display: grid;
  gap: 0;
}

.route-number-row {
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #d6dfd2;
  border-top: 0;
  background: #fff;
  font-size: 13px;
}

.route-number-row strong {
  font-size: 15px;
}

.route-inbound-state {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-completion-state {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.route-number-completed-quantity {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.route-number-scrap-quantity {
  color: #a33a32;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.route-completion-state.is-empty {
  color: #7a847d;
}

.route-completion-state.is-complete {
  color: #267047;
}

.route-completion-state.is-partial {
  color: #1f5f9f;
}

.route-number-completed-quantity.is-empty {
  color: #7a847d;
}

.route-number-completed-quantity.is-complete {
  color: #267047;
}

.route-number-completed-quantity.is-partial {
  color: #1f5f9f;
}

.route-number-date {
  color: #4f5c54;
  font-size: 12px;
  white-space: nowrap;
}

.route-number-note {
  color: #1f5f9f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.route-inbound-state.is-empty {
  color: #7a847d;
}

.route-inbound-state.is-partial {
  color: #1f5f9f;
}

.route-inbound-state.is-complete {
  color: #267047;
}

.route-processing-state {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 800;
}

.route-processing-state.is-active {
  color: #267047;
}

.route-processing-state.is-stopped {
  color: #a33a32;
}

.route-number-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f5f9f;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.route-number-link:hover {
  text-decoration: underline;
}

.route-completion-head,
.route-completion-row {
  display: grid;
  grid-template-columns: 28px 52px 82px 62px 70px minmax(180px, 1fr) 82px;
  gap: 4px;
  align-items: center;
}

.route-completion-head {
  padding: 5px 7px;
  border: 1px solid #d6dfd2;
  border-bottom: 0;
  background: #edf3ec;
  color: #425047;
  font-size: 13px;
  font-weight: 900;
}

.route-completion-rows {
  display: grid;
}

.route-completion-row {
  min-height: 32px;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid #d6dfd2;
  border-top: 0;
  background: #fff;
  font-size: 13px;
}

.route-completion-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0 auto;
}

.route-completion-quantity {
  width: 64px;
  min-height: 24px;
  padding: 0 5px;
  border: 1px solid #cfd9ce;
  border-radius: 4px;
  font-size: 13px;
}

.route-completion-row strong {
  font-size: 15px;
}

.route-completion-row em {
  min-width: 0;
  overflow: hidden;
  color: #7a5a12;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-completion-row.is-completed {
  background: #f4f7f4;
}

.route-completion-row.is-completed em {
  color: #1f6b41;
}

.route-completion-action {
  display: flex;
  justify-content: flex-end;
}

.route-stock-transfer-button {
  border-color: #267047;
  background: #267047;
  color: #fff;
  white-space: nowrap;
}

.route-stock-transfer-button:hover,
.route-stock-transfer-button:focus-visible {
  border-color: #1e5939;
  background: #1e5939;
  color: #fff;
}

.route-flow-panel {
  margin-top: 10px;
  border: 1px solid #d6dfd2;
  background: #fff;
}

.route-flow-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #d6dfd2;
  background: #edf3ec;
  color: #425047;
  font-size: 13px;
  font-weight: 900;
}

.route-flow-head,
.route-flow-row {
  display: grid;
  grid-template-columns: 106px 58px 60px minmax(110px, 1fr) 38px 38px 62px 122px;
  gap: 5px;
  align-items: center;
}

.route-flow-head {
  padding: 5px 7px;
  border-bottom: 1px solid #d6dfd2;
  color: #425047;
  font-size: 12px;
  font-weight: 900;
}

.route-flow-row {
  min-height: 28px;
  padding: 4px 7px;
  border-bottom: 1px solid #edf1ed;
  font-size: 12px;
}

.route-flow-row:last-child {
  border-bottom: 0;
}

.route-flow-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-inherited-mark {
  display: inline-block;
  margin-right: 3px;
  padding: 0 3px;
  border: 1px solid #a9c7b1;
  border-radius: 3px;
  background: #edf7f0;
  color: #246443;
  font-size: 10px;
  line-height: 16px;
}

.tech-drawing-dialog-content {
  display: block;
}

.tech-batch-dialog-content {
  display: block;
}

.tech-batch-dialog-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
}

.tech-batch-dialog-toolbar button,
.tech-batch-dialog-toolbar .button,
.tech-batch-dialog-toolbar .batch-select-all {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.warehouse-batch-route-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.tech-batch-dialog-toolbar form[hidden] {
  display: none !important;
}

.warehouse-batch-dialog-table .warehouse-batch-type-col {
  width: 78px;
  max-width: 78px;
}

.warehouse-batch-dialog-table .warehouse-batch-type-col select {
  width: 72px;
  min-height: 30px;
  padding: 0 22px 0 7px;
  font-size: 12px;
}

.warehouse-batch-dialog:not([data-batch-action="create"]) .warehouse-batch-type-col {
  display: none;
}

.warehouse-batch-dialog[data-batch-action="create"][data-create-step="select"] .warehouse-batch-type-col {
  display: none;
}

.warehouse-batch-dialog[data-batch-action="create"][data-create-step="types"] .batch-select-all {
  display: none;
}

.tech-batch-dialog .batch-upload-panel {
  grid-template-columns: minmax(520px, 650px) auto;
  margin-top: 8px;
  padding: 8px;
}

.batch-upload-file-field {
  margin-top: 0;
}

.batch-upload-file-field .tech-upload-drop-zone {
  min-height: 78px;
  padding: 8px;
}

.batch-upload-file-field .tech-upload-drop-zone strong {
  font-size: 14px;
}

.tech-batch-dialog-scroll {
  max-height: min(55vh, 470px);
  margin-top: 9px;
  border: 1px solid #cbd8c8;
  background: #fff;
}

.tech-batch-dialog-table {
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

.tech-batch-dialog-table th,
.tech-batch-dialog-table td {
  padding: 5px 7px;
  border-right: 1px solid #d6dfd2;
  border-bottom: 1px solid #d6dfd2;
  font-size: 13px;
  line-height: 1.25;
}

.tech-batch-dialog-table th {
  background: #edf3ec;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.tech-batch-dialog-table .product-table-cell {
  min-width: 300px;
}

.tech-batch-dialog-table .drawing-name-link {
  max-width: 260px;
}

.warehouse-batch-dialog-table {
  min-width: 900px;
}

.warehouse-batch-dialog-table .warehouse-batch-route-col {
  width: 190px;
  max-width: 190px;
}

.warehouse-batch-dialog-table .warehouse-batch-route-col .status-pill {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  justify-content: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-batch-dialog-table .warehouse-batch-remark {
  width: 230px;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-drawing-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.tech-drawing-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid #d7e0d5;
  border-radius: 6px;
  background: #fbfcfb;
}

.tech-drawing-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-drawing-item .mini-link {
  min-height: 25px;
  padding: 0 8px;
  font-size: 12px;
}

.tech-drawing-empty {
  min-height: 34px;
  padding: 8px 9px;
  border: 1px solid #d7e0d5;
  border-radius: 6px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
}

.tech-upload-file-field {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tech-upload-file-field > span {
  display: block;
  margin-bottom: 5px;
}

.tech-upload-drop-zone {
  position: relative;
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 2px dashed #abc0b0;
  border-radius: 6px;
  background: #f7faf8;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.tech-upload-drop-zone:hover,
.tech-upload-drop-zone:focus,
.tech-upload-drop-zone.is-dragging {
  border-color: var(--green);
  outline: 0;
  background: #edf6f0;
}

.tech-upload-drop-zone strong {
  font-size: 16px;
  line-height: 1.3;
}

.tech-upload-drop-zone > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tech-upload-drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.tech-upload-file-summary {
  min-height: 18px;
  margin-top: 5px;
  color: #486052;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.order-view-scroll {
  max-height: min(70vh, 620px);
  overflow: auto;
}

.order-view-section {
  margin-top: 10px;
}

.order-view-section h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
}

.order-view-info-grid {
  display: grid;
  grid-template-columns: 78px minmax(120px, 1fr) 78px minmax(120px, 1fr);
  border-top: 1px solid #d6dfd2;
  border-left: 1px solid #d6dfd2;
}

.order-view-info-label,
.order-view-info-value {
  min-height: 30px;
  padding: 5px 7px;
  border-right: 1px solid #d6dfd2;
  border-bottom: 1px solid #d6dfd2;
  font-size: 13px;
  line-height: 1.35;
}

.order-view-info-label {
  background: #edf3ec;
  color: #425047;
  font-weight: 900;
  white-space: nowrap;
}

.order-view-info-value {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-view-loading {
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 13px;
}

.order-view-attachments {
  display: grid;
  gap: 5px;
}

.order-view-attachment-item {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 92px 138px auto auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid #d6dfd2;
  background: #fff;
  font-size: 13px;
}

.print-attachment-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.order-view-log-scroll {
  max-height: 260px;
  border: 1px solid #d6dfd2;
  background: #fff;
}

.order-view-log-table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.order-view-log-table th,
.order-view-log-table td {
  padding: 5px 7px;
  border-right: 1px solid #d6dfd2;
  border-bottom: 1px solid #d6dfd2;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: top;
}

.order-view-log-table th {
  background: #edf3ec;
  font-weight: 900;
  white-space: nowrap;
}

.topbar nav .button,
.topbar nav button,
.order-list-panel .button,
.order-list-panel .mini-link:not(.disabled-mini-link),
.order-list-panel button:not(:disabled),
.warehouse-route-dialog button:not(:disabled) {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.topbar nav .button:hover,
.topbar nav button:hover,
.order-list-panel .button:hover,
.order-list-panel .mini-link:not(.disabled-mini-link):hover,
.order-list-panel button:not(:disabled):hover,
.warehouse-route-dialog button:not(:disabled):hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.warehouse-route-dialog .danger-button:not(:disabled),
.warehouse-route-dialog .danger-mini-link:not(:disabled) {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.warehouse-route-dialog .danger-button:not(:disabled):hover,
.warehouse-route-dialog .danger-mini-link:not(:disabled):hover {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.warehouse-route-dialog .sales-edit-delete-form .sales-delete-danger-button:not(:disabled),
.warehouse-route-dialog .sales-edit-delete-form .sales-delete-danger-button:not(:disabled):hover,
.warehouse-route-dialog .sales-edit-delete-form .sales-delete-danger-button:not(:disabled):focus-visible {
  border-color: #d92d20;
  background: #d92d20;
  color: #fff;
}

.priority-mark-form {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.priority-mark-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 50%;
}

.priority-mark-trigger,
.order-list-panel button.priority-mark-trigger:not(:disabled) {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.priority-mark-trigger:hover,
.order-list-panel .priority-mark-trigger:not(:disabled):hover {
  border: 0;
  background: #edf5ef;
  color: inherit;
}

.priority-mark-circle,
.filter-mark-circle {
  display: inline-block;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid #8b9690;
  border-radius: 50%;
  background: transparent;
}

.priority-mark-circle.is-empty,
.filter-mark-circle.is-empty {
  border-color: #87948d;
  background: #fff;
}

.priority-mark-circle.is-red,
.filter-mark-circle.is-red {
  border-color: #cf352e;
  background: #e5483f;
}

.priority-mark-circle.is-yellow,
.filter-mark-circle.is-yellow {
  border-color: #d69a00;
  background: #f4bf24;
}

.priority-mark-circle.is-blue,
.filter-mark-circle.is-blue {
  border-color: #2769bd;
  background: #3c8de8;
}

.priority-mark-circle.is-purple,
.filter-mark-circle.is-purple {
  border-color: #7040ae;
  background: #9461d4;
}

.priority-mark-menu {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  display: flex;
  width: max-content;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid #aebbb2;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(37 52 43 / 18%);
}

.priority-mark-menu[hidden] {
  display: none;
}

.priority-mark-option,
.order-list-panel button.priority-mark-option:not(:disabled) {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
}

.priority-mark-option:hover,
.order-list-panel .priority-mark-option:not(:disabled):hover {
  border-color: #c2d0c6;
  background: #edf5ef;
  color: inherit;
}

.priority-filter-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
}

.priority-filter-box {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  flex: 0 0 86px;
  width: 86px;
  min-height: 29px;
  border: 1px solid #c6d0c9;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.priority-filter-box[data-color="red"] {
  border-color: #e8bbb7;
  background: #fff8f7;
}

.priority-filter-box[data-color="yellow"] {
  border-color: #e4cf88;
  background: #fffdf3;
}

.priority-filter-box[data-color="blue"] {
  border-color: #b9d1ea;
  background: #f7fbff;
}

.priority-filter-box[data-color="purple"] {
  border-color: #d1bee5;
  background: #fcf8ff;
}

.priority-filter-box[data-color="red"].is-active {
  border-color: #cf352e;
  box-shadow: inset 0 0 0 1px #cf352e;
}

.priority-filter-box[data-color="yellow"].is-active {
  border-color: #d69a00;
  box-shadow: inset 0 0 0 1px #d69a00;
}

.priority-filter-box[data-color="blue"].is-active {
  border-color: #2769bd;
  box-shadow: inset 0 0 0 1px #2769bd;
}

.priority-filter-box[data-color="purple"].is-active {
  border-color: #7040ae;
  box-shadow: inset 0 0 0 1px #7040ae;
}

.order-list-panel .mark-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  width: 29px;
  min-height: 27px;
  padding: 0;
  border: 0;
  border-right: 1px solid #d5ddd7;
  border-radius: 0;
  background: transparent;
}

.order-list-panel .mark-filter-button:hover {
  border-color: #d5ddd7;
  background: #edf5ef;
}

.priority-filter-list .priority-color-note-button,
.order-list-panel button.priority-color-note-button:not(:disabled) {
  width: 100%;
  min-width: 0;
  min-height: 27px;
  padding: 0 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #46524b;
  font-size: 12px;
  text-align: center;
  font-weight: 700;
  overflow: hidden;
  touch-action: manipulation;
}

.priority-filter-list .priority-color-note-button:hover,
.order-list-panel button.priority-color-note-button:not(:disabled):hover {
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #253029;
}

.priority-filter-list .priority-color-note-button:focus {
  outline: 2px solid #74a68a;
  outline-offset: -2px;
}

.priority-filter-list .priority-color-note-button.is-long-pressing,
.order-list-panel button.priority-color-note-button.is-long-pressing:not(:disabled) {
  background: #eaf6ee;
  box-shadow: inset 0 0 0 1px rgba(43, 119, 78, .22);
}

.priority-filter-list .priority-color-note-button.is-empty,
.order-list-panel button.priority-color-note-button.is-empty:not(:disabled) {
  color: #7b867f;
  font-weight: 500;
}

.priority-color-note-text {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 27px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-filter-list .priority-color-note-button.is-saving,
.order-list-panel button.priority-color-note-button.is-saving:not(:disabled) {
  background: #fff9dc;
}

.priority-filter-list .priority-color-note-button.is-saved,
.order-list-panel button.priority-color-note-button.is-saved:not(:disabled) {
  background: #eaf6ee;
}

.priority-filter-list .priority-color-note-button.is-error,
.order-list-panel button.priority-color-note-button.is-error:not(:disabled) {
  background: #fff0ef;
}

.priority-note-popover {
  position: fixed;
  z-index: 1100;
  width: 214px;
  padding: 8px;
  border: 1px solid #c6d0c9;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 33, 27, 0.16);
}

.priority-note-form {
  display: grid;
  gap: 7px;
  margin: 0;
}

.priority-note-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  color: var(--text);
  font-size: 13px;
}

.priority-note-head .filter-mark-circle {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

.priority-note-form input {
  min-height: 31px;
  padding: 0 8px;
  font-size: 13px;
}

.priority-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.priority-note-actions .small-button {
  min-height: 29px;
  padding: 0 9px;
  font-size: 12px;
}

.order-sales-col {
  width: 8ch;
  max-width: 8ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-table-cell {
  min-width: 220px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.planner-locked-row td {
  background: #eef1ee !important;
  color: #7b857e;
}

.planner-locked-row .product-table-cell {
  color: #5f6962;
}

.planner-progress-link {
  border-color: #d2d8d3;
  color: #66736b;
}

.planner-lock-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #d2d8d3;
  border-radius: 999px;
  background: #fff;
  color: #66736b;
  font-size: 13px;
  font-weight: 800;
}

.planner-supplement-button {
  border-color: #7aa58a;
  background: #eef8f1;
}

.planner-supplement-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #d6a54d;
  border-radius: 999px;
  background: #fff5d8;
  color: #805400;
  font-size: 12px;
  font-weight: 800;
}

.planner-supplement-dialog {
  width: min(560px, calc(100vw - 24px));
}

.order-view-dialog.is-drawing-only .order-view-info-section,
.order-view-dialog.is-drawing-only .order-view-log-section {
  display: none;
}

.order-view-dialog:not(.is-drawing-only) .order-view-info-section,
.order-view-dialog:not(.is-drawing-only) .order-view-drawing-section {
  display: none;
}

.order-view-dialog:not(.is-drawing-only) .order-view-log-section > h3 {
  display: none;
}

.order-view-dialog.is-drawing-only .order-view-drawing-section {
  display: block;
  margin-top: 10px;
}

.planner-supplement-note-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.planner-supplement-note-field textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
}

.planner-supplement-warning {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid #d6a54d;
  background: #fff9e9;
  color: #6f520e;
  font-size: 13px;
}

.planner-locked-panel {
  background: #f6f8f6;
}

.planner-locked-message {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d2d8d3;
  border-radius: 8px;
  background: #fff;
  color: #66736b;
}

.planner-locked-message strong {
  color: var(--text);
}

.order-group-blue td {
  background: #fff;
}

.order-group-yellow td {
  background: #fff;
}

.order-main-header.order-group-blue td {
  background: #eef7ff;
}

.order-main-header.order-group-yellow td {
  background: #fff9e6;
}

td input, td select {
  min-height: 32px;
  font-size: 13px;
}

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

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #c9d7c4;
  border-radius: 999px;
  color: var(--green);
  background: #fff;
  font-weight: 700;
}

.status-pill.status-in_production {
  justify-content: center;
  border-color: #8bb7e0;
  background: #e8f3ff;
  color: #1f5f9f;
}

.status-pill.status-waiting_supplementary_drawing {
  justify-content: center;
  border-color: #d6a54d;
  background: #fff5d8;
  color: #805400;
}

.status-pill.status-waiting-inbound {
  justify-content: center;
  border-color: #d5a84b;
  background: #fff5d8;
  color: #805400;
}

.status-pill.status-partially_inbound {
  justify-content: center;
  border-color: #79a9d5;
  background: #e9f4ff;
  color: #185a91;
}

.status-pill.status-partially_completed {
  justify-content: center;
  border-color: #5796cf;
  background: #e6f2ff;
  color: #155b96;
}

.order-grid-table .warehouse-post-status-col .status-pill {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0 3px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
}

.warehouse-window-tabs {
  display: inline-flex;
  gap: 5px;
  margin-left: 8px;
}

.warehouse-window-tab {
  width: 112px;
  min-height: 32px;
  padding: 0 10px;
  border-color: #bdc9c0;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.warehouse-window-tab.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.warehouse-route-dialog.warehouse-inbound-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
}

.warehouse-inbound-dialog .warehouse-route-dialog-form {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  max-height: calc(100vh - 24px);
  flex-direction: column;
  overflow: hidden;
}

.warehouse-print-dialog {
  width: min(760px, calc(100vw - 24px));
}

.warehouse-print-dialog .warehouse-route-dialog-form {
  padding: 12px;
}

.warehouse-print-toolbar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #f4f7f4;
  font-size: 13px;
}

.warehouse-print-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 800;
}

.warehouse-print-toolbar input,
.warehouse-print-order-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.warehouse-print-order-list {
  max-height: min(430px, calc(100vh - 210px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top: 0;
}

.warehouse-print-order-row {
  display: grid;
  grid-template-columns: 22px 142px minmax(110px, 1fr) 100px 82px;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 9px;
  border-bottom: 1px solid #e4e9e5;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.warehouse-print-order-row:last-child {
  border-bottom: 0;
}

.warehouse-print-order-row:hover,
.warehouse-print-order-row:has(input:checked) {
  background: #edf7ef;
}

.warehouse-print-order-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-print-order-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.warehouse-print-empty {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.warehouse-route-dialog.planner-dispatch-dialog {
  width: min(1040px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
}

.planner-dispatch-form {
  box-sizing: border-box;
  display: flex;
  max-height: calc(100vh - 24px);
  flex-direction: column;
  overflow: hidden;
}

.planner-dispatch-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  background: #f4f7f4;
}

.planner-dispatch-search-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.planner-dispatch-search-label input {
  min-height: 30px;
  padding: 4px 7px;
}

.planner-dispatch-color-tools,
.planner-dispatch-selected-summary {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.planner-dispatch-select-all-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 4px;
  margin: 0 4px 0 0;
  padding: 0 7px;
  border: 1px solid #c8d2ca;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.planner-dispatch-select-all-label input {
  width: 14px;
  min-height: 14px;
  margin: 0;
}

.warehouse-route-dialog .planner-dispatch-color-button:not(:disabled) {
  display: inline-flex;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #c8d2ca;
  border-radius: 4px;
  background: #fff;
}

.warehouse-route-dialog .planner-dispatch-color-button:not(:disabled):hover,
.warehouse-route-dialog .planner-dispatch-color-button:not(:disabled):focus-visible {
  border-color: var(--green);
  background: #eef6f0;
}

.planner-dispatch-color-button .filter-mark-circle {
  width: 13px;
  height: 13px;
}

.warehouse-route-dialog .planner-dispatch-clear:not(:disabled) {
  min-height: 28px;
  padding: 0 7px;
  border-color: #c9d7c4;
  background: #fff;
  color: var(--green);
  font-size: 12px;
}

.planner-dispatch-selected-summary {
  justify-content: flex-end;
  color: #4c5a51;
}

.planner-dispatch-selected-summary strong {
  min-width: 20px;
  color: var(--green);
  font-size: 15px;
  text-align: center;
}

.planner-dispatch-list {
  min-height: 160px;
  max-height: min(560px, calc(100vh - 220px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
}

.planner-dispatch-group {
  border-bottom: 1px solid #dfe5e0;
}

.planner-dispatch-group[hidden],
.planner-dispatch-product-row[hidden] {
  display: none;
}

.planner-dispatch-group:last-child {
  border-bottom: 0;
}

.planner-dispatch-group.is-selected > .planner-dispatch-group-head {
  background: #edf7ef;
}

.planner-dispatch-group-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 40px;
  align-items: stretch;
  background: #fff;
}

.planner-dispatch-group-check-label {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-right: 1px solid #e2e7e3;
}

.planner-dispatch-group-check-label input,
.planner-dispatch-product-row input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.warehouse-route-dialog .planner-dispatch-group-toggle:not(:disabled) {
  display: grid;
  grid-template-columns: 22px 142px minmax(120px, 1fr) 100px 84px;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 4px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.warehouse-route-dialog .planner-dispatch-group-toggle:not(:disabled):hover {
  background: #f5f8f5;
  color: var(--text);
}

.planner-dispatch-group-toggle strong,
.planner-dispatch-group-toggle span,
.planner-dispatch-group-toggle em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-dispatch-group-toggle strong {
  font-size: 14px;
}

.planner-dispatch-group-toggle em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.planner-dispatch-expand-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5cd;
  border-radius: 3px;
  background: #fff;
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.planner-dispatch-products[hidden] {
  display: none;
}

.planner-dispatch-products {
  border-top: 1px solid #e2e7e3;
  background: #fafcfb;
}

.planner-dispatch-product-row {
  display: grid;
  grid-template-columns: 24px 42px minmax(280px, 1fr) 68px 92px 150px 86px;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 3px 9px 3px 43px;
  border-bottom: 1px solid #e8ece9;
  cursor: pointer;
  font-size: 12px;
}

.planner-dispatch-product-row:last-child {
  border-bottom: 0;
}

.planner-dispatch-product-row:hover,
.planner-dispatch-product-row:has(input:checked) {
  background: #eef7f0;
}

.planner-dispatch-product-row strong,
.planner-dispatch-product-row span,
.planner-dispatch-product-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-dispatch-product-row strong {
  font-size: 13px;
  font-weight: 800;
}

.planner-dispatch-product-row em {
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.planner-dispatch-seq,
.planner-dispatch-quantity {
  text-align: center;
}

.planner-dispatch-empty {
  padding: 40px 12px;
  color: var(--muted);
  text-align: center;
}

.planner-dispatch-actions {
  flex-shrink: 0;
}

.delivery-tracking-head-panel {
  padding: 10px 12px;
}

.delivery-tracking-head {
  align-items: center;
  margin-bottom: 0;
}

.delivery-tracking-title-line,
.delivery-tracking-summary,
.delivery-tracking-head-actions {
  display: flex;
  align-items: center;
}

.delivery-tracking-title-line {
  gap: 16px;
}

.delivery-tracking-title-line h2 {
  margin: 0;
  font-size: 20px;
}

.delivery-tracking-summary {
  gap: 5px;
}

.delivery-tracking-summary > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border: 1px solid #cbd7ce;
  border-radius: 4px;
  background: #f7faf8;
  color: #506057;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.delivery-tracking-summary strong {
  color: var(--green);
  font-size: 17px;
}

.delivery-tracking-head-actions {
  gap: 6px;
}

.delivery-tracking-head-actions .button {
  min-height: 31px;
  font-size: 13px;
}

.delivery-tracking-list-panel {
  padding: 0;
  overflow: hidden;
}

.delivery-tracking-table-scroll {
  width: 100%;
  overflow: auto;
}

.delivery-tracking-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.delivery-tracking-table.is-plan-view {
  min-width: 1270px;
}

.delivery-tracking-table.is-tracker {
  min-width: 1400px;
}

.delivery-tracking-table th,
.delivery-tracking-table td {
  height: 36px;
  padding: 3px 6px;
  overflow: hidden;
  border-right: 1px solid #dfe5e0;
  border-bottom: 1px solid #dfe5e0;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-tracking-table th {
  height: 34px;
  background: #edf2ee;
  color: #34463b;
  font-weight: 900;
}

.delivery-tracking-table tbody td {
  background: #fff;
}

.delivery-tracking-table .delivery-tracking-row.is-failed_wait td {
  background: #fff9ee;
}

.delivery-tracking-table .delivery-tracking-row.is-completed td {
  background: #f3f5f3;
  color: #6c746f;
}

.delivery-tracking-table .delivery-remind-date-col { width: 84px; }
.delivery-tracking-table .delivery-target-col { width: 80px; }
.delivery-tracking-table .delivery-state-col { width: 92px; }
.delivery-tracking-table .delivery-order-col { width: 104px; }
.delivery-tracking-table .delivery-seq-col { width: 48px; }
.delivery-tracking-table .delivery-customer-col { width: 90px; }
.delivery-tracking-table .delivery-sales-col { width: 82px; }
.delivery-tracking-table .delivery-product-col { width: 280px; }
.delivery-tracking-table .delivery-quantity-col { width: 58px; }
.delivery-tracking-table .delivery-date-col { width: 84px; }
.delivery-tracking-table .delivery-route-col { width: 130px; }
.delivery-tracking-table .delivery-result-col { width: 120px; }
.delivery-tracking-table .delivery-action-col { width: 188px; }

.delivery-tracking-table .delivery-product-cell {
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

button.delivery-text-open {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.delivery-text-open:hover,
button.delivery-text-open:focus-visible {
  background: transparent;
  color: var(--green);
  text-decoration: underline;
}

.delivery-customer-cell button.delivery-text-open {
  text-align: center;
}

.warehouse-route-dialog.delivery-text-dialog {
  width: min(640px, calc(100vw - 24px));
}

.delivery-full-text {
  min-height: 96px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8faf8;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.delivery-target-badge,
.delivery-status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid #c6d7cb;
  border-radius: 4px;
  background: #eff7f1;
  color: var(--green-dark);
  font-weight: 800;
}

.delivery-target-badge.is-seal {
  border-color: #cdd3de;
  background: #f2f4f8;
  color: #44546b;
}

.delivery-status-badge.is-failed_wait {
  border-color: #e4c982;
  background: #fff6dc;
  color: #7a5b0d;
}

.delivery-status-badge.is-completed {
  border-color: #cfd5d1;
  background: #fff;
  color: #68716b;
}

.delivery-result-cell span,
.delivery-result-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-result-cell small {
  color: var(--muted);
  font-size: 10px;
}

.delivery-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.delivery-row-actions form {
  margin: 0;
}

.delivery-row-actions .small-button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.delivery-row-actions .delivery-fail-button {
  border-color: #d9bd75;
  color: #74570d;
}

.delivery-action-placeholder {
  color: var(--muted);
}

.delivery-selection-toolbar {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.delivery-selection-actions {
  align-items: end;
}

.delivery-target-choice {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 auto 0 0;
  padding: 0;
  border: 0;
}

.delivery-target-choice legend {
  display: block;
  margin-right: 3px;
  color: #4b5b51;
  font-size: 12px;
  font-weight: 900;
}

.delivery-target-choice label {
  margin: 0;
  cursor: pointer;
}

.delivery-target-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.delivery-target-choice span {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  padding: 2px 12px;
  border: 1px solid #bdc9c0;
  border-radius: 4px;
  background: #fff;
  color: #47574d;
  font-size: 13px;
  font-weight: 800;
}

.delivery-target-choice input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.planner-dispatch-print-page {
  margin: 0;
  background: #e9eeea;
  color: #111;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.planner-dispatch-print-actions {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .14);
}

.planner-dispatch-print-sheet {
  box-sizing: border-box;
  width: 277mm;
  min-height: 190mm;
  margin: 12px auto;
  padding: 7mm;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .14);
}

.planner-dispatch-print-head h1 {
  margin: 0 0 4px;
  font-size: 20px;
  text-align: center;
}

.planner-dispatch-print-head > div {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 7px;
  font-size: 10px;
}

.planner-dispatch-print-group {
  margin-top: 7px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.planner-dispatch-print-group-head {
  display: grid;
  grid-template-columns: 1fr 1fr .8fr .7fr;
  gap: 7px;
  padding: 4px 6px;
  border: 1px solid #222;
  border-bottom: 0;
  background: #e8efe9;
  font-size: 10px;
}

.planner-dispatch-print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
}

.planner-dispatch-print-table th,
.planner-dispatch-print-table td {
  height: 28px;
  padding: 2px 3px;
  border: 1px solid #222;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.planner-dispatch-print-table th {
  background: #f0f3f1;
  font-weight: 800;
}

.planner-dispatch-print-table .dispatch-print-seq { width: 7mm; }
.planner-dispatch-print-table .dispatch-print-quantity { width: 10mm; }
.planner-dispatch-print-table .dispatch-print-delivery { width: 19mm; }
.planner-dispatch-print-table .dispatch-print-route { width: 37mm; }
.planner-dispatch-print-table .dispatch-print-status { width: 17mm; }
.planner-dispatch-print-table .dispatch-print-remark { width: 39mm; }
.planner-dispatch-print-table .dispatch-print-note { width: 40mm; }

.planner-dispatch-print-product {
  font-size: 11px;
  font-weight: 800;
  text-align: left !important;
}

@media (max-width: 760px) {
  .delivery-tracking-head {
    display: grid;
    gap: 8px;
  }

  .delivery-tracking-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .delivery-tracking-summary {
    width: 100%;
    flex-wrap: wrap;
  }

  .delivery-tracking-summary > span {
    flex: 1 1 auto;
    justify-content: center;
  }

  .delivery-tracking-head-actions {
    width: 100%;
  }

  .delivery-tracking-head-actions .button {
    flex: 1 1 auto;
  }

  .warehouse-route-dialog.planner-dispatch-dialog {
    width: calc(100vw - 14px);
  }

  .planner-dispatch-form {
    max-height: calc(100vh - 14px);
    padding: 10px;
  }

  .planner-dispatch-toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .planner-dispatch-color-tools,
  .planner-dispatch-selected-summary {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .planner-dispatch-group-toggle {
    grid-template-columns: 22px minmax(104px, 1fr) minmax(80px, 1fr) 62px;
  }

  .planner-dispatch-group-toggle span:nth-of-type(3) {
    display: none;
  }

  .planner-dispatch-product-row {
    grid-template-columns: 24px 36px minmax(180px, 1fr) 60px 82px 120px 72px;
    min-width: 650px;
    padding-left: 9px;
  }

  .planner-dispatch-products {
    overflow-x: auto;
  }

  .delivery-selection-actions {
    flex-wrap: wrap;
  }

  .delivery-target-choice {
    width: 100%;
    margin-bottom: 2px;
  }

  .delivery-target-choice label {
    flex: 1 1 0;
  }

  .delivery-target-choice span {
    width: 100%;
  }
}

.warehouse-print-page {
  margin: 0;
  background: #e9eeea;
  color: #111;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.warehouse-print-page-actions {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .14);
}

.warehouse-print-sheet {
  box-sizing: border-box;
  width: 190mm;
  min-height: 277mm;
  margin: 12px auto;
  padding: 8mm;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .14);
}

.warehouse-print-sheet + .warehouse-print-sheet {
  break-before: page;
  page-break-before: always;
}

.warehouse-print-sheet-meta {
  display: grid;
  grid-template-columns: 1.2fr 1fr .75fr 1.25fr;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
}

.warehouse-print-sheet-meta span {
  overflow-wrap: anywhere;
}

.warehouse-print-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.warehouse-print-table th,
.warehouse-print-table td {
  height: 28px;
  padding: 2px 3px;
  border: 1px solid #222;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.warehouse-print-table thead {
  display: table-header-group;
}

.warehouse-print-table tfoot {
  display: table-row-group;
}

.warehouse-print-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.warehouse-print-table th {
  background: #eef1ee;
  font-weight: 800;
}

.warehouse-print-table .print-seq-col { width: 9mm; }
.warehouse-print-table .print-quantity-col { width: 14mm; }
.warehouse-print-table .print-delivery-col { width: 21mm; }
.warehouse-print-table .print-remark-col { width: 35mm; }
.warehouse-print-table .print-note-col { width: 28mm; }

.warehouse-print-table .warehouse-print-product {
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.warehouse-print-table tfoot td {
  font-weight: 800;
}

@page {
  margin: 8mm;
}

@media print {
  .warehouse-print-page {
    background: #fff;
  }

  .warehouse-print-page-actions {
    display: none;
  }

  .planner-dispatch-print-page {
    background: #fff;
  }

  .planner-dispatch-print-actions {
    display: none;
  }

  .planner-dispatch-print-sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .warehouse-print-sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}

.warehouse-inbound-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.warehouse-inbound-summary span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #f7faf7;
  font-size: 13px;
}

.warehouse-inbound-summary strong {
  color: var(--green-dark);
  font-size: 17px;
}

.warehouse-inbound-quantity-label {
  display: grid;
  grid-template-columns: 110px 150px;
  align-items: center;
  margin-top: 10px;
}

.warehouse-inbound-quantity-label input {
  min-height: 36px;
}

.warehouse-inbound-route-list {
  display: grid;
  min-height: 0;
  max-height: min(430px, calc(100vh - 250px));
  margin-top: 10px;
  overflow: auto;
  border: 1px solid #d6dfd2;
}

.warehouse-inbound-route-head,
.warehouse-inbound-route-row {
  display: grid;
  grid-template-columns: 70px 82px 80px minmax(120px, 1fr) 100px;
  min-width: 520px;
  gap: 5px;
  align-items: center;
  min-height: 34px;
  padding: 4px 7px;
  border-bottom: 1px solid #d6dfd2;
}

.warehouse-inbound-route-head {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #edf3ec;
  color: #425047;
  font-size: 12px;
  font-weight: 900;
}

.warehouse-inbound-route-row {
  background: #fff;
  font-size: 13px;
}

.warehouse-inbound-route-row input {
  width: 100%;
  min-height: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.tech-detail-grid {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.tech-order-line {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.compact-detail-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.sales-detail-line {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  color: #526158;
  font-size: 13px;
}

.sales-date-panel {
  padding-top: 10px;
  padding-bottom: 10px;
}

.sales-date-form {
  display: grid;
  grid-template-columns: 220px auto;
  gap: 8px;
  align-items: end;
  max-width: 360px;
}

.sales-date-form label {
  margin: 0;
}

.sales-date-form input,
.sales-date-form button {
  min-height: 32px;
}

.sales-date-form .form-actions {
  margin-top: 0;
}

.sales-order-edit-panel {
  padding-top: 10px;
  padding-bottom: 10px;
}

.sales-order-edit-form {
  display: grid;
  grid-template-columns: 150px minmax(360px, 1fr) 80px 145px minmax(260px, .8fr) auto;
  gap: 7px;
  align-items: end;
}

.sales-order-edit-form label {
  margin: 0;
}

.sales-order-edit-form input,
.sales-order-edit-form button {
  min-height: 32px;
}

.sales-order-edit-form .form-actions {
  margin-top: 0;
}

.sales-order-edit-form button {
  padding-left: 12px;
  padding-right: 12px;
}

.sales-order-cancel-form {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  gap: 7px;
  align-items: end;
  margin-top: 8px;
}

.sales-order-cancel-form label {
  margin: 0;
}

.sales-order-cancel-form input,
.sales-order-cancel-form button {
  min-height: 32px;
}

.sales-order-cancelled-text {
  margin-top: 8px;
}

.sales-attachment-list {
  display: grid;
  gap: 6px;
}

.sales-attachment-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.sales-attachment-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-panel .section-head {
  margin-bottom: 8px;
}

.warehouse-form {
  grid-template-columns: 220px 180px minmax(260px, 1fr) auto;
  align-items: end;
}

.warehouse-form label {
  margin: 0;
}

.warehouse-form textarea {
  min-height: 38px;
  padding-top: 8px;
}

.warehouse-form .form-actions {
  grid-column: auto;
  margin-top: 0;
  flex-wrap: nowrap;
}

.warehouse-note {
  grid-column: auto;
}

.detail-grid div, .progress-placeholder, .note-box, .result-box {
  border: 1px solid var(--line);
  background: #fbfcfb;
  border-radius: 8px;
  padding: 10px;
}

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

.detail-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.note-box {
  margin-top: 10px;
  white-space: pre-wrap;
}

.progress-placeholder {
  color: var(--muted);
}

.flash {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.error {
  background: #fee4e2;
  color: var(--red);
}

.success {
  background: var(--soft-green);
  color: var(--green);
}

.result-box {
  margin-top: 12px;
}

.result-box ul {
  margin-bottom: 0;
  color: var(--red);
}

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

.preview-head {
  margin-bottom: 8px;
}

.import-grid-tools {
  display: grid;
  grid-template-columns: 78px 120px 420px 72px 130px 400px 90px;
  gap: 0;
  min-width: 1320px;
}

.import-preview-table {
  min-width: 1320px;
  table-layout: fixed;
}

.import-preview-table th:first-child,
.import-preview-table td:first-child {
  width: 78px;
}

.import-preview-table th:nth-child(2),
.import-preview-table td:nth-child(2) {
  width: 120px;
}

.import-preview-table th:nth-child(3),
.import-preview-table td:nth-child(3) {
  width: 420px;
}

.import-preview-table th:nth-child(4),
.import-preview-table td:nth-child(4) {
  width: 72px;
}

.import-preview-table th:nth-child(5),
.import-preview-table td:nth-child(5) {
  width: 130px;
  position: relative;
}

.import-preview-table th:nth-child(6),
.import-preview-table td:nth-child(6) {
  width: 400px;
}

.import-preview-table th:last-child,
.import-preview-table td:last-child {
  width: 90px;
}

.sales-import-preview-table {
  min-width: 1490px;
}

.sales-import-preview-table th:nth-child(5),
.sales-import-preview-table td:nth-child(5) {
  width: 170px;
  position: static;
}

.sales-import-preview-table th:nth-child(6),
.sales-import-preview-table td:nth-child(6) {
  width: 130px;
  position: relative;
}

.sales-import-preview-table th:nth-child(7),
.sales-import-preview-table td:nth-child(7) {
  width: 400px;
}

.import-drawing-batch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 3px;
}

.import-drawing-batch-actions button {
  min-height: 24px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.import-row-drawing-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 32px;
  overflow: hidden;
  border: 1px solid #cfd8d1;
  border-radius: 4px;
  background: #fff;
}

.import-row-drawing-choice label {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 4px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.import-row-drawing-choice label + label {
  border-left: 1px solid #d8e0da;
}

.import-row-drawing-choice label:has(input:checked) {
  background: #e9f4ec;
  color: #1f6739;
  font-weight: 800;
}

.import-row-drawing-choice input {
  width: 13px;
  min-width: 13px;
  height: 13px;
  min-height: 13px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.stock-import-preview-table {
  min-width: 1280px;
}

.stock-import-preview-table th:nth-child(3),
.stock-import-preview-table td:nth-child(3) {
  width: 380px;
}

.stock-import-preview-table .stock-route-no-col {
  width: 110px;
}

.stock-import-preview-table th:nth-child(6),
.stock-import-preview-table td:nth-child(6) {
  width: 130px;
  position: relative;
}

.stock-import-preview-table th:nth-child(7),
.stock-import-preview-table td:nth-child(7) {
  width: 300px;
}

.stock-production-entry-buttons {
  flex-wrap: nowrap;
}

.import-preview-table th:first-child,
.import-preview-table td:first-child,
.import-preview-table th:last-child,
.import-preview-table td:last-child {
  text-align: center;
}

.batch-date-header-button {
  width: 100%;
  min-height: 30px;
  padding: 0 6px;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-size: 12px;
  white-space: normal;
  line-height: 1.15;
}

.batch-date-picker {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.import-total-row td {
  background: #fbfcfb;
  border-bottom: 0;
}

.import-total-label {
  text-align: right;
  color: var(--muted);
  font-weight: 800;
}

.import-total-row strong {
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  color: var(--text);
}

.import-preview-table input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.import-preview-table input[type="number"]::-webkit-outer-spin-button,
.import-preview-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.preview-actions {
  margin-top: 10px;
  align-items: end;
  justify-content: flex-end;
}

.preview-actions .sales-drawing-choice {
  margin-right: auto;
}

@media (min-width: 761px) and (max-width: 1200px) {
  .manual-order-form:not(.stock-production-form) {
    grid-template-columns: 140px minmax(240px, 1fr) 80px 140px 180px;
  }

  .order-list-panel .section-head {
    flex-wrap: wrap;
  }

  .dashboard-right-tools {
    width: 100%;
    gap: 6px;
    flex-wrap: wrap;
  }

  .planner-dashboard-tools {
    align-items: flex-start;
  }

  .planner-action-grid {
    width: 296px;
    grid-template-columns: repeat(3, 96px);
  }

  .dashboard-right-tools .priority-search-tools {
    flex: 1 0 100%;
    justify-content: flex-end;
  }

  .dashboard-search-bar {
    flex: 1 1 420px;
  }

  .delivery-tracking-table,
  .delivery-tracking-table.is-plan-view,
  .delivery-tracking-table.is-tracker {
    width: 100%;
    min-width: 0;
  }

  .delivery-tracking-table th,
  .delivery-tracking-table td {
    height: 34px;
    padding: 2px 3px;
    font-size: 11px;
  }

  .delivery-tracking-table .delivery-remind-date-col { width: 6%; }
  .delivery-tracking-table .delivery-target-col { width: 5.5%; }
  .delivery-tracking-table .delivery-state-col { width: 6%; }
  .delivery-tracking-table .delivery-order-col { width: 9%; }
  .delivery-tracking-table .delivery-seq-col { width: 3.5%; }
  .delivery-tracking-table .delivery-customer-col { width: 5.5%; }
  .delivery-tracking-table .delivery-sales-col { width: 5%; }
  .delivery-tracking-table .delivery-product-col { width: 19%; }
  .delivery-tracking-table .delivery-quantity-col { width: 4%; }
  .delivery-tracking-table .delivery-date-col { width: 6%; }
  .delivery-tracking-table .delivery-route-col { width: 8%; }
  .delivery-tracking-table .delivery-result-col { width: 8%; }
  .delivery-tracking-table .delivery-action-col { width: 14%; }

  .delivery-tracking-table .delivery-product-cell {
    font-size: 12px;
  }

  .delivery-target-badge,
  .delivery-status-badge {
    min-height: 22px;
    padding: 1px 3px;
    font-size: 10px;
  }

  .delivery-row-actions {
    gap: 2px;
  }

  .delivery-row-actions .small-button {
    min-height: 24px;
    padding: 0 4px;
    font-size: 10px;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .delivery-tracking-table tbody td {
    height: 52px;
  }

  .delivery-row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-row-actions .small-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 5px 8px;
  }

  .topbar h1 {
    font-size: 17px;
  }

  .topbar nav {
    gap: 4px;
  }

  .layout {
    width: calc(100vw - 14px);
    margin-top: 8px;
  }

  .panel {
    padding: 12px;
    border-radius: 8px;
  }

  .section-head {
    display: grid;
  }

  .dashboard-search-bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .dashboard-right-tools {
    display: grid;
    width: 100%;
    gap: 6px;
  }

  .planner-dashboard-tools {
    align-items: start;
  }

  .planner-action-grid {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planner-primary-actions {
    width: calc((100% - 8px) / 3);
    flex-basis: auto;
  }

  .priority-filter-list {
    width: 100%;
    flex-wrap: wrap;
  }

  .priority-search-tools {
    display: grid;
    width: 100%;
    gap: 4px;
  }

  .warehouse-route-dialog-fields {
    grid-template-columns: 1fr;
  }

  .change-detail-dialog-list .change-detail-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .change-detail-dialog-list .change-detail-arrow {
    text-align: left;
  }

  .warehouse-route-dialog.warehouse-inbound-dialog {
    width: calc(100vw - 14px);
  }

  .warehouse-inbound-dialog .warehouse-route-dialog-form {
    padding: 10px;
  }

  .warehouse-inbound-summary span {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
  }

  .warehouse-inbound-route-head,
  .warehouse-inbound-route-row {
    grid-template-columns: 42px minmax(64px, 1fr) 54px 74px 68px;
    min-width: 0;
    gap: 2px;
    padding: 3px 4px;
    font-size: 11px;
  }

  .warehouse-inbound-route-head {
    font-size: 10px;
  }

  .stats-grid, .grid-form, .detail-grid, .filter-bar {
    grid-template-columns: 1fr;
  }

  .manual-order-form {
    grid-template-columns: 1fr;
  }

  .manual-order-actions {
    flex-wrap: wrap;
  }

  .sales-drawing-choice {
    max-width: none;
  }

  .user-admin-head,
  .user-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .user-create-form,
  .user-filter-form,
  .planner-operator-create-form,
  .route-operation-filter,
  .user-handover-form {
    grid-template-columns: 1fr;
  }

  .user-handover-arrow {
    min-height: 20px;
    transform: rotate(90deg);
  }

  .user-create-action button,
  .user-filter-form button,
  .user-filter-form .button {
    width: 100%;
  }

  .admin-module-button {
    width: 100%;
  }

  .planner-operator-select-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .role-select-layout {
    min-height: auto;
    padding-top: 28px;
  }

  .role-select-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .check-row {
    margin-top: 0;
  }

  table {
    min-width: 860px;
  }
}

.table-cell-preview-source {
  outline: 2px solid #2f7d4a;
  outline-offset: -2px;
}

.table-cell-preview {
  position: fixed;
  z-index: 5000;
  box-sizing: border-box;
  width: max-content;
  min-width: 120px;
  max-width: min(560px, calc(100vw - 16px));
  max-height: min(50vh, 360px);
  padding: 10px 38px 10px 12px;
  overflow: auto;
  border: 1px solid #94a79a;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 42, 31, 0.2);
  color: #18251d;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table-cell-preview-content {
  min-width: 0;
}

.table-cell-preview-close {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 27px;
  min-width: 27px;
  height: 27px;
  min-height: 27px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #4f5f55;
  font-size: 21px;
  line-height: 1;
}

.table-cell-preview-close:hover {
  background: #edf3ef;
  color: #173d27;
}

.route-template-panel {
  max-width: none;
}

.route-template-upload {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px 0;
}

.route-template-upload label {
  display: grid;
  flex: 1;
  gap: 6px;
  max-width: 680px;
}

.route-template-upload input[type="file"] {
  min-height: 38px;
  padding: 6px 8px;
}

.route-template-current {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c9d7cd;
  background: #f7faf8;
}

.route-template-current > span,
.route-template-current em {
  color: #66736a;
}

.route-template-current em {
  margin-left: auto;
  font-style: normal;
}

.route-template-history {
  margin-top: 12px;
}

.route-template-history table {
  min-width: 760px;
}

.warehouse-route-line .js-warehouse-route-no[readonly] {
  background: #eef3ef;
  color: #33483a;
  cursor: default;
}

@media (max-width: 760px) {
  .route-template-upload,
  .route-template-current {
    align-items: stretch;
    flex-direction: column;
  }

  .route-template-current em {
    margin-left: 0;
  }
}
