.mail-confirm-modal.factory-fee-finance-modal {
  z-index: 3450;
}

.mail-confirm-card.factory-fee-invoice-card {
  width: min(1080px, calc(100vw - 64px));
  max-height: calc(100vh - 28px);
}

.mail-confirm-card.factory-fee-invoice-loading-card {
  width: min(720px, calc(100vw - 40px));
  min-height: 0;
}

.factory-fee-environment-chip.loading {
  border-color: #78a8c9;
  background: #eaf5fc;
  color: #245f88;
}

.factory-fee-environment-chip.error {
  border-color: #d39b9b;
  background: #fff0f0;
  color: #a13e3e;
}

.factory-fee-invoice-loading-body {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 34px 38px 38px;
  background: #f8fbfd;
}

.factory-fee-invoice-loading-ring {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid #c8dce9;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 78, 112, .12), inset 0 0 0 8px #f0f7fb;
}

.factory-fee-invoice-loading-ring i {
  position: absolute;
  inset: 7px;
  border: 4px solid #d8e8f2;
  border-top-color: #2875a8;
  border-right-color: #55a4cf;
  border-radius: 50%;
  animation: factory-fee-invoice-spin .82s linear infinite;
}

.factory-fee-invoice-loading-ring span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2d79aa;
  box-shadow: 0 0 0 5px rgba(45, 121, 170, .12);
  transform: translate(-50%, -50%);
}

@keyframes factory-fee-invoice-spin {
  to { transform: rotate(360deg); }
}

.factory-fee-invoice-loading-copy strong {
  color: #173f61;
  font-size: 20px;
  font-weight: 900;
}

.factory-fee-invoice-loading-copy p {
  margin: 7px 0 17px;
  color: #60788b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.factory-fee-invoice-loading-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.factory-fee-invoice-loading-steps span {
  display: inline-flex;
  align-items: center;
  color: #8495a2;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.factory-fee-invoice-loading-steps span + span::before {
  width: 22px;
  height: 1px;
  margin: 0 8px;
  background: #c8d8e3;
  content: "";
}

.factory-fee-invoice-loading-steps span.active {
  color: #2675a8;
}

.factory-fee-invoice-loading-count {
  min-width: 82px;
  padding: 12px 14px;
  border: 1px solid #c9dce8;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  box-shadow: 0 5px 12px rgba(34, 79, 111, .07);
}

.factory-fee-invoice-loading-count strong,
.factory-fee-invoice-loading-count span {
  display: block;
}

.factory-fee-invoice-loading-count strong {
  color: #1e5b85;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.factory-fee-invoice-loading-count span {
  margin-top: 2px;
  color: #718696;
  font-size: 11px;
  font-weight: 800;
}

.factory-fee-invoice-load-error {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  margin: 26px 30px;
  padding: 18px;
  border: 1px solid #e2b2b2;
  border-radius: 6px;
  background: #fff7f7;
}

.factory-fee-invoice-load-error > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #b34c4c;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(146, 51, 51, .18);
}

.factory-fee-invoice-load-error strong {
  color: #853a3a;
  font-size: 16px;
}

.factory-fee-invoice-load-error p {
  margin: 6px 0 0;
  color: #6d4b4b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.factory-fee-invoice-paid-remark {
  margin: 26px 30px;
}

.factory-fee-invoice-paid-remark-reason {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  padding: 18px;
  border: 1px solid #e2b2b2;
  border-radius: 6px 6px 0 0;
  background: #fff7f7;
}

.factory-fee-invoice-paid-remark-reason > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #b34c4c;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(146, 51, 51, .18);
}

.factory-fee-invoice-paid-remark-reason strong {
  color: #853a3a;
  font-size: 16px;
}

.factory-fee-invoice-paid-remark-reason p {
  margin: 6px 0 0;
  color: #6d4b4b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.factory-fee-invoice-paid-remark-value {
  display: grid;
  gap: 7px;
  padding: 17px 20px 18px 81px;
  border: 1px solid #e4c894;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fffaf0;
}

.factory-fee-invoice-paid-remark-value > span {
  color: #946817;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
}

.factory-fee-invoice-paid-remark-value > strong {
  color: #7a4610;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.factory-fee-invoice-paid-remark-help {
  margin: 12px 4px 0;
  color: #697d8b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.65;
}

@media (max-width: 680px) {
  .factory-fee-invoice-loading-body {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    padding: 26px 22px 30px;
  }

  .factory-fee-invoice-loading-count {
    display: none;
  }

  .factory-fee-invoice-paid-remark {
    margin: 22px;
  }

  .factory-fee-invoice-paid-remark-value {
    padding-left: 18px;
  }

  .factory-fee-invoice-loading-steps {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .factory-fee-invoice-loading-steps span + span::before {
    display: none;
  }
}

.factory-fee-invoice-overview,
.factory-fee-invoice-editor,
.factory-fee-invoice-final-row {
  margin-bottom: 12px;
  border: 1px solid #b9cfdf;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(31, 69, 103, .06);
}

.factory-fee-invoice-overview {
  position: relative;
  padding: 17px 18px 14px;
}

.factory-fee-invoice-type-title {
  color: #173f62;
  font-size: 22px;
  font-weight: 950;
}

.factory-fee-invoice-money {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 12px;
  color: #a84747;
}

.factory-fee-invoice-money span {
  font-size: 15px;
  font-weight: 900;
}

.factory-fee-invoice-money strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.factory-fee-invoice-money em {
  margin-left: 7px;
  color: #6c7f8f;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.factory-fee-invoice-requirement {
  display: block;
  margin-bottom: 13px;
  padding: 10px 14px;
  border: 1px solid #efba78;
  border-left: 5px solid #df850b;
  border-radius: 5px;
  background: #fff5e7;
}

.factory-fee-invoice-orders > span,
.factory-fee-invoice-api-mode > span {
  color: #42627b;
  font-size: 12px;
  font-weight: 900;
}

.factory-fee-invoice-requirement > span {
  display: block;
  margin-bottom: 7px;
  color: #995007;
  font-size: 20px;
  font-weight: 900;
}

.factory-fee-invoice-requirement strong {
  display: block;
  min-width: 0;
  color: #b42318;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.factory-fee-invoice-requirement-list {
  display: grid;
  min-width: 0;
}

.factory-fee-invoice-requirement-list > div {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #efd2ad;
}

.factory-fee-invoice-requirement-list span {
  min-width: 0;
  color: #174b78;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.factory-fee-invoice-requirement-list strong {
  padding-left: 12px;
  border-left: 1px solid #efd2ad;
}

.factory-fee-invoice-overview dl {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  margin: 0;
  border: 1px solid #d5e1e9;
  border-bottom: 0;
}

.factory-fee-invoice-overview dt,
.factory-fee-invoice-overview dd {
  min-height: 40px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 11px;
  border-bottom: 1px solid #d5e1e9;
  line-height: 1.5;
}

.factory-fee-invoice-overview dt {
  border-right: 1px solid #d5e1e9;
  background: #f4f7f9;
  color: #4c687d;
  font-size: 12px;
  font-weight: 900;
}

.factory-fee-invoice-overview dd {
  color: #183d5a;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.factory-fee-invoice-api-mode,
.factory-fee-invoice-orders {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d5e1e9;
  border-top: 0;
}

.factory-fee-invoice-api-mode strong {
  color: #a34a42;
  font-size: 14px;
}

.factory-fee-invoice-orders strong {
  color: #193f60;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.factory-fee-invoice-orders em {
  color: #6b8193;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.factory-fee-invoice-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #b8d0e2;
  border-radius: 6px;
  background: #f2f8fc;
}

.factory-fee-invoice-preview-toolbar span {
  color: #617a8f;
  font-size: 11px;
  font-weight: 750;
}

.factory-fee-invoice-preview-toolbar.is-disabled {
  border-color: #d3dce3;
  background: #f5f7f8;
}

.factory-fee-invoice-preview-toolbar.is-bound {
  border-color: #9dc9b3;
  background: #f2faf5;
}

.factory-fee-invoice-preview-toolbar.is-bound span {
  color: #3b7657;
}

.factory-fee-invoice-preview-toolbar.is-stale {
  border-color: #e2bd77;
  background: #fff8e9;
}

.factory-fee-invoice-preview-toolbar.is-stale span {
  color: #8a5d16;
  font-weight: 850;
}

.factory-fee-invoice-actions .factory-fee-invoice-issue-blocked,
.factory-fee-invoice-actions .factory-fee-invoice-issue-blocked:disabled {
  min-width: 142px;
  border-color: #cfb47d;
  background: linear-gradient(#f4eee2, #e7dbc2);
  color: #7b6336;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}

.factory-fee-invoice-preview-mode,
.factory-fee-invoice-option,
.factory-fee-invoice-add,
.factory-fee-invoice-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 1px solid #8eb1cb;
  border-bottom-color: #668da9;
  border-radius: 4px;
  background: linear-gradient(#fff, #e8f1f7);
  color: #245a80;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #9bb3c4;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

.factory-fee-invoice-preview-mode:hover:not(:disabled),
.factory-fee-invoice-option:hover:not(:disabled),
.factory-fee-invoice-add:hover,
.factory-fee-invoice-delete:hover {
  border-color: #5187ae;
  background: linear-gradient(#fff, #dcebf5);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #7e9eb4, 0 7px 12px rgba(43, 87, 119, .13);
  transform: translateY(-1px);
}

.factory-fee-invoice-preview-mode {
  min-width: 112px;
  padding: 0 14px;
}

.factory-fee-invoice-option.active {
  border-color: #2f709f;
  background: linear-gradient(#4f8fbd, #2d6f9e);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), 0 2px 0 #245b82;
}

.factory-fee-invoice-option:disabled,
.factory-fee-invoice-option.disabled,
.factory-fee-invoice-preview-mode:disabled {
  border-color: #ccd6dd;
  background: #edf1f4;
  color: #94a2ad;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.factory-fee-invoice-editor {
  overflow: hidden;
}

.factory-fee-invoice-companion {
  display: block;
  border-color: #d5bd80;
}

.factory-fee-invoice-companion-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 13px;
  border-bottom: 1px solid #e0cc98;
  background: #fff9eb;
  color: #685224;
}

.factory-fee-invoice-companion-title strong {
  font-size: 13px;
}

.factory-fee-invoice-companion-title span {
  padding: 4px 9px;
  border: 1px solid #d3b66f;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.factory-fee-invoice-remark-shell {
  padding: 12px;
}

.factory-fee-invoice-fixed {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  border: 1px solid #d4dfe7;
  background: #f5f7f9;
}

.factory-fee-invoice-fixed + .factory-fee-invoice-fixed {
  border-top: 0;
}

.factory-fee-invoice-fixed > span,
.factory-fee-invoice-fixed pre {
  min-height: 40px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
}

.factory-fee-invoice-fixed > span {
  border-right: 1px solid #d4dfe7;
  color: #5a7183;
  font-size: 11px;
  font-weight: 900;
}

.factory-fee-invoice-fixed pre {
  color: #667987;
  font: 11px/1.55 "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: pre-wrap;
}

.factory-fee-invoice-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 11px 0;
}

.factory-fee-invoice-option {
  min-width: 118px;
  padding: 0 13px;
}

.factory-fee-invoice-usd-note,
.factory-fee-invoice-rule {
  margin: 7px 0;
  color: #6e8190;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.factory-fee-invoice-remark-shell textarea {
  width: 100%;
  min-height: 88px;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #a9c1d3;
  border-radius: 4px;
  background: #fbfdff;
  color: #173c5a;
  font: 12px/1.6 "PingFang SC", "Microsoft YaHei", sans-serif;
  resize: vertical;
}

.factory-fee-invoice-add {
  min-width: 96px;
  padding: 0 11px;
}

.factory-fee-invoice-editor .factory-fee-invoice-table-wrap table {
  min-width: 940px;
}

.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:first-child {
  width: 34%;
}

.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:nth-child(2),
.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:nth-child(3) {
  width: 9%;
}

.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:nth-child(4) {
  width: 7%;
}

.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:nth-child(5),
.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:nth-child(6),
.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:nth-child(7) {
  width: 11%;
}

.factory-fee-invoice-editor .factory-fee-invoice-table-wrap th:last-child {
  width: 7%;
}

.factory-fee-invoice-editor td:nth-child(n+3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.factory-fee-invoice-editor td:nth-child(4),
.factory-fee-invoice-editor td:last-child {
  text-align: center;
}

.factory-fee-invoice-delete {
  min-width: 48px;
  min-height: 28px;
  padding: 0 8px;
  border-color: #d6a7a7;
  border-bottom-color: #ba7e7e;
  background: linear-gradient(#fff, #f8eaea);
  color: #9a4444;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #cfa4a4;
}

.factory-fee-invoice-total [data-invoice-diff].is-error {
  color: #b44242;
}

.factory-fee-invoice-rule {
  margin: 0;
  padding: 7px 12px 10px;
  border-top: 1px solid #e0e8ee;
  background: #fafcfd;
}

.factory-fee-invoice-final-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 12px;
}

.factory-fee-invoice-final-row > div {
  display: grid;
  gap: 6px;
}

.factory-fee-invoice-final-row > div span {
  color: #42627b;
  font-size: 11px;
  font-weight: 900;
}

.factory-fee-invoice-final-row > div strong {
  min-height: 34px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d1dee7;
  border-radius: 4px;
  background: #f4f7f9;
  color: #7d4e4e;
  font-size: 12px;
}

.mail-confirm-modal.factory-fee-invoice-preview-modal {
  z-index: 10060;
  padding: 18px;
  overflow: auto;
}

.mail-confirm-modal.factory-fee-finance-confirm-modal {
  z-index: 10070;
}

.factory-fee-einvoice-preview-shell {
  position: relative;
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto 24px;
  border: 1px solid #8faec5;
  border-radius: 6px;
  background: #eef4f8;
  box-shadow: 0 22px 60px rgba(13, 38, 61, .32);
}

.factory-fee-einvoice-preview-body {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 160px);
  padding: 18px;
  overflow: auto;
}

.factory-fee-einvoice-preview-image-card {
  margin: 0;
  padding: 14px;
  border: 1px solid #bed2e1;
  border-radius: 5px;
  background: #dfeaf1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.factory-fee-einvoice-preview-image-card figcaption {
  margin: 0 0 10px;
  color: #315b78;
  font-size: 12px;
  font-weight: 850;
}

.factory-fee-einvoice-preview-image-card img {
  display: block;
  width: 100%;
  border: 1px solid #d8c7c7;
  background: #fff;
  box-shadow: 0 10px 24px rgba(49, 60, 68, .16);
}

.factory-fee-einvoice-preview-card {
  position: relative;
  padding: 25px 28px 20px;
  border: 1px solid #ddd;
  background: #fff;
  color: #7f1717;
  font-family: SimSun, "Microsoft YaHei", sans-serif;
  box-shadow: 0 7px 20px rgba(42, 52, 61, .12);
  overflow: hidden;
}

.factory-fee-einvoice-watermark {
  position: absolute;
  top: 51%;
  left: 50%;
  z-index: 0;
  color: rgba(190, 38, 38, .08);
  font-size: 42px;
  font-weight: 900;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-17deg);
}

.factory-fee-einvoice-preview-card header {
  position: relative;
  z-index: 1;
  min-height: 112px;
  text-align: center;
}

.factory-fee-einvoice-preview-card header > strong {
  display: inline-block;
  padding: 0 30px 10px;
  border-bottom: 4px double #9d1919;
  font-size: 27px;
  letter-spacing: 6px;
}

.factory-fee-einvoice-preview-card header > div {
  position: absolute;
  top: 2px;
  right: 0;
  color: #6f1717;
  font-size: 14px;
  line-height: 28px;
  text-align: left;
}

.factory-fee-einvoice-preview-card header > div span {
  display: inline-block;
  min-width: 78px;
  text-align: right;
}

.factory-fee-einvoice-preview-card header > em {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 126px;
  height: 62px;
  border: 5px solid rgba(205, 29, 29, .58);
  border-radius: 50%;
  color: rgba(205, 29, 29, .65);
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  line-height: 62px;
  transform: translateX(-50%) rotate(-8deg);
}

.factory-fee-einvoice-preview-card table {
  position: relative;
  z-index: 1;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.factory-fee-einvoice-preview-card th,
.factory-fee-einvoice-preview-card td {
  border: 1px solid #9d1919;
  padding: 7px 6px;
  color: #222;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.factory-fee-einvoice-parties th {
  width: 34px;
  color: #821717;
  letter-spacing: 3px;
  writing-mode: vertical-rl;
}

.factory-fee-einvoice-parties td {
  width: 44%;
}

.factory-fee-einvoice-lines th {
  color: #821717;
  text-align: center;
}

.factory-fee-einvoice-lines th:first-child {
  width: 24%;
}

.factory-fee-einvoice-lines td:not(:first-child),
.factory-fee-einvoice-lines tfoot td {
  text-align: right;
}

.factory-fee-einvoice-total,
.factory-fee-einvoice-remark {
  position: relative;
  z-index: 1;
  display: grid;
  border: 1px solid #9d1919;
  border-top: 0;
}

.factory-fee-einvoice-total {
  grid-template-columns: 26% minmax(0, 1fr) 30%;
}

.factory-fee-einvoice-total > * {
  padding: 9px;
  border-right: 1px solid #9d1919;
  color: #7e1717;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}

.factory-fee-einvoice-total > *:last-child {
  border-right: 0;
  text-align: right;
}

.factory-fee-einvoice-remark {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 86px;
}

.factory-fee-einvoice-remark > span {
  padding: 8px;
  border-right: 1px solid #9d1919;
  color: #7e1717;
  letter-spacing: 4px;
  text-align: center;
  writing-mode: vertical-rl;
}

.factory-fee-einvoice-remark pre {
  margin: 0;
  padding: 9px 11px;
  color: #222;
  font: 13px/1.55 SimSun, "Microsoft YaHei", sans-serif;
  white-space: pre-wrap;
}

.factory-fee-einvoice-preview-card footer {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding-left: 68px;
  color: #7e1717;
  font-size: 14px;
}

/* Factory statement's optional last column; supplier exports are unchanged. */
.mail-confirm-modal.factory-statement-column-modal { z-index: 3460; }
.factory-statement-column-card { width: min(470px, calc(100vw - 32px)); background: #fff; color: #243449; border: 1px solid #e2e7ee; border-radius: 18px; box-shadow: 0 16px 48px #182d4626; overflow: hidden; }
.factory-statement-column-head { padding: 23px 26px 18px; border-bottom: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; }
.factory-statement-column-head strong { font-size: 18px; font-weight: 600; }
.factory-statement-column-head button { border: 0; background: none; color: inherit; font-size: 23px; padding: 0 5px; cursor: pointer; }
.factory-statement-column-body { padding: 23px 26px 25px; }
.factory-statement-column-label { font-weight: 500; margin-bottom: 12px; }
.factory-statement-column-options { display: flex; gap: 12px; }
.factory-statement-column-options button { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border: 1px solid #dce3ec; border-radius: 11px; background: #fff; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
.factory-statement-column-options button[aria-pressed="true"] { background: #edf3fa; border-color: #587b9f; color: #254b72; }
.factory-statement-column-options [data-column-tick] { width: 19px; height: 19px; border: 1px solid #c8d3df; border-radius: 50%; font-size: 12px; text-align: center; line-height: 17px; }
.factory-statement-column-options button[aria-pressed="true"] [data-column-tick] { background: #375f87; border-color: transparent; color: #fff; }
.factory-statement-column-hint { font-size: 12px; color: #66758a; margin: 11px 0 0; }
.factory-statement-column-preview { margin-top: 22px; background: #f6f8fb; padding: 13px 16px; border-radius: 9px; min-height: 76px; }
.factory-statement-column-preview > span { display: block; font-size: 12px; color: #748196; margin-bottom: 4px; }
.factory-statement-column-actions { padding: 17px 26px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #edf0f4; }
@media(max-width:380px) { .factory-statement-column-head, .factory-statement-column-body, .factory-statement-column-actions { padding-left: 18px; padding-right: 18px; } }
.factory-statement-column-options button { box-shadow: none; }
.factory-statement-column-actions button { position: static; width: auto; min-width: 72px; min-height: 36px; padding: 8px 19px; border: 1px solid #dce3ec; border-radius: 8px; background: #fff; color: #243449; box-shadow: none; font-size: 14px; font-weight: 500; }
.factory-statement-column-actions [data-column-confirm] { background: #304f71; border-color: #304f71; color: #fff; }

/* Invoice history and single-invoice red confirmation: presentation only. */
button[data-factory-fee-invoice-records], button[data-factory-fee-red] {
  border-radius: 999px; padding: 6px 14px; min-height: 32px;
  font-weight: 650; letter-spacing: .02em; box-shadow: 0 2px 5px #193c6010;
}
button[data-factory-fee-invoice-records] { color: #245778; border: 1px solid #bfd1df; background: #f2f7fb; }
button[data-factory-fee-red] { color: #a13d49; border: 1px solid #e6bbc2; background: #fff5f6; }
button[data-factory-fee-invoice-records]:hover { background: #e5eff7; }
button[data-factory-fee-red]:hover { background: #fbe6e9; }
:is(.factory-fee-record-card,.factory-fee-red-card) {
  border: 1px solid #d6e0e9; border-radius: 16px;
  box-shadow: 0 24px 70px #17375130; overflow: hidden;
}
:is(.factory-fee-record-card,.factory-fee-red-card) .mail-confirm-head {
  padding: 23px 26px 20px; background: #fff; border-bottom: 1px solid #e5ebf0;
}
:is(.factory-fee-record-card,.factory-fee-red-card) .mail-confirm-head > span {
  color: #7b8e9e; font-size: 10px; letter-spacing: .18em;
}
:is(.factory-fee-record-card,.factory-fee-red-card) .mail-confirm-head > strong { color: #243e54; font-size: 21px; }
.factory-fee-record-card .factory-fee-record-list, .factory-fee-red-card .factory-fee-red-body { background: #f4f7fa; padding: 20px; }
.factory-fee-record-card .factory-fee-record-item { border-radius: 11px; padding: 17px; border-color: #dce5ed; box-shadow: 0 2px 7px #19375106; }
.factory-fee-record-card .factory-fee-record-blue { border-left: 3px solid #608db1; background: #fff; }
.factory-fee-record-card .factory-fee-record-red { border-left: 3px solid #bf7180; background: #fffcfc; }
.factory-fee-record-card .factory-fee-record-main strong { font-size: 16px; margin: 9px 0 6px; font-variant-numeric: tabular-nums; }
.factory-fee-record-card .factory-fee-record-main em { color: #344d63; font-size: 15px; }
.factory-fee-record-card .factory-fee-record-meta { gap: 6px; }
.factory-fee-red-card .factory-fee-red-warning { border-radius: 9px; font-weight: 500; }
.factory-fee-red-card .factory-fee-red-records { border: 0; background: transparent; display: grid; gap: 10px; }
.factory-fee-red-card .factory-fee-red-records > .factory-fee-red-record { padding: 17px; border: 1px solid #dbe4ed; border-radius: 11px; background: #fff; }
.factory-fee-red-card .factory-fee-red-record:has(input:checked) { border-color: #b96a79; background: #fff8f9; box-shadow: 0 0 0 2px #b96a7914; }
.factory-fee-red-card input[type=radio] { accent-color: #a44759; width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: middle; }
.factory-fee-red-card .factory-fee-red-record-main { grid-template-columns: minmax(90px,.7fr) minmax(0,1.5fr) minmax(80px,.8fr) 65px; }
.factory-fee-red-card .factory-fee-red-record-main > * { min-width: 0; overflow-wrap: anywhere; }
.factory-fee-red-card .factory-fee-red-record-main strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.factory-fee-red-card .factory-fee-red-record-main em { color: #344d63; font-size: 15px; }
.factory-fee-red-card .factory-fee-red-record-main b { font-size: 11px; font-weight: 600; }
:is(.factory-fee-record-card,.factory-fee-red-card) .mail-confirm-actions { padding: 16px 20px; gap: 9px; flex-wrap: wrap; background: #fff; border-top: 1px solid #e5ebf0; }
:is(.factory-fee-record-card,.factory-fee-red-card) :is(.blue-action-button,.default-confirm-btn,.default-cancel-btn,.mini-button) { border-radius: 8px; box-shadow: none; }
.factory-fee-red-card .default-confirm-btn.danger { background: #a44759; border-color: #a44759; color: #fff; }
:is(.factory-fee-record-card,.factory-fee-red-card) :is(button,a,input):focus-visible { outline: 2px solid #547eaa; outline-offset: 3px; }
@media(max-width: 680px) {
 .factory-fee-record-card .factory-fee-record-item { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .factory-fee-red-card .factory-fee-red-record-main { grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
 :is(.factory-fee-record-card,.factory-fee-red-card) .mail-confirm-head { padding: 20px; }
 .factory-fee-record-card .factory-fee-record-list,.factory-fee-red-card .factory-fee-red-body { padding: 12px; }
}
.factory-fee-record-card .factory-fee-record-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
:is(.factory-fee-record-card,.factory-fee-red-card) :is(.blue-action-button,.mini-button,.default-cancel-btn) { background: #f7f9fc; border: 1px solid #cedae5; color: #365872; }
.factory-fee-record-card .factory-fee-record-actions .red { background: #fff7f8; border-color: #dfb9c0; color: #a44759; }
@media(max-width: 680px) { .factory-fee-record-card .factory-fee-record-actions { justify-content: flex-start; } }

/* Do not inherit the global 62px action width inside invoice history. */
.factory-fee-record-card .factory-fee-record-actions > :is(button,a) {
 width: auto; height: auto; min-height: 34px; max-width: 100%; flex: 0 0 auto;
 box-sizing: border-box; padding: 8px 12px; line-height: 1.4;
 white-space: normal; overflow-wrap: anywhere; text-align: center;
}
.factory-fee-record-card .factory-fee-record-item {
 grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) minmax(0,.85fr);
}
@media(max-width: 850px) {
 .factory-fee-record-card .factory-fee-record-item { grid-template-columns: minmax(0,1fr); }
 .factory-fee-record-card .factory-fee-record-actions { justify-content: flex-start; }
}

.factory-invoice-amounts { display:grid; gap:0; min-width:190px; width:max-content; text-align:left; }
.factory-invoice-amount-entry { display:grid; grid-template-columns:60px minmax(78px,auto) 42px; column-gap:6px; align-items:center; line-height:23px; white-space:nowrap; }
.factory-invoice-amount-entry > strong { text-align:right; }
.factory-invoice-amounts small { color:#697d8d; font-size:11px; }
.factory-invoice-amounts strong { font-size:13px; font-variant-numeric:tabular-nums; }
.factory-invoice-amounts .red-invoice-amount { color:#b24455; text-decoration:line-through; text-decoration-thickness:1.5px; }
.factory-invoice-effective-total { display:grid; grid-template-columns:60px minmax(78px,auto) 42px; column-gap:6px; align-items:center; line-height:23px; margin-top:3px; padding-top:3px; border-top:1px solid #dce4ec; white-space:nowrap; }
.factory-invoice-effective-total > strong { text-align:right; }
.factory-invoice-amount-entry .factory-invoice-amount-state { color:#b24455; }
.factory-invoice-amount-state:empty { display:none; }
