﻿/* A4 인쇄 화면 */
.print-shell { background: #E2E8F0; min-height: 100vh; padding: 24px 12px; }
.print-toolbar { max-width: 210mm; margin: 0 auto 16px; display: flex; justify-content: flex-end; gap: 8px; }
.print-button { padding: 10px 22px; border: none; border-radius: 8px; background: #1D4ED8; color: #fff; font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.print-button.secondary { background: #fff; color: #334155; border: 1px solid #CBD5E1; }

.a4-paper { width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; padding: 20mm 18mm; box-sizing: border-box;
            box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15); color: #1E293B; font-size: 10.5pt; }
.a4-top { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #1E293B; padding-bottom: 8px; margin-bottom: 24px; }
.a4-corp { font-size: 15pt; font-weight: 800; color: #1E293B; letter-spacing: 0.08em; }
.a4-docno { font-size: 9pt; color: #64748B; font-family: Consolas, monospace; }
.a4-title { text-align: center; font-size: 20pt; font-weight: 800; margin: 0 0 24px; letter-spacing: 0.3em; }
.a4-info { width: 100%; border-collapse: collapse; border-top: 2px solid #334155; border-bottom: 2px solid #334155; margin-bottom: 24px; }
.a4-info th, .a4-info td { border-bottom: 1px solid #E2E8F0; padding: 8px 10px; text-align: left; }
.a4-info th { width: 15%; background: #F8FAFC; color: #475569; font-weight: 600; white-space: nowrap; }
.a4-subject { font-weight: 700; font-size: 12pt; }
.a4-section { font-weight: 700; border-bottom: 1px solid #334155; padding-bottom: 3px; margin: 16px 0 8px; }
.a4-body { min-height: 120mm; }
.a4-files { margin: 0; padding-left: 20px; }
.a4-body table { width: 100%; border-collapse: collapse; }
.a4-body th, .a4-body td { border: 1px solid #CBD5E1; padding: 5px 8px; }
.a4-body th { background: #F4F6F9; }
.a4-footer { margin-top: 30px; text-align: center; font-size: 8.5pt; color: #94A3B8; }

@media print {
    @page { size: A4; margin: 12mm; }
    .print-shell { background: #fff; padding: 0; }
    .print-toolbar { display: none; }
    .a4-paper { width: auto; min-height: auto; padding: 0; box-shadow: none; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    table, tr, img { page-break-inside: avoid; }
}

/* 전자결재 결재란 */
.a4-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.a4-title-row .a4-title { text-align: left; margin: 14px 0 0; }
.erp-stamp { border-collapse: collapse; font-size: 9pt; }
.erp-stamp th, .erp-stamp td { border: 1px solid #555; text-align: center; padding: 2px 4px; min-width: 64px; }
.erp-stamp .erp-stamp-side { min-width: 24px; width: 24px; padding: 2px; background: #f2f2f2; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.erp-stamp .erp-stamp-side span { display: block; }
/* 결재자가 많아도 결재란이 눌려 잘리지 않게 */
.a4-title-row .a4-stamp { flex-shrink: 0; }
.erp-stamp th { background: #f2f2f2; font-weight: 600; white-space: nowrap; }
.erp-stamp .erp-stamp-sign { height: 40px; font-weight: 700; }
.erp-stamp .erp-stamp-date { font-size: 8pt; color: #444; white-space: nowrap; }
/* 제목은 한 줄 유지, 결재자가 많아 자리가 모자라면 결재란을 아래 오른쪽으로 내림 */
.a4-title-row { flex-wrap: wrap; }
.a4-title-row .a4-title { white-space: nowrap; }
.a4-title-row .a4-stamp { margin-left: auto; }
/* A4 문서 안의 표는 종이 폭에 맞춤 (화면용 가로 스크롤·최소 폭 규칙 해제) */
.a4-paper .erp-scroll-x { overflow: visible; }
.a4-paper .erp-scroll-x > table { min-width: 0; width: 100%; }
.a4-paper .erp-report-table { font-size: 9pt; }
