/* ---------- the invoice (fixed A4 box: 794 x 1123 px at 96 dpi) ---------- */
.paper { --p: #0e5a4b; width: 794px; min-height: 1118px; padding: 52px 54px 36px; background: #fff; color: #1b2421; font: 13px/1.5 var(--font); display: flex; flex-direction: column; }
.paper * { letter-spacing: 0; }
.paper .n { display: inline-block; unicode-bidi: isolate; white-space: nowrap; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.p-seller { max-width: 400px; }
.p-seller img { max-height: 64px; max-width: 200px; display: block; margin-bottom: 10px; }
.p-seller .p-name { font-size: 19px; font-weight: 700; line-height: 1.25; }
.p-seller div, .p-buyer div { overflow-wrap: anywhere; }
.p-muted { color: #68736e; }
.p-title { text-align: end; flex: none; }
.p-title h1 { margin: 0 0 8px; font-size: 31px; line-height: 1; font-weight: 800; color: var(--p); }
.paper[lang="fr"] .p-title h1 { text-transform: uppercase; }
.paper[lang="ar"] .p-title h1 { line-height: 1.3; }
.p-title table { margin-inline-start: auto; border-collapse: collapse; }
.p-title td { padding: 1px 0; }
.p-title td:first-child { color: #68736e; padding-inline-end: 14px; text-align: start; }
.p-title td:last-child { font-weight: 600; text-align: end; }
.p-rule { height: 3px; background: var(--p); margin: 26px 0 22px; border-radius: 2px; }
.p-buyer { background: #f5f2eb; border-radius: 8px; padding: 14px 16px; max-width: 360px; }
.p-buyer .p-label { font-size: 11.5px; color: #68736e; margin-bottom: 3px; }
.p-buyer .p-name { font-size: 15px; font-weight: 700; }
.p-lines { width: 100%; border-collapse: collapse; margin-top: 26px; }
.p-lines th { background: var(--p); color: #fff; font-weight: 600; font-size: 12px; padding: 9px 10px; text-align: end; white-space: nowrap; }
.p-lines th:first-child, .p-lines td:first-child { text-align: start; width: 46%; }
.p-lines td { padding: 10px; border-bottom: 1px solid #e5e0d5; text-align: end; white-space: nowrap; vertical-align: top; }
.p-lines td:first-child { white-space: pre-wrap; overflow-wrap: anywhere; }
.p-lines tr { page-break-inside: avoid; }
.p-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-top: 20px; page-break-inside: avoid; }
.p-info { flex: 1; min-width: 0; }
.p-info p { margin: 0 0 8px; }
.p-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.p-info .p-pf { padding: 6px 9px; border-inline-start: 3px solid var(--p); background: #f6f4ee; font-size: 11px; line-height: 1.45; color: #4a524e; }
.p-totals { width: 290px; flex: none; border-collapse: collapse; }
.p-totals td { padding: 6px 10px; white-space: nowrap; }
.p-totals td:last-child { text-align: end; }
.p-totals tr.grand td { background: var(--p); color: #fff; font-weight: 700; font-size: 15px; padding: 10px; }
.p-words { margin-top: 18px; padding: 10px 14px; border-inline-start: 3px solid var(--p); background: #f5f2eb; page-break-inside: avoid; }
/* a foreign-currency document: its value in dirhams and the rate, under the totals */
.p-fx { margin-top: 14px; margin-inline-start: auto; width: max-content; max-width: 100%; display: grid; gap: 2px; text-align: end; padding: 8px 12px; border: 1px solid #e6e0d2; border-radius: 4px; page-break-inside: avoid; }
.p-fx b { color: var(--p); }
.p-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #e5e0d5; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 11.5px; color: #68736e; }
.p-foot b { color: #1b2421; font-weight: 600; }
.p-spacer { height: 28px; flex: none; }
.p-brand { margin-top: 8px; text-align: center; font-size: 10.5px; color: #9aa39e; }
.stage { direction: ltr; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: var(--sh-2); }
.scaler { width: 794px; transform-origin: 0 0; }
.p-totals tr.disc td { color: #a3301f; }
/* statement of account */
.p-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.p-sum div { background: #f5f2eb; border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.p-sum small { color: #68736e; font-size: 11px; } .p-sum b { font-size: 14px; white-space: nowrap; }
.p-sum div.due { background: var(--p); color: #fff; } .p-sum div.due small { color: rgba(255,255,255,.8); } .p-sum div.due b { font-size: 16px; }
.p-lines.st th:first-child, .p-lines.st td:first-child { width: auto; white-space: nowrap; }
.p-lines.st td:nth-child(3), .p-lines.st th:nth-child(3) { text-align: start; white-space: normal; width: 40%; }
.p-lines.st td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.p-lines.st tr.open td, .p-lines.st tr.tot td { background: #f5f2eb; font-weight: 700; }
.p-lines.st td small { color: #68736e; display: block; font-size: 11px; }
.p-lines.st td.neg { color: #a3301f; }
.p-close { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; padding: 14px 16px; border-radius: 8px; border: 2px solid var(--p); page-break-inside: avoid; }
.p-close b { font-size: 18px; color: var(--p); } .p-close small { color: #68736e; display: block; }
.p-stnote { margin-top: 14px; color: #68736e; font-size: 11.5px; }
.p-accept { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; padding: 12px 16px; border: 1.5px solid var(--p); border-radius: 8px; page-break-inside: avoid; }
.p-accept-txt { display: grid; gap: 2px; } .p-accept-txt b { color: var(--p); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.p-accept img { max-height: 70px; max-width: 220px; }

/* auto-entrepreneur declaration file */
.p-sum.pk-ids { margin-bottom: 10px; }
.p-sum.pk-ids b { font-size: 13px; letter-spacing: .02em; }
.p-sum .pk-amo { font-size: 12px; font-weight: 600; color: #4a524e; }
.p-h2 { margin: 18px 0 6px; font-size: 13px; font-weight: 800; color: var(--p); text-transform: uppercase; letter-spacing: .05em; }
.paper[lang="ar"] .p-h2 { text-transform: none; letter-spacing: 0; }
.p-lines.pk td small { color: #68736e; font-size: 10px; }
.p-check { margin-top: 16px; padding: 10px 14px; border: 1px dashed #cfcac0; border-radius: 6px; font-size: 12px; }
.p-check ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.p-check li { display: flex; align-items: center; gap: 8px; }
.p-check li i { width: 11px; height: 11px; border: 1.5px solid var(--p); border-radius: 2px; flex: none; }

/* activity statement */
.p-sum.two { grid-template-columns: 1fr 1fr; }
.p-sum div.due.neg { background: #a3301f; }
.act-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0 6px; }
.act-col h3 { margin: 0 0 6px; font-size: 12px; font-weight: 800; color: var(--p); text-transform: uppercase; letter-spacing: .05em; }
.paper[lang="ar"] .act-col h3 { text-transform: none; letter-spacing: 0; }
.act-col table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.act-col td { padding: 4px 0; border-bottom: 1px solid #eee9de; }
.act-col td:nth-child(2) { text-align: end; font-weight: 700; white-space: nowrap; }
.act-col .act-pct { width: 44px; text-align: end; color: #68736e; }
.act-none { margin: 0; font-size: 11.5px; color: #68736e; }
.act-vat { width: 60%; margin: 12px 0 0; border-collapse: collapse; font-size: 11.5px; }
.act-vat th { text-align: start; padding: 0 0 4px; font-size: 12px; color: var(--p); }
.act-vat td { padding: 3px 0; } .act-vat td:last-child { text-align: end; white-space: nowrap; }
.act-vat .tot td { border-top: 1px solid #d9d4c8; font-weight: 800; }
.act-vat .act-note { padding-top: 6px; color: #68736e; font-size: 10.5px; text-align: start !important; white-space: normal !important; }
