:root {
  --brand: #0f6b3f;
  --brand-dark: #0a4d2d;
}

body {
  background-color: #f4f6f5;
}

.app-navbar {
  background-color: var(--brand-dark);
}

.app-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}

.app-sidebar {
  width: 250px;
  flex-shrink: 0;
  background-color: #ffffff;
  border-right: 1px solid #e3e6e4;
}

.app-wrapper.with-sidebar .app-content {
  flex-grow: 1;
  min-width: 0;
}

.sidebar-heading {
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #8a938d;
  padding: .9rem 1rem .25rem;
}

.app-sidebar .nav-link {
  color: #33413a;
  padding: .5rem 1rem;
  border-left: 3px solid transparent;
  font-size: .92rem;
}

.app-sidebar .nav-link:hover {
  background-color: #eef5f1;
}

.app-sidebar .nav-link.active {
  background-color: #e6f4ec;
  border-left-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}

.btn-brand, .btn-brand:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.card-stat .display-6 {
  font-weight: 700;
}

.progress {
  height: .6rem;
}

.hal-cell {
  min-width: 46px;
  text-align: center;
}

table.table-compact td, table.table-compact th {
  padding: .35rem .5rem;
  vertical-align: middle;
}

@media (min-width: 992px) {
  .offcanvas-lg.app-sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
  }
}

/* ---------------- Rapot cetak ---------------- */
.rapot-sheet {
  background: #fff;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  color: #111;
}

.rapot-kop {
  border-bottom: 3px double #333;
  padding-bottom: .75rem;
  margin-bottom: 1rem;
}

.school-print-kop {
  text-align: center;
  border-bottom: 3px double #222;
  padding: 0 0 .65rem;
  margin: 0 0 1rem;
  color: #111;
}
.school-print-name { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .025em; }
.school-print-address { font-size: .78rem; margin-top: .12rem; }
.school-print-title { font-size: .98rem; font-weight: 700; text-transform: uppercase; margin-top: .55rem; }
.school-print-meta { font-size: .82rem; margin-top: .15rem; }
.school-print-signature { width: 220px; margin: 0 0 0 auto; text-align: center; font-size: .9rem; }
.signature-space { height: 66px; }
.signature-name { font-weight: 700; text-decoration: underline; }
.print-size-selector .form-select { width: auto; min-width: 94px; }
.print-size-selector { margin-inline-end: .5rem; }
.print-cover { min-height: 250mm; page-break-after: always; break-after: page; }
.report-intro-page { min-height: 260mm; padding: 12mm !important; }
.attendance-sheet { font-size: 8pt; }
.attendance-table { width: 100%; table-layout: fixed; font-size: 6.4pt; }
.attendance-table th, .attendance-table td { padding: 1.5px 2px !important; vertical-align: middle; }
.attendance-table th:nth-child(2), .attendance-table td:nth-child(2) { width: 48mm; }
.attendance-table th:nth-child(3), .attendance-table td:nth-child(3) { width: 8mm; }
.attendance-table th:nth-child(4), .attendance-table td:nth-child(4) { width: 16mm; }
.attendance-legend { margin-top: .35rem; }

@media print {
  html, body { width: auto !important; min-height: 0 !important; }
  .d-print-none { display: none !important; }
  .app-sidebar, .app-navbar, footer { display: none !important; }
  .app-wrapper, .app-content, .container-fluid { display: block !important; width: 100% !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  body { background: #fff !important; color: #111 !important; font-size: 10pt; }
  .rapot-sheet { padding: 0 !important; max-width: none !important; width: 100% !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: #fff !important; }
  .table { color: #111 !important; }
  .table thead { display: table-header-group; }
  tr, img, .school-print-kop { break-inside: avoid; }
  .school-print-signature { break-inside: avoid; }
  .print-cover { min-height: 190mm; }
  .report-intro-page { min-height: 0; height: 260mm; padding: 8mm !important; }
  .attendance-sheet { font-size: 7pt; }
  .attendance-table { font-size: 5.8pt; }
  .page-break-after { break-after: page; page-break-after: always; }
  .avoid-break { break-inside: avoid; page-break-inside: avoid; }
  .text-muted { color: #222 !important; }
}
.report-link{display:flex;gap:.9rem;align-items:center;padding:1rem;border:1px solid #e7ece8;border-radius:.8rem;color:inherit;text-decoration:none;height:100%;transition:.15s}.report-link:hover{border-color:#7aac90;background:#f8fbf9;transform:translateY(-1px)}.report-link>i{font-size:1.6rem;color:#0f6b3f}.report-link small{display:block;color:#748078;margin-top:.2rem}.template-editor{min-height:55vh;border:1px solid #ced4da;border-radius:.5rem;padding:1.2rem;background:#fff;overflow:auto}.template-editor:focus{outline:2px solid #94c4a5}.template-editor img{max-width:100%;height:auto}.arabic-text,[lang=ar]{font-family:Uthmani,LPMQ,serif;direction:rtl}
@font-face{font-family:LPMQ;src:url('../fonts/LPMQ IsepMisbah.ttf') format('truetype');font-display:swap}@font-face{font-family:Uthmani;src:url('../fonts/KFGQPC Uthmanic Script HAFS Regular.otf') format('opentype');font-display:swap}
@media print{.attendance-table{font-size:6pt!important}.attendance-table td,.attendance-table th{padding:1px!important}.attendance-sheet{page-break-after:always;break-after:page}.attendance-sheet:last-child{page-break-after:auto;break-after:auto}}
