/* Screen and print document styles. A4 content width = 210mm - two 12mm margins. */
.invoice-paper {
  --invoice-accent: #18344f;
  --invoice-soft: #edf2f6;
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  padding: 15mm 12mm 12mm;
  margin: 0 auto;
  background: #fff;
  color: #263340;
  font-family: 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}
.invoice-paper *, .invoice-paper *::before, .invoice-paper *::after { box-sizing: border-box; }
.invoice-paper h1, .invoice-paper p, .invoice-paper dl, .invoice-paper dd { margin: 0; }
.invoice-paper .ar { font-family: 'Geeza Pro', 'Noto Naskh Arabic', Tahoma, Arial, sans-serif; font-weight: 400; line-height: 1.65; text-align: right; letter-spacing: 0; }
.invoice-label { display: inline-flex; flex-direction: column; gap: 1px; font-size: 8.5pt; color: #52606c; }
.invoice-label > .ar { font-size: 9pt; }
.section-label { margin-bottom: 3mm; font-weight: 600; color: var(--invoice-accent); }
.invoice-header { display: grid; grid-template-columns: 1fr auto; column-gap: 12mm; row-gap: 7mm; margin-bottom: 10mm; }
.company-identity { display: flex; align-items: flex-start; gap: 4mm; min-width: 0; }
.invoice-paper .company-logo { object-fit: contain; width: auto; max-width: 24mm; height: auto; max-height: 22mm; flex-shrink: 0; }
.company-name { margin-bottom: 2mm; font-size: 17pt; font-weight: 700; line-height: 1.25; color: var(--invoice-accent); }
.company-name .ar { font-size: 16pt; margin-top: 2mm; }
.address { color: #52606c; white-space: pre-line; font-size: 9pt; max-width: 85mm; }
.contact-line { font-size: 8.5pt; color: #52606c; }
.legal-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2mm; margin-top: 1mm; font-size: 8pt; color: #52606c; }
.legal-id .invoice-label { font-size: 8pt; }
.invoice-heading { text-align: right; align-self: start; }
.invoice-heading h1 .invoice-label { color: var(--invoice-accent); font-size: 32pt; line-height: 1.1; font-weight: 650; letter-spacing: -1px; }
.invoice-heading h1 .ar { font-size: 23pt; margin-top: 2mm; }
.invoice-meta { grid-column: 2; display: grid; gap: 2.5mm; min-width: 63mm; font-size: 9pt; }
.invoice-meta > div { display: grid; grid-template-columns: minmax(24mm,1fr) minmax(28mm,auto); gap: 5mm; align-items: baseline; }
.invoice-meta dd { text-align: right; font-weight: 600; }
.invoice-parties { padding-top: 5mm; margin-bottom: 9mm; border-top: 1px solid #dce2e7; }
.party { max-width: 100mm; }
.party-name { font-size: 12pt; font-weight: 650; margin-bottom: 1.5mm; }
.party-name .ar { font-size: 12pt; }
.paired-value .en, .paired-value .ar { unicode-bidi: isolate; }
.paired-value .ar { margin-top: 1mm; }
.invoice-items { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 7mm; }
.invoice-items .description-column { width: 49%; }
.invoice-items .quantity-column { width: 11%; }
.invoice-items .price-column { width: 20%; }
.invoice-items .amount-column { width: 20%; }
.invoice-items th { padding: 3mm 2.5mm; background: var(--invoice-accent); text-align: left; font-weight: 600; border-bottom: 1px solid var(--invoice-accent); }
.invoice-items th .invoice-label { color: #fff; }
.invoice-items td { padding: 4mm 2.5mm; border-bottom: 1px solid #e1e6ea; vertical-align: top; }
.invoice-items td.item-description { white-space: pre-line; }
.invoice-items .line-index { display: none; }
.invoice-items .numeric-cell { text-align: right; }
.numeric { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.numeric-cell { font-size: 9pt; }
.line-amount { font-weight: 650; }
.empty-items { color: #66727f; text-align: center; padding: 10mm !important; }
.invoice-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 10mm; }
.invoice-details { flex: 1; min-width: 0; }
.detail-block { margin-bottom: 6mm; font-size: 9pt; }
.detail-block .section-label { margin-bottom: 2mm; }
.long-text { white-space: pre-line; color: #52606c; }
.bank-row { margin-top: 2mm; }
.bank-row > .invoice-label { font-size: 8pt; margin-bottom: .5mm; }
.bank-row .paired-value { font-size: 9pt; }
.bank-number { display: block; font-size: 9pt; overflow-wrap: anywhere; }
.invoice-summary { width: 70mm; flex: 0 0 70mm; padding-top: 1mm; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 4mm; padding: 2mm 0; font-size: 10pt; }
.summary-row > .numeric, .summary-row > span:last-child { text-align: right; }
.grand-total { border-top: 2px solid var(--invoice-accent); margin-top: 3mm; padding: 4mm 0 2mm; color: var(--invoice-accent); font-size: 17pt; font-weight: 700; }
.grand-total .invoice-label { color: var(--invoice-accent); font-size: 11pt; font-weight: 650; }
.total-value { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2mm; }
.currency-code { font-size: 9pt; font-weight: 600; }
.invoice-footer { display: flex; justify-content: space-between; gap: 5mm; margin-top: 12mm; border-top: 1px solid #e1e6ea; padding-top: 3mm; font-size: 8pt; color: #6c7680; }
.invoice-paper .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* 01 Executive: navy business masthead. */
.theme-1 .invoice-header { border-top: 4mm solid var(--invoice-accent); padding-top: 7mm; }
.theme-1 .invoice-summary { background: var(--invoice-soft); padding: 4mm; }
.theme-1 .grand-total { font-size: 16pt; }
/* 02 Editorial: a typeset letter, with double rules and a broad serif title. */
.theme-2 { --invoice-accent: #343d44; font-family: Georgia, 'Times New Roman', serif; line-height: 1.6; }
.theme-2 .invoice-header { grid-template-columns: 1fr 1fr; border-bottom: 3px double var(--invoice-accent); padding-bottom: 6mm; }
.theme-2 .invoice-heading { grid-row: 2; grid-column: 1; text-align: left; align-self: end; }
.theme-2 .invoice-heading h1 .invoice-label { font-size: 42pt; font-weight: 400; }
.theme-2 .company-identity { grid-column: 1 / -1; }
.theme-2 .company-name { font-weight: 400; font-size: 22pt; }
.theme-2 .invoice-meta { grid-column: 2; grid-row: 2; }
.theme-2 .invoice-parties { border-top: 0; padding-top: 0; }
.theme-2 .invoice-items th { background: #fff; border-top: 1px solid #343d44; border-bottom: 1px solid #343d44; }
.theme-2 .invoice-items th .invoice-label { color: #343d44; }
.theme-2 .grand-total { border-top: 3px double #343d44; font-weight: 400; }
/* 03 Cobalt: an architectural, large-title composition. */
.theme-3 { --invoice-accent: #164fca; --invoice-soft: #edf3ff; }
.theme-3 .invoice-heading { grid-column: 1 / -1; grid-row: 1; text-align: left; border-bottom: 1px solid #b7cbf8; padding-bottom: 6mm; }
.theme-3 .invoice-heading h1 .invoice-label { font-size: 51pt; letter-spacing: -2px; font-weight: 750; }
.theme-3 .company-identity { grid-row: 2; }
.theme-3 .invoice-meta { grid-row: 2; border-left: 2px solid var(--invoice-accent); padding-left: 5mm; }
.theme-3 .invoice-parties { border-top: 0; border-left: 2px solid var(--invoice-accent); padding-left: 5mm; padding-top: 0; }
.theme-3 .invoice-items th { background: var(--invoice-soft); border-top: 2px solid var(--invoice-accent); }
.theme-3 .invoice-items th .invoice-label { color: var(--invoice-accent); }
/* 04 Precision: functional mono ledger. */
.theme-4 { --invoice-accent: #30343b; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 9pt; }
.theme-4 .invoice-header { grid-template-columns: 1fr 76mm; border-bottom: 1px solid #30343b; padding-bottom: 5mm; }
.theme-4 .company-name { font-size: 15pt; }
.theme-4 .invoice-heading h1 .invoice-label { font-size: 22pt; font-weight: 500; letter-spacing: 0; }
.theme-4 .invoice-meta { gap: 1mm; }
.theme-4 .invoice-parties { border: 0; padding-top: 0; }
.theme-4 .invoice-items th { background: #fff; border-top: 1px solid #30343b; border-bottom: 1px solid #30343b; }
.theme-4 .invoice-items th .invoice-label { color: #30343b; font-size: 8pt; }
.theme-4 .invoice-items td { border-bottom: 1px dashed #cbd1d6; }
.theme-4 .invoice-items .line-index { display: block; float: left; width: 6mm; color: #7a838c; font-size: 8pt; }
.theme-4 .item-description .paired-value { margin-left: 6mm; }
.theme-4 .grand-total { font-size: 14pt; border-top-width: 1px; }
/* 05 Ledger: an emerald tabular letterhead. */
.theme-5 { --invoice-accent: #176148; --invoice-soft: #edf6f0; }
.theme-5 .invoice-header { display: grid; grid-template-columns: 1fr 70mm; border-left: 3mm solid var(--invoice-accent); padding-left: 6mm; }
.theme-5 .company-identity { grid-row: 1 / 3; }
.theme-5 .invoice-heading { grid-column: 2; text-align: left; }
.theme-5 .invoice-heading h1 .invoice-label { font-size: 29pt; }
.theme-5 .invoice-meta { grid-column: 2; }
.theme-5 .invoice-items th { background: #fff; border-bottom: 2px solid var(--invoice-accent); }
.theme-5 .invoice-items th .invoice-label { color: var(--invoice-accent); }
.theme-5 .invoice-items tbody tr:nth-child(even) { background: var(--invoice-soft); }
.theme-5 .invoice-items td + td { border-left: 1px solid #d9e6de; }
.theme-5 .invoice-summary { border: 1px solid #bdd7c9; padding: 3mm; }
/* 06 Signature: centered formal stationery, burgundy serif details. */
.theme-6 { --invoice-accent: #77283d; font-family: Georgia, 'Times New Roman', serif; }
.theme-6 .invoice-header { grid-template-columns: 1fr; border-top: 1px solid var(--invoice-accent); padding-top: 6mm; gap: 6mm; }
.theme-6 .company-identity { justify-content: center; text-align: center; flex-direction: column; align-items: center; }
.theme-6 .company-name { font-size: 23pt; font-weight: 400; }
.theme-6 .company-identity .address { max-width: 150mm; }
.theme-6 .company-identity .legal-id { justify-content: center; }
.theme-6 .invoice-heading { text-align: center; border-top: 1px solid #d8bac3; padding-top: 5mm; }
.theme-6 .invoice-heading h1 .invoice-label { font-size: 32pt; font-weight: 400; }
.theme-6 .invoice-meta { grid-column: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 4mm 9mm; }
.theme-6 .invoice-meta > div { display: block; }
.theme-6 .invoice-meta dd { text-align: left; margin-top: 1mm; }
.theme-6 .invoice-parties { border-top: 1px solid #d8bac3; }
.theme-6 .invoice-items th { background: #fff; border-bottom: 1px solid var(--invoice-accent); }
.theme-6 .invoice-items th .invoice-label { color: var(--invoice-accent); }
.theme-6 .grand-total { font-weight: 400; }
/* 07 Studio: asymmetric copper composition. */
.theme-7 { --invoice-accent: #914621; }
.theme-7 .invoice-header { grid-template-columns: 1fr 69mm; column-gap: 8mm; }
.theme-7 .invoice-heading { grid-row: 1; grid-column: 1; text-align: left; }
.theme-7 .invoice-heading h1 .invoice-label { font-size: 47pt; font-weight: 750; letter-spacing: -2px; }
.theme-7 .company-identity { grid-row: 1 / 3; grid-column: 2; flex-direction: column; border-left: 1px solid #d8b59f; padding-left: 5mm; }
.theme-7 .company-name { font-size: 15pt; }
.theme-7 .invoice-meta { grid-row: 2; grid-column: 1; max-width: 74mm; min-width: 0; }
.theme-7 .invoice-parties { border-top: 3px solid var(--invoice-accent); }
.theme-7 .invoice-items th { background: #fff; border-bottom: 1px solid #914621; }
.theme-7 .invoice-items th .invoice-label { color: var(--invoice-accent); }
.theme-7 .grand-total { border-top: 3px solid var(--invoice-accent); }
/* Bilingual documents preserve English left to right and Arabic right to left. */
.bilingual .invoice-items .description-column { width: 43%; }
.bilingual .invoice-items .quantity-column { width: 13%; }
.bilingual .invoice-items .price-column, .bilingual .invoice-items .amount-column { width: 22%; }
.bilingual .invoice-items th .invoice-label { width: 100%; }
.bilingual .invoice-items th .ar { text-align: inherit; }
.bilingual .invoice-meta { min-width: 75mm; }
.bilingual .invoice-meta > div { align-items: center; }
.bilingual .invoice-summary { width: 76mm; flex-basis: 76mm; }
.bilingual .summary-row { padding: 2.5mm 0; }
.bilingual .invoice-label { font-size: 8pt; }
.bilingual .invoice-items td { padding-top: 4mm; padding-bottom: 4mm; }
/* 08 Gulf: navy bar and aligned bilingual business blocks. */
.theme-8 { --invoice-accent: #183b5a; --invoice-soft: #edf3f8; }
.theme-8 .invoice-header { border-top: 4mm solid var(--invoice-accent); padding-top: 7mm; grid-template-columns: minmax(0,1fr) 77mm; gap: 7mm; }
.theme-8 .company-identity { grid-row: 1 / 3; flex-direction: column; }
.theme-8 .invoice-heading { grid-column: 2; }
.theme-8 .invoice-heading h1 .invoice-label { font-size: 30pt; }
.theme-8 .invoice-meta { grid-column: 2; }
.theme-8 .invoice-summary { background: var(--invoice-soft); padding: 3mm; }
/* 09 Pearl: centered identity and a paired title on one quiet rule. */
.theme-9 { --invoice-accent: #156461; --invoice-soft: #edf7f5; }
.theme-9 .invoice-header { grid-template-columns: 1fr 1fr; }
.theme-9 .company-identity { grid-column: 1 / -1; justify-content: center; text-align: center; align-items: center; }
.theme-9 .company-identity .ar { text-align: center; }
.theme-9 .company-identity .legal-id { justify-content: center; }
.theme-9 .invoice-heading { grid-column: 1 / -1; grid-row: 2; text-align: left; border-top: 1px solid #a6cfca; border-bottom: 1px solid #a6cfca; padding: 4mm 0; }
.theme-9 .invoice-heading h1 .invoice-label { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; font-size: 28pt; font-weight: 500; }
.theme-9 .invoice-heading h1 .ar { margin-top: 0; font-size: 26pt; }
.theme-9 .invoice-meta { grid-row: 3; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 12mm; }
.theme-9 .invoice-parties { border-top: 0; padding-top: 0; }
.theme-9 .invoice-items th { background: var(--invoice-soft); border-top: 1px solid #a6cfca; border-bottom: 1px solid #a6cfca; }
.theme-9 .invoice-items th .invoice-label { color: var(--invoice-accent); }
.theme-9 .grand-total { border-top-width: 1px; }
/* 10 Desert: gold formal letterhead and a full-width bilingual title. */
.theme-10 { --invoice-accent: #795b17; --invoice-soft: #faf6e9; font-family: Georgia, 'Times New Roman', serif; }
.theme-10 .invoice-header { grid-template-columns: 1fr 77mm; gap: 7mm; border-top: 3px double #795b17; padding-top: 6mm; }
.theme-10 .company-name { font-size: 20pt; font-weight: 400; }
.theme-10 .invoice-heading { grid-row: 1; grid-column: 1 / -1; border-bottom: 1px solid #d7c59b; padding-bottom: 5mm; }
.theme-10 .invoice-heading h1 .invoice-label { display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; font-size: 34pt; font-weight: 400; }
.theme-10 .invoice-heading h1 .ar { margin: 0; font-size: 29pt; }
.theme-10 .company-identity { grid-row: 2; flex-direction: column; }
.theme-10 .invoice-meta { grid-row: 2; }
.theme-10 .invoice-parties { border-top: 1px solid #d7c59b; }
.theme-10 .invoice-items th { background: #fff; border-top: 1px solid #795b17; border-bottom: 3px double #795b17; }
.theme-10 .invoice-items th .invoice-label { color: var(--invoice-accent); }
.theme-10 .grand-total { border-top: 3px double var(--invoice-accent); font-weight: 400; }
/* Print page chrome is excluded from the printed document. */
.print-body { margin: 0; background: #e9edf1; color: #263340; font-family: 'Avenir Next', 'Segoe UI', Arial, sans-serif; }
.print-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; max-width: 1000px; margin: 0 auto; padding: 18px 24px; }
.print-toolbar a, .print-toolbar button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border-radius: 6px; border: 1px solid #c6d0da; color: #18344f; background: #fff; text-decoration: none; font: inherit; font-size: 14px; cursor: pointer; }
.print-toolbar button { background: #18344f; color: #fff; border-color: #18344f; }
.print-toolbar button:disabled { opacity: .5; cursor: default; }
.print-toolbar a:focus-visible, .print-toolbar button:focus-visible { outline: 3px solid #2b75d6; outline-offset: 3px; }
.print-toolbar-actions { display: flex; gap: 10px; }
.print-help { max-width: 210mm; margin: 0 auto 18px; padding: 0 10px; font-size: 13px; line-height: 1.6; color: #51616f; }
.print-status { text-align: center; margin: 70px auto; max-width: 500px; padding: 24px; }
.print-body .invoice-paper { box-shadow: 0 3px 25px #23384d18; margin-bottom: 30px; }
@media screen and (max-width: 820px) {
  .print-document { overflow-x: auto; padding: 0 12px; }
  .print-body .invoice-paper { margin: 0 auto 24px; }
}
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body, .print-body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .print-toolbar, .print-help, .print-status, .no-print { display: none !important; }
  .print-document { margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  .invoice-paper, .print-body .invoice-paper { width: 100% !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; border: none !important; overflow: visible !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .invoice-header, .invoice-parties { break-inside: avoid; page-break-inside: avoid; }
  .invoice-items { page-break-inside: auto; break-inside: auto; }
  .invoice-items thead { display: table-header-group; }
  .invoice-items tbody { page-break-inside: auto; break-inside: auto; }
  .invoice-items tr { page-break-inside: avoid; break-inside: avoid; }
  .invoice-items td, .invoice-items th { overflow: visible; }
  .invoice-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 65mm; gap: 6mm; align-items: start; }
  .invoice-summary { width: 100% !important; min-width: 0; margin-left: auto; margin-bottom: 0; break-inside: avoid; page-break-inside: avoid; }
  /* Share the available A4 width instead of stacking long notes and terms.
     Keep normal page flow for invoices whose actual content needs more pages. */
  .invoice-details { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6mm; align-items: start; }
  .invoice-details > .detail-block:only-child { grid-column: 1 / -1; }
  .detail-block { break-inside: avoid; page-break-inside: avoid; }
  .invoice-footer { clear: both; margin-top: 5mm; break-inside: avoid; page-break-inside: avoid; }
}
/* Graphical collection. Every ornament stays within the flowing header. */
.theme-11 .invoice-header, .theme-12 .invoice-header, .theme-13 .invoice-header,
.theme-14 .invoice-header, .theme-15 .invoice-header, .theme-16 .invoice-header,
.theme-17 .invoice-header, .theme-18 .invoice-header, .theme-19 .invoice-header,
.theme-20 .invoice-header { position: relative; isolation: isolate; }
/* 11 Obsidian: a midnight masthead edged with gold. */
.theme-11 { --invoice-accent: #252936; --invoice-soft: #f5f2e9; }
.theme-11 .invoice-header { padding: 8mm 7mm; color: #fff; border-bottom: 3px double #b79a57; grid-template-columns: minmax(0,1fr) 66mm; gap: 7mm; }
.theme-11 .invoice-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, #252936 0%, #252936 72%, #303745 72%, #303745 100%); }
.theme-11 .company-identity { grid-row: 1 / 3; flex-direction: column; }
.theme-11 .company-name { font-family: Georgia, 'Times New Roman', serif; color: #f4e2ad; font-size: 22pt; font-weight: 400; }
.theme-11 .invoice-heading { grid-column: 2; }
.theme-11 .invoice-heading h1 .invoice-label { font-family: Georgia, 'Times New Roman', serif; font-size: 31pt; color: #fff; font-weight: 400; }
.theme-11 .invoice-meta { grid-column: 2; min-width: 0; }
.theme-11 .invoice-header .address, .theme-11 .invoice-header .contact-line,
.theme-11 .invoice-header .legal-id, .theme-11 .invoice-header .invoice-meta .invoice-label { color: #e0e4eb; }
.theme-11 .invoice-header .legal-id .invoice-label { color: #e0e4eb; }
.invoice-paper.theme-11 .company-logo { padding: 1.5mm; background: #fff; }
.theme-11 .invoice-parties { border-top: 0; padding-top: 0; }
.theme-11 .invoice-items th { background: #f5f2e9; border-top: 1px solid #b79a57; border-bottom: 1px solid #b79a57; }
.theme-11 .invoice-items th .invoice-label { color: #252936; }
.theme-11 .grand-total { border-top: 3px double #b79a57; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
/* 12 Azure: architectural facets in a full-width blue title banner. */
.theme-12 { --invoice-accent: #1456b7; --invoice-soft: #edf4ff; }
.theme-12 .invoice-header { grid-template-columns: 1fr 73mm; gap: 7mm; }
.theme-12 .invoice-header::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 29mm; background: linear-gradient(132deg, transparent 66%, #3b84dd 66%, #3b84dd 78%, transparent 78%), linear-gradient(48deg, #1456b7 68%, #1c64c8 68%, #1c64c8 91%, #0b418d 91%); }
.theme-12 .invoice-heading { grid-row: 1; grid-column: 1 / -1; text-align: left; min-height: 29mm; padding: 6mm 7mm; }
.theme-12 .invoice-heading h1 .invoice-label { color: #fff; font-size: 40pt; letter-spacing: -1.5px; }
.theme-12 .company-identity { grid-row: 2; }
.theme-12 .invoice-meta { grid-row: 2; grid-column: 2; min-width: 0; padding-left: 5mm; border-left: 2px solid #1456b7; }
.theme-12 .invoice-parties { border-top: 1px solid #b9d2f6; }
.theme-12 .invoice-items th { background: #edf4ff; border-bottom: 2px solid #1456b7; }
.theme-12 .invoice-items th .invoice-label { color: #1456b7; }
.theme-12 .invoice-summary { border-top: 2px solid #1456b7; }
.theme-12 .grand-total { border-top: 0; background: #edf4ff; padding: 3mm; }
/* 13 Coral: overlapping curves and expressive serif stationery. */
.theme-13 { --invoice-accent: #933a43; --invoice-soft: #fbf1f2; font-family: Georgia, 'Times New Roman', serif; }
.theme-13 .invoice-header { padding-top: 22mm; border-bottom: 1px solid #d8afb5; padding-bottom: 6mm; }
.theme-13 .invoice-header::before { content: ''; position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: 16mm; background: radial-gradient(ellipse 85mm 23mm at 2% -30%, #933a43 0 72%, transparent 73%), radial-gradient(ellipse 95mm 21mm at 100% -12%, #dfb1b8 0 75%, transparent 76%), #fbf1f2; }
.theme-13 .company-name { font-size: 21pt; font-weight: 400; }
.theme-13 .invoice-heading h1 .invoice-label { font-size: 39pt; font-weight: 400; }
.theme-13 .invoice-parties { border-top: 0; padding-top: 0; }
.theme-13 .invoice-items th { background: #fbf1f2; border-top: 1px solid #d8afb5; border-bottom: 1px solid #d8afb5; }
.theme-13 .invoice-items th .invoice-label { color: #933a43; }
.theme-13 .invoice-items td { border-bottom-color: #ead6da; }
.theme-13 .invoice-summary { border-bottom: 3px double #933a43; padding-bottom: 3mm; }
.theme-13 .grand-total { border-top: 1px solid #d8afb5; font-weight: 400; }
/* 14 Canopy: a graphic frame with cut corner lines. */
.theme-14 { --invoice-accent: #285740; --invoice-soft: #eff5ef; }
.theme-14 .invoice-header { padding: 7mm; border: 1px solid #aac0b1; grid-template-columns: minmax(0,1fr) 66mm; gap: 6mm; }
.theme-14 .invoice-header::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(#285740,#285740) top left / 21mm 1.5mm no-repeat, linear-gradient(#285740,#285740) top left / 1.5mm 17mm no-repeat, linear-gradient(#285740,#285740) bottom right / 21mm 1.5mm no-repeat, linear-gradient(#285740,#285740) bottom right / 1.5mm 17mm no-repeat; }
.theme-14 .company-identity { grid-row: 1 / 3; flex-direction: column; }
.theme-14 .company-name { font-family: Georgia, 'Times New Roman', serif; font-size: 21pt; font-weight: 400; }
.theme-14 .invoice-heading { grid-column: 2; }
.theme-14 .invoice-heading h1 .invoice-label { font-size: 30pt; font-weight: 500; }
.theme-14 .invoice-meta { grid-column: 2; min-width: 0; }
.theme-14 .invoice-parties { border-top: 0; padding-top: 0; padding-left: 3mm; border-left: 1.5mm solid #285740; }
.theme-14 .invoice-items th { background: #eff5ef; border-top: 1px solid #285740; border-bottom: 1px solid #aac0b1; }
.theme-14 .invoice-items th .invoice-label { color: #285740; }
.theme-14 .invoice-summary { padding: 3mm; border: 1px solid #aac0b1; }
.theme-14 .grand-total { font-family: Georgia, 'Times New Roman', serif; border-top-width: 1px; font-weight: 400; }
/* 15 Indigo: a split column header anchored by a dark company rail. */
.theme-15 { --invoice-accent: #3f3c81; --invoice-soft: #f0eff8; }
.theme-15 .invoice-header { grid-template-columns: minmax(0,44%) minmax(0,1fr); column-gap: 8mm; row-gap: 5mm; padding: 6mm 0; }
.theme-15 .invoice-header::before { content: ''; position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: 44%; background: linear-gradient(160deg,#3f3c81 0 75%,#575496 75%); }
.theme-15 .company-identity { grid-column: 1; grid-row: 1 / 3; flex-direction: column; padding: 0 6mm; }
.theme-15 .company-name { color: #fff; font-size: 19pt; }
.theme-15 .invoice-header .address, .theme-15 .invoice-header .contact-line,
.theme-15 .invoice-header .legal-id, .theme-15 .invoice-header .legal-id .invoice-label { color: #ebeaf6; }
.invoice-paper.theme-15 .company-logo { padding: 1mm; background: #fff; }
.theme-15 .invoice-heading { grid-column: 2; text-align: left; }
.theme-15 .invoice-heading h1 .invoice-label { font-size: 36pt; font-weight: 500; }
.theme-15 .invoice-meta { grid-column: 2; min-width: 0; }
.theme-15 .invoice-parties { border-top: 1px solid #c9c7e4; }
.theme-15 .invoice-items th { background: #3f3c81; }
.theme-15 .invoice-items td:nth-child(4) { background: #f0eff8; }
.theme-15 .grand-total { font-size: 18pt; border-top: 3px solid #3f3c81; }
/* 16 Graphite: technical drafting grid and bold typographic rhythm. */
.theme-16 { --invoice-accent: #323b43; --invoice-soft: #f3f5f6; font-family: 'Helvetica Neue', Arial, sans-serif; }
.theme-16 .invoice-header { grid-template-columns: minmax(0,1fr) 71mm; padding: 6mm; gap: 8mm; border: 1px solid #bdc7ce; }
.theme-16 .invoice-header::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(#e5e9ec 1px,transparent 1px),linear-gradient(90deg,#e5e9ec 1px,transparent 1px); background-size: 5mm 5mm; background-color: #fafbfc; }
.theme-16 .invoice-heading { grid-column: 1; grid-row: 1; text-align: left; }
.theme-16 .invoice-heading h1 .invoice-label { font-size: 44pt; font-weight: 750; letter-spacing: -2px; }
.theme-16 .company-identity { grid-column: 1; grid-row: 2; flex-direction: column; }
.theme-16 .company-name { font-size: 16pt; }
.theme-16 .invoice-meta { grid-column: 2; grid-row: 1 / 3; align-content: end; min-width: 0; border-left: 1px solid #bdc7ce; padding-left: 5mm; }
.theme-16 .invoice-parties { border-top: 0; padding-top: 0; }
.theme-16 .invoice-items th { background: #fff; border-top: 2px solid #323b43; border-bottom: 1px solid #bdc7ce; }
.theme-16 .invoice-items th .invoice-label { color: #323b43; }
.theme-16 .invoice-items td + td { border-left: 1px solid #e1e6ea; }
.theme-16 .invoice-summary { padding: 3mm; border-top: 2px solid #323b43; border-bottom: 1px solid #bdc7ce; }
.theme-16 .grand-total { border-top: 1px solid #bdc7ce; }
/* 17 Atelier: a pale mauve arch supporting a refined title. */
.theme-17 { --invoice-accent: #754d68; --invoice-soft: #f4edf2; font-family: Georgia, 'Times New Roman', serif; }
.theme-17 .invoice-header { grid-template-columns: minmax(0,1fr) 76mm; column-gap: 8mm; row-gap: 6mm; padding-top: 6mm; min-height: 64mm; }
.theme-17 .invoice-header::before { content: ''; position: absolute; z-index: -1; right: 0; top: 0; width: 76mm; height: 64mm; border-radius: 38mm 38mm 0 0; background: #f4edf2; border: 1px solid #d9c5d3; }
.theme-17 .company-identity { grid-column: 1; grid-row: 1 / 3; flex-direction: column; padding-top: 5mm; }
.theme-17 .company-name { font-size: 24pt; font-weight: 400; }
.theme-17 .invoice-heading { grid-column: 2; text-align: center; padding: 9mm 5mm 0; }
.theme-17 .invoice-heading h1 .invoice-label { font-size: 34pt; font-weight: 400; }
.theme-17 .invoice-meta { grid-column: 2; min-width: 0; padding: 0 5mm 5mm; font-size: 8.5pt; }
.theme-17 .invoice-meta > div { gap: 3mm; grid-template-columns: minmax(22mm,1fr) minmax(24mm,auto); }
.theme-17 .invoice-parties { border-top: 1px solid #d9c5d3; }
.theme-17 .invoice-items th { background: #f4edf2; border-bottom: 1px solid #d9c5d3; }
.theme-17 .invoice-items th .invoice-label { color: #754d68; }
.theme-17 .grand-total { border-top: 1px solid #754d68; font-size: 18pt; font-weight: 400; }
/* 18 Royal: a navy title band, gold inset frame, and paired lettering. */
.theme-18 { --invoice-accent: #233a57; --invoice-soft: #f7f4ea; }
.theme-18 .invoice-header { grid-template-columns: minmax(0,1fr) 77mm; column-gap: 8mm; row-gap: 8mm; }
.theme-18 .invoice-header::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 25mm; background: linear-gradient(135deg,#233a57 72%,#2f4967 72%); }
.theme-18 .invoice-header::after { content: ''; position: absolute; z-index: -1; left: 2mm; right: 2mm; top: 2mm; height: 21mm; border: 1px solid #c4a95e; background: linear-gradient(#c4a95e,#c4a95e) top left / 10mm 2px no-repeat,linear-gradient(#c4a95e,#c4a95e) bottom right / 10mm 2px no-repeat; }
.theme-18 .invoice-heading { grid-column: 1 / -1; grid-row: 1; min-height: 25mm; padding: 6mm 7mm; }
.theme-18 .invoice-heading h1 .invoice-label { display: flex; flex-direction: row; justify-content: space-between; align-items: center; color: #f5e5b8; font-family: Georgia, 'Times New Roman', serif; font-size: 30pt; font-weight: 400; }
.theme-18 .invoice-heading h1 .ar { margin: 0; font-size: 27pt; }
.theme-18 .company-identity { grid-column: 1; grid-row: 2; flex-direction: column; }
.theme-18 .company-name { font-family: Georgia, 'Times New Roman', serif; font-size: 19pt; font-weight: 400; }
.theme-18 .invoice-meta { grid-column: 2; grid-row: 2; }
.theme-18 .invoice-parties { border-top: 1px solid #d5c490; }
.theme-18 .invoice-items th { background: #f7f4ea; border-top: 1px solid #baa05a; border-bottom: 1px solid #baa05a; }
.theme-18 .invoice-items th .invoice-label { color: #233a57; }
.theme-18 .invoice-summary { padding: 3mm; border: 1px solid #d5c490; }
.theme-18 .grand-total { border-top: 3px double #baa05a; }
/* 19 Oasis: sweeping turquoise geometry and a spacious dual-language banner. */
.theme-19 { --invoice-accent: #126764; --invoice-soft: #edf8f6; }
.theme-19 .invoice-header { grid-template-columns: minmax(0,1fr) 77mm; column-gap: 8mm; row-gap: 8mm; }
.theme-19 .invoice-header::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 29mm; background: radial-gradient(ellipse 70mm 42mm at 101% 150%,transparent 57%,#23817c 58% 62%,transparent 63% 68%,#23817c 69% 74%,transparent 75%),linear-gradient(112deg,#126764 0 62%,#17736e 62%); }
.theme-19 .invoice-heading { grid-column: 1 / -1; grid-row: 1; min-height: 29mm; padding: 7mm; }
.theme-19 .invoice-heading h1 .invoice-label { display: flex; flex-direction: row; justify-content: space-between; align-items: center; font-size: 31pt; color: #fff; font-weight: 500; }
.theme-19 .invoice-heading h1 .ar { margin: 0; font-size: 28pt; }
.theme-19 .company-identity { grid-column: 1; grid-row: 2; flex-direction: column; }
.theme-19 .invoice-meta { grid-column: 2; grid-row: 2; border-left: 1px solid #a6d1ca; padding-left: 4mm; }
.theme-19 .invoice-parties { border-top: 0; padding-top: 0; padding-left: 4mm; border-left: 2px solid #126764; }
.theme-19 .invoice-items th { background: #edf8f6; border-top: 1px solid #a6d1ca; border-bottom: 2px solid #126764; }
.theme-19 .invoice-items th .invoice-label { color: #126764; }
.theme-19 .invoice-summary { background: #edf8f6; padding: 3mm; }
.theme-19 .grand-total { border-top: 1px solid #126764; }
/* 20 Majlis: geometric plum inlays on formal, spacious stationery. */
.theme-20 { --invoice-accent: #6e365c; --invoice-soft: #f7eff5; font-family: Georgia, 'Times New Roman', serif; }
.theme-20 .invoice-header { grid-template-columns: minmax(0,1fr) 77mm; column-gap: 8mm; row-gap: 7mm; padding-top: 16mm; }
.theme-20 .invoice-header::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 8mm; background: linear-gradient(135deg,transparent 42%,#b58baa 42% 48%,transparent 48%),linear-gradient(45deg,#6e365c 38%,#874a73 38% 50%,#6e365c 50% 62%,#874a73 62%); background-size: 16mm 16mm; border-top: 1px solid #6e365c; border-bottom: 1px solid #6e365c; }
.theme-20 .company-identity { grid-column: 1; grid-row: 1; flex-direction: column; }
.theme-20 .company-name { font-size: 21pt; font-weight: 400; }
.theme-20 .invoice-meta { grid-column: 2; grid-row: 1; }
.theme-20 .invoice-heading { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid #d5b8cd; border-bottom: 1px solid #d5b8cd; padding: 4mm 0; }
.theme-20 .invoice-heading h1 .invoice-label { display: flex; flex-direction: row; justify-content: space-between; align-items: center; font-size: 33pt; font-weight: 400; }
.theme-20 .invoice-heading h1 .ar { margin: 0; font-size: 29pt; }
.theme-20 .invoice-parties { border-top: 0; padding-top: 0; }
.theme-20 .invoice-items th { background: #f7eff5; border-top: 1px solid #d5b8cd; border-bottom: 1px solid #6e365c; }
.theme-20 .invoice-items th .invoice-label { color: #6e365c; }
.theme-20 .grand-total { border-top: 3px double #6e365c; font-weight: 400; }
