/* ==========================================================================
   EG-aqua 인쇄 스타일 — 잉크 절약형
   · 배경 채움 없음(흰 바탕), 검은 테두리 위주
   · 색은 꼭 필요한 글씨·테두리에만 사용
   · 대상: 일정 달력 · 이달 관리 항목 · 자동이체 결과 · 대시보드
   ========================================================================== */
@media print {
  @page { size: A4 landscape; margin: 12mm; }

  /* 0. 모든 배경 채움·그림자 제거 */
  *, *::before, *::after {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  html, body { background: #fff !important; color: #000 !important; font-size: 11px; }
  a { color: inherit !important; text-decoration: none !important; }
  a[href]::after { content: "" !important; }

  /* 1. 화면 전용 요소 숨김 */
  .site-header, .toast-container, .alert-banner, .btn, button, form, .day-form, .theme-toggle-btn,
  .cal-nav a, .no-print, .lp-sticky, .tabs, .ad-run-box { display: none !important; }
  .print-only { display: block !important; }

  /* 2. 레이아웃 */
  .page-section { padding: 0 !important; min-height: auto !important; }
  .container { max-width: none !important; padding: 0 !important; }
  .page-header { margin-bottom: 6px !important; }
  .page-title { font-size: 16px !important; color: #000 !important; }
  .page-desc { font-size: 10px !important; color: #333 !important; }
  .card, .kpi-card, .table-responsive, .mgmt-item, .run-row {
    border: 1px solid #000 !important; border-radius: 3px !important; break-inside: avoid;
  }
  .kpi-card::before { display: none !important; }
  .kpi-title, .kpi-sub { color: #333 !important; }
  .kpi-value { color: #000 !important; }
  .count-chip, .badge {
    background: none !important; border: 1px solid currentColor !important; border-radius: 3px !important;
    padding: 1px 5px !important; font-size: 9px !important;
  }
  .badge-success { color: #047857 !important; }
  .badge-warning { color: #b45309 !important; }
  .badge-danger { color: #b91c1c !important; }
  .badge-accent { color: #1d4ed8 !important; }

  /* 3. 표: 검은 테두리, 헤더 채움 없음 */
  .data-table { min-width: 0 !important; font-size: 10px !important; border-collapse: collapse !important; width: 100% !important; }
  .data-table th, .data-table td {
    border: 1px solid #000 !important; padding: 3px 5px !important; white-space: normal !important; color: #000 !important;
  }
  .data-table th { font-weight: 700 !important; }
  .table-responsive { border: none !important; overflow: visible !important; }

  /* 4. 일정 달력: 해당 월에 할 일만 (요약 칩·선택 날짜 패널·완료 항목·지난달 이월 항목 제외) */
  .sch-layout { display: block !important; }
  .sch-summary, .day-panel, .cal-legend, .list-sec h2 .btn, .list-sec h2 .count-chip, .list-sec h2 .badge { display: none !important; }
  .mgmt-item.done, .mgmt-item.carry, .cal-ev.done, .cal-cell.other .cal-ev, .cal-cell.other .cal-day small { display: none !important; }
  .cal-head { margin-bottom: 4px !important; }
  .cal-nav h2 { font-size: 14px !important; margin: 0 !important; }
  .cal-grid { gap: 0 !important; border: 1px solid #000 !important; border-radius: 0 !important; page-break-after: always; }
  .cal-dow { border-right: 1px solid #000 !important; border-bottom: 1px solid #000 !important; color: #000 !important; font-size: 10px !important; padding: 3px 0 !important; }
  .cal-dow:nth-child(7n) { border-right: none !important; }
  .cal-cell { min-height: 70px !important; border-right: 1px solid #000 !important; border-bottom: 1px solid #000 !important; padding: 3px !important; }
  .cal-cell:nth-child(7n) { border-right: none !important; }
  .cal-cell.other { opacity: 1 !important; }
  .cal-cell.other .cal-day { color: #999 !important; }
  .cal-cell.today { border: 2px solid #000 !important; }
  .cal-cell.selected { background: none !important; }
  .cal-day { color: #000 !important; font-size: 10px !important; }
  .cal-day small { color: #333 !important; }
  .cal-ev {
    color: #000 !important; border: 1px solid #555 !important; border-left-width: 4px !important;
    border-radius: 2px !important; font-size: 8.5px !important; padding: 1px 3px !important;
  }
  .ev-FILTER { border-left-color: #0EA5E9 !important; }
  .ev-FILTER.overdue, .ev-EXPIRY { border-left-color: #DC2626 !important; color: #b91c1c !important; }
  .ev-VISIT { border-left-color: #F59E0B !important; }
  .ev-BILL { border-left-color: #64748B !important; }
  .ev-AUTODEBIT { border-left-color: #0F766E !important; }
  .ev-TIER { border-left-color: #8B5CF6 !important; }
  .ev-SCHEDULE { border-left-color: #059669 !important; }
  .cal-more { color: #333 !important; }
  .list-sec { margin-bottom: 8px !important; padding: 8px 10px !important; }
  .list-sec h2 { font-size: 12px !important; margin-bottom: 5px !important; color: #000 !important; }
  .mgmt-item { padding: 4px 7px !important; margin-bottom: 3px !important; gap: 8px !important; border-left-width: 1px !important; }
  .mgmt-item.late { border-left: 4px solid #DC2626 !important; }
  .mgmt-item .n { font-size: 11px !important; color: #000 !important; }
  .mgmt-item .d { font-size: 10px !important; color: #333 !important; }

  /* 5. 자동이체 */
  .ad-grid { display: block !important; }
  #tab-result, #tab-cand, #tab-cms { display: block !important; margin-bottom: 12px; }
  #tab-result::before { content: "■ 실행 결과"; font-weight: 700; display: block; margin-bottom: 4px; }
  #tab-cand::before { content: "■ 출금 대상"; font-weight: 700; display: block; margin-bottom: 4px; }
  #tab-cms::before { content: "■ 자동이체 등록 고객"; font-weight: 700; display: block; margin-bottom: 4px; }
  .res-ok { color: #047857 !important; } .res-fail { color: #b91c1c !important; }
  .run-row { padding: 4px 8px !important; margin-bottom: 3px !important; }
  .note { color: #333 !important; }
}
.print-only { display: none; }
