
.dk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.dk-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dk-form .full { grid-column: 1 / -1; }
.dk-prev { max-height: 56vh; overflow: auto; background: #e5e7eb; padding: 12px; border-radius: 8px; }
.dk-prev .sj { margin: 0 auto; box-shadow: 0 1px 4px rgba(0,0,0,.25); zoom: .62; }
/* ---------- surat jalan (layar pratinjau + cetak) ---------- */
.sj { background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.35; width: 186mm; padding: 8mm; box-sizing: content-box; }
/* v3.12.95: satu baris: kop (logo + nama PT) di kiri, judul surat di tengah ruang sisanya */
.sj .sj-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 2mm 6mm; border-bottom: 2px solid #000; padding-bottom: 3mm; margin-bottom: 4mm; }
.sj .sj-head > div:first-child { min-width: 0; }
.sj .sj-head .kop { max-width: 95mm; }
.sj .sj-head .kop .sj-co { white-space: nowrap; }
.sj .sj-head > div:last-child { text-align: center; }
.sj .sj-head > div:last-child > div { text-align: center !important; }
.sj .sj-head .sj-title { font-size: 14pt; }
/* v3.13.3: kop (logo + nama PT) ada di blok CSS dokumen supaya ikut ke jendela cetak */
.sj .kop { display: flex; align-items: center; gap: 3mm; min-width: 0; }
.sj .kop img { height: 15mm; width: auto; flex: 0 0 auto; }
.sj .kop .kop-t { min-width: 0; }
.sj.cmp .kop img { height: 11mm; }
.sj.dm .kop img { display: none; }
.sj.dm .kop { gap: 0; }
@media screen and (max-width: 640px) { .sj .sj-head { grid-template-columns: minmax(0, 1fr); } .sj .sj-head .kop .sj-co { white-space: normal; } }
.sj .sj-co { font-size: 12pt; font-weight: 800; }   /* v3.13.15: nama PT tidak terlalu besar */
.sj .sj-small { font-size: 9pt; color: #222; }
.sj .sj-title { text-align: center; font-size: 18pt; font-weight: 800; letter-spacing: .04em; line-height: 1.15; }
.sj table { border-collapse: collapse; width: 100%; }
.sj .sj-meta td { padding: 1mm 2mm 1mm 0; vertical-align: top; font-size: 10pt; }
.sj .sj-meta td.k { width: 30mm; color: #333; }
.sj.inv-more { break-after: page; page-break-after: always; }
.sj .sj-two { display: flex; gap: 6mm; margin-bottom: 4mm; }
.sj .sj-two > div { flex: 1; }
.sj .sj-box { border: 1px solid #000; padding: 2mm 3mm; min-height: 18mm; }
.sj .sj-box b { display: block; margin-bottom: 1mm; font-size: 9pt; text-transform: uppercase; letter-spacing: .03em; }
.sj table.sj-items th, .sj table.sj-items td { border: 1px solid #000; padding: 1.4mm 2mm; font-size: 9.5pt; text-align: left; vertical-align: top; }
.sj table.sj-items th { background: #eee; }
.sj table.sj-fit th, .sj table.sj-fit td { padding: 1.2mm 1.5mm; }   /* v3.13.147: Surat Jalan 1 barang 1 baris */
.sj table.sj-fit { width: 100%; }
.sj table.sj-fit th { white-space: nowrap; }
.sj table.sj-fit .nw { white-space: nowrap; width: 1%; }
.sj table.sj-fit th.grow { width: 100%; }   /* v3.13.155: sisa lebar selalu ke kolom nama / lokasi, bukan ke kolom centang */
.sj table.sj-fit td.sm, .sj.dm table.sj-fit td.sm { font-size: 7.5pt; }
.sj table.sj-fit td.xs, .sj.dm table.sj-fit td.xs { font-size: 6.5pt; }
.sj table.sj-fit td.g { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }   /* nama barang panjang: huruf lebih kecil agar tetap 1 baris */
.sj table.sj-fit .ket { width: 12mm; min-width: 12mm; }
.sj table.sj-fit .tick { width: 7mm; min-width: 7mm; max-width: 7mm; padding-left: 0.8mm; padding-right: 0.8mm; text-align: center; }   /* v3.13.155: kolom centang OK / Cek dikecilkan */
.sj table.sj-fit th.tick { width: 1%; max-width: none; }   /* v3.13.215: judul kolom selebar teksnya (bahasa Inggris "Check" tidak terpotong) */
.sj table.sj-fit .nw0 { white-space: nowrap; }
.sj table.sj-items thead { display: table-header-group; }
.sj table.sj-items tr { break-inside: avoid; page-break-inside: avoid; }
.sj .r { text-align: right !important; white-space: nowrap; }
.sj .sj-total td { font-weight: 800; background: #f6f6f6; }
.sj .sj-note { margin-top: 3mm; font-size: 9.5pt; }
.sj .sj-sign { display: flex; gap: 6mm; margin-top: 10mm; break-inside: avoid; page-break-inside: avoid; }
.sj .sj-sign > div { flex: 1; min-width: 0; text-align: center; font-size: 9.5pt; }   /* v3.13.6: min-width 0 agar kolom tanda tangan tidak melebar melewati kertas (mode dot matrix) */
.sj .sj-sign { gap: 3mm; } .sj .sj-sign > div.sj-qr { flex: 0 0 19mm; align-self: flex-end; }
.sj .sj-sign .sj-line { height: 20mm; border-bottom: 1px solid #000; margin-bottom: 1mm; }
.sj .sj-foot { margin-top: 6mm; font-size: 8pt; color: #444; text-align: center; }
.dk-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dk-tabs .btn.on { background: var(--primary, #1d4ed8); color: #fff; border-color: transparent; }
.dk-ta { width: 100%; min-height: 110px; font-family: monospace; }
.sj .pl-head td { background: #e9eef8; font-weight: 700; border: 1px solid #000; padding: 1.4mm 2mm; font-size: 9.5pt; }
.sj .pl-short { color: #b00020; font-weight: 800; }
.sj .pl-stamp { display: inline-block; margin-top: 1.5mm; border: 1.5px solid #000; padding: .3mm 2.5mm; font-size: 9.5pt; font-weight: 800; letter-spacing: .06em; }
.sj .pl-ply { margin-top: 3mm; border-top: 1px dashed #000; padding-top: 1.5mm; font-size: 8.5pt; line-height: 1.4; }
.sj.dm .pl-ply { border-top: 2px dashed #000; font-weight: 700; }
.sj.dm .pl-stamp { border: 2.5px solid #000; }
.sj .pl-box { display: inline-block; width: 4mm; height: 4mm; border: 1px solid #000; }
.sj .cs-box { display: inline-block; width: 22mm; height: 5mm; border-bottom: 1px solid #000; }
.sj .cs-blank td { height: 6mm; }
.sj .pl-warn { border: 1px solid #b00020; color: #b00020; padding: 1.5mm 3mm; margin: 2mm 0; font-size: 9.5pt; }
/* ---------- mode printer dot matrix: hitam-putih, huruf tebal, tanpa blok abu-abu ---------- */
.dk-printbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 10px; padding: 8px 10px; background: #f1f5f9; border-radius: 8px; font-size: 13px; }
.dk-printbar label { display: flex; align-items: center; gap: 6px; }
.dk-printbar select { padding: 4px 6px; }
.sj.dm { font-family: "Courier New", Courier, monospace; font-weight: 700; color: #000; font-size: 10pt; }
.sj.dm, .sj.dm * { background: #fff !important; color: #000 !important; text-shadow: none !important; }
.sj.dm .sj-small { font-size: 9pt; }
.sj.dm .sj-head { border-bottom: 3px double #000; }
.sj.dm .sj-title { letter-spacing: 0; }
.sj.dm .sj-box { border: 2px solid #000; }
.sj.dm table.sj-items th, .sj.dm table.sj-items td, .sj.dm .pl-head td { border: 1.5px solid #000; font-size: 9pt; font-weight: 700; }
.sj.dm table.sj-items { width: calc(100% - 3px); margin: 0 1.5px; }
.sj.dm .sj-meta td.k { width: 40mm; white-space: nowrap; }
.sj.cmp .sj-meta td.k { width: 30mm; }
.sj .sj-meta tr:first-child td:not(.k) { white-space: nowrap; }   /* nomor dokumen tidak dipecah ke baris kedua */
.sj .c-no { padding-left: .8mm !important; padding-right: 1.2mm !important; }
.sj.dm { -webkit-text-stroke: .25pt #000; }   /* huruf dot matrix lebih tebal (hasil cetak grafis tipis) */
.sj.dm table.sj-items th { border-bottom: 3px double #000; text-transform: uppercase; }
.sj.dm .sj-total td { border-top: 3px double #000; }
.sj.dm .pl-head td { border-top: 2.5px solid #000; text-transform: uppercase; }
.sj.dm .pl-warn { border: 2.5px solid #000; }
.sj.dm .pl-box { border: 2px solid #000; }
.sj.dm .cs-box { border-bottom: 2px solid #000; }
.sj.dm .sj-sign .sj-line { border-bottom: 1.5px dotted #000; }
.sj.dm .sj-foot { font-size: 8pt; }
.sj.cmp { font-size: 9pt; line-height: 1.2; }
.sj.cmp .sj-head { padding-bottom: 1.5mm; margin-bottom: 2mm; }
.sj.cmp .sj-co { font-size: 12pt; }
.sj.cmp .sj-title { font-size: 12pt !important; }
.sj.cmp .sj-two { margin-bottom: 2mm; }
.sj.cmp .sj-box { min-height: 10mm; padding: 1mm 2mm; }
.sj.cmp .sj-meta td { padding: .3mm 2mm .3mm 0; font-size: 9pt; }
.sj.cmp table.sj-items th, .sj.cmp table.sj-items td { padding: .7mm 1.5mm; font-size: 8.5pt; }
.sj.cmp .sj-sign { margin-top: 3mm; }
/* v3.13.157: kertas setengah (9,5 x 5,5): tanda tangan & kaki surat lebih rapat supaya tidak tumpah ke lembar berikutnya */
.sj.cmp .sj-sign .sj-line { height: 7mm; }
.sj.cmp .pl-box { width: 3.2mm; height: 3.2mm; vertical-align: middle; }
.sj table.tf-items td { padding-top: .5mm; padding-bottom: .5mm; line-height: 1.15; }   /* v3.13.157: baris Surat Transfer rapat (A4 & setengah) */
.sj table.tf-items .pl-box { width: 3.2mm; height: 3.2mm; vertical-align: middle; }
.sj.cmp table.sj-items td { padding-top: .4mm; padding-bottom: .4mm; }
.sj.cmp .sj-sign > div { font-size: 8.5pt; }
.sj.cmp .pl-ply { margin-top: 1.5mm; padding-top: 1mm; font-size: 8pt; line-height: 1.25; }
.sj.cmp .sj-foot { margin-top: 1mm; font-size: 7.5pt; }
.sj.cmp .sj-note { margin-top: 1mm; margin-bottom: 0; }
.sj.cmp .sj-sign .sj-line { height: 10mm; }
.sj.cmp .sj-note { margin-top: 1.5mm; font-size: 8.5pt; }
.sj.cmp .sj-foot { margin-top: 2mm; }
@media screen { .wms-print { display: none; } }
@media print {
  body > *:not(.wms-print) { display: none !important; }
  .wms-print { display: block !important; }
  #doc-print .sj { zoom: 1; box-shadow: none; margin: 0; padding: 0; width: auto !important; }
}
