.file-row {
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
}

.tax-refund-file-toolbar{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid #e3ebf2;background:#fff}.tax-refund-file-toolbar>div{margin-right:auto}.tax-refund-file-toolbar b,.tax-refund-file-toolbar span{display:block}.tax-refund-file-toolbar b{color:#1b3d54;font-size:17px}.tax-refund-file-toolbar span{margin-top:3px;color:#74899a;font-size:12px}.tax-refund-file-toolbar label{display:inline-flex;align-items:center;gap:6px;color:#536b80;font-size:13px;cursor:pointer}.tax-refund-file-toolbar input,.tax-refund-file-row input{width:16px;height:16px}.tax-refund-delete-selected{color:#d33d3d}.tax-refund-file-list{display:grid;gap:8px;width:auto;margin:0;padding:14px 18px 20px}.tax-refund-file-row{display:grid;grid-template-columns:22px 34px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 13px;border:1px solid #dfe9f1;border-radius:9px;background:#fff}.tax-refund-file-row>span:first-of-type{display:grid;place-items:center;height:26px;border-radius:7px;background:#e7f1ff;color:#1478df;font-weight:900}.tax-refund-append{padding:10px;border:1px dashed #a9c9e8;border-radius:8px;background:#f8fbfd;color:#52708a;text-align:center;cursor:pointer}.tax-refund-append:hover,.tax-refund-append.is-dragging,.tax-refund-upload.is-dragging{border-color:#1478df;background:#eef7ff;color:#1478df}

.file-remove {
  border: 0;
  background: transparent;
  color: #d73c3c;
  font-weight: 800;
  cursor: pointer;
}

.result-actions {
  display: flex;
  gap: 9px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-drop-card {
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.file-title-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #536b80;
  font-size: 13px;
  cursor: pointer;
}

.file-select-all input,
.file-row-select {
  width: 16px;
  height: 16px;
}

.file-import-btn {
  padding: 7px 13px;
  color: #1478df;
}

.file-delete-selected {
  padding: 7px 13px;
  color: #d33d3d;
}

.file-row {
  grid-template-columns: 22px 34px minmax(0, 1fr) auto auto;
}

.file-drop-card.is-dragging {
  border-color: #1478df;
  background: #f0f8ff;
  box-shadow: 0 0 0 3px rgba(20, 120, 223, .12);
}

.file-drop-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 100%;
  min-height: 120px;
  border: 1px dashed #8abbe9;
  border-radius: 10px;
  background: #f8fcff;
  color: #1478df;
  cursor: pointer;
}

.file-drop-empty strong {
  font-size: 16px;
}

.file-drop-empty span {
  color: #72869a;
  font-size: 12px;
}

.file-drop-empty:hover {
  border-color: #1478df;
  background: #eef7ff;
}

.file-drop-hint {
  grid-column: 1 / -1;
  padding: 9px;
  border: 1px dashed #a9c9e8;
  border-radius: 8px;
  color: #52708a;
  text-align: center;
  font-size: 12px;
}

.app,
main,
.content,
.content > *,
.card,
.card-head,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}

.app {
  width: 100%;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

main {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.content {
  width: 100%;
  overflow-x: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.table-wrap table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.table-wrap th,
.table-wrap td {
  min-width: 110px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  min-width: 180px;
}

.table-wrap.invoice-batch-table th:first-child,
.table-wrap.invoice-batch-table td:first-child {
  min-width: 52px;
  width: 52px;
  text-align: center;
}

.table-select-all,
.table-row-select {
  width: 16px;
  height: 16px;
}

.table-wrap::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #edf2f7;
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #edf2f7;
  border-radius: 8px;
  background: #8797a8;
}

.table-wrap.invoice-preview-grid {
  position: relative;
  max-height: min(620px, 62vh);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.invoice-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf3;
  background: #fff;
  color: #627589;
  font-size: 13px;
}

.invoice-preview-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #263b4e;
  font-weight: 800;
}

.invoice-preview-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  min-width: 0;
}

.invoice-preview-card {
  display: grid;
  grid-template-columns: 24px 48px minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: start;
  padding: 16px;
  border: 1px solid #dce7f0;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8fbfe);
  box-shadow: 0 5px 18px rgba(40, 76, 109, .07);
  min-width: 0;
}

.table-wrap.invoice-preview-grid::-webkit-scrollbar {
  width: 11px;
}

.tax-refund-content{display:grid;gap:16px}.tax-refund-content.hidden{display:none}.tax-refund-steps{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr));overflow:hidden;border:1px solid #dce7f0;border-radius:13px;background:#fff}.tax-refund-step{position:relative;display:flex;gap:10px;align-items:center;min-height:72px;padding:13px;border:0;border-right:1px solid #e7eef4;background:#fff;color:#708598;text-align:left;cursor:pointer}.tax-refund-step:last-child{border-right:0}.tax-refund-step>span{display:grid;place-items:center;flex:0 0 28px;height:28px;border:1px solid #bfd0df;border-radius:50%;background:#f6f9fb;font-weight:900}.tax-refund-step b,.tax-refund-step small{display:block}.tax-refund-step b{color:#385267;font-size:13px}.tax-refund-step small{margin-top:3px;line-height:1.35}.tax-refund-step.is-active{background:#edf7ff}.tax-refund-step.is-active>span{border-color:#1478df;background:#1478df;color:#fff}.tax-refund-step.is-complete>span{border-color:#1e9b77;background:#e9f8f2;color:#147b60}.tax-refund-panel{padding:0;overflow:hidden}.tax-refund-panel-head{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 22px;border-bottom:1px solid #e6edf3}.tax-refund-panel-head span{color:#14866b;font-size:11px;font-weight:900;letter-spacing:.1em}.tax-refund-panel-head h3{margin:5px 0 3px;color:#19384e;font-size:20px}.tax-refund-panel-head p{margin:0;color:#72879a;font-size:13px}.tax-refund-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}.tax-refund-body{min-height:310px;max-height:58vh;overflow:auto;background:#fbfdff}.tax-refund-upload{display:grid;place-items:center;gap:10px;min-height:300px;margin:18px;border:1px dashed #8db9dc;border-radius:12px;background:linear-gradient(180deg,#f9fcff,#f1f8fd);text-align:center}.tax-refund-upload strong{color:#1d4b69;font-size:18px}.tax-refund-upload p{margin:0;color:#71889a}.tax-refund-file-list{display:grid;gap:8px;width:min(760px,calc(100% - 36px));margin:0 auto 20px}.tax-refund-file-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 13px;border:1px solid #dfe9f1;border-radius:9px;background:#fff}.tax-refund-file-row>span:first-child{display:grid;place-items:center;height:26px;border-radius:7px;background:#edf5fb;color:#2876ac;font-weight:900}.tax-refund-file-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#344f63}.tax-refund-file-row button{border:0;background:transparent;color:#d34444;font-weight:800;cursor:pointer}.tax-refund-table{width:max-content;min-width:100%;border-collapse:collapse;background:#fff}.tax-refund-table th{position:sticky;top:0;z-index:2;padding:11px 12px;border-bottom:1px solid #d9e4ed;background:#eef5fa;color:#335166;font-size:12px;text-align:left;white-space:nowrap}.tax-refund-table td{max-width:260px;padding:10px 12px;border-bottom:1px solid #edf1f5;color:#536b7d;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tax-refund-table tr:hover td{background:#f7fbfe}.tax-refund-empty{display:grid;place-items:center;min-height:300px;color:#7d91a1}.tax-refund-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 20px;border-top:1px solid #e6edf3;background:#f8fbfd;color:#75899a;font-size:12px}.tax-refund-footer button:disabled{visibility:hidden}@media(max-width:1100px){.tax-refund-steps{grid-template-columns:repeat(3,1fr)}.tax-refund-step:nth-child(3){border-right:0}.tax-refund-step:nth-child(-n+3){border-bottom:1px solid #e7eef4}}@media(max-width:720px){.tax-refund-panel-head{align-items:flex-start;flex-direction:column}.tax-refund-steps{grid-template-columns:1fr 1fr}.tax-refund-step:nth-child(3){border-right:1px solid #e7eef4}.tax-refund-step:nth-child(even){border-right:0}.tax-refund-step:nth-child(-n+4){border-bottom:1px solid #e7eef4}}

.table-wrap.invoice-preview-grid::-webkit-scrollbar-track {
  background: #edf2f7;
}

.table-wrap.invoice-preview-grid::-webkit-scrollbar-thumb {
  border: 2px solid #edf2f7;
  border-radius: 8px;
  background: #8797a8;
}

.invoice-card-check input,
.invoice-preview-toolbar input {
  width: 17px;
  height: 17px;
}

.invoice-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #e9f4ff;
  color: #1478df;
  font-size: 20px;
  font-weight: 900;
}

.invoice-card-main {
  min-width: 0;
}

.invoice-card-main > b {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: #17324a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-card-main p {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 7px;
  margin: 4px 0;
  color: #556c80;
  font-size: 12px;
}

.invoice-card-main p span {
  color: #8a9aa8;
}

.invoice-card-main small {
  display: block;
  margin-top: 9px;
  color: #8292a1;
}

.invoice-card-side {
  display: grid;
  gap: 8px;
  min-width: 104px;
}

.invoice-card-amount {
  align-self: start;
  color: #d04a3a;
  font-size: 18px;
  white-space: nowrap;
}

.invoice-card-side button {
  padding: 7px 10px;
  color: #1478df;
}

.invoice-preview-modal {
  z-index: 1000;
  isolation: isolate;
  padding: 24px;
  background: rgba(16, 30, 43, .72);
}

.invoice-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1500px, 96vw);
  height: min(920px, 94vh);
  border-radius: 14px;
  background: #eef3f7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  overflow: hidden;
}

.invoice-preview-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 20px;
  background: #fff;
  border-bottom: 1px solid #d9e2e9;
}

.invoice-preview-dialog header h2,
.invoice-preview-dialog header p {
  margin: 0;
}

.invoice-preview-dialog header p {
  margin-top: 4px;
  color: #758797;
  font-size: 12px;
}

.invoice-preview-dialog header > div:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-preview-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: #edf2f6;
  color: #344d62;
  font-size: 24px;
  cursor: pointer;
}

.invoice-preview-scroll {
  overflow: auto;
  padding: 24px;
}

#invoicePreviewPaper {
  min-width: 1120px;
}

.invoice-paper {
  position: relative;
  width: 1120px;
  min-height: 720px;
  margin: 0 auto;
  padding: 34px 38px 24px;
  border: 1px solid #7f9db4;
  background: #fff;
  color: #18344d;
  box-shadow: 0 12px 36px rgba(37, 60, 80, .18);
}

.invoice-paper-stamp {
  position: absolute;
  top: 86px;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 4px double rgba(207, 48, 48, .34);
  border-radius: 50%;
  color: rgba(207, 48, 48, .42);
  transform: translateX(-50%) rotate(-12deg);
  pointer-events: none;
}

.invoice-paper-stamp span {
  font-size: 11px;
}

.invoice-paper > header {
  display: grid;
  grid-template-columns: 120px 1fr 250px;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.invoice-paper-qr {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 2px dashed #244a67;
  color: #698096;
  text-align: center;
  font-size: 12px;
}

.invoice-paper-title {
  text-align: center;
}

.invoice-paper-title h3 {
  margin: 0;
  color: #164c72;
  font-family: serif;
  font-size: 27px;
  letter-spacing: 3px;
}

.invoice-paper-title i {
  display: block;
  width: 82%;
  height: 3px;
  margin: 10px auto 0;
  border-top: 1px solid #164c72;
  border-bottom: 1px solid #164c72;
}

.invoice-paper-meta p {
  margin: 7px 0;
  font-size: 13px;
}

.invoice-party {
  display: grid;
  grid-template-columns: 44px 1fr 44px 1fr;
  min-height: 90px;
  border: 1px solid #47708f;
}

.invoice-party > b,
.invoice-remark > b {
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 1px solid #47708f;
  color: #174f78;
  font-size: 12px;
  text-align: center;
}

.invoice-party > div {
  padding: 10px 13px;
  border-right: 1px solid #47708f;
}

.invoice-party > div:last-child {
  border-right: 0;
}

.invoice-party p,
.invoice-remark p {
  margin: 6px 0;
  font-size: 12px;
}

.invoice-lines-wrap {
  width: 100%;
  overflow-x: auto;
}

.invoice-lines {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.invoice-lines th,
.invoice-lines td {
  min-width: 0;
  max-width: none;
  padding: 8px 5px;
  border: 1px solid #47708f;
  border-top: 0;
  color: #25465f;
  text-align: center;
  white-space: normal;
  word-break: break-all;
  font-size: 11px;
}

.invoice-lines th:first-child { width: 20%; }
.invoice-lines th:nth-child(2) { width: 14%; }
.invoice-lines th:nth-child(3) { width: 7%; }
.invoice-lines th:nth-child(4) { width: 9%; }
.invoice-lines th:nth-child(5),
.invoice-lines th:nth-child(6),
.invoice-lines th:nth-child(8) { width: 12%; }
.invoice-lines th:nth-child(7) { width: 14%; }

.invoice-lines tfoot td {
  color: #174f78;
  font-weight: 800;
}

.invoice-total {
  display: grid;
  grid-template-columns: 180px 1fr 260px;
  gap: 16px;
  padding: 13px 20px;
  border: 1px solid #47708f;
  border-top: 0;
  color: #174f78;
  font-size: 13px;
}

.invoice-remark {
  display: grid;
  grid-template-columns: 44px 1fr;
  min-height: 72px;
  border: 1px solid #47708f;
  border-top: 0;
}

.invoice-remark > div {
  padding: 7px 13px;
}

.invoice-paper > footer {
  padding: 15px 10px 0;
  font-size: 12px;
}

@media (max-width: 780px) {
  .invoice-preview-cards { grid-template-columns: 1fr; padding: 10px; }
  .invoice-preview-card { grid-template-columns: 22px 42px minmax(0, 1fr); }
  .invoice-card-amount { grid-column: 3; }
  .invoice-card-side { grid-column: 2 / -1; grid-template-columns: auto auto; justify-content: end; align-items: center; }
  .invoice-preview-modal { padding: 8px; }
  .invoice-preview-dialog { width: 100%; height: 98vh; }
}

.invoice-preview-scroll {
  display: grid;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
  background: #e9edf3;
}

#invoicePreviewPaper {
  min-width: 0;
}

.customs-invoice-preview-paper-wrap {
  position: relative;
  width: calc(var(--invoice-preview-paper-width, 1208px) * var(--invoice-preview-scale, 1));
  min-height: calc(var(--invoice-preview-paper-height, 832px) * var(--invoice-preview-scale, 1));
}

.customs-invoice-paper {
  --invoice-red: #8f1515;
  --invoice-text: #151515;
  position: absolute;
  top: 0;
  left: 0;
  width: 1160px;
  min-width: 1160px;
  min-height: 704px;
  padding: 10px 24px 14px;
  border-radius: 2px;
  background: #fff;
  color: var(--invoice-text);
  box-shadow: 0 18px 48px rgba(22, 34, 54, .18);
  font-family: "FangSong", "SimSun", "Microsoft YaHei", serif;
  font-size: 17px;
  line-height: 1.25;
  transform: scale(var(--invoice-preview-scale, 1));
  transform-origin: top left;
}

.customs-invoice-paper-head {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 292px;
  align-items: start;
  min-height: 112px;
  gap: 16px;
  margin-bottom: 4px;
}

.customs-invoice-qr {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 4px 0 0 2px;
  background: repeating-linear-gradient(45deg, #fff 0 5px, #18222c 5px 8px, #fff 8px 12px);
  color: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  text-shadow: 0 1px 2px #000;
}

.customs-invoice-title-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: 8px;
}

.customs-invoice-title {
  position: relative;
  z-index: 1;
  color: var(--invoice-red);
  font-size: 35px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.customs-invoice-title-rule {
  width: 416px;
  height: 7px;
  margin-top: 13px;
  border-top: 2px solid var(--invoice-red);
  border-bottom: 2px solid var(--invoice-red);
}

.customs-invoice-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 238px;
  height: 136px;
  border: 8px solid rgba(229, 22, 22, .38);
  border-radius: 50%;
  color: rgba(229, 22, 22, .42);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 25px;
  font-weight: 800;
  transform: translate(-50%, -50%) rotate(-5deg);
  pointer-events: none;
}

.customs-invoice-stamp small {
  display: block;
  margin-top: -20px;
  font-size: 15px;
  font-weight: 700;
}

.customs-invoice-meta {
  display: grid;
  gap: 12px;
  justify-self: end;
  padding-top: 22px;
  font-size: 18px;
  white-space: nowrap;
}

.customs-invoice-meta p { margin: 0; }
.customs-invoice-meta b { color: var(--invoice-red); font-weight: 500; }
.customs-invoice-tax-board { border: 1px solid var(--invoice-red); }

.customs-invoice-party-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  min-height: 126px;
  border-bottom: 1px solid var(--invoice-red);
}

.customs-invoice-side-label {
  display: grid;
  place-items: center;
  padding: 8px 0;
  border-right: 1px solid var(--invoice-red);
  color: var(--invoice-red);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  writing-mode: vertical-rl;
}

.customs-invoice-info-block {
  display: grid;
  align-content: space-between;
  min-height: 126px;
  padding: 24px 10px 25px;
  border-right: 1px solid var(--invoice-red);
  overflow: hidden;
}

.customs-invoice-party-row .customs-invoice-info-block:last-child { border-right: 0; }
.customs-invoice-info-block p { display: flex; min-width: 0; margin: 0; gap: 2px; }
.customs-invoice-info-block b { flex: 0 0 auto; color: var(--invoice-red); font-weight: 500; }
.customs-invoice-info-block span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.customs-invoice-lines {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 17px;
}

.customs-invoice-col-name { width: 18%; }
.customs-invoice-col-model { width: 18%; }
.customs-invoice-col-unit { width: 9%; }
.customs-invoice-col-qty { width: 10%; }
.customs-invoice-col-price { width: 15%; }
.customs-invoice-col-amount { width: 13%; }
.customs-invoice-col-tax-rate { width: 9%; }
.customs-invoice-col-tax { width: 8%; }

.customs-invoice-lines th,
.customs-invoice-lines td {
  height: 26px;
  min-width: 0;
  max-width: none;
  padding: 2px 0;
  border: 0;
  color: var(--invoice-text);
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

.customs-invoice-lines th { height: 30px; color: var(--invoice-red); font-weight: 500; text-align: center; }
.customs-invoice-lines td:nth-child(n+3) { text-align: right; }
.customs-invoice-lines tbody { height: 220px; vertical-align: top; }
.customs-invoice-lines tbody tr:first-child td { padding-top: 4px; }
.customs-invoice-lines tfoot td { height: 35px; border-top: 1px solid var(--invoice-red); font-weight: 500; }
.customs-invoice-lines tfoot td:first-child { color: var(--invoice-red); text-align: center; }

.customs-invoice-total {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 345px;
  align-items: center;
  height: 46px;
  min-height: 46px;
  border-top: 1px solid var(--invoice-red);
  overflow: hidden;
}

.customs-invoice-total span,
.customs-invoice-total b {
  height: 100%;
  padding: 11px 14px 0;
  border-right: 1px solid var(--invoice-red);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
}

.customs-invoice-total span:first-child,
.customs-invoice-total span:last-child { color: var(--invoice-red); text-align: center; }
.customs-invoice-total span:last-child { border-right: 0; }

.customs-invoice-remark {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 114px;
  border-top: 1px solid var(--invoice-red);
}

.customs-invoice-remark > div:last-child { padding: 6px 8px; overflow: hidden; }
.customs-invoice-remark p { margin: 0 0 2px; }
.customs-invoice-footer { padding: 14px 0 0 88px; font-size: 18px; }
.customs-invoice-footer b { color: var(--invoice-red); font-weight: 500; }

.invoice-batch-file-list{max-height:min(520px,52vh);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.invoice-batch-file-list::-webkit-scrollbar{width:11px}.invoice-batch-file-list::-webkit-scrollbar-track{background:#edf2f7}.invoice-batch-file-list::-webkit-scrollbar-thumb{border:2px solid #edf2f7;border-radius:8px;background:#8797a8}.invoice-batch-file-list::-webkit-scrollbar-thumb:hover{background:#667b8e}@media(max-height:760px){.invoice-batch-file-list{max-height:340px}}@media(max-width:720px){.invoice-batch-file-list{max-height:46vh}}

.invoice-batch-task-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 18px;align-items:center;padding:16px 20px;overflow:hidden}.invoice-batch-task-card.hidden{display:none}.invoice-batch-task-card b,.invoice-batch-task-card span{display:block}.invoice-batch-task-card b{color:#1b3d54}.invoice-batch-task-card span{margin-top:4px;color:#718698;font-size:12px}.invoice-batch-task-card strong{color:#1478df;font-size:17px}.invoice-batch-task-progress{grid-column:1/-1;height:7px;overflow:hidden;border-radius:5px;background:#e5eef5}.invoice-batch-task-progress i{display:block;width:0;height:100%;border-radius:5px;background:linear-gradient(90deg,#1478df,#45a6ef);transition:width .25s ease}

/* Project editor aligned with tax-office drawer reference. */
.invoice-batch-project-editor>section{inset:4px 0 0 28px}.invoice-batch-project-editor>section>header{min-height:116px;padding:24px 42px}.invoice-batch-project-editor h2{font-size:30px;line-height:1}.invoice-batch-project-editor p{margin-top:12px;font-size:17px}.invoice-batch-project-editor>section>header button{width:58px;height:58px;font-size:30px}.project-editor-body{grid-template-columns:58% 42%}.project-editor-fields{gap:22px;padding:34px 50px}.project-editor-fields>label,.project-editor-grid>label{gap:10px;font-size:17px}.project-editor-fields>label>span,.project-editor-grid>label>span,.project-editor-grid legend{color:#435d70;font-weight:900}.project-editor-fields input,.project-editor-fields select,.project-editor-tax input{min-height:58px;padding:14px 16px;border-color:#a9cbea;border-radius:6px;font-size:17px;font-weight:700}.project-editor-grid{gap:22px 36px}.project-editor-grid fieldset{align-items:flex-start;flex-wrap:wrap;font-size:17px}.project-editor-grid fieldset legend{width:100%}.project-editor-grid input[type=radio]{width:20px;height:20px;min-height:0}.project-editor-tax>header{padding:38px 42px 28px}.project-editor-tax>header>div{gap:14px;margin-bottom:20px}.project-editor-tax b{font-size:25px}.project-editor-tax span{font-size:16px}.project-editor-tax #invoiceBatchTaxCodeResults{display:block;padding:20px 36px 48px}.project-tax-tree-node{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:start;padding-left:calc(var(--tree-depth) * 22px)}.project-tax-tree-toggle{display:grid;place-items:center;width:36px;height:44px;border:0;background:transparent;color:#4b5e6d;font-size:18px;cursor:pointer}.project-tax-tree-toggle:disabled{cursor:default}.project-tax-tree-label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;min-height:44px;padding:9px 8px;border:0;background:transparent;text-align:left;cursor:pointer}.project-tax-tree-label:hover{background:#edf6ff}.project-tax-tree-label b{font-size:18px;color:#193a51}.project-tax-tree-label span{font-size:12px;color:#1478df;font-family:Consolas,monospace}.project-tax-tree-children{grid-column:1/-1}.project-tax-tree-children.hidden{display:none}.invoice-batch-project-editor form>footer{gap:18px;padding:22px 40px}.invoice-batch-project-editor form>footer button{min-height:62px;font-size:21px;font-weight:900}@media(max-width:1100px){.project-editor-fields{padding:28px}.invoice-batch-project-editor>section{inset:4px}.project-editor-body{grid-template-columns:55% 45%}}@media(max-width:780px){.project-editor-body{grid-template-columns:1fr}.project-editor-tax{max-height:42vh}.project-editor-fields{padding:22px}.project-editor-grid{grid-template-columns:1fr}.invoice-batch-project-editor>section>header{padding:20px}.invoice-batch-project-editor h2{font-size:24px}.invoice-batch-project-editor p{font-size:14px}}

.project-category-row{display:grid;grid-template-columns:minmax(0,1fr) 34px 34px;align-items:center;width:calc(100% - 24px);margin:0 12px}.project-category-row>button{height:46px;border:0;background:#fff;color:#29475c;cursor:pointer}.project-category-row>button:first-child{display:flex;align-items:center;justify-content:space-between;padding:0 16px;text-align:left}.project-category-row>button:not(:first-child){color:#7890a2}.project-category-row.active>button{background:#eaf4ff;color:#1478df}.project-category-row i{display:grid;place-items:center;min-width:30px;height:26px;border-radius:14px;background:#e9f2fc;color:#1478df;font-style:normal}

.tax-office-project-page{background:#eef3f7}.tax-office-project-page>header{display:grid;grid-template-columns:50px minmax(0,1fr) auto;align-items:center;gap:14px}.project-page-back{display:grid!important;place-items:center;width:44px!important;height:44px!important;border-radius:7px!important;color:#1478df!important;font-size:26px!important}.project-page-company{padding:10px 18px;border:1px solid #cfe0ef;border-radius:22px;background:#f2f8fc;color:#315c7b;font-weight:800}.project-page-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;min-height:0;padding:24px}.project-category-sidebar{display:flex;flex-direction:column;min-height:0;border:1px solid #dbe5ed;background:#fff}.project-category-title{display:flex;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid #e4ebf1}.project-category-title b{color:#1e3d53;font-size:20px}.project-category-title button{width:44px;height:44px;border:0;border-radius:7px;background:#edf5ff;color:#1478df;font-size:26px;cursor:pointer}.project-category-sidebar>label{display:grid;gap:7px;padding:20px;color:#718597}.project-category-sidebar input,.project-filter-grid input,.project-filter-grid select{padding:12px;border:1px solid #cddce7;border-radius:5px;background:#fff;outline:none}.project-category-all,.project-category-list button{display:flex;align-items:center;justify-content:space-between;width:calc(100% - 24px);margin:0 12px;padding:14px 16px;border:0;background:#fff;color:#29475c;text-align:left;cursor:pointer}.project-category-all.active,.project-category-list button.active{background:#eaf4ff;color:#1478df}.project-category-all i,.project-category-list i{display:grid;place-items:center;min-width:30px;height:26px;border-radius:14px;background:#e9f2fc;color:#1478df;font-style:normal}.project-page-main{display:grid;grid-template-rows:auto minmax(0,1fr);gap:18px;min-width:0;min-height:0}.project-filter-card,.project-table-card{border:1px solid #dbe5ed;border-radius:7px;background:#fff}.project-filter-card>header{display:flex;justify-content:space-between;padding:22px 26px 10px}.project-filter-card>header b{font-size:19px;color:#1d3d53}.project-filter-card>header span{color:#7d8f9d}.project-filter-grid{display:grid;grid-template-columns:minmax(220px,1.8fr) minmax(180px,1.1fr) minmax(180px,1fr) 100px 100px;align-items:end;gap:16px;padding:14px 26px 24px}.project-filter-grid label{display:grid;gap:8px;color:#415d70;font-weight:800}.project-table-card{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;padding:24px}.project-table-actions{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr);gap:12px;margin-bottom:16px}.project-table-wrap{min-height:0;overflow:auto;border:1px solid #dce6ee}.project-table-wrap table{width:max-content;min-width:100%;border-collapse:collapse}.project-table-wrap th{position:sticky;top:0;padding:12px;border-bottom:1px solid #9fc5e6;background:#e8f4ff;color:#23435a;white-space:nowrap}.project-table-wrap td{padding:12px;border-bottom:1px solid #dce7ef;color:#435e71;white-space:nowrap}.project-table-wrap tbody tr:hover td{background:#f5faff}.project-table-wrap td button{border:0;background:transparent;color:#243f53;font-weight:800;cursor:pointer}.project-table-wrap .tax-code-link{color:#1478df}.tax-included-tag{padding:3px 8px;border:1px solid #b9d7f3;border-radius:12px;background:#f1f8ff;color:#1478df}.project-table-card>footer{display:flex;align-items:center;justify-content:space-between;padding-top:18px;color:#748899}.project-table-card>footer div{display:flex;gap:8px;align-items:center}.project-table-card>footer button,.project-table-card>footer b{display:grid;place-items:center;width:38px;height:38px;border:1px solid #cfe0ed;border-radius:6px;background:#fff}.project-table-card>footer b{border-color:#1478df;background:#1478df;color:#fff}.invoice-batch-project-editor{position:fixed;inset:0;z-index:90;background:rgba(16,35,50,.48)}.invoice-batch-project-editor.hidden{display:none}.invoice-batch-project-editor>section{position:absolute;inset:8px 0 0 max(20px,12vw);display:grid;grid-template-rows:auto minmax(0,1fr);background:#fff;box-shadow:-20px 0 60px rgba(10,31,47,.28)}.invoice-batch-project-editor>section>header{display:flex;align-items:center;justify-content:space-between;padding:24px 38px;border-bottom:1px solid #dbe5ed}.invoice-batch-project-editor h2{margin:0;color:#1c3c52;font-size:28px}.invoice-batch-project-editor p{margin:6px 0 0;color:#75899a}.invoice-batch-project-editor>section>header button{width:46px;height:46px;border:1px solid #bcd5e9;border-radius:8px;background:#f2f8fc;color:#1478df;font-size:26px}.invoice-batch-project-editor form{display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0}.project-editor-body{display:grid;grid-template-columns:58% 42%;min-height:0}.project-editor-fields{display:grid;align-content:start;gap:18px;padding:30px 38px;overflow:auto;border-right:1px solid #dce5ec}.project-editor-fields>label{display:grid;gap:8px;color:#415d70;font-weight:800}.project-editor-fields input,.project-editor-fields select,.project-editor-tax input{width:100%;padding:13px 14px;border:1px solid #bad3e7;border-radius:5px;background:#fff;outline:none}.project-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 28px}.project-editor-grid>label{display:grid;gap:8px;color:#415d70;font-weight:800}.project-editor-grid fieldset{display:flex;align-items:center;gap:15px;margin:0;padding:0;border:0;color:#415d70}.project-editor-grid legend{margin-bottom:9px;font-weight:800}.project-editor-grid fieldset label{display:inline-flex;align-items:center;gap:6px}.project-editor-tax{min-width:0;overflow:auto;background:#fbfdff}.project-editor-tax>header{position:sticky;top:0;z-index:2;padding:30px 36px;border-bottom:1px solid #dce5ec;background:#fff}.project-editor-tax>header>div{display:flex;align-items:baseline;gap:10px;margin-bottom:16px}.project-editor-tax b{color:#1d3d53;font-size:22px}.project-editor-tax span{color:#778b9b}.project-editor-tax #invoiceBatchTaxCodeResults{display:grid;gap:8px;padding:18px 28px}.project-editor-tax #invoiceBatchTaxCodeResults button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:13px;border:1px solid #dce6ee;border-radius:7px;background:#fff;text-align:left}.project-editor-tax #invoiceBatchTaxCodeResults button:hover{border-color:#6eabe0;background:#f2f9ff}.project-editor-tax #invoiceBatchTaxCodeResults b{font-size:14px}.project-editor-tax #invoiceBatchTaxCodeResults span{color:#1478df;font-family:Consolas,monospace}.project-editor-tax #invoiceBatchTaxCodeResults small{grid-column:1/-1;color:#7d8f9d}.invoice-batch-project-editor form>footer{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:22px 38px;border-top:1px solid #dbe5ed;background:#fff}.invoice-batch-project-editor form>footer button{min-height:52px;font-size:18px}@media(max-width:1000px){.project-page-layout{grid-template-columns:230px minmax(0,1fr);gap:12px;padding:12px}.project-filter-grid{grid-template-columns:1fr 1fr}.project-editor-body{grid-template-columns:1fr}.project-editor-tax{max-height:42vh}.invoice-batch-project-editor>section{inset:4px}.project-editor-fields{border-right:0;border-bottom:1px solid #dce5ec}}@media(max-width:720px){.project-page-layout{grid-template-columns:1fr}.project-category-sidebar{max-height:260px}.project-filter-grid{grid-template-columns:1fr}.project-table-actions{grid-template-columns:1fr}.project-editor-grid{grid-template-columns:1fr}}

.invoice-batch-content{display:grid;gap:16px}.invoice-batch-content.hidden{display:none}.invoice-batch-overview{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 24px;background:linear-gradient(120deg,#f8fcff,#eef6fb)}.invoice-batch-overview>div>span{color:#14866b;font-size:11px;font-weight:900;letter-spacing:.12em}.invoice-batch-overview h2{margin:5px 0;color:#17384f;font-size:23px}.invoice-batch-overview p{margin:0;color:#718698}.invoice-batch-overview-actions{display:flex;align-items:center;gap:16px}.invoice-batch-overview-actions>div{text-align:right}.invoice-batch-overview-actions strong,.invoice-batch-overview-actions span{display:block}.invoice-batch-overview-actions strong{color:#1478df;font-size:24px}.invoice-batch-overview-actions span{color:#74899a;font-size:12px}.invoice-batch-file-card,.invoice-batch-preview-card{padding:0;overflow:hidden}.invoice-batch-file-card>header,.invoice-batch-preview-card>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid #e3ebf2}.invoice-batch-file-card header>div,.invoice-batch-preview-card header>div{display:flex;align-items:center;gap:12px}.invoice-batch-file-card header>div:last-child{flex-wrap:wrap;justify-content:flex-end}.invoice-batch-file-card header b,.invoice-batch-preview-card header b{color:#1b3d54;font-size:17px}.invoice-batch-file-card header span,.invoice-batch-preview-card header span{color:#75899a;font-size:12px}.invoice-batch-file-card header label{display:inline-flex;align-items:center;gap:6px;color:#536b80;font-size:13px}.invoice-batch-file-list{display:grid;gap:8px;min-height:128px;padding:14px 18px 20px;background:#fbfdff}.invoice-batch-file-list.is-dragging{background:#eef7ff}.invoice-batch-drop-empty{display:grid;place-items:center;gap:7px;min-height:118px;border:1px dashed #8abbe9;border-radius:10px;background:#f8fcff;color:#1478df;cursor:pointer}.invoice-batch-drop-empty b{font-size:16px}.invoice-batch-drop-empty span{color:#72869a;font-size:12px}.invoice-batch-file-row{display:grid;grid-template-columns:22px 34px minmax(0,1fr) auto 54px;align-items:center;gap:10px;padding:10px 12px;border:1px solid #dfe9f1;border-radius:9px;background:#fff}.invoice-batch-file-row>span{display:grid;place-items:center;height:26px;border-radius:7px;background:#e7f1ff;color:#1478df;font-weight:900}.invoice-batch-file-row b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#344f63}.invoice-batch-file-row small{color:#7a8d9d}.invoice-batch-file-row button{border:0;background:transparent;color:#d34444;font-weight:800;cursor:pointer}.invoice-batch-append{padding:10px;border:1px dashed #a9c9e8;border-radius:8px;background:#f8fbfd;color:#52708a;cursor:pointer}.invoice-batch-preview{max-height:54vh;overflow:auto;background:#fff}.invoice-batch-preview table{width:max-content;min-width:100%;border-collapse:collapse}.invoice-batch-preview th{position:sticky;top:0;z-index:2;padding:10px 12px;border:1px solid #dce6ee;background:#edf5fa;color:#315066;font-size:12px;white-space:nowrap}.invoice-batch-preview td{max-width:260px;padding:9px 12px;border:1px solid #e4ebf1;color:#536b7d;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.invoice-batch-preview tr:hover td{background:#f7fbfe}.invoice-batch-projects-drawer{position:fixed;inset:0;z-index:80;padding:18px;background:rgba(15,38,56,.4);backdrop-filter:blur(4px)}.invoice-batch-projects-drawer.hidden{display:none}.invoice-batch-projects-shell{display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;overflow:hidden;border:1px solid #d6e2eb;border-radius:16px;background:#f5f9fc;box-shadow:0 28px 80px rgba(14,40,59,.28)}.invoice-batch-projects-shell>header{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #dce6ee;background:#fff}.invoice-batch-projects-shell>header span{color:#16806a;font-size:10px;font-weight:900;letter-spacing:.15em}.invoice-batch-projects-shell>header h2{margin:4px 0;color:#17384f}.invoice-batch-projects-shell>header p{margin:0;color:#718698;font-size:12px}.invoice-batch-projects-shell>header button{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:50%;background:#eef4f8;color:#3c576b;font-size:25px;cursor:pointer}.invoice-batch-projects-layout{display:grid;grid-template-columns:minmax(260px,24%) minmax(360px,32%) minmax(420px,44%);min-height:0}.invoice-batch-projects-layout>aside,.invoice-batch-project-form,.invoice-batch-tax-browser{min-width:0;overflow:auto;border-right:1px solid #dce6ee;background:#fff}.invoice-batch-project-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:16px;border-bottom:1px solid #e2eaf0}.invoice-batch-project-search input,.invoice-batch-project-form input,.invoice-batch-tax-browser input{width:100%;padding:10px 12px;border:1px solid #ccdbe6;border-radius:8px;background:#fff;color:#29465a;outline:none}.invoice-batch-project-list{display:grid;gap:8px;padding:12px}.invoice-batch-project-list>button{display:grid;gap:4px;padding:13px;border:1px solid #dce6ee;border-radius:10px;background:#fff;text-align:left;cursor:pointer}.invoice-batch-project-list>button:hover{border-color:#79afe0;background:#f4faff}.invoice-batch-project-list b{color:#29475c}.invoice-batch-project-list span{color:#60798b;font-size:12px}.invoice-batch-project-list small{color:#8a9aa7}.invoice-batch-project-form{display:grid;align-content:start;gap:15px;padding:22px}.invoice-batch-form-title{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px;border-bottom:1px solid #e3ebf1}.invoice-batch-form-title span{color:#16806a;font-size:11px;font-weight:900}.invoice-batch-form-title h3{margin:4px 0 0;color:#1c3b51;font-size:20px}.invoice-batch-project-form label{display:grid;gap:6px;color:#536b7d;font-size:13px}.invoice-batch-project-form label>span{font-weight:800}.invoice-batch-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.invoice-batch-project-form footer{display:flex;justify-content:flex-end;gap:9px;padding-top:8px}.danger-link{border:0;background:transparent;color:#d23d3d;font-weight:800;cursor:pointer}.invoice-batch-tax-browser{border-right:0}.invoice-batch-tax-browser>header{position:sticky;top:0;z-index:2;display:grid;gap:10px;padding:16px;border-bottom:1px solid #e2eaf0;background:#fff}.invoice-batch-tax-browser b{color:#1e4057}.invoice-batch-tax-code-results{display:grid;gap:8px;padding:12px}.invoice-batch-tax-code-results>button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px;border:1px solid #dde7ee;border-radius:9px;background:#fff;text-align:left;cursor:pointer}.invoice-batch-tax-code-results>button:hover{border-color:#69a8df;background:#f3f9fe}.invoice-batch-tax-code-results b{color:#29495f}.invoice-batch-tax-code-results span{color:#1478df;font-family:Consolas,monospace;font-size:12px}.invoice-batch-tax-code-results small{grid-column:1/-1;color:#7a8e9e}@media(max-width:1050px){.invoice-batch-projects-layout{grid-template-columns:280px minmax(340px,1fr)}.invoice-batch-tax-browser{grid-column:1/-1;max-height:38vh;border-top:1px solid #dce6ee}.invoice-batch-projects-drawer{padding:8px}}@media(max-width:720px){.invoice-batch-overview,.invoice-batch-file-card>header,.invoice-batch-preview-card>header{align-items:flex-start;flex-direction:column}.invoice-batch-overview-actions{width:100%;justify-content:space-between}.invoice-batch-projects-layout{grid-template-columns:1fr}.invoice-batch-projects-layout>aside,.invoice-batch-project-form,.invoice-batch-tax-browser{max-height:none;border-right:0;border-bottom:1px solid #dce6ee}.invoice-batch-form-grid{grid-template-columns:1fr}}

/* Tax refund file manager: final overrides must stay after legacy compact rules. */
.tax-refund-body:has(.tax-refund-file-toolbar){overflow-y:auto}.tax-refund-file-toolbar{display:flex;align-items:center;gap:12px;width:100%;padding:16px 20px;border-bottom:1px solid #e3ebf2;background:#fff}.tax-refund-file-toolbar>div{margin-right:auto}.tax-refund-file-toolbar b,.tax-refund-file-toolbar span{display:block}.tax-refund-file-toolbar b{color:#1b3d54;font-size:17px}.tax-refund-file-toolbar span{margin-top:3px;color:#74899a;font-size:12px}.tax-refund-file-toolbar label{display:inline-flex;align-items:center;gap:6px;color:#536b80;font-size:13px;cursor:pointer}.tax-refund-file-toolbar input,.tax-refund-file-row input{width:16px;height:16px;flex:0 0 auto}.tax-refund-file-list{display:grid;gap:8px;width:100%;max-width:none;margin:0;padding:14px 18px 20px}.tax-refund-file-row{display:grid;grid-template-columns:22px 34px minmax(0,1fr) 56px;align-items:center;gap:10px;width:100%;padding:11px 13px;border:1px solid #dfe9f1;border-radius:9px;background:#fff}.tax-refund-file-row>span:first-of-type{display:grid;place-items:center;width:34px;height:26px;border-radius:7px;background:#e7f1ff;color:#1478df;font-weight:900}.tax-refund-file-row b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#344f63}.tax-refund-file-row button{width:56px;white-space:nowrap;text-align:center}.tax-refund-append{width:100%;padding:10px;border:1px dashed #a9c9e8;border-radius:8px;background:#f8fbfd;color:#52708a;text-align:center;cursor:pointer}.tax-refund-append:hover,.tax-refund-append.is-dragging{border-color:#1478df;background:#eef7ff;color:#1478df}@media(max-width:720px){.tax-refund-file-toolbar{align-items:flex-start;flex-wrap:wrap}.tax-refund-file-toolbar>div{width:100%}.tax-refund-file-row{grid-template-columns:22px 30px minmax(0,1fr) 48px;padding:10px}.tax-refund-file-row button{width:48px}}

/* Final invoice-batch file scrolling override. */
.invoice-batch-file-list{max-height:310px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.invoice-batch-file-list::-webkit-scrollbar{width:11px}.invoice-batch-file-list::-webkit-scrollbar-track{background:#edf2f7}.invoice-batch-file-list::-webkit-scrollbar-thumb{border:2px solid #edf2f7;border-radius:8px;background:#8797a8}.invoice-batch-file-list::-webkit-scrollbar-thumb:hover{background:#667b8e}@media(max-height:760px){.invoice-batch-file-list{max-height:270px}}@media(max-width:720px){.invoice-batch-file-list{max-height:280px}}

/* Tax-refund file steps share invoice-batch file manager layout. */
.tax-refund-panel.tax-refund-file-step>.tax-refund-panel-head,.tax-refund-panel.tax-refund-file-step>.tax-refund-footer{display:none}.tax-refund-panel.tax-refund-file-step .tax-refund-body{min-height:0;max-height:none;overflow:hidden;background:#fff}.tax-refund-file-toolbar{display:flex;align-items:center;gap:12px;width:100%;padding:16px 20px;border-bottom:1px solid #e3ebf2;background:#fff}.tax-refund-file-toolbar>div{display:flex;align-items:center;gap:12px;margin-right:auto}.tax-refund-file-toolbar b{font-size:17px}.tax-refund-file-toolbar span{margin:0}.tax-refund-file-toolbar label{white-space:nowrap}.tax-refund-file-toolbar button{white-space:nowrap}.tax-refund-file-list{display:grid;gap:8px;width:100%;max-width:none;max-height:310px;margin:0;padding:14px 18px 20px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#fbfdff}.tax-refund-file-row{display:grid;grid-template-columns:22px 34px minmax(0,1fr) auto 56px;align-items:center;gap:10px;width:100%;padding:10px 12px}.tax-refund-file-row small{color:#7a8d9d;white-space:nowrap}.tax-refund-file-list::-webkit-scrollbar{width:11px}.tax-refund-file-list::-webkit-scrollbar-track{background:#edf2f7}.tax-refund-file-list::-webkit-scrollbar-thumb{border:2px solid #edf2f7;border-radius:8px;background:#8797a8}.tax-refund-file-list::-webkit-scrollbar-thumb:hover{background:#667b8e}@media(max-height:760px){.tax-refund-file-list{max-height:270px}}@media(max-width:720px){.tax-refund-file-toolbar{align-items:flex-start;flex-wrap:wrap}.tax-refund-file-toolbar>div{width:100%}.tax-refund-file-list{max-height:280px}.tax-refund-file-row{grid-template-columns:22px 30px minmax(0,1fr) 48px}.tax-refund-file-row small{display:none}}

/* Expanded tax-refund workspace after files are uploaded. */
.tax-refund-content{min-height:calc(100vh - 126px)}.tax-refund-steps{min-height:82px;border-radius:15px;box-shadow:0 7px 24px rgba(35,75,105,.07)}.tax-refund-step{min-height:82px;padding:16px 18px}.tax-refund-step>span{flex-basis:32px;height:32px}.tax-refund-step b{font-size:14px}.tax-refund-step small{font-size:12px}.tax-refund-panel.tax-refund-file-step{border-radius:15px;box-shadow:0 10px 30px rgba(35,75,105,.08)}.tax-refund-file-toolbar{min-height:74px;padding:18px 24px}.tax-refund-file-toolbar b{font-size:19px}.tax-refund-file-toolbar span{font-size:13px}.tax-refund-file-toolbar button{min-height:42px;padding:0 18px}.tax-refund-file-row{min-height:54px;padding:12px 16px;border-radius:10px}.tax-refund-file-row b{font-size:15px}.tax-refund-panel.tax-refund-file-step.tax-refund-has-files{height:100%;min-height:0}.tax-refund-panel.tax-refund-file-step.tax-refund-has-files .tax-refund-body{height:100%}.tax-refund-panel.tax-refund-file-step.tax-refund-has-files .tax-refund-file-list{height:calc(100% - 74px);max-height:none;align-content:start;padding:16px 20px 24px}.tax-refund-panel.tax-refund-file-step:not(.tax-refund-has-files) .tax-refund-file-list{min-height:78px;max-height:none}.tax-refund-empty-import{min-height:58px;font-size:14px}@media(max-height:800px){.tax-refund-panel.tax-refund-file-step.tax-refund-has-files{height:100%;min-height:0}}@media(max-width:720px){.tax-refund-content{min-height:auto}.tax-refund-panel.tax-refund-file-step.tax-refund-has-files{height:calc(100vh - 260px);min-height:380px}.tax-refund-file-toolbar{min-height:0;padding:15px}.tax-refund-panel.tax-refund-file-step.tax-refund-has-files .tax-refund-file-list{height:calc(100% - 120px)}}

/* Keep top workflow navigation at original compact size. */
body.tax-refund-active{height:100vh;overflow:hidden}body.tax-refund-active .app{height:100vh;min-height:0}body.tax-refund-active main{display:grid;height:100vh;min-height:0;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.tax-refund-content{height:100%;min-height:0;padding:10px 12px;grid-template-rows:72px minmax(0,1fr);align-content:stretch;gap:8px;overflow:hidden}.tax-refund-steps{height:72px;min-height:72px;border-radius:13px;box-shadow:none}.tax-refund-step{height:72px;min-height:72px;padding:13px}.tax-refund-step>span{flex-basis:28px;height:28px}.tax-refund-step b{font-size:13px}.tax-refund-step small{font-size:11px}

/* Tax-refund file-step heading. */
.tax-refund-file-toolbar>.tax-refund-file-heading{display:grid;grid-template-columns:auto auto;align-items:end;gap:5px 12px}.tax-refund-file-heading>em{grid-column:1/-1;color:#138568;font-size:13px;font-style:normal;font-weight:900}.tax-refund-file-heading>div{display:flex;align-items:baseline;gap:12px}.tax-refund-file-heading>small{grid-column:1/-1;color:#74899a;font-size:12px}.tax-refund-file-heading b{font-size:19px}.tax-refund-file-heading span{font-size:13px}

/* Keep every tax-refund step header same height. */
.tax-refund-panel-head,.tax-refund-file-toolbar{height:auto;min-height:0;padding:16px 22px}.tax-refund-panel.tax-refund-file-step.tax-refund-has-files .tax-refund-file-list{height:calc(100% - 110px)}

/* Legacy-style invoice project editor. */
.invoice-batch-project-editor{padding:14px 34px 0;background:rgba(25,48,64,.48)}
.invoice-batch-project-editor>section{position:static;width:100%;height:calc(100vh - 14px);display:grid;grid-template-rows:150px minmax(0,1fr);overflow:hidden;border:1px solid #d2dee7;border-radius:0 14px 0 0;background:#fff;box-shadow:0 24px 70px rgba(10,31,47,.28)}
.invoice-batch-project-editor>section>header{padding:34px 60px;border-bottom:1px solid #d7e2ea;background:#fff}
.invoice-batch-project-editor h2{font-size:34px;line-height:1.1}
.invoice-batch-project-editor p{margin-top:8px;font-size:18px}
.invoice-batch-project-editor>section>header button{width:56px;height:56px;border-color:#a9cceb;border-radius:10px;background:#f4faff;font-size:30px;cursor:pointer}
.invoice-batch-project-editor form{grid-template-rows:minmax(0,1fr) 104px;min-height:0}
.project-editor-body{grid-template-columns:58% 42%;min-height:0;overflow:hidden}
.project-editor-fields{display:block;padding:32px 60px 40px;overflow-y:auto;overscroll-behavior:contain;border-right:1px solid #d7e2ea;background:#fff}
.project-editor-fields>label{display:grid;gap:10px;margin-bottom:24px;font-size:18px}
.project-editor-fields>label>span,.project-editor-grid label>span,.project-editor-grid legend{color:#35546a;font-size:18px;font-weight:800}
.project-editor-fields input,.project-editor-fields select,.project-editor-tax input{height:58px;padding:0 18px;border:1px solid #9dc7ea;border-radius:6px;color:#243f53;font-size:18px}
.project-editor-fields input::placeholder,.project-editor-tax input::placeholder{color:#8a8f94;font-weight:700}
.project-editor-grid{grid-template-columns:1fr 1fr;gap:24px 34px}
.project-editor-grid>label{gap:10px}
.project-editor-grid fieldset{min-height:88px;align-content:start;flex-wrap:wrap;gap:18px 24px}
.project-editor-grid legend{width:100%;margin-bottom:10px}
.project-editor-grid fieldset label{gap:8px;font-size:17px}
.project-editor-grid fieldset input{width:22px;height:22px;padding:0}
.project-editor-tax{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;overflow:hidden;background:#fbfdff}
.project-editor-tax>header{position:relative;padding:34px 40px 24px;border-bottom:1px solid #d7e2ea;background:#fff}
.project-editor-tax>header>div{margin-bottom:18px}
.project-editor-tax b{font-size:25px}
.project-editor-tax span{font-size:16px}
.project-editor-tax #invoiceBatchTaxCodeResults{align-content:start;gap:10px;padding:22px 36px 36px;overflow-y:auto;overscroll-behavior:contain}
.project-editor-tax #invoiceBatchTaxCodeResults button{min-height:58px;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;padding:10px 16px;border-color:#cbdce9;border-radius:7px}
.project-editor-tax #invoiceBatchTaxCodeResults button::before{content:'▶';display:grid;place-items:center;width:34px;height:34px;border:1px solid #c5d9e8;border-radius:6px;color:#41677f;font-size:15px}
.project-editor-tax #invoiceBatchTaxCodeResults b{font-size:17px}
.project-editor-tax #invoiceBatchTaxCodeResults span{font-size:14px}
.project-editor-tax #invoiceBatchTaxCodeResults small{grid-column:2/-1}
.invoice-batch-project-editor form>footer{grid-template-columns:1fr 1fr;gap:20px;padding:20px 60px;border-top:1px solid #d7e2ea;background:#fff}
.invoice-batch-project-editor form>footer button{min-height:62px;border-radius:8px;font-size:21px}
@media(max-width:1000px){.invoice-batch-project-editor{padding:4px}.invoice-batch-project-editor>section{height:calc(100vh - 4px);grid-template-rows:120px minmax(0,1fr)}.invoice-batch-project-editor>section>header{padding:24px}.project-editor-body{grid-template-columns:1fr}.project-editor-fields{padding:24px;border-right:0;border-bottom:1px solid #d7e2ea}.project-editor-tax{max-height:42vh}.invoice-batch-project-editor form>footer{padding:16px 24px}}
@media(max-width:720px){.invoice-batch-project-editor>section{grid-template-rows:108px minmax(0,1fr)}.invoice-batch-project-editor h2{font-size:26px}.invoice-batch-project-editor p{font-size:13px}.project-editor-grid{grid-template-columns:1fr}.invoice-batch-project-editor form>footer{gap:10px;padding:12px}.invoice-batch-project-editor form>footer button{min-height:50px;font-size:17px}}.project-editor-fields::-webkit-scrollbar,.project-editor-tax #invoiceBatchTaxCodeResults::-webkit-scrollbar{width:11px}.project-editor-fields::-webkit-scrollbar-track,.project-editor-tax #invoiceBatchTaxCodeResults::-webkit-scrollbar-track{background:#edf2f6}.project-editor-fields::-webkit-scrollbar-thumb,.project-editor-tax #invoiceBatchTaxCodeResults::-webkit-scrollbar-thumb{border:2px solid #edf2f6;border-radius:8px;background:#8b9298}.project-editor-fields select{appearance:auto}.invoice-batch-project-editor form>footer .primary{border-color:#1478df;background:#1478df;color:#fff}.invoice-batch-project-editor form>footer .ghost{border-color:#c8d9e6;background:#fff;color:#17384f}
/* Exact legacy invoice-project editor layout. */
.invoice-batch-project-editor{padding:3px 16px 0;background:rgba(27,48,63,.46)}
.invoice-batch-project-editor>section{height:calc(100vh - 3px);grid-template-rows:132px minmax(0,1fr);border-radius:0;background:#fff}
.invoice-batch-project-editor>section>header{padding:26px 42px}
.invoice-batch-project-editor h2{font-size:30px;line-height:1}
.invoice-batch-project-editor p{margin-top:9px;font-size:17px}
.invoice-batch-project-editor>section>header button{width:48px;height:48px;border-radius:8px;font-size:27px}
.invoice-batch-project-editor form{grid-template-rows:minmax(0,1fr) 94px}
.project-editor-body{grid-template-columns:56% 44%}
.project-editor-fields{padding:32px 52px 46px}
.project-editor-fields>label{gap:8px;margin-bottom:18px;font-size:16px}
.project-editor-fields>label>span,.project-editor-grid label>span,.project-editor-grid legend{font-size:16px}
.project-editor-fields input,.project-editor-fields select,.project-editor-tax input{height:52px;padding:0 14px;border-color:#8fc2ed;border-radius:5px;font-size:17px}
.project-editor-grid{grid-template-columns:1fr 1fr;gap:20px 28px;margin-top:2px}
.project-editor-grid fieldset{min-height:70px;gap:14px 18px}
.project-editor-grid legend{margin-bottom:8px}
.project-editor-grid fieldset label{font-size:16px}
.project-editor-grid fieldset input{width:20px;height:20px}
.project-editor-tax{background:#f8fbfd}
.project-editor-tax>header{padding:32px 42px 26px}
.project-editor-tax>header>div{gap:12px;margin-bottom:18px}
.project-editor-tax b{font-size:23px}
.project-editor-tax span{font-size:15px}
.project-editor-tax #invoiceBatchTaxCodeResults{display:block;padding:20px 32px 38px;background:#fff}
.project-tax-tree-node{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:start;margin:0;padding-left:calc(var(--tree-depth) * 22px)}
.project-tax-tree-toggle{display:grid;place-items:center;width:30px;height:42px;padding:0;border:0;background:transparent;color:#566576;font-size:20px;cursor:pointer}
.project-tax-tree-toggle:disabled{opacity:.45;cursor:default}
.project-tax-tree-label{display:flex!important;align-items:center;justify-content:space-between;gap:18px;min-height:42px!important;padding:5px 4px!important;border:0!important;border-radius:0!important;background:transparent!important;text-align:left;cursor:pointer}
.project-tax-tree-label::before{display:none!important;content:none!important}
.project-tax-tree-label:hover{color:#1478df;background:transparent!important}
.project-tax-tree-label b{font-size:17px!important;color:#1d2f3f}
.project-tax-tree-label span{font-size:13px!important;color:#1478df;font-family:Consolas,monospace}
.project-tax-tree-label small{display:none}
.project-tax-tree-children{grid-column:1/-1}
.invoice-batch-project-editor form>footer{gap:16px;padding:18px 42px}
.invoice-batch-project-editor form>footer button{min-height:58px;border-radius:5px;font-size:20px}
@media(max-width:1000px){.invoice-batch-project-editor{padding:3px}.invoice-batch-project-editor>section{height:calc(100vh - 3px)}.invoice-batch-project-editor>section>header{padding:22px 26px}.project-editor-fields{padding:24px 28px}.project-editor-tax>header{padding:24px 28px}.project-editor-tax #invoiceBatchTaxCodeResults{padding:18px 24px}.invoice-batch-project-editor form>footer{padding:14px 28px}}.project-editor-fields>label>span::first-letter{color:#e33d4f}.project-editor-fields input:focus,.project-editor-fields select:focus,.project-editor-tax input:focus{border-color:#1478df;outline:2px solid rgba(20,120,223,.35);outline-offset:2px}.project-editor-tax #invoiceBatchTaxCodeResults:empty::before{content:'暂无编码数据';display:block;padding:20px;color:#8797a5}.project-editor-tax #invoiceBatchTaxCodeResults{min-height:100%;border-top:0}.invoice-batch-project-editor form>footer{background:#fff}
/* Legacy drawer occupies 10/16 viewport; background keeps 6/16. */
.invoice-batch-project-editor{padding:3px 0 0;background:rgba(27,48,63,.46)}
.invoice-batch-project-editor>section{position:absolute;inset:3px 0 0 37.5%;width:62.5%;height:calc(100vh - 3px);border-left:1px solid #cbd9e3;box-shadow:-18px 0 48px rgba(10,31,47,.24)}
.invoice-batch-project-editor>section>header{padding:24px 28px}
.project-editor-body{grid-template-columns:60% 40%}
.project-editor-fields{padding:28px 32px 40px}
.project-editor-tax>header{padding:28px 28px 24px}
.project-editor-tax #invoiceBatchTaxCodeResults{padding:18px 24px 34px}
.invoice-batch-project-editor form>footer{padding:16px 28px}
@media(max-width:1200px){.invoice-batch-project-editor>section{left:24%;width:76%}.project-editor-body{grid-template-columns:58% 42%}}
@media(max-width:780px){.invoice-batch-project-editor>section{left:0;width:100%}}
/* Exact values ported from python_app/web/css/tools.css. */
.invoice-batch-project-editor{display:flex;align-items:stretch;justify-content:flex-end;padding:0;background:rgba(8,16,28,.55)}
.invoice-batch-project-editor>section{position:relative;inset:auto;width:min(980px,62vw);min-width:min(760px,100vw);height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);border:0;border-left:1px solid #dde5ef;border-radius:0;background:#fff;box-shadow:-18px 0 46px rgba(13,31,55,.2)}
.invoice-batch-project-editor>section>header{min-height:72px;padding:0 22px;border-bottom:1px solid #e4eaf2}
.invoice-batch-project-editor h2{margin:0;color:#22334a;font-size:18px;line-height:normal}
.invoice-batch-project-editor p{margin:5px 0 0;color:#7c899a;font-size:12px}
.invoice-batch-project-editor>section>header button{width:36px;height:36px;border:1px solid #c6dcf6;border-radius:4px;background:#fbfdff;color:#1769c2;font-size:22px}
.invoice-batch-project-editor form{grid-template-rows:minmax(0,1fr) auto}
.project-editor-body{grid-template-columns:minmax(0,1.12fr) minmax(320px,.88fr);gap:0;overflow:hidden}
.project-editor-fields{display:grid;align-content:start;gap:14px;padding:22px 28px 26px;overflow:auto;border-right:1px solid #edf1f6}
.project-editor-fields>label{gap:6px;margin:0;color:#536277;font-size:13px;font-weight:700}
.project-editor-fields>label>span,.project-editor-grid label>span,.project-editor-grid legend{color:#405267;font-size:13px;font-weight:700;line-height:1.3}
.project-editor-fields input,.project-editor-fields select,.project-editor-tax input{height:36px;min-height:36px;padding:0 10px;border:1px solid #d9e2ec;border-radius:3px;background:#fff;color:#26384d;font-size:13px;font-weight:400;box-shadow:none}
.project-editor-fields input:focus,.project-editor-fields select:focus,.project-editor-tax input:focus{border-color:#2b8bf2;outline:0;box-shadow:0 0 0 2px rgba(43,139,242,.14)}
.project-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px;margin:0;align-items:end}
.project-editor-grid>label{gap:6px;color:#536277;font-size:13px;font-weight:700}
.project-editor-grid fieldset{min-height:0;display:grid;gap:8px;margin:0;padding:0;border:0;color:#536277;font-size:13px;font-weight:700}
.project-editor-grid legend{width:auto;margin:0}
.project-editor-grid fieldset label{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;padding:0;color:#344963;font-size:13px;font-weight:400;line-height:1;white-space:nowrap}
.project-editor-grid fieldset input{width:15px;height:15px;min-height:0;margin:0;padding:0;accent-color:#1f7fe8}
.project-editor-tax{grid-template-rows:auto minmax(0,1fr);border-left:0;background:#f7f9fc}
.project-editor-tax>header{position:relative;padding:20px 24px 18px;border-bottom:1px solid #e6ebf2;background:#fff}
.project-editor-tax>header>div{display:flex;align-items:baseline;gap:8px;margin-bottom:12px}
.project-editor-tax b{color:#22334a;font-size:18px}
.project-editor-tax span{color:#7c899a;font-size:12px}
.project-editor-tax #invoiceBatchTaxCodeResults{display:block;min-height:0;height:100%;padding:12px 16px 18px;overflow:auto;background:#fff}
.project-tax-tree-node{position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;margin:0;padding-left:calc(var(--tree-depth) * 10px)}
.project-tax-tree-toggle{width:24px;height:32px;display:grid;place-items:center;padding:0;border:0;background:transparent;color:#4e5867;font-size:14px}
.project-tax-tree-label{width:100%;min-height:32px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;margin:0;padding:4px 6px!important;border:0!important;border-radius:4px!important;background:#fff!important;box-shadow:none;text-align:left}
.project-tax-tree-label::before{display:none!important;content:none!important}
.project-tax-tree-label:hover{background:#f7f9fc!important}
.project-tax-tree-label b{color:#26303d;font-size:13px!important;font-weight:700;line-height:1.2}
.project-tax-tree-label span{color:#1769c2;font-size:12px!important;font-family:Consolas,monospace}
.project-tax-tree-children{grid-column:1/-1;margin-top:3px}
.invoice-batch-project-editor form>footer{display:flex;align-items:center;gap:10px;padding:16px 22px;border-top:1px solid #e4eaf2;background:#fff}
.invoice-batch-project-editor form>footer button{flex:1;min-height:34px;height:34px;border-radius:4px;font-size:14px;font-weight:800}
@media(max-width:1100px){.invoice-batch-project-editor>section{width:100vw;min-width:0;height:100%}.project-editor-grid{grid-template-columns:minmax(0,1fr)}.project-editor-fields{border-right:0;border-bottom:1px solid #edf1f6}.project-editor-body{grid-template-columns:1fr}.project-editor-tax{max-height:42vh}}.project-editor-unit-control{min-height:36px;display:grid;grid-template-columns:minmax(0,1fr) 36px;border:1px solid #d9e2ec;border-radius:3px;background:#fff;overflow:hidden}.project-editor-unit-control:focus-within{border-color:#2b8bf2;box-shadow:0 0 0 2px rgba(43,139,242,.14)}.project-editor-fields .project-editor-unit-control input{height:34px;min-height:34px;border:0;border-radius:0;box-shadow:none}.project-editor-unit-control button{width:36px;min-height:34px;display:grid;place-items:center;border:0;border-left:1px solid #e4eaf2;background:#f9fbfe}.project-editor-unit-control i{width:9px;height:9px;border-right:2px solid #42566f;border-bottom:2px solid #42566f;transform:translateY(-2px) rotate(45deg)}
/* Remove legacy broad button rules from tax tree controls. */
.project-editor-tax #invoiceBatchTaxCodeResults .project-tax-tree-toggle{display:grid!important;grid-template-columns:none!important;place-items:center!important;width:24px!important;min-width:24px!important;height:32px!important;min-height:32px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#4e5867!important;font-size:14px!important;line-height:1!important}
.project-editor-tax #invoiceBatchTaxCodeResults .project-tax-tree-toggle::before{display:none!important;content:none!important}
.project-editor-tax #invoiceBatchTaxCodeResults .project-tax-tree-label{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;width:100%!important;min-width:0!important;min-height:32px!important;margin:0!important;padding:4px 6px!important;border:0!important;border-radius:4px!important;background:#fff!important;box-shadow:none!important}
.project-editor-tax #invoiceBatchTaxCodeResults .project-tax-tree-label::before{display:none!important;content:none!important}
.project-editor-tax #invoiceBatchTaxCodeResults .project-tax-tree-label b{min-width:0!important;font-size:13px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.project-editor-tax #invoiceBatchTaxCodeResults .project-tax-tree-label span{font-size:12px!important;white-space:nowrap!important}
/* Keep project-editor radio choices on one row. */
.project-editor-grid fieldset{display:flex!important;align-items:flex-start!important;align-content:flex-start!important;flex-wrap:wrap!important;column-gap:16px!important;row-gap:8px!important}
.project-editor-grid fieldset legend{flex:0 0 100%!important;width:100%!important}
.project-editor-grid fieldset label{display:inline-flex!important;flex:0 0 auto!important;width:auto!important}.project-editor-unit-combobox{position:relative;min-width:0}.project-editor-unit-menu{position:absolute;left:0;right:0;bottom:calc(100% + 4px);z-index:20;border:1px solid #cfdceb;border-radius:3px;background:#fff;box-shadow:0 -14px 28px rgba(21,48,82,.16);overflow:hidden}.project-editor-unit-list{max-height:248px;overflow:auto;padding:4px;scrollbar-color:#8da4bc #eef3f8;scrollbar-width:thin}.project-editor-unit-list::-webkit-scrollbar{width:8px}.project-editor-unit-list::-webkit-scrollbar-track{background:#eef3f8}.project-editor-unit-list::-webkit-scrollbar-thumb{border-radius:999px;background:#8da4bc}.project-editor-unit-list button{width:100%;min-height:32px;display:flex;align-items:center;padding:0 10px;border:0;border-radius:2px;background:transparent;color:#1f334d;font-size:13px;text-align:left}.project-editor-unit-list button:hover{background:#edf6ff;color:#1769c2}.project-editor-unit-empty{padding:12px 10px;color:#7f8da1;font-size:13px;text-align:center}.project-editor-unit-combobox.is-open .project-editor-unit-control i{transform:translateY(2px) rotate(225deg)}
/* Real electronic-invoice proportions: 595.2756 × 396.8504 pt, rendered at 2×. */
.customs-invoice-preview-paper-wrap{width:calc(1190px * var(--invoice-preview-scale,1));min-height:calc(794px * var(--invoice-preview-scale,1))}
.customs-invoice-paper.customs-invoice-paper-real{box-sizing:border-box;width:1190px;min-width:1190px;height:794px;min-height:794px;padding:14px 42px 16px;border-radius:0;font-size:15px;line-height:1.2}
.customs-invoice-paper-real .customs-invoice-paper-head{grid-template-columns:132px minmax(0,1fr) 286px;min-height:116px;gap:18px;margin-bottom:3px}
.customs-invoice-paper-real .customs-invoice-qr{width:102px;height:102px;margin:8px 0 0 10px;background:#fff;text-shadow:none}
.customs-invoice-paper-real .customs-invoice-qr img{display:block;width:100%;height:100%;object-fit:contain}
.customs-invoice-paper-real .customs-invoice-title-wrap{position:absolute;top:0;left:50%;z-index:1;width:560px;padding-top:9px;transform:translateX(-50%)}
.customs-invoice-paper-real .customs-invoice-qr,.customs-invoice-paper-real .customs-invoice-meta{position:relative;z-index:2}
.customs-invoice-paper-real .customs-invoice-title{font-family:"SimSun","FangSong",serif;font-size:31px;letter-spacing:2px}
.customs-invoice-paper-real .customs-invoice-title-rule{width:420px;height:6px;margin-top:10px;border-top-width:2px;border-bottom-width:1px}
.customs-invoice-paper-real .customs-invoice-stamp{top:43px;left:56%;width:196px;height:84px;border-width:5px;font-size:20px;transform:translate(-50%,-50%) rotate(-4deg)}
.customs-invoice-paper-real .customs-invoice-stamp small{margin-top:-13px;font-size:12px}
.customs-invoice-paper-real .customs-invoice-meta{display:grid!important;grid-template-columns:1fr!important;grid-auto-flow:row!important;align-content:start;gap:11px;padding-top:21px;font-size:16px}
.customs-invoice-paper-real .customs-invoice-meta p{display:block!important;width:100%;margin:0!important;white-space:nowrap}
.customs-invoice-paper-real .customs-invoice-tax-board{height:626px}
.customs-invoice-paper-real .customs-invoice-party-row{grid-template-columns:31px minmax(0,1fr) 31px minmax(0,1fr);min-height:100px;height:100px}
.customs-invoice-paper-real .customs-invoice-side-label{padding:5px 0;font-size:15px}
.customs-invoice-paper-real .customs-invoice-info-block{min-height:100px;padding:19px 10px 18px}
.customs-invoice-paper-real .customs-invoice-lines{font-size:14px}
.customs-invoice-paper-real .customs-invoice-lines th,.customs-invoice-paper-real .customs-invoice-lines td{height:24px;padding:2px 3px}
.customs-invoice-paper-real .customs-invoice-lines th{height:28px}
.customs-invoice-paper-real .customs-invoice-lines tbody{height:302px}
.customs-invoice-paper-real .customs-invoice-lines tfoot td{height:32px}
.customs-invoice-paper-real .customs-invoice-total{grid-template-columns:278px minmax(0,1fr) 330px;height:42px;min-height:42px}
.customs-invoice-paper-real .customs-invoice-total span,.customs-invoice-paper-real .customs-invoice-total b{padding:10px 12px 0;font-size:15px}
.customs-invoice-paper-real .customs-invoice-remark{grid-template-columns:31px minmax(0,1fr);min-height:94px;height:94px}
.customs-invoice-paper-real .customs-invoice-remark>div:last-child{padding:7px 10px}
.customs-invoice-paper-real .customs-invoice-footer{padding:12px 0 0 78px;font-size:15px}

/* PDF-coordinate layout. Every position below is source PDF coordinate × 2. */
@font-face{font-family:"InvoiceFangSong";src:url("/assets/simfang.ttf") format("truetype");font-display:swap}
.customs-invoice-paper.customs-invoice-paper-real{--invoice-red:#800000;--invoice-text:#000;position:absolute;width:1190.5512px;min-width:1190.5512px;height:793.7008px;min-height:793.7008px;padding:0;overflow:hidden;background:#fff;color:#000;font-family:"InvoiceFangSong","FangSong","SimSun",serif;font-size:16px;line-height:1}
.customs-invoice-paper-real .customs-invoice-paper-head{position:absolute;inset:0 0 auto 0;display:block;width:100%;height:170.08px;min-height:170.08px;margin:0}
.customs-invoice-paper-real .customs-invoice-qr{position:absolute;top:32px;left:34px;width:116px;height:116px;margin:0}
.customs-invoice-paper-real .customs-invoice-title-wrap{position:absolute;top:45.38px;left:50%;width:540px;padding:0;transform:translateX(-50%)}
.customs-invoice-paper-real .customs-invoice-title{font-family:"InvoiceFangSong","FangSong",serif;font-size:36px;line-height:40.1px;letter-spacing:0;font-weight:400}
.customs-invoice-paper-real .customs-invoice-title-rule{position:absolute;top:56.68px;left:62.17px;width:413.84px;height:5.66px;margin:0;border-top:1.42px solid var(--invoice-red);border-bottom:1.42px solid var(--invoice-red)}
.customs-invoice-paper-real .customs-invoice-stamp{top:37px;left:50%;width:168px;height:92px;border-width:5px;color:rgba(220,0,0,.55);font-size:15px;transform:translate(-50%,-50%) rotate(0deg)}
.customs-invoice-paper-real .customs-invoice-stamp small{margin-top:-10px;font-size:11px}
.customs-invoice-paper-real .customs-invoice-meta{position:absolute;top:63.38px;right:46.8px;display:grid!important;width:268px;gap:15.34px;padding:0;font-size:16px;line-height:18px}
.customs-invoice-paper-real .customs-invoice-tax-board{position:absolute;top:170.08px;left:25.52px;box-sizing:border-box;width:1139.5px;height:532.92px;border-width:1.42px}
.customs-invoice-paper-real .customs-invoice-party-row{grid-template-columns:35.14px 535.74px 34.02px 531.76px;height:124.74px;min-height:124.74px;border-bottom-width:1.42px}
.customs-invoice-paper-real .customs-invoice-side-label{padding:0;border-right-width:1.42px;font-size:16px;line-height:19.84px}
.customs-invoice-paper-real .customs-invoice-info-block{box-sizing:border-box;height:124.74px;min-height:124.74px;padding:20px 12px 18px;border-right-width:1.42px;font-size:16px}
.customs-invoice-paper-real .customs-invoice-info-block p{line-height:24px}
.customs-invoice-paper-real .customs-invoice-lines{display:table;height:249.44px;font-size:16px;line-height:18px}
.customs-invoice-paper-real .customs-invoice-lines thead{height:31px}
.customs-invoice-paper-real .customs-invoice-lines tbody{height:190px}
.customs-invoice-paper-real .customs-invoice-lines tfoot{height:28.44px}
.customs-invoice-paper-real .customs-invoice-lines th,.customs-invoice-paper-real .customs-invoice-lines td{height:auto;padding:4px 2px;font-weight:400}
.customs-invoice-paper-real .customs-invoice-lines th{height:31px}
.customs-invoice-paper-real .customs-invoice-lines tbody tr{height:26px}
.customs-invoice-paper-real .customs-invoice-lines tfoot td{height:28.44px;border-top-width:1.42px}
.customs-invoice-paper-real .customs-invoice-total{grid-template-columns:294.78px minmax(0,1fr) 330px;height:45.34px;min-height:45.34px;border-top-width:1.42px}
.customs-invoice-paper-real .customs-invoice-total span,.customs-invoice-paper-real .customs-invoice-total b{box-sizing:border-box;padding:13px 12px 0;border-right-width:1.42px;font-size:16px;font-weight:400}
.customs-invoice-paper-real .customs-invoice-remark{grid-template-columns:35.14px minmax(0,1fr);height:113.4px;min-height:113.4px;border-top-width:1.42px}
.customs-invoice-paper-real .customs-invoice-remark>div:last-child{padding:6px 4px;font-size:16px;line-height:18px}
.customs-invoice-paper-real .customs-invoice-footer{position:absolute;top:735.8px;left:110.7px;padding:0;font-size:16px;line-height:18px}
.invoice-preview-card .invoice-card-side{grid-template-columns:1fr 1fr}.invoice-preview-card [data-invoice-preview-edit]{grid-column:1/-1}#invoiceSpecEditor.modal{z-index:1000!important;isolation:isolate}#invoiceSpecEditor>.invoice-spec-dialog{position:relative;z-index:1001;display:grid!important;grid-template-rows:88px minmax(0,1fr) 76px!important;width:min(720px,calc(100vw - 32px));height:min(520px,calc(100vh - 80px))!important;min-height:380px;max-height:none!important;overflow:hidden!important}.invoice-spec-dialog>header,.invoice-spec-dialog>footer{position:static!important;z-index:auto;box-sizing:border-box;margin:0;background:#fff}.invoice-spec-dialog>header{height:88px;padding:18px 20px}.invoice-spec-editor-rows{display:grid;align-content:start;gap:16px;min-width:0;min-height:0!important;height:auto!important;max-height:none!important;margin:0;padding:20px 24px 32px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;background:#fff}.invoice-spec-editor-rows label{display:grid;gap:9px;min-height:74px;color:#3c5669;font-weight:700}.invoice-spec-editor-rows input{display:block;box-sizing:border-box;width:100%;height:46px!important;min-height:46px!important;margin:0;padding:0 12px;border:1px solid #8fb9da;border-radius:6px;background:#fff;font-size:15px}.invoice-spec-dialog>footer{display:flex!important;align-items:center;justify-content:flex-end;gap:10px;height:76px;padding:16px 24px;border-top:1px solid #e0e8ef;background:#f8fbfd}
@media(max-height:560px){#invoiceSpecEditor>.invoice-spec-dialog{height:calc(100vh - 24px)!important;min-height:0}}

.exchange-rate-card{padding:0;overflow:hidden}.exchange-rate-card>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 22px;border-bottom:1px solid #dce7ef}.exchange-rate-card>header b,.exchange-rate-card>header span{display:block}.exchange-rate-card>header b{font-size:20px}.exchange-rate-card>header span{margin-top:5px;color:#718697;font-size:12px}.exchange-rate-card>header>div:last-child{display:flex;gap:10px}.exchange-rate-card input[type=month]{min-width:180px;padding:10px 12px;border:1px solid #bad1e2;border-radius:7px;font-size:15px}.exchange-rate-table{max-height:calc(100vh - 220px);overflow:auto}.exchange-rate-table table{width:100%;border-collapse:collapse}.exchange-rate-table th{position:sticky;top:0;padding:13px 16px;background:#eaf4fc;color:#294b63;text-align:left}.exchange-rate-table td{padding:12px 16px;border-bottom:1px solid #e4ebf1;color:#465f72}.exchange-rate-table tbody tr:hover td{background:#f6faff}

/* Floating task progress notification. */
.task-card.task-float{position:fixed;top:18px;right:20px;z-index:120;width:min(380px,calc(100vw - 32px));margin:0;padding:16px 18px;border:1px solid #cfe0ef;border-radius:12px;background:#fff;box-shadow:0 16px 42px rgba(20,53,79,.2);animation:task-float-in .18s ease-out}.task-float .task-line{padding-right:24px}.task-float .task-line b{font-size:15px}.task-float .task-line span{margin-top:4px;font-size:12px}.task-float .progress{height:7px;margin-top:12px}.task-float-close{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:#7c8d9b;font-size:20px;cursor:pointer}.task-float-close:hover{background:#eef4f8;color:#29465a}.task-card.task-float.is-completed{border-color:#b8e1d4}.task-card.task-float.is-completed .progress i{background:#1a9a73}.task-card.task-float.is-failed{border-color:#efbcbc}.task-card.task-float.is-failed .progress i{background:#d64b4b}@keyframes task-float-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@media(max-width:720px){.task-card.task-float{top:10px;right:10px;width:calc(100vw - 20px)}}
