/* ==========================================================================
   FONT ARAB RESMI STANDAR PW LP MA'ARIF NU JAWA TIMUR
   Mendukung: Omar Naskh, LPMQ Isep Misbah (Mushaf Cetak Kemenag RI), KFGQPC Uthman Taha
   ========================================================================== */
@font-face {
  font-family: 'Omar';
  src: url('/public/fonts/OMAR.ttf') format('truetype'),
       local('Omar Naskh Medium'), local('Omar Naskh'), local('Omar'), local('OMAR');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Omar Naskh';
  src: url('/public/fonts/OMAR.ttf') format('truetype'),
       local('Omar Naskh Medium'), local('Omar Naskh'), local('Omar'), local('OMAR');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LPMQ Isep Misbah';
  src: url('/public/fonts/LPMQ-IsepMisbah.ttf') format('truetype'),
       local('LPMQ Isep Misbah'), local('LPMQ IsepMisbah'), local('LPMQ-IsepMisbah');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KFGQPC Uthman Taha Naskh';
  src: url('/public/fonts/KFGQPC-UthmanTaha.ttf') format('truetype'),
       local('KFGQPC Uthman Taha Naskh');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* FONT AUTO-ARABIC OMAR: MENANGKAP SEMUA KARAKTER ARAB SECARA INLINE UNTUK OMAR */
@font-face {
  font-family: 'AutoArabicOmar';
  src: url('/public/fonts/OMAR.ttf') format('truetype'),
       local('Omar Naskh Medium'), local('Omar Naskh'), local('Omar');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFE;
  font-display: swap;
  size-adjust: 125%;
}

/* FONT AUTO-ARABIC ISEP MISBAH: MENANGKAP SEMUA KARAKTER ARAB SECARA INLINE UNTUK ISEP MISBAH */
@font-face {
  font-family: 'AutoArabicIsep';
  src: url('/public/fonts/LPMQ-IsepMisbah.ttf') format('truetype'),
       local('LPMQ Isep Misbah');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFE;
  font-display: swap;
  size-adjust: 110%;
}

/* ==========================================================================
   UKURAN FONT ARAB STANDAR PW LP MA'ARIF NU JAWA TIMUR
   - Tingkat Menengah & Atas (SMP/MTs, SMA/MA/SMK): Standar Cetak 15pt
   - Tingkat Dasar (SD/MI): Standar Cetak 18pt
   - Kompensasi Optik Font Omar:
     Font Omar berbobot visual ~15% lebih kecil daripada LPMQ Isep Misbah,
     sehingga diberi kompensasi ukuran (17.5pt pada Menengah/Atas, 21pt pada Dasar)
     agar harakat berdiri dan mad tegak terbaca jernih dan setara.
   ========================================================================== */
:root {
  --font-arab-utama: 'Omar', 'Omar Naskh', 'Traditional Arabic', serif;
  --font-sans: 'AutoArabicOmar', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-arab-standar: 15pt;
  --font-size-arab: 17.5pt;
  --line-height-arab: 2.35;
  --nu-green-dark: #064e3b;
  --nu-green: #047857;
  --nu-green-light: #d1fae5;
  --nu-gold: #d97706;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --success: #15803d;
  --success-bg: #f0fdf4;

  /* ==========================================================================
     DESIGN TOKENS RESMI SAAS REDESIGN (PW LP MA'ARIF NU JAWA TIMUR)
     ========================================================================== */
  --primary: #006B45;          /* Hijau Utama */
  --primary-light: #008A5B;    /* Hijau Muda Aksen & Hover */
  --primary-dark: #004D35;     /* Hijau Gelap Deep Forest */
  --gold: #D4A52C;             /* Emas Akademik */
  --gold-light: #F2D98A;       /* Emas Lembut */
  --background: #FFFDF3;       /* Warm Ivory */
  --background-soft: #E8F4E9;  /* Soft Mint */
  --text-primary: #263B32;     /* Teks Gelap Utama */
  --text-secondary: #64756B;   /* Teks Muted */
  --white: #FFFFFF;            /* Putih */
  --status-success: #10B981;
  --status-warning: #F59E0B;
  --status-danger: #EF4444;
  --status-neutral: #9CA3AF;
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 74px;
  --topbar-h: 62px;
}

/* TINGKAT MENENGAH & ATAS (SMP/MTs, SMA/MA/SMK) - STANDAR CETAK KERTAS 15pt */
body.tingkat-menengah-atas,
body:not(.tingkat-dasar) {
  --font-size-arab-standar: 15pt;
  --font-size-arab: 17.5pt;
  --line-height-arab: 2.35;
}

body.tingkat-menengah-atas.font-mode-isep,
body:not(.tingkat-dasar).font-mode-isep {
  --font-arab-utama: 'LPMQ Isep Misbah', 'Traditional Arabic', serif;
  --font-sans: 'AutoArabicIsep', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-arab-standar: 15pt;
  --font-size-arab: 15.5pt;
  --line-height-arab: 2.3;
}

body.tingkat-menengah-atas.font-mode-omar,
body:not(.tingkat-dasar).font-mode-omar {
  --font-arab-utama: 'Omar', 'Omar Naskh', 'Traditional Arabic', serif;
  --font-sans: 'AutoArabicOmar', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-arab-standar: 15pt;
  --font-size-arab: 17.5pt;
  --line-height-arab: 2.4;
}

/* TINGKAT DASAR (SD/MI) - STANDAR CETAK KERTAS 18pt */
body.tingkat-dasar {
  --font-size-arab-standar: 18pt;
  --font-size-arab: 21pt;
  --line-height-arab: 2.45;
}

body.tingkat-dasar.font-mode-isep {
  --font-arab-utama: 'LPMQ Isep Misbah', 'Traditional Arabic', serif;
  --font-sans: 'AutoArabicIsep', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-arab-standar: 18pt;
  --font-size-arab: 18.5pt;
  --line-height-arab: 2.4;
}

body.tingkat-dasar.font-mode-omar {
  --font-arab-utama: 'Omar', 'Omar Naskh', 'Traditional Arabic', serif;
  --font-sans: 'AutoArabicOmar', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-arab-standar: 18pt;
  --font-size-arab: 21pt;
  --line-height-arab: 2.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
}

input, select, textarea, button, [contenteditable], .wysiwyg-box, .opsi-wysiwyg-body {
  font-family: var(--font-sans);
}

.sim-bar {
  background: #1e293b;
  color: #f8fafc;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--nu-gold);
}

.sim-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sim-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sim-btn {
  background: #334155;
  color: #fff;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.sim-btn:hover {
  background: var(--nu-green);
  border-color: #10b981;
}

.app-header {
  background: linear-gradient(135deg, var(--nu-green-dark), var(--nu-green));
  color: #fff;
  padding: 1.1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

.container {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.25rem 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.form-group {
  margin-block-end: 0.95rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.field-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  min-height: 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background-color: #fff;
  color: var(--text-main);
  box-sizing: border-box;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid #059669;
  outline-offset: 2px;
}

input:user-invalid {
  border-color: var(--danger);
  background-color: var(--danger-bg);
}

input:user-valid {
  border-color: var(--success);
}

.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

input:user-invalid ~ .error-msg {
  display: block;
}

.password-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.password-wrapper input {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background-color: var(--nu-green);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--nu-green-dark);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #1e293b;
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.btn-sm {
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  font-size: 0.84rem;
}

.btn-xs {
  min-height: 26px;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  border-radius: 5px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-siap {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.badge-menunggu {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.badge-perlu {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.alert {
  padding: 0.85rem 1.05rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-warning {
  background-color: var(--warning-bg);
  color: var(--warning);
  border-color: #fcd34d;
}

.alert-success {
  background-color: var(--success-bg);
  color: var(--success);
  border-color: #86efac;
}

.alert-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border-color: #fca5a5;
}

/* Tabel Baris Simpel & Padat untuk Ratusan Siswa */
.table-wrapper {
  overflow-x: auto;
  max-inline-size: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: #f1f5f9;
}

th,
td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

/* Tabel Baris Kompak khusus Daftar Ratusan Siswa */
.table-compact th,
.table-compact td {
  padding: 0.42rem 0.65rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

tbody tr:nth-child(even) td {
  background-color: #fcfcfd;
}

tbody tr:hover td {
  background-color: #ecfdf5;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.6rem;
}

.tab-btn {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--nu-green);
  color: #fff;
}

/* Navigasi Halaman (Pagination) Tabel Siswa */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.page-btn {
  min-width: 34px;
  min-height: 32px;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.page-btn:hover:not(:disabled) {
  background: #ecfdf5;
  border-color: var(--nu-green);
  color: var(--nu-green-dark);
}

.page-btn.active {
  background: var(--nu-green);
  border-color: var(--nu-green-dark);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   TIPOGRAFI FORMULA MATEMATIKA (MATHML) & TEKS ARAB (RTL)
   ========================================================================== */
math {
  font-family: 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', 'KaTeX_Main', serif;
  font-size: 1.15em;
  direction: ltr;
  display: inline-math;
  vertical-align: middle;
}
math[display="block"] {
  display: block;
  margin: 0.6rem auto;
  text-align: center;
}

.teks-arab, [dir="rtl"], .font-arab {
  font-family: var(--font-arab-utama) !important;
  font-size: var(--font-size-arab) !important;
  line-height: var(--line-height-arab) !important;
  direction: rtl !important;
  text-align: right !important;
}

.teks-arab-inline {
  font-family: var(--font-arab-utama) !important;
  font-size: var(--font-size-arab) !important;
  direction: rtl !important;
  display: inline-block;
  line-height: var(--line-height-arab) !important;
}

.font-omar {
  font-family: 'Omar', 'Omar Naskh', 'Traditional Arabic', serif !important;
}

.font-isep, .font-isepmisbah {
  font-family: 'LPMQ Isep Misbah', 'Traditional Arabic', serif !important;
}

.opsi-arab {
  font-family: var(--font-arab-utama) !important;
  font-size: var(--font-size-arab) !important;
  line-height: var(--line-height-arab) !important;
  direction: rtl !important;
  text-align: right !important;
}

.wysiwyg-box[dir="rtl"], .opsi-wysiwyg-body[dir="rtl"], .wysiwyg-opsi[dir="rtl"] {
  font-family: var(--font-arab-utama) !important;
  font-size: var(--font-size-arab) !important;
  line-height: var(--line-height-arab) !important;
  direction: rtl !important;
  text-align: right !important;
}

/* ==========================================================================
   KOMPONEN EDITOR INPUT SOAL MANUAL (TOOLBAR, PALET MATH & ARAB, PREVIEW)
   ========================================================================== */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 0.45rem 0.6rem;
  align-items: center;
}

.tool-group {
  display: inline-flex;
  gap: 0.15rem;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.15rem 0.25rem;
}

.tool-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.12s;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-btn:hover {
  background: #e2e8f0;
  color: var(--nu-green-dark);
}

.tool-btn.active {
  background: var(--nu-green);
  color: #ffffff;
}

.sub-palette {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.sub-palette-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  margin-right: 0.35rem;
}

.pill-insert {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.76rem;
  cursor: pointer;
  color: #1e293b;
  transition: all 0.1s;
}

.pill-insert:hover {
  background: #ecfdf5;
  border-color: var(--nu-green);
  color: var(--nu-green-dark);
}

.pill-arab {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.1rem 0.45rem;
}

.live-preview-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.85rem;
  min-height: 90px;
  margin-top: 0.5rem;
  line-height: 1.6;
  font-size: 0.88rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.live-preview-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}

.live-preview-box th, .live-preview-box td {
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.5rem;
  font-size: 0.84rem;
}

.live-preview-box th {
  background: #f1f5f9;
}

.kunci-toggle-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.kunci-toggle-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.12s;
}

.kunci-toggle-btn.selected {
  background: var(--nu-green);
  border-color: var(--nu-green-dark);
  color: #ffffff;
}

.kunci-toggle-btn.selected-b {
  background: #166534;
  border-color: #14532d;
  color: #ffffff;
}

.kunci-toggle-btn.selected-s {
  background: #b91c1c;
  border-color: #991b1b;
  color: #ffffff;
}

/* ==========================================================================
   TAB UTAMA STUDIO SOAL (GB4: TAB 1 UPLOAD, TAB 2 KUNCI, TAB 3 EDITOR)
   ========================================================================== */
.main-tab-nav {
  display: flex;
  gap: 0.5rem;
  margin: 0.9rem 0;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.45rem;
  flex-wrap: wrap;
}

.main-tab-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.main-tab-btn:hover {
  background: #ecfdf5;
  color: var(--nu-green-dark);
  border-color: var(--nu-green);
}

.main-tab-btn.active {
  background: var(--nu-green);
  color: #ffffff;
  border-color: var(--nu-green-dark);
  box-shadow: 0 2px 6px rgba(22, 101, 52, 0.25);
}

.main-tab-pane {
  display: none !important;
}

.main-tab-pane.active {
  display: block !important;
}

/* ==========================================================================
   WYSIWYG VISUAL EDITOR (BEBAS DARI KODE RAW HTML / TEXTAREA)
   ========================================================================== */
.editor-toolbar {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.tool-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.tool-divider {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
  margin: 0 0.3rem;
}

.tool-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.1s;
  min-height: 28px;
}

.tool-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tool-btn.active {
  background: #047857;
  border-color: #064e3b;
  color: #ffffff;
}

.sub-palette {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0.4rem 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.sub-palette-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-right: 0.35rem;
}

.pill-insert {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.1s;
}

.pill-insert:hover {
  background: #ecfdf5;
  border-color: #047857;
  color: #064e3b;
}

.pill-arab {
  font-size: 1.05rem;
  min-width: 28px;
  text-align: center;
  line-height: 1;
}

.wysiwyg-box {
  min-height: 150px;
  max-height: 480px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 0.85rem 1rem;
  line-height: 1.75;
  font-size: 0.94rem;
  color: #1e293b;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.wysiwyg-box:focus {
  border-color: #047857;
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.18);
}

.wysiwyg-box[contenteditable]:empty:before,
.wysiwyg-opsi[contenteditable]:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-style: italic;
  pointer-events: none;
}

.wysiwyg-opsi {
  min-height: 38px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #1e293b;
  outline: none;
  flex: 1;
}

.wysiwyg-opsi:focus {
  border-color: #047857;
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.15);
}

/* Baris Nomor Soal 1 s.d. 30 */
.no-soal-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  align-items: center;
  margin-top: 0.35rem;
}

.no-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none !important;
  transition: all 0.12s;
}

.no-pill:hover {
  border-color: #047857;
  background: #ecfdf5;
  color: #064e3b;
}

.no-pill.current, .no-pill.active {
  background: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.35);
}

.no-pill.done, .no-pill.filled {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

.no-pill.has-key {
  background: #fef9c3 !important;
  border-color: #fde047 !important;
  color: #854d0e !important;
}

/* ==========================================================================
   MODERN SAAS DASHBOARD SHELL (PW LP MA'ARIF NU JAWA TIMUR)
   Sidebar Kiri Collapsible + Topbar Bersih + Canvas Konten Warm Ivory
   ========================================================================== */
.cbt-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* BACKDROP OVERLAY UNTUK MOBILE */
.cbt-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cbt-sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* SIDEBAR KIRI */
.cbt-sidebar {
  width: var(--sidebar-w);
  background: var(--primary-dark);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1100;
  box-shadow: 3px 0 16px rgba(0, 0, 0, 0.12);
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
  user-select: none;
}

/* BRAND HEADER CENTER */
.cbt-sidebar-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.8rem 0.65rem;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  text-align: center;
}

.cbt-brand-identity {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: #ffffff;
  min-width: 0;
  z-index: 1;
}

/* BACKGROUND PENDAR DARI BAWAH LOGO NU (AMBIENT BAR SINKRON + RITME NAFAS) */
.cbt-brand-identity::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 46px;
  border-radius: 50%;
  /* Palet Ambient Bar Sinkron: Emas Kuning -> Amber -> Hijau Limau -> Emerald */
  background: radial-gradient(
    ellipse at center, 
    rgba(251, 191, 36, 0.42) 0%, 
    rgba(245, 158, 11, 0.28) 26%, 
    rgba(163, 230, 53, 0.18) 50%, 
    rgba(16, 185, 129, 0.12) 68%, 
    transparent 78%
  );
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
  animation: nuAuraBreathCycle 2.4s ease-in-out infinite;
  transition: all 0.3s ease;
}

.cbt-brand-identity:hover::before {
  opacity: 0.9;
  transform: translateX(-50%) scale(1.12);
  filter: blur(10px);
  background: radial-gradient(
    ellipse at center, 
    rgba(251, 191, 36, 0.55) 0%, 
    rgba(245, 158, 11, 0.38) 28%, 
    rgba(163, 230, 53, 0.25) 52%, 
    rgba(16, 185, 129, 0.16) 70%, 
    transparent 80%
  );
}

/* BIT PENDAR BERIRAMA SEPERTI ORANG BERNAFAS (INHALE - HOLD - EXHALE 2.4s) */
@keyframes nuAuraBreathCycle {
  0% {
    opacity: 0.35;
    transform: translateX(-50%) scale(0.92);
    filter: blur(7px);
  }
  45% {
    opacity: 0.76;
    transform: translateX(-50%) scale(1.08);
    filter: blur(9.5px);
  }
  60% {
    opacity: 0.68;
    transform: translateX(-50%) scale(1.03);
    filter: blur(8.5px);
  }
  100% {
    opacity: 0.35;
    transform: translateX(-50%) scale(0.92);
    filter: blur(7px);
  }
}

.cbt-brand-logo {
  height: 56px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45)) 
          drop-shadow(0 2px 10px rgba(251, 191, 36, 0.32));
  transition: transform 0.25s ease, filter 0.25s ease;
  position: relative;
  z-index: 2;
}

.cbt-brand-identity:hover .cbt-brand-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) 
          drop-shadow(0 0 14px rgba(251, 191, 36, 0.45));
}

.cbt-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
}

.cbt-brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.cbt-brand-sub {
  font-size: 0.72rem;
  color: var(--gold-light);
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.95;
}

/* BADGE EVENT / TAHUN PELAJARAN DIBAWAH EXAMINATION SYSTEM (PERSIS GB2) */
.cbt-brand-event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #065f46;
  border: 1px solid #86efac;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  margin-top: 0.45rem;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.cbt-sidebar-toggle-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  z-index: 10;
}

.cbt-sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* SIDEBAR SCHOOL CARD (DIBAWAH LOGO NU - BERJARAK DARI TP DAN MENU) */
.cbt-sidebar-school-card {
  margin: 0.85rem 0.65rem 0.95rem;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cbt-sidebar-school-card:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.cbt-sidebar-school-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.cbt-sidebar-school-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
  border: 1.5px solid rgba(212, 165, 44, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.5px;
}

.cbt-sidebar-school-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.cbt-sidebar-school-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbt-sidebar-school-npsn {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  font-family: monospace;
}

/* DAFTAR DETAIL SEKOLAH (CABANG, KEPSEK, SISWA) - UKURAN FONT SAMA DENGAN NPSN */
.cbt-sidebar-school-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cbt-sidebar-school-info-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.cbt-sidebar-school-info-item .info-label {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  flex-shrink: 0;
}

.cbt-sidebar-school-info-item .info-val {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* STATUS SERVER LOKAL DI PALING BAWAH KARTU SEKOLAH (ELEGAN TANPA KAPSUL) */
.cbt-sidebar-school-status {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cbt-server-status-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.cbt-server-status-line .status-label {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  flex-shrink: 0;
}

.cbt-server-status-line .status-val {
  color: #86efac;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbt-status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 6px #22c55e;
  animation: statusPulse 1.8s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 7px #22c55e; }
  50% { opacity: 0.35; transform: scale(0.82); box-shadow: 0 0 2px #22c55e; }
}

/* SIDEBAR NAV AREA */
.cbt-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.45rem 0.55rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cbt-sidebar-nav::-webkit-scrollbar {
  width: 3px;
}
.cbt-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.cbt-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.cbt-nav-group-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
  padding: 0 0.55rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbt-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.52rem 0.65rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none !important;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.cbt-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.cbt-nav-link.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cbt-nav-link.active::before {
  content: '';
  position: absolute;
  left: -0.6rem;
  top: 18%;
  bottom: 18%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--gold);
}

.cbt-nav-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cbt-nav-icon svg {
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

/* KABUT ASAP AURA DI BELAKANG IKON MENU (SAMAR, ANGGUN & MISTIS) */
.cbt-nav-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%) scale(0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 243, 208, 0.38) 0%, rgba(52, 211, 153, 0.2) 38%, rgba(245, 158, 11, 0.08) 60%, transparent 72%);
  filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* SAAT MOUSE HOVER PADA NAV LINK */
.cbt-nav-link:hover .cbt-nav-icon {
  transform: translateY(-1px);
}

.cbt-nav-link:hover .cbt-nav-icon::before {
  opacity: 0.88;
  transform: translate(-50%, -50%) scale(1.15);
  animation: smokeAuraDrift 2.8s ease-in-out infinite alternate;
}

.cbt-nav-link:hover .cbt-nav-icon svg {
  color: #a7f3d0;
  filter: drop-shadow(0 0 5px rgba(110, 231, 183, 0.75)) drop-shadow(0 0 10px rgba(52, 211, 153, 0.35));
  transform: scale(1.08);
}

/* IKON PADA TAB YANG AKTIF MEMILIKI AURA LEMBUT TETAP */
.cbt-nav-link.active .cbt-nav-icon svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 8px rgba(110, 231, 183, 0.4));
}

@keyframes smokeAuraDrift {
  0% {
    transform: translate(-50%, -50%) scale(1.05) rotate(0deg);
    filter: blur(5px);
    opacity: 0.72;
  }
  40% {
    transform: translate(-47%, -54%) scale(1.22) rotate(5deg);
    filter: blur(7px);
    opacity: 0.92;
  }
  75% {
    transform: translate(-53%, -46%) scale(1.1) rotate(-4deg);
    filter: blur(6px);
    opacity: 0.78;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.16) rotate(2deg);
    filter: blur(6.5px);
    opacity: 0.85;
  }
}

.cbt-nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cbt-nav-badge {
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-weight: 600;
  line-height: 1.2;
}

.cbt-nav-link.active .cbt-nav-badge {
  background: var(--gold);
  color: #1a202c;
  font-weight: 700;
}

/* GAME PUZZLE DENGAN TIRAI PENUTUP WARNA POLOS (EASTER EGG PROKTOR) */
.cbt-puzzle-section {
  margin-top: auto;
  padding: 0.25rem 0.65rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Tirai Penutup (Warna Polos Senada Sidebar - Minimalis & Tidak Menghalangi Menu) */
.cbt-puzzle-curtain {
  width: 100%;
  max-width: 180px;
  height: 14px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: all 0.25s ease;
  position: relative;
  overflow: visible;
}

.cbt-puzzle-curtain-bar {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Saat Idle >= 2 Menit: Menjadi Clickable */
.cbt-puzzle-section.idle-unlocked .cbt-puzzle-curtain {
  cursor: pointer;
  border-color: rgba(212, 165, 44, 0.4);
  background: rgba(0, 0, 0, 0.28);
}

.cbt-puzzle-section.idle-unlocked .cbt-puzzle-curtain:hover {
  background: rgba(212, 165, 44, 0.15);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 165, 44, 0.3);
}

.cbt-puzzle-section.idle-unlocked .cbt-puzzle-curtain:hover .cbt-puzzle-curtain-bar {
  background: var(--gold);
  width: 32px;
}

.cbt-puzzle-section.idle-unlocked .cbt-puzzle-curtain:hover::after {
  content: 'Klik untuk main!';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 10;
}

/* Wadah Puzzle (Content) */
.cbt-puzzle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.cbt-puzzle-section.closed .cbt-puzzle-content {
  display: none !important;
}

.cbt-puzzle-section.opened .cbt-puzzle-curtain {
  display: none !important;
}

.cbt-puzzle-section.opened .cbt-puzzle-content {
  display: flex !important;
  animation: puzzleReveal 0.25s ease forwards;
}

@keyframes puzzleReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header Game Compact 4x4 */
.cbt-puzzle-header {
  width: 138px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.cbt-puzzle-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cbt-puzzle-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.cbt-puzzle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 165, 44, 0.35);
  color: var(--gold-light);
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  position: relative;
}

.cbt-puzzle-btn:hover {
  background: var(--gold);
  color: #1a202c;
  border-color: var(--gold);
  transform: scale(1.08);
}

.cbt-puzzle-btn#cbtPuzzleAcakBtn:hover::after {
  content: 'Acak!';
  position: absolute;
  top: -24px;
  right: 0;
  background: #0f172a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 10;
}

.cbt-puzzle-btn#cbtPuzzleCloseBtn:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border-color: #ef4444;
}

.cbt-puzzle-btn#cbtPuzzleCloseBtn:hover::after {
  content: 'Tutup Tirai';
  position: absolute;
  top: -24px;
  right: 0;
  background: #0f172a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 10;
}

/* Papan Puzzle 4x4 (15-Puzzle): 138px x 138px */
.cbt-puzzle-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: 138px;
  height: 138px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(212, 165, 44, 0.25);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.cbt-puzzle-tile {
  background: #004d35;
  border: 1px solid rgba(212, 165, 44, 0.4);
  border-radius: 5px;
  color: #fffdf3;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cbt-puzzle-tile:hover {
  background: #006b45;
  border-color: var(--gold);
  color: #ffffff;
  transform: scale(0.96);
}

.cbt-puzzle-tile.empty {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: default;
}

.cbt-puzzle-tile.empty:hover {
  background: transparent;
  transform: none;
}

.cbt-puzzle-board.solved .cbt-puzzle-tile:not(.empty) {
  background: #006b45;
  border-color: #86efac;
  color: #86efac;
  animation: puzzlePulse 1.2s infinite alternate ease-in-out;
}

@keyframes puzzlePulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.03); filter: brightness(1.25); }
}

/* SIDEBAR FOOTER (LOGOUT BERSIH) */
.cbt-sidebar-footer {
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}

.cbt-btn-logout-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  text-decoration: none !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.cbt-btn-logout-sidebar svg {
  transition: all 0.25s ease;
}

.cbt-btn-logout-sidebar:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.45);
}

.cbt-btn-logout-sidebar:hover svg {
  filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.85)) drop-shadow(0 0 10px rgba(239, 68, 68, 0.4));
  transform: scale(1.12);
}

/* SIDEBAR COLLAPSED STATE */
.cbt-sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
}

.cbt-sidebar.collapsed .cbt-brand-text,
.cbt-sidebar.collapsed .cbt-brand-event-badge,
.cbt-sidebar.collapsed .cbt-nav-group-title,
.cbt-sidebar.collapsed .cbt-nav-label,
.cbt-sidebar.collapsed .cbt-nav-badge,
.cbt-sidebar.collapsed .cbt-sidebar-school-text,
.cbt-sidebar.collapsed .cbt-sidebar-school-info-list,
.cbt-sidebar.collapsed .cbt-sidebar-school-status,
.cbt-sidebar.collapsed .cbt-puzzle-section,
.cbt-sidebar.collapsed .cbt-btn-logout-sidebar span {
  display: none !important;
}

.cbt-sidebar.collapsed .cbt-sidebar-brand {
  padding: 0.5rem 0.35rem;
}

.cbt-sidebar.collapsed .cbt-brand-logo {
  max-width: 44px;
  height: 24px;
}

.cbt-sidebar.collapsed .cbt-sidebar-toggle-btn {
  position: static;
  margin-top: 0.25rem;
}

.cbt-sidebar.collapsed .cbt-sidebar-school-card {
  margin: 0.45rem 0.35rem;
  padding: 0.45rem;
  align-items: center;
}

.cbt-sidebar.collapsed .cbt-sidebar-school-avatar {
  margin: 0 auto;
}

.cbt-sidebar.collapsed .cbt-nav-link {
  justify-content: center;
  padding: 0.75rem 0;
}

.cbt-sidebar.collapsed .cbt-btn-logout-sidebar {
  padding: 0.5rem 0;
}

.cbt-sidebar.collapsed .cbt-nav-link[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  background: #1e293b;
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 1200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* MAIN WRAPPER */
.cbt-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--background);
  transition: margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.cbt-layout.sidebar-collapsed .cbt-main {
  margin-left: var(--sidebar-collapsed-w);
}

/* TOPBAR */
.cbt-topbar {
  height: var(--topbar-h);
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 77, 53, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cbt-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cbt-btn-mobile-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.cbt-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.cbt-breadcrumb-sep {
  opacity: 0.4;
  font-size: 0.75rem;
}

.cbt-breadcrumb-active {
  font-weight: 700;
  color: var(--primary-dark);
}

.cbt-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* SEGMENTED SWITCH JENIS UJIAN */
.cbt-event-switch {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  gap: 2px;
}

.cbt-event-switch-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 0.4rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cbt-event-btn {
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none !important;
  border-radius: 6px;
  transition: all 0.12s ease;
}

.cbt-event-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

.cbt-event-btn.active {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 107, 69, 0.25);
  font-weight: 700;
}

/* PILL PROKTOR & LOGOUT TOPBAR */
.cbt-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.4rem 0.25rem 0.75rem;
  background: var(--background-soft);
  border: 1px solid rgba(0, 107, 69, 0.18);
  border-radius: 30px;
}

.cbt-user-pill-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.2;
}

.cbt-user-pill-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.cbt-btn-logout-topbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #fecaca;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.cbt-btn-logout-topbar:hover {
  background: #dc2626;
  color: #ffffff;
}

/* CONTENT CANVAS */
.cbt-content {
  padding: 1.25rem 1.5rem 2.5rem;
  flex: 1;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
}

/* SCHOOL OVERVIEW BANNER CARD */
.cbt-school-card {
  background: #ffffff;
  border: 1px solid rgba(0, 77, 53, 0.1);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 77, 53, 0.04);
  position: relative;
  overflow: hidden;
}

.cbt-school-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--gold) 100%);
}

.cbt-school-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cbt-school-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.cbt-school-title {
  margin: 0.1rem 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cbt-school-details {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* RESPONSIVE LAYOUT BREAKPOINTS */
@media (max-width: 1024px) {
  .cbt-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
  }
  .cbt-sidebar.mobile-open {
    transform: translateX(0);
  }
  .cbt-main {
    margin-left: 0 !important;
  }
  .cbt-btn-mobile-menu {
    display: flex;
  }
  .cbt-topbar {
    padding: 0 1rem;
  }
  .cbt-content {
    padding: 1rem 1rem 2rem;
  }
}

@media (max-width: 640px) {
  .cbt-topbar {
    height: auto;
    padding: 0.65rem 0.85rem;
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .cbt-topbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .cbt-school-card-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   TAHAP 2: PANEL OPERASIONAL PROKTOR (TAB PROKTOR) SAAS REDESIGN
   ========================================================================== */

/* TOP OPERATIONAL 2-COLUMN GRID */
.cbt-proktor-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .cbt-proktor-top-grid {
    grid-template-columns: 1fr;
  }
}

/* CBT PANEL CARDS */
.cbt-panel-card {
  background: var(--white);
  border: 1px solid rgba(0, 107, 69, 0.12);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cbt-panel-card:hover {
  box-shadow: 0 4px 16px rgba(0, 107, 69, 0.06);
  border-color: rgba(0, 107, 69, 0.2);
}

.cbt-panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.cbt-panel-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cbt-panel-card-desc {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* TOKEN HERO BOX */
.cbt-token-hero-box {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 2px solid #86EFAC;
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.cbt-token-hero-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #166534;
  margin-bottom: 0.25rem;
}

.cbt-token-hero-code-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.35rem 0;
}

.cbt-token-hero-code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #047857;
  user-select: all;
  text-shadow: 0 1px 2px rgba(4, 120, 87, 0.15);
}

.cbt-btn-copy-token {
  background: var(--white);
  border: 1px solid #86EFAC;
  color: #166534;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cbt-btn-copy-token:hover {
  background: #DCFCE7;
  border-color: #4ADE80;
  transform: translateY(-1px);
}

.cbt-token-hero-meta {
  font-size: 0.75rem;
  color: #64748B;
}

.cbt-token-inactive-box {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 10px;
  padding: 1.15rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #64748B;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* TOKEN CONTROLS FORM */
.cbt-token-form-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.85rem;
}

.cbt-input-token {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  text-transform: uppercase;
  font-family: monospace;
  font-weight: 700;
  font-size: 1rem;
  background: #FFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cbt-input-token:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 107, 69, 0.15);
}

.cbt-btn-toggle-off {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FDBA74;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.cbt-btn-toggle-off:hover {
  background: #FFEDD5;
  border-color: #FB923C;
}

.cbt-btn-toggle-on {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.cbt-btn-toggle-on:hover {
  background: #D1FAE5;
  border-color: #6EE7B7;
}

/* LAN & QR CODE CARD */
.cbt-lan-qr-box {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .cbt-lan-qr-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.cbt-qr-wrapper {
  background: #FFFFFF;
  padding: 0.55rem;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.cbt-qr-caption {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748B;
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.cbt-url-bar {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.cbt-input-url {
  flex: 1;
  background: #FFFFFF;
  padding: 0.48rem 0.65rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #0F172A;
  min-width: 0;
}

.cbt-lan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cbt-lan-chip {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 0.74rem;
  font-family: monospace;
  padding: 0.25rem 0.55rem;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.cbt-lan-chip:hover {
  background: #F1F5F9;
  border-color: var(--primary);
  color: var(--primary);
}

.cbt-lan-chip.active {
  background: #ECFDF5;
  border-color: #059669;
  color: #047857;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.18);
}

.cbt-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
}

/* STEPS LIST */
.cbt-steps-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.cbt-steps-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cbt-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.85rem;
}

@media (max-width: 520px) {
  .cbt-steps-grid {
    grid-template-columns: 1fr;
  }
}

.cbt-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

.cbt-step-num {
  background: #E2E8F0;
  color: #334155;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* TATA TERTIB BOX */
.cbt-tatatertib-box {
  background: #FFFFFF;
  border: 1.5px solid #D1FAE5;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

/* STATUS STRIP (KPI BAR) */
.cbt-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cbt-stat-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.15s ease;
}

.cbt-stat-card:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.cbt-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cbt-stat-icon.total { background: #EEF2F6; color: #334155; }
.cbt-stat-icon.active { background: #DCFCE7; color: #166534; }
.cbt-stat-icon.done { background: #DBEAFE; color: #1E40AF; }
.cbt-stat-icon.offline { background: #F1F5F9; color: #64748B; }

.cbt-stat-info {
  display: flex;
  flex-direction: column;
}

.cbt-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
}

.cbt-stat-label {
  font-size: 0.73rem;
  color: #64748B;
  font-weight: 600;
}

/* FILTER & SEARCH BAR (SATU BARIS HORIZONTAL PENUH) */
.cbt-monitoring-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  flex-wrap: nowrap;
}

.cbt-search-box {
  position: relative;
  flex: 1 1 35%;
  min-width: 160px;
}

.cbt-search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 0.83rem;
  background: #FFF;
  box-sizing: border-box;
  min-height: 38px !important;
  height: 38px !important;
}

.cbt-search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 107, 69, 0.12);
}

.cbt-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.85rem;
  pointer-events: none;
}

.cbt-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.cbt-filter-select {
  flex: 0 1 175px;
  width: auto !important;
  min-width: 115px;
  max-width: 185px;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0.42rem 0.65rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 0.82rem;
  background: #FFF;
  color: #334155;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .cbt-monitoring-toolbar {
    flex-wrap: wrap;
  }
  .cbt-search-box {
    flex: 1 1 100%;
  }
  .cbt-filter-select {
    flex: 1 1 calc(33.333% - 0.5rem);
    max-width: none;
  }
}

/* PROGRESS BAR */
.cbt-progress-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 85px;
}

.cbt-progress-track {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}

.cbt-progress-fill {
  height: 100%;
  background: #10B981;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.cbt-progress-text {
  font-size: 0.74rem;
  color: #64748B;
  font-weight: 600;
  text-align: center;
}

/* PROKTOR ACTION CLUSTER */
.cbt-action-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cbt-btn-action {
  border-radius: 5px;
  padding: 0.25rem 0.45rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.cbt-btn-action-reset {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}
.cbt-btn-action-reset:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
}

.cbt-btn-action-logout {
  background: #FFF7ED;
  border-color: #FDBA74;
  color: #C2410C;
}
.cbt-btn-action-logout:hover {
  background: #FFEDD5;
  border-color: #FB923C;
}

.cbt-btn-action-time {
  background: #F0F9FF;
  border-color: #BAE6FD;
  color: #0369A1;
}
.cbt-btn-action-time:hover {
  background: #E0F2FE;
  border-color: #7DD3FC;
}

.cbt-btn-action-submit {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #047857;
}
.cbt-btn-action-submit:hover {
  background: #D1FAE5;
  border-color: #6EE7B7;
}

.cbt-btn-action-delete {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}
.cbt-btn-action-delete:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}

/* ==========================================================================
   GB1 & GB2: Card Header Tab Style (Sisi Kiri Atas Hijau Tua)
   ========================================================================== */
.card.cbt-card-with-tab {
  overflow: hidden;
  position: relative;
}

.cbt-card-tab-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -1.35rem -1.35rem 1rem -1.35rem;
  padding-right: 1.25rem;
  border-bottom: 1px solid rgba(0, 77, 53, 0.08);
  min-height: 42px;
}

.cbt-card-tab-badge {
  background: var(--nu-green, #047857);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.2px;
  padding: 0.45rem 1.4rem 0.45rem 1.1rem;
  border-top-left-radius: 11px;
  border-bottom-right-radius: 22px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 2px 2px 6px rgba(4, 120, 87, 0.2);
}

.card.cbt-card-with-tab.bg-green-soft {
  background: #dcfce7 !important;
  border: 1.5px solid #86efac !important;
}

.card.cbt-card-with-tab.bg-green-soft .cbt-card-tab-bar {
  border-bottom: 1px solid rgba(22, 101, 52, 0.15);
}

/* ==========================================================================
   Alternatif 2: Clean Minimalist SaaS Card Header
   ========================================================================== */
.cbt-card-clean-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid rgba(0, 107, 69, 0.08);
}

.cbt-card-clean-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary-dark, #064E3B);
  margin: 0;
  letter-spacing: -0.2px;
}

.cbt-card-clean-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 7px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* ==========================================================================
   GB5: Foto Siswa Thumbnail di Tabel Proktor
   ========================================================================== */
.sw-foto-thumb {
  width: 34px;
  height: 48px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sw-foto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sw-foto-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
}




/* ==========================================================================
   CLEAN MODERN SAAS: LUXURY APP HEADER (PW LP MA'ARIF NU JAWA TIMUR)
   ========================================================================== */
.app-header-luxury {
  position: relative;
  background: linear-gradient(135deg, #022c22 0%, #064e3b 35%, #047857 75%, #065f46 100%);
  color: #ffffff;
  padding: 1.15rem 1.75rem 1.25rem;
  box-shadow: 0 4px 20px -2px rgba(2, 44, 34, 0.28);
  overflow: hidden;
}

.app-header-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  pointer-events: none;
  opacity: 0.7;
}

.app-header-glow {
  position: absolute;
  top: -60%;
  left: 2%;
  width: 460px;
  height: 220%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.14) 0%, rgba(16, 185, 129, 0.08) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(24px);
}

.app-header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  position: relative;
  z-index: 2;
}

.app-header-logo-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  padding: 0;
  margin: 0;
}

.app-header-logo-direct:hover {
  transform: scale(1.05);
}

.app-header-logo-direct-img {
  height: 76px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.app-header-titles {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.app-header-titles .brand-title {
  margin: 0 0 0.1rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.app-header-subline-year {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.app-header-subline-system {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a7f3d0;
  line-height: 1.25;
  margin-bottom: 0.18rem;
}

.app-header-kapsul-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-header-kapsul {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.65);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  line-height: 1.2;
}

.app-header-kapsul-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fef08a;
  background: rgba(180, 83, 9, 0.42);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 9999px;
  padding: 0.2rem 0.7rem;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.app-header-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.app-header-event-chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.app-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  line-height: 1.25;
}

.app-header-chip .chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
}

.app-header-chip .chip-dot.gold {
  background: #fbbf24;
  box-shadow: 0 0 4px #fbbf24;
}

.app-header-chip.chip-active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #ffffff;
  font-weight: 700;
}

.app-header-chip.chip-active .chip-dot {
  background: #34d399;
  box-shadow: 0 0 5px #34d399;
}

/* User Profile Glass Card */
.app-header-user-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.app-header-glass-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.app-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.app-header-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.app-header-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-user-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.app-header-role-tag {
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  line-height: 1.2;
}

.app-header-role-tag.tag-pw {
  background: #047857;
  color: #d1fae5;
  border: 1px solid #10b981;
}

.app-header-role-tag.tag-pc {
  background: #0369a1;
  color: #e0f2fe;
  border: 1px solid #38bdf8;
}

.app-header-cabang-name {
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: 0.35rem;
}

.app-header-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  transform: translateY(-1px);
}

.app-header-gold-trim {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 22%, #fbbf24 35%, #10b981 70%, #d97706 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   ADMIN PANEL: KPI STAT CARDS & CLEAN SAAS TOOLBAR
   ========================================================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-stat-card {
  background: #ffffff;
  border: 1px solid rgba(0, 107, 69, 0.12);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 107, 69, 0.08);
}

.admin-stat-info {
  display: flex;
  flex-direction: column;
}

.admin-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.admin-stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.admin-stat-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

.admin-stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.admin-stat-icon-wrap.stat-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.admin-stat-icon-wrap.stat-amber {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.admin-stat-icon-wrap.stat-blue {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.admin-stat-icon-wrap.stat-purple {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

/* Admin Tabs Bar Clean SaaS */
.admin-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(0, 107, 69, 0.1);
}

.admin-nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.admin-nav-tab-btn:hover {
  background: #f1f5f9;
  color: #065f46;
  border-color: #cbd5e1;
}

.admin-nav-tab-btn.active {
  background: #047857;
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25);
}

.admin-nav-tab-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
}

.admin-nav-tab-btn.active .admin-nav-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Bypass Alert Banner */
.admin-bypass-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-bypass-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #92400e;
}

.admin-bypass-desc {
  font-size: 0.82rem;
  color: #b45309;
  margin-top: 0.15rem;
}

/* Modern Table Enhancements */
.admin-school-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-school-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-school-link {
  font-weight: 700;
  color: #065f46;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.admin-school-link:hover {
  color: #047857;
  text-decoration: underline;
}

.admin-proof-card {
  font-size: 0.8rem;
  line-height: 1.35;
}

.admin-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: #047857;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  text-decoration: none;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.admin-proof-link:hover {
  background: #dcfce7;
  border-color: #86efac;
}


/* ==========================================================================
   ADMIN SEKOLAH PROFIL: CLEAN MODERN SAAS DETAIL VIEW
   ========================================================================== */
.admin-hero-card {
  background: #ffffff;
  border: 1px solid rgba(0, 107, 69, 0.12);
  border-radius: 14px;
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.admin-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.admin-hero-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.admin-hero-avatar {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #dcfce7;
  border: 1.5px solid #86efac;
  color: #15803d;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.1);
}

.admin-hero-title {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark, #064E3B);
  letter-spacing: -0.2px;
}

.admin-hero-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.admin-meta-table tr:not(:last-child) td,
.admin-meta-table tr:not(:last-child) th {
  border-bottom: 1px solid #e2e8f0;
}

.admin-meta-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  text-align: left;
  width: 38%;
}

.admin-meta-table td {
  background: #ffffff;
  color: #0f172a;
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
}

.btn-whatsapp-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
  border: none;
}

.btn-whatsapp-chat:hover {
  background: #20ba59;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
  color: #ffffff;
}

.admin-event-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.admin-event-card.event-selected {
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.08);
}

.admin-audit-trail {
  margin-top: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
  border-left: 3px solid #10b981;
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.4;
}


/* ==========================================================================
   AUTH PAGE: SHEET BERTUMPUK TABS & KUNING MUDA KEHIJAUAN FORM
   ========================================================================== */
.auth-box-container {
  display: flex;
  flex-direction: column;
}

.auth-sheet-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding-left: 0.5rem;
  margin-bottom: -1px;
  position: relative;
  z-index: 10;
}

.auth-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem 0.68rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.auth-sheet-tab:nth-child(2) {
  margin-left: -12px;
}

/* Tab Aktif: Hijau Ma'arif */
.auth-sheet-tab.tab-active {
  background: #047857;
  color: #ffffff !important;
  border: 1.5px solid #065f46;
  border-bottom: 2px solid #047857;
  z-index: 5;
  box-shadow: 0 -4px 14px rgba(4, 120, 87, 0.22);
  transform: translateY(-2px);
}

/* Tab Non-Aktif: Kuning Muda Kehijauan */
.auth-sheet-tab.tab-inactive {
  background: #ecfccb;
  color: #365314 !important;
  border: 1.5px solid #bef264;
  border-bottom: 1.5px solid #a3e635;
  z-index: 2;
  opacity: 0.94;
}

.auth-sheet-tab.tab-inactive:hover {
  background: #d9f99d;
  color: #1a2e05 !important;
  transform: translateY(-2px);
  opacity: 1;
  z-index: 4;
}

/* Card Body Form Pendaftaran: Background Kuning Muda Kehijauan Halus */
.auth-card-form.bg-soft-lime {
  background: linear-gradient(180deg, #f7fee7 0%, #fefce8 35%, #fbfef5 100%);
  border: 1.5px solid #bef264;
  border-radius: 0 16px 16px 16px;
  box-shadow: 0 6px 20px rgba(132, 204, 22, 0.1);
  padding: 1.5rem 1.65rem;
}

.auth-card-form.bg-soft-neutral {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0 16px 16px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 1.5rem 1.65rem;
}

.auth-card-form .form-group input,
.auth-card-form .form-group select {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.auth-card-form .form-group input:focus,
.auth-card-form .form-group select:focus {
  border-color: #047857 !important;
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15) !important;
}

.auth-card-form legend {
  color: #166534;
  font-weight: 800;
  letter-spacing: -0.2px;
}


/* ==========================================================================
   ADMIN PANEL: BOOK SHEET BERTUMPUK TABS & SELANG-SELING STAT CARDS
   ========================================================================== */
.admin-top-wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.admin-sheet-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding-left: 0.5rem;
  margin-bottom: -1px;
  position: relative;
  z-index: 10;
}

.admin-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.45rem 0.68rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.admin-sheet-tab:nth-child(2) {
  margin-left: -12px;
}

/* Tab Aktif: Hijau */
.admin-sheet-tab.tab-active {
  background: #047857;
  color: #ffffff !important;
  border: 1.5px solid #065f46;
  border-bottom: 2px solid #047857;
  z-index: 5;
  box-shadow: 0 -4px 12px rgba(4, 120, 87, 0.22);
  transform: translateY(-2px);
}

.admin-sheet-tab.tab-active .admin-sheet-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Tab Non-Aktif: Hijau Muda Kekuningan */
.admin-sheet-tab.tab-inactive {
  background: #dcfce7; /* hijau muda kekuningan */
  color: #14532d !important;
  border: 1.5px solid #86efac;
  border-bottom: 1.5px solid #86efac;
  z-index: 2;
  opacity: 0.95;
}

.admin-sheet-tab.tab-inactive:hover {
  background: #bbf7d0;
  color: #064e3b !important;
  transform: translateY(-2px);
  opacity: 1;
  z-index: 4;
}

.admin-sheet-tab-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
}

/* Background Card Kontrol Atas: Hijau Muda Kekuningan */
.admin-control-card.bg-soft-lime-green {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1.5px solid #86efac;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

/* Selang-Seling Kartu KPI: Hijau Muda Kekuningan vs Kuning Muda Kehijauan */
.admin-stat-card.card-bg-hijau-muda {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%) !important;
  border: 1.5px solid #86efac !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.08) !important;
}

.admin-stat-card.card-bg-kuning-muda {
  background: linear-gradient(135deg, #fefce8 0%, #f7fee7 100%) !important;
  border: 1.5px solid #bef264 !important;
  box-shadow: 0 3px 10px rgba(132, 204, 22, 0.08) !important;
}

/* ==========================================================================
   FOOTER RESMI STANDAR PW LP MA'ARIF NU JAWA TIMUR
   - Trim line atas gradien emas-emerald (gb2)
   - Pulse dot bercahaya + teks sistem (kiri, gb3)
   - Tim IT Bid. Evaluasi PW LP Ma'arif NU Jawa Timur @Year (kanan)
   ========================================================================== */
.app-footer {
  width: 100%;
  margin-top: auto;
  background: linear-gradient(135deg, #022c22 0%, #064e3b 50%, #047857 100%);
  color: #e2e8f0;
  font-size: 0.82rem;
  position: relative;
  z-index: 40;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
  border-top: none;
}

.app-footer-gold-trim {
  height: 3.5px;
  width: 100%;
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 22%, #fbbf24 35%, #10b981 70%, #d97706 100%);
  box-shadow: 0 1px 6px rgba(245, 158, 11, 0.45);
}

.app-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.app-footer-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.75);
  animation: appFooterPulseAnim 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  flex-shrink: 0;
}

@keyframes appFooterPulseAnim {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.75);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.18);
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
}

.app-footer-system-text {
  font-weight: 700;
  color: #a7f3d0;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.app-footer-right {
  display: inline-flex;
  align-items: center;
  color: #f1f5f9;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

@media (max-width: 640px) {
  .app-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
  }
}

/* ==========================================================================
   SUBJUDUL DIVIDER BERGAYA PILL EMAS (SEPERTI GB2)
   Untuk Status Kesiapan Madrasah/Sekolah dan Ubah Password di Dashboard Proktor
   ========================================================================== */
.cbt-subheading-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin: 1.25rem 0 0.85rem;
}

.cbt-subheading-line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #d4a52c);
  opacity: 0.85;
}

.cbt-subheading-line.right {
  background: linear-gradient(90deg, #d4a52c, transparent);
}

.cbt-subheading-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 1.05rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(212, 165, 44, 0.55);
  box-shadow: 0 2px 6px rgba(212, 165, 44, 0.12);
  color: #064e3b;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.cbt-subheading-pill .pill-icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* ==========================================================================
   MODAL & PROGRESS BAR SINKRONISASI (ECG HEARTBEAT + GB4 GRADIENT)
   ========================================================================== */
.sync-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: syncModalFadeIn 0.25s ease-out;
}

@keyframes syncModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sync-modal-card {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(16, 185, 129, 0.25);
  position: relative;
  overflow: hidden;
  padding: 1.85rem 1.65rem 1.65rem;
  animation: syncCardSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes syncCardSlideUp {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.sync-modal-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 25%, #10b981 70%, #059669 100%);
  background-size: 200% 100%;
  animation: syncTopBarFlow 2.5s linear infinite;
}

@keyframes syncTopBarFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.sync-modal-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.sync-modal-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
  animation: syncIconPulse 1.6s ease-in-out infinite;
}

@keyframes syncIconPulse {
  0% { transform: scale(1); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15); }
  50% { transform: scale(1.08); box-shadow: 0 8px 18px rgba(16, 185, 129, 0.32); }
  100% { transform: scale(1); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15); }
}

.sync-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #064e3b;
  line-height: 1.35;
}

.sync-modal-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

/* ECG HEARTBEAT MONITOR DISPLAY */
.sync-ecg-box {
  background: #0f172a;
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.15rem;
  position: relative;
  overflow: hidden;
  border: 1.5px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sync-ecg-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(16, 185, 129, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
}

.sync-ecg-info {
  position: relative;
  z-index: 2;
  text-align: left;
}

.sync-ecg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.sync-ecg-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: ecgPingDot 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ecgPingDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.sync-ecg-headline {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sync-pct-number {
  position: relative;
  z-index: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: #34d399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.45);
}

/* PROGRESS BAR TRACK & FILL SESUAI GB4 */
.sync-progress-container {
  margin-bottom: 0.95rem;
}

.sync-progress-track {
  height: 22px;
  background: #f1f5f9;
  border-radius: 9999px;
  position: relative;
  overflow: visible;
  border: 1.5px solid #cbd5e1;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sync-progress-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  /* Palet Gradien GB4: Amber -> Kuning Keemasan -> Hijau Muda -> Emerald */
  background: linear-gradient(90deg, #b45309 0%, #d97706 18%, #f59e0b 35%, #fbbf24 50%, #eab308 65%, #a3e635 80%, #10b981 95%, #059669 100%);
  background-size: 200% 100%;
  position: relative;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25);
  animation: syncFillShimmer 2.5s linear infinite;
}

@keyframes syncFillShimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* EKOR BERSINAR (COMET TAIL) */
.sync-comet-tail {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
  border-radius: 9999px;
  pointer-events: none;
}

/* KEPALA BULATAN KECIL BERDENYUT SEPERTI DETAK JANTUNG (ECG HEARTBEAT HEAD) */
.sync-heartbeat-head {
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #10b981;
  box-shadow: 0 0 10px 3px rgba(16, 185, 129, 0.8), 0 0 18px 6px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  animation: ecgHeartbeatPulse 0.9s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.sync-heartbeat-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #059669;
}

@keyframes ecgHeartbeatPulse {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 10px 3px rgba(16, 185, 129, 0.8), 0 0 18px 6px rgba(245, 158, 11, 0.4);
  }
  18% {
    transform: translateY(-50%) scale(1.35);
    box-shadow: 0 0 16px 5px rgba(16, 185, 129, 0.95), 0 0 25px 8px rgba(245, 158, 11, 0.6);
  }
  32% {
    transform: translateY(-50%) scale(1.05);
  }
  48% {
    transform: translateY(-50%) scale(1.22);
    box-shadow: 0 0 14px 4px rgba(16, 185, 129, 0.85);
  }
  65% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 10px 3px rgba(16, 185, 129, 0.8), 0 0 18px 6px rgba(245, 158, 11, 0.4);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* LABEL STATUS TAHAPAN */
.sync-step-label {
  font-size: 0.84rem;
  color: #334155;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 24px;
}

.sync-step-icon {
  font-size: 0.95rem;
  animation: syncSpin 1.8s linear infinite;
  display: inline-block;
}

@keyframes syncSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sync-footer-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 1.15rem;
  text-align: center;
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.75rem;
}

.sync-error-box {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  font-size: 0.82rem;
  text-align: left;
  margin-top: 0.85rem;
  line-height: 1.45;
}

.sync-btn-close {
  margin-top: 0.95rem;
  width: 100%;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  background: #047857;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.sync-btn-close:hover {
  background: #065f46;
}

/* ==========================================================================
   INTERACTIVE CALENDAR DATE PICKER WITH DD Month YYYY DISPLAY
   ========================================================================== */
.cbt-date-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
}

.cbt-date-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 700;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
}

.cbt-date-picker-wrap:hover .cbt-date-display,
.cbt-date-picker-wrap:focus-within .cbt-date-display {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
  background: #f0fdf4;
}

.cbt-date-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbt-date-icon {
  font-size: 0.88rem;
  color: #047857;
  flex-shrink: 0;
  line-height: 1;
}

.cbt-date-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
}
