/* =====================================================================
   Print styles — receipts, vouchers, registration forms and reports.
   Printing from the browser is also the route for Urdu documents, since
   the Nastaliq web font renders correctly here.
   ===================================================================== */

.print-only { display: none; }

@media print {
  @page { size: A4; margin: 12mm; }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .sidebar, .topbar, .mobile-nav, .toasts, .sidebar-scrim,
  .no-print, .filters, .pagination, .tabs, .btn, .icon-btn,
  .modal-foot, .modal-head .close { display: none !important; }

  .app { display: block !important; }
  .content { padding: 0 !important; }
  .modal-backdrop { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
  .modal { width: 100% !important; max-height: none !important; box-shadow: none !important; border: 0 !important; }
  .modal-body { overflow: visible !important; padding: 0 !important; }

  .card, .kpi { break-inside: avoid; border: 1px solid #ccc !important; box-shadow: none !important; }
  table { break-inside: auto; }
  tr { break-inside: avoid; break-after: auto; }
  thead { display: table-header-group; }

  .print-only { display: block; }
  a[href]::after { content: ''; }
}

/* ------------------------------------------------- document sheets */
.doc-sheet {
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 30px;
  max-width: 780px;
  margin: 0 auto;
}
[data-theme='dark'] .doc-sheet { background: #fff; }

.doc-head { display: flex; align-items: flex-start; gap: 16px; border-bottom: 2px solid #0f172a; padding-bottom: 14px; }
.doc-head .logo { width: 52px; height: 52px; flex: none; }
.doc-head .org { flex: 1; min-width: 0; }
.doc-head .org h3 { font-size: 1.05rem; color: #0f172a; margin: 0; }
.doc-head .org .ur { font-family: var(--font-ur); direction: rtl; font-size: .95rem; color: #0f172a; line-height: 1.9; }
.doc-head .org .motto { font-size: .74rem; color: #64748b; font-style: italic; }
.doc-head .doc-type { text-align: end; }
.doc-head .doc-type b { display: block; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: #0f172a; }
.doc-head .doc-type span { font-family: var(--font-mono); font-size: .82rem; color: #64748b; }

.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 18px 0; }
.doc-grid .k { font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; color: #64748b; font-weight: 700; }
.doc-grid .v { font-size: .92rem; color: #0f172a; font-weight: 550; }

.doc-amount {
  background: #0f172a; color: #fff; border-radius: 8px;
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.doc-amount .lbl { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #bfdbfe; }
.doc-amount .val { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.doc-amount .words { font-size: .78rem; color: #bfdbfe; font-style: italic; text-align: end; max-width: 300px; }

.doc-verify {
  display: flex; align-items: center; gap: 18px; margin-top: 20px;
  border-top: 1px solid #e2e8f0; padding-top: 16px;
}
.doc-verify .code { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; color: #0f172a; }
.doc-verify-status { margin-inline-start: auto; }

.doc-foot { margin-top: 22px; padding-top: 12px; border-top: 1px solid #e2e8f0; font-size: .72rem; color: #64748b; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.doc-approvals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.doc-approvals .box { border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px 12px; }
.doc-approvals .box .t { font-size: .6rem; letter-spacing: .07em; text-transform: uppercase; color: #64748b; font-weight: 700; }
.doc-approvals .box .n { font-size: .86rem; font-weight: 640; color: #0f172a; margin-top: 4px; }
.doc-approvals .box .d { font-size: .7rem; color: #64748b; }
@media (max-width: 620px) { .doc-approvals { grid-template-columns: 1fr; } .doc-grid { grid-template-columns: 1fr; } }
