/* ==== Lembar A4 (layout mengikuti DRAFT BUKU INDUK SISWA) ==== */
#print-root { background: #9aa0a6; padding: 18px 0; }
#print-root:empty { display: none; }

.sheet {
  width: 210mm; min-height: 296mm; margin: 0 auto 18px auto; background: #fff;
  padding: 14mm 13mm; box-shadow: 0 2px 10px rgba(0,0,0,.35); box-sizing: border-box;
  font-family: Calibri, 'Segoe UI', Arial, sans-serif; font-size: 10pt; color: #000;
  position: relative;
}
.judul { text-align: center; font-weight: bold; font-size: 13pt; margin-bottom: 2mm; }
.lembarke { text-align: right; font-size: 9pt; }
.tengah { text-align: center; }
.kanan { text-align: right; }
.b { font-weight: bold; }
.kecilx { font-size: 7.5pt; font-style: italic; }

/* tabel identitas atas */
.idtab { width: 100%; border-collapse: collapse; margin: 1.5mm 0 3mm 0; }
.idtab td { padding: .4mm 1mm .4mm 0; vertical-align: top; font-size: 10pt; }
.idtab td.w14 { width: 30mm; } .idtab td.w8 { width: 22mm; }
.idtab td:nth-child(2) { font-weight: bold; }
.idtab tr td:first-child { width: 42mm; }

/* baris label : nilai */
.br { display: flex; line-height: 1.5; }
.br .no { width: 7mm; flex: none; }
.br .lbl { width: 58mm; flex: none; }
.br .lbl2 { width: 24mm; flex: none; }
.br .sep { width: 4mm; flex: none; }
.br .val { flex: 1; }
.br.i1 .no { width: 12mm; }
.br.i1 .lbl { width: 53mm; }
.br.i2 .no { width: 17mm; }
.br.i2 .lbl { width: 48mm; }
.seksi { font-weight: bold; margin: 3mm 0 1mm 0; }
.sublabel { font-weight: bold; font-size: 9pt; margin: 2mm 0 1mm 2mm; }

/* biodata: kolom foto */
.bio-grid { display: flex; gap: 5mm; }
.bio-kiri { flex: 1; }
.bio-kanan { width: 32mm; flex: none; display: flex; flex-direction: column; gap: 9mm; padding-top: 2mm; }
.fotobox {
  width: 30mm; height: 40mm; border: 1.2pt solid #000; display: flex;
  align-items: center; justify-content: center; text-align: center;
  color: #b0b0b0; font-size: 7.5pt;
}

/* tabel nilai umum */
.ntab { width: 100%; border-collapse: collapse; margin: 1mm 0 2.5mm 0; }
.ntab th, .ntab td { border: .6pt solid #000; padding: .8mm 1.5mm; font-size: 9pt; vertical-align: top; }
.ntab th { background: #e2e2ef; font-weight: bold; text-align: center; vertical-align: middle; }
.ntab td.c { text-align: center; }
.ntab td.pad { padding-left: 6mm; }
.ntab.kecil th, .ntab.kecil td { font-size: 6.6pt; padding: .5mm .8mm; }
.ntab .thn, .ntab .sub { font-size: 6.4pt; }
.w-no { width: 8mm; }
.w-aspek { width: 26mm; background: #e2e2ef; font-weight: bold; text-align: center; vertical-align: middle; }
.w-nilai { width: 12mm; }
.w-capaian { width: 62mm; }
.w-kktp { width: 20mm; }
.w8 { width: 10mm; } .w10 { width: 16mm; } .w14 { width: 24mm; }
.w18 { width: 32mm; } .w22 { width: 34mm; } .w40 { width: 62mm; }
.cbline { font-size: 6.6pt; margin-top: .5mm; }
.bar { font-weight: bold; margin: 2mm 0 .5mm 0; }

/* blok bawah nilai */
.bawah-grid { display: flex; gap: 6mm; align-items: flex-start; }
.bawah-grid > div:first-child { flex: 1; }
.absen td { font-size: 8.5pt; }
.ttd { display: flex; gap: 14mm; flex: none; width: 78mm; text-align: center; font-size: 9pt; }
.ttd > div { flex: 1; }
.ttd-sp { height: 16mm; }
.ttd-solo { text-align: center; font-size: 9pt; margin-top: 4mm; }
.status .statusbesar { font-weight: bold; font-size: 13pt; text-align: center; padding: 2mm 0; }
.tka-grid { display: flex; gap: 6mm; }
.tka-grid > div { flex: 1; }
.daftar td { font-size: 9pt; padding: .9mm 1.5mm; }

/* watermark versi demo */
.demo-wm::after {
  content: 'VERSI DEMO - bukan untuk dokumen resmi';
  position: absolute; bottom: 6mm; left: 0; right: 0; text-align: center;
  font-size: 8pt; font-style: italic; color: #999;
}

/* ==== mode cetak ==== */
@media print {
  body { background: #fff !important; }
  .app, .sidebar, .topbar, .no-print { display: none !important; }
  #print-root { padding: 0; background: #fff; }
  .sheet {
    margin: 0; box-shadow: none; width: auto; min-height: auto;
    page-break-after: always;
  }
  @page { size: A4; margin: 0; }
}
