:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #e4eaf3;
  --line-strong: #d7dfeb;
  --text: #1f2d3d;
  --muted: #7a889b;
  --primary: #2f64e7;
  --primary-strong: #2556d3;
  --success: #28b67a;
  --danger: #ff5a5f;
  --warning: #ff9f2f;
  --shadow: 0 6px 20px rgba(34, 62, 112, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
  color: var(--text);
}

body {
  min-width: 1360px;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(160, 175, 202, 0.12);
}

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

.brand-mark {
  font-size: 18px;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-control {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #4a5870;
  font-size: 14px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.language-control:hover {
  border-color: #bfd0ef;
  background: #f7faff;
}

.language-control span {
  font-weight: 600;
  white-space: nowrap;
}

.language-control select {
  width: 82px;
  height: 30px;
  border: none;
  outline: none;
  background-color: transparent;
  color: var(--text);
  cursor: pointer;
}

.ghost-btn,
.action-btn,
.primary-btn,
.zoom-btn,
.add-row-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-btn {
  padding: 7px 14px;
  min-width: 78px;
  color: #4a5870;
  font-size: 14px;
}

.ghost-btn:hover,
.action-btn:hover,
.zoom-btn:hover {
  border-color: #bfd0ef;
  background: #f7faff;
}

.content-grid {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 286px minmax(780px, 1fr) 344px;
  gap: 14px;
  min-height: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.panel-icon {
  opacity: 0.85;
}

.panel-body {
  padding: 14px;
  min-height: 0;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
tbody input,
tbody select {
  width: 100%;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 0 10px;
  color: var(--text);
  font-size: 13px;
}

.field select,
tbody select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6f7c90 50%),
    linear-gradient(135deg, #6f7c90 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 10px) 50%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field input[readonly] {
  background: #f7faff;
  color: #5d6b80;
}

.field input[readonly][title] {
  cursor: help;
}

.summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.summary-card,
.metric-card {
  border: 1px solid #edf2f8;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
  padding: 12px 8px;
  text-align: center;
}

.summary-card span,
.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: #69788e;
  font-weight: 600;
  font-size: 12px;
}

.summary-card strong,
.metric-card strong {
  font-size: 13px;
}

.cargo-panel .panel-body {
  padding-top: 12px;
}

.cargo-panel {
  min-width: 0;
}

.cargo-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  height: 100%;
  min-height: 0;
  gap: 8px;
}

.table-shell {
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1060px;
}

thead th {
  padding: 7px 4px;
  background: #f8fbff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: #6f7c90;
  white-space: nowrap;
}

thead th:nth-child(1),
tbody td:nth-child(1) {
  width: 62px;
}

thead th:nth-child(2),
tbody td:nth-child(2) {
  width: 46px;
}

thead th:nth-child(3),
tbody td:nth-child(3) {
  width: 44px;
}

thead th:nth-child(4),
tbody td:nth-child(4) {
  width: 136px;
}

thead th:nth-child(5),
tbody td:nth-child(5) {
  width: 60px;
}

thead th:nth-child(6),
tbody td:nth-child(6),
tbody td:nth-child(6) {
  width: 92px;
}

thead th:nth-child(7),
thead th:nth-child(8),
tbody td:nth-child(7),
tbody td:nth-child(8) {
  width: 66px;
}

thead th:nth-child(9),
tbody td:nth-child(9) {
  width: 66px;
}

thead th:nth-child(10),
tbody td:nth-child(10) {
  width: 78px;
}

thead th:nth-child(11),
tbody td:nth-child(11),
thead th:nth-child(12),
tbody td:nth-child(12) {
  width: 92px;
}

thead th:nth-child(13),
tbody td:nth-child(13) {
  width: 56px;
}

tbody td {
  padding: 6px 4px;
  border-bottom: 1px solid #edf2f8;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fbfdff;
}

.mark-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin: 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  position: relative;
}

.mark-swatch::after {
  content: attr(data-marker);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--marker-color, #ffffff);
}

.mark-red {
  background: #f34b4b;
}

.mark-blue {
  background: #4a86f0;
}

.seq {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
}

.sort-cell {
  display: grid;
  gap: 2px;
  justify-content: center;
}

.sort-btn {
  width: 20px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: #98a6ba;
  line-height: 1;
  cursor: pointer;
  font-size: 10px;
}

.sort-btn:hover {
  color: var(--primary);
  border-color: #bfd0ef;
}

.delete-btn {
  border: 1px solid #ffd7da;
  background: #fff6f7;
  color: #e05a63;
  cursor: pointer;
  font-size: 12px;
  height: 28px;
  min-width: 44px;
  border-radius: 6px;
}

.delete-btn:hover {
  color: var(--danger);
  border-color: #ffb8be;
  background: #fff0f2;
}

.field select,
tbody select {
  white-space: nowrap;
  text-overflow: ellipsis;
}

tbody input,
tbody select {
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

tbody select {
  padding-right: 26px;
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 8px) 50%;
  background-size: 6px 6px, 6px 6px;
}

.add-row-btn {
  height: 38px;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(90deg, #2f64e7 0%, #3668df 100%);
}

.cargo-summary-bar {
  height: 38px;
  border: 1px solid #d7e3f7;
  border-radius: 8px;
  background: linear-gradient(90deg, #f6faff 0%, #eef5ff 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 0 14px;
  color: #5e6e87;
  font-size: 13px;
  font-weight: 600;
}

.cargo-summary-bar strong {
  color: #24448f;
  font-size: 14px;
}

.add-row-btn:hover,
.primary-btn:hover {
  background: linear-gradient(90deg, #2858ce 0%, #2f60d1 100%);
}

.import-tip {
  margin-top: 8px;
  font-size: 13px;
  color: #7f8ca3;
}

.result-body {
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.result-body.preview-window-locked {
  grid-template-rows: auto auto auto var(--preview-window-height) auto auto;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-card strong {
  font-size: 17px;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: #8492a7;
  font-size: 11px;
  line-height: 1.45;
}

.weight-balance-card {
  border: 1px solid #dce8f7;
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px 12px;
}

.weight-balance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.weight-balance-head span {
  color: #60718b;
  font-size: 12px;
  font-weight: 700;
}

.weight-balance-head strong {
  color: #24448f;
  font-size: 16px;
}

.weight-balance-head strong.metric-danger {
  color: #dc2626;
}

.weight-balance-head strong.metric-warn {
  color: #d97706;
}

.weight-balance-head strong.metric-good {
  color: #16a34a;
}

.weight-balance-head strong.metric-muted {
  color: #8492a7;
}

.weight-balance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.weight-balance-grid small {
  color: #7b8aa1;
  font-size: 11px;
  line-height: 1.35;
}

.calc-progress-card {
  padding: 10px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
}

.calc-progress-card[hidden] {
  display: none;
}

.calc-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.calc-progress-head strong {
  font-size: 13px;
  color: #22406b;
}

.calc-progress-head span {
  font-size: 12px;
  color: #6980a3;
  white-space: nowrap;
}

.calc-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #dfeafb;
  overflow: hidden;
}

.calc-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6cf1 0%, #4bb5ff 100%);
  transition: width 0.18s ease;
}

.calc-progress-log {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #d9e4f3;
  display: grid;
  gap: 6px;
  max-height: 122px;
  overflow-y: auto;
}

.calc-progress-log:empty {
  display: none;
}

.calc-progress-log-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: #5e7190;
}

.calc-progress-log-index {
  min-width: 18px;
  color: #2f6cf1;
  font-weight: 700;
}

.calc-progress-log-text {
  flex: 1;
}

.metric-good {
  color: var(--success);
}

.metric-warn {
  color: var(--danger);
}

.metric-danger {
  color: var(--danger);
}

.preview-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.preview-window-locked .preview-card {
  height: var(--preview-window-height);
  min-height: var(--preview-window-height);
  max-height: var(--preview-window-height);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.preview-caption strong,
.preview-caption span {
  display: block;
}

.preview-caption strong {
  font-size: 13px;
}

.preview-caption span {
  margin-top: 3px;
  font-size: 11px;
  color: #8693a7;
}

.zoom-btn {
  display: block;
  padding: 6px 12px;
  border-radius: 7px;
  background: #525f77;
  border: none;
  color: #fff;
  font-size: 12px;
}

.preview-grid {
  height: 100%;
  border: 1px solid #d9e4f3;
  border-radius: 10px;
  background: linear-gradient(180deg, #eef5ff 0%, #fbfdff 100%);
  display: grid;
  place-items: center;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.preview-grid-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
  border: 1px solid #d9e4f3;
  box-sizing: border-box;
}

.container-scene {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 92px;
  bottom: 68px;
}

.preview-grid-compact .container-scene {
  left: 8px;
  right: 8px;
  top: 8px;
  bottom: 8px;
}

.preview-grid-compact-only {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.preview-grid-compact-only .three-scene-host {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.three-scene-host-compact {
  display: block;
}

.preview-grid-fullscreen .container-scene {
  left: 8px;
  right: 8px;
  top: 8px;
  bottom: 8px;
}

.three-scene-host {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid #dce6f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f6faff 100%);
  overflow: hidden;
}

.three-scene-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.preview-grid-fullscreen .three-scene-host {
  border: none;
  border-radius: 0;
  background: #f8fafc;
}

.scene-direction-card {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 34px;
  border: 2px solid #3b76ff;
  border-radius: 14px;
  color: #2f64e7;
  background: rgba(255, 255, 255, 0.96);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 24px rgba(59, 118, 255, 0.1);
}

.scene-side-label {
  position: absolute;
  top: 126px;
  padding: 16px 26px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(31, 45, 61, 0.08);
}

.scene-side-left {
  left: 20px;
  border: 2px solid #ff5c62;
  color: #ff4e56;
}

.scene-side-right {
  right: 20px;
  border: 2px solid #21b86f;
  color: #19a663;
}

.scene-direction-arrow {
  position: absolute;
  left: 210px;
  right: 120px;
  top: 112px;
  height: 56px;
  pointer-events: none;
}

.scene-arrow-line {
  position: absolute;
  left: 40px;
  right: 0;
  top: 25px;
  height: 2px;
  background: linear-gradient(90deg, #3b76ff 0%, #7aa3ff 100%);
  transform: skewX(6deg);
}

.scene-arrow-head {
  position: absolute;
  left: 0;
  top: 11px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-right: 34px solid #2f64e7;
}

.preview-grid-button:hover {
  border-color: #c3d5ef;
}

.preview-placeholder {
  text-align: center;
  color: #a6b2c5;
  line-height: 1.8;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
}

.preview-title {
  font-size: 13px;
  font-weight: 600;
}

.preview-subtitle {
  font-size: 12px;
}

.scene-placeholder-note {
  text-align: center;
  color: #8f9bb0;
  line-height: 1.8;
  padding-top: 54px;
}

.scene-placeholder-note strong,
.scene-placeholder-note span {
  display: block;
}

.scene-placeholder-note strong {
  font-size: 16px;
}

.scene-placeholder-note span {
  font-size: 12px;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 98px;
  overflow-y: auto;
}

.status-item {
  padding: 10px 2px;
  border-bottom: 1px dashed #e6edf6;
  font-size: 13px;
}

.status-item.warn {
  color: var(--warning);
}

.status-item.danger {
  color: var(--danger);
}

.status-item.success {
  color: #42a66f;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
}

.result-export-btn {
  min-width: 98px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  background: #ffffff;
  color: #33435c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.result-export-btn:hover {
  border-color: #2f6cf1;
  background: #f4f8ff;
  color: #245ed9;
}

.action-bar {
  height: 66px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.compliance-info {
  position: absolute;
  left: 29px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #73839b;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.calc-mode-popover[hidden] {
  display: none;
}

.calc-mode-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9e4f3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(25, 43, 74, 0.16);
  z-index: 8;
}

.calc-mode-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid #d9e4f3;
  border-bottom: 1px solid #d9e4f3;
  transform: translateX(-50%) rotate(45deg);
}

.calc-mode-btn {
  min-width: 104px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid #d9e4f3;
  background: #ffffff;
  color: #42516b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.calc-mode-btn-primary {
  border-color: #d9e4f3;
  background: #ffffff;
  color: #42516b;
}

.calc-mode-btn:hover,
.calc-mode-btn:focus-visible {
  border-color: #2f6cf1;
  background: linear-gradient(180deg, #3b78ff 0%, #2f6cf1 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 108, 241, 0.22);
  outline: none;
}

.preview-modal[hidden] {
  display: none;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 1);
}

.preview-modal-dialog {
  position: absolute;
  inset: 24px;
  border-radius: 18px;
  border: 1px solid rgba(215, 226, 241, 0.9);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(20, 35, 64, 0.28);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e3ebf7;
}

.preview-modal-header strong,
.preview-modal-header span {
  display: block;
}

.preview-modal-header span {
  margin-top: 4px;
  color: #73839b;
  font-size: 12px;
}

.preview-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.preview-export-btn,
.preview-close-btn {
  min-width: 68px;
}

.preview-modal-body {
  padding: 18px;
  display: flex;
  min-height: 0;
}

.manual-preview-layout {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
}

.manual-cargo-panel {
  min-height: 0;
  border: 1px solid #dfe8f5;
  border-radius: 12px;
  background: #ffffff;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  overflow: hidden;
}

.manual-cargo-panel-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid #edf2f8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.manual-cargo-panel-header strong,
.manual-cargo-panel-header span {
  display: block;
}

.manual-cargo-panel-header strong {
  color: #1f2d3d;
  font-size: 16px;
  font-weight: 800;
}

.manual-cargo-panel-header span {
  margin-top: 5px;
  color: #6f7d93;
  font-size: 12px;
}

.manual-adjust-btn {
  min-width: 104px;
  height: 34px;
  border: 1px solid #f04438;
  border-radius: 8px;
  background: #fff5f4;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.manual-adjust-btn:hover,
.manual-adjust-btn:focus-visible,
.manual-adjust-btn.is-active {
  background: #d92d20;
  color: #ffffff;
  outline: none;
}

.manual-cargo-controls {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f8;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.manual-cargo-controls input[type="search"],
.manual-cargo-controls select {
  width: 100%;
  height: 36px;
  border: 1px solid #d7e2f1;
  border-radius: 8px;
  background: #ffffff;
  color: #263449;
  font-size: 13px;
}

.manual-cargo-controls input[type="search"] {
  padding: 0 11px;
}

.manual-cargo-controls select {
  padding: 0 9px;
}

.manual-cargo-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #41506a;
  font-size: 13px;
  font-weight: 650;
  user-select: none;
}

.manual-cargo-filter input {
  width: 16px;
  height: 16px;
  accent-color: #2f6cf1;
}

.manual-placement-status {
  flex: 1 1 280px;
  min-width: 0;
  padding: 0 4px;
  color: #53627a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
}

.manual-placement-status.is-valid {
  color: #1f7a46;
}

.manual-placement-status.is-invalid {
  color: #b42318;
}

.manual-placement-status.is-empty {
  color: #66758d;
}

.manual-cargo-list {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 9px;
  background: #f8fbff;
}

.manual-cargo-item {
  width: 100%;
  min-height: 94px;
  border: 1px solid #dfe8f5;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(74px, auto);
  grid-template-rows: 1fr auto;
  gap: 8px 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.manual-cargo-item:hover,
.manual-cargo-item:focus-visible,
.manual-cargo-item.is-selected {
  border-color: #2f6cf1;
  box-shadow: 0 8px 20px rgba(47, 108, 241, 0.12);
  outline: none;
}

.manual-cargo-item.is-done {
  background: #fbfcff;
  color: #78869a;
}

.manual-cargo-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(31, 45, 61, 0.12);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.manual-cargo-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.manual-cargo-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.manual-cargo-main strong {
  min-width: 0;
  overflow: hidden;
  color: #1f2d3d;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-cargo-spec,
.manual-cargo-meta {
  color: #65748b;
  font-size: 12px;
  line-height: 1.35;
}

.manual-cargo-spec {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-cargo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.manual-cargo-side {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 4px;
  color: #66758d;
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

.manual-cargo-pack,
.manual-cargo-rule {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-cargo-pack {
  color: #5d6b80;
  font-weight: 700;
}

.manual-cargo-rule {
  color: #718096;
}

.manual-cargo-remaining {
  grid-column: 1 / -1;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #eef5ff;
  color: #245ed9;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.manual-cargo-item.is-done .manual-cargo-remaining {
  background: #eef8f2;
  color: #287a4d;
}

.manual-cargo-empty {
  min-height: 116px;
  border: 1px dashed #d4deec;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #8794a8;
  font-size: 13px;
  font-weight: 700;
  background: #ffffff;
}

.manual-scene-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.manual-scene-toolbar {
  position: relative;
  z-index: 30;
  min-height: 48px;
  border: 1px solid #dfe8f5;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  overflow: visible;
}

.manual-toolbar-status {
  flex: 0 0 auto;
  min-width: 130px;
  color: #41506a;
  font-size: 12px;
  font-weight: 800;
}

.manual-toolbar-actions {
  position: relative;
  z-index: 31;
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible;
}

.manual-tool-btn {
  position: relative;
  z-index: 1;
  min-height: 32px;
  border: 1px solid #cfdbea;
  border-radius: 8px;
  background: #ffffff;
  color: #263449;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.manual-tool-btn[data-shortcut]::after {
  content: attr(data-shortcut);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(2px);
  z-index: 120;
  min-width: max-content;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}

.manual-tool-btn[data-shortcut]:hover,
.manual-tool-btn[data-shortcut]:focus-visible {
  z-index: 90;
}

.manual-tool-btn[data-shortcut]:hover::after,
.manual-tool-btn[data-shortcut]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.manual-tool-btn:hover,
.manual-tool-btn:focus-visible,
.manual-tool-btn.is-active {
  border-color: #2f6cf1;
  background: #eef5ff;
  color: #245ed9;
  outline: none;
}

.manual-tool-btn.danger {
  border-color: #fecaca;
  color: #b42318;
}

.manual-tool-btn.danger:hover,
.manual-tool-btn.danger:focus-visible {
  background: #fff3f2;
}

.manual-tool-btn:disabled {
  cursor: not-allowed;
  color: #9aa6b2;
  border-color: #d7e0ea;
  background: #ffffff;
}

.preview-modal-body .preview-grid {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.manual-scene-panel .preview-grid {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
}

.manual-scene-panel.is-edit-mode .preview-grid {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.help-modal[hidden] {
  display: none;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 46;
}

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.96);
}

.help-modal-dialog {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(215, 226, 241, 0.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(20, 35, 64, 0.24);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.help-modal-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #e3ebf7;
  background: #eef4ff;
}

.help-modal-header strong,
.help-modal-header span {
  display: block;
}

.help-modal-header span {
  margin-top: 4px;
  color: #73839b;
  font-size: 12px;
}

.help-close-btn {
  align-self: center;
  min-width: 68px;
}

.help-modal-body {
  padding: 22px 24px 28px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 18px;
  background: #f7f9fd;
}

.help-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 2px;
  padding: 8px 0 0;
  border: none;
  border-bottom: none;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

.help-tab {
  position: relative;
  min-height: 36px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  background: transparent;
  color: #5f6f86;
  padding: 0 18px;
  font-weight: 700;
  white-space: nowrap;
}

.help-tab + .help-tab::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 8px;
  width: 1px;
  height: 20px;
  background: #d4dfef;
}

.help-tab:hover,
.help-tab:focus-visible {
  background: rgba(255, 255, 255, 0.68);
  outline: none;
}

.help-tab.is-active {
  border-color: #dfe8f5;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 -1px 0 #ffffff inset, 0 -3px 10px rgba(45, 82, 150, 0.08);
  z-index: 1;
}

.help-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #ffffff;
}

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

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

.help-lead,
.help-section,
.help-basic-card,
.help-mode-card,
.help-operation-card {
  border: 1px solid #e3ebf7;
  border-radius: 8px;
  background: #ffffff;
}

.help-lead {
  padding: 18px 20px;
}

.help-lead p,
.help-basic-card p,
.help-mode-card p {
  margin: 0;
  color: #4f6077;
  font-size: 14px;
  line-height: 1.75;
}

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

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

.help-operation-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
}

.help-mode-card {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.help-basic-card {
  position: relative;
  padding: 22px 22px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
  border-top: 4px solid #2f64e7;
}

.help-basic-card.is-wide {
  grid-column: 1 / -1;
}

.help-basic-step {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #edf4ff;
  color: #245ed9;
  font-size: 15px;
  font-weight: 900;
}

.help-operation-card {
  padding: 20px 22px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.help-operation-view {
  border-top: 4px solid #2f64e7;
}

.help-operation-edit {
  border-top: 4px solid #28b67a;
}

.help-mode-standard {
  border-top: 4px solid #2f64e7;
}

.help-mode-fast {
  border-top: 4px solid #28b67a;
}

.help-mode-label {
  color: #7a889b;
  font-size: 13px;
  font-weight: 700;
}

.help-mode-card h3,
.help-basic-card h3,
.help-operation-card h3,
.help-section h3 {
  margin: 0;
  color: #1f2d3d;
  font-size: 18px;
  font-weight: 800;
}

.help-basic-card code {
  border-radius: 5px;
  background: #eef5ff;
  color: #245ed9;
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 800;
  padding: 1px 5px;
}

.help-basic-note {
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: #fff8eb;
  color: #7c4a03 !important;
  padding: 12px 14px;
  font-weight: 750;
}

.help-operation-card p {
  margin: 0;
  color: #4f6077;
  font-size: 14px;
  line-height: 1.85;
}

.help-operation-card p + p {
  padding-top: 10px;
  border-top: 1px dashed #dfe8f5;
}

.help-section {
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.help-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.help-result-grid div {
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: #fbfcff;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.help-result-grid strong {
  color: #26354a;
  font-size: 14px;
}

.help-result-grid span {
  color: #617089;
  font-size: 13px;
  line-height: 1.65;
}

.help-steps {
  margin: 0;
  padding-left: 22px;
  color: #4f6077;
  font-size: 14px;
  line-height: 1.8;
}

.help-steps li + li {
  margin-top: 6px;
}

.settings-modal[hidden] {
  display: none;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.82);
}

.settings-modal-dialog {
  position: absolute;
  top: 76px;
  right: 28px;
  width: 520px;
  max-height: calc(100vh - 112px);
  border: 1px solid rgba(215, 226, 241, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 56px rgba(20, 35, 64, 0.2);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e3ebf7;
}

.settings-modal-header strong,
.settings-modal-header span {
  display: block;
}

.settings-modal-header span {
  margin-top: 4px;
  color: #73839b;
  font-size: 12px;
}

.settings-close-btn {
  min-width: 68px;
}

.settings-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  gap: 18px;
}

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.settings-grid .settings-field {
  grid-template-columns: 1fr;
}

.settings-grid .settings-field small {
  grid-column: 1;
}

.settings-toggle-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
}

.settings-toggle-field > span {
  color: #33435c;
  font-size: 13px;
  font-weight: 700;
}

.settings-toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.settings-toggle-field small {
  grid-column: 1 / -1;
  color: #7a889b;
  font-size: 12px;
  line-height: 1.5;
}

.settings-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f8;
}

.settings-section-title strong {
  font-size: 14px;
}

.settings-section-title span {
  color: #73839b;
  font-size: 12px;
}

.settings-field {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px 12px;
  align-items: center;
}

.settings-field > span {
  color: #33435c;
  font-size: 13px;
  font-weight: 700;
}

.settings-field input {
  width: 100%;
  height: 36px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  padding: 0 10px;
  color: var(--text);
  font-size: 13px;
}

.settings-field small {
  grid-column: 2;
  color: #7a889b;
  font-size: 12px;
  line-height: 1.5;
}

.settings-cache-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.settings-cache-row p {
  margin: 0;
  color: #62718a;
  font-size: 12px;
  line-height: 1.6;
}

.settings-cache-btn {
  height: 36px;
  min-width: 136px;
  padding: 0 14px;
  white-space: nowrap;
}

.settings-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #e3ebf7;
  background: #fbfdff;
}

.settings-save-btn {
  min-width: 96px;
  height: 36px;
  padding: 0 18px;
  border: none;
  color: #ffffff;
  font-weight: 700;
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 47;
}

.feedback-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.82);
}

.feedback-modal-dialog {
  position: absolute;
  top: 48px;
  right: 28px;
  width: min(693px, calc(100vw - 56px));
  max-height: calc(100vh - 72px);
  border: 1px solid rgba(215, 226, 241, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 56px rgba(20, 35, 64, 0.2);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e3ebf7;
}

.feedback-modal-header strong,
.feedback-modal-header span {
  display: block;
}

.feedback-modal-header span {
  margin-top: 4px;
  color: #73839b;
  font-size: 12px;
}

.feedback-close-btn {
  min-width: 68px;
}

.feedback-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.feedback-field {
  display: grid;
  gap: 8px;
}

.feedback-field > span {
  color: #33435c;
  font-size: 13px;
  font-weight: 700;
}

.feedback-field input,
.feedback-field textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-field input::placeholder,
.feedback-field textarea::placeholder {
  color: #8a95a6;
}

.feedback-field input {
  height: 38px;
}

.feedback-field textarea {
  min-height: 280px;
  resize: vertical;
}

.feedback-message {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.feedback-message.is-info {
  background: #eef5ff;
  color: #245ed9;
}

.feedback-message.is-error {
  background: #fff3f2;
  color: #b42318;
}

.feedback-message.is-success {
  background: #effaf3;
  color: #1f7a46;
}

.feedback-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #e3ebf7;
  background: #fbfdff;
}

.feedback-attachment-tip {
  flex: 1;
  min-width: 0;
  color: #73839b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-submit-btn {
  min-width: 108px;
  height: 36px;
  padding: 0 20px;
  border: none;
  color: #ffffff;
  font-weight: 700;
}

.feedback-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.site-info-bar {
  min-height: 28px;
  border-top: 1px solid #e8eef7;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9aa6b7;
  font-size: 12px;
}

.site-info-link {
  border: none;
  background: transparent;
  color: #73839b;
  font-size: 12px;
  line-height: 1;
  padding: 4px 2px;
  cursor: pointer;
}

.site-info-link:hover,
.site-info-link:focus-visible {
  color: var(--primary);
  outline: none;
}

.info-modal[hidden] {
  display: none;
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 47;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.82);
}

.info-modal-dialog {
  position: absolute;
  left: 50%;
  top: 64px;
  width: min(1100px, calc(100vw - 144px));
  height: calc(100vh - 136px);
  transform: translateX(-50%);
  border: 1px solid rgba(215, 226, 241, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 56px rgba(20, 35, 64, 0.2);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid #e3ebf7;
}

.info-modal-header strong,
.info-modal-header span {
  display: block;
}

.info-modal-header span {
  margin-top: 4px;
  color: #73839b;
  font-size: 12px;
}

.info-close-btn {
  min-width: 68px;
}

.info-modal-body {
  padding: 28px;
  overflow-y: auto;
  background: #f8fbff;
}

.info-text-panel {
  min-height: 100%;
  border: 1px solid #e3ebf7;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px 24px;
  color: #4f6077;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .help-basic-grid,
  .help-operation-grid,
  .help-mode-grid,
  .help-result-grid {
    grid-template-columns: 1fr;
  }

  .info-modal-dialog {
    top: 28px;
    width: calc(100vw - 32px);
    height: calc(100vh - 56px);
  }

  .info-modal-header {
    padding: 16px;
  }

  .info-modal-body {
    padding: 16px;
  }
}

.import-preview-modal[hidden] {
  display: none;
}

.import-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 48;
}

.import-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.86);
}

.import-preview-dialog {
  position: absolute;
  top: 56px;
  left: 50%;
  width: min(1080px, calc(100vw - 80px));
  max-height: calc(100vh - 112px);
  transform: translateX(-50%);
  border: 1px solid rgba(215, 226, 241, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(20, 35, 64, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.import-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e3ebf7;
}

.import-preview-header strong,
.import-preview-header span {
  display: block;
}

.import-preview-header span {
  margin-top: 4px;
  color: #73839b;
  font-size: 12px;
}

.import-preview-close-btn {
  min-width: 68px;
}

.import-preview-body {
  padding: 16px 18px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.import-preview-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.import-preview-stat {
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.import-preview-stat span {
  display: block;
  color: #69788e;
  font-size: 12px;
  font-weight: 600;
}

.import-preview-stat strong {
  display: block;
  margin-top: 5px;
  color: #24448f;
  font-size: 18px;
}

.import-preview-warning {
  border: 1px solid #ffe0b9;
  border-radius: 8px;
  background: #fff8ef;
  color: #85540f;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.import-preview-table-shell {
  min-height: 0;
  overflow: auto;
  border: 1px solid #edf2f8;
  border-radius: 8px;
}

.import-preview-table {
  width: 956px;
  min-width: 0;
  table-layout: fixed;
}

.import-preview-col-code {
  width: 330px;
}

.import-preview-col-pack {
  width: 42px;
}

.import-preview-col-number {
  width: 116px;
}

.import-preview-col-weight {
  width: 136px;
}

.import-preview-col-count {
  width: 100px;
}

.import-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.import-preview-table th,
.import-preview-table td {
  height: 36px;
  padding: 8px 16px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-preview-table th {
  background: #f8fbff;
}

.import-preview-table td {
  color: #33435c;
  font-size: 13px;
}

.import-preview-table th:nth-child(2),
.import-preview-table td:nth-child(2) {
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
}

.import-preview-table th:nth-child(3),
.import-preview-table th:nth-child(4),
.import-preview-table th:nth-child(5),
.import-preview-table th:nth-child(6),
.import-preview-table th:nth-child(7),
.import-preview-table td:nth-child(3),
.import-preview-table td:nth-child(4),
.import-preview-table td:nth-child(5),
.import-preview-table td:nth-child(6),
.import-preview-table td:nth-child(7) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.import-preview-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #e3ebf7;
  background: #fbfdff;
}

.import-preview-confirm-btn {
  min-width: 104px;
  height: 36px;
  padding: 0 18px;
  font-weight: 700;
}

.result-panel {
  height: 100%;
  min-height: 0;
}

.result-panel .panel-body {
  min-height: 0;
  overflow: hidden;
}

.preview-grid-compact .preview-placeholder {
  bottom: 10px;
}

.preview-grid-compact .preview-title {
  font-size: 13px;
}

.preview-grid-compact .preview-subtitle {
  font-size: 11px;
}

.preview-modal-body .preview-placeholder {
  bottom: 24px;
}

.preview-modal-body .preview-title {
  font-size: 16px;
}

.preview-modal-body .preview-subtitle {
  font-size: 13px;
}

.primary-btn,
.action-btn {
  height: 38px;
  padding: 0 18px;
  font-weight: 600;
  font-size: 14px;
}

.primary-btn {
  color: #fff;
  border: none;
  background: linear-gradient(90deg, #2f64e7 0%, #3768e4 100%);
}

@media (max-width: 1600px) {
  body {
    min-width: 1280px;
  }

  .content-grid {
    grid-template-columns: 268px minmax(720px, 1fr) 324px;
  }
}
