/* V273: 财务报表打印专用样式（资产负债表 / 利润表 / 现金流量表）
 * 屏幕样式由内联 style 提供；@media print 仅调整分页与背景显隐
 */
.report-doc {
  page-break-after: always;
  font-family: "SimSun", "\u5B8B\u4F53", serif;
  color: #000;
  background: #fff;
}
.report-doc:last-child {
  page-break-after: auto;
}

.report-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.report-company {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: 2px;
}
.report-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}
.report-period {
  font-size: 12px;
  color: #555;
  margin: 0;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 14px;
  table-layout: fixed;
}
.report-table th,
.report-table td {
  border: 1px solid #000;
  padding: 6px 10px;
  text-align: left;
  vertical-align: middle;
  word-break: break-all;
}
.report-table th {
  background: #e8e8e8;
  font-weight: 700;
  text-align: center;
}
.report-table td.num {
  text-align: right;
  font-family: "Consolas", "Courier New", monospace;
  white-space: nowrap;
}
.report-table .muted {
  color: #999;
  font-size: 11px;
}
.report-table tr.subtotal td {
  background: #f5f5f5;
  font-weight: 700;
  text-align: center;
}
.report-table tr.total td {
  background: #ebebeb;
  font-weight: 700;
}
.report-table tr.grand-total td {
  background: #d8d8d8;
  font-weight: 700;
  border-top: 2px solid #000;
}
.report-table .report-empty-row {
  text-align: center;
  color: #92400e;
  background: #fffbeb;
  font-size: 11px;
  padding: 8px;
}
.report-table .report-balance-warn {
  text-align: left;
  background: #fef2f2;
  color: #dc2626;
  font-size: 11px;
  padding: 8px;
  border-top: 2px solid #dc2626;
}

.report-na {
  color: #92400e;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.report-note {
  font-size: 11px;
  color: #5b5b5b;
  margin: 10px 0 14px;
  padding: 8px 12px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  line-height: 1.6;
}

.report-signature {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 16px;
  font-size: 12px;
}
.report-signature .sig-item {
  text-align: center;
}
.report-signature .sig-label {
  display: inline-block;
  min-width: 110px;
  border-bottom: 1px solid #000;
  padding: 0 4px 4px;
  color: #333;
}

/* 屏幕显示时：限制每张报表在视口内有合理行高，避免打印样式直接被渲染进屏幕 */
@media screen {
  .report-doc {
    max-width: 920px;
    margin: 0 auto 24px;
    padding: 18px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
}

/* 打印输出：黑白适配 + 跨页表头 + 行不拆 */
@media print {
  .fin-report-toolbar,
  .report-note {
    display: none !important;
  }
  .report-doc {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .report-table thead {
    display: table-header-group;
  }
  .report-table tr {
    page-break-inside: avoid;
  }
  .report-table th {
    background: #ddd !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-table tr.subtotal td,
  .report-table tr.total td,
  .report-table tr.grand-total td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-na {
    background: #fffbe !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}