/* =====================================================================
   قالب‌های فاکتور — چیدمانِ مستقلِ هر قالب (سازنده: static/invoice_doc.js)
   همه‌ی اندازه‌ها pt/mm ان و هیچ قانونی به عرضِ صفحه وابسته نیست، پس صفحه، چاپ،
   PDF و عکس یکی‌ان. پیشوندِ :is(#invoiceViewPageView,html) فقط برای اینه که
   قانون‌ها اسپسیفیسیتیِ «آیدی» بگیرن و قانون‌های عمومیِ جدول/چاپِ app.css روشون اثر نذارن.
   ===================================================================== */

/* ---------- میزبان: کادرِ کلاسیک برای سندِ قالب‌دار برداشته می‌شه ---------- */
#invoiceViewPageView .invoice-container:has(.okd) { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; overflow: visible !important; max-width: none !important; }
#invoiceViewPageView .invoice-container:has(.okd-receipt) { max-width: none !important; }

/* ---------- پایه ---------- */
:is(#invoiceViewPageView, html) .okd { box-sizing: border-box; width: 190mm; max-width: none; min-height: 268mm; margin: 0 auto; background: #fff; color: #1b2030;
  font-size: 9pt; line-height: 1.65; direction: rtl; text-align: right; display: flex; flex-direction: column; position: relative;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .08); font-weight: 400; letter-spacing: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
:is(#invoiceViewPageView, html) .okd *, :is(#invoiceViewPageView, html) .okd *::before, :is(#invoiceViewPageView, html) .okd *::after { box-sizing: border-box; letter-spacing: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
:is(#invoiceViewPageView, html) .okd b { font-weight: 700; }
:is(#invoiceViewPageView, html) .okd table { width: 100%; border-collapse: collapse; table-layout: auto; margin: 0; font-size: inherit; background: none; min-width: 0; }
:is(#invoiceViewPageView, html) .okd th, :is(#invoiceViewPageView, html) .okd td { padding: 6pt 5pt; text-align: center; border: 0; background: none; color: inherit; font-size: inherit; font-weight: inherit; vertical-align: middle; white-space: normal; line-height: 1.55; }
:is(#invoiceViewPageView, html) .okd .nm { text-align: right; }
:is(#invoiceViewPageView, html) .okd .okd-t th:not(.nm), :is(#invoiceViewPageView, html) .okd .okd-t td:not(.nm) { width: 1%; white-space: nowrap; padding-left: 9pt; padding-right: 9pt; }
:is(#invoiceViewPageView, html) .okd .okd-t .nm { overflow-wrap: anywhere; }
:is(#invoiceViewPageView, html) .okd .okd-n { white-space: nowrap; }
:is(#invoiceViewPageView, html) .okd tr { break-inside: avoid; page-break-inside: avoid; }
:is(#invoiceViewPageView, html) .okd .okd-dsc { color: #9a3412; font-size: 7.5pt; font-weight: 400; }
:is(#invoiceViewPageView, html) .okd .okd-tot .okd-r { display: flex; justify-content: space-between; gap: 10pt; padding: 3pt 0; }
:is(#invoiceViewPageView, html) .okd .okd-foot { margin-top: auto; break-inside: avoid; page-break-inside: avoid; }
:is(#invoiceViewPageView, html) .okd .okd-stamp { display: inline-block; vertical-align: bottom; height: 20mm; width: auto; max-width: 34mm; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd img { max-width: 100%; }
:is(#invoiceViewPageView, html) .okd .okd-badge { display: inline-block; margin-top: 6pt; padding: 2pt 10pt; border-radius: 20pt; font-weight: 700; font-size: 8pt; }
:is(#invoiceViewPageView, html) .okd .okd-badge.ok { background: #dcfce7; color: #166534; }
:is(#invoiceViewPageView, html) .okd .okd-badge.part { background: #fef3c7; color: #92400e; }
:is(#invoiceViewPageView, html) .okd .okd-badge.due { background: #fee2e2; color: #991b1b; }

/* ============ مدرن ============ */
:is(#invoiceViewPageView, html) .okd-modern .mo-hd { background: linear-gradient(120deg, #1a2163, #3b4bc8); color: #fff; padding: 22pt 26pt 46pt; display: flex; justify-content: space-between; align-items: flex-start; gap: 16pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-brand { display: flex; gap: 11pt; align-items: center; min-width: 0; }
:is(#invoiceViewPageView, html) .okd-modern .mo-logo { flex: none; width: 46pt; height: 46pt; border-radius: 12pt; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20pt; color: #fff; overflow: hidden; }
:is(#invoiceViewPageView, html) .okd-modern .mo-logo.has-img { background: #fff; padding: 4pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd-modern .mo-bn { font-size: 16pt; font-weight: 800; line-height: 1.4; }
:is(#invoiceViewPageView, html) .okd-modern .mo-ba { opacity: .82; font-size: 8.5pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-meta { text-align: left; flex: none; opacity: .92; font-size: 8.5pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-tt { font-size: 20pt; font-weight: 800; opacity: 1; line-height: 1.4; }
:is(#invoiceViewPageView, html) .okd-modern .mo-cards { display: flex; gap: 11pt; margin: -30pt 26pt 0; }
:is(#invoiceViewPageView, html) .okd-modern .mo-card { background: #fff; border-radius: 12pt; border: 0.75pt solid #dfe3f6; padding: 10pt 13pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-buyer { flex: 1; min-width: 0; }
:is(#invoiceViewPageView, html) .okd-modern .mo-buyer b { font-size: 11pt; display: block; }
:is(#invoiceViewPageView, html) .okd-modern .mo-due { width: 46mm; flex: none; }
:is(#invoiceViewPageView, html) .okd-modern .mo-due b { font-size: 13pt; color: #3b4bc8; display: block; }
:is(#invoiceViewPageView, html) .okd-modern .mo-lb { color: #6b7280; font-size: 8pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-body { padding: 18pt 26pt 20pt; }
:is(#invoiceViewPageView, html) .okd-modern .okd-t thead th { background: #eef0fb; color: #1a2163; font-weight: 700; }
:is(#invoiceViewPageView, html) .okd-modern .okd-t thead th:first-child { border-radius: 0 9pt 9pt 0; }
:is(#invoiceViewPageView, html) .okd-modern .okd-t thead th:last-child { border-radius: 9pt 0 0 9pt; }
:is(#invoiceViewPageView, html) .okd-modern .okd-t tbody tr + tr td { border-top: 0.75pt solid #eef0f5; }
:is(#invoiceViewPageView, html) .okd-modern .mo-sum { display: flex; justify-content: space-between; gap: 18pt; margin-top: 16pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-note { flex: 1; color: #6b7280; line-height: 1.9; min-width: 0; }
:is(#invoiceViewPageView, html) .okd-modern .mo-tot { width: 64mm; flex: none; }
:is(#invoiceViewPageView, html) .okd-modern .okd-r.neg b { color: #dc2626; }
:is(#invoiceViewPageView, html) .okd-modern .mo-final { display: flex; justify-content: space-between; background: #1a2163; color: #fff; border-radius: 10pt; padding: 8pt 11pt; margin: 5pt 0 3pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-final b { font-size: 12pt; }
:is(#invoiceViewPageView, html) .okd-modern .mo-foot { margin: auto 26pt 0; margin-top: auto; padding: 9pt 0 18pt; border-top: 0.75pt solid #eef0f5; display: flex; justify-content: space-between; align-items: flex-end; color: #9ca3af; }
:is(#invoiceViewPageView, html) .okd-modern .mo-sign { display: flex; flex-direction: column; align-items: center; gap: 3pt; }

/* ============ مینیمال ============ */
:is(#invoiceViewPageView, html) .okd-minimal { padding: 30pt 30pt 26pt; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 16pt; padding-bottom: 18pt; border-bottom: 1.6pt solid #111; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-tt { font-size: 26pt; font-weight: 800; line-height: 1.3; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-mu { color: #6b7280; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-sl { text-align: left; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-sl b { font-size: 12pt; display: block; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-logo { display: inline-block; margin-bottom: 5pt; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-logo img { max-height: 14mm; max-width: 40mm; object-fit: contain; filter: grayscale(1); }
:is(#invoiceViewPageView, html) .okd-minimal .mi-parties { display: flex; gap: 34pt; padding: 18pt 0; color: #374151; line-height: 1.9; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-parties > div { min-width: 0; max-width: 70mm; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-lb { color: #9ca3af; font-size: 7.5pt; }
:is(#invoiceViewPageView, html) .okd-minimal .okd-t thead th { color: #9ca3af; font-size: 7.5pt; border-bottom: 0.75pt solid #e5e7eb; font-weight: 400; }
:is(#invoiceViewPageView, html) .okd-minimal .okd-t tbody td { border-bottom: 0.75pt solid #f1f2f4; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-sumw { display: flex; justify-content: flex-end; margin-top: 18pt; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-tot { width: 66mm; color: #374151; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-tot .okd-r b { font-weight: 400; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-final { display: flex; justify-content: space-between; border-top: 1.6pt solid #111; margin: 6pt 0 3pt; padding-top: 8pt; color: #111; font-size: 11pt; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-final b:last-child { font-size: 13pt; }
:is(#invoiceViewPageView, html) .okd-minimal .mi-foot { padding-top: 22pt; color: #9ca3af; line-height: 1.9; display: flex; justify-content: space-between; align-items: flex-end; gap: 16pt; }

/* ============ بین‌المللی ============ */
:is(#invoiceViewPageView, html) .okd-international { padding: 32pt 30pt 24pt; font-size: 9.5pt; }
:is(#invoiceViewPageView, html) .okd-international .in-hd { display: flex; justify-content: space-between; align-items: flex-start; }
:is(#invoiceViewPageView, html) .okd-international .in-tt { font-size: 22pt; font-weight: 800; line-height: 1.3; }
:is(#invoiceViewPageView, html) .okd-international .in-meta { width: auto; margin-top: 10pt; }
:is(#invoiceViewPageView, html) .okd-international .in-meta td { text-align: right; padding: 1.5pt 0 1.5pt 14pt; white-space: nowrap; }
:is(#invoiceViewPageView, html) .okd-international .in-meta td:first-child { font-weight: 700; }
:is(#invoiceViewPageView, html) .okd-international .in-logo { flex: none; width: 40pt; height: 40pt; border-radius: 9pt; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17pt; overflow: hidden; }
:is(#invoiceViewPageView, html) .okd-international .in-logo.has-img { width: auto; max-width: 45mm; height: 16mm; background: none; border-radius: 0; }
:is(#invoiceViewPageView, html) .okd-international .in-logo img { max-height: 100%; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd-international .in-parties { display: flex; gap: 50pt; margin-top: 22pt; line-height: 1.85; }
:is(#invoiceViewPageView, html) .okd-international .in-parties > div { width: 62mm; min-width: 0; }
:is(#invoiceViewPageView, html) .okd-international .in-due { font-size: 15pt; font-weight: 800; margin-top: 24pt; }
:is(#invoiceViewPageView, html) .okd-international .in-pay { color: #635bff; text-decoration: underline; display: inline-block; margin-top: 5pt; }
:is(#invoiceViewPageView, html) .okd-international .okd-t { margin-top: 22pt; }
:is(#invoiceViewPageView, html) .okd-international .okd-t thead th { font-size: 8.5pt; border-bottom: 1.2pt solid #111; font-weight: 700; }
:is(#invoiceViewPageView, html) .okd-international .okd-t .nm { padding-right: 0; }
:is(#invoiceViewPageView, html) .okd-international .okd-t .en { text-align: left; padding-left: 0; }
:is(#invoiceViewPageView, html) .okd-international .in-sumw { display: flex; justify-content: flex-end; margin-top: 12pt; }
:is(#invoiceViewPageView, html) .okd-international .in-tot { width: 72mm; }
:is(#invoiceViewPageView, html) .okd-international .in-r { display: flex; justify-content: space-between; gap: 10pt; padding: 3.5pt 0; border-top: 0.75pt solid #e5e7eb; }
:is(#invoiceViewPageView, html) .okd-international .in-r.b { font-weight: 800; }
:is(#invoiceViewPageView, html) .okd-international .in-notes { margin-top: 18pt; color: #374151; display: flex; justify-content: space-between; align-items: flex-end; gap: 16pt; }
:is(#invoiceViewPageView, html) .okd-international .in-foot { border-top: 0.75pt solid #e5e7eb; padding-top: 8pt; margin-top: 20pt; display: flex; justify-content: space-between; gap: 12pt; color: #374151; font-size: 8pt; }

/* ============ رنگیِ خلاق ============ */
:is(#invoiceViewPageView, html) .okd-creative { flex-direction: row; align-items: stretch; }
:is(#invoiceViewPageView, html) .okd-creative .cr-side { width: 44mm; flex: none; background: #e85d3f; color: #fff; padding: 26pt 14pt; display: flex; flex-direction: column; gap: 18pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-logo { width: 50pt; height: 50pt; border-radius: 50%; background: #fff; color: #e85d3f; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20pt; overflow: hidden; }
:is(#invoiceViewPageView, html) .okd-creative .cr-logo.has-img { padding: 6pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd-creative .cr-lb { opacity: .8; font-size: 8pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-side b { font-size: 11pt; display: block; overflow-wrap: anywhere; }
:is(#invoiceViewPageView, html) .okd-creative .cr-tx { opacity: .92; line-height: 1.8; font-size: 8.5pt; overflow-wrap: anywhere; }
:is(#invoiceViewPageView, html) .okd-creative .cr-due { margin-top: auto; }
:is(#invoiceViewPageView, html) .okd-creative .cr-due b { font-size: 14pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-main { flex: 1; min-width: 0; padding: 26pt 20pt 20pt; display: flex; flex-direction: column; }
:is(#invoiceViewPageView, html) .okd-creative .cr-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-tt { font-size: 26pt; font-weight: 800; color: #e85d3f; line-height: 1.3; }
:is(#invoiceViewPageView, html) .okd-creative .cr-mt { text-align: left; color: #6b7280; }
:is(#invoiceViewPageView, html) .okd-creative .okd-t { margin-top: 20pt; }
:is(#invoiceViewPageView, html) .okd-creative .okd-t thead th { color: #e85d3f; border-bottom: 1.6pt solid #e85d3f; font-weight: 700; }
:is(#invoiceViewPageView, html) .okd-creative .okd-t tbody tr:nth-child(even) td { background: #fff1ec; }
:is(#invoiceViewPageView, html) .okd-creative .cr-sumw { display: flex; justify-content: flex-end; margin-top: 16pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-tot { width: 62mm; }
:is(#invoiceViewPageView, html) .okd-creative .cr-final { display: flex; justify-content: space-between; border-top: 1.6pt solid #e85d3f; padding-top: 7pt; margin: 4pt 0 3pt; color: #e85d3f; }
:is(#invoiceViewPageView, html) .okd-creative .cr-final b:last-child { font-size: 13pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-foot { padding-top: 20pt; display: flex; justify-content: space-between; align-items: flex-end; gap: 14pt; }
:is(#invoiceViewPageView, html) .okd-creative .cr-note { flex: 1; background: #fff1ec; border-radius: 10pt; padding: 9pt 12pt; color: #7c2d12; line-height: 1.8; }

/* ============ رسیدِ فروشگاهی ============ */
:is(#invoiceViewPageView, html) .okd-receipt { width: 80mm; min-height: 0; padding: 5mm 4mm; font-size: 8.5pt; line-height: 1.6; color: #111; display: block; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-hd { text-align: center; line-height: 1.75; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-hd b { font-size: 12pt; display: block; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-logo img { max-height: 14mm; max-width: 40mm; object-fit: contain; display: block; margin: 0 auto 2mm; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-dash { border-top: 1.2pt dashed #111; margin: 7pt 0; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-row { display: flex; justify-content: space-between; gap: 8pt; padding: 1.5pt 0; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-it { margin-bottom: 4pt; break-inside: avoid; page-break-inside: avoid; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-it .rc-row { color: #374151; padding: 0; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-final { font-size: 11.5pt; font-weight: 800; margin-top: 4pt; border-top: 1.2pt solid #111; padding-top: 4pt; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-notes { font-size: 8pt; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-end { text-align: center; margin-top: 10pt; }
:is(#invoiceViewPageView, html) .okd-receipt .okd-qr { width: 24mm; margin: 0 auto; }
:is(#invoiceViewPageView, html) .okd-receipt .okd-qr svg { width: 24mm !important; height: 24mm !important; display: block; }
:is(#invoiceViewPageView, html) .okd-receipt .okd-qr small { display: none; }
:is(#invoiceViewPageView, html) .okd-receipt .okd-qr[hidden] + .rc-qrl { display: none; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-qrl { margin-top: 3pt; font-size: 7.5pt; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-stamp { display: inline-block; height: 18mm; width: auto; max-width: 36mm; margin: 6pt auto 0; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd-receipt .rc-end b { display: block; margin-top: 6pt; }

/* ============ رسمی ============ */
:is(#invoiceViewPageView, html) .okd-official { padding: 20pt 18pt; font-size: 8pt; color: #111; }
:is(#invoiceViewPageView, html) .okd-official .of-hd { display: flex; justify-content: space-between; align-items: center; gap: 10pt; margin-bottom: 7pt; }
:is(#invoiceViewPageView, html) .okd-official .of-mt { width: 48mm; line-height: 1.8; }
:is(#invoiceViewPageView, html) .okd-official .of-tt { font-size: 13pt; text-align: center; flex: 1; }
:is(#invoiceViewPageView, html) .okd-official .of-logo { width: 48mm; display: flex; justify-content: flex-end; align-items: center; height: 14mm; }
:is(#invoiceViewPageView, html) .okd-official .of-logo img { max-height: 14mm; max-width: 40mm; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd-official .of-box td { border: 0.75pt solid #222; padding: 4pt 5pt; text-align: right; }
:is(#invoiceViewPageView, html) .okd-official .of-box td.of-h { background: #e5e7eb; font-weight: 800; text-align: center; }
:is(#invoiceViewPageView, html) .okd-official .of-items { margin-top: 5pt; font-size: 7.5pt; }
:is(#invoiceViewPageView, html) .okd-official .of-items th { background: #e5e7eb; border: 0.75pt solid #222; padding: 4pt 2pt; font-weight: 700; white-space: normal; width: auto; }
:is(#invoiceViewPageView, html) .okd-official .of-items.okd-t th:not(.nm), :is(#invoiceViewPageView, html) .okd-official .of-items.okd-t td:not(.nm) { width: auto; padding: 4pt 2pt; }
:is(#invoiceViewPageView, html) .okd-official .of-items.okd-t th:not(.nm) { white-space: normal; }
:is(#invoiceViewPageView, html) .okd-official .of-items.okd-t .nm { width: 38mm; padding: 4pt 4pt; }
:is(#invoiceViewPageView, html) .okd-official .of-items td { border: 0.75pt solid #222; padding: 4pt 2pt; }
:is(#invoiceViewPageView, html) .okd-official .of-items td.nm { padding-right: 4pt; }
:is(#invoiceViewPageView, html) .okd-official .of-items .of-sum td { font-weight: 800; }
:is(#invoiceViewPageView, html) .okd-official .of-terms { margin-top: 5pt; }
:is(#invoiceViewPageView, html) .okd-official .of-terms td { width: 50%; vertical-align: top; line-height: 1.8; }
:is(#invoiceViewPageView, html) .okd-official .of-sign { display: flex; justify-content: space-around; padding: 30pt 0 10pt; color: #374151; }
:is(#invoiceViewPageView, html) .okd-official .of-sign > div { display: flex; flex-direction: column; align-items: center; gap: 4pt; min-width: 40mm; }

/* ============ شیک ============ */
:is(#invoiceViewPageView, html) .okd-elegant { padding: 20pt; background: #fffdf8; }
:is(#invoiceViewPageView, html) .okd-elegant .el-frame { border: 1.2pt solid #a8833a; flex: 1; padding: 22pt 24pt; display: flex; flex-direction: column; position: relative; }
:is(#invoiceViewPageView, html) .okd-elegant .el-frame::before { content: ''; position: absolute; top: 4pt; right: 4pt; bottom: 4pt; left: 4pt; border: 0.5pt solid #d6c39b; pointer-events: none; }
:is(#invoiceViewPageView, html) .okd-elegant .el-hd { text-align: center; }
:is(#invoiceViewPageView, html) .okd-elegant .el-logo { width: 50pt; height: 50pt; margin: 0 auto 6pt; border-radius: 50%; border: 1.2pt solid #a8833a; display: flex; align-items: center; justify-content: center; color: #a8833a; font-weight: 800; font-size: 19pt; overflow: hidden; }
:is(#invoiceViewPageView, html) .okd-elegant .el-logo.has-img { padding: 7pt; background: #fff; }
:is(#invoiceViewPageView, html) .okd-elegant .el-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
:is(#invoiceViewPageView, html) .okd-elegant .el-bn { font-size: 17pt; font-weight: 800; line-height: 1.4; }
:is(#invoiceViewPageView, html) .okd-elegant .el-sub { color: #a8833a; font-weight: 700; margin-top: 3pt; }
:is(#invoiceViewPageView, html) .okd-elegant .el-meta { display: flex; justify-content: space-between; gap: 16pt; margin: 16pt 0 12pt; padding: 8pt 0; border-top: 0.75pt solid rgba(168, 131, 58, .35); border-bottom: 0.75pt solid rgba(168, 131, 58, .35); line-height: 1.9; }
:is(#invoiceViewPageView, html) .okd-elegant .el-meta span { color: #8a7a5a; }
:is(#invoiceViewPageView, html) .okd-elegant .el-ml { text-align: left; flex: none; }
:is(#invoiceViewPageView, html) .okd-elegant .okd-t thead th { background: #1f1b16; color: #f5e9cf; font-weight: 700; }
:is(#invoiceViewPageView, html) .okd-elegant .okd-t tbody tr:nth-child(even) td { background: #f7f1e3; }
:is(#invoiceViewPageView, html) .okd-elegant .el-sum { display: flex; justify-content: space-between; gap: 16pt; margin-top: 14pt; }
:is(#invoiceViewPageView, html) .okd-elegant .el-words { flex: 1; color: #6b5f48; line-height: 2; font-size: 8.5pt; min-width: 0; }
:is(#invoiceViewPageView, html) .okd-elegant .el-notes { margin-top: 4pt; }
:is(#invoiceViewPageView, html) .okd-elegant .el-tot { width: 64mm; flex: none; }
:is(#invoiceViewPageView, html) .okd-elegant .el-final { display: flex; justify-content: space-between; gap: 8pt; border: 1.2pt solid #a8833a; padding: 7pt 9pt; margin: 5pt 0 3pt; color: #a8833a; }
:is(#invoiceViewPageView, html) .okd-elegant .el-final b:last-child { font-size: 12pt; color: #1f1b16; }
:is(#invoiceViewPageView, html) .okd-elegant .el-sign { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 30pt; color: #8a7a5a; }
:is(#invoiceViewPageView, html) .okd-elegant .el-sign > div { width: 46mm; text-align: center; border-top: 0.75pt solid rgba(168, 131, 58, .55); padding-top: 5pt; display: flex; flex-direction: column-reverse; align-items: center; gap: 4pt; position: relative; }
:is(#invoiceViewPageView, html) .okd-elegant .el-sign .okd-stamp { position: absolute; bottom: 100%; margin-bottom: 4pt; }

/* ---------- چاپ ---------- */
@page okroReceipt { size: 80mm 297mm; margin: 3mm; }
@media print {
  :is(#invoiceViewPageView, html) .okd { zoom: 1 !important; box-shadow: none !important; width: 190mm !important; min-height: 268mm; margin: 0 auto !important; }
  :is(#invoiceViewPageView, html) .okd-receipt { width: 74mm !important; min-height: 0 !important; padding: 0 !important; }
  #invoiceViewPageView .invoice-container:has(.okd) { padding: 0 !important; margin: 0 !important; max-width: none !important; width: 100% !important; }
  #invoiceViewPageView[data-invoice-theme="receipt"] { page: okroReceipt; }
}
