:root {
  --bg: #eef2f5;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #64727f;
  --line: #d9e1e8;
  --soft-line: #edf1f4;
  --accent: #0f5f5b;
  --accent-dark: #0a4542;
  --accent-soft: #e8f3f2;
  --warn: #9a5b11;
  --ok: #247a4a;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #f7f9fa 0, var(--bg) 260px),
    var(--bg);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

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

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  padding: 8px 13px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

button.secondary {
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}

button.danger {
  border-color: #a13d37;
  background: #a13d37;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  background: #fbfcfd;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 95, 91, 0.16);
  border-color: #83aaa7;
  background: #fff;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

.brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
}

.sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions button:nth-child(n+3) {
  background: #fff;
  color: var(--accent);
}

.top-actions button:nth-child(n+3):hover {
  background: var(--accent-soft);
  border-color: #9bc1be;
}

.workspace {
  display: grid;
  grid-template-columns: 310px minmax(860px, 1fr);
  gap: 20px;
  padding: 18px 22px 28px;
}

.panel {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
}

.panel-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
}

.panel-section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.panel-section label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.panel-section label input,
.panel-section label select {
  margin-top: 5px;
  color: var(--text);
}

.choice-block {
  margin-bottom: 10px;
}

.choice-title {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.choice-row label {
  margin: 0;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.choice-row input {
  margin: 0;
  width: auto;
}

.image-note {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.file-label {
  padding-top: 8px;
}

.status-pill {
  display: inline-flex;
  min-width: 88px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}

.status-pill.locked {
  color: var(--ok);
  border-color: #a9d6bd;
  background: #effaf3;
}

.status-pill.review {
  color: var(--warn);
  border-color: #f0d3a7;
  background: #fff7e8;
}

.readonly-banner {
  display: none !important;
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 120;
  transform: translateX(-50%);
  max-width: min(92vw, 780px);
  border: 1px solid #b8d7d7;
  background: #f0fbfb;
  color: #0c4f50;
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
  font-weight: 700;
}

.readonly-error {
  max-width: 760px;
  margin: 80px auto;
  padding: 24px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  line-height: 1.8;
}

.readonly-mode .panel,
.readonly-mode #saveBtn,
.readonly-mode #shareBtn,
.readonly-mode #wordBtn,
.readonly-mode #imageBtn {
  display: none !important;
}

.readonly-mode .workspace {
  grid-template-columns: 1fr;
}

.status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.side-mini-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.side-mini-table th,
.side-mini-table td {
  border: 1px solid var(--line);
  padding: 4px;
}

.side-mini-table th {
  background: #eef4f5;
  font-weight: 700;
}

.side-mini-table input,
.side-mini-table select {
  border: 0;
  border-radius: 0;
  padding: 3px;
  background: transparent;
  font-size: 12px;
}

.side-mini-table th:nth-child(1),
.side-mini-table td:nth-child(1) {
  width: 30%;
}

.side-mini-table th:nth-child(2),
.side-mini-table td:nth-child(2) {
  width: 16%;
}

.side-mini-table th:nth-child(6),
.side-mini-table td:nth-child(6) {
  width: 34px;
}

.side-mini-table tfoot td {
  background: #f7fafb;
  font-weight: 700;
}

.mini-action {
  width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
}

.mini-table-btn {
  width: 100%;
  padding: 4px 0;
  border-radius: 4px;
  font-size: 12px;
}

.derived-fee-row input,
.derived-fee-row select {
  background: #f4f7f8;
  color: #42515f;
}

.preview-shell {
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 14px;
  scrollbar-gutter: stable;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 14px;
  color: var(--muted);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
}

.quote-paper {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 32px;
  padding: 14mm;
  background: var(--paper);
  border: 1px solid #cfd9e2;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.13);
  --gallery-cols: 2;
  --item-col-width: 120px;
  --spec-col-width: 160px;
  --remark-col-width: 210px;
  --note-row-height: 130px;
  --image-row-height: 190px;
  display: flex;
  flex-direction: column;
}

.quote-paper.landscape {
  width: 297mm;
  min-height: 210mm;
  --gallery-cols: 2;
}

.quote-paper.portrait {
  width: 210mm;
  min-height: 297mm;
  --gallery-cols: 2;
}

.quote-head { order: 1; }
.info-grid { order: 2; }
.summary-panel { order: 3; }
.current-item-panel { order: 4; }
.quote-table { order: 5; }
.fee-section { order: 6; }
.quote-note-row { order: 7; }
.quote-image-row { order: 8; }
.terms { order: 9; }
.sign-area { order: 10; }

.quote-head {
  display: grid;
  grid-template-columns: 150px 1fr 220px;
  gap: 12px;
  align-items: center;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 12px;
}

.logo-box {
  height: 66px;
  border: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f9fcfc;
}

.logo-main {
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
}

.logo-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.quote-title {
  text-align: center;
}

.quote-title h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
}

.quote-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quote-meta {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
  margin-top: 14px;
}

.info-grid div {
  display: grid;
  grid-template-columns: 92px 1fr;
  min-height: 32px;
  border-bottom: 1px solid var(--line);
}

.info-grid strong {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f7f7;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.info-grid span {
  display: flex;
  align-items: center;
  padding: 0 8px;
  min-width: 0;
  font-size: 12px;
}

.summary-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f6faf9;
  border-bottom: 1px solid var(--line);
}

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

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

.summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.summary-table th,
.summary-table td {
  border-right: 1px solid var(--line);
  padding: 7px 8px;
  text-align: center;
}

.summary-table th:last-child,
.summary-table td:last-child {
  border-right: 0;
  font-weight: 700;
}

.summary-table th {
  background: #f2f7f7;
}

.current-item-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 18px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  color: #34404c;
  font-size: 13px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.current-item-panel strong {
  color: var(--text);
}

.item-cards-section {
  order: 5;
  margin-top: 12px;
}

.item-cards-section > .section-title {
  border: 1px solid var(--line);
}

#itemCardsHost {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.item-card {
  border: 1px solid #cbd8df;
  background: #fff;
  padding: 10px;
  overflow-x: auto;
  overflow-y: visible;
  break-inside: avoid;
  page-break-inside: avoid;
}

.item-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  background: #f6faf9;
  border: 1px solid var(--line);
}

.item-card-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.item-card-title strong {
  font-size: 15px;
}

.item-card-title span {
  color: var(--muted);
  font-size: 13px;
}

.item-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-card-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.item-card-actions select {
  width: 118px;
  padding: 5px 7px;
}

.item-card-actions button {
  padding: 6px 9px;
  font-size: 12px;
}

.current-item-panel.in-card {
  margin-top: 8px;
  grid-template-columns: 180px 1fr;
  font-size: 12px;
}

.item-card .quote-table {
  margin-top: 8px;
}

.fee-section {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #fff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f6faf9;
  border-bottom: 1px solid var(--line);
}

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

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

.fee-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.fee-table th,
.fee-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 5px 6px;
  vertical-align: middle;
}

.fee-table th {
  background: #f2f7f7;
  text-align: center;
}

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

.fee-table input,
.fee-table select {
  border: 0;
  border-radius: 0;
  padding: 4px;
  background: transparent;
}

.fee-table input[readonly] {
  color: var(--muted);
}

.fee-table td:nth-child(3),
.fee-table td:nth-child(4),
.fee-table td:nth-child(5) {
  text-align: right;
}

.fee-table tfoot td {
  font-weight: 700;
  text-align: right;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols, 2), minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  min-height: var(--image-row-height);
  grid-auto-rows: minmax(460px, auto);
}

.gallery-card {
  border: 1px solid var(--line);
  background: #f8fafb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 460px;
}

.gallery-placeholder {
  background: #fbfcfd;
}

.gallery-placeholder-text {
  height: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  background: linear-gradient(135deg, #fbfcfd, #f4f8f8);
}

.gallery-empty {
  grid-column: 1 / -1;
  min-height: var(--image-row-height);
  border: 1px dashed var(--line);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.gallery-thumb {
  width: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  background: #ffffff;
  cursor: zoom-in;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-note {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px 8px;
  min-height: 42px;
}

.gallery-note input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 5px 6px;
}

.gallery-remove {
  flex: 0 0 auto;
  border: 0;
  background: #a13d37;
  color: #fff;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
}

.product-summary {
  border: 1px solid var(--line);
  padding: 12px;
}

.product-summary h2,
.terms h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.product-summary p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.summary-note {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: #34404c;
  line-height: 1.6;
}

.summary-note strong {
  display: block;
  margin-bottom: 4px;
}

.summary-note div {
  white-space: pre-wrap;
}

.quote-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 14px;
  font-size: 12px;
}

.quote-table th,
.quote-table td {
  border: 1px solid var(--line);
  padding: 5px;
  vertical-align: middle;
}

.quote-table th {
  background: #f2f7f7;
  text-align: center;
  font-weight: 700;
  position: relative;
}

.quote-table input,
.quote-table select {
  border: 0;
  border-radius: 0;
  padding: 4px;
  background: transparent;
}

.quote-table textarea {
  width: 100%;
  min-height: 46px;
  resize: vertical;
  border: 0;
  padding: 4px;
  background: transparent;
  font: inherit;
}

.spec-stack {
  display: grid;
  gap: 4px;
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.spec-row.top input {
  font-size: 12px;
  padding: 4px 5px;
}

.spec-row.bottom input {
  text-align: center;
}

.resizable-col {
  position: relative;
  padding-right: 16px;
}

.resizable-col > span:first-child {
  display: inline-block;
  pointer-events: none;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: #8aa4b0;
  opacity: 0.7;
}

.resizable-col:hover .col-resizer::after,
.col-resizer:hover::after {
  background: var(--accent);
  opacity: 1;
}

.resizing,
.resizing * {
  user-select: none !important;
  cursor: col-resize !important;
}

.quote-table input[readonly] {
  color: var(--muted);
}

.quote-table tfoot td {
  font-weight: 700;
}

.quote-table tfoot td:first-child {
  text-align: right;
}

.grand-row td {
  background: #eef7f6;
  font-size: 15px;
}

.col-no {
  width: 38px;
}

.quote-table th:nth-child(2),
.quote-table td:nth-child(2) {
  width: 58px;
}

.quote-table th:nth-child(3),
.quote-table td:nth-child(3) {
  width: var(--item-col-width);
}

.quote-table th:nth-child(4),
.quote-table td:nth-child(4) {
  width: var(--spec-col-width);
}

.quote-table th:nth-child(5),
.quote-table td:nth-child(5) {
  width: 54px;
}

.quote-table th:nth-child(6),
.quote-table td:nth-child(6) {
  width: 58px;
}

.quote-table th:nth-child(7),
.quote-table td:nth-child(7) {
  width: 76px;
}

.quote-table th:nth-child(8),
.quote-table td:nth-child(8) {
  width: 82px;
}

.quote-table th:nth-child(9),
.quote-table td:nth-child(9) {
  width: var(--remark-col-width);
}

.quote-table th:nth-child(10),
.quote-table td:nth-child(10) {
  width: 58px;
}

.print-only {
  display: none;
}

.quote-paper.landscape .col-spec {
  width: var(--spec-col-width);
}

.quote-paper.landscape .col-remark {
  width: var(--remark-col-width);
}

.quote-paper.landscape .col-price,
.quote-paper.landscape .col-total {
  width: 110px;
}

.quote-paper.portrait .quote-head {
  grid-template-columns: 130px 1fr;
}

.quote-paper.portrait .quote-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.quote-paper.portrait .info-grid {
  grid-template-columns: 1fr;
}

.quote-note-row {
  margin-top: 14px;
  border: 1px solid var(--line);
  min-height: var(--note-row-height);
  resize: vertical;
  overflow: auto;
  break-inside: avoid;
  page-break-inside: avoid;
}

.quote-note-head {
  height: 100%;
  padding: 8px 12px;
}

.quote-note-head h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.quote-note-text {
  white-space: pre-wrap;
  color: #34404c;
  font-size: 12px;
  line-height: 1.45;
}

.quote-image-row {
  margin-top: 12px;
  border: 1px solid var(--line);
  min-height: var(--image-row-height);
  height: auto;
  break-inside: avoid;
  page-break-inside: avoid;
}

.quote-image-row .product-gallery {
  padding: 10px;
  min-height: var(--image-row-height);
}

.quote-paper.portrait .quote-note-row,
.quote-paper.portrait .quote-image-row {
  break-inside: avoid;
  page-break-inside: avoid;
}

.quote-paper.portrait .product-gallery {
  margin-top: 0;
}

.quote-paper.portrait .quote-table {
  font-size: 12px;
}

.money-input {
  text-align: right;
}

.terms {
  border: 1px solid var(--line);
  margin-top: 12px;
  padding: 10px 12px;
}

.terms ol {
  margin: 0;
  padding-left: 18px;
  line-height: 1.45;
  font-size: 12px;
  color: #34404c;
}

.sign-area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 18px;
  font-size: 13px;
}

.sign-line {
  display: inline-block;
  width: 120px;
  border-bottom: 1px solid var(--text);
  height: 18px;
  vertical-align: bottom;
}

body.locked input,
body.locked select,
body.locked textarea {
  pointer-events: none;
  background: #f5f7f9;
  color: #56616f;
}

body.locked .no-lock {
  pointer-events: auto;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .panel,
  .preview-toolbar,
  .no-print {
    display: none !important;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .quote-paper {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 12mm;
    border: 0;
    box-shadow: none;
  }

  .quote-paper.landscape {
    width: 297mm;
    min-height: 210mm;
  }

  .item-cards-section {
    margin-top: 10px;
  }

  .item-card {
    border: 0;
    padding: 0;
    overflow: visible;
  }

  .quote-table {
    min-width: 0;
  }

  .item-card + .item-card {
    margin-top: 10px;
  }

  .item-card-head,
  .current-item-panel.in-card {
    display: none !important;
  }

  .print-only {
    display: table-cell;
  }

  .quote-table th:nth-child(2),
  .quote-table td:nth-child(2) {
    width: 58px;
  }

  .quote-table tfoot td:first-child {
    text-align: right;
  }

  .col-resizer {
    display: none !important;
  }

  .quote-paper input,
  .quote-paper select,
  .quote-paper textarea {
    appearance: none;
    -webkit-appearance: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #17202a !important;
    padding: 0;
    resize: none;
  }

  .quote-paper textarea {
    min-height: 0;
    overflow: hidden;
  }

  @page {
    size: A4;
    margin: 0;
  }
}

.modal.hidden {
  display: none;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
  position: relative;
  width: min(96vw, 1180px);
  height: min(94vh, 920px);
  margin: 3vh auto 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #f4f6f8;
}

#printPreviewHost .quote-paper {
  margin: 0 auto;
  box-shadow: none;
}

#printPreviewHost .quote-paper {
  transform-origin: top center;
}

#printPreviewHost .no-print,
#printPreviewHost .item-cards-section > .section-title,
#printPreviewHost .item-card-head,
#printPreviewHost .current-item-panel.in-card {
  display: none !important;
}

#printPreviewHost .item-cards-section {
  margin-top: 10px;
}

#printPreviewHost .item-card {
  border: 0;
  padding: 0;
  overflow: visible;
}

#printPreviewHost .item-card + .item-card {
  margin-top: 10px;
}

#printPreviewHost .print-only {
  display: table-cell;
}

#printPreviewHost .quote-table {
  min-width: 0;
}

#printPreviewHost .col-resizer {
  display: none !important;
}

#printPreviewHost .quote-paper input,
#printPreviewHost .quote-paper select,
#printPreviewHost .quote-paper textarea {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #17202a !important;
  padding: 0;
  resize: none;
}

#printPreviewHost .quote-paper textarea {
  min-height: 0;
  overflow: hidden;
}

#imageExportHost .no-print,
#imageExportHost .item-cards-section > .section-title,
#imageExportHost .item-card-head,
#imageExportHost .current-item-panel.in-card {
  display: none !important;
}

#imageExportHost .item-card {
  border: 0;
  padding: 0;
  overflow: visible;
}

#imageExportHost .print-only {
  display: table-cell;
}

#imageExportHost .quote-table {
  min-width: 0;
}

#imageExportHost .col-resizer {
  display: none !important;
}

#imageExportHost .quote-paper input,
#imageExportHost .quote-paper select,
#imageExportHost .quote-paper textarea {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #17202a !important;
  padding: 0;
  resize: none;
}

.image-preview-panel {
  width: min(92vw, 1280px);
  height: min(92vh, 900px);
}

.image-preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
}

.image-preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}
