/* ============================================================
   کارخانه‌یار — استایل چاپ و PDF (پیش‌فاکتور و گزارش انبار)
   طراحی و ساخت: مهندس بیره‌وهـر معروفی
   ============================================================ */

#print-root { display: none; }

@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  body { background: #fff !important; }
  #app { display: none !important; }
  .modal-overlay, .toast-wrap { display: none !important; }
  #print-root { display: block !important; }

  .print-doc { font-family: 'Vazirmatn', Tahoma, sans-serif; color: #111; font-size: 11.5px; direction: rtl; }
  .print-doc .no-print { display: none !important; }

  .pf-print-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 3px double #334155; padding-bottom: 10px; margin-bottom: 10px;
  }
  .pf-print-brand { display: flex; align-items: center; gap: 10px; }
  .pf-print-logo { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; border: 1px solid #ddd; }
  .pf-print-company { font-size: 15px; font-weight: 800; color: #1e293b; }
  .pf-print-sub { font-size: 9.5px; color: #64748b; margin-top: 2px; }
  .pf-print-title { font-size: 20px; font-weight: 900; color: #4f46e5; text-align: center; letter-spacing: 1px; }
  .pf-print-meta { text-align: left; font-size: 10px; color: #475569; }
  .pf-print-meta b { color: #111; }

  .pf-print-parties { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
  .pf-print-box { border: 1.2px solid #cbd5e1; border-radius: 8px; padding: 7px 11px; font-size: 10.5px; flex: 1; }
  .pf-print-box h4 { font-size: 10px; color: #4f46e5; margin-bottom: 4px; }

  .pf-print-table { width: 100%; border-collapse: collapse; font-size: 10.5px; margin-bottom: 8px; }
  .pf-print-table th {
    background: #eef2ff; color: #312e81; padding: 6px 7px; border: 1px solid #c7d2fe;
    font-size: 9.5px; text-align: center;
  }
  .pf-print-table td { border: 1px solid #dbe2ee; padding: 5px 7px; text-align: center; }
  .pf-print-table .num { direction: ltr; }
  .pf-print-table tr:nth-child(even) td { background: #f8fafc; }

  .pf-print-totals { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
  .pf-print-sums { width: 46%; }
  .pf-print-sums table { width: 100%; border-collapse: collapse; font-size: 10px; }
  .pf-print-sums td { padding: 4px 8px; border: 1px solid #e2e8f0; }
  .pf-print-sums td:first-child { background: #f8fafc; font-weight: 600; }
  .pf-print-grand { font-size: 13px; font-weight: 900; color: #4f46e5 !important; }

  .pf-print-sigs { display: flex; justify-content: space-between; margin-top: 26px; }
  .pf-sig { text-align: center; width: 30%; }
  .pf-sig .sig-name { font-weight: 700; font-size: 10.5px; }
  .pf-sig .sig-line { border-top: 1.5px dotted #475569; margin-top: 34px; padding-top: 3px; font-size: 9px; color: #64748b; }

  .pf-print-foot {
    margin-top: 14px; padding-top: 7px; border-top: 1px solid #cbd5e1;
    font-size: 8.5px; color: #64748b; text-align: center;
  }

  /* گزارش انبار */
  .st-print-title { text-align: center; font-size: 15px; font-weight: 900; color: #1e293b; margin-bottom: 3px; }
  .st-print-sub { text-align: center; font-size: 9.5px; color: #64748b; margin-bottom: 10px; }
  .st-print-table { width: 100%; border-collapse: collapse; font-size: 9.5px; }
  .st-print-table th { background: #eef2ff; border: 1px solid #c7d2fe; padding: 5px 6px; font-size: 9px; }
  .st-print-table td { border: 1px solid #dbe2ee; padding: 4px 6px; text-align: center; }
  .st-print-table .num { direction: ltr; }
  .st-print-neg { color: #dc2626; font-weight: 800; }
}
