/*
 * Tema warna & layout RuangTIK - diselaraskan dengan palet hijau SI-ABDI
 * (resolusiyoga/siabdi, public/assets/css/theme-green.css).
 * primary #386C0B, hover/aktif #293F14, success #38A700, aksen #31D843
 *
 * SI-ABDI memetakan warna "dingin" bawaan template (primary/info/biru) ke satu
 * keluarga hijau yang sama (lihat komentar di theme-green.css baris 6), jadi di
 * sini "info" Bootstrap juga disamakan dengan "primary", bukan dibiarkan biru.
 *
 * Ini menimpa CSS custom property Bootstrap sendiri (bukan cuma override
 * class per-class) supaya SEMUA komponen yang memakainya otomatis ikut hijau,
 * termasuk yang tidak kita override manual: accordion active state, alert-info,
 * focus ring, table-primary/info, text-bg-*, dll. Detail teknis: variabel dasar
 * (--bs-primary, --bs-*-rgb) sudah dipakai beberapa komponen secara dinamis
 * (mis. --bs-focus-ring-color), tapi varian "subtle/text-emphasis" Bootstrap
 * di-hardcode saat kompilasi Sass, jadi tetap harus ditimpa eksplisit di sini.
 */

:root {
  --brand-primary: #386C0B;
  --brand-primary-dark: #293F14;
  --brand-success: #38A700;
  --brand-accent: #31D843;
  --sidebar-width: 260px;

  /* primary */
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 56, 108, 11;
  --bs-primary-text-emphasis: var(--brand-primary-dark);
  --bs-primary-bg-subtle: #d7e2ce;
  --bs-primary-border-subtle: #afc49d;

  /* info disamakan dengan primary, mengikuti pola SI-ABDI */
  --bs-info: var(--brand-primary);
  --bs-info-rgb: 56, 108, 11;
  --bs-info-text-emphasis: var(--brand-primary-dark);
  --bs-info-bg-subtle: #d7e2ce;
  --bs-info-border-subtle: #afc49d;

  /* link */
  --bs-link-color: var(--brand-primary);
  --bs-link-color-rgb: 56, 108, 11;
  --bs-link-hover-color: var(--brand-primary-dark);
  --bs-link-hover-color-rgb: 41, 63, 20;
}

body {
  background-color: #f4f6f4;
}

/* Tiap varian tombol Bootstrap (.btn-primary, .btn-outline-primary, dst) men-set
   SEMUA warnanya sendiri (--bs-btn-bg, --bs-btn-hover-bg, dst) sebagai hex statis
   saat kompilasi Sass - tidak diturunkan dari --bs-primary di :root sama sekali.
   Jadi warna tombol harus ditimpa di sini, per varian, lewat custom property yang
   sama persis dengan yang dipakai Bootstrap (bukan lewat background-color biasa,
   supaya state disabled/focus-shadow ikut konsisten juga). */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-focus-shadow-rgb: 56, 108, 11;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-primary-dark);
  --bs-btn-hover-border-color: var(--brand-primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
  --bs-btn-disabled-bg: var(--brand-primary);
  --bs-btn-disabled-border-color: var(--brand-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-focus-shadow-rgb: 56, 108, 11;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-primary);
  --bs-btn-active-border-color: var(--brand-primary);
  --bs-btn-disabled-color: var(--brand-primary);
  --bs-btn-disabled-border-color: var(--brand-primary);
}

.btn-outline-info {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-focus-shadow-rgb: 56, 108, 11;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
  --bs-btn-disabled-color: var(--brand-primary);
  --bs-btn-disabled-border-color: var(--brand-primary);
}

.badge.bg-success {
  background-color: var(--brand-success) !important;
}

/* --bs-dropdown-link-active-bg juga hex statis - dropdown menu akun (Ganti
   Kata Sandi/Keluar) sempat kelihatan biru sekilas saat item ditekan. */
.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--brand-primary);
}

/* --bs-progress-bar-bg juga hex statis (#0d6efd bawaan), bukan turunan dari
   --bs-primary di :root - pola yang sama seperti tombol & accordion di atas. */
.progress {
  --bs-progress-bar-bg: var(--brand-primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 0.2rem rgba(56, 108, 11, 0.25);
}

.form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* Accordion: ikon panah saat aktif & focus ring di-hardcode warna biru oleh
   Bootstrap (bukan CSS var), jadi ditimpa langsung - SVG sama persis dengan
   bawaan Bootstrap, hanya warna stroke diganti ke hijau tua brand. */
.accordion-button:not(.collapsed) {
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23293F14' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(56, 108, 11, 0.25);
}

.card-header-brand {
  background: var(--brand-primary-dark);
  color: #fff;
  border-radius: 0.5rem 0.5rem 0 0;
}

/* Halaman login - meniru gaya SI-ABDI: latar hijau muda solid, lencana logo
   bulat, header kartu hijau tua, input dengan ikon menyatu. */
.login-page {
  background-color: #e3edd8;
  min-height: 100vh;
}

.login-logo-badge {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(41, 63, 20, 0.25);
}

.login-logo-badge .material-icons {
  font-size: 44px;
}

.login-brand-name {
  color: var(--brand-primary-dark);
  font-weight: 700;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 20px;
  pointer-events: none;
}

.input-icon-wrapper .form-control {
  padding-left: 2.5rem;
}

.input-icon-wrapper .btn-toggle-password {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

/* Sidebar */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--brand-primary-dark);
  overflow-y: auto;
  z-index: 1030;
  transition: transform 0.2s ease;
}

.app-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app-sidebar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 4px 0 0 0 var(--brand-accent);
  color: #fff;
}

.app-sidebar .material-icons {
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Grup "Data Master" collapsible di sidebar guru */
.sidebar-caret {
  font-size: 18px !important;
  transition: transform 0.2s ease;
}

.app-sidebar .nav-link[aria-expanded="true"] .sidebar-caret {
  transform: rotate(180deg);
}

.sidebar-submenu {
  background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-submenu .nav-link {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

.app-sidebar .sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

/* Konten utama */
.app-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
}

.sidebar-toggle {
  display: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.show {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
  }
}

/* Daftar Siswa di layar mengajar - badge "Telat X mnt - Penalti" bisa lebih
   panjang dari kolom sempit; badge Bootstrap default white-space:nowrap akan
   mendorong lebar container melebihi batas kalau tidak diizinkan wrap. */
.badge-telat {
  white-space: normal;
  text-align: left;
}

/* ===== Komponen halaman bersama (hero, kartu tabel, DataTables) ===== */
.page-hero { background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); color: #fff; border-radius: 1rem; padding: 1rem 1.4rem; margin-bottom: 1rem; }
.page-hero h1, .page-hero h2, .page-hero h3, .page-hero h4, .page-hero h5 { color: #fff; margin: 0; font-weight: 700; }
.page-hero .btn-primary, .page-hero .btn-success { --bs-btn-bg: #fff; --bs-btn-color: var(--brand-primary-dark); --bs-btn-border-color: #fff; --bs-btn-hover-bg: #eaf3e0; --bs-btn-hover-color: var(--brand-primary-dark); --bs-btn-hover-border-color: #eaf3e0; font-weight: 600; }
.table-card { background: #fff; border-radius: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: .75rem 1rem 1rem; margin-bottom: 1.25rem; overflow-x: auto; }
.table-card .table { --bs-table-bg: transparent; margin-bottom: 0; }
.table-card .table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; border-bottom-width: 2px; white-space: nowrap; }
.table-card .table tbody tr:hover { background: var(--bs-primary-bg-subtle); }
.dt-container .dt-search input { padding: .3rem .9rem; min-width: 220px; }
.dt-container .dt-paging .page-link { border-radius: .5rem; margin: 0 2px; }
.dt-container .dt-paging .active > .page-link { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.dt-container .dt-search input { border-radius: 999px; }

/* ===== Tipografi: Inter, ukuran ringkas & bobot ringan agar terkesan simple dan elegan ===== */
:root {
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-font-size: 0.9rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.55;
  --bs-body-color: #2b3038;
}
body { font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; letter-spacing: -0.006em; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
h1, .h1 { font-size: 1.6rem; }
h2, .h2 { font-size: 1.4rem; }
h3, .h3 { font-size: 1.25rem; }
h4, .h4 { font-size: 1.1rem; }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: 0.9rem; }
.fs-4 { font-size: 1.15rem !important; }
.fw-bold { font-weight: 600 !important; }
.small, small { font-size: 0.8rem; }
.btn { font-weight: 500; font-size: 0.85rem; letter-spacing: 0; }
.btn-sm { font-size: 0.78rem; }
.btn-lg { font-size: 0.95rem; }
.form-control, .form-select { font-size: 0.875rem; }
.form-control-lg, .form-select-lg { font-size: 0.95rem; }
.form-label { font-weight: 500; font-size: 0.82rem; color: #4a5260; }
.badge { font-weight: 500; letter-spacing: 0; }
.modal-title { font-weight: 600; }
.page-hero h1, .page-hero h2, .page-hero h3, .page-hero h4, .page-hero h5 { font-weight: 600; font-size: 1.25rem; }
.page-hero .btn { font-weight: 500; }
.table-card .table { font-size: 0.85rem; }
.table-card .table thead th { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; }
.abs-stat .n { font-weight: 600; }
.abs-radio label { font-weight: 500; }
.nav-link { font-weight: 500; }

/* Tab tingkat kelas - indikator gradasi yang bergeser mengikuti tab aktif */
.tab-tingkat { position: relative; gap: .2rem; background: #fff; border-radius: 999px; padding: .3rem; display: inline-flex; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tab-tingkat .tab-indicator { position: absolute; top: .3rem; bottom: .3rem; left: 0; width: 0; border-radius: 999px; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 3px 8px rgba(41,63,20,.3); transition: transform .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1); pointer-events: none; }
.tab-tingkat .nav-link { position: relative; z-index: 1; border-radius: 999px; color: #5b6472; padding: .4rem 1rem; font-size: .85rem; background: transparent; transition: color .25s; }
.tab-tingkat .nav-link:hover { color: var(--brand-primary); }
.tab-tingkat .nav-link:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; box-shadow: none; }
.tab-tingkat .nav-link.active, .tab-tingkat .nav-pills .show > .nav-link { background: transparent; color: #fff; }
.tab-tingkat .badge { background: #e9ecef; color: #495057; font-weight: 600; margin-left: .25rem; transition: background .25s, color .25s; }
.tab-tingkat .nav-link.active .badge { background: rgba(255,255,255,.25); color: #fff; }
.tab-content > .tab-pane.active.show { animation: tabMasuk .35s ease both; }
@keyframes tabMasuk { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tab-tingkat .tab-indicator, .tab-content > .tab-pane.active.show { transition: none; animation: none; } }

/* Warna indikator per tab (data-tab-warna): hijau = palet utama, merah = punishment/peringatan.
   Gradasi tidak bisa di-transisikan, jadi dua lapis di-crossfade lewat opacity. */
.tab-tingkat .tab-indicator { background: none; box-shadow: none; overflow: visible; }
.tab-tingkat .tab-indicator::before, .tab-tingkat .tab-indicator::after { content: ''; position: absolute; inset: 0; border-radius: inherit; transition: opacity .35s ease; }
.tab-tingkat .tab-indicator::before { background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 3px 8px rgba(41,63,20,.3); opacity: 1; }
.tab-tingkat .tab-indicator::after { background: linear-gradient(135deg, #dc3545, #8f1d2c); box-shadow: 0 3px 8px rgba(143,29,44,.3); opacity: 0; }
.tab-tingkat[data-warna="merah"] .tab-indicator::before { opacity: 0; }
.tab-tingkat[data-warna="merah"] .tab-indicator::after { opacity: 1; }

/* Tombol aksi baris tabel: hanya ikon, teks jadi tooltip */
.btn-ikon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: .55rem; vertical-align: middle; }
.btn-ikon .material-icons { font-size: 18px; line-height: 1; }
.btn-ikon-jumlah { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #dc3545; color: #fff; font-size: .65rem; font-weight: 600; line-height: 16px; text-align: center; }
td.text-end .btn-ikon + .btn-ikon, td.text-end form.d-inline { margin-left: .15rem; }

.app-sidebar .sidebar-svg { flex: none; width: 20px; height: 20px; }

/* Cetak / simpan PDF: sembunyikan navigasi & kontrol, pakai lebar penuh */
@media print {
  .app-sidebar, .app-topbar, .sidebar-toggle, .no-print, .dt-search, .dt-length, .dt-paging, .tab-tingkat { display: none !important; }
  .app-main, .app-content, main { margin-left: 0 !important; padding: 0 !important; }
  body { background: #fff !important; }
  .page-hero { background: none !important; color: #000 !important; padding: 0 0 .5rem !important; border-bottom: 2px solid #000; border-radius: 0; }
  .page-hero h3 { color: #000 !important; }
  .table-card, .dash-card { box-shadow: none !important; padding: 0 !important; }
  .tab-content > .tab-pane { display: block !important; opacity: 1 !important; page-break-inside: avoid; margin-bottom: 1.5rem; }
  .table { font-size: 11px; }
  a { text-decoration: none !important; color: inherit !important; }
}

/* ===== Komponen dashboard (dipakai dashboard guru & beranda siswa) ===== */
    .dash-hero { position: relative; overflow: hidden; border-radius: 1.25rem; padding: 1.6rem 1.8rem; color: #fff; background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%); }
    .dash-hero::before, .dash-hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
    .dash-hero::before { width: 260px; height: 260px; right: -60px; top: -110px; }
    .dash-hero::after { width: 160px; height: 160px; right: 140px; bottom: -90px; }
    .dash-hero > * { position: relative; z-index: 1; }
    .dash-hero .tgl { opacity: .8; font-size: .85rem; }
    .dash-hero h2 { font-size: 1.5rem; font-weight: 600; margin: .2rem 0 .3rem; color: #fff; }
    .dash-sesi { background: rgba(255,255,255,.14); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); border-radius: 1rem; padding: .9rem 1.1rem; }
    .dash-sesi .dot { width: 9px; height: 9px; border-radius: 50%; background: #31D843; box-shadow: 0 0 0 0 rgba(49,216,67,.7); animation: dash-pulse 1.8s infinite; display: inline-block; }
    @keyframes dash-pulse { 70% { box-shadow: 0 0 0 9px rgba(49,216,67,0); } 100% { box-shadow: 0 0 0 0 rgba(49,216,67,0); } }
    .dash-aksi { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
    .dash-aksi .btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .4rem 1rem; font-size: .82rem; display: inline-flex; align-items: center; gap: .35rem; }
    .dash-aksi .btn:hover { background: #fff; color: var(--brand-primary-dark); }
    .dash-aksi .btn .material-icons { font-size: 18px; }
    .dash-stat { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: 1rem; padding: 1rem 1.1rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); text-decoration: none; color: inherit; height: 100%; transition: transform .18s, box-shadow .18s; border-bottom: 3px solid var(--c); }
    .dash-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); color: inherit; }
    .dash-stat .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, #000)); box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 35%, transparent); }
    .dash-stat .n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
    .dash-stat .l { font-size: .78rem; color: #6c757d; }
    .dash-card { background: #fff; border-radius: 1.1rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 1.1rem 1.25rem; height: 100%; }
    .dash-card .jd { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
    .dash-card .jd h6 { margin: 0; font-weight: 600; display: flex; align-items: center; gap: .45rem; }
    .dash-card .jd h6 .material-icons { font-size: 20px; color: var(--brand-primary); }
    .dash-card .jd a { font-size: .78rem; text-decoration: none; }
    .dash-kosong { color: #8a929c; font-size: .85rem; text-align: center; padding: 1.5rem .5rem; }
    .dash-kosong .material-icons { display: block; font-size: 32px; opacity: .4; margin: 0 auto .25rem; }
    .chart { display: flex; align-items: flex-end; gap: .7rem; height: 190px; padding-top: .5rem; }
    .chart .kol { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
    .chart .bar { flex: 1; width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: .5rem; overflow: hidden; background: #eef0f2; }
    .chart .bar span { display: block; width: 100%; transition: filter .15s; }
    .chart .bar span:hover { filter: brightness(1.15); }
    .chart .pct { font-size: .72rem; font-weight: 600; margin-bottom: .25rem; color: #495057; }
    .chart .lbl { font-size: .68rem; color: #6c757d; margin-top: .35rem; text-align: center; line-height: 1.2; }
    .legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .75rem; color: #6c757d; margin-top: .8rem; }
    .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .3rem; }
    .dash-item { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid #f1f3f5; }
    .dash-item:last-child { border-bottom: 0; }
    .dash-av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--brand-primary-dark); display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; overflow: hidden; }
    .dash-av img { width: 100%; height: 100%; object-fit: cover; }
    .dash-item .nm { font-size: .86rem; font-weight: 500; line-height: 1.2; }
    .dash-item .sb { font-size: .74rem; color: #8a929c; }
    .dash-pill { margin-left: auto; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
    .dash-pill.hijau { background: #e3f3e8; color: #146c43; }
    .dash-pill.merah { background: #fdecee; color: #b02a37; }
    .dash-pill.oranye { background: #fff1e2; color: #b45309; }
    .medal { flex: none; width: 24px; text-align: center; font-size: 1.05rem; }
    .hbar { height: 8px; border-radius: 999px; background: #eef0f2; overflow: hidden; margin-top: .3rem; }
    .hbar > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-primary), var(--brand-success)); }
    .dash-fade { animation: dash-in .5s ease both; }
    @keyframes dash-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
    @media (prefers-reduced-motion: reduce) { .dash-fade, .dash-sesi .dot { animation: none; } }

/* Lencana */
.lencana-mini { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: #eef0f2; color: #adb5bd; filter: grayscale(1); opacity: .7; }
.lencana-mini.aktif { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, #000)); color: #fff; filter: none; opacity: 1; box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 35%, transparent); }

/* Lonceng notifikasi siswa */
.notif-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc3545; color: #fff; font-size: .68rem; font-weight: 600; line-height: 18px; text-align: center; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; border-radius: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.notif-item { display: flex; gap: .7rem; padding: .65rem .9rem; text-decoration: none; color: inherit; font-size: .82rem; border-bottom: 1px solid #f1f3f5; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #f8f9fa; color: inherit; }
.notif-item.baru { background: #f4f8f0; }
.notif-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--c); }
.notif-ic .material-icons { font-size: 18px; }

/* ===== Layar mengajar (sesi_ajar) ===== */
.sesi-body { background: #eaeee6; }
.sesi-topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1rem; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 2px 8px rgba(0,0,0,.15); position: relative; z-index: 10; }
.sesi-topbar .material-icons { font-size: 22px; }
.min-w-0 { min-width: 0; }
.flex-none { flex: none; }
.d-contents { display: contents; }
.sesi-stage { display: flex; gap: .75rem; padding: .75rem; height: calc(100vh - 56px); }
.sesi-pdf { position: relative; flex: 1; min-width: 0; border-radius: 1rem; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.sesi-panel { width: 380px; flex: none; overflow: hidden; display: flex; flex-direction: column; gap: .75rem; transition: width .25s ease, opacity .2s ease, margin .25s ease; }
.sesi-panel > * { flex: none; }
.sesi-panel > .sesi-siswa { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.sesi-rows { flex: 1 1 0; min-height: 0; overflow-y: auto; margin: 0 -.4rem; padding: 0 .4rem; }
.sesi-kontrol { border-radius: 1rem; padding: 1rem 1.1rem; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 4px 14px rgba(41,63,20,.3); position: relative; overflow: hidden; }
.sesi-kontrol::after { content: ''; position: absolute; width: 160px; height: 160px; right: -50px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.07); }
.sesi-kontrol > * { position: relative; z-index: 1; }
.sesi-timer { font-size: 2.6rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sesi-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: rgba(255,255,255,.16); }
.sesi-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #ffc107; }
.sesi-status.jalan .dot { background: #31D843; animation: dash-pulse 1.8s infinite; }
.sesi-aksi { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: .4rem; }
.sesi-aksi-btn { border: 0; background: #fff; border-radius: .9rem; padding: .65rem .4rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 500; color: #343a40; line-height: 1.2; text-align: center; transition: transform .15s, box-shadow .15s; width: 100%; }
.sesi-aksi-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.sesi-aksi-btn .material-icons { font-size: 24px; }
.sesi-siswa { background: #fff; border-radius: 1rem; padding: .9rem 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.sesi-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.sesi-chip { font-size: .7rem; padding: .12rem .55rem; border-radius: 999px; background: #eef0f2; color: #495057; }
.sesi-chip.st-hadir { background: #e3f3e8; color: #146c43; }
.sesi-chip.st-telat { background: #fff1e2; color: #b45309; }
.sesi-chip.st-izin, .sesi-chip.st-sakit { background: #e0f2fe; color: #0369a1; }
.sesi-chip.st-cabut, .sesi-chip.st-alpa { background: #fdecee; color: #b02a37; }
.sesi-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .2rem; border-bottom: 1px solid #f1f3f5; }
.sesi-row:last-of-type { border-bottom: 0; }
.sesi-row .nm { font-size: .85rem; font-weight: 500; line-height: 1.2; }
.sesi-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--brand-primary-dark); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; overflow: hidden; }
.sesi-av img { width: 100%; height: 100%; object-fit: cover; }
.sesi-mini { display: flex; gap: .6rem; font-size: .72rem; color: #6c757d; margin-top: .1rem; }
.sesi-mini .material-icons { font-size: 13px; vertical-align: -2px; margin-right: 1px; }
.sesi-status-select { appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; font-size: .75rem; font-weight: 600; padding: .28rem 1.3rem .28rem .7rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .5rem center; }
.sesi-status-select.st-hadir { background-color: #e3f3e8; color: #146c43; }
.sesi-status-select.st-telat { background-color: #fff1e2; color: #b45309; }
.sesi-status-select.st-izin, .sesi-status-select.st-sakit { background-color: #e0f2fe; color: #0369a1; }
.sesi-status-select.st-cabut, .sesi-status-select.st-alpa { background-color: #fdecee; color: #b02a37; }
.sesi-btn-nilai { flex: none; width: 32px; height: 32px; padding: 0; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; }
.sesi-btn-nilai .material-icons { font-size: 20px; }
@media (max-width: 991px) {
  .sesi-stage { flex-direction: column; height: auto; }
  .sesi-pdf { height: 72vh; min-height: 340px; flex: none; }
  .sesi-panel, .sesi-panel[style] { width: 100% !important; overflow: visible; }
  .sesi-panel-scroll { overflow: visible; }
  .sesi-panel > .sesi-siswa { flex: none; display: block; }
  .sesi-rows { max-height: 60vh; }
}

.sesi-live { flex: none; display: inline-flex; align-items: center; cursor: help; }
.sesi-live .material-icons { font-size: 16px; }
.sesi-live[data-status="aktif"] .material-icons { animation: sesi-live-denyut 2.2s ease-in-out infinite; }
@keyframes sesi-live-denyut { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.sesi-legenda { display: flex; flex-wrap: wrap; gap: .1rem .7rem; font-size: .66rem; color: #6c757d; margin-bottom: .5rem; }
.sesi-legenda .material-icons { font-size: 13px; vertical-align: -3px; margin-right: 2px; }

/* Panel samping disembunyikan: materi/slide memakai lebar penuh */
.sesi-stage.panel-tutup .sesi-panel { width: 0 !important; opacity: 0; margin-left: -.75rem; pointer-events: none; }
@media (max-width: 991px) { .sesi-stage.panel-tutup .sesi-panel { display: none; } }

/* Siaran suara guru */
.sesi-siaran { margin-top: .75rem; padding: .5rem .7rem; border-radius: .8rem; background: rgba(0,0,0,.22); }
.sesi-onair { font-size: .75rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.sesi-onair .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4d4f; display: inline-block; animation: dash-pulse 1.4s infinite; box-shadow: 0 0 0 0 rgba(255,77,79,.7); }
.sesi-level { height: 5px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.sesi-level > div { height: 100%; width: 0; background: linear-gradient(90deg, #31D843, #ffc107); transition: width .12s linear; }
.sesi-aksi-btn.sesi-aksi-aktif { background: #fdecee; box-shadow: 0 0 0 2px #dc3545 inset; color: #b02a37; }

/* Toolbar aksi sesi mengajar: satu baris ringkas (pil siaran + tombol ikon + menu lainnya) */
.sesi-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: #fff; border-radius: 1rem; padding: .4rem .5rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.sesi-toolbar-sisa { display: inline-flex; align-items: center; gap: .3rem; }
.sesi-pill { border: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem .4rem .7rem; border-radius: 999px; background: #fdecee; color: #b02a37; font-size: .82rem; font-weight: 600; transition: background .15s, transform .15s; }
.sesi-pill:hover { background: #fbdadf; transform: translateY(-1px); }
.sesi-pill .material-icons { font-size: 20px; }
.sesi-pill.sesi-aksi-aktif { background: #dc3545; color: #fff; box-shadow: 0 0 0 3px rgba(220,53,69,.25); }
.sesi-pill.sesi-aksi-aktif .material-icons { animation: sesi-live-denyut 1.4s ease-in-out infinite; }
.sesi-ikon { position: relative; width: 38px; height: 38px; border: 0; border-radius: .8rem; background: #f4f6f8; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
.sesi-ikon:hover { background: #e9ecef; transform: translateY(-1px); }
.sesi-ikon .material-icons { font-size: 21px; }
.sesi-ikon.ada-titik::after { content: ''; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #16a34a; border: 2px solid #fff; }

/* ===== Modal input nilai siswa (sesi mengajar) ===== */
.nilai-modal .modal-content { border: 0; border-radius: 1.25rem; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.nilai-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); position: relative; overflow: hidden; }
.nilai-header::after { content: ''; position: absolute; width: 200px; height: 200px; right: 90px; top: -110px; border-radius: 50%; background: rgba(255,255,255,.07); }
.nilai-header > * { position: relative; z-index: 1; }
.nilai-av { flex: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.6); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.nilai-av img { width: 100%; height: 100%; object-fit: cover; }
.nilai-nama { font-size: 1.1rem; font-weight: 600; line-height: 1.2; margin-bottom: .2rem; }
.nilai-total { text-align: center; padding: .3rem .9rem; border-radius: 1rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); }
.nilai-total-angka { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.nilai-total-label { font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.nilai-body { background: #f7f9f5; padding: 1.2rem 1.3rem 1.4rem; }
.skor-kartu { --w: #8a929c; background: #fff; border-radius: 1rem; padding: .9rem 1rem 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); border-top: 4px solid var(--w); transition: border-color .25s; height: 100%; display: flex; flex-direction: column; }
.skor-label .material-icons { font-size: 22px; color: var(--w); transition: color .25s; }
.skor-bobot { font-size: .7rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: #eef0f2; color: #495057; }
.skor-judul { font-weight: 600; line-height: 1.2; }
.skor-kartu .skor-ket { flex: 1 0 auto; }
.skor-angka { width: 100%; border: 0; background: transparent; text-align: center; font-size: 2.6rem; font-weight: 700; line-height: 1.1; padding: 0; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.skor-angka::-webkit-outer-spin-button, .skor-angka::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.skor-angka::placeholder { color: #ced4da; }
.skor-slider { width: 100%; margin: .2rem 0 .5rem; accent-color: var(--w); }
.skor-cepat { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; }
.skor-cepat button { border: 1.5px solid #e2e6ea; background: #fff; border-radius: 999px; padding: .15rem .65rem; font-size: .78rem; font-weight: 600; color: #495057; transition: all .12s; }
.skor-cepat button:hover { border-color: var(--w); color: var(--w); background: #fafbfa; transform: translateY(-1px); }
.skor-cepat .skor-hapus { padding: .15rem .45rem; color: #adb5bd; }
.skor-cepat .skor-hapus .material-icons { font-size: 16px; vertical-align: -3px; }
.skor-pop .skor-angka { animation: skor-pop .35s cubic-bezier(.2,.9,.3,1.4); }
@keyframes skor-pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
.nilai-rumus { background: #fff; border-radius: .8rem; padding: .55rem .8rem; border: 1px dashed #d5dccf; }
.rp-total { font-size: .8rem; padding: .15rem .7rem; border-radius: 999px; background: #eef0f2; color: #495057; }
.rp-total.rp-pos { background: #e3f3e8; color: #146c43; } .rp-total.rp-neg { background: #fdecee; color: #b02a37; }
.rp-tab { display: inline-flex; background: #e9ecef; border-radius: 999px; padding: 3px; margin-bottom: .6rem; }
.rp-tab-btn { border: 0; background: transparent; padding: .3rem .95rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #6c757d; }
.rp-tab-btn span { font-size: .7rem; opacity: .75; margin-left: .2rem; }
.rp-tab-btn.aktif.reward { background: #198754; color: #fff; } .rp-tab-btn.aktif.punishment { background: #dc3545; color: #fff; }
.rp-chips { display: flex; flex-wrap: wrap; gap: .4rem; max-height: 170px; overflow-y: auto; padding: .15rem; }
.rp-chip { display: inline-flex; align-items: center; gap: .45rem; border: 1.5px solid; border-radius: .8rem; padding: .3rem .65rem; font-size: .8rem; background: #fff; text-align: left; transition: all .12s; }
.rp-chip.reward { border-color: #b7e0c7; color: #146c43; } .rp-chip.punishment { border-color: #f1b9be; color: #b02a37; }
.rp-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.1); }
.rp-chip-poin { font-weight: 700; padding: .05rem .4rem; border-radius: 999px; font-size: .74rem; }
.rp-chip.reward .rp-chip-poin { background: #e3f3e8; } .rp-chip.punishment .rp-chip-poin { background: #fdecee; }
.rp-chip.reward.dipilih { background: #198754; border-color: #198754; color: #fff; box-shadow: 0 4px 12px rgba(25,135,84,.4); }
.rp-chip.punishment.dipilih { background: #dc3545; border-color: #dc3545; color: #fff; box-shadow: 0 4px 12px rgba(220,53,69,.4); }
.rp-chip.dipilih .rp-chip-poin { background: rgba(255,255,255,.25); }
.rp-aksi { display: flex; gap: .5rem; margin-top: .7rem; }
.rp-riwayat { display: flex; flex-direction: column; gap: .3rem; }
.rp-item { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: .7rem; padding: .35rem .7rem; font-size: .82rem; border: 1px solid #eef0f2; }
.rp-item-poin { flex: none; min-width: 46px; text-align: center; font-weight: 700; border-radius: 999px; padding: .05rem .4rem; }
.rp-item-poin.rp-pos { background: #e3f3e8; color: #146c43; } .rp-item-poin.rp-neg { background: #fdecee; color: #b02a37; }

/* ===== SweetAlert2 bertema palet RuangTIK (toast, konfirmasi, info) ===== */
.swal2-container { font-family: 'Inter', system-ui, sans-serif; }
.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { background: rgba(24, 36, 16, .45); backdrop-filter: blur(3px); }
.swal-rt { border-radius: 1.25rem !important; padding: 1.7rem 1.5rem 1.4rem !important; box-shadow: 0 24px 60px rgba(0,0,0,.28) !important; }
.swal-rt-judul { font-size: 1.15rem !important; font-weight: 600 !important; color: #1f2937 !important; padding: .5rem .5rem 0 !important; line-height: 1.35 !important; letter-spacing: -.01em; }
.swal-rt-teks { font-size: .9rem !important; color: #5b6472 !important; margin: .6rem 1rem 0 !important; line-height: 1.5; }
.swal-rt-aksi { margin-top: 1.4rem !important; gap: .6rem; }
.swal-rt-ya, .swal-rt-batal { border: 0; border-radius: 999px; padding: .55rem 1.5rem; font-size: .875rem; font-weight: 600; transition: transform .12s, box-shadow .12s, filter .12s; }
.swal-rt-ya { color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 4px 12px rgba(41,63,20,.35); }
.swal-rt-ya-bahaya { background: linear-gradient(135deg, #dc3545, #a71d2a); box-shadow: 0 4px 12px rgba(167,29,42,.4); }
.swal-rt-batal { color: #495057; background: #eef0f2; }
.swal-rt-ya:hover, .swal-rt-batal:hover { transform: translateY(-1px); filter: brightness(1.06); }
.swal-rt-ya:focus-visible, .swal-rt-batal:focus-visible { outline: 3px solid rgba(56,108,11,.35); outline-offset: 2px; }

/* Ikon dengan warna palet */
.swal2-icon.swal2-success { border-color: #38A700 !important; color: #38A700 !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: #38A700 !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(56,167,0,.25) !important; }
.swal2-icon.swal2-error { border-color: #dc3545 !important; color: #dc3545 !important; }
.swal2-icon.swal2-error [class^=swal2-x-mark-line] { background-color: #dc3545 !important; }
.swal2-icon.swal2-warning { border-color: #f59f00 !important; color: #f59f00 !important; }
.swal2-icon.swal2-info { border-color: #0d8a72 !important; color: #0d8a72 !important; }
.swal2-icon.swal2-question { border-color: var(--brand-primary) !important; color: var(--brand-primary) !important; }
.swal2-icon { margin-top: .2rem !important; }

/* Toast */
.swal2-container.swal2-top-end { padding-top: 4.2rem; }
.swal-rt-toast { align-items: center !important; border-radius: 1rem !important; padding: .7rem 1rem .7rem .9rem !important; background: #fff !important; border-left: 5px solid #adb5bd; box-shadow: 0 10px 30px rgba(0,0,0,.18) !important; width: auto !important; max-width: min(440px, calc(100vw - 24px)) !important; }
.swal-rt-toast-success { border-left-color: #38A700; } .swal-rt-toast-error { border-left-color: #dc3545; }
.swal-rt-toast-warning { border-left-color: #f59f00; } .swal-rt-toast-info { border-left-color: #0d8a72; }
.swal-rt-toast .swal2-icon { width: 1.7em !important; height: 1.7em !important; min-width: 1.7em !important; margin: 0 .7rem 0 0 !important; border-width: .11em !important; }
.swal-rt-toast .swal2-icon .swal2-icon-content { font-size: 1.2em !important; }
.swal-rt-toast-judul { font-size: .87rem !important; font-weight: 500 !important; color: #2b3038 !important; margin: 0 !important; padding: 0 !important; line-height: 1.4; text-align: left; }
.swal-rt-toast .swal2-close { position: static; font-size: 1.4rem; color: #adb5bd; margin-left: .5rem; }
.swal-rt-toast .swal2-close:hover { color: #495057; background: transparent; }
.swal-rt-toast .swal2-timer-progress-bar-container { height: 3px; }
.swal-rt-progres-success { background: #38A700 !important; } .swal-rt-progres-error { background: #dc3545 !important; }
.swal-rt-progres-warning { background: #f59f00 !important; } .swal-rt-progres-info { background: #0d8a72 !important; }
@media print { .swal2-container { display: none !important; } }

/* Mobile: topbar ringkas, gutter tipis */
.sesi-topbar .text-truncate { min-width: 0; }
.sesi-topbar .btn, .sesi-topbar span.small { white-space: nowrap; }
@media (max-width: 575px) {
  .sesi-topbar { padding: 0 .6rem; gap: .5rem; }
  .sesi-topbar .sesi-lbl { display: none; }
  .sesi-topbar .btn { padding-left: .55rem !important; padding-right: .55rem !important; }
  .sesi-stage { padding: .5rem; gap: .5rem; }
  .sesi-pdf { border-radius: .75rem; height: 52vh; min-height: 300px; }
  .sesi-kontrol { padding: .8rem .9rem; }
}
@media (max-width: 767px) {
  .siswa-main.container-fluid, main .container-fluid.p-4 { padding: 1rem .75rem !important; }
}

.sesi-pill.sesi-pill-hijau { background: #e3f3e8; color: #146c43; }
.sesi-pill.sesi-pill-hijau:hover { background: #d3ecdb; }
.sesi-pill.sesi-pill-hijau:disabled { background: #eef0f2; color: #8a929c; transform: none; }
.sesi-pill.sesi-pill-hijau.sesi-aksi-aktif { background: #198754; color: #fff; box-shadow: 0 0 0 3px rgba(25,135,84,.25); }
.sesi-panel > .sesi-siswa.sesi-siswa-tetap { flex: none; display: block; }

/* ===== Materi siswa ===== */
.mt-hero { position: relative; overflow: hidden; border-radius: 1.25rem; padding: 1.3rem 1.4rem; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 6px 18px rgba(41,63,20,.28); }
.mt-hero::after { content: ''; position: absolute; width: 240px; height: 240px; right: -60px; top: -110px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.mt-hero > * { position: relative; z-index: 1; }
.mt-ring { --p: 0; flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ffd54f calc(var(--p) * 1%), rgba(255,255,255,.2) 0); position: relative; }
.mt-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--brand-primary-dark); }
.mt-ring span { position: relative; font-weight: 700; font-size: 1.05rem; }
.mt-live { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 1rem; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.mt-live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #31D843; box-shadow: 0 0 0 0 rgba(49,216,67,.7); animation: dash-pulse 1.8s infinite; }
.mt-modul { background: #fff; border-radius: 1.1rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: hidden; }
.mt-modul-head { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: .9rem; padding: .95rem 1.1rem; }
.mt-no { flex: none; width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 4px 10px rgba(41,63,20,.25); }
.mt-chevron { flex: none; color: #6c757d; transition: transform .25s; }
.mt-modul-head:not(.collapsed) .mt-chevron { transform: rotate(180deg); }
.mt-modul-body { padding: 0 1.1rem 1rem; }
.mt-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; margin-top: .5rem; border-radius: .9rem; border: 1px solid #edf0ea; background: #fafbf9; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mt-item:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.08); border-color: var(--brand-primary); color: inherit; }
.mt-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #eef0f2; color: #6c757d; }
.mt-ic.proses { background: #fff1e2; color: #b45309; }
.mt-ic.ok { background: #e3f3e8; color: #146c43; }
.mt-cta { flex: none; display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px; background: #eef0f2; color: #495057; white-space: nowrap; }
.mt-cta .material-icons { font-size: 16px; }
.mt-cta.primer { background: var(--brand-primary); color: #fff; }
@media (max-width: 575px) {
  .mt-hero { padding: 1rem; }
  .mt-item { flex-wrap: wrap; }
  .mt-cta { margin-left: 50px; }
}
.hbar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-primary), var(--brand-success)); }
.hbar { display: block; height: 8px; border-radius: 999px; background: #eef0f2; overflow: hidden; }
.mt-live .btn { white-space: nowrap; flex: none; }
@media (max-width: 575px) { .mt-item > .flex-grow-1 { flex: 1 1 calc(100% - 60px); } }

/* ===== Buka materi (mobile first) ===== */
.mv-back { display: inline-flex; align-items: center; gap: .25rem; font-size: .85rem; font-weight: 500; color: var(--brand-primary-dark); text-decoration: none; margin-bottom: .6rem; }
.mv-back .material-icons { font-size: 18px; }
.mv-head { background: #fff; border-radius: 1rem; padding: .85rem .9rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); margin-bottom: .75rem; }
.mv-ikon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 4px 10px rgba(41,63,20,.25); }
.mv-modul { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; }
.mv-judul { font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin: 0; }
.mv-btn { width: 38px; height: 38px; border: 0; border-radius: .8rem; background: #f4f6f8; color: #495057; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: background .15s; }
.mv-btn:hover { background: #e9ecef; color: #212529; }
.mv-pdf { border-radius: 1rem; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); height: calc(100dvh - 300px); min-height: 340px; }
.mv-pdf iframe { width: 100%; height: 100%; border: 0; display: block; }
.mv-pdf:fullscreen { border-radius: 0; height: 100%; }
.mv-ppt { text-align: center; background: #fff; border-radius: 1rem; padding: 2rem 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.mv-ppt > .material-icons { font-size: 48px; color: var(--brand-primary); }
.mv-quiz { display: flex; align-items: center; gap: .8rem; background: #fff; border-radius: 1rem; padding: .75rem .9rem; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
@media (min-width: 768px) {
  .mv-head { padding: 1.1rem 1.3rem; }
  .mv-judul { font-size: 1.3rem; }
  .mv-pdf { height: 80vh; }
}

/* Navbar siswa: tombol profil tidak meluap di layar sempit */
.app-topbar { gap: .5rem; }
.profil-btn { display: inline-flex; align-items: center; max-width: 44vw; }
.profil-nama { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 575px) { .profil-btn { max-width: 34vw; } .app-topbar .notif-menu { max-width: calc(100vw - 1.5rem); } }
.sesi-pdf:fullscreen { height: 100% !important; min-height: 0 !important; border-radius: 0; }

/* ===== Aksesibilitas ===== */
.skip-link { position: fixed; left: .75rem; top: -60px; z-index: 3000; background: var(--brand-primary); color: #fff; padding: .55rem 1rem; border-radius: .6rem; text-decoration: none; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: .75rem; color: #fff; outline: 3px solid #ffd54f; outline-offset: 2px; }
:where(a, button, input, select, textarea, summary, [role=button], [tabindex]):focus-visible { outline: 3px solid rgba(56,108,11,.55); outline-offset: 2px; }
.sesi-topbar :focus-visible, .mt-hero :focus-visible, .sesi-kontrol :focus-visible { outline-color: #ffd54f; }
#konten:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Judul kelompok di submenu Data Master */
.sidebar-submenu .sidebar-grup { list-style: none; padding: .55rem 1.25rem .15rem 2.5rem; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.sidebar-submenu .sidebar-grup:first-child { padding-top: .35rem; }
