/* Print styles for generated documents */
.doc-head { display: flex; gap: 1rem; align-items: flex-start; border-bottom: 2px solid #2563eb; padding-bottom: .75rem; margin-bottom: 1rem; }
.doc-logo { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.doc-co h1 { font-size: 1.1rem; font-weight: 800; margin: 0; letter-spacing: .02em; color: #0f172a; }
.doc-meta { font-size: .75rem; color: #475569; margin-top: .25rem; white-space: pre-line; }

.doc-title { text-align: center; font-size: 1.05rem; font-weight: 800; letter-spacing: .1em; margin: .5rem 0 .25rem; color: #0f172a; }
.doc-subtitle { text-align: center; font-size: .72rem; color: #64748b; letter-spacing: .06em; margin-bottom: 1rem; }

.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1.2rem; font-size: .8rem; margin-bottom: 1rem; }
.doc-grid .doc-q { font-weight: 700; color: #0f172a; }
.doc-grid .doc-a { font-weight: 400; color: #0f172a; }

.doc-line { font-size: .85rem; margin-bottom: .5rem; line-height: 1.5; }
.doc-q { font-weight: 700; color: #0f172a; }
.doc-a { font-weight: 400; color: #0f172a; }

.doc-catatan { margin-top: 1rem; font-size: .78rem; color: #475569; line-height: 1.5; }
.doc-catatan .doc-a { color: #475569; }
.doc-terbilang { font-size: .82rem; color: #334155; margin: .75rem 0; line-height: 1.5; }
.doc-terbilang .doc-a { color: #334155; font-style: italic; }

.doc-nominal-box { margin: 1.25rem 0; padding: 1rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .5rem; text-align: center; }
.doc-nominal { font-size: 1.35rem; font-weight: 800; color: #1e40af; }

.doc-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .78rem; margin: .75rem 0; }
.doc-table th, .doc-table td {
    border: 1px solid #cbd5e1; padding: .3rem .45rem;
    line-height: 1.25; vertical-align: middle;
    word-wrap: break-word; overflow-wrap: break-word;
}
.doc-table th { background: #eff6ff; font-weight: 700; text-align: center; }
.doc-table td:first-child,
.doc-table th:first-child { text-align: center; width: 2.75rem; }
.doc-table tbody tr { height: 1.65rem; }
.doc-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-table td.c { text-align: center; }
.doc-table tfoot td { font-weight: 600; background: #f8fafc; }
.doc-table .text-end { text-align: right; }
.doc-table .text-muted { color: #94a3b8; text-align: center; }

.doc-sign {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    text-align: center;
    font-size: .75rem;
}
.doc-sign-block {
    min-width: 0;
    max-width: 240px;
    margin: 0 auto;
}
.doc-sign-label { margin-bottom: .25rem; }
.doc-sign .line {
    display: block;
    width: 180px;
    max-width: 100%;
    height: 56px;
    margin: 0 auto .35rem;
    border-bottom: 1px solid #94a3b8;
}
/* Satu penandatangan — kanan, garis tidak memenuhi kertas */
.doc-sign[data-count="1"] {
    display: flex;
    justify-content: flex-end;
}
.doc-sign[data-count="1"] .doc-sign-block {
    width: 220px;
    max-width: 55%;
    margin: 0;
}
.doc-sign[data-count="2"] {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
}
.doc-sign[data-count="3"] {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}
.doc-sign[data-count="4"] {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
}
.doc-table tbody td { min-height: 1.65rem; }
.doc-table .doc-sign-cell {
    min-width: 5rem; min-height: 1.65rem; height: 1.65rem;
    border-bottom: 1px solid #cbd5e1; text-align: center;
}

@page { size: A4; margin: 10mm 12mm; }

@media print {
    .doc-head { border-bottom-color: #000; margin-bottom: .65rem; padding-bottom: .5rem; }
    .doc-title { margin: .35rem 0 .15rem; }
    .doc-subtitle { margin-bottom: .65rem; }
    .doc-grid { margin-bottom: .65rem; }
    .doc-line { margin-bottom: .35rem; }
    .doc-table { margin: .5rem 0; font-size: 9pt; }
    .doc-table th, .doc-table td { padding: 1.5mm 2mm; }
    .doc-table tbody tr { height: 7mm; }
    .doc-table tbody td { min-height: 7mm; height: 7mm; }
    .doc-table .doc-sign-cell { min-height: 7mm; height: 7mm; }
    .doc-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .doc-table thead { display: table-header-group; }
    .doc-table tfoot { display: table-footer-group; }
    .doc-table tr { page-break-inside: avoid; break-inside: avoid; }
    .doc-sign { page-break-inside: avoid; break-inside: avoid; margin-top: 1.25rem; }
    .doc-nominal-box { margin: .75rem 0; padding: .65rem; }
}
