/* Soep Folio — kertas Invoice & Kuitansi. Dipakai untuk pratinjau di halaman dan untuk dokumen cetak (iframe).
   Warna & font sengaja tetap (bukan variabel tema) supaya hasil cetak sama di mode terang maupun gelap. */
.sfd-sheet, .sfd-sheet * { box-sizing: border-box; }
.sfd-sheet {
	--sfd-accent: #0e6b58;
	width: 794px; padding: 48px 52px 34px; background: #fff; color: #1b1f1d;
	font: 13px/1.5 Arial, Helvetica, sans-serif; letter-spacing: 0; text-align: left;
	-webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sfd-sheet a { color: inherit; text-decoration: none; }
.sfd-ph { color: #a3aaa6; font-style: italic; }

/* Kepala: logo + identitas di kiri, judul + nomor di kanan */
.sfd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 18px; border-bottom: 3px solid var(--sfd-accent); }
.sfd-brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
.sfd-logo { display: block; width: auto; max-width: 230px; object-fit: contain; flex: none; }
.sfd-co { min-width: 0; font-size: 12px; color: #444; }
.sfd-co strong { display: block; margin-bottom: 2px; font-size: 16px; line-height: 1.25; color: #111; }
.sfd-title { flex: none; text-align: right; }
.sfd-h { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: .06em; line-height: 1.1; color: var(--sfd-accent); }
.sfd-meta { margin-left: auto; border-collapse: collapse; font-size: 12px; }
.sfd-meta th { padding: 1px 12px 1px 0; font-weight: 400; text-align: left; color: #666; }
.sfd-meta td { padding: 1px 0; font-weight: 700; text-align: right; }

/* Ditagihkan kepada */
.sfd-bill { margin-top: 18px; }
.sfd-lbl { display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b726e; }
.sfd-bill strong { font-size: 14px; color: #111; }

/* Tabel produk */
.sfd-items { width: 100%; margin: 18px 0 14px; border-collapse: collapse; font-size: 12.5px; }
.sfd-items th { padding: 8px 10px; background: var(--sfd-accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.sfd-items td { padding: 9px 10px; border-bottom: 1px solid #e3e6e4; vertical-align: top; }
.sfd-items .c { text-align: center; }
.sfd-items th.c { text-align: center; }
.sfd-items .r { text-align: right; white-space: nowrap; }
.sfd-items th.r { text-align: right; }
.sfd-items tr { break-inside: avoid; }

/* Ringkasan: terbilang + catatan di kiri, total di kanan */
.sfd-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; break-inside: avoid; }
.sfd-left { flex: 1 1 0; min-width: 0; }
.sfd-say { margin-bottom: 12px; padding: 8px 12px; background: #f1f5f3; border-left: 3px solid var(--sfd-accent); font-style: italic; }
.sfd-say .sfd-lbl { font-style: normal; }
.sfd-note { font-size: 12px; color: #444; }
.sfd-tot { flex: none; width: 300px; border-collapse: collapse; font-size: 12.5px; }
.sfd-tot td { padding: 4px 0; }
.sfd-tot td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.sfd-tot .m td { color: #6b726e; font-weight: 400; }
.sfd-tot .t td { padding-top: 7px; border-top: 1px solid #cfd5d2; font-weight: 700; }
.sfd-tot .g td { padding: 8px 0 4px; border-top: 2px solid var(--sfd-accent); color: var(--sfd-accent); font-size: 15px; font-weight: 800; }

/* Pembayaran & tanda tangan */
.sfd-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 26px; break-inside: avoid; }
.sfd-pay { flex: 1 1 0; min-width: 0; font-size: 12px; }
.sfd-pay table { border-collapse: collapse; }
.sfd-pay th { padding: 1px 12px 1px 0; font-weight: 400; text-align: left; color: #666; }
.sfd-pay td { padding: 1px 0; font-weight: 700; }
.sfd-sign { flex: none; width: 250px; text-align: center; font-size: 12px; }
.sfd-sign-img { display: block; width: auto; max-width: 200px; margin: 6px auto; object-fit: contain; }
.sfd-sign-gap { height: 66px; }
.sfd-sign-name { font-weight: 700; text-decoration: underline; }

.sfd-credit { margin-top: 30px; padding-top: 10px; border-top: 1px solid #e3e6e4; text-align: center; font-size: 10.5px; color: #8a918d; }

/* Kuitansi */
.sfd-kw { padding: 30px 36px 22px; border: 2px solid var(--sfd-accent); }
.sfd-kw .sfd-head { padding-bottom: 14px; border-bottom-width: 1px; }
.sfd-kw .sfd-h { font-size: 26px; margin-bottom: 4px; }
.sfd-kw-no { font-size: 12px; color: #444; }
.sfd-kw-row { display: grid; grid-template-columns: 150px 14px 1fr; align-items: baseline; padding: 10px 0 7px; border-bottom: 1px dotted #8f9893; }
.sfd-kw-row > span { font-size: 12px; color: #555; }
.sfd-kw-row > b { min-height: 1.4em; font-weight: 600; font-size: 14px; }
.sfd-kw-row .sfd-kw-say { font-style: italic; font-weight: 600; }
.sfd-kw-bot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 22px; break-inside: avoid; }
.sfd-kw-amt { padding: 10px 22px; border: 2px solid var(--sfd-accent); color: var(--sfd-accent); font-size: 22px; font-weight: 800; white-space: nowrap; }
.sfd-kw-sign { flex: none; width: 250px; text-align: center; font-size: 12px; }
.sfd-meterai { display: flex; align-items: center; justify-content: center; width: 92px; height: 62px; margin: 6px auto; border: 1px dashed #8f9893; color: #8f9893; font-size: 10px; line-height: 1.3; text-align: center; }
.sfd-kw .sfd-credit { margin-top: 20px; }
.sfd-cut { margin: 18px 0; border-top: 1px dashed #8f9893; }

/* Dokumen cetak (iframe) */
@page { size: A4; margin: 14mm; }
body.sfd-print { margin: 0; background: #fff; }
.sfd-print .sfd-invoice { width: auto; padding: 0; }
.sfd-print .sfd-kw { width: auto; }
.sfd-print .sfd-ph { display: none; }
