:root {
  --ink: #111;
  --ui-border: #c9d2d8;
  --accent: #1f6f78;
  --offset-x: 0mm;
  --offset-y: 0mm;
  --print-scale: 1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #172025;
  background: #eef3f4;
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: 0 6px 18px rgba(20, 35, 40, 0.06);
}

.brand {
  display: grid;
  gap: 2px;
  min-width: 220px;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand span,
.money-entry span,
.payment-money-entry span {
  color: #66747a;
  font-size: 12px;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: #f7faf9;
}

.tab,
.ghost,
.primary,
.danger-lite {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.tab {
  background: transparent;
  color: #536168;
}

.tab.is-active {
  background: #0f3439;
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.ghost {
  background: #fff;
  border-color: var(--ui-border);
  color: #334155;
}

.primary {
  padding: 0 18px;
  background: #176b75;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(31, 111, 120, 0.22);
}

.danger-lite {
  background: #fff5f5;
  border-color: #f1b5b5;
  color: #b42318;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(390px, 1.35fr) minmax(300px, 1fr) minmax(260px, 0.9fr);
  gap: 14px;
  max-width: 1280px;
  margin: 18px auto 0;
  padding: 0 18px;
}

.control-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(190, 202, 207, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(31, 49, 55, 0.08);
}

.control-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #172025;
}

.current-voucher-name {
  font-size: 20px;
  font-weight: 700;
  color: #102f35;
}

.current-voucher-size,
.current-copy-info,
.print-status {
  margin-top: 7px;
  color: #52636a;
  font-size: 13px;
}

.print-status {
  color: #1f6f78;
}

.print-card {
  display: grid;
  gap: 10px;
}

.card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  grid-column: 1 / -1;
}

.card-title h2 {
  margin: 0;
}

.card-title span {
  color: #1f6f78;
  font-size: 13px;
}

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

.tips-card ol {
  margin: 0;
  padding-left: 18px;
  color: #52636a;
  font-size: 13px;
  line-height: 1.8;
}

.payee-card {
  min-width: 300px;
}

.payee-search-wrap {
  position: relative;
}

#payeeSearchInput {
  width: 100%;
  height: 36px;
  border: 1px solid #cbd5da;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
}

.payee-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 42px;
  z-index: 20;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  display: none;
}

.payee-suggest-list.is-open {
  display: block;
}

.payee-suggest-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf1f3;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.payee-suggest-item:hover {
  background: #f3f8f8;
}

.payee-suggest-item strong {
  font-size: 14px;
  color: #0f172a;
}

.payee-suggest-item span {
  font-size: 12px;
  color: #64748b;
}

.payee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.payee-tip {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
}

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

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

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

.payee-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 60px);
  margin: 30px auto;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  padding: 18px;
}

.payee-modal-head,
.payee-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payee-modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.payee-edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f7fafb;
}

.payee-edit-form label {
  display: grid;
  gap: 5px;
  color: #46555b;
  font-size: 12px;
}

.payee-edit-form input {
  height: 34px;
  border: 1px solid #cbd5da;
  border-radius: 8px;
  padding: 0 10px;
}

.payee-form-actions {
  align-self: end;
  justify-content: flex-start;
}

.payee-book-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payee-book-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.3fr) minmax(120px, 0.7fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #edf1f3;
  border-radius: 12px;
}

.payee-book-item strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
}

.payee-book-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.payee-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calibration label {
  display: grid;
  gap: 5px;
  min-width: 112px;
  color: #46555b;
  font-size: 12px;
}

.calibration input {
  height: 34px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
}

.calibration select {
  height: 34px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
}

.calibration select:disabled {
  cursor: not-allowed;
  color: #8a989e;
  background: #eef3f4;
}

.calibration .checkline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.calibration .checkline input {
  width: auto;
  height: auto;
}

.stage {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 24px 18px 56px;
  overflow-x: auto;
}

.copy-switch-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  margin: 14px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(190, 202, 207, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.copy-switch-title {
  display: grid;
  gap: 3px;
}

.copy-switch-title strong {
  font-size: 16px;
}

.copy-switch-title span {
  color: #66747a;
  font-size: 12px;
}

.copy-segment,
.copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-segment[hidden] {
  display: none !important;
}

.voucher {
  display: none;
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 42px rgba(20, 30, 34, 0.18);
  transform: translate(var(--offset-x), var(--offset-y)) scale(var(--print-scale));
  transform-origin: top left;
  font-family: SimSun, "宋体", serif;
}

.voucher.active {
  display: block;
}

.money-cell {
  text-align: center;
  padding: 0;
}

.money-entry,
.payment-money-entry {
  width: calc(100% - 36px);
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 12px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(190, 202, 207, 0.78);
  border-radius: 14px;
  color: #354247;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(31, 49, 55, 0.08);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.money-entry h2,
.payment-money-entry h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 16px;
}

.money-entry label,
.payment-money-entry label {
  display: grid;
  gap: 8px;
  color: #46555b;
  font-size: 12px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.money-entry input,
.payment-money-entry input {
  width: 30mm;
  height: 34px;
  border: 1px solid #b9c7cb;
  border-radius: 6px;
  padding: 0 8px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.copy-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.copy-tabs span {
  color: #354247;
  font-size: 13px;
}

.money-entry > span,
.payment-money-entry > span {
  grid-column: 1 / -1;
}

.copy-tab {
  min-height: 30px;
  border: 1px solid #b9c7cb;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #354247;
  cursor: pointer;
}

.copy-tab.is-active {
  border-color: #1f6f78;
  background: #1f6f78;
  color: #fff;
}

.copy-tab:disabled,
.copy-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.helper-panel {
  display: none;
}

.helper-panel.active {
  display: grid;
}

.print-sheet {
  display: none;
}

.debug-position .voucher::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 0, 0, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 0, 0, 0.15) 1px, transparent 1px);
  background-size: 5% 5%;
}

.expense {
  width: 210mm;
  height: 95mm;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #fff;
  font-family: SimSun, "宋体", serif;
}

.expense-title {
  position: absolute;
  left: 60mm;
  top: 5mm;
  width: 90mm;
  height: 12mm;
  text-align: center;
  font-family: SimSun, "宋体", serif;
  font-size: 8.5mm;
  font-weight: 700;
  letter-spacing: 4mm;
  line-height: 11mm;
  border-bottom: 0.35mm solid #000;
}

.expense .barcode {
  position: absolute;
  left: 155mm;
  top: 4mm;
  width: 20mm;
  height: 8mm;
  display: block;
  overflow: hidden;
}

.barcode-bars {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 5.6mm;
  overflow: hidden;
}

.barcode-bar {
  height: 100%;
  background: #000;
  flex: 0 0 0.24mm;
}

.barcode-bar.is-guard {
  height: 6.2mm;
}

.barcode-space {
  height: 100%;
  background: transparent;
  flex: 0 0 0.24mm;
}

.expense .barcode-number {
  display: block;
  width: 100%;
  height: 2.4mm;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: "Times New Roman", SimSun, "宋体", serif;
  font-size: 1.75mm;
  line-height: 2.4mm;
  letter-spacing: 0.08mm;
  text-align: center;
}

.expense .doc-meta {
  position: absolute;
  left: 174mm;
  top: 6mm;
  width: 30mm;
  height: 14mm;
  display: grid;
  gap: 1mm;
  font-family: SimSun, "宋体", serif;
  font-size: 3.3mm;
  overflow: hidden;
}

.expense .doc-meta label {
  display: flex;
  align-items: center;
  gap: 0.8mm;
  white-space: nowrap;
}

.expense .doc-meta input {
  width: 6mm;
  height: 4mm;
  border-bottom: 1px solid #000;
  text-align: center;
  padding: 0;
  font-size: 3.2mm;
}

.expense .doc-meta label:first-child input {
  width: 10mm;
}

.expense .doc-meta label:nth-child(2) input:first-child {
  width: 8mm;
}

.expense-invoice-info {
  position: absolute;
  left: 10mm;
  top: 20mm;
  width: 195mm;
  height: 5.5mm;
  border: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  font-family: SimSun, "宋体", serif;
  font-size: 3.1mm;
  line-height: 5mm;
  padding: 0 1mm;
  box-sizing: border-box;
  white-space: pre;
}

.expense-invoice-info::placeholder {
  color: #6f767a;
}

.expense-company-vertical {
  position: absolute;
  left: 7mm;
  top: 31mm;
  width: 14mm;
  height: 50mm;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 3.1mm;
  line-height: 3.6mm;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.expense-table-wrap {
  position: absolute;
  left: 22mm;
  top: 27mm;
  width: 168mm;
  height: 58mm;
  border: 0.55mm solid #000;
  box-sizing: border-box;
  overflow: hidden;
}

.expense-table {
  width: 100%;
  height: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 0;
  font-family: SimSun, "宋体", serif;
}

.expense-table th,
.expense-table td {
  border: 1px solid #000;
  padding: 0;
  font-weight: 400;
  vertical-align: middle;
  overflow: hidden;
  line-height: 1;
}

.expense-table .c-name {
  width: 43mm;
}

.expense-table .c-summary {
  width: 89.5mm;
}

.expense-table .c-digit {
  width: 3.5mm;
}

.expense-table .c-digit-last {
  width: 4mm;
}

.expense-table thead tr:first-child {
  height: 7mm !important;
}

.expense-table thead tr:nth-child(2) {
  height: 5mm !important;
  font-size: 2.7mm;
}

.expense-table tbody tr.detail-row {
  height: 7.5mm !important;
}

.expense-table tbody tr.total-row {
  height: 7mm !important;
}

.expense-table thead tr:first-child th {
  height: 7mm !important;
}

.expense-table thead tr:nth-child(2) th {
  height: 5mm !important;
  padding: 0 !important;
  font-size: 2.7mm;
  line-height: 1;
  text-align: center;
}

.expense-table tbody tr.detail-row td {
  height: 7.5mm !important;
}

.expense-table tbody tr.total-row td {
  height: 7mm !important;
  line-height: 7mm;
}

.expense-table th {
  font-size: 3.6mm;
}

.expense input,
.expense textarea {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: SimSun, "宋体", serif;
  font-size: 3.5mm;
  line-height: 1.1;
  padding: 0 1mm;
  box-sizing: border-box;
  overflow: hidden;
}

.expense-table tbody tr.detail-row input,
.expense-table tbody tr.detail-row textarea {
  display: block;
  width: 100%;
  height: 7.5mm !important;
  min-height: 0 !important;
  max-height: 7.5mm !important;
  line-height: 7.5mm;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
  overflow: hidden;
  resize: none;
}

.expense textarea {
  display: block;
  resize: none;
}

.expense .expense-invoice-info {
  width: 195mm;
  height: 5.5mm;
  font-size: 3.1mm;
  line-height: 5mm;
  white-space: pre;
}

.money-cell {
  text-align: center;
  padding: 0 !important;
}

.expense-table .money-cell {
  font-family: KaiTi, "楷体", STKaiti, "华文楷体", SimSun, "宋体", serif;
  font-size: 2.8mm;
  line-height: 1 !important;
  text-indent: 0;
  letter-spacing: 0;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
}

.expense-total-cell {
  padding: 0 !important;
}

.expense-total-wide {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  height: 7mm;
  white-space: nowrap;
}

.expense-total-wide input[data-field="expense.uppercase"] {
  flex: 1;
  min-width: 0;
}

.expense-total-money-grid {
  flex: 0 0 35.5mm;
  display: grid;
  grid-template-columns: repeat(9, 3.5mm) 4mm;
  width: 35.5mm;
  height: 7mm;
  border-left: 1px solid #000;
}

.expense-total-money-grid input {
  width: 3.5mm !important;
  height: 7mm !important;
  padding: 0 !important;
  border-right: 1px solid #000;
  font-family: KaiTi, "楷体", STKaiti, "华文楷体", SimSun, "宋体", serif;
  font-size: 2.8mm;
  line-height: 1 !important;
  text-align: center;
  text-indent: 0;
  letter-spacing: 0;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
}

.expense-total-money-grid input:last-child {
  width: 4mm !important;
}

.expense-total-money-grid input:last-child {
  border-right: 0;
}

.expense-attach-vertical {
  position: absolute;
  left: 193mm;
  top: 46mm;
  width: 10mm;
  height: 32mm;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 3.8mm;
  line-height: 8mm;
  text-align: center;
  overflow: hidden;
}

.expense-attach-vertical input {
  width: 6mm;
  height: 9mm;
  text-align: center;
  writing-mode: horizontal-tb;
}

.expense-signs {
  position: absolute;
  left: 22mm;
  top: 86mm;
  width: 168mm;
  height: 6mm;
  display: flex;
  justify-content: flex-start;
  gap: 19mm;
  align-items: center;
  font-size: 3.6mm;
  overflow: hidden;
}

.payment {
  width: 213mm;
  height: 108mm;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #fff;
  font-family: SimSun, "宋体", serif;
}

.payment-company {
  position: absolute;
  left: 0;
  top: 4mm;
  width: 213mm;
  height: 6mm;
  text-align: center;
  font-size: 4.8mm;
  line-height: 6mm;
}

.payment-title {
  position: absolute;
  left: 69mm;
  top: 11mm;
  width: 75mm;
  height: 11mm;
  text-align: center;
  font-size: 8.5mm;
  font-weight: 700;
  letter-spacing: 4mm;
  line-height: 10mm;
  border-bottom: 0.35mm solid #000;
}

.payment-date {
  position: absolute;
  left: 148mm;
  top: 18mm;
  width: 60mm;
  height: 6mm;
  display: flex;
  align-items: center;
  gap: 0.8mm;
  font-size: 3.7mm;
  line-height: 6mm;
  white-space: nowrap;
  overflow: hidden;
}

.payment-date input {
  width: 8mm;
  height: 4mm;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #000;
  outline: 0;
  background: transparent;
  text-align: center;
  font-family: SimSun, "宋体", serif;
  font-size: 3.4mm;
}

.payment-table-wrap {
  position: absolute;
  left: 11mm;
  top: 30mm;
  width: 182mm;
  height: 68mm;
  border: 0.55mm solid #000;
  box-sizing: border-box;
  overflow: hidden;
}

.payment-table {
  width: 100%;
  height: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 0;
  font-family: SimSun, "宋体", serif;
}

.payment-table th,
.payment-table td {
  border: 1px solid #000;
  padding: 0 1mm;
  font-weight: 400;
  vertical-align: middle;
  overflow: hidden;
  line-height: 1;
}

.payment-table .p-project {
  width: 91mm;
}

.payment-table .p-money {
  width: 40mm;
}

.payment-table .p-audit {
  width: 25mm;
}

.payment-table .p-approve {
  width: 26mm;
}

.payment-table tr.reason-row {
  height: 7mm !important;
}

.payment-table tr.payee-row {
  height: 7mm !important;
}

.payment-table tr.account-row {
  height: 10mm !important;
}

.payment-table tr.header-row {
  height: 6mm !important;
}

.payment-table tr.detail-row,
.payment-table tr.total-row {
  height: 6mm !important;
}

.payment-table tr.uppercase-row {
  height: 8mm !important;
}

.payment-table th {
  font-size: 3.7mm;
  text-align: left;
}

.payment-table .header-row th {
  text-align: center;
  font-size: 3.7mm;
}

.payment-line-field {
  position: relative;
  padding: 0 !important;
}

.payment-line-field span {
  position: absolute;
  left: 2mm;
  top: 0;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 3.7mm;
  line-height: 7mm;
  white-space: nowrap;
}

.payment .payment-line-field input,
.payment .payment-line-field textarea {
  position: absolute;
  top: 0;
  height: 100%;
  padding: 0;
  font-size: 3.5mm;
  line-height: 7mm;
}

.reason-row .payment-line-field input,
.reason-row .payment-line-field textarea {
  left: 12mm;
  width: calc(100% - 14mm);
}

.payee-row .payment-line-field input,
.payee-row .payment-line-field textarea {
  left: 26mm;
  width: calc(100% - 28mm);
}

.account-row .payment-line-field input,
.account-row .payment-line-field textarea {
  left: 47mm;
  width: calc(100% - 49mm);
  line-height: 10mm;
}

.payment input,
.payment textarea {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: SimSun, "宋体", serif;
  font-size: 3.5mm;
  line-height: 1.1;
  padding: 0 1mm;
  box-sizing: border-box;
  overflow: hidden;
}

.payment .payment-money-cell input {
  padding-left: 8mm;
}

.payment textarea {
  display: block;
  resize: none;
}

.payment .payment-date input {
  flex: 0 0 7.5mm;
  width: 7.5mm;
  height: 4.6mm;
  line-height: 4.6mm;
  padding: 0;
  font-size: 3.3mm;
}

.payment .payment-date input:nth-of-type(1) {
  flex-basis: 12mm;
  width: 12mm;
}

.payment-rmb {
  display: flex;
  align-items: center;
  gap: 0.8mm;
  font-size: 3.5mm;
}

.payment-money-cell {
  position: relative;
}

.payment-money-cell::before {
  content: "￥：";
  position: absolute;
  left: 2mm;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  font-family: KaiTi, "楷体", STKaiti, "华文楷体", SimSun, "宋体", serif;
  font-size: 3.5mm;
}

.payment-money-cell input {
  padding-left: 8mm;
}

.payment-rmb input {
  flex: 0 0 26mm;
  width: 26mm !important;
  height: 5mm !important;
  min-height: 0 !important;
  line-height: 5mm !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.payment-uppercase-cell {
  font-size: 3.5mm;
  line-height: 8mm;
  white-space: nowrap;
  padding: 0 2mm !important;
  vertical-align: middle;
}

.payment-uppercase-cell span {
  display: inline-block;
  height: 8mm;
  line-height: 8mm;
  vertical-align: top;
}

.payment-uppercase-cell input {
  display: inline-block;
  width: 150mm;
  height: 8mm;
  line-height: 8mm;
  padding: 0 1mm;
  font-size: 3.5mm;
  vertical-align: top;
}

.payment-attach-vertical {
  position: absolute;
  left: 193mm;
  top: 30mm;
  width: 9mm;
  height: 68mm;
  border: 0.55mm solid #000;
  border-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  font-size: 3.8mm;
  line-height: 8mm;
  overflow: hidden;
}

.payment-attach-vertical input {
  width: 6mm;
  height: 9mm;
  padding: 0;
  text-align: center;
  writing-mode: horizontal-tb;
}

.payment-signs {
  position: absolute;
  left: 11mm;
  top: 99mm;
  width: 168mm;
  height: 6mm;
  display: flex;
  justify-content: flex-start;
  gap: 26mm;
  align-items: center;
  font-size: 3.8mm;
  overflow: hidden;
}

/* 填写内容字体：普通文字用行楷，数字和金额保持楷体，打印时更清楚。 */
.voucher input,
.voucher textarea {
  font-family: STXingkai, "华文行楷", "Xingkai SC", KaiTi, "楷体", serif;
}

.voucher input[data-money-cell],
.voucher .money-cell,
.voucher input[data-amount-source],
.voucher input[data-field$=".year"],
.voucher input[data-field$=".month"],
.voucher input[data-field$=".day"],
.voucher input[data-field$=".barcode"],
.voucher input[data-field$=".uppercase"],
.voucher input[data-field$=".total"],
.voucher input[data-field$=".totalText"],
.voucher input[data-field$=".attach"],
.expense .doc-meta input,
.expense .barcode-number,
.expense-attach-vertical input,
.payment-date input,
.payment-rmb input,
.payment-uppercase-cell input,
.payment-attach-vertical input {
  font-family: KaiTi, "楷体", STKaiti, "华文楷体", SimSun, "宋体", serif;
}

@media (max-width: 1280px) {
  .control-panel {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 900px) {
  .app-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .print-card {
    grid-template-columns: 1fr;
  }

  .setting-grid,
  .copy-switch-card,
  .payee-edit-form,
  .payee-book-item {
    grid-template-columns: 1fr;
  }

  .actions {
    margin-left: 0;
  }

  .stage {
    justify-items: start;
  }
}

@media print {
  * {
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .print-hidden,
  .control-panel,
  .copy-switch-card,
  .helper-panel,
  .app-toolbar,
  .payee-card,
  .payee-modal,
  .payee-suggest-list {
    display: none !important;
  }

  .voucher {
    margin: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    transform: none !important;
    overflow: hidden !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-mode-a4 .stage {
    display: none !important;
  }

  .print-mode-a4 .print-sheet {
    display: block !important;
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .print-mode-a4 .print-sheet .voucher {
    display: block !important;
    transform: none !important;
  }

  .print-mode-a4 .print-sheet .payment {
    transform: scale(0.985) !important;
    transform-origin: top left !important;
  }

  .print-mode-a4 .print-sheet .voucher + .voucher {
    margin-top: 0 !important;
  }

  .print-mode-original .print-sheet {
    display: none !important;
  }

  .print-mode-original .stage {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .print-mode-original .voucher:not(.active) {
    display: none !important;
  }

  .print-mode-original .voucher.active {
    display: block !important;
    transform: none !important;
  }

  .voucher input,
  .voucher textarea {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    appearance: none;
    -webkit-appearance: none;
  }

  .expense-invoice-info::placeholder {
    color: transparent !important;
  }

  .debug-position .voucher::after {
    display: none !important;
  }
}
