.disclosure-invoice-generator,
.invoice-generator,
.easyform-src-invoice-generator {
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
}

.dig-shell {
  background: #ffffff;
  border: 1px solid #d9e2f3;
  border-radius: 14px;
  padding: 24px;
  max-width: 1220px;
  margin: 20px auto;
  box-sizing: border-box;
}

.dig-header {
  background: linear-gradient(135deg, #07111f, #123b73 60%, #2563eb);
  color: #fff;
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 18px;
}

.dig-eyebrow {
  display: block;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dig-header h3 {
  margin: 8px 0 6px;
  font-size: 28px;
  color: #fff;
}

.dig-header p {
  margin: 0;
  color: #dbeafe;
}

.dig-upload-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
}

.dig-file-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 320px;
  font-weight: 800;
}

.dig-file-label input,
.dig-bank-grid input,
.dig-rate-grid input,
.dig-inline-rate input {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  box-sizing: border-box;
}

.dig-file-name {
  font-size: 13px;
  color: #475569;
  font-style: normal;
  font-weight: 400;
}

.dig-generate-btn,
.dig-reset-btn,
.dig-default-rates-btn,
.dig-print-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.dig-generate-btn,
.dig-print-btn {
  background: #0070c0;
  color: #fff;
}

.dig-reset-btn,
.dig-default-rates-btn {
  background: #e2e8f0;
  color: #0f172a;
}


.dig-inline-rate {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 135px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.dig-inline-rate input {
  width: 100%;
  background: #fff;
  font-weight: 800;
}

.dig-default-rates-btn {
  white-space: nowrap;
}

.dig-rate-fields p {
  margin: 12px 0 0;
  color: #475569;
  font-size: 14px;
}

.dig-help,
.dig-message {
  background: #f1f5f9;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  margin: 12px 0;
}

.dig-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}


.dig-rate-fields {
  border: 1px solid rgba(29,140,255,.28);
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
  margin: 14px 0;
}

.dig-rate-fields h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.dig-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.dig-rate-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.dig-rate-grid input {
  background: #fff;
  font-weight: 800;
}

.dig-bank-fields {
  border: 1px solid #d9e2f3;
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
  margin: 14px 0;
}

.dig-bank-fields h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.dig-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.dig-bank-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.dig-bank-grid input { background: #fff; }

.dig-report {
  margin-top: 22px;
  background: #fff;
}

.dig-report-actions {
  text-align: right;
  margin-bottom: 15px;
}

.dig-invoice-page,
.dig-history-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 18px;
  background: #fff;
  box-sizing: border-box;
  padding: 9mm 11mm;
  page-break-after: always;
  break-after: page;
  overflow: hidden;
  position: relative;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dig-svg-hero {
  width: 100%;
  height: 34mm;
  margin: 0 0 5mm;
}

.dig-svg-hero svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dig-top-details {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12mm;
  margin: 0 0 7mm auto;
}

.dig-client-block {
  width: 62mm;
  text-align: right;
  font-size: 9.6pt;
  line-height: 1.35;
}

.dig-client-block strong,
.dig-client-block span { display: block; }

.dig-invoice-meta {
  width: 82mm;
  font-size: 9.6pt;
}

.dig-invoice-meta div {
  display: grid;
  grid-template-columns: 32mm 1fr;
  gap: 4mm;
  margin-bottom: 2.2mm;
  align-items: baseline;
}

.dig-invoice-meta span { font-weight: 900; }
.dig-invoice-meta strong { text-align: right; font-weight: 400; }

.dig-invoice-table,
.dig-history-table,
.dig-total-table,
.dig-bank-table {
  width: 100%;
  border-collapse: collapse;
}

.dig-invoice-table th {
  background: #072863;
  color: #fff;
  font-size: 10.4pt;
  font-weight: 900;
  padding: 2.5mm;
  border: 1px solid #8d99ab;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 9999px #072863;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dig-invoice-table td {
  font-size: 9.7pt;
  padding: 2.4mm 3.4mm;
  border: 1px solid #b8b8b8;
}

.dig-invoice-table td:nth-child(2),
.dig-invoice-table td:nth-child(3),
.dig-invoice-table td:nth-child(4) { text-align: center; }
.dig-invoice-table td:first-child { width: 48%; }
.dig-note { font-style: italic; text-align: left !important; }

.dig-total-table {
  width: 78mm;
  margin: 5mm 0 0 auto;
  font-size: 9.8pt;
}

.dig-total-table td {
  border: 1px solid #b8b8b8;
  padding: 2.4mm 3mm;
  text-align: center;
}

.dig-total-table td:first-child { font-weight: 700; }

.dig-total-due td {
  background: #d9e2f3;
  color: #072863;
  font-weight: 900 !important;
  font-size: 11.4pt;
  box-shadow: inset 0 0 0 9999px #d9e2f3;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dig-payment-block {
  margin-top: 7mm;
  width: 95mm;
  font-size: 8.5pt;
  color: #000;
}

.dig-payment-block h3 {
  margin: 0 0 1.2mm;
  font-size: 10.8pt;
  font-weight: 900;
}

.dig-payment-block p {
  margin: 0 0 2.4mm;
  font-size: 8.8pt;
}

.dig-bank-table td {
  border: 1px solid #b8b8b8;
  padding: 1.35mm 2.2mm;
  vertical-align: middle;
  word-break: break-word;
}

.dig-bank-table td:first-child {
  width: 34mm;
  font-weight: 900;
}

.dig-company-footer {
  position: absolute;
  left: 11mm;
  right: 11mm;
  bottom: 8mm;
  font-size: 6.7pt;
  line-height: 1.35;
  color: #222;
  border-top: 1px solid #0b2a66;
  padding-top: 2mm;
}

.dig-history-titlebar {
  background: #d9e2f3;
  padding: 7mm 9mm;
  margin: -9mm -11mm 10mm;
  box-shadow: inset 0 0 0 9999px #d9e2f3;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dig-history-titlebar h1 {
  margin: 0;
  text-align: right;
  font-size: 28pt;
  line-height: 1.05;
  font-weight: 900;
  color: #000;
}

.dig-history-page h2 {
  margin: 0 0 5mm;
  font-size: 17pt;
  font-weight: 400;
}

.dig-history-table th {
  background: #0070c0;
  color: #fff;
  font-size: 7.2pt;
  padding: 1mm 1.2mm;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 0 0 9999px #0070c0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dig-history-table td {
  font-size: 6.15pt;
  line-height: 1.02;
  padding: .58mm .9mm;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  border-bottom: 1px solid #e5e7eb;
  color: #000;
  vertical-align: middle;
}

.dig-history-table td:first-child { text-align: right; width: 9mm; }
.dig-history-table td:nth-child(2) { width: 34mm; white-space: nowrap; }
.dig-history-table td:nth-child(3) { width: 21mm; white-space: nowrap; text-align: center; }

.dig-history-table tbody tr:nth-child(6n+4),
.dig-history-table tbody tr:nth-child(6n+5),
.dig-history-table tbody tr:nth-child(6n+6) {
  background: #d9e8fb;
  box-shadow: inset 0 0 0 9999px #d9e8fb;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

@media (max-width: 900px) {
  .dig-invoice-page,
  .dig-history-page { width: 100%; min-height: auto; padding: 18px; }
  .dig-history-titlebar { margin: -18px -18px 28px; }
  .dig-svg-hero { height: 150px; }
  .dig-top-details { display: block; }
  .dig-client-block,
  .dig-invoice-meta { width: 100%; margin-top: 12px; }
}

@media (max-width: 760px) { .dig-bank-grid, .dig-rate-grid { grid-template-columns: 1fr; } }

@media print {
  @page { size: A4 portrait; margin: 0; }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body * { visibility: hidden !important; }
  .dig-report,
  .dig-report * { visibility: visible !important; }
  .dig-header,
  .dig-upload-row,
  .dig-bank-fields,
  .dig-help,
  .dig-report-actions,
  .dig-message { display: none !important; }
  .dig-shell,
  .dig-report,
  .dig-results {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    background: #fff !important;
  }
  .dig-report {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 210mm !important;
  }
  .dig-invoice-page,
  .dig-history-page {
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 9mm 11mm !important;
    overflow: hidden !important;
    page-break-after: always !important;
    break-after: page !important;
    position: relative !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .dig-svg-hero { height: 34mm !important; margin-bottom: 5mm !important; }
  .dig-top-details { margin-bottom: 6mm !important; }
  .dig-client-block,
  .dig-invoice-meta { font-size: 9.2pt !important; }
  .dig-invoice-meta div { margin-bottom: 1.9mm !important; }
  .dig-invoice-table th { font-size: 9.8pt !important; padding: 2.2mm !important; }
  .dig-invoice-table td { font-size: 9.2pt !important; padding: 2.1mm 3mm !important; }
  .dig-total-table { margin-top: 4.5mm !important; width: 76mm !important; }
  .dig-total-table td { padding: 2.1mm 2.6mm !important; }
  .dig-payment-block { margin-top: 6.5mm !important; font-size: 8pt !important; }
  .dig-payment-block h3 { font-size: 10.3pt !important; }
  .dig-payment-block p { margin-bottom: 2mm !important; }
  .dig-bank-table td { padding: 1.15mm 2mm !important; }
  .dig-company-footer { bottom: 7mm !important; font-size: 6.3pt !important; }
  .dig-history-titlebar { margin: -9mm -11mm 9mm !important; padding: 6.5mm 9mm !important; }
  .dig-history-titlebar h1 { font-size: 27pt !important; }
  .dig-history-page h2 { margin-bottom: 4.5mm !important; font-size: 16pt !important; }
  .dig-history-table th { font-size: 6.8pt !important; padding: .9mm 1.1mm !important; }
  .dig-history-table td { font-size: 5.8pt !important; line-height: 1.01 !important; padding: .48mm .85mm !important; }
}


/* ===== RC8 print/layout polish ===== */
.dig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #07111f 0%, #0d2a56 48%, #2563eb 100%);
}
.dig-header-main { min-width: 0; }
.dig-header-brand {
  text-align: right;
  color: #dbeafe;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.35;
}
.dig-header-brand span { display:block; color:#7dd3fc; }
.dig-header-brand small { display:block; color:#ffffff; letter-spacing:0; text-transform:none; font-size:11px; opacity:.9; }

.dig-invoice-page,
.dig-history-page {
  padding: 8mm 10mm;
}

.dig-svg-hero { height: 32mm; margin-bottom: 4mm; }

.dig-top-details {
  display: grid;
  grid-template-columns: 95mm 1fr;
  column-gap: 12mm;
  align-items: start;
  margin: 1mm 0 6mm 0;
}

.dig-client-block {
  width: auto;
  text-align: right;
  font-size: 9.2pt;
  line-height: 1.28;
  padding-top: .4mm;
}

.dig-invoice-meta {
  width: 92mm;
  font-size: 9.4pt;
}
.dig-invoice-meta div {
  grid-template-columns: 34mm 43mm;
  gap: 3mm;
  margin-bottom: 1.8mm;
}
.dig-invoice-meta strong { text-align: left; }

.dig-invoice-table th { padding: 2.8mm 2.5mm; }
.dig-invoice-table td { padding: 2.9mm 3.4mm; }
.dig-total-table { margin-top: 4.4mm; }
.dig-total-due td {
  border-top: 2px solid #072863;
  border-bottom: 2px solid #072863;
}
.dig-payment-block { margin-top: 5.4mm; width: 102mm; }
.dig-bank-table td { padding: 1.25mm 2.1mm; }
.dig-company-footer { bottom: 10mm; }

.dig-history-page {
  padding-left: 14mm;
  padding-right: 14mm;
}
.dig-history-titlebar {
  margin: -8mm -14mm 8mm;
  padding: 7.5mm 10mm 6mm;
}
.dig-history-titlebar h1 { font-size: 29pt; }
.dig-history-page h2 { margin-bottom: 5mm; }
.dig-history-table th {
  background: #005f9f;
  box-shadow: inset 0 0 0 9999px #005f9f;
}
.dig-history-table td {
  padding-top: .62mm;
  padding-bottom: .62mm;
}
.dig-history-table td:nth-child(2) { width: 36mm; }
.dig-history-table td:nth-child(3) { width: 22mm; }

.dig-page-last {
  page-break-after: auto !important;
  break-after: auto !important;
}

@media print {
  .dig-invoice-page,
  .dig-history-page {
    width: 210mm !important;
    height: 296mm !important;
    min-height: 296mm !important;
    padding: 8mm 10mm !important;
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  .dig-history-page {
    padding-left: 14mm !important;
    padding-right: 14mm !important;
  }
  .dig-page-last {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .dig-svg-hero { height: 32mm !important; margin-bottom: 4mm !important; }
  .dig-top-details {
    display: grid !important;
    grid-template-columns: 95mm 1fr !important;
    column-gap: 12mm !important;
    margin: 1mm 0 5.5mm 0 !important;
  }
  .dig-client-block { width: auto !important; font-size: 8.9pt !important; line-height: 1.25 !important; }
  .dig-invoice-meta { width: 92mm !important; font-size: 9pt !important; }
  .dig-invoice-meta div { grid-template-columns: 34mm 43mm !important; gap: 3mm !important; margin-bottom: 1.55mm !important; }
  .dig-invoice-meta strong { text-align: left !important; }
  .dig-invoice-table th { padding: 2.5mm 2.2mm !important; }
  .dig-invoice-table td { padding: 2.45mm 3mm !important; }
  .dig-total-table { margin-top: 4mm !important; width: 76mm !important; }
  .dig-payment-block { margin-top: 5mm !important; width: 102mm !important; }
  .dig-company-footer { bottom: 9.5mm !important; }
  .dig-history-titlebar { margin: -8mm -14mm 8mm !important; padding: 7mm 10mm 6mm !important; }
  .dig-history-titlebar h1 { font-size: 28pt !important; }
  .dig-history-table th { background:#005f9f !important; box-shadow: inset 0 0 0 9999px #005f9f !important; }
  .dig-history-table td { font-size: 5.8pt !important; line-height: 1.02 !important; padding: .54mm .85mm !important; }
}

/* ===== RC9 final invoice polish ===== */
.dig-client-block {
  text-align: left;
}

.dig-history-table th {
  color: #ffffff !important;
}

@media print {
  .dig-client-block {
    text-align: left !important;
  }

  .dig-history-table th {
    color: #ffffff !important;
    background: #005f9f !important;
    box-shadow: inset 0 0 0 9999px #005f9f !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .dig-company-footer {
    bottom: 12mm !important;
  }

  .dig-invoice-page,
  .dig-history-page {
    height: 295mm !important;
    min-height: 295mm !important;
  }
}

/* ===== RC10 three-column invoice identity block ===== */
.dig-top-details {
  display: grid !important;
  grid-template-columns: 72mm 1fr 86mm !important;
  column-gap: 8mm !important;
  align-items: start !important;
  margin: 6mm 0 6mm 0 !important;
}

.dig-client-block {
  grid-column: 1 !important;
  width: auto !important;
  text-align: left !important;
  font-size: 10pt !important;
  line-height: 1.24 !important;
}

.dig-invoice-meta {
  grid-column: 3 !important;
  width: auto !important;
  font-size: 10pt !important;
}

.dig-invoice-meta div {
  display: grid !important;
  grid-template-columns: 39mm 1fr !important;
  gap: 4mm !important;
  margin-bottom: 2.6mm !important;
  align-items: baseline !important;
}

.dig-invoice-meta span {
  white-space: nowrap !important;
  font-weight: 900 !important;
}

.dig-invoice-meta strong {
  text-align: left !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
}

@media print {
  .dig-top-details {
    display: grid !important;
    grid-template-columns: 72mm 1fr 86mm !important;
    column-gap: 8mm !important;
    align-items: start !important;
    margin: 6mm 0 5.5mm 0 !important;
  }

  .dig-client-block {
    grid-column: 1 !important;
    width: auto !important;
    text-align: left !important;
    font-size: 9.7pt !important;
    line-height: 1.24 !important;
  }

  .dig-invoice-meta {
    grid-column: 3 !important;
    width: auto !important;
    font-size: 9.6pt !important;
  }

  .dig-invoice-meta div {
    grid-template-columns: 38mm 1fr !important;
    gap: 3.5mm !important;
    margin-bottom: 2.35mm !important;
  }

  .dig-invoice-meta strong {
    text-align: left !important;
    white-space: nowrap !important;
  }
}
