/* WOQ 打印样式（media=print）
 * 设计目标（用户要求）：
 *  1) 图表/图形块不跨页断裂；
 *  2) 表格跨页时每页重复表头；
 *  3) 提供三种打印模式：完整结构 / 报告 / 仅图形；
 *  4) 自适应纸张（A4/A3/Letter 由浏览器打印设置决定），按页面宽度缩放。
 * 由 assets/js/woq-io.js 在打印前给 <body> 打 print-full / print-report / print-graphic 类。
 */
@page { margin: 12mm 10mm; }

@media print {
  /* 打印底色转白，保证纸张可读、省墨 */
  html, body, body.work-main { background: #fff !important; color: #1A2230 !important; }
  * { box-shadow: none !important; }

  /* 1) 图表 / 图形 / 卡片不跨页断裂 */
  .chartbox, svg, img, canvas,
  .no-break, .panel, .card, .calc-out, .action, .kpis { break-inside: avoid; page-break-inside: avoid; }

  /* 2) 表格跨页每页重复表头（依赖 <thead>） */
  thead { display: table-header-group; }
  table.tbl, table { break-inside: auto; }
  tr { break-inside: avoid; page-break-inside: avoid; }

  /* 3) 按模式显隐
   *    report  ：隐藏原始录入明细（print-report-hide）
   *    graphic ：仅保留图形，隐藏录入明细与结果明细（print-report-hide / print-graphic-hide）
   *    full    ：全部显示
   */
  body.print-report  .print-report-hide,
  body.print-graphic .print-report-hide,
  body.print-graphic .print-graphic-hide { display: none !important; }

  /* 打印时隐藏一切交互控件与浮动层 */
  .woq-io, .toolbar, button, .lang-fab, .no-print { display: none !important; }

  /* 品牌顶栏 / 页脚在打印中保留底色 */
  .topbar, .footer, .topbar * , .footer * {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* 浅色面板在打印中保持白底，文字转深 */
  .panel, .card, .work-panel { background: #fff !important; border-color: #cfd6df !important; }
}
