/* 인쇄 문서 — 디자인 시스템 §6.32.
 *
 * **여기는 다른 세계다.** 앱 토큰은 전부 어두운 화면을 위한 것이고, 인쇄물은
 * 흰 종이에 검은 잉크다. `--surface-1`을 그대로 인쇄하면 잉크를 통째로 먹거나,
 * 브라우저가 배경을 지워 흰 종이가 나온다. 그래서 여기서는 토큰을 쓰지 않는다. */

.sheet { display: none; }

@page { size: A4; margin: 14mm; }

@media print {
  /* 입력 칸·메뉴·버튼은 종이에 나가지 않는다 */
  .noprint, .rail, .nav, nav, header.page-header, .btn, .form-grid, .filter-chips { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; }
  body { margin: 0; padding: 0; }

  .app, .main, main { display: block !important; padding: 0 !important; overflow: visible !important; }

  .sheet { display: block !important; font-size: 12px; line-height: 1.5; }
  .sheet * { color: #000; }

  /* 표 한 줄이 페이지를 넘어 갈라지지 않는다 */
  .sheet tr { page-break-inside: avoid; }
}

/* ── 표준 세금계산서 양식 ──────────────────────────────── */

.sheet__title {
  text-align: center; font-size: 20px; font-weight: 800;
  letter-spacing: .4em; padding-left: .4em; margin: 0 0 2px;
}
.sheet__subtitle {
  text-align: center; font-size: 10px; letter-spacing: .25em;
  margin: 0 0 10px; color: #444;
}
.sheet__docno { display: flex; justify-content: space-between; font-size: 10px; color: #444; margin-bottom: 4px; }

.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { border: 1px solid #000; padding: 4px 6px; }
.sheet th { background: #F2F2F2; font-weight: 700; text-align: center; white-space: nowrap; }

/* 관공서 양식의 붉은 선. 이 색 하나만 쓴다 */
.sheet__party th { background: #FBEDEC; }
.sheet__rule { height: 2px; background: #C0392F; margin-bottom: 1px; }
.sheet__rule--thin { height: 1px; background: #C0392F; margin-bottom: 10px; }

.sheet__party { margin-bottom: 8px; font-size: 11px; }
.sheet__party td { font-variant-numeric: tabular-nums; }

.sheet__amount {
  border: 2px solid #000; padding: 8px 10px; margin: 8px 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.sheet__amount b { font-size: 15px; }
.sheet__amount span { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

.sheet__items { font-size: 11px; }
.sheet__items td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 110px; }
.sheet__items td.idx { text-align: center; width: 26px; color: #666; }
.sheet__items td.why { font-size: 9.5px; color: #555; }
.sheet__items tr.sum td { background: #F2F2F2; font-weight: 800; }
.sheet__items tr.fin td { background: #FBEDEC; font-weight: 800; font-size: 13px; }

.sheet__foot { margin-top: 18px; text-align: center; font-size: 12px; line-height: 2; }
.sheet__sign { margin-top: 10px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 12px; }
.sheet__stamp {
  width: 46px; height: 46px; border: 1.5px solid #C0392F; border-radius: 50%;
  color: #C0392F; display: flex; align-items: center; justify-content: center; font-size: 9px;
}
.sheet__legal { margin-top: 18px; padding-top: 8px; border-top: 1px solid #999; font-size: 8.5px; color: #555; line-height: 1.7; }
