.invoice-preview-page {
  background: #fff;
  color: #111c35;
}

.invoice-preview-page .language-switch {
  display: none;
}

.invoice-hero {
  overflow: hidden;
  padding: 24px 0 72px;
  background:
    radial-gradient(circle at 12% 20%, rgba(75, 209, 255, 0.2), transparent 31%),
    radial-gradient(circle at 82% 18%, rgba(151, 121, 255, 0.2), transparent 34%),
    linear-gradient(135deg, #f4fbff 0%, #f8f7ff 52%, #fff8f5 100%);
}

.invoice-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 0.78fr);
  gap: 72px;
  align-items: start;
  padding-top: 48px;
}

.invoice-hero-copy h1 {
  margin: 15px 0 12px;
  max-width: 720px;
  font-family: Archivo, sans-serif;
  font-size: var(--qa-hero-title-size);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.invoice-hero-copy h1 span {
  display: block;
  color: #286cff;
  font-size: var(--qa-hero-free-size);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.invoice-hero-copy > strong {
  display: block;
  margin-top: 18px;
  color: #1a59dc;
  font: 700 clamp(1.2rem, 2vw, 1.65rem)/1.25 Archivo, sans-serif;
}

.invoice-hero-copy > p {
  max-width: 690px;
  margin: 17px 0 0;
  color: #586884;
  font-size: var(--qa-hero-lead-size);
  line-height: 1.62;
}

.invoice-hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.invoice-hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-hero-benefits span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(36, 107, 253, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #174fc4;
  font-size: 15px;
  font-weight: 800;
}

.invoice-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 14px;
  background: #286cff;
  box-shadow: 0 14px 30px rgba(40, 108, 255, 0.22);
  color: #fff;
  font-size: var(--qa-hero-cta-size);
  font-weight: 800;
  text-decoration: none;
}

.invoice-document-wrap {
  position: relative;
  padding: 18px 22px;
}

.invoice-document-wrap::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(119, 133, 179, 0.2);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 32px 70px rgba(31, 43, 81, 0.15);
  content: "";
}

.invoice-document {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid #dfe5f1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(28, 39, 76, 0.14);
}

.invoice-document-header,
.invoice-document-title,
.invoice-line,
.invoice-document-total,
.invoice-ledger-head,
.invoice-ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.invoice-document-header {
  align-items: flex-start;
}

.invoice-document-header h2 {
  max-width: 270px;
  margin: 0;
  color: #172033;
  font: 800 1.35rem/1.1 Archivo, sans-serif;
  letter-spacing: -0.035em;
}

.invoice-document-number {
  flex: 0 0 auto;
  text-align: right;
}

.invoice-document-number span,
.invoice-document-number strong {
  display: block;
}

.invoice-document-number span,
.invoice-document-title small,
.invoice-payment-instructions small {
  display: block;
  color: #7a879f;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-document-number strong {
  margin-top: 5px;
  color: #172033;
  font-size: 0.92rem;
}

.invoice-document-title small,
.invoice-payment-instructions small {
  margin-top: 7px;
}

.ledger-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.ledger-status.viewed {
  background: #e8f0ff;
  color: #1a59dc;
}

.invoice-document-title {
  margin-top: 25px;
  padding: 20px 0;
  border-top: 1px solid #e8ecf4;
  border-bottom: 1px solid #e8ecf4;
}

.invoice-document-title strong {
  display: block;
  margin-top: 4px;
  font: 800 1.2rem/1 Archivo, sans-serif;
}

.invoice-document-title .invoice-total {
  text-align: right;
}

.invoice-document-title .invoice-total strong {
  color: #1a59dc;
  font-size: 1.52rem;
}

.invoice-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin: 20px 0;
}

.invoice-meta div {
  min-width: 0;
}

.invoice-meta dt {
  color: #8490a6;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invoice-meta dd {
  margin: 4px 0 0;
  color: #24324d;
  font-size: 0.83rem;
  font-weight: 700;
}

.invoice-lines {
  overflow: hidden;
  border: 1px solid #e2e7f0;
  border-radius: 12px;
}

.invoice-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 12px;
  border-top: 1px solid #edf0f6;
  color: #4f5e78;
  font-size: 0.78rem;
}

.invoice-line:first-child {
  border-top: 0;
}

.invoice-line-heading {
  background: #f7f9fc;
  color: #7c889d;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.invoice-line strong {
  color: #22304a;
}

.invoice-document-total {
  padding: 14px 2px 0;
  font-size: 0.84rem;
}

.invoice-document-total strong {
  font-size: 1.1rem;
}

.invoice-payment-instructions {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #d8e3ff;
  border-radius: 13px;
  background: #f3f7ff;
}

.invoice-payment-instructions small {
  margin: 0;
}

.invoice-payment-instructions strong,
.invoice-payment-instructions span {
  display: block;
  margin-top: 4px;
}

.invoice-payment-instructions strong {
  color: #174fc4;
  font-size: 0.85rem;
}

.invoice-payment-instructions span {
  color: #68758e;
  font-size: 0.7rem;
  line-height: 1.45;
}

.invoice-powered-by {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e1e7f0;
  text-align: center;
}

.invoice-powered-by a {
  color: #246bfd;
  text-decoration: none;
}

.invoice-powered-by small {
  display: block;
}

.invoice-powered-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.invoice-powered-brand span {
  color: #7c8598;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.invoice-powered-brand img {
  display: block;
  width: 92px;
  height: auto;
}

.invoice-powered-by small {
  margin-top: 5px;
  color: #68758e;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.4;
}

.invoice-workflow,
.invoice-chat-section,
.invoice-source-section,
.invoice-fields-section,
.invoice-payment-section,
.invoice-ledger-section,
.invoice-faq-section {
  padding: 88px 0;
}

.invoice-section-heading {
  max-width: 850px;
  margin-bottom: 38px;
}

.invoice-section-heading.compact {
  margin-bottom: 0;
}

.invoice-section-heading h2,
.invoice-payment-layout h2 {
  margin: 12px 0 0;
  font: 800 clamp(2rem, 4vw, 3.5rem)/1.02 Archivo, sans-serif;
  letter-spacing: -0.045em;
}

.invoice-section-heading p,
.invoice-payment-layout > div > p,
.invoice-chat-copy > p {
  margin: 16px 0 0;
  color: #60708c;
  font-size: 1.03rem;
  line-height: 1.7;
}

.invoice-chat-layout {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 76px;
  align-items: center;
}

.invoice-chat-phone {
  width: min(100%, 430px);
  justify-self: start;
}

.invoice-chat-phone .chat {
  height: 560px;
}

.invoice-chat-copy h2 {
  max-width: 720px;
  margin: 12px 0 0;
  font: 800 clamp(2rem, 4vw, 3.5rem)/1.02 Archivo, sans-serif;
  letter-spacing: -0.045em;
}

.invoice-chat-points {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.invoice-chat-cta {
  margin-top: 30px;
}

.invoice-chat-points li {
  position: relative;
  padding-left: 24px;
  color: #263754;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.45;
}

.invoice-chat-points li::before {
  content: '';
  position: absolute;
  top: 0.56em;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #246bfe;
}

.invoice-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.invoice-step-grid article,
.invoice-source-grid article,
.invoice-field-grid article,
.invoice-boundary-card,
.invoice-ledger-card {
  border: 1px solid #dfe5f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(34, 47, 82, 0.07);
}

.invoice-step-grid article {
  position: relative;
  padding: 30px;
}

.invoice-step-grid article > span {
  position: absolute;
  top: 24px;
  right: 25px;
  color: #286cff;
  font: 800 2rem/1 Archivo, sans-serif;
}

.invoice-step-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e7f7ff, #f0eaff);
}

.invoice-step-icon svg {
  width: 42px;
  fill: none;
  stroke: #286cff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.invoice-step-grid h3,
.invoice-source-grid h3,
.invoice-field-grid h3,
.invoice-boundary-card h3 {
  margin: 22px 0 0;
  font: 800 1.25rem/1.15 Archivo, sans-serif;
  letter-spacing: -0.025em;
}

.invoice-step-grid p,
.invoice-source-grid p,
.invoice-field-grid p {
  margin: 12px 0 0;
  color: #64728b;
  line-height: 1.65;
}

.invoice-source-section,
.invoice-payment-section,
.invoice-faq-section {
  background: #f6f8fc;
}

.invoice-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 38px;
}

.invoice-source-grid article {
  padding: 32px;
}

.invoice-source-label {
  color: #286cff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-command {
  margin-top: 24px;
  padding: 15px 17px;
  border-radius: 13px;
  background: #eef3ff;
  color: #244a9d;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}

.invoice-fields-layout,
.invoice-payment-layout,
.invoice-ledger-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1fr);
  gap: 68px;
  align-items: center;
}

.invoice-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.invoice-field-grid article {
  padding: 24px;
}

.invoice-field-grid h3 {
  margin-top: 0;
  font-size: 1rem;
}

.invoice-field-grid p {
  font-size: 0.88rem;
}

.invoice-payment-layout h2 {
  max-width: 620px;
}

.invoice-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.invoice-methods span,
.invoice-status-key span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #d4dded;
  border-radius: 999px;
  background: #fff;
  color: #2c3a55;
  font-size: 15px;
  font-weight: 800;
}

.invoice-boundary-card {
  padding: 32px;
}

.invoice-boundary-card > span {
  color: #286cff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-boundary-card h3 {
  margin-top: 12px;
  font-size: 1.55rem;
}

.invoice-boundary-card ul {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.invoice-boundary-card li {
  position: relative;
  padding-left: 28px;
  color: #596880;
  line-height: 1.55;
}

.invoice-boundary-card li::before {
  position: absolute;
  top: 0.13em;
  left: 0;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e6f8ee;
  color: #168c54;
  content: "✓";
  font-size: 0.7rem;
  font-weight: 900;
}

.invoice-status-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.invoice-status-key span {
  min-height: 38px;
  padding: 0 15px;
  font-size: 15px;
}

.invoice-ledger-card {
  overflow: hidden;
}

.invoice-ledger-head {
  padding: 22px 24px;
  border-bottom: 1px solid #e5e9f1;
  background: #f7f9fd;
}

.invoice-ledger-head span {
  color: #d05a31;
  font-size: 0.8rem;
  font-weight: 800;
}

.invoice-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 190px;
  padding: 17px 24px;
  border-top: 1px solid #edf0f5;
}

.invoice-ledger-row:first-of-type {
  border-top: 0;
}

.invoice-ledger-row div strong,
.invoice-ledger-row div span {
  display: block;
}

.invoice-ledger-row div strong {
  font-size: 0.82rem;
}

.invoice-ledger-row div span {
  margin-top: 3px;
  color: #78859b;
  font-size: 0.75rem;
}

.invoice-ledger-row > strong {
  font-size: 0.85rem;
}

.ledger-status.opened {
  background: #fff4d8;
  color: #956600;
}

.ledger-status.overdue {
  background: #ffe7e3;
  color: #b33d29;
}

.ledger-status.paid {
  background: #e4f8ed;
  color: #13784a;
}

.invoice-faq-section .faq-layout {
  align-items: start;
}

@media (max-width: 1000px) {
  .invoice-hero-grid,
  .invoice-chat-layout,
  .invoice-fields-layout,
  .invoice-payment-layout,
  .invoice-ledger-layout {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .invoice-document-wrap {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .invoice-chat-phone {
    margin: 0 auto;
    justify-self: center;
  }

  .invoice-step-grid {
    grid-template-columns: 1fr;
  }

  .invoice-section-heading.compact {
    margin-bottom: 32px;
  }
}

@media (max-width: 720px) {
  .invoice-hero {
    padding-bottom: 48px;
  }

  .invoice-hero-grid {
    padding-top: 30px;
  }

  .invoice-hero-copy h1 {
    font-size: var(--qa-hero-title-size);
  }

  .invoice-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-primary-cta {
    width: 100%;
  }

  .invoice-hero-benefits {
    align-items: center;
  }

  .invoice-document-wrap {
    padding: 4px 0;
  }

  .invoice-document {
    padding: 20px;
    border-radius: 19px;
  }

  .invoice-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .invoice-line > :nth-child(2) {
    grid-column: 1;
    color: #6e788c;
  }

  .invoice-line > :nth-child(3) {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .invoice-line-heading > :nth-child(2) {
    display: none;
  }

  .invoice-line-heading > :nth-child(3) {
    grid-row: 1;
  }

  .invoice-workflow,
  .invoice-chat-section,
  .invoice-source-section,
  .invoice-fields-section,
  .invoice-payment-section,
  .invoice-ledger-section,
  .invoice-faq-section {
    padding: 62px 0;
  }

  .invoice-chat-phone .chat {
    height: 520px;
  }

  .invoice-source-grid,
  .invoice-field-grid {
    grid-template-columns: 1fr;
  }

  .invoice-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
  }

  .invoice-ledger-row .ledger-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .invoice-document-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-document-title .invoice-total {
    text-align: left;
  }

  .invoice-meta {
    grid-template-columns: 1fr;
  }
}
