/* =========================================================
   SIMKES — Design System
   SMK Negeri 1 Palasah
   ========================================================= */

:root {
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #98A2B3;

  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-alt: #FAFBFC;
  --border: #E4E7EC;

  --brand: #16233F;      /* deep ink navy — primary */
  --brand-2: #2F5D8A;    /* steel blue — interactive */
  --brand-2-soft: #EAF1F8;

  --amber: #B9791F;      /* SP / peringatan */
  --amber-soft: #FBF0DD;
  --amber-line: #E6B558;

  --emerald: #15804C;    /* prestasi / reward */
  --emerald-soft: #E4F6ED;

  --rose: #B3261E;       /* pelanggaran berat / bahaya */
  --rose-soft: #FBE7E5;

  --blue: #2563EB;        /* izin / info netral */
  --blue-soft: #EFF6FF;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  --shadow-pop: 0 8px 24px rgba(16,24,40,0.12);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- Layout shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--brand);
  color: #E8ECF3;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 40;
  transition: transform .25s ease;
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #C7CFDD;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,0.10);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--amber-line);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: #7C87A0; padding: 16px 12px 6px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: #8590A8;
  line-height: 1.5;
}

.main-area { margin-left: 264px; flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(245,246,248,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.page-content { padding: 24px; flex: 1; }

.hamburger-btn { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .hamburger-btn { display: inline-flex; }
  .page-content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

/* (v1.9.2) Phone-specific breakpoint — fix topbar overflow, table scroll, touch targets */
@media (max-width: 600px) {
  /* Sembunyikan global search & role badge di topbar supaya tidak overflow */
  #globalSearchWrap { display: none !important; }
  .pill-brand { display: none !important; }
  /* Perbesar touch target navigasi */
  .nav-item { padding: 12px 12px; min-height: 44px; }
  .hamburger-btn { padding: 10px !important; }
  /* Kurangi padding surat/sertifikat paper */
  .surat-paper { padding: 20px 16px !important; }
  .sertifikat-paper { padding: 24px 16px !important; }
  .sertifikat-brand-logos { top: 8px; left: 8px; gap: 6px; }
  .sertifikat-brand-logos img { width: 38px; height: 38px; }
  /* (v2.2.27) Nama penandatangan dibuat 1 baris (nowrap) — di layar sempit
     dua penandatangan ditumpuk vertikal (bukan berdampingan) supaya nama
     tetap muat 1 baris tanpa mendorong lebar sertifikat/scroll horizontal. */
  .sertifikat-signoff-row { flex-direction: column; align-items: center; gap: 14px; }
  .sertifikat-signoff-titimangsa { text-align: center; }
  .sertifikat-ttd-item { max-width: 100%; }
  /* Stat card lebih ringkas */
  .stat-card { padding: 14px 16px; }
}

/* (v1.9.2) Tabel responsive — horizontal scroll di mobile */
.card.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(16,24,40,0.5); z-index: 39;
}
.sidebar-overlay.open { display: block; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.stat-card { padding: 18px 20px; }
.stat-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Badges / Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-emerald { background: var(--emerald-soft); color: var(--emerald); }
.pill-rose { background: var(--rose-soft); color: var(--rose); }
.pill-slate { background: #EEF1F5; color: var(--ink-soft); }
.pill-brand { background: var(--brand-2-soft); color: var(--brand-2); }

/* ---------- Checkbox persetujuan anggaran (v1.7.x) ---------- */
.cb-item { width: 16px; height: 16px; accent-color: var(--emerald); cursor: pointer; }

.category-pill {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  background: var(--surface);
  color: var(--ink-soft);
}
.category-pill[data-active="true"][data-kategori="Ringan"] { background: var(--brand-2-soft); border-color: var(--brand-2); color: var(--brand-2); }
.category-pill[data-active="true"][data-kategori="Sedang"] { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }
.category-pill[data-active="true"][data-kategori="Berat"] { background: var(--rose-soft); border-color: var(--rose); color: var(--rose); }

/* ---------- Poin Meter (signature element) ----------
   Gauge horizontal 4 zona: Aman / SP1 / SP2 / SP3 dengan marker posisi poin */
.poin-meter { width: 100%; }
.poin-meter-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: #EEF1F5;
}
.poin-meter-zone { height: 100%; }
.poin-meter-marker {
  position: absolute; top: -4px;
  width: 3px; height: 18px;
  background: var(--ink);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left .4s ease;
}
.poin-meter-marker::after {
  content: '';
  position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink);
}
.poin-meter-labels {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--ink-faint); margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
}

/* Mini poin meter used inline in tables/lists */
.poin-meter-mini { width: 72px; height: 6px; border-radius: 999px; overflow: hidden; display: flex; background: #EEF1F5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0E1830; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-alt); }
.btn-amber { background: var(--amber); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Form elements ---------- */
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.field-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: var(--surface);
  transition: border-color .15s ease;
}
.field-input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-2-soft); }

/* ---------- Searchable Select (v2.2.19) — dropdown panjang (siswa/guru) yang bisa diketik untuk mencari ---------- */
.ss-wrap { position: relative; }
.ss-wrap select.ss-native { position: absolute; opacity: 0; height: 0; width: 0; pointer-events: none; }
.ss-wrap input.ss-input { padding-right: 34px; cursor: text; }
.ss-wrap input.ss-input[disabled] { background: var(--surface-alt); color: var(--ink-faint); cursor: not-allowed; }
.ss-chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); font-size: 11px; pointer-events: none; transition: transform .15s ease;
}
.ss-wrap.ss-open .ss-chevron { transform: translateY(-50%) rotate(180deg); }
.ss-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 12px 28px rgba(0,0,0,0.16); z-index: 70;
}
.ss-option { padding: 9px 12px; font-size: 13px; color: var(--ink); cursor: pointer; border-top: 1px solid var(--border); }
.ss-option:first-child { border-top: none; }
.ss-option:hover, .ss-option.ss-option-active { background: var(--surface-alt); }
.ss-option.ss-option-selected { color: var(--brand-2); font-weight: 600; background: var(--brand-2-soft); }
.ss-empty { padding: 14px 12px; font-size: 12.5px; color: var(--ink-faint); text-align: center; }

/* ---------- Table ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-weight: 600; color: var(--ink-soft);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid #F0F1F4; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-alt); }

/* ---------- Skeleton loading ---------- */
.skel { background: linear-gradient(90deg, #EEF1F5 25%, #F5F6F8 37%, #EEF1F5 63%); background-size: 400% 100%; animation: skel-anim 1.4s ease infinite; border-radius: 6px; }
@keyframes skel-anim { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Pagination (v1.8.0) ---------- */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.pagination-bar .pagination-info { font-size: 12.5px; color: var(--ink-soft); }
.pagination-bar .pagination-controls { display: flex; gap: 4px; align-items: center; }
.page-btn { min-width: 36px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; cursor: pointer; transition: all 0.15s; color: var(--ink); }
.page-btn:hover { background: var(--surface-alt); }
.page-btn.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--brand); color: #fff; padding: 13px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in .25s ease;
  max-width: 340px;
}
.toast.success { background: var(--emerald); }
.toast.error { background: var(--rose); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Threshold alert banner (signature moment on input page) ---------- */
.threshold-alert {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--amber-line);
  background: linear-gradient(180deg, var(--amber-soft), #FFF9EF);
  padding: 16px 18px;
}
.threshold-alert.level-sp3 { border-color: var(--rose); background: linear-gradient(180deg, var(--rose-soft), #FFF3F2); }

/* ---------- Modal (generic, dipakai di seluruh modul) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(16,24,40,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto;
  animation: modal-fade .15s ease;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  box-shadow: var(--shadow-pop);
  animation: modal-pop .18s ease;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.modal-body { padding: 20px 22px; max-height: 74vh; overflow-y: auto; }
.modal-close-btn {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt); border: 1px solid var(--border);
  color: var(--ink-soft); cursor: pointer;
}
.modal-close-btn:hover { background: var(--border); }
.subsection-title {
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 20px 0 8px;
}
.subsection-title:first-child { margin-top: 0; }

/* ---------- Tab bar (generik, dipakai di halaman dengan beberapa sub-tampilan) ---------- */
.tab-bar {
  display: flex; gap: 4px; overflow-x: auto;
  border-bottom: 1px solid var(--border);
  padding: 0 2px;
}
.tab-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 16px;
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  border: none; background: transparent;
  border-bottom: 2.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--brand-2); border-bottom-color: var(--brand-2); }

::selection { background: var(--amber-soft); }

.footer-note {
  text-align: center; font-size: 12px; color: var(--ink-faint);
  padding: 22px 16px 28px;
}

/* ---------- E-Surat & TTE: kertas surat (preview on-screen) ---------- */
.surat-paper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 34px 38px;
  font-size: 13.5px; line-height: 1.65; color: var(--ink);
  max-width: 660px; margin: 0 auto;
}
.surat-kop {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 14px;
}
.surat-kop-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 6px;
}
.surat-kop-badge {
  width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#E6B558,#B9791F);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--brand); font-size: 22px;
}
.surat-kop-logo { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.surat-kop-title { font-weight: 800; font-size: 15.5px; letter-spacing: .01em; text-align: center; }
.surat-kop-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; text-align: center; }
.surat-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.surat-meta-table td { padding: 2px 8px 2px 0; vertical-align: top; font-size: 13px; }
.surat-meta-table td:first-child { color: var(--ink-soft); white-space: nowrap; }
.surat-body p { margin: 0 0 10px; text-align: justify; }
.surat-signature { display: flex; justify-content: flex-end; margin-top: 26px; }
/* (v2.2) Halaman Lampiran (mode "Terlampir") — di layar cukup dipisah garis +
   label "Halaman Lampiran"; saat cetak, page-break diatur lewat inline style
   di jendela cetak (lihat cetakSurat_ pada surat.html). */
.surat-lampiran-page {
  margin-top: 28px; padding-top: 22px; border-top: 2px dashed var(--border);
  position: relative;
}
.surat-lampiran-page::before {
  content: 'Halaman Lampiran'; position: absolute; top: -11px; left: 50%;
  transform: translateX(-50%); background: var(--surface); padding: 0 10px;
  font-size: 10.5px; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase;
}
.surat-ttd-block { text-align: center; min-width: 200px; }
/* (v2.2.10) QR verifikasi TTE sebagai baris footer terpisah di bagian paling
   bawah surat — kecil & rata kiri, dipisah garis tipis dari isi surat. */
.surat-footer { display: flex; align-items: center; gap: 10px; margin-top: 34px; padding-top: 12px; border-top: 1px solid var(--border); }
.surat-qr-block { text-align: left; flex-shrink: 0; }
.surat-qr-block img { width: 52px; height: 52px; border: 1px solid var(--border); border-radius: 6px; padding: 3px; background: #fff; }
.surat-qr-caption { font-size: 9.5px; color: var(--ink-faint); max-width: none; margin-top: 0; text-align: left; line-height: 1.4; }
.jenis-surat-badge-sp1, .jenis-surat-badge-sp2 { background: var(--amber-soft); color: var(--amber); }
.jenis-surat-badge-sp3 { background: var(--rose-soft); color: var(--rose); }
.jenis-surat-badge-lain { background: var(--brand-2-soft); color: var(--brand-2); }

/* ---------- Keaktifan Kegiatan Sekolah & E-Sertifikat (v1.2.1) ---------- */
.pill-violet { background: #F1EAFB; color: #6B3FA0; }

/* Kartu e-Sertifikat (preview on-screen, desain 1 sisi/landscape) */
.sertifikat-paper {
  background: var(--surface);
  border: 10px solid var(--brand);
  outline: 2px solid var(--amber-line);
  outline-offset: -18px;
  border-radius: var(--radius-sm);
  padding: 40px 46px;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  color: var(--ink);
}
.sertifikat-logo { width: 76px; height: 76px; object-fit: contain; margin: 0 auto 10px; display: block; }
.sertifikat-kop-sekolah { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .03em; color: var(--brand); }
.sertifikat-kop-alamat { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.sertifikat-divider { border: none; border-top: 2px solid var(--amber-line); width: 140px; margin: 14px auto; }
.sertifikat-title { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-weight: 800; font-size: 30px; letter-spacing: .12em; color: var(--brand); margin-top: 6px; }
.sertifikat-subtitle { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.sertifikat-nomor { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-faint); margin-top: 6px; }
.sertifikat-diberikan { font-size: 13px; color: var(--ink-soft); margin-top: 22px; }
.sertifikat-nama { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-weight: 800; font-size: 26px; color: var(--brand); margin-top: 6px; }
.sertifikat-nisn { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.sertifikat-keterangan { font-size: 13.5px; line-height: 1.7; color: var(--ink); max-width: 560px; margin: 16px auto 0; }
.sertifikat-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 32px; gap: 16px; text-align: left; }
.sertifikat-qr-block { text-align: center; }
.sertifikat-qr-block img { width: 84px; height: 84px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #fff; }
.sertifikat-qr-caption { font-size: 10px; color: var(--ink-faint); max-width: 170px; margin-top: 6px; }
/* (v2.2.14) Blok tanda tangan — mendukung SATU ATAU LEBIH penandatangan
   berjajar, dengan titimangsa (tempat, tanggal) tampil sekali di atasnya. */
.sertifikat-ttd-multi { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; }
.sertifikat-ttd-titimangsa { font-size: 12.5px; color: var(--ink); }
.sertifikat-ttd-row { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.sertifikat-ttd-item { text-align: center; min-width: 165px; max-width: 260px; }
.sertifikat-ttd-item > div { white-space: nowrap; }
.sertifikat-ttd-img { display: block; margin: 6px auto 0; max-height: 54px; max-width: 130px; object-fit: contain; }
.sertifikat-ttd-spacer { height: 44px; }
.sertifikat-ttd-nama { font-weight: 700; text-decoration: underline; margin-top: 4px; white-space: nowrap; }
.sertifikat-ttd-nip { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
/* Kelas lama (sebelum v2.2.14) dibiarkan untuk kompatibilitas, sudah tidak dipakai template baru */
.sertifikat-ttd-block { text-align: center; min-width: 220px; margin-left: auto; }
.sertifikat-ttd-jabatan { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

/* (v2.2.26) e-Sertifikat Keaktifan Kegiatan — logo kop kanan-atas (OSIS &
   Sekolah, berurutan), Kelas siswa di antara Nama & NISN, blok tanda tangan
   rata kiri-kanan, dan QR Code dipindah jadi footer terpisah di bawahnya.
   Kelas baru ini TIDAK dipakai oleh Sertifikat Ekstrakurikuler (tetap
   memakai .sertifikat-footer/.sertifikat-ttd-block lama) agar tampilannya
   tidak ikut berubah. */
.sertifikat-paper { position: relative; }
.sertifikat-brand-logos { position: absolute; top: 14px; left: 16px; display: flex; align-items: center; gap: 10px; }
.sertifikat-brand-logos img { width: 64px; height: 64px; object-fit: contain; }
.sertifikat-kelas { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.sertifikat-signoff { margin-top: 30px; }
.sertifikat-signoff-titimangsa { text-align: right; font-size: 12.5px; color: var(--ink); margin-bottom: 10px; }
.sertifikat-signoff-row { display: flex; justify-content: space-between; gap: 16px; text-align: center; }
.sertifikat-qr-footer { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.sertifikat-qr-footer img { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; padding: 3px; background: #fff; flex-shrink: 0; }
.sertifikat-qr-footer .sertifikat-qr-caption { max-width: 320px; margin-top: 0; }

/* ========================= v1.9.3 — Widget Dashboard Baru ========================= */

/* Widget "Hari Ini" — compact summary card */
.widget-hari-ini {
  background: linear-gradient(135deg, var(--brand) 0%, #1e3a5f 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(22,35,63,0.18);
}
.widget-hari-ini .whi-label { font-size: 12px; opacity: .7; font-weight: 500; }
.widget-hari-ini .whi-value { font-size: 18px; font-weight: 700; font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
.widget-hari-ini .whi-item { display: flex; flex-direction: column; gap: 2px; }
.widget-hari-ini .whi-divider { width: 1px; height: 36px; background: rgba(255,255,255,.2); flex-shrink: 0; }

/* Quick Action Buttons */
.quick-action-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink);
  text-decoration: none; transition: all .15s ease; cursor: pointer;
}
.quick-action-btn:hover { background: var(--brand-2-soft); border-color: var(--brand-2); color: var(--brand-2); }
.quick-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Ticker Ulang Tahun */
.ticker-wrap { overflow: hidden; position: relative; padding: 6px 0; }
.ticker-content {
  display: inline-flex; gap: 32px; white-space: nowrap;
  animation: tickerScroll 20s linear infinite;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item { font-size: 13px; font-weight: 500; }
.ticker-item .ticker-nama { font-weight: 700; }

/* Sticky Note Card */
.sticky-note {
  background: #FFFDE7;
  border: 2px dashed #E6D56B;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-height: 100px;
}
.sticky-note .sticky-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.sticky-note .sticky-item:last-child { border-bottom: none; }
.sticky-note .sticky-meta { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.sticky-note .sticky-hapus {
  background: none; border: none; color: var(--rose); cursor: pointer;
  font-size: 14px; padding: 2px 4px; border-radius: 4px; flex-shrink: 0;
}
.sticky-note .sticky-hapus:hover { background: var(--rose-soft); }

/* Expandable List */
.expandable-header {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; padding: 4px 0; user-select: none;
}
.expandable-header .expand-icon { transition: transform .2s ease; font-size: 12px; color: var(--ink-faint); }
.expandable-header.open .expand-icon { transform: rotate(90deg); }
.expandable-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.expandable-body.open { max-height: 400px; overflow-y: auto; }
.expandable-item {
  padding: 6px 0; font-size: 13px; display: flex;
  justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.expandable-item:last-child { border-bottom: none; }

/* Quick Search Card */
.quick-search-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; outline: none;
  transition: border-color .15s ease;
}
.quick-search-input:focus { border-color: var(--brand-2); }
.quick-search-result {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  margin-top: 8px; font-size: 13px;
}
.quick-search-result .qs-nama { font-weight: 700; font-size: 14px; }
.quick-search-result .qs-detail { color: var(--ink-soft); font-size: 12px; margin-top: 2px; }
.quick-search-result .qs-poin { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

/* Random Picker Modal */
.rp-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 80; display: flex; align-items: center; justify-content: center;
  animation: modal-fade .15s ease;
}
.rp-box {
  background: var(--surface); border-radius: var(--radius-lg); padding: 28px;
  width: min(380px, 90vw); box-shadow: var(--shadow-pop);
  animation: modal-pop .18s ease; text-align: center;
}
@keyframes rp-spin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.rp-nama {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 28px; font-weight: 800; color: var(--brand);
  margin: 20px 0; min-height: 44px;
}
.rp-nama.spinning { animation: rp-spin .12s linear infinite; color: var(--ink-faint); }
.rp-kelas { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* Absensi WK Widget */
.absensi-wk-status {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
}
.absensi-wk-status .aws-icon { font-size: 24px; }
.absensi-wk-status .aws-text { font-size: 13px; color: var(--ink-soft); }
.absensi-wk-status .aws-label { font-weight: 700; color: var(--ink); }
