/* =====================================================================
   print.css — 画面のブラウザ印刷用（@media print）
   ※ 請求書・見積等の「正式帳票PDF」は mPDF でサーバー生成（別物）。
     こちらは一覧・ダッシュボード等を手元で印刷する際の整形。
   ===================================================================== */

/* 画面でだけ見せる / 印刷でだけ見せる ユーティリティ */
.print-only { display: none; }

@media print {
  /* 画面UIを隠す */
  .navbar, .sidebar, .topbar, .breadcrumbs,
  .btn, .pagination, .toast, .modal, .no-print, nav, footer {
    display: none !important;
  }
  .print-only { display: block !important; }

  /* 紙向けの基本整形 */
  html, body { background: #fff !important; color: #000; }
  body { font-size: 11pt; line-height: 1.5; }
  .page, .page-wide { max-width: none !important; margin: 0 !important; padding: 0 !important; }

  /* カードは枠線のみ・分割を避ける */
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  /* リンクは黒・外部URLは括弧で展開 */
  a { color: #000 !important; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }

  /* テーブルは行を分割せず、見出しを各ページに繰り返す */
  table { width: 100%; border-collapse: collapse; }
  thead { display: table-header-group; }
  tr, img { break-inside: avoid; }

  /* 改ページ制御ユーティリティ */
  .page-break { break-before: page; }
  .avoid-break { break-inside: avoid; }

  /* 余白 */
  @page { margin: 14mm; }
}
