/* ============================================================
   APP.CSS — satu-satunya stylesheet global aplikasi
   ------------------------------------------------------------
   Hasil penggabungan (urutan dipertahankan agar cascade tidak
   berubah — custom_rombel.css SELALU dimuat setelah
   custom_global.css, jadi `.from`/`.to` versi slide-up tetap
   menang seperti sebelumnya):

     1. custom.css          -> base + komponen lama
     2. custom_global.css   -> design token & komponen UI seragam
     3. custom_rombel.css   -> component library (menimpa global)
     4. AUTH PORTAL         -> blok dari custom.css (login/portal)

   CSS yang page-scope TIDAK ada di sini; load lewat helper
   `load_page_css()` (lihat app/Helpers/asset_helper.php).
   ============================================================ */

/* TIPOGRAFI: font aplikasi = Manrope (self-hosted, lihat @font-face blok
   AUTH PORTAL di bawah — jangan diubah ke family lain tanpa menambah
   file .woff2-nya). Token: --font-sans (semua menu) dan --ap-font (auth).
   Halaman CETAK tidak ikut: tiap view cetak declaring font sendiri di
   wrapper-nya (mis. .cetak-container/.skl-container/.kartu-wrap), jadi
   font body tidak memengaruhi isi cetak. */

/* ── BEGIN custom.css ── */
/* ===== CUSTOM EDIT PD STYLE ===== */
input[type="date"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  line-height: 1.5;
  color: #0f172a;
  box-sizing: border-box;
}
input[type="date"]:focus {
  outline: none;
  border-color: #1470a6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 112, 166, 0.08);
}
select:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
  opacity: 0.6;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(20, 112, 166, 0.2);
  border-color: #1470a6;
}

.btn-gradient {
  background: linear-gradient(135deg, hsl(196, 50%, 46%), hsl(183, 44%, 42%) 50%, hsl(170, 38%, 40%));
  transition: all 0.2s ease !important;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, hsl(196, 50%, 46%), hsl(183, 44%, 42%) 50%, hsl(170, 38%, 40%));
  box-shadow: 0 4px 15px rgba(20, 112, 166, 0.3) !important;
  transform: translateY(-1px) !important;
}

/* ===== DATATABLES CUSTOM STYLE ===== */

/* Sembunyikan toolbar bawaan DataTables */
#tablePendidik_wrapper .dataTables_length,
#tablePendidik_wrapper .dataTables_filter,
#tablePendidik_wrapper .dataTables_info {
  display: none;
}

/* ===== DATATABLES PAGINATION OVERRIDE ===== */
div.dataTables_wrapper div.dataTables_paginate {
  display: none;
}


/* Custom pagination kita sendiri */
#customPagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 14px 24px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 0 0 1rem 1rem;
}

#customPagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: white;
  transition: all 0.15s ease;
  line-height: 1;
}

#customPagination button:hover:not(:disabled) {
  background: #eff6fb;
  color: #1470a6;
  border-color: #a9cfe8;
}

#customPagination button.active {
  background: linear-gradient(135deg, #0b4a6f, #1798b6);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(20, 112, 166, 0.3);
}

#customPagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: #94a3b8;
}

/* Sort icon di header */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  cursor: pointer;
  position: relative;
  padding-right: 28px !important;
}

/* Sembunyikan ::before dan ::after bawaan DataTables */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after {
  display: none !important;
}

/* Ikon sorting custom: ↑ di atas, ↓ di bawah */
table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::before {
  content: "↑";
  position: absolute;
  right: 6px;
  top: 30%;
  font-size: 9px;
  line-height: 1;
  display: block !important;
  transition: opacity .15s;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  content: "↓";
  position: absolute;
  right: 6px;
  top: 50%;
  font-size: 9px;
  line-height: 1;
  display: block !important;
  transition: opacity .15s;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting::after {
  opacity: 0.3;
}

table.dataTable thead th.sorting_asc::before {
  opacity: 1;
  color: #1470a6;
}
table.dataTable thead th.sorting_asc::after {
  opacity: 0.15;
}

table.dataTable thead th.sorting_desc::after {
  opacity: 1;
  color: #1470a6;
}
table.dataTable thead th.sorting_desc::before {
  opacity: 0.15;
}

table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  color: #1470a6 !important;
}

/* Hilangkan border bawaan */
table.dataTable {
  border-collapse: collapse !important;
  width: 100% !important;
}

table.dataTable td,
table.dataTable th {
  border-bottom: none !important;
}

#tablePendidik_wrapper {
  overflow-x: auto;
}

body,
.pd-wrap * {
  font-family: var(--font-sans);
  box-sizing: border-box;
}

/* ── Page Header ── */
.pd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pd-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.pd-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-edit {
  background: #e4f0f8;
  color: #1470a6;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #0b4a6f, #1798b6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-back:hover {
  opacity: 0.88;
  color: #fff;
}

/* ── Layout ── */
.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

/* ── Card ── */
.pd-card {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ── Tabs ── */
.pd-tabs {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 13px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.tab-btn i {
  font-size: 19px;
}

.tab-btn.active {
  color: #0b4a6f;
  border-bottom-color: #0b4a6f;
}

.tab-btn:hover:not(.active) {
  color: #475569;
  background: #f8fafc;
}

/* ── Tab Content ── */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.placeholder-tab {
  padding: 64px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.placeholder-tab i {
  font-size: 42px;
  display: block;
  margin-bottom: 12px;
}

/* ── Form ── */
.form-body {
  padding: 28px;
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  margin-top: 28px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.section-label:first-child {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.col-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid.col-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-grid.col-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.span-2 {
  grid-column: span 2;
}

.form-group label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: #0f172a;
  background: #f8fafc;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1470a6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 112, 166, 0.08);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
}

.form-group input[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: default;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}

/* Fix for metisMenu collapse behavior: hide collapsed submenus by default
   and allow mm-show to expand them instantly */
.mm-collapse {
  display: none !important;
  max-height: none !important;
  height: auto !important;
  visibility: hidden !important;
}
.mm-collapse.mm-show {
  display: block !important;
  max-height: none !important;
  height: auto !important;
  visibility: visible !important;
}

/* ── Radio ── */
.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  background: #f8fafc;
  transition: all 0.2s;
}

.radio-option:has(input:checked) {
  border-color: #1470a6;
  background: #eff6fb;
}

.radio-option input[type="radio"] {
  accent-color: #1470a6;
  width: 16px;
  height: 16px;
}

.radio-option span {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

/* ── Action Bar ── */
.action-bar {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.btn-edit {
  flex: 1;
  padding: 11px;
  background: linear-gradient(135deg, #0b4a6f, #1798b6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity 0.2s;
}

.btn-edit:hover {
  opacity: 0.88;
}

.btn-save {
  flex: 1;
  padding: 11px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.2s;
}

.btn-save:hover {
  background: #15803d;
}

.btn-cancel {
  padding: 11px 18px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: none;
  transition: background 0.2s;
}

.btn-cancel:hover {
  background: #e2e8f0;
}

/* ── Sidebar ── */
.pd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Profile Card ── */
.profile-card {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.profile-top {
  background: linear-gradient(135deg, #0b4a6f 0%, #1798b6 100%);
  padding: 28px 20px 52px;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
}

.avatar-box {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
}

.avatar-online {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
}

.profile-body {
  padding: 44px 20px 20px;
  text-align: center;
  margin-top: -36px;
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.profile-class {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  margin-top: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
}

.nisn-chip {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
  font-family: monospace;
  letter-spacing: 1px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  width: 100%;
  transition: background 0.2s;
  text-decoration: none;
}

.action-btn i {
  font-size: 16px;
}

.action-btn .btn-label {
  flex: 1;
  text-align: left;
}

.action-btn.teal {
  background: #eff6fb;
  color: #0b4a6f;
}

.action-btn.teal:hover {
  background: #c9e2f2;
}

.action-btn.red {
  background: #fff1f2;
  color: #e11d48;
}

.action-btn.red:hover {
  background: #ffe4e6;
}

.action-btn.blue {
  background: #eff6ff;
  color: #2563eb;
}

.action-btn.blue:hover {
  background: #dbeafe;
}

/* ── Doc Card ── */
.doc-card {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 18px 20px;
}

.doc-card-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
}

.doc-name {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 7px;
}

.doc-name i {
  font-size: 15px;
  color: #94a3b8;
}

.doc-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.doc-meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.2;
  word-break: break-word;
}

.doc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.doc-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.doc-badge.done {
  background: #dcfce7;
  color: #166534;
}

.doc-badge.active {
  background: #dcfce7;
  color: #166534;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }

  .pd-sidebar {
    order: -1;
  }

  .form-grid.col-4 {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid.col-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .pd-wrap {
    padding: 16px;
  }

  .form-grid.col-2,
  .form-grid.col-3,
  .form-grid.col-4 {
    grid-template-columns: 1fr;
  }

  .form-group.span-2 {
    grid-column: span 1;
  }

  .radio-group {
    flex-direction: column;
  }
}

/* ── Global Select2 Form Styling ── */
.select2-container--default .select2-selection--single {
  height: auto;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  padding: 0;
  color: #0f172a;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 11px;
  right: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8;
}
.select2-container--default.select2-container--focus .select2-selection--single {
  outline: none;
  border-color: #1470a6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 112, 166, 0.08);
}
.select2-container--default .select2-selection--single[aria-disabled="true"] {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
  opacity: 0.6;
}
.select2-container--default .select2-dropdown {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-top: 4px;
}
.select2-container--default .select2-results__option {
  padding: 8px 12px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: #1470a6;
  color: #fff;
}
.select2-container--default .select2-results__option--selected {
  background: #eff6fb;
}

/* SPMB / Profile form variant */
.select2-tw .select2-selection--single {
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: #1470a6;
  color: #fff;
}
.select2-container--default .select2-results__option--selected {
  background: #eff6fb;
}
.select2-search--dropdown .select2-search__field {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

/* ── Flowbite datepicker popup ── */
.datepicker,
.datepicker-picker {
  background: #fff;
  border-radius: 10px;
  z-index: 99999 !important;
}
.datepicker {
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  font-family: var(--font-sans);
}
.datepicker-cell.selected,
.datepicker-cell.selected:hover {
  background: #1470a6;
  color: #fff;
}
.datepicker-cell.today {
  background: #c9e2f2;
}
.datepicker-cell.today.selected {
  background: #1470a6;
}
.datepicker-cell:hover {
  background: #eff6fb;
}
.datepicker-nav,
.datepicker-controls .btn {
  border-radius: 8px;
}
.datepicker-controls .btn:hover {
  background: #eff6fb;
}

/* ===== LAYOUT ADMIN: Sidebar, Header, Toastr (from default.php) ===== */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.text-muted-foreground { color: #64748b; }
.text-foreground { color: #0f172a; }
.hover\:text-foreground:hover { color: #0f172a; }
.text-secondary-foreground { color: #1e293b; }
.hover\:text-secondary-foreground:hover { color: #1e293b; }
.bg-muted\/50 { background-color: rgba(241, 245, 249, 0.5); }
.bg-accent\/50 { background-color: rgba(226, 232, 240, 0.5); }
.hover\:bg-accent\/50:hover { background-color: rgba(226, 232, 240, 0.5); }
.bg-background { background-color: #ffffff; }
/* Shim utilitas Tailwind yang hilang dari build tailwind.css.
   Tanpa ini tombol berlatar "hijau/abu" kehilangan background-nya sehingga
   teks putih/berwarna tampak samar di atas kartu putih. */
.bg-green-50 { background-color: #f0fdf4; }
.border-green-200 { border-color: #bbf7d0; }
.hover\:bg-green-100:hover { background-color: #dcfce7; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-primary\/90:hover { background-color: rgba(12, 43, 100, 0.9); }
.border-slate-300 { border-color: #cbd5e1; }
.divide-gray-50 > * + * { border-color: #f9fafb; }
.accent-teal-600 { accent-color: #0d9488; }
.text-gray-300 { color: #d1d5db; }
.placeholder-gray-400::placeholder { color: #9ca3af; }
.disabled\:opacity-40:disabled { opacity: .4; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.py-3\.5 { padding-top: .875rem; padding-bottom: .875rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.mt-1\.5 { margin-top: .375rem; }
.gap-1\.5 { gap: .375rem; }
.focus\:border-blue-500:focus { border-color: #3b82f6; }
.focus\:ring-2:focus { outline: none; box-shadow: 0 0 0 2px #dbeafe; }
.focus\:ring-blue-100:focus { --tw-ring-color: #dbeafe; }
.min-h-9 { min-height: 2.25rem; }
/* Dipakai bersama .hidden ("hidden sm:inline") — hanya tampil >=640px */
@media (min-width: 640px) { .sm\:inline { display: inline; } }
.bg-primary\/10 { background-color: rgba(12, 43, 100, 0.1); }
.bg-primary\/20 { background-color: rgba(12, 43, 100, 0.2); }
.text-primary-foreground { color: #ffffff; }
.hover\:bg-secondary:hover { background-color: #f1f5f9; }
.hover\:text-secondary-foreground:hover { color: #1e293b; }
.border-background { border-color: #ffffff; }
.border-border { border-color: #e2e8f0; }
.border-border\/50 { border-color: rgba(226, 232, 240, 0.5); }
.placeholder\:text-muted-foreground::placeholder { color: #64748b; }
.focus-visible\:ring-1:focus-visible { outline: none; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); --tw-ring-color: rgba(12, 43, 100, 0.3); }
.focus-visible\:outline-none:focus-visible { outline: 2px solid transparent; outline-offset: 2px; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* ── Desktop Sidebar ── */
.sidebar-nav ul > li > a > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
    #sidebar-desktop-wrapper.collapsed aside.vertical-menu {
  width: 70px !important;
  min-width: 70px !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-header .flex-col {
  display: none !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-header {
  justify-content: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-nav h3,
#sidebar-desktop-wrapper.collapsed .sidebar-nav .sub-menu,
#sidebar-desktop-wrapper.collapsed .sidebar-nav .sub-menu *,
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a > span,
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a > i,
#sidebar-desktop-wrapper.collapsed .sidebar-nav .gap-3 > span {
  display: none !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a {
  justify-content: center !important;
  padding: 6px 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 36px !important;
  margin: 0 auto !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a > div:first-child {
  margin: 0 !important;
  box-shadow: none !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a > div:first-child:not(.text-teal-600) {
  background: transparent !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a > div:first-child i {
  margin: 0 !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-footer {
  display: none !important;
}

#sidebar-desktop-wrapper.collapsed #sidebar-expand-btn {
  display: flex !important;
}

@media (max-width: 767px) {
  #sidebar-collapse-btn { display: none !important; }
  #sidebar-expand-btn { display: none !important; }
}

#sidebar-desktop-wrapper:not(.collapsed) aside.vertical-menu {
  width: 260px;
}

#sidebar-desktop-wrapper.collapsed ~ #app-header {
  left: 70px !important;
}
#sidebar-desktop-wrapper.collapsed ~ main {
  margin-left: 70px !important;
}

aside.vertical-menu {
  transition: width 0.3s ease;
}

main {
  transition: margin-left 0.3s ease;
}

/* ── Mobile Overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 55;
}
.sidebar-overlay.show {
  display: block;
}

/* ── Mobile Responsive ── */
/* PENTING: selector di blok ini WAJIB di-scope ke #app-header (header aplikasi
   di layout/default.php). Dulu memakai selektor telanjang `header`, sehingga
   ikut menyeax setiap <header> di dalam konten halaman — termasuk
   <header class="dbx-hero"> yang dipakai 20+ view. Akibatnya hero ikut
   `position:fixed; top:0` dan tersembunyi di balik navbar. */
@media (max-width: 1023px) {
  #app-header > div { gap: 8px !important; }
}

@media (max-width: 767px) {
  body {
    background: hsl(210, 40%, 98%);
    background-image: var(--gradient-mesh);
  }
  #layout-wrapper {
    background: transparent;
  }
  #app-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 4px !important;
  }
  #app-header .w-56 { display: none !important; }
  #app-header .border-l { display: none !important; }
  #app-header #userDropdownBtn .text-left { display: none !important; }
  #app-header .max-w-\[140px\] { max-width: 80px !important; }
  aside.vertical-menu {
    left: -288px !important;
    width: 288px !important;
    height: 100vh !important;
    z-index: 60;
    box-shadow: 4px 0 16px rgba(0,0,0,0.15);
  }
  aside.vertical-menu.mobile-open {
    left: 0 !important;
  }
  #sidebar-desktop-wrapper.collapsed aside.vertical-menu {
    display: none !important;
  }
  main,
  main.sidebar-collapsed {
    margin-left: 0 !important;
    min-height: 100dvh;
  }
  main [style*="grid-template-columns:"],
  main [style*="grid-template-columns: "] {
    grid-template-columns: 1fr !important;
  }
  .row {
    flex-wrap: wrap !important;
  }
  .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Toastr: tema lama hijau SOLID dihapus; gaya toast (kartu putih + aksen kiri)
   ditangani inline di app/Views/layout/default.php (<style id="toastr-override">,
   paling akhir di <head>). */

/* ══ DASHBOARD ADMIN — UI/UX mengikuti referensi eduvia.id ══
   Prinsip yang diambil dari Eduvia:
   - INK navy dalam (#0a2342), body slate (#50657e), garis navy transparan
   - kartu: radius 17-19px, border tipis, shadow sangat tipis, hover naik 2px
   - dekorasi minimal: tanpa bar aksen atas, tanpa blob, tanpa neumorfik
   - tipografi rapat: label kecil redup, angka besar rapat (letter-spacing -.04em)
   - kotak pastel loudly diganti baris/deretan tipis + pil #f6faff
   Status (hadir/izin/alpa, kelengkapan) tetap memakai warna semantic. */
.dbx {
  --db-ink: #0a2342;
  --db-body: #50657e;
  --db-muted: #7e90a5;
  --db-faint: #96a6b5;
  --db-line: rgba(0, 52, 125, .10);
  --db-line-2: rgba(0, 52, 125, .07);
  --db-card-bg: rgba(255, 255, 255, .86);
  --db-primary: #078ee8;
  --db-bright: #20a7ff;
  --db-deep: #005aae;
  --db-deeper: #00347d;
  --db-fill-1: #23b0ff;
  --db-fill-2: #0054a5;
  --db-mint: #eaf4ff;
  --db-pill: #f6faff;
  --db-tag-bg: #eff5fb;
  --db-tag-fg: #637d96;
  --db-ok: #0e9f6e;
  --db-warn: #d9930f;
  --db-bad: #dc5a5a;
  --db-info: #138fe0;
  --db-purple: #7a78e5;
  --db-shadow: 0 8px 20px rgba(12, 58, 111, .05);
  --db-shadow-h: 0 14px 30px rgba(20, 44, 72, .09);
}

/* ---------- LATAR: satu layer, glow + grid halus ---------- */
.dbx-page {
  position: relative;
  font-family: var(--ap-font);
  color: var(--db-body);
}
body:has(.dbx-page) main.bg-mesh {
  background-image: none;
  background-color: #f6faff;
}
.dbx-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 4%, rgba(32, 167, 255, .14), transparent 25rem),
    radial-gradient(circle at 8% 38%, rgba(0, 52, 125, .08), transparent 23rem);
}
.dbx-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 52, 125, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 52, 125, .03) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.dbx-page > * { position: relative; z-index: 1; }

/* ---------- KEPALA ---------- */
.dbx .dbx-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}
.dbx .dbx-hero__txt { min-width: 0; display: grid; gap: 0; }
.dbx .dbx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--db-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dbx .dbx-eyebrow__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border: 2px solid #a8d7ff;
  border-radius: 50%;
  background: var(--db-primary);
  box-shadow: 0 0 0 4px rgba(7, 142, 232, .10);
}
.dbx .dbx-title {
  margin: 0;
  color: var(--db-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.dbx .dbx-sub { margin: 7px 0 0; color: var(--db-body); font-size: 13px; }
.dbx .dbx-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--db-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--db-shadow);
}
.dbx .dbx-switcher > i { color: var(--db-deep); font-size: 16px; line-height: 1; }
.dbx .dbx-switcher select {
  max-width: 220px;
  min-height: 36px;
  padding: 0 24px 0 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background-color: transparent;
  background-image: none;
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 9px 6px;
  box-shadow: none;
  color: var(--db-ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.dbx .dbx-switcher select::-ms-expand { display: none; }
.dbx .dbx-switcher select:focus,
.dbx .dbx-switcher select:focus-visible {
  outline: none;
  box-shadow: none;
}
.dbx .dbx-switcher::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  border-right: 1.7px solid var(--db-muted);
  border-bottom: 1.7px solid var(--db-muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.dbx .dbx-switcher:hover { border-color: #c3d6e8; }
.dbx .dbx-switcher:focus-within {
  border-color: var(--db-primary);
  box-shadow: 0 0 0 3px rgba(7, 142, 232, .12);
}
.dbx .dbx-switcher option { color: var(--db-ink); background: #fff; }

/* ---------- LABEL SEKSI ---------- */
.dbx .dbx-sec { margin-bottom: 40px; }
.dbx .dbx-sec:last-child { margin-bottom: 10px; }
.dbx .dbx-sec__label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 15px;
  color: var(--db-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dbx .dbx-sec__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--db-line);
}

/* ---------- KARTU ---------- */
.dbx .dbx-card {
  padding: 16px;
  border: 1px solid rgba(0, 52, 125, .08);
  border-radius: 19px;
  background: var(--db-card-bg);
  box-shadow: var(--db-shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}
.dbx .dbx-card:hover {
  box-shadow: var(--db-shadow-h);
  transform: translateY(-2px);
}
.dbx .dbx-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dbx .dbx-hd__t {
  margin: 0;
  color: var(--db-ink);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.dbx .dbx-hd__tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--db-tag-bg);
  color: var(--db-tag-fg);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.dbx .dbx-pad { min-width: 0; }
.dbx .dbx-pad--stack { display: grid; gap: 14px; }

/* ---------- TOMBOL AKSI (CTA di dalam kartu) ---------- */
.dbx .dbx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.dbx .dbx-btn i { font-size: 15px; line-height: 1; }
.dbx .dbx-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(7, 142, 232, .18); }
.dbx .dbx-btn--primary {
  background: var(--db-primary);
  color: #fff;
  box-shadow: 0 7px 15px -9px rgba(7, 142, 232, .8);
}
.dbx .dbx-btn--primary:hover { background: var(--db-deep); color: #fff; }
.dbx .dbx-btn--ghost { background: #fff; border-color: var(--db-line); color: var(--db-body); }
.dbx .dbx-btn--ghost:hover { background: var(--db-pill); border-color: #c3d6e8; color: var(--db-ink); }
.dbx .dbx-btn--sm { min-height: 30px; padding: 0 11px; font-size: 11.5px; border-radius: 10px; }
.dbx .dbx-btn--block { width: 100%; }

/* ---------- KAKI KARTU (baris aksi) ---------- */
.dbx .dbx-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 15px -16px -16px;
  padding: 11px 16px;
  border-top: 1px solid var(--db-line-2);
  border-radius: 0 0 18px 18px;
  background: var(--db-pill);
}
.dbx .dbx-ft__n { color: #96a6b5; font-size: 10.5px; }

/* ---------- TAUTAN KECIL DI HEADER KARTU ---------- */
.dbx .dbx-hd__l {
  flex: 0 0 auto;
  color: var(--db-deep);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}
.dbx .dbx-hd__l:hover { text-decoration: underline; }
.dbx .dbx-hd__tag--new { background: #fdeaea; color: #c94848; }
.dbx .dbx-hd__tag--ok { background: #e2f5ec; color: #0b7a55; }
.dbx .dbx-hd__tag--warn { background: #fdf1dc; color: #a2660a; }

/* ---------- BARIS BISA DIKLIK ---------- */
.dbx .dbx-row--link {
  margin: 0 -8px;
  padding: 9px 8px;
  border-bottom-color: transparent;
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
  transition: background-color .18s ease;
}
.dbx .dbx-row--link + .dbx-row--link { border-top: 1px solid var(--db-line-2); }
.dbx .dbx-row--link:hover { background: var(--db-pill); }
.dbx .dbx-row--link > i { color: #b3c3ce; font-size: 16px; transition: transform .18s ease, color .18s ease; }
.dbx .dbx-row--link:hover > i { color: var(--db-primary); transform: translateX(2px); }

/* ---------- METRIC ROW (6 kartu ringkasan — bertint, colorful) ---------- */
.dbx .dbx-mrow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
}
.dbx .dbx-mrow--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dbx .dbx-mrow--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ── Kartu "Pilih Anak" (portal orang tua) ────────────────────────────────
   Diklik sebagai tombol submit, jadi butuh reset appearance & fokus yang jelas. */
.dbx .dbx-pilihAnak {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.dbx .dbx-pilihAnak:hover {
  border-color: #c3d6e8;
  background: #fbfdff;
  box-shadow: 0 6px 18px -12px rgba(11, 95, 165, .45);
}
.dbx .dbx-pilihAnak:focus-visible {
  outline: 2px solid var(--db-accent, #0b5fa5);
  outline-offset: 2px;
}
.dbx .dbx-pilihAnak--aktif {
  border-color: var(--db-accent, #0b5fa5);
  background: #f7fbff;
}
.dbx .dbx-pilihAnak__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #eaf2fb;
  color: var(--db-deep, #0b5fa5);
  font-weight: 700;
  font-size: 17px;
}
.dbx .dbx-pilihAnak__body { flex: 1 1 auto; min-width: 0; }
.dbx .dbx-pilihAnak__nama {
  display: block;
  color: var(--db-ink, #10233a);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
}
.dbx .dbx-pilihAnak__meta {
  display: block;
  color: #96a6b5;
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 2px;
}
.dbx .dbx-mc {
  /* palet per metrik: --hue (solid/ikon+angka), --tint (isi kartu), --line (border) */
  --hue: #0b5fa5;
  --tint: #eff6ff;
  --line: #d6e9fb;
  --hue-soft: #dbeafe;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(170deg, var(--tint) 0%, #fff 58%);
  box-shadow: var(--db-shadow);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.dbx .dbx-mc:hover {
  border-color: var(--hue);
  box-shadow: var(--db-shadow-h);
  transform: translateY(-2px);
}
.dbx .dbx-mc__ic {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--hue);
  box-shadow: 0 4px 10px -3px var(--hue-soft), inset 0 1px 0 rgba(255, 255, 255, .28);
  color: #fff;
  font-size: 17px;
}
.dbx .dbx-mc__b { min-width: 0; display: grid; }
.dbx .dbx-mc__b small {
  color: #7e90a5;
  font-size: 11px;
  font-weight: 650;
}
.dbx .dbx-mc__b strong {
  margin-top: 2px;
  color: var(--hue);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.dbx .dbx-mc__b em {
  overflow: hidden;
  color: #9aa9b8;
  font-size: 10.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 6 palet metrik — satu warna kuat per kartu, tint tipis isinya */
.dbx .dbx-mc--a,
.dbx .dbx-mc__ic--a { --hue: #0b5fa5; --tint: #eff6ff; --line: #d6e9fb; --hue-soft: #c7dffb; }
.dbx .dbx-mc--b,
.dbx .dbx-mc__ic--b { --hue: #067a53; --tint: #edfaf3; --line: #cfeddd; --hue-soft: #b9e7d2; }
.dbx .dbx-mc--c,
.dbx .dbx-mc__ic--c { --hue: #5b4bc4; --tint: #f4f2fe; --line: #e1ddfb; --hue-soft: #d5cff8; }
.dbx .dbx-mc--d,
.dbx .dbx-mc__ic--d { --hue: #a2660a; --tint: #fff9ec; --line: #f7e4bd; --hue-soft: #f6ddaa; }
.dbx .dbx-mc--e,
.dbx .dbx-mc__ic--e { --hue: #be2a5a; --tint: #fef1f5; --line: #f9d4e1; --hue-soft: #f8c6d7; }
.dbx .dbx-mc--f { --hue: #0a7a80; --tint: #ebfafa; --line: #c9ecec; --hue-soft: #b2e4e4; }

/* ---------- BARIS DATA ---------- */
.dbx .dbx-rows { list-style: none; margin: 0; padding: 0; }
.dbx .dbx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--db-line-2);
}
.dbx .dbx-row:last-child { border-bottom: 0; }
.dbx .dbx-row__l {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--db-body);
  font-size: 12.5px;
}
.dbx .dbx-row__l i { color: #a9bcc6; font-size: 15px; }
.dbx .dbx-row__v {
  flex: 0 0 auto;
  color: var(--db-ink);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.dbx .dbx-row__v--ok { color: var(--db-ok); }
.dbx .dbx-row__v--warn { color: var(--db-warn); }
.dbx .dbx-row__v--bad { color: var(--db-bad); }
.dbx .dbx-row__sub { display: block; color: #96a6b5; font-size: 10.5px; font-weight: 500; }

/* ---------- TITIK SEMANTIK ---------- */
.dbx .dbx-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}
.dbx .dbx-dot--ok { background: var(--db-ok); }
.dbx .dbx-dot--warn { background: var(--db-warn); }
.dbx .dbx-dot--bad { background: var(--db-bad); }
.dbx .dbx-dot--info { background: var(--db-info); }
.dbx .dbx-dot--purple { background: var(--db-purple); }
.dbx .dbx-dot--mute { background: #b8c6d2; }

/* ---------- STACKED BAR (kehadiran) ---------- */
.dbx .dbx-stack {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}
.dbx .dbx-stack__s { display: block; height: 100%; }
.dbx .dbx-stack__s--ok { background: var(--db-deep); }
.dbx .dbx-stack__s--info { background: var(--db-purple); }
.dbx .dbx-stack__s--warn { background: #efa945; }
.dbx .dbx-stack__s--bad { background: #e05c5c; }
.dbx .dbx-stack__s--mute { background: #b8c6d2; }

/* ---------- LEGENDA (pil tipis gaya agenda) ---------- */
.dbx .dbx-legend {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
}
.dbx .dbx-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 11px;
  background: var(--db-pill);
  color: var(--db-body);
  font-size: 11.5px;
}
.dbx .dbx-legend li > span:not(.dbx-dot) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dbx .dbx-legend b {
  margin-left: auto;
  color: var(--db-ink);
  font-size: 13px;
  font-weight: 800;
}

/* ---------- PROGRESS BAR ---------- */
.dbx .dbx-prog__hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--db-body);
  font-size: 12px;
}
.dbx .dbx-prog__hd b { color: var(--db-ink); font-weight: 800; }
.dbx .dbx-bar {
  display: flex;
  gap: 2px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}
.dbx .dbx-bar__f {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--db-fill-1), var(--db-fill-2));
}
.dbx .dbx-bar__f--2 { background: linear-gradient(90deg, #7fc4ff, var(--db-deep)); }
.dbx .dbx-bar__f--rose { background: #e05c5c; }
.dbx .dbx-bar__f--amber { background: #efa945; }
.dbx .dbx-bar__f--teal { background: linear-gradient(90deg, #6fd6c4, #0e8f8a); }
.dbx .dbx-bar__f--violet { background: var(--db-purple); }

/* ---------- DAFTAR SISWA PER TAHUN AJARAN ---------- */
.dbx .dbx-talist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2px 24px;
}
.dbx .dbx-tarow {
  min-width: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 7px 9px;
  border-radius: 10px;
}
.dbx .dbx-tarow.is-aktif { background: var(--db-mint); }
.dbx .dbx-tarow__t {
  min-width: 0;
  overflow: hidden;
  color: var(--db-body);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dbx .dbx-tarow__t em {
  margin-left: 6px;
  color: var(--db-deep);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dbx .dbx-tarow__b {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}
.dbx .dbx-tarow__f {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a9d8ff, #8fb9dd);
}
.dbx .dbx-tarow.is-aktif .dbx-tarow__f {
  background: linear-gradient(90deg, var(--db-fill-1), var(--db-fill-2));
}
.dbx .dbx-tarow__v {
  min-width: 52px;
  color: var(--db-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: right;
}
.dbx .dbx-tarow.is-aktif .dbx-tarow__v { color: var(--db-deep); }

/* ---------- TOOLTIP HOVER PADA BAR (L/P) ---------- */
.dbx .dbx-bar--split { position: relative; overflow: visible; }
.dbx .dbx-bar__seg {
  position: relative;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.dbx .dbx-bar__seg::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 30;
  padding: 6px 10px;
  border-radius: 8px;
  background: #0a2342;
  box-shadow: 0 8px 18px rgba(10, 35, 66, .18);
  color: #fff;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease;
}
.dbx .dbx-bar__seg::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  z-index: 30;
  border: 5px solid transparent;
  border-top-color: #0a2342;
  border-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .15s ease;
}
.dbx .dbx-bar__seg:hover { filter: brightness(1.06); }
.dbx .dbx-bar__seg:hover::after,
.dbx .dbx-bar__seg:hover::before,
.dbx .dbx-bar__seg:focus-visible::after,
.dbx .dbx-bar__seg:focus-visible::before { opacity: 1; }
.dbx .dbx-bar__seg:hover::after,
.dbx .dbx-bar__seg:focus-visible::after { transform: translate(-50%, 0); }

/* Jaga agar tooltip baris pertama tidak keluar dari kartu */
.dbx .dbx-prog:first-child .dbx-bar__seg::after,
.dbx .dbx-prog:first-child .dbx-bar__seg::before { top: auto; bottom: auto; }
.dbx .dbx-prog:first-child .dbx-bar__seg::after { top: calc(100% + 8px); }
.dbx .dbx-prog:first-child .dbx-bar__seg::before { top: calc(100% + 3px); border-top-color: transparent; border-bottom-color: #0a2342; border-bottom-width: 5px; border-top-width: 0; }

/* Legend ringkas L/P */
.dbx .dbx-legend--lp { margin: 12px 0 0; }
.dbx .dbx-legend--lp li { background: transparent; padding: 4px 2px; }
.dbx .dbx-legend--lp .dbx-dot--info { background: linear-gradient(180deg, #7fc4ff, var(--db-deep)); }
.dbx .dbx-legend--lp .dbx-dot--warn { background: #efa945; }

/* ---------- FEED AKTIVITAS (pil agenda) ---------- */
.dbx .dbx-feed { list-style: none; margin: 0; padding: 0; }
.dbx .dbx-feed__i {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px;
  border-radius: 11px;
  background: var(--db-pill);
}
.dbx .dbx-feed__ic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  font-size: 13px;
}
.dbx .dbx-feed__ic--ok { color: var(--db-deep); background: #e5f3ff; }
.dbx .dbx-feed__ic--info { color: #4c57c5; background: #eceefe; }
.dbx .dbx-feed__ic--mute { color: #6b7f90; background: #e9eff4; }
.dbx .dbx-feed__b { min-width: 0; display: grid; gap: 3px; }
.dbx .dbx-feed__t {
  overflow: hidden;
  color: var(--db-ink);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dbx .dbx-feed__m { color: #96a6b5; font-size: 10.5px; }

/* ---------- KOSONG ---------- */
.dbx .dbx-empty {
  margin: 0;
  padding: 26px 0;
  color: var(--db-faint);
  font-size: 12.5px;
  text-align: center;
}

/* ---------- RESPONSIF ---------- */
@media (max-width: 1279px) {
  .dbx .dbx-mrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dbx .dbx-mrow--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .dbx .dbx-legend { grid-template-columns: 1fr; }
  .dbx .dbx-talist { grid-template-columns: minmax(0, 1fr); }
  .dbx .dbx-tarow { grid-template-columns: 112px minmax(0, 1fr) auto; }
}
@media (max-width: 639px) {
  .dbx .dbx-title { font-size: 22px; }
  .dbx .dbx-mrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dbx .dbx-mrow--2 { grid-template-columns: minmax(0, 1fr); }
  .dbx .dbx-hero { margin-bottom: 24px; }
  .dbx .dbx-sec { margin-bottom: 30px; }
  .dbx .dbx-mc__b em { display: none; }
}

/* ══ SIDEBAR — TEMA PORTAL (panel putih, aksen biru portal) ══


   Latar tetap putih; warna aksen memakai --primary yang dikunci
   ke tema portal (#1470a6 / #1798b6), bukan biru Tailwind default.
   active  = pil biru muda + ikon biru solid + bar aksen di tepi kiri
   hover   = biru sangat transparan + teks biru
   collapsed = pil aktif tetap terlihat sebagai penanda menu. */
#sidebar-desktop-wrapper {
  --sb-text: #1f2937;
  --sb-dim: #64748b;
  --sb-faint: #94a3b8;
  --sb-hover: rgba(20, 112, 166, 0.06);
  --sb-active: rgba(20, 112, 166, 0.10);
  --sb-line: rgba(20, 112, 166, 0.16);
}

/* Label grup / judul seksi */
#sidebar-desktop-wrapper .sidebar-nav h3 {
  color: var(--sb-faint) !important;
}
#sidebar-desktop-wrapper .sidebar-nav li.border-t { border-color: var(--sb-line) !important; }

/* Ikon menu: netral saat idle, biru solid saat aktif.
   Pakai .h-8.w-8 (bukan div:first-child) karena item grup punya
   lapisan <div class="flex items-center gap-3"> pembungkus. */
#sidebar-desktop-wrapper .sidebar-nav .h-8.w-8 {
  color: var(--sb-dim);
  background: #eef2f6;
}
#sidebar-desktop-wrapper .sidebar-nav ul > li > a:hover .h-8.w-8 {
  color: hsl(var(--primary));
  background: rgba(20, 112, 166, 0.12);
}
#sidebar-desktop-wrapper .sidebar-nav ul > li > a.sidebar-active .h-8.w-8 {
  color: #fff;
  background: hsl(var(--primary));
  box-shadow: 0 4px 10px rgba(20, 112, 166, 0.28);
}

/* Submenu: garis pemisah + daun */
#sidebar-desktop-wrapper .sidebar-nav .sub-menu { border-color: var(--sb-line) !important; }
#sidebar-desktop-wrapper .sidebar-nav .sub-menu a { color: var(--sb-dim); }
#sidebar-desktop-wrapper .sidebar-nav .sub-menu a i { color: inherit; }
#sidebar-desktop-wrapper .sidebar-nav .sub-menu a:hover { color: hsl(var(--primary)); background: var(--sb-hover); }
#sidebar-desktop-wrapper .sidebar-nav .sub-menu a:hover i { color: hsl(var(--primary)); }
#sidebar-desktop-wrapper .sidebar-nav .sub-menu a.text-primary {
  color: hsl(var(--primary));
  background: var(--sb-active);
  font-weight: 600;
}
#sidebar-desktop-wrapper .sidebar-nav .sub-menu a.text-primary i { color: hsl(var(--primary)); }

/* Item utama + chevron
   Jangan set `color` di sini: utility utilitas tiap item
   (text-muted-foreground / text-primary / text-rose-600) harus
   tetap berdaulat agar hierarki idle→aktif tidak seragam. */
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a {
  position: relative !important;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a:hover,
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a.sidebar-active:hover {
  background: var(--sb-hover) !important;
  box-shadow: none !important;
  color: hsl(var(--primary)) !important;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a:hover .h-8.w-8 {
  box-shadow: none;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a.sidebar-active:hover .h-8.w-8 {
  background: hsl(var(--primary)) !important;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a > .bx-chevron-down {
  color: var(--sb-faint);
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a:hover > .bx-chevron-down { color: hsl(var(--primary)); }

/* Aktif: pil biru muda + bar aksen di tepi kiri */
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a.sidebar-active {
  background: var(--sb-active) !important;
  color: hsl(var(--primary)) !important;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px;
  height: 60%;
  border-radius: 999px;
  background: hsl(var(--primary));
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a:hover::before {
  transform: translateY(-50%) scaleY(1);
  opacity: 0.35;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a.sidebar-active::before {
  transform: translateY(-50%) scaleY(1);
  opacity: 1;
}
#sidebar-desktop-wrapper:not(.collapsed) .sidebar-nav ul > li > a:hover span {
  transform: translateX(2px);
  transition: transform 0.2s ease;
}

/* Saat collapsed, pil aktif tetap jadi penanda (label disembunyikan) */
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a.sidebar-active {
  background: var(--sb-active) !important;
  color: hsl(var(--primary)) !important;
}
#sidebar-desktop-wrapper.collapsed .sidebar-nav ul > li > a.sidebar-active .h-8.w-8 {
  background: hsl(var(--primary)) !important;
  color: #fff;
}

/* Link keluar (merah) */
#sidebar-desktop-wrapper a.text-rose-600:hover {
  background: rgba(225, 29, 72, 0.08) !important;
  color: #be123c !important;
}

/* Tombol expand saat sidebar collapsed */
#sidebar-expand-btn:hover {
  background: var(--sb-active);
  color: hsl(var(--primary));
}



/* ============================================================
   AUTH PORTAL — Pilih Portal + Login per Peran
   Tema clay + aksen biru, selaras https://portalpendidikan.eduvia.id/portal/
   Dipakai oleh: auth/pilih_portal.php dan auth/login.php
   ============================================================ */

/* AUTH PORTAL — tema clay + aksen biru (selaras https://portalpendidikan.eduvia.id/portal/)
   Dipakai bersama oleh: auth/pilih_portal.php dan auth/login.php */

/* Self-hosted Manrope (variable, weight 400-800 dalam 1 file per subset).
   Self-host + preload = tanpa DNS/TLS Google. */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
        U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
        U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
        U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* "Manrope Fallback" = Arial yang metriknya dipaksa sama dengan Manrope.
   Tanpa ini, saat font belum selesai diunduh teks tampil dengan Arial/Segoe UI
   (lebih tinggi & lebar), lalu di-swap ke Manrope: tabel melebar dulu lalu
   menyusut, dan mata menangkap "dua font". Dengan size-adjust + override di
   bawah, tinggi baris & lebar glyph fallback hampir identik dengan Manrope,
   jadi pertukarannya tidak terlihat.
   Angka dihitung dari file asli (upem 2000; hhea 2132/-600; xHeight 1080;
   capHeight 1440) dibandingkan Arial, lalu dikalibrasi ke algoritma
   next/font — divalidasi dengan script yang sama: untuk "Inter Fallback" di
   tailwind.min.css ia menghasilkan 90.44/22.52/107.12, persis sama dengan
   angka next/font. JANGAN ubah angka di sini tanpa hitung ulang. */
@font-face {
    font-family: "Manrope Fallback";
    src: local("Arial");
    ascent-override: 105.34%;
    descent-override: 29.65%;
    line-gap-override: 0%;
    x-height-override: 53.36%;
    cap-height-override: 71.15%;
    size-adjust: 101.19%;
}

:root {
    --ap-ink: #11243f;
    --ap-ink-soft: #4f5f5b;
    --ap-muted: #6f7d90;
    --ap-faint: #8a95a4;
    --ap-line: #dce9e4;
    --ap-accent: #1470a6;
    --ap-accent-2: #1798b6;
    --ap-deep: #0b4a6f;
    --ap-canvas: #e8edeb;
    --ap-clay-top: #ffffff;
    --ap-clay-bottom: #e8efec;
    --ap-clay-inset: #edf3f0;
    --ap-clay-ink: #202c33;
    --ap-clay-muted: #647871;
    --ap-clay-shadow: rgba(53, 67, 76, .13);
    --ap-clay-highlight: rgba(255, 255, 255, .78);
    --ap-radius: 16px;
    --ap-font: "Manrope", "Manrope Fallback", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
}

body.ap-body {
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--ap-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ap-ink-soft);
    background:
        radial-gradient(circle at 8% 12%, rgba(31, 131, 190, .10), transparent 27%),
        radial-gradient(circle at 92% 88%, rgba(22, 158, 191, .10), transparent 29%),
        linear-gradient(135deg, #e7ecea, #f2f5f4 55%, #e6ece9);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body.ap-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .38;
    background-image:
        linear-gradient(rgba(17, 65, 91, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 65, 91, .035) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

/* Zero-specificity reset: :where() wraps the WHOLE selector, including the
   .ap-body class, so this contributes (0,0,0) and every component rule below
   wins on source order. Wrapping only the element (body.ap-body :where(p))
   still leaves (0,1,1), which outranks single-class rules like .ap-subtitle and
   silently kills their `margin: auto` centering. */
:where(body.ap-body) :where(h1, h2, h3, p) {
    margin: 0;
    color: var(--ap-clay-ink);
    text-wrap: balance;
}

body.ap-body a {
    color: inherit;
    text-decoration: none;
}

/* ---------- LAYOUT ---------- */
.ap-main {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(1240px, calc(100% - 64px));
    min-height: 100dvh;
    align-content: center;
    margin: 0 auto;
    padding: 44px 0 30px;
}

.ap-main.narrow {
    width: min(560px, calc(100% - 44px));
    align-content: center;
}

/* ---------- WELCOME ---------- */
.ap-welcome {
    margin-bottom: 28px;
    text-align: center;
}

.ap-brand-mark {
    position: relative;
    display: inline-grid;
    width: 86px;
    height: 86px;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 26px;
    background: var(--ap-clay-top);
    box-shadow:
        0 18px 42px rgba(20, 98, 139, .18),
        0 0 0 1px rgba(18, 90, 129, .08),
        7px 7px 17px var(--ap-clay-shadow),
        -6px -6px 15px var(--ap-clay-highlight);
}

.ap-brand-mark::after {
    content: "";
    position: absolute;
    right: -3px;
    bottom: -2px;
    width: 20px;
    height: 20px;
    border: 4px solid var(--ap-clay-top);
    border-radius: 50%;
    background: #1d80bd;
    box-shadow: 0 5px 12px rgba(20, 105, 156, .3);
}

.ap-brand-mark img {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    object-fit: contain;
}

/* display:flex (bukan inline-flex) supaya menjadi block-level dan turun ke baris
   sendiri di bawah .ap-brand-mark — kalau inline,_flow-nya nyambung di sisi logo. */
.ap-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto 11px;
    padding: 8px 13px;
    border: 1px solid #dcefe8;
    border-radius: 999px;
    background: #f5fcf9;
    color: #125880;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
}

.ap-eyebrow i,
.ap-secure i {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #1d80bd;
    box-shadow: 0 0 0 5px rgba(29, 128, 189, .12);
}

.ap-welcome h1 {
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.04em;
}

.ap-welcome h1 span {
    color: transparent;
    background: linear-gradient(110deg, #126ea5, #1798b6);
    background-clip: text;
    -webkit-background-clip: text;
}

.ap-welcome > p {
    max-width: 720px;
    margin: 14px auto 0;
    color: var(--ap-muted);
    font-size: 16px;
    line-height: 1.65;
}

/* ---------- SELECTOR / CARD KONTEN ---------- */
.ap-selector {
    position: relative;
    padding: 26px;
    overflow: hidden;
    border: 1px solid rgba(208, 221, 218, .92);
    border-radius: 29px;
    background: rgba(255, 255, 255, .96);
    box-shadow:
        0 28px 80px rgba(23, 54, 73, .09),
        0 3px 12px rgba(23, 54, 73, .035);
}

.ap-selector::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 36%;
    height: 3px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #2783ba, #25a8c1, transparent);
}

.ap-selector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
    padding: 0 3px;
}

.ap-selector-head h2 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.ap-selector-head p {
    margin-top: 5px;
    color: var(--ap-muted);
    font-size: 14px;
    line-height: 1.55;
}

.ap-secure {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: #4f616c;
    font-size: 13px;
    font-weight: 700;
}

/* ---------- GRID KARTU PERAN ---------- */
.ap-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ap-card {
    --accent: #1470a6;
    position: relative;
    display: block;
    min-height: 252px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 23px;
    background: linear-gradient(145deg, var(--ap-clay-top), var(--ap-clay-bottom));
    box-shadow:
        7px 7px 17px var(--ap-clay-shadow),
        -6px -6px 15px var(--ap-clay-highlight);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ap-card::after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -62px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.ap-card:hover,
.ap-card:focus-visible {
    z-index: 2;
    outline: 0;
    border-color: color-mix(in srgb, var(--accent) 34%, #e4ece9);
    box-shadow:
        0 18px 40px color-mix(in srgb, var(--accent) 16%, transparent),
        7px 7px 17px var(--ap-clay-shadow),
        -6px -6px 15px var(--ap-clay-highlight);
    transform: translateY(-5px);
}

.ap-card:focus-visible {
    box-shadow:
        0 18px 40px color-mix(in srgb, var(--accent) 16%, transparent),
        0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.ap-card:hover::after {
    transform: scale(1.18);
}

/* Aksen tiap portal. Guru memakai --accent bawaan :root, jadi tidak perlu baris sendiri. */
.ap-card[data-accent="siswa"] { --accent: #1489ca; }
.ap-card[data-accent="admin"] { --accent: #765ad8; }
.ap-card[data-accent="orang_tua"] { --accent: #e6922b; }

.ap-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.ap-icon {
    position: relative;
    display: grid;
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 28px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .98), transparent 42%),
        color-mix(in srgb, var(--accent) 9%, var(--ap-clay-top));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .95),
        0 15px 28px color-mix(in srgb, var(--accent) 16%, transparent);
}

.ap-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 4px rgba(24, 39, 47, .14));
}

.ap-number {
    color: color-mix(in srgb, var(--accent) 78%, #8793a2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.ap-copy {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 20px;
}

.ap-copy small {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.ap-copy h2 {
    margin: 7px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.ap-copy p {
    min-height: 42px;
    color: #758195;
    font-size: 13px;
    line-height: 1.55;
}

.ap-enter {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.ap-enter b {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    transition: transform .18s ease;
}

.ap-card:hover .ap-enter b {
    transform: translateX(3px);
}

/* ---------- FORM LOGIN ---------- */
/* Anatomi mengikuti halaman login per peran di portal acuan:
   back-link → brand lockup (logo + eyebrow + h1) → subtitle → panel → form. */

.ap-backtop {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 20px;
    color: var(--ap-muted);
    font-size: 12.5px;
    font-weight: 700;
    transition: color .18s ease;
}

.ap-backtop:hover {
    color: var(--ap-accent);
}

.ap-backtop i {
    font-size: 16px;
    line-height: 1;
}

.ap-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    text-align: center;
}

.ap-lockup-logo {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 15px;
    border-radius: 24px;
    background: var(--ap-clay-top);
    box-shadow:
        0 18px 42px rgba(20, 98, 139, .18),
        7px 7px 17px var(--ap-clay-shadow),
        -6px -6px 15px var(--ap-clay-highlight);
}

.ap-lockup-logo img {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    object-fit: contain;
}

.ap-lockup h1 {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.ap-subtitle {
    max-width: 430px;
    margin: 7px auto 0;
    color: var(--ap-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.ap-panel-title {
    display: block;
    margin: 20px 0 15px;
    padding-top: 18px;
    border-top: 1px solid var(--ap-line);
    color: var(--ap-clay-ink);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ap-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #f0c9c9;
    border-left: 4px solid #c0392b;
    border-radius: 14px;
    background: #fdf3f2;
    color: #8e2b20;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: inset 2px 2px 5px rgba(150, 50, 40, .07);
}

.ap-alert i {
    flex: 0 0 auto;
    font-size: 19px;
    line-height: 1.2;
    color: #c0392b;
}

.ap-field {
    margin-bottom: 16px;
}

.ap-field > label {
    display: block;
    margin-bottom: 7px;
    padding: 0 3px;
    color: var(--ap-clay-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
}

/* Baris bantuan di bawah form: teks kecil + tautan "Lupa password?" */
.ap-helper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0 0;
    padding: 0 4px;
}

.ap-helper small {
    color: var(--ap-muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.ap-helper a {
    flex: 0 0 auto;
    color: var(--ap-accent);
    font-size: 11.5px;
    font-weight: 700;
}

.ap-helper a:hover {
    text-decoration: underline;
}


.ap-control {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    border: 1px solid #d7e3de;
    border-radius: 15px;
    background: var(--ap-clay-inset);
    box-shadow:
        inset 2px 2px 5px rgba(48, 65, 75, .09),
        inset -2px -2px 5px rgba(255, 255, 255, .76);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.ap-control:focus-within {
    border-color: #3d82a9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 99, 148, .13);
}

.ap-control > i {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    color: #93a5a0;
}

.ap-control input {
    width: 100%;
    min-width: 0;
    padding: 14px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ap-clay-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}

.ap-control input::placeholder {
    color: #9aaba5;
    font-weight: 400;
}

/* Tombol lihat/sembunyikan password — gaya teks "Lihat" ala portal acuan */
.ap-reveal {
    flex: 0 0 auto;
    padding: 8px 2px 8px 10px;
    border: 0;
    background: transparent;
    color: var(--ap-accent);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    transition: color .18s ease;
}

.ap-reveal:hover {
    text-decoration: underline;
}


.ap-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 22px;
    padding: 15px 20px;
    border: 1px solid var(--ap-deep);
    border-radius: 15px;
    background: linear-gradient(135deg, #06537d, var(--ap-deep));
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(7, 94, 140, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ap-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(7, 94, 140, .28);
}

.ap-submit:active {
    transform: translateY(0);
}

.ap-submit:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(0, 52, 125, .2);
}

.ap-submit[hidden] {
    display: none;
}

.ap-submit[disabled] {
    cursor: not-allowed;
    filter: grayscale(.15);
    opacity: .55;
    transform: none;
}

.ap-submit i {
    font-size: 18px;
    line-height: 1;
}

.ap-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
    color: var(--ap-faint);
    font-size: 12px;
}

.ap-foot i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b8c1ca;
}

/* ---------- RESPONSIF ---------- */
@media (max-width: 1050px) {
    .ap-main {
        width: min(900px, calc(100% - 44px));
        padding: 36px 0 28px;
    }

    .ap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-card {
        min-height: 230px;
    }
}

@media (max-width: 650px) {
    .ap-main {
        width: min(520px, calc(100% - 28px));
        align-content: start;
        padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
    }

    .ap-main.narrow {
        width: min(480px, calc(100% - 28px));
    }

    .ap-welcome {
        margin-bottom: 22px;
    }

    .ap-brand-mark {
        width: 72px;
        height: 72px;
        margin-bottom: 16px;
        border-radius: 20px;
    }

    .ap-brand-mark img {
        width: 64px;
        height: 64px;
        border-radius: 17px;
    }

    .ap-brand-mark::after {
        width: 17px;
        height: 17px;
        border-width: 3px;
    }

    .ap-eyebrow {
        font-size: 10px;
    }

    .ap-welcome h1 {
        font-size: clamp(27px, 9vw, 36px);
    }

    .ap-welcome > p {
        font-size: 14px;
    }

    .ap-selector {
        padding: 17px;
        border-radius: 23px;
    }

    .ap-selector-head {
        align-items: flex-start;
    }

    .ap-selector-head h2 {
        font-size: 19px;
    }

    .ap-secure {
        display: none;
    }

    .ap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ap-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: 0;
        aspect-ratio: 1 / 1;
        padding: 8px 6px;
        border-radius: 18px;
        text-align: center;
    }

    .ap-card-top {
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .ap-card .ap-icon {
        width: min(78%, 150px);
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: clamp(18px, 6vw, 30px);
    }

    .ap-card .ap-icon svg {
        width: 52%;
        height: 52%;
    }

    .ap-number {
        position: absolute;
        top: 1px;
        right: 1px;
        font-size: 9px;
    }

    .ap-copy {
        margin-top: 3px;
    }

    .ap-copy small {
        font-size: 7px;
    }

    .ap-copy h2 {
        margin: 3px 0 0;
        font-size: clamp(12px, 3.6vw, 16px);
    }

    .ap-copy p,
    .ap-enter {
        display: none;
    }

    .ap-foot {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .ap-foot i {
        display: none;
    }
}

@media (max-width: 760px) {
    body.ap-body {
        font-size: 13px;
    }

    .ap-lockup-logo {
        width: 66px;
        height: 66px;
        border-radius: 21px;
    }

    .ap-lockup-logo img {
        width: 58px;
        height: 58px;
        border-radius: 15px;
    }

    .ap-lockup h1 {
        font-size: 22px;
    }

    .ap-control input {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ap-card,
    .ap-submit,
    .ap-enter b {
        transition: none;
    }
}

/* ── Auth Portal: netralkan global custom.css ──
  .custom.css baris ~30 punya `input:focus { border-color:#1470a6; box-shadow: teal }`
   dan `body, .pd-wrap * { font-family:"Manrope" }`. Keduanya menabrak tema auth
   (focus biru clay + Manrope), jadi dinetralkan di sini — spesifikitas
   .ap-body (0,1,1)/(0,2,1) menang atas input:focus (0,1,1) & body (0,0,1). */
.ap-body input:focus,
.ap-body textarea:focus,
.ap-body select:focus {
    outline: none;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.ap-body main {
    transition: none;
}

/* ── END custom.css ── */

/* ── BEGIN custom_global.css ── */
/* ── 1. VARIABEL GLOBAL (Design Tokens) ── */
:root {
  /* Tipografi */
  --font-sans: "Manrope", "Manrope Fallback", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Warna Utama Aplikasi (biru portal — sama dengan --ap-accent di custom.css) */
  --color-primary: #1470a6; /* biru portal */
  --color-primary-dark: #0b4a6f; /* biru portal deep */
  --color-secondary: #1798b6; /* biru portal aksen */

  /* Warna Dasar / Neutral (Slate) */
  --color-bg-body: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;

  /* Warna Teks */
  --text-main: #0f172a; /* Slate 900 */
  --text-muted: #64748b; /* Slate 500 */
  --text-light: #94a3b8; /* Slate 400 */

  /* Warna Semantik (Status Presensi/Aksi) */
  --color-hadir-bg: #f0fdf4;
  --color-hadir-soft: #dcfce7;
  --color-hadir-border: #86efac;
  --color-hadir-text: #16a34a;

  --color-izin-bg: #fffbeb;
  --color-izin-soft: #fef3c7;
  --color-izin-border: #fcd34d;
  --color-izin-text: #d97706;

  --color-sakit-bg: #eff6ff;
  --color-sakit-soft: #dbeafe;
  --color-sakit-border: #93c5fd;
  --color-sakit-text: #2563eb;

  --color-alpha-bg: #fff1f2;
  --color-alpha-soft: #ffe4e6;
  --color-alpha-border: #fca5a5;
  --color-alpha-text: #e11d48;

  --color-warning-accent: #f59e0b; /* Untuk Generate Soal */

  /* Efek Bayangan & Transisi */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(20, 112, 166, 0.08); /* Glow saat input aktif */
  --shadow-hover: 0 8px 22px rgba(15, 23, 42, 0.06);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;

  /* Kelengkungan (Border Radius) */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-2xl: 18px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-body);
  color: var(--text-main);
}

/* ── 2. HEADER & BADGES ── */
.ps-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.ps-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.ps-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-info {
  background: #e4f0f8;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

.badge-date {
  background: var(--color-sakit-bg);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

/* Tombol Utama (Gradient) */
.btn-primary-grad,
.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary));
  color: var(--color-surface);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-normal);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary-grad:hover,
.btn-save:hover {
  opacity: 0.88;
}

/* ── 3. CARDS & CONTAINERS ── */
.ps-card {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 20px;
}

.ps-card-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-card-head-title {
  font-size: 13px;
  font-weight: 700;
}

.ps-card-head i {
  font-size: 17px;
  color: var(--color-primary);
}

/* ── 4. FILTER & INPUTS ── */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.filter-group input,
.filter-group select,
.ket-input,
.search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--color-bg-body);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.filter-group input:focus,
.filter-group select:focus,
.ket-input:focus,
.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-focus);
}

.search-wrap {
  position: relative;
}

.search-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 15px;
}

.search-input {
  padding-left: 34px;
  width: 200px;
}

/* ── 5. STAT CHIPS ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 24px 20px;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-body);
  border: 1.5px solid var(--color-border-light);
}

.stat-chip-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.stat-chip-icon.teal {
  background: #eff6fb;
  color: var(--color-primary-dark);
}
.stat-chip-icon.green {
  background: var(--color-hadir-bg);
  color: var(--color-hadir-text);
}
.stat-chip-icon.amber {
  background: var(--color-izin-bg);
  color: var(--color-izin-text);
}
.stat-chip-icon.red {
  background: var(--color-alpha-bg);
  color: var(--color-alpha-text);
}
.stat-chip-icon.blue {
  background: var(--color-sakit-bg);
  color: var(--color-sakit-text);
}

.stat-chip-val {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.stat-chip-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── 6. DATA TABLES (Presensi & Riwayat) ── */
.ps-table,
.riwayat-table {
  width: 100%;
  border-collapse: collapse;
}

.ps-table thead tr,
.riwayat-table th {
  background: var(--color-bg-body);
}

.ps-table th,
.riwayat-table th {
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: left;
  white-space: nowrap;
}

.ps-table th.center {
  text-align: center;
}

.ps-table tbody tr,
.riwayat-table td {
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition-fast);
}

.ps-table tbody tr:hover,
.riwayat-table tbody tr:hover {
  background: var(--color-bg-body);
}

.ps-table tbody tr:last-child {
  border-bottom: none;
}
.riwayat-table tbody tr:last-child td {
  border-bottom: none;
}

.ps-table td,
.riwayat-table td {
  padding: 12px 16px;
  font-size: 13px;
  vertical-align: middle;
}

.td-no {
  text-align: center;
  color: var(--text-light);
  font-weight: 600;
  width: 48px;
}

.siswa-name {
  font-weight: 600;
}
.siswa-nisn {
  font-size: 11px;
  color: var(--text-light);
  font-family: monospace;
  margin-top: 2px;
}

/* ── 7. INTERACTIVE: PRESENSI OPTIONS & PILLS ── */
.presensi-opts {
  display: flex;
  gap: 6px;
}

.presensi-opt {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-body);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.presensi-opt input[type="radio"] {
  display: none;
}

/* Status Colors Mapping */
.presensi-opt.hadir {
  color: var(--color-hadir-text);
}
.presensi-opt.hadir:has(input:checked) {
  background: var(--color-hadir-soft);
  border-color: var(--color-hadir-border);
}

.presensi-opt.izin {
  color: var(--color-izin-text);
}
.presensi-opt.izin:has(input:checked) {
  background: var(--color-izin-soft);
  border-color: var(--color-izin-border);
}

.presensi-opt.sakit {
  color: var(--color-sakit-text);
}
.presensi-opt.sakit:has(input:checked) {
  background: var(--color-sakit-soft);
  border-color: var(--color-sakit-border);
}

.presensi-opt.alpha {
  color: var(--color-alpha-text);
}
.presensi-opt.alpha:has(input:checked) {
  background: var(--color-alpha-soft);
  border-color: var(--color-alpha-border);
}

/* Status Pills (Riwayat) */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.status-pill.hadir {
  background: var(--color-hadir-soft);
  color: var(--color-hadir-text);
}
.status-pill.izin {
  background: var(--color-izin-soft);
  color: #92400e;
}
.status-pill.sakit {
  background: var(--color-sakit-soft);
  color: #1e40af;
}
.status-pill.alpha {
  background: var(--color-alpha-soft);
  color: #9f1239;
}

/* Bulk Buttons */
.bulk-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.bulk-btn.hadir {
  border-color: var(--color-hadir-border);
  color: var(--color-hadir-text);
  background: var(--color-hadir-bg);
}
.bulk-btn.hadir:hover {
  background: var(--color-hadir-soft);
}
.bulk-btn.izin {
  border-color: var(--color-izin-border);
  color: var(--color-izin-text);
  background: var(--color-izin-bg);
}
.bulk-btn.izin:hover {
  background: var(--color-izin-soft);
}
.bulk-btn.sakit {
  border-color: var(--color-sakit-border);
  color: var(--color-sakit-text);
  background: var(--color-sakit-bg);
}
.bulk-btn.sakit:hover {
  background: var(--color-sakit-soft);
}
.bulk-btn.alpha {
  border-color: var(--color-alpha-border);
  color: var(--color-alpha-text);
  background: var(--color-alpha-bg);
}
.bulk-btn.alpha:hover {
  background: var(--color-alpha-soft);
}

/* ── 8. GENERATE SOAL BUILDER ── */
.gs-builder {
  display: grid;
  gap: 16px;
}
.gs-field-row {
  display: grid;
  gap: 16px;
}
.gs-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gs-field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gs-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
}
.gs-field-number {
  color: var(--color-warning-accent);
}

.gs-builder input,
.gs-builder select,
.gs-builder textarea {
  border-radius: var(--radius-xl);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--color-surface);
}
.gs-builder input:focus,
.gs-builder select:focus,
.gs-builder textarea:focus {
  border-color: var(--color-warning-accent);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}
.gs-builder input[readonly] {
  background: var(--color-bg-body);
  color: var(--text-muted);
}

.gs-choice-grid {
  display: grid;
  gap: 14px;
}
.gs-choice-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gs-choice-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gs-choice-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: 18px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 122px;
}
.gs-choice-card i {
  font-size: 22px;
  color: var(--color-warning-accent);
}
.gs-choice-title {
  font-size: 13px;
  font-weight: 700;
}
.gs-choice-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.gs-choice-card.is-active {
  border-color: var(--color-warning-accent);
  background: #fff8e6;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.12);
}
.gs-choice-card:hover {
  border-color: var(--color-warning-accent);
  box-shadow: var(--shadow-hover);
}

/* GS Paper Preview */
.gs-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.gs-preview-result {
  padding: 24px;
  min-height: 560px;
  background: linear-gradient(180deg, #eef5fb 0%, #f7fafc 100%);
}
.gs-paper {
  width: 100%;
  max-width: 820px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 34px 38px;
}

/* ── 9. SIDEBAR MENU POLISH (putih, aksen tema portal) ── */
#sidebar-desktop-wrapper aside.vertical-menu {
  background-color: #fff;
  background-image:
    radial-gradient(at 0% 0%, rgba(20, 112, 166, 0.07) 0%, transparent 46%),
    linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
  border-right: 1px solid rgba(20, 112, 166, 0.12);
  box-shadow: 0 16px 40px rgba(11, 74, 111, 0.08);
  backdrop-filter: none;
  color: var(--sb-text);
}
#sidebar-desktop-wrapper .sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(20, 112, 166, 0.22) transparent; }
.vertical-menu::-webkit-scrollbar {
  width: 8px;
}
.vertical-menu::-webkit-scrollbar-track {
  background: transparent;
}
.vertical-menu::-webkit-scrollbar-thumb {
  background: rgba(20, 112, 166, 0.20);
  border-radius: 999px;
}
.vertical-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 112, 166, 0.38);
}

/* ── UTILITIES & RESPONSIVE ── */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}
.empty-state i {
  font-size: 44px;
  display: block;
  margin-bottom: 12px;
}
.hidden-row {
  display: none;
}

@media (max-width: 1024px) {
  .gs-two-col,
  .gs-choice-grid-2,
  .gs-choice-grid-3 {
    grid-template-columns: 1fr;
  }
  .gs-submit-btn {
    width: 100%;
  }
}
@media (max-width: 900px) {
  .filter-grid,
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .presensi-opts {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .search-input {
    width: 100%;
  }
}

/* ── 3. SWEETALERT2 CUSTOM STYLE ── */
.swal2-popup {
  font-family: var(--font-sans);
  border-radius: var(--radius-xl);
  padding: 28px 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.swal2-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  padding: 0;
  margin-bottom: 4px;
}

.swal2-html-container {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 8px 0 16px;
  padding: 0;
}

.swal2-icon {
  border: none;
  margin: 8px auto 16px;
}

.swal2-icon.swal2-warning {
  color: #f59e0b;
}

.swal2-icon.swal2-error {
  color: #e11d48;
}

.swal2-icon.swal2-success {
  color: #16a34a;
}

.swal2-icon.swal2-info {
  color: var(--color-secondary);
}

.swal2-icon.swal2-question {
  color: var(--color-primary);
}

/* ── Tombol ── */
.swal2-actions {
  gap: 10px;
  margin-top: 16px;
}

.swal2-styled.swal2-confirm {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, hsl(196, 50%, 46%), hsl(183, 44%, 42%) 50%, hsl(170, 38%, 40%));
  box-shadow: none;
  transition: all var(--transition-normal);
}

.swal2-styled.swal2-confirm:hover {
  background: linear-gradient(135deg, hsl(196, 50%, 46%), hsl(183, 44%, 42%) 50%, hsl(170, 38%, 40%));
  box-shadow: 0 4px 14px rgba(20, 112, 166, 0.35);
  transform: translateY(-1px);
}

.swal2-styled.swal2-confirm:focus {
  box-shadow: 0 0 0 3px rgba(20, 112, 166, 0.25);
}

.swal2-styled.swal2-cancel {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: #6b7280;
  color: #fff;
  border: none;
  transition: all var(--transition-normal);
}

.swal2-styled.swal2-cancel:hover {
  background: #4b5563;
  color: #fff;
}

.swal2-styled.swal2-cancel:focus {
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.15);
}

/* ── Animasi ── */
.swal2-show {
  animation: swal2-custom-show 0.25s ease-out !important;
}

.swal2-hide {
  animation: swal2-custom-hide 0.15s ease-in !important;
}

@keyframes swal2-custom-show {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes swal2-custom-hide {
  from {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  to {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
}

/* ── Backdrop ── */
.swal2-container {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.swal2-container.swal2-backdrop-show {
  background: rgba(15, 23, 42, 0.35);
}

/* ── Timer progress bar ── */
.swal2-timer-progress-bar {
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  height: 3px;
}


/* DataTables pagination match custom_rombel.css page-btn */
#ruanganTable_wrapper .dataTables_paginate {
  display: flex;
  gap: 4px;
  align-items: center;
  padding-top: 0;
}

#ruanganTable_wrapper .paginate_button {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#ruanganTable_wrapper .paginate_button:hover {
  background: #0b4a6f;
  border-color: #0b4a6f;
  color: #fff;
}

#ruanganTable_wrapper .paginate_button.current {
  background: #0b4a6f;
  border-color: #0b4a6f;
  color: #fff;
}

#ruanganTable_wrapper .paginate_button.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ── END custom_global.css ── */

/* ── BEGIN custom_rombel.css ── */

body,
.rb-wrap * {
  font-family: var(--font-sans);
  box-sizing: border-box;
}

/* ── Page Header ── */
.rb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

/* ── Blok teks kiri pada header halaman ───────────────────────────────
   Eyebrow + judul + subjudul WAJIB jadi SATU anak flex, bukan tiga anak
   terpisah. Kalau terpisah, `justify-content: space-between` menganggapnya
   tiga anak dan blok judul terlempar ke TENGAH halaman (terukur x=667 dari
   area 276-1406) — bukan rata kiri seperti `.dbx-hero__txt` yang benar.

   Daftar di bawah mencakup SEMUA keluarga header halaman yang ada di
   codebase: rb-, ps-, pd-, rk-, kl-, plus rb-header-flex. Selector ditulis
   eksplisit (bukan `[class$="-header__txt"]`) supaya tetap/spesifik dan
   mudah dicari. 22 view sudah dibungkus blok ini. */
.pd-header__txt,
.ps-header__txt,
.rb-header__txt,
.rk-header__txt,
.kl-header__txt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

@media (max-width: 639px) {
  /* Tumpuk ke atas pada layar sempit; tombol jadi selebar konten.

     Selector `body .ptx .X-header` (0,2,1) disengaja: aturan `.ptx .X-header`
     di blok ~4900 memakai `align-items: flex-end` dengan spesifisitas (0,2,0)
     dan menang, sehingga dalam mode kolom blok teks terdorong ke KANAN
     (terukur x=176 dari container x=8). Dibuat lebih spesifik supaya override
     benar-benar berlaku tanpa !important.

     `.ps-header` sengaja ikut dipaksa ke kolom walau basisnya memakai
     `flex-wrap: wrap` (baris ~3205) — hasil akhirnya sama (tombol turun ke
     bawah) tapi perilakunya seragam di semua keluarga header. */
  body .ptx .pd-header,
  body .ptx .ps-header,
  body .ptx .rb-header,
  body .ptx .rk-header,
  body .ptx .kl-header {
    flex-direction: column;
    align-items: stretch;
  }
  .pd-header__txt,
  .ps-header__txt,
  .rb-header__txt,
  .rk-header__txt,
  .kl-header__txt {
    min-width: 0;
  }
}

.rb-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.rb-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-count {
  background: #e4f0f8;
  color: #1470a6;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

.btn-primary-grad {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #0b4a6f, #1798b6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn-primary-grad:hover {
  opacity: 0.88;
  color: #fff;
}

/* ── Card ── */
.rb-card {
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ── Toolbar ── */
.rb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: nowrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.toolbar-right {
  min-width: 0;
}
.toolbar-right {
  min-width: 0;
}

.toolbar-label {
  font-size: 12px;
  color: #64748b;
}

.entries-select {
  padding: 7px 10px;
  font-size: 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #374151;
  font-family: var(--font-sans);
  cursor: pointer;
  width: auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.entries-select:focus {
  outline: none;
  border-color: #1470a6;
}
/* entries-select yg kena Select2 → sembunyikan arrow-nya */
.entries-select + .select2-container .select2-selection__arrow {
  display: none;
}
.entries-select + .select2-container .select2-selection--single {
  padding-right: 14px;
}

.entries-select:focus {
  outline: none;
  border-color: #1470a6;
}

/* Form controls used across rb- components */
.rb-form-group {
  margin-bottom: 12px;
}
.rb-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}
.rb-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6edf3;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: #0f172a;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.rb-select:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.08);
}
.rb-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e6edf3;
  border-radius: 10px;
  font-size: 13px;
}
.rb-card .rb-form-group .rb-select,
.rb-card .rb-form-group .rb-input {
  box-shadow: none;
}

.dt-info {
  font-size: 12px;
  color: #94a3b8;
}

.search-wrap {
  position: relative;
}

.search-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
}

.search-input {
  padding: 8px 14px 8px 34px;
  font-size: 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #374151;
  width: 150px;
  min-width: 100px;
  max-width: 220px;
  font-family: var(--font-sans);
  transition:
    border-color 0.2s,
    background 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #1470a6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 112, 166, 0.08);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  font-family: var(--font-sans);
  transition: background 0.2s;
}

.btn-export.green {
  border-color: #bbf7d0;
  color: #16a34a;
  background: #f0fdf4;
}

.btn-export.green:hover {
  background: #dcfce7;
}

.btn-export.gray {
  border-color: #e2e8f0;
  color: #475569;
  background: #fff;
}

.btn-export.gray:hover {
  background: #f8fafc;
}

.btn-export.red {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff;
}
.btn-export.red:hover {
  background: #fef2f2;
}

/* ── Table ── */
.rb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
}
.rb-table td {
  padding: 14px 20px;
  font-size: 13px;
  color: #334155;
  vertical-align: middle;
}

.rb-table thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.rb-table th {
  padding: 12px 20px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: left;
  white-space: nowrap;
}

.rb-table th.center {
  text-align: center;
}

.rb-table tbody tr {
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s;
}

.rb-table tbody tr:hover {
  background: #f8fafc;
}

.rb-table tbody tr:last-child {
  border-bottom: none;
}

.rb-table td {
  padding: 14px 20px;
  font-size: 13px;
  color: #374151;
  vertical-align: middle;
}

.td-no {
  text-align: center;
  color: #94a3b8;
  font-weight: 600;
  width: 52px;
}

/* Kelas badge */
.kelas-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 8px;
}

/* Siswa chip */
.siswa-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6fb;
  color: #0b4a6f;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}

/* Wali */
.wali-name {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.wali-none {
  color: #cbd5e1;
  font-style: italic;
  font-size: 12px;
}

/* Rombel pill */
.rombel-pill {
  font-size: 12px;
  color: #6d28d9;
  background: #f5f3ff;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 600;
}

/* Kurikulum */
.kurikulum-badge {
  font-size: 12px;
  color: #0369a1;
  background: #e0f2fe;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 600;
}

/* Tahun */
.tahun-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Action buttons */
.action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.act-btn.edit {
  background: #eff6fb;
  color: #0b4a6f;
}

.act-btn.edit:hover {
  background: #c9e2f2;
}

.act-btn.view {
  background: #eff6ff;
  color: #2563eb;
}

.act-btn.view:hover {
  background: #dbeafe;
}

.act-btn.del {
  background: #fff1f2;
  color: #e11d48;
}

.act-btn.del:hover {
  background: #ffe4e6;
}

.act-btn.toggle {
  background: #f0f9ff;
  color: #0284c7;
}

.act-btn.toggle:hover {
  background: #e0f2fe;
}

/* Empty state */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.empty-state i {
  font-size: 44px;
  display: block;
  margin-bottom: 12px;
}

/* Pagination */
.rb-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 10px;
}

.page-info {
  font-size: 12px;
  color: #94a3b8;
}

.page-btns {
  display: flex;
  gap: 4px;
}

.page-btn {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  background: #0b4a6f;
  border-color: #0b4a6f;
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ── Modal overlay ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}


.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-box.lg {
  max-width: 700px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.modal-head-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #e2e8f0;
}

.modal-body-inner {
  padding: 24px;
}

/* Form inside modal */
.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-form-group:last-child {
  margin-bottom: 0;
}

.modal-form-group label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: #0f172a;
  background: #f8fafc;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
  appearance: auto;
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
  outline: none;
  border-color: #1470a6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 112, 166, 0.08);
}

.modal-footer-inner {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
}

.btn-cancel-modal {
  padding: 10px 18px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel-modal:hover {
  background: #e2e8f0;
}

.btn-submit-modal {
  padding: 10px 22px;
  background: linear-gradient(135deg, #0b4a6f, #1798b6);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit-modal:hover {
  opacity: 0.88;
}

/* Siswa modal table */
.siswa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.siswa-table thead tr {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.siswa-table th {
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.siswa-table td {
  padding: 10px 14px;
  color: #374151;
  border-bottom: 1px solid #f8fafc;
}

.siswa-table tbody tr:last-child td {
  border-bottom: none;
}

.siswa-table tbody tr:hover {
  background: #f8fafc;
}

.siswa-scroll {
  max-height: 360px;
  overflow-y: auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 14px;
}

.rekap-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rekap-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.rekap-chip.lk {
  background: #eff6ff;
  color: #1d4ed8;
}

.rekap-chip.pr {
  background: #fdf2f8;
  color: #9d174d;
}

.rekap-chip.tot {
  background: #eff6fb;
  color: #0b4a6f;
}

.wali-info {
  font-size: 13px;
  color: #374151;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wali-info strong {
  font-weight: 700;
  color: #0f172a;
}

/* Confirm dialog */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.open {
  display: flex;
}

.confirm-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.2s ease;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  background: #fff1f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  color: #e11d48;
}

.confirm-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.confirm-sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 22px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.btn-confirm-cancel {
  flex: 1;
  padding: 10px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
}

.btn-confirm-del {
  flex: 1;
  padding: 10px;
  background: #e11d48;
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-confirm-del:hover {
  background: #be123c;
}

/* Hidden rows */
.searchable-row.hidden-row {
  display: none;
}

@media (max-width: 700px) {
  .rb-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    justify-content: flex-end;
  }

  .search-input {
    width: 100%;
  }
}

/* ── END custom_rombel.css ── */

/* ══ HALAMAN DATA GTK (PENDIDIK / TENAGA KEPENDIKIAN) ══
   Selaras dengan DASHBOARD ADMIN: token --db-* yang sama, hero + card
   yang identik, tabel dan toolbar mengikuti tipografi dashboard. */
.ptx .dbx-hero { margin-bottom: 26px; }
.ptx .ptx-count {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--db-mint);
  color: var(--db-deep);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: -.01em;
}

/* ---------- HEADER HALAMAN DENGAN KELAS LOKAL ----------
   Halaman lama memakai keluarga kelas sendiri untuk judul (pd-/ps-/rb-/rk-/kl-).
   Aturan ini menyamakan ukurannya dengan .dbx-hero supaya semua menu sama. */
.ptx .pd-header,
.ptx .ps-header,
.ptx .rb-header,
.ptx .rb-header-flex,
.ptx .rk-header,
.ptx .kl-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.ptx .pd-title,
.ptx .ps-title,
.ptx .rb-title,
.ptx .rk-title,
.ptx .kl-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--db-ink);
}
.ptx .pd-subtitle,
.ptx .ps-subtitle,
.ptx .rb-subtitle,
.ptx .rk-subtitle,
.ptx .kl-subtitle {
  margin-top: 7px;
  font-size: 13px;
  color: var(--db-body);
}

/* ---------- KARTU & JUDUL BERBASIS BOOTSTRAP (halaman lama) ---------- */
.ptx .card {
  padding: 16px;
  border: 1px solid rgba(0, 52, 125, .08);
  border-radius: 19px;
  background: var(--db-card-bg);
  box-shadow: var(--db-shadow);
}
.ptx .card > .card-header {
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--db-line-2);
  background: transparent;
  border-radius: 0;
}
.ptx .page-title-box {
  margin-bottom: 26px;
  padding: 0;
  border: 0;
  background: transparent;
}
.ptx .page-title-box h4 {
  margin: 0;
  color: var(--db-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.ptx .page-title-box .breadcrumb {
  font-size: 12px;
  color: var(--db-muted);
}
.ptx .page-title-box .breadcrumb a { color: var(--db-deep); }
.ptx .page-title-box .breadcrumb-item.active { color: var(--db-muted); }

/* ---------- KARTU TABEL ---------- */
.ptx .ptx-card {
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 52, 125, .08);
  border-radius: 19px;
  background: var(--db-card-bg);
  box-shadow: var(--db-shadow);
}

/* ---------- TOOLBAR ---------- */
.ptx .ptx-card > .flex.flex-col {
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--db-line-2);
  align-items: center;
}
/* Label mutih (kiri toolbar + info jumlah data). PENTING: jangan sentuh
   .text-xs pada <button>/<a> — itu menimpa .text-white/.text-green-700
   milik Tailwind dan membuat teks tombol jadi nyaris tak terlihat. */
.ptx .ptx-card label,
.ptx .ptx-card span.text-xs,
.ptx .ptx-card p.text-xs {
  color: var(--db-muted);
  font-size: 11.5px;
  font-weight: 650;
}
/* Tombol toolbar: tipografi saja, warna teks tetap milik utility masing-masing */
.ptx .ptx-card button.text-xs,
.ptx .ptx-card a.text-xs { font-size: 12px; font-weight: 700; }
.ptx .ptx-card input,
.ptx .ptx-card select {
  min-height: 36px;
  border: 1px solid var(--db-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--db-shadow);
  color: var(--db-ink);
  font-size: 12.5px;
  font-weight: 600;
}
.ptx .ptx-card input::placeholder { color: var(--db-faint); font-weight: 500; }
.ptx .ptx-card input:focus,
.ptx .ptx-card select:focus {
  border-color: var(--db-primary);
  box-shadow: 0 0 0 3px rgba(7, 142, 232, .12);
  outline: none;
}
/* Input/select di dalam sel tabel: lebar penuh + padding, bukan nempel tepi */
.ptx .ptx-card table input[type="text"],
.ptx .ptx-card table input[type="date"],
.ptx .ptx-card table input[type="number"],
.ptx .ptx-card table select,
.ptx .ptx-card table textarea {
  width: 100%;
  min-width: 140px;
  padding: 0 12px;
  box-sizing: border-box;
}
.ptx .ptx-card table textarea { padding: 8px 12px; min-height: 64px; }

/* ---------- TABEL ---------- */
.ptx .ptx-card table { border-collapse: separate !important; border-spacing: 0; }
.ptx .ptx-card thead th {
  padding: 12px 8px !important;
  border-bottom: 1px solid var(--db-line) !important;
  background: transparent;
  color: var(--db-muted) !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ptx .ptx-card tbody td {
  padding: 11px 8px !important;
  border-bottom: 1px solid var(--db-line-2) !important;
  color: var(--db-body);
  font-size: 12.5px;
  vertical-align: middle;
}
.ptx .ptx-card tbody tr { background: transparent !important; transition: background .15s ease; }
.ptx .ptx-card tbody tr:hover { background: var(--db-pill) !important; }
.ptx .ptx-card tbody tr:hover td { color: var(--db-ink); }
/* Cegah striping DataTables menimpa gaya di atas */
.ptx .ptx-card tbody tr.odd,
.ptx .ptx-card tbody tr.even { background: transparent !important; }
.ptx .ptx-card tbody td,
.ptx .ptx-card tbody td:hover { background: transparent !important; }
.ptx .ptx-card tbody tr:hover td { background: transparent !important; }

/* Kolom identitas: foto + nama */
.ptx .ptx-card tbody td img,
.ptx .ptx-card tbody td .rounded-full img {
  border: 1px solid var(--db-line);
  box-shadow: none;
}
.ptx .ptx-card tbody td .font-semibold,
.ptx .ptx-card tbody td .font-medium { color: var(--db-ink); }

/* ---------- TAG STATUS ---------- */
.ptx .ptx-card tbody td span[class*="bg-"],
.ptx .ptx-card tbody td span[class*="text-"] {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ---------- TOMBOL AKSI ---------- */
.ptx .act-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 14px;
  font-family: var(--ap-font);
  transition: background .16s ease, transform .16s ease;
}
.ptx .act-btn.edit { background: var(--db-mint); color: var(--db-deep); }
.ptx .act-btn.edit:hover { background: #d8ecff; transform: translateY(-1px); }
.ptx .act-btn.del { background: #fdecec; color: #c0392f; }
.ptx .act-btn.del:hover { background: #fbdcdc; transform: translateY(-1px); }

/* ---------- PAGINASI & KOSONG ---------- */
.ptx .ptx-card .dataTables_info,
.ptx .ptx-card .dataTables_length,
.ptx .ptx-card .dataTables_filter { color: var(--db-muted); font-size: 12px; }
.ptx .ptx-card .dataTables_info { padding: 12px 4px 2px; }
.ptx .ptx-card .dataTables_paginate { padding: 0 0 4px; }
.ptx .ptx-card .dataTables_paginate .paginate_button {
  min-height: 32px;
  margin: 0 2px;
  padding: 6px 11px;
  border: 1px solid var(--db-line);
  border-radius: 9px;
  background: #fff;
  color: var(--db-body);
  font-size: 12px;
  font-weight: 650;
  transition: all .15s ease;
}
.ptx .ptx-card .dataTables_paginate .paginate_button:hover {
  border-color: var(--db-primary);
  color: var(--db-deep);
}
.ptx .ptx-card .dataTables_paginate .paginate_button.current {
  border-color: transparent;
  background: linear-gradient(135deg, var(--db-fill-1), var(--db-deep));
  color: #fff;
}
.ptx .ptx-card .dataTables_paginate .paginate_button.disabled { opacity: .45; }
.ptx .ptx-card .dataTables_empty { padding: 26px 0; color: var(--db-muted); font-size: 13px; }

/* ================================================================
   MODAL KONFIRMASI — diseragamkan dengan gaya dbx/ptx
   Berlaku untuk SweetAlert2 (swal2-*) dan modal konfirmasi
   Bootstrap yang memakai .modal-confirm.
   ================================================================ */

/* ---------- SweetAlert2: popup ---------- */
.swal2-popup {
  font-family: var(--ap-font, "Manrope", ui-sans-serif, system-ui, sans-serif);
  border-radius: 18px;
  border: 1px solid var(--db-line, rgba(0, 52, 125, .10));
  background: #fff;
  box-shadow: 0 24px 60px rgba(10, 35, 66, .18);
  color: var(--db-body, #50657e);
  padding: 0;
  width: 420px;
  max-width: calc(100vw - 32px);
}
.swal2-popup .swal2-html-container { margin: 0; padding: 22px 24px 4px; }
.swal2-popup .swal2-title {
  margin: 22px 24px 0;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.3;
  color: var(--db-ink, #0a2342);
}
.swal2-popup .swal2-title:not(:first-child) { margin-top: 18px; }
.swal2-popup .swal2-html {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--db-body, #50657e);
}
.swal2-popup .swal2-icon {
  margin: 22px auto 0;
  width: 52px;
  height: 52px;
  border-width: 3px;
}
.swal2-popup .swal2-icon .swal2-icon-content {
  font-size: 30px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.swal2-popup .swal2-icon.swal2-icon-question { border-color: var(--db-info, #138fe0); color: var(--db-info, #138fe0); }
.swal2-popup .swal2-icon.swal2-icon-warning { border-color: var(--db-warn, #d9930f); color: var(--db-warn, #d9930f); }
.swal2-popup .swal2-icon.swal2-icon-error { border-color: var(--db-bad, #dc5a5a); color: var(--db-bad, #dc5a5a); }
.swal2-popup .swal2-icon.swal2-icon-success { border-color: var(--db-ok, #0e9f6e); color: var(--db-ok, #0e9f6e); }
.swal2-popup .swal2-footer { margin: 0; padding: 0; }
.swal2-popup .swal2-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 22px;
  color: var(--db-faint, #96a6b5);
  transition: background .15s ease, color .15s ease;
}
.swal2-popup .swal2-close:hover { background: var(--db-pill, #f6faff); color: var(--db-ink, #0a2342); }
.swal2-popup .swal2-validation-message {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--db-bad, #dc5a5a);
}

/* ---------- SweetAlert2: tombol ---------- */
.swal2-popup .swal2-actions {
  margin: 20px 24px 24px;
  gap: 8px;
  justify-content: flex-end;
}
.swal2-popup .swal2-styled {
  margin: 0;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  box-shadow: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.swal2-popup .swal2-styled:focus { box-shadow: 0 0 0 3px rgba(7, 142, 232, .16); outline: none; }
.swal2-popup .swal2-styled:not([disabled]):active { transform: translateY(1px); }

/* tombol batal: netral, gaya tombol outline ptx */
.swal2-popup .swal2-cancel {
  background: #fff;
  border: 1px solid var(--db-line, rgba(0, 52, 125, .10));
  color: var(--db-body, #50657e);
}
.swal2-popup .swal2-cancel:hover { background: var(--db-pill, #f6faff); color: var(--db-ink, #0a2342); }

/* tombol aksi: warna berasal dari KELAS PERAN yang dipasang swal-theme.init.js,
   bukan dari .swal2-confirm, supaya customClass bawaan halaman
   (mis. swal2-confirm-orange) tidak ikut tertimpa. */
.swal2-popup .dbx-btn-primary { background: var(--db-primary, #078ee8); color: #fff; }
.swal2-popup .dbx-btn-primary:hover { background: var(--db-deep, #005aae); }
.swal2-popup .dbx-btn-danger { background: var(--db-bad, #dc5a5a); color: #fff; }
.swal2-popup .dbx-btn-danger:hover { background: #c94848; }
.swal2-popup .dbx-btn-ok { background: var(--db-ok, #0e9f6e); color: #fff; }
.swal2-popup .dbx-btn-ok:hover { background: #0b875c; }
.swal2-popup .swal2-loader { border-color: var(--db-line, rgba(0, 52, 125, .10)); border-top-color: var(--db-primary, #078ee8); }
.swal2-container { font-family: var(--ap-font, "Manrope", ui-sans-serif, system-ui, sans-serif); }
.swal2-container .swal2-backdrop { background: rgba(10, 35, 66, .38); backdrop-filter: blur(2px); }

/* ---------- Modal konfirmasi Bootstrap ---------- */
.modal-confirm .modal-content {
  border: 1px solid var(--db-line, rgba(0, 52, 125, .10));
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(10, 35, 66, .18);
  overflow: hidden;
}
.modal-confirm .modal-header {
  border-bottom: 1px solid var(--db-line-2, rgba(0, 52, 125, .07));
  padding: 18px 22px;
}
.modal-confirm .modal-title {
  font-family: var(--ap-font, "Manrope", sans-serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--db-ink, #0a2342);
}
.modal-confirm .modal-body {
  font-family: var(--ap-font, "Manrope", sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--db-body, #50657e);
  padding: 20px 22px;
}
.modal-confirm .modal-footer {
  border-top: 1px solid var(--db-line-2, rgba(0, 52, 125, .07));
  padding: 14px 22px;
  gap: 8px;
}
.modal-confirm .modal-footer .btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  font-family: var(--ap-font, "Manrope", sans-serif);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: none;
}
/* tombol batal: putih + garis, sama seperti .swal2-cancel */
.modal-confirm .modal-footer .btn-secondary,
.modal-confirm .modal-footer .btn-light {
  background: #fff;
  border: 1px solid var(--db-line, rgba(0, 52, 125, .10));
  color: var(--db-body, #50657e);
}
.modal-confirm .modal-footer .btn-secondary:hover,
.modal-confirm .modal-footer .btn-light:hover { background: var(--db-pill, #f6faff); color: var(--db-ink, #0a2342); }
/* tombol aksi: primary; btn-success lama dipetakan ke primary */
.modal-confirm .modal-footer .btn-primary,
.modal-confirm .modal-footer .btn-success {
  background: var(--db-primary, #078ee8);
  border-color: transparent;
  color: #fff;
}
.modal-confirm .modal-footer .btn-primary:hover,
.modal-confirm .modal-footer .btn-success:hover { background: var(--db-deep, #005aae); }
.modal-confirm .modal-footer .btn-danger {
  background: var(--db-bad, #dc5a5a);
  border-color: transparent;
  color: #fff;
}
.modal-confirm .modal-footer .btn-danger:hover { background: #c94848; }
.modal-confirm .modal-backdrop { background: rgba(10, 35, 66, .38); }

/* Toastr: override ditangani inline di app/Views/layout/default.php (style#toastr-override) */
