/* label-print.css */
.dw-label-preview,
.dw-label-detail {
  max-width: 100%;
  color: #17365d;
}
.dw-label-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0;
}
.dw-label-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dw-receipt-correction-fields {
  border: 0;
  margin: 0;
  min-inline-size: 0;
  padding: 0;
}
.dw-label-copies {
  max-width: 4.5rem;
  min-height: 34px;
  padding: 0 6px;
  border: 1px solid #b9cfe8;
  border-radius: 5px;
  font: inherit;
}
.dw-label-pick {
  border-radius: 5px;
  background: #f1f7fe;
  padding: 5px 8px;
}
.dw-label-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  background: #eef4fa;
}
.dw-paper-label {
  box-sizing: border-box;
  width: var(--paper-width);
  height: var(--paper-height);
  padding: 2mm;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--qr-edge);
  grid-template-rows: minmax(0, 1fr) 4mm;
  gap: 1mm;
  background: #fff;
  color: #000;
  overflow: hidden;
}
.dw-paper-copy {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .8mm;
}
.dw-paper-label h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  overflow: hidden;
  font-size: 3.6mm;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.dw-paper-label p {
  margin: 0;
  font-size: 2.5mm;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dw-paper-label .dw-paper-type,
.dw-paper-label .dw-paper-footer {
  font-size: 2.2mm;
}
.dw-paper-footer {
  grid-column: 1 / -1;
  align-self: end;
}
.dw-paper-label svg {
  align-self: center;
  width: var(--qr-edge);
  height: var(--qr-edge);
  color: #000;
}
.dw-label-print-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border: 0;
}
.dw-label-scan-video {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 4 / 3;
  background: #0e1726;
  object-fit: cover;
  border-radius: 5px;
}
.dw-label-detail .dw-table-scroll {
  max-height: 240px;
}

/* document-photos.css */
.dw-photos-body {
  padding: 0 10px 8px;
}
.dw-photos-body > p {
  margin: 6px 0;
}
.dw-photo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dw-photo-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e0ebf6;
}
.dw-photo-list label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dw-photo-controls {
  padding-inline: 0;
}
.dw-photo-input {
  flex-wrap: wrap;
}
.dw-photo-input input {
  max-width: min(200px, 100%);
}
.dw-photo-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(45dvh, 330px);
  object-fit: contain;
}

/* app.css */
:root {
  color-scheme: light;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #17365d;
  background: #f4f9ff;
}
body {
  margin: 0;
}
.dw-scope,
.dw-settings,
.dw-notice,
.dw-stock-details,
.dw-error {
  box-sizing: border-box;
}
.dw-scope {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px clamp(12px, 1.35vw, 22px);
  color: #294667;
  background: #fff;
  border-bottom: 1px solid #cbdcf0;
  font-size: 13px;
  overflow-x: auto;
}
.dw-scope label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.dw-scope select {
  max-width: 15rem;
}
.dw-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}
.dw-button,
.dw-scope select,
.dw-settings select {
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #b9cfe8;
  border-radius: 5px;
  color: #244b77;
  background: #fff;
  font: inherit;
}
.dw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.dw-button:disabled {
  opacity: .55;
  cursor: default;
}
.dw-primary {
  color: #fff;
  border-color: #0866d3;
  background: #0969dc;
}
.dw-access {
  box-sizing: border-box;
  width: min(420px, calc(100% - 36px));
  margin: max(48px, 11vh) auto 24px;
  padding: 26px;
  border: 1px solid #cbdcf0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 26px #082b6810;
}
.dw-access h1,
.dw-settings h2 {
  margin: 0 0 14px;
  color: #082b68;
}
.dw-wechat-pair svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.dw-wechat-pair p {
  margin: 8px 0 12px;
}
.dw-wechat-pair strong {
  margin-inline-start: 5px;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}
.dw-wechat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dw-settings,
.dw-stock-details {
  margin: 12px clamp(12px, 1.35vw, 22px);
  padding: 12px 14px;
  border: 1px solid #cbdcf0;
  border-radius: 8px;
  background: #fff;
}
.dw-settings fieldset {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d8e5f3;
  border-radius: 5px;
}
.dw-settings fieldset p {
  margin: 8px 0 0;
  font-size: 13px;
}
.dw-settings legend {
  color: #082b68;
  font-weight: 700;
}
.dw-fields,
.dw-meta,
.dw-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.dw-fields label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dw-meta {
  margin: 0;
}
.dw-meta div {
  display: flex;
  gap: 7px;
}
.dw-meta dt {
  color: #52627a;
}
.dw-meta dd {
  margin: 0;
  font-weight: 700;
}
.dw-notice,
.dw-error {
  margin: 9px clamp(12px, 1.35vw, 22px);
  padding: 8px 10px;
  background: #fff7e8;
  color: #81450a;
  border-radius: 5px;
}
.dw-stock-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.dw-table-scroll {
  margin-top: 10px;
  max-height: 300px;
  overflow: auto;
}
.dw-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.dw-table-scroll th,
.dw-table-scroll td {
  padding: 7px 10px;
  border-bottom: 1px solid #e0ebf6;
  white-space: nowrap;
}
.dw-table-scroll th {
  position: sticky;
  top: 0;
  background: #eaf3fc;
}
.dw-stock-pager {
  margin-top: 8px;
}
.dw-batch-panel {
  padding: 9px 0;
  border-bottom: 1px solid #d8e5f3;
}
.dw-batch-panel > label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}
.dw-field,
.dw-batch-search {
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid #b9cfe8;
  border-radius: 5px;
  font: inherit;
}
.dw-receipt-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.dw-receipt-tools:empty {
  display: none;
}
.wwb-page dialog.dw-business-dialog {
  margin: auto;
  padding: 0;
  width: min(900px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  border: 1px solid #cbdcf0;
  color: inherit;
}
.wwb-page dialog.dw-business-dialog:not([open]) {
  display: none;
}
.dw-business-dialog::backdrop {
  background: #15243c73;
}
.dw-document-header {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(120px, 2fr);
  gap: 8px;
  margin-bottom: 10px;
}
.dw-document-header label {
  display: grid;
  gap: 4px;
}
.dw-document-lines {
  max-height: 290px;
  margin: 8px 0;
  overflow: auto;
}
.dw-document-lines th {
  position: sticky;
  top: 0;
}
.dw-document-lines input:not([type=checkbox]) {
  width: 90px;
}
.dw-document-lines select {
  width: 100%;
  min-width: 155px;
}
.dw-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.dw-receipt-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.dw-flow-content {
  padding: 8px 12px;
}
.dw-flow-section {
  min-width: 0;
  margin-bottom: 10px;
  border: 1px solid #d8e5f3;
  border-radius: 5px;
}
.dw-flow-section h3,
.dw-stocktake-preview h3 {
  margin: 8px 10px;
  color: #082b68;
  font-size: 14px;
}
.dw-flow-section fieldset {
  margin: 0 8px 8px;
  border: 0;
}
.dw-flow-content .dw-flow-table {
  min-width: max-content;
  table-layout: auto;
}
.dw-flow-meta,
.dw-flow-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 7px 10px;
}
.dw-flow-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dw-flow-form {
  display: block;
}
.dw-flow-form .wwb-actions {
  margin-top: 7px;
}
.dw-flow-form .wwb-table-shell {
  max-height: 340px;
}
.dw-flow-list {
  max-height: 280px;
}
.dw-short-input {
  width: 108px;
}
.dw-stocktake-preview {
  border-top: 1px solid #d8e5f3;
  padding: 6px 10px;
}
@media (max-width: 580px) {
  .dw-document-header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dw-document-header label:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .dw-scope {
    gap: 8px;
    scrollbar-width: none;
  }
  .dw-scope::-webkit-scrollbar {
    display: none;
  }
  .dw-scope select {
    max-width: 9rem;
  }
  .dw-button,
  .dw-scope select {
    min-height: 42px;
  }
}
