*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Times New Roman', Times, serif;
      font-size: 12pt;
      background: #e0e0e0;
      color: #000;
    }

    /* PAGE — F4 Legal Landscape untuk ATP karena kolom banyak */
    .page {
      width: 330mm;
      min-height: 215mm;
      margin: 20px auto;
      background: #fff;
      padding: 10mm 15mm 15mm 20mm;
      box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    }

    .nomor-dok {
      font-size: 8.5pt;
      color: #444;
      text-align: right;
      margin-bottom: 4px;
    }

    /* HEADER */
    .doc-header {
      display: grid;
      grid-template-columns: 60px 1fr 60px;
      align-items: center;
      gap: 10px;
      border-top: none;
      border-bottom: 3px solid #1a365d;
      padding: 8px 0;
      margin-bottom: 16px;
    }

    .logo-box {
      width: 56px;
      height: 56px;
      border: 1.5px dashed #555;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 7pt;
      color: #555;
      text-align: center;
      line-height: 1.3;
    }

    .logo-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .logo-box.has-logo {
      border: none;
    }

    .doc-title-center {
      text-align: center;
      line-height: 1.25;
    }
    .kop-pemda {
      font-size: 8pt;
      font-weight: normal;
      letter-spacing: 0.04em;
      margin-bottom: 1px;
    }
    .kop-dinas {
      font-size: 9pt;
      font-weight: bold;
      letter-spacing: 0.03em;
      margin-bottom: 1px;
    }
    .kop-sekolah {
      font-size: 12pt;
      font-weight: bold;
      letter-spacing: 0.05em;
      margin-bottom: 2px;
    }
    .kop-alamat {
      font-size: 7.5pt;
      font-weight: normal;
      font-style: italic;
      letter-spacing: 0.01em;
    }
    .doc-judul-area {
      text-align: center;
      margin-bottom: 12px;
    }
    .doc-judul-area .judul-utama {
      font-size: 14pt;
      font-weight: bold;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      margin: 4px 0 2px 0;
    }
    .doc-judul-area .subjudul {
      font-size: 10pt;
      color: #444;
    }
    .ttd-wrapper {
      margin-top: 20px;
      page-break-inside: avoid;
    }
    .ttd-area {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      margin-top: 8px;
      page-break-inside: avoid;
    }
    .ttd-box {
      text-align: center;
      font-size: 10pt;
      padding: 8px 12px;
    }
    .ttd-box .ttd-jabatan {
      font-weight: bold;
      color: #1a365d;
      font-size: 9.5pt;
      margin-bottom: 4px;
    }
    .ttd-box .ttd-tanggal {
      font-size: 9.5pt;
      margin-bottom: 44px;
    }
    .ttd-box .ttd-nama {
      font-weight: bold;
      font-size: 10pt;
      text-decoration: underline;
      text-underline-offset: 3px;
    }
    .ttd-box .ttd-nip {
      font-size: 9pt;
      color: #333;
      margin-top: 3px;
    }

    /* IDENTITAS */
    .identitas {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 14px;
      font-size: 11pt;
    }
    .identitas td {
      padding: 4px 8px;
      border: 1px solid #1a365d;
      vertical-align: middle;
    }
    .identitas td:first-child {
      font-weight: bold;
      white-space: nowrap;
      width: 25%;
    }

    /* SECTION TITLE */
    .page .section-title {
      font-size: 11pt;
      font-weight: bold;
      color: #000;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      border-left: 4px solid #000;
      padding: 3px 8px;
      margin: 8px 0 6px 0;
      background: #f5f5f5;
    }

    /* TABEL UTAMA ATP */
    table.main {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 9.5pt;
      margin-bottom: 8px;
    }
    table.main th {
      background: #1a365d;
      color: #fff;
      padding: 6px 8px;
      text-align: center;
      font-size: 9.5pt;
      font-weight: bold;
      border: 1px solid #1a365d;
      vertical-align: middle;
    }
    table.main td {
      padding: 4px 6px;
      border: 1px solid #1a365d;
      vertical-align: middle;
      line-height: 1.4;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }
    table.main tr:nth-child(even) td { background: #f5f9ff; }
    table.main td.no {
      text-align: center;
      width: 28px;
      font-weight: bold;
      vertical-align: middle;
    }
    table.main td.kode {
      font-family: 'Times New Roman', Times, serif;
      font-size: 8pt;
      font-weight: bold;
      text-align: left;
      vertical-align: middle;
      width: 90px;
      white-space: nowrap;
    }
    table.main td.center {
      text-align: center;
      vertical-align: middle;
    }
    table.main td.v-middle {
      vertical-align: middle;
    }
    table.main td.elemen-header {
      background: #2c5aa0;
      color: #ffffff;
      font-weight: bold;
      font-size: 9.5pt;
      text-align: left;
      padding: 5px 8px;
      letter-spacing: 0.03em;
    }

    /* ALUR DIAGRAM */
    .alur-diagram {
      border: 1px solid #1a365d;
      padding: 12px 16px;
      margin-bottom: 14px;
      font-size: 9.5pt;
    }
    .alur-diagram .alur-label {
      font-weight: bold;
      margin-bottom: 8px;
      font-size: 10pt;
    }
    .alur-flow {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px;
    }
    .alur-node {
      border: 1px solid #1a365d;
      padding: 4px 8px;
      font-size: 8.5pt;
      font-family: 'Courier New', monospace;
      background: #fff;
      white-space: nowrap;
    }
    .alur-node.aktif {
      background: #000;
      color: #fff;
    }
    .alur-arrow {
      font-size: 12pt;
      font-weight: bold;
      padding: 0 2px;
    }

    /* REKAPITULASI */
    table.rekap {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 10pt;
      margin-bottom: 14px;
    }
    table.rekap th {
      background: #1a365d;
      color: #fff;
      padding: 5px 8px;
      border: 1px solid #1a365d;
      text-align: center;
      font-size: 9.5pt;
    }
    table.rekap td {
      padding: 5px 8px;
      border: 1px solid #1a365d;
      vertical-align: middle;
      line-height: 1.5;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }
    table.rekap td.center { text-align: center; }
    table.rekap tr.total {
      font-weight: bold;
      background: #1a365d;
      color: #fff;
    }
    table.rekap tr.total td {
      border-color: #1a365d;
    }

table.rekap {
  page-break-inside: avoid;
  break-inside: avoid;
}
table.main tr {
  page-break-inside: avoid;
  break-inside: avoid;
}
thead {
  display: table-header-group;
}

    
    @media print {
  body { background: #fff; }
  .page {
    margin: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  table.rekap {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  table.rekap tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}