/* Munshi — every printout (cause list, client profile, case summary, receipts, invoices, statements, intake, agreements).
   One calm, professional look: firm letterhead on top, clean tables, Munshi logo in the footer of every page. */
/* the look (shared by printing and by the picture made for WhatsApp) */

  .doc { color: #1b1d22; font: 10pt/1.45 -apple-system, "Segoe UI", Helvetica, Arial, "Noto Sans Devanagari", sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc * { box-sizing: border-box; }

  /* ---------- Munshi ribbon (every printout) ---------- */
  .doc .mrib { display: flex; align-items: center; justify-content: flex-end; gap: 1.6mm; margin: 0 0 2mm; color: #1b1d22; }
  .doc .mrib .mrib-t { font: 7pt Arial, sans-serif; color: #8a8e97; letter-spacing: .3pt; text-transform: uppercase; margin-right: .6mm; }
  .doc .mrib .bmark { width: 5.2mm; height: 5.2mm; border-radius: 1.3mm; }
  .doc .mrib .wordmark { height: 4.4mm; width: auto; }
  /* ---------- letterhead ---------- */
  .doc .lh2 { display: grid; grid-template-columns: 22mm 1fr 22mm; align-items: center; gap: 4mm; padding: 0 0 3mm; }
  .doc .lh2 .lh-l, .doc .lh2 .lh-r { height: 20mm; display: flex; align-items: center; }
  .doc .lh2 .lh-l { justify-content: flex-start; } .doc .lh2 .lh-r { justify-content: flex-end; }
  .doc .lh2 .lh-l img { max-height: 20mm; max-width: 22mm; object-fit: contain; }
  .doc .lh2 .lh-l .bmark { width: 15mm; height: 15mm; border-radius: 3.5mm; }
  .doc .lh2 .lh-r img { width: 18mm; height: 18mm; object-fit: cover; border-radius: 50%; border: .4mm solid #e7e2d8; }
  .doc .lh2 .lh-c { text-align: center; }
  .doc .lh2 .lh-n { font: 700 19pt/1.1 Georgia, "Times New Roman", serif; letter-spacing: .3pt; color: #14161b; }
  .doc .lh2 .lh-t { font: italic 10pt/1.3 Georgia, serif; color: #6b6f7a; margin-top: 1mm; }
  .doc .lh2 .lh-a { font-size: 8.6pt; color: #4a4e57; margin-top: 1.2mm; }
  .doc .lh2 .lh-ct { font-size: 8.6pt; color: #4a4e57; }
  .doc .lh-rule { height: 2.2mm; margin: 0 0 6mm; border-top: .7mm solid #14161b; border-bottom: .3mm solid #ff6b1a; }

  /* ---------- document title ---------- */
  .doc h2 { text-align: center !important; font: 700 13pt/1.2 Georgia, "Times New Roman", serif; letter-spacing: 2.2pt; text-transform: uppercase; color: #14161b; margin: 0 0 1.5mm; }
  .doc h2 + p, .doc .dh-m { text-align: center; color: #6b6f7a; font-size: 9pt; margin: 0 0 5mm; }
  .doc .dh-m b { color: #1b1d22; }
  .doc h3 { font: 700 10.5pt/1.3 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: #14161b; margin: 6mm 0 2mm; padding: 1.4mm 3mm; background: #f6f3ee; border-left: 1.2mm solid #ff6b1a; border-radius: 0 1.5mm 1.5mm 0; }

  /* ---------- tables ---------- */
  .doc table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 4mm; border: .3mm solid #ddd8ce; border-radius: 2mm; overflow: hidden; page-break-inside: auto; }
  .doc tr { page-break-inside: avoid; }
  .doc th, .doc td { border: 0; border-bottom: .25mm solid #e9e5dd; padding: 1.8mm 2.4mm; vertical-align: top; text-align: left; font-size: 9.4pt; }
  .doc th { background: #1b1d22; color: #fff; font-weight: 600; font-size: 8.6pt; letter-spacing: .3pt; text-transform: uppercase; }
  .doc tr:last-child td { border-bottom: 0; }
  .doc tbody tr:nth-child(even) td, .doc table tr:nth-child(even) td { background: #faf8f4; }
  .doc td small, .doc td .small { color: #6b6f7a; font-size: 8.4pt; }
  .doc table.kv td:first-child, .doc table td[style*="width:30%"], .doc table td[style*="width:35%"] { width: 32%; color: #6b6f7a; font-weight: 600; font-size: 8.8pt; background: #faf8f4 !important; }
  .doc table.kv td:last-child { font-weight: 500; }
  .doc .tot td, .doc tr.tot th { background: #f6f3ee !important; color: #14161b; font-weight: 700; border-top: .4mm solid #14161b; }
  .doc .num-r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .doc .ourstar { color: #ff6b1a; }

  /* ---------- blocks ---------- */
  .doc .amt-box { display: flex; justify-content: space-between; align-items: center; margin: 4mm 0; padding: 4mm 5mm; border-radius: 2.5mm; background: #f6f3ee; border: .3mm solid #e2dccf; }
  .doc .amt-box .l { font-size: 9pt; color: #6b6f7a; text-transform: uppercase; letter-spacing: .5pt; }
  .doc .amt-box .v { font: 700 17pt/1 Georgia, serif; color: #14161b; }
  .doc .amt-box .w { font-size: 8.8pt; color: #4a4e57; font-style: italic; }
  .doc .sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16mm; page-break-inside: avoid; }
  .doc .sign div { text-align: center; min-width: 55mm; font-size: 9pt; color: #4a4e57; }
  .doc .sign div::before { content: ''; display: block; border-top: .3mm solid #1b1d22; margin-bottom: 1.5mm; }
  .doc .note { font-size: 8.6pt; color: #6b6f7a; margin-top: 4mm; }
  .doc .pill-p { display: inline-block; padding: .3mm 2mm; border-radius: 3mm; font-size: 8pt; font-weight: 700; background: #fff1e8; color: #c2410c; }
  .doc .daybar { display: flex; justify-content: space-between; align-items: baseline; margin: 5mm 0 2mm; padding: 2mm 3.5mm; background: #1b1d22; color: #fff; border-radius: 2mm; page-break-after: avoid; }
  .doc .daybar b { font: 700 11pt Georgia, serif; } .doc .daybar span { font-size: 8.6pt; opacity: .8; }
  .doc .courtrow td { background: #fff4ec !important; font-weight: 700; color: #9a3412; font-size: 9pt; border-bottom: .3mm solid #f3c9ad; }
  .doc .fill { border-bottom: .3mm dotted #9a9a9a; min-height: 6mm; }
  .doc .pb { page-break-before: always; }
  .doc pre { white-space: pre-wrap; font: 9.5pt/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }

  /* ---------- page wrapper (keeps room for the footer on every page) ---------- */
  .doc table.pgw { border: 0 !important; border-radius: 0; overflow: visible; margin: 0; width: 100%; }
  .doc table.pgw > tbody > tr > td, .doc table.pgw > tfoot > tr > td { padding: 0 !important; border: 0 !important; background: none !important; font-size: 10pt; }
  .doc table.pgw > tbody > tr { page-break-inside: auto; }
  .doc .pg-sp { height: 17mm; }
  /* ---------- footer on every page: Munshi logo ---------- */
  .doc .mfoot { position: fixed; left: 0; right: 0; bottom: 0; display: flex !important; align-items: center; justify-content: space-between; gap: 6mm; margin: 0; padding-top: 2mm; border-top: .25mm solid #ddd8ce; font: 7.6pt Arial, sans-serif; color: #8a8e97; }
  .doc .mfoot .mf-s { flex: 1; } .doc .mfoot .mf-s:last-child { text-align: right; }
  .doc .mfoot .mf-b { display: flex; flex-direction: column; align-items: center; gap: .6mm; }
  .doc .mfoot .wordmark { height: 5.6mm !important; width: auto; color: #1b1d22; display: block; }
  .doc .mfoot .mf-t { line-height: 0; color: #8a8e97; } .doc .mfoot .mf-t .tagsvg { height: 1.5mm; margin: .4mm auto 0; }

/* printing */
@media print {
  @page { size: A4; margin: 13mm 13mm 6mm 13mm; }
  html, body { background: #fff !important; }
  body::before, body::after, #mload, #app, #modal, #toast, #bottom, #side { display: none !important; }
  #print.land { }
  #print { display: block !important; }
  #print .mfoot { position: fixed; }
}
/* picture for sharing: an A4-wide page drawn off screen */
.doc.shot { position: fixed; left: -12000px; top: 0; width: 210mm; padding: 12mm 13mm 8mm; background: #fff; z-index: -1; }
.doc.shot .mfoot { position: static !important; margin-top: 8mm; }
.doc.shot .pg-sp { display: none; }
.doc:not(.shot) .mfoot { background: #fff; }
.doc.shot.land { width: 297mm; }
