* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* CUSTOM SCROLLBAR RAMPING / KECIL */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(241, 196, 15, 0.4);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(241, 196, 15, 0.8);
}

html {
  overflow-x: hidden;
  width: 100%;
}
body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #f1c40f 100%);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  padding: 15px;
  position: relative;
  overflow-x: hidden;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.particle {
  position: absolute;
  display: block;
  pointer-events: none;
  background: rgba(255, 215, 0, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.9);
  animation: floatUp 12s linear infinite;
  bottom: -20px;
}
.particle:nth-child(1) {
  left: 10%;
  width: 5px;
  height: 5px;
  animation-duration: 8s;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 25%;
  width: 8px;
  height: 8px;
  animation-duration: 12s;
  animation-delay: 2s;
}
.particle:nth-child(3) {
  left: 40%;
  width: 4px;
  height: 4px;
  animation-duration: 10s;
  animation-delay: 4s;
}
.particle:nth-child(4) {
  left: 60%;
  width: 7px;
  height: 7px;
  animation-duration: 14s;
  animation-delay: 1s;
}
.particle:nth-child(5) {
  left: 75%;
  width: 5px;
  height: 5px;
  animation-duration: 9s;
  animation-delay: 3s;
}
.particle:nth-child(6) {
  left: 90%;
  width: 6px;
  height: 6px;
  animation-duration: 11s;
  animation-delay: 5s;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

.card {
  background: rgba(255, 255, 255, 0.95);
  padding: 25px 20px;
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  overflow-x: hidden;
  backdrop-filter: blur(15px);
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 215, 0, 0.4);
  display: flex;
  flex-direction: column;
}
.text-center {
  text-align: center;
}
.logo {
  width: 75px;
  height: 75px;
  margin: 0 auto 8px auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}
h2 {
  color: #1e3c72;
  margin-bottom: 3px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.header-app {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(30, 60, 114, 0.15);
}
.header-app .user-info h3 {
  font-size: 14px;
  color: #1e3c72;
  margin: 0;
}
.header-app .user-info p {
  font-size: 11px;
  color: #b7950b;
  font-weight: 600;
  margin: 0;
}

.input-box {
  margin-bottom: 12px;
  text-align: left;
}
.row-group {
  display: flex;
  gap: 8px;
}
.row-group .input-box {
  flex: 1;
}

.password-container {
  position: relative;
}
.eye-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
  font-size: 16px;
  user-select: none;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
  text-transform: uppercase;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  font-size: 13px;
  background: #fff;
  transition: 0.3s;
}
input[type="password"] {
  padding-right: 40px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.15);
}

.checkbox-container {
  max-height: 120px;
  overflow-y: auto;
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 8px 12px;
  background: #fff;
}
.checkbox-item {
  display: flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
  color: #444;
}
.checkbox-item input {
  width: auto;
  margin-right: 8px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 5px;
}
.option-item {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #eee;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 11px;
  color: #444;
  line-height: 1.4;
}
.option-item input[type="radio"] {
  width: auto;
  margin-right: 10px;
  accent-color: #1e3c72;
  flex-shrink: 0;
}
.option-item:hover {
  border-color: #1e3c72;
  background: rgba(30, 60, 114, 0.05);
}

button {
  width: 100%;
  padding: 12px;
  background: #1e3c72;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}
button:active {
  transform: scale(0.98);
  background: #162b52;
}
.btn-outline {
  background: transparent;
  color: #1e3c72;
  border: 2px solid #1e3c72;
  box-shadow: none;
}
.btn-logout {
  width: auto;
  padding: 6px 12px;
  font-size: 11px;
  background: #e74c3c;
  margin-top: 0;
  box-shadow: none;
  color: white;
  border: none;
}
.btn-danger {
  background: #e74c3c;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

#pesanEror {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 15px;
  display: none;
  font-weight: 600;
}
.hidden {
  display: none !important;
}

/* STYLE RPG CLASSIC PROFILE */
.rpg-card-container {
  background: #1a2536;
  border: 3px solid #f1c40f;
  border-radius: 16px;
  padding: 15px;
  color: #fff;
  text-align: left;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
  margin-top: 15px;
}
.rpg-top-section {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.rpg-avatar-box {
  width: 65px;
  height: 65px;
  background: #2c3e50;
  border: 2px solid #f1c40f;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.rpg-info-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.rpg-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1c40f;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpg-class-lvl {
  font-size: 11px;
  color: #bdc3c7;
  font-weight: 500;
}

.rpg-bar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  background: #111823;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #34495e;
}
.rpg-bar-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rpg-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: bold;
}
.rpg-bar-outer {
  width: 100%;
  background: #2c3e50;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid #1a2536;
}
.rpg-hp-fill {
  height: 100%;
  background: #2ecc71;
  transition:
    width 0.4s,
    background-color 0.4s;
}
.rpg-shield-fill {
  height: 100%;
  background: #3498db;
  transition: width 0.4s;
}

.rpg-status-banner {
  background: #2c3e50;
  border-left: 4px solid #f1c40f;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
  font-size: 11px;
  margin-bottom: 10px;
  line-height: 1.4;
}
.rpg-status-banner strong {
  color: #f1c40f;
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  text-transform: uppercase;
}

.rpg-stats-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.rpg-stat-item {
  background: #111823;
  border: 1px solid #34495e;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-size: 10px;
}

/* TABEL REKAPITULASI ADMIN */
.rekap-container {
  margin-top: 10px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
}
.rekap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 8px;
}
.rekap-table th,
.rekap-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.rekap-table th {
  background: #f8f9fa;
  color: #1e3c72;
  font-weight: 700;
}
.admin-nav {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.admin-nav button {
  margin-top: 0;
  padding: 7px 6px;
  font-size: 10px;
  flex: 1;
  min-width: 80px;
}
.admin-tab-content {
  width: 100%;
}

/* GAME PRELOADER */
.game-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 24, 0.94);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  transition: opacity 0.3s ease;
}
.loading-box-game {
  width: 80%;
  max-width: 320px;
  text-align: center;
}
.loading-title-game {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f1c40f;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
}
.progress-bar-bg {
  width: 100%;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(241, 196, 15, 0.5);
  border-radius: 10px;
  overflow: hidden;
  padding: 2px;
  box-shadow: 0 0 15px rgba(241, 196, 15, 0.2);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f39c12, #f1c40f);
  border-radius: 6px;
  box-shadow: 0 0 10px #f1c40f;
  transition: width 0.1s linear;
}
.loading-percent-game {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* MODAL (gaya .modal-overlay / .modal-box ada di bagian "MODAL GANTI FOTO PROFIL" di bawah) */
.modal-detail {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* QUEST BOARD STYLES */
.quest-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.quest-tabs button {
  margin-top: 0;
  padding: 8px;
  font-size: 11px;
  flex: 1;
  border: 2px solid transparent;
}
.accordion {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
}
.accordion-header {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  background: #f8f9fa;
  color: #1e3c72;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-header:hover {
  background: #e2e8f0;
}
.accordion-body {
  display: none;
  padding: 0;
  max-height: 250px;
  overflow-y: auto;
  background: #fff;
}
.accordion-body.active {
  display: block;
}
.q-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eee;
  font-size: 10.5px;
}
.q-item:nth-child(even) {
  background: #fafafa;
}
.badge-poin-plus,
.badge-poin-min {
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-poin-plus {
  background: #27ae60;
}
.badge-poin-min {
  background: #e74c3c;
}
.quest-aturan {
  margin: 0 0 10px 0;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #475569;
  background: #f1f5f9;
  border-left: 3px solid #3498db;
  border-radius: 6px;
  text-align: left;
}
.badge-hp {
  background: #e74c3c;
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-shield {
  background: #3498db;
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.quest-card-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 15px;
  cursor: pointer;
  flex: 1;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

/* KELAS TAMBAHAN UNTUK MENGURANGI INLINE STYLING PADA HTML */
.menu-wrapper-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 2;
}
.main-menu-card-style {
  width: 100%;
  padding: 20px 18px;
}
.subtitle-menu {
  font-size: 9px;
  color: #b7950b;
  margin-top: -2px;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.quest-leaderboard-row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.flex-column-overflow {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-title-small {
  font-size: 11.5px;
  color: #1e3c72;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-desc-small {
  font-size: 9px;
  color: #666;
  margin: 1px 0 0 0;
  white-space: nowrap;
}
.task-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
}
.task-board-sub {
  font-size: 9px;
  color: #b7950b;
  font-weight: bold;
}
.main-task-list-box {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rpg-avatar-wrapper-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.rpg-daily-score-badge {
  background: #111823;
  border: 1px solid #34495e;
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 10.5px;
  font-weight: bold;
  color: #f1c40f;
  text-align: center;
  width: 65px;
  white-space: nowrap;
}
.rpg-stat-number-green {
  color: #2ecc71;
  display: block;
  font-weight: bold;
  font-size: 14px;
}
.rpg-stat-number-red {
  color: #e74c3c;
  display: block;
  font-weight: bold;
  font-size: 14px;
}
.rpg-stat-label {
  color: #95a5a6;
  display: block;
  font-size: 9px;
  margin-top: 2px;
}
.history-container-main {
  margin-top: 15px;
  background: #111823;
  border: 1px solid #34495e;
  border-radius: 8px;
  padding: 10px;
}
.history-title-main {
  font-size: 11px;
  color: #f1c40f;
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.history-list-box {
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.target-siswa-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.target-mode-toggle {
  font-size: 10px;
  color: #1e3c72;
  cursor: pointer;
  font-weight: bold;
}
.teacher-task-manage-box {
  margin-top: 15px;
  border-top: 2px solid #e2e8f0;
  padding-top: 12px;
}
.teacher-task-list-box {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-rekap-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.admin-filter-select {
  width: auto;
  padding: 4px 8px;
  font-size: 10px;
}
.admin-chart-box {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
}
.admin-cetak-card-box {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  text-align: left;
}
.admin-chat-monitor-wrapper {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  text-align: left;
}
.admin-chat-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
}
.admin-chat-btn-refresh {
  margin: 0;
  width: auto;
  padding: 5px 10px;
  font-size: 9px;
  background: #1e3c72;
  color: #fff;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.admin-chat-btn-delete {
  margin: 0;
  width: auto;
  padding: 5px 10px;
  font-size: 9px;
  background: #e74c3c;
  color: #fff;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.admin-chat-grid-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  height: 380px;
}
.admin-room-list-box {
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-chat-pane-box {
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.admin-chat-pane-header {
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1.5px solid #cbd5e1;
  font-size: 11px;
  font-weight: bold;
  color: #1e3c72;
}
.admin-chat-pane-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}
.quest-container-ui-box {
  flex-grow: 1;
  overflow-y: auto;
  text-align: left;
  padding-right: 5px;
  margin-top: 5px;
}
.leaderboard-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.leaderboard-filter-select {
  width: auto;
  padding: 4px 8px;
  font-size: 10.5px;
}
.global-leaderboard-list-box {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 380px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.global-leaderboard-list-box .lb-row {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.global-leaderboard-list-box .lb-left {
  min-width: 0;
  flex: 1 1 auto;
}
.global-leaderboard-list-box .lb-name-wrap {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}
.modal-error-overlay-box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 19, 30, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}
.modal-error-inner-box {
  background: #111b2b;
  border: 2.5px solid #f1c40f;
  border-radius: 16px;
  padding: 24px 20px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 0 25px rgba(241, 196, 15, 0.35);
}
.modal-error-title {
  color: #f1c40f;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.modal-error-desc {
  background: #1a2638;
  border: 1px solid #2c3e50;
  border-radius: 10px;
  padding: 12px 14px;
  color: #ecf0f1;
  font-size: 11.5px;
  line-height: 1.5;
  margin-bottom: 18px;
  text-align: center;
}
.modal-error-btn {
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  color: #111b2b;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 10px rgba(241, 196, 15, 0.3);
}

/* MODAL GANTI FOTO PROFIL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 15px;
}
.modal-box {
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  text-align: left;
  border: 2px solid #c5a059;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.modal-box h4 {
  color: #1e3a8a;
  margin-bottom: 12px;
  font-size: 14px;
}

.app-version-badge {
  position: fixed;
  bottom: 6px;
  right: 8px;
  background: rgba(17, 24, 35, 0.85);
  color: #f1c40f;
  font-size: 8.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(241, 196, 15, 0.3);
  backdrop-filter: blur(2px);
  z-index: 999;
  letter-spacing: 0.5px;
  pointer-events: none; /* Agar tidak sengaja terklik oleh pengguna */
}

/* Tombol nonaktif (mis. saat proses simpan) */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== v3.3.0: LAYOUT APLIKASI SISWA ===== */

/* ==========================================================
   PORTAL SISWA - MODE APLIKASI
   Header mini + bar navigasi atas (Profil / Teman / Chat / Global)
   Prioritas tampilan: HP. Font dibuat lebih besar & mudah dibaca.
   ========================================================== */
#siswaCard.siswa-app-mode {
  max-width: 520px;
  height: calc(100vh - 30px);
  height: calc(100dvh - 30px);
  max-height: 940px;
  padding: 12px;
  overflow: hidden;
}
#siswaCard.siswa-app-mode > .header-app {
  display: none;
}

.siswa-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Header mini ---------- */
.siswa-mini-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: #1a2536;
  border: 2px solid #f1c40f;
  border-radius: 14px;
  padding: 8px 10px;
  color: #fff;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
}
.mini-avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 2px solid #f1c40f;
  border-radius: 10px;
  overflow: hidden;
  background: #2c3e50;
  cursor: pointer;
}
.mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mini-info {
  flex: 1;
  min-width: 0;
}
.mini-nama {
  font-size: 14px;
  font-weight: 700;
  color: #f1c40f;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  overflow: hidden;
}
.mini-kelas {
  font-size: 11.5px;
  color: #bdc3c7;
  white-space: nowrap;
}
.mini-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
  background: #111823;
  border: 1px solid #34495e;
  white-space: nowrap;
}
.mini-hp {
  color: #2ecc71;
}
.mini-star {
  color: #f1c40f;
}
.mini-logout {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
}

/* ---------- Bar navigasi atas ---------- */
.siswa-tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  flex-shrink: 0;
  background: #111823;
  border: 2px solid #34495e;
  border-radius: 14px;
  padding: 4px;
}
.siswa-tab-btn {
  position: relative;
  width: 100%;
  margin-top: 0;
  padding: 8px 2px 6px;
  background: transparent;
  color: #94a3b8;
  border: none;
  border-radius: 10px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  touch-action: manipulation;
  transition:
    background 0.2s,
    color 0.2s;
}
.siswa-tab-btn .tab-lbl {
  display: block;
  font-size: 11px;
  line-height: 1.1;
}
.rpg-input {
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  background: #1a2536;
  color: #fff;
  border: 1px solid #34495e;
  font-size: 10.5px;
}
.siswa-tab-btn .tab-ico {
  font-size: 20px;
  line-height: 1;
}
.siswa-tab-btn:active {
  background: rgba(241, 196, 15, 0.15);
  transform: scale(0.96);
}
.siswa-tab-btn.active {
  background: linear-gradient(135deg, #f1c40f, #d4ac0d);
  color: #111823;
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.35);
}
.tab-badge {
  position: absolute;
  top: 1px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e74c3c;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #111823;
}

/* ---------- Panel isi tab ---------- */
.siswa-panels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.siswa-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.siswa-panel > * + * {
  margin-top: 12px;
}
.siswa-panel.panel-chat {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.siswa-panel.panel-chat > * + * {
  margin-top: 0;
}
#siswaCard.siswa-app-mode .rpg-card-container {
  margin-top: 0;
}

/* ---------- Tab Profil: font lebih besar ---------- */
#siswaCard.siswa-app-mode .rpg-avatar-box {
  width: 78px;
  height: 78px;
}
#siswaCard.siswa-app-mode .rpg-daily-score-badge {
  width: 78px;
  font-size: 12.5px;
}
#siswaCard.siswa-app-mode .rpg-name {
  font-size: 17px;
}
#siswaCard.siswa-app-mode .rpg-class-lvl {
  font-size: 13px;
}
#siswaCard.siswa-app-mode .rpg-bar-meta {
  font-size: 12px;
}
#siswaCard.siswa-app-mode .rpg-bar-outer {
  height: 13px;
  border-radius: 7px;
}
#siswaCard.siswa-app-mode .rpg-status-banner {
  font-size: 13px;
}
#siswaCard.siswa-app-mode .rpg-status-banner strong {
  font-size: 12px;
}
#siswaCard.siswa-app-mode .rpg-stat-item {
  padding: 10px;
}
#siswaCard.siswa-app-mode .rpg-stat-number-green,
#siswaCard.siswa-app-mode .rpg-stat-number-red {
  font-size: 18px;
}
#siswaCard.siswa-app-mode .rpg-stat-label {
  font-size: 11px;
}
#siswaCard.siswa-app-mode .history-title-main {
  font-size: 13px;
}
#siswaCard.siswa-app-mode .history-list-box {
  max-height: 380px;
}

.pin-card {
  margin-bottom: 12px;
}
.pin-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1c40f;
  margin-bottom: 10px;
}
.pin-label {
  display: block;
  font-size: 11.5px;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.pin-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid #34495e;
  background: #1a2536;
  color: #fff;
  font-size: 14px;
}
.pin-save-btn {
  width: 100%;
  margin-top: 0;
  padding: 11px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  background: #27ae60;
  color: #fff;
  box-shadow: none;
}

/* ---------- Avatar + titik online ---------- */
.avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  border: 2px solid #f1c40f;
  background: #2c3e50;
}
.presence-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #111823;
  background: #7f8c8d;
}
.presence-dot.on {
  background: #2ecc71;
  box-shadow: 0 0 6px #2ecc71;
}

/* ---------- Baris teman / percakapan ---------- */
.friend-row,
.chat-row,
.request-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111823;
  border: 1px solid #34495e;
  border-radius: 12px;
  padding: 10px;
}
.friend-list,
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.chat-row {
  cursor: pointer;
  transition: background 0.15s;
}
.chat-row:active {
  background: #1a2536;
}
.chat-row.has-unread {
  border-color: #f1c40f;
}
.request-row {
  background: rgba(241, 196, 15, 0.1);
  border-color: #f1c40f;
  margin-bottom: 8px;
}
.request-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1c40f;
  margin: 10px 0 6px;
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.row-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1c40f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-time {
  font-size: 11px;
  color: #94a3b8;
  flex-shrink: 0;
}
.row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.row-preview {
  font-size: 12.5px;
  color: #9fb0c3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-row.has-unread .row-preview {
  color: #fff;
  font-weight: 600;
}
.row-sub {
  font-size: 12px;
  color: #bdc3c7;
}
.row-status {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}
.row-status.on {
  color: #2ecc71;
}
.row-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.row-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.mini-btn {
  width: auto;
  margin-top: 0;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: none;
  color: #fff;
  border: none;
}
.mini-btn.chat {
  background: #3498db;
}
.mini-btn.del {
  background: #e74c3c;
}
.mini-btn.ok {
  background: #2ecc71;
}
.request-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.request-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-note {
  font-size: 12.5px;
  color: #95a5a6;
  text-align: center;
  padding: 18px 10px;
  line-height: 1.5;
}

/* ---------- Tambah teman ---------- */
.friend-add-row {
  display: flex;
  gap: 8px;
}
.friend-add-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 14px;
  border: 1.5px solid #34495e;
  background: #111823;
  color: #fff;
  border-radius: 10px;
}
.friend-add-row button {
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  background: #f1c40f;
  color: #1a2536;
  border-radius: 10px;
  box-shadow: none;
}
.friend-count {
  font-size: 12.5px;
  color: #bdc3c7;
  margin: 10px 2px 6px;
}

/* ---------- Chat ---------- */
.chat-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-list-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #f1c40f;
  padding: 2px 4px;
  flex-shrink: 0;
}
.chat-room-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: #111823;
  border: 1px solid #34495e;
  border-radius: 12px;
  padding: 8px 10px;
}
.chat-back-btn {
  width: 38px;
  height: 38px;
  margin-top: 0;
  padding: 0;
  font-size: 20px;
  background: #2c3e50;
  border-radius: 10px;
  box-shadow: none;
  flex-shrink: 0;
}
.chat-room-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 2px solid #f1c40f;
  border-radius: 10px;
  overflow: hidden;
  background: #2c3e50;
}
.chat-room-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-room-info {
  flex: 1;
  min-width: 0;
}
#chatTitleNama {
  font-size: 15px;
  font-weight: 700;
  color: #f1c40f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#chatSubStatus {
  font-size: 11.5px;
  color: #94a3b8;
}
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #0b0f17;
  border: 1px solid #34495e;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.bubble.me {
  align-self: flex-end;
  background: #1e3c72;
  color: #fff;
  border: 1px solid #2a5298;
  border-bottom-right-radius: 4px;
}
.bubble.them {
  align-self: flex-start;
  background: #1a2536;
  color: #e2e8f0;
  border: 1px solid #34495e;
  border-bottom-left-radius: 4px;
}
.bubble-text {
  white-space: pre-wrap;
}
.bubble-name {
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #38bdf8;
}
.bubble.me .bubble-name {
  color: #f1c40f;
}
.bubble-class {
  font-weight: 500;
  opacity: 0.7;
  margin-left: 4px;
}
.bubble-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  opacity: 0.75;
  margin-top: 3px;
}
.tick.read {
  color: #38bdf8;
  font-weight: 700;
}
.chat-form-bar {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin: 0;
}
.chat-form-bar input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: 14px;
  background: #111823;
  color: #fff;
  border: 1.5px solid #34495e;
  border-radius: 22px;
}
.chat-form-bar button {
  width: auto;
  margin-top: 0;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #f1c40f, #d4ac0d);
  color: #1a2536;
  border-radius: 22px;
  box-shadow: none;
}

/* ---------- Global chat: indikator online ---------- */
.global-online-bar {
  flex-shrink: 0;
  background: #111823;
  border: 1px solid #34495e;
  border-radius: 12px;
  padding: 8px 10px;
}
.global-online-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #2ecc71;
}
.online-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}
.global-online-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 2px;
}
.global-online-list:empty {
  display: none;
}
.online-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  background: #1a2536;
  border: 1px solid #34495e;
  border-radius: 20px;
  padding: 3px 10px 3px 4px;
  font-size: 12px;
  color: #e2e8f0;
  white-space: nowrap;
}
.online-chip img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.online-chip span.nm {
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-chip.me {
  border-color: #f1c40f;
}

/* ===== v3.3.1: PANEL AKADEMIK ADMIN (tema terang, rapi & accordion) ===== */
#adminTabAkademik .accordion {
  margin-bottom: 10px;
}
#adminTabAkademik .accordion-header {
  font-size: 12.5px;
  padding: 12px 14px;
}
#adminTabAkademik .accordion-body {
  max-height: none;
  padding: 0;
}
#adminTabAkademik .akademik-body-inner {
  padding: 14px;
}
#adminTabAkademik .akademik-desc {
  font-size: 10.5px;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.5;
}
#adminTabAkademik .akademik-info {
  font-size: 10.5px;
  color: #64748b;
  margin-bottom: 8px;
}
#adminTabAkademik .akademik-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
#adminTabAkademik .akademik-check-row label {
  font-size: 11px;
  color: #334155;
  margin: 0;
  font-weight: 500;
}

/* Daftar centang siswa di panel Admin: pakai tema terang, bukan tema gelap siswa */
.admin-check-list .friend-row {
  background: #fff;
  border-color: #e2e8f0;
  transition: background 0.15s;
}
.admin-check-list .friend-row:hover {
  background: #f8f9fa;
}
.admin-check-list .row-name {
  color: #1e3c72;
}
.admin-check-list .row-sub {
  color: #64748b;
}

/* ===== v3.4.0: LAPORAN BUG & MASUKAN ===== */
.admin-nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e74c3c;
  color: #fff;
  font-size: 8.5px;
  font-weight: bold;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  border-radius: 8px;
  padding: 0 3px;
  box-shadow: 0 0 0 1.5px #fff;
}
.fab-laporan-bug {
  position: fixed;
  /* Kiri bawah (kanan bawah dipakai lencana versi). Lebih kecil & sedikit
     transparan supaya tidak mengganggu kolom ketik/tombol kirim. */
  left: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: 38px;
  height: 38px;
  min-width: unset;
  border-radius: 50%;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-size: 17px;
  opacity: 0.88;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 500;
  padding: 0;
  transition: transform 0.15s ease;
}
.fab-laporan-bug:hover {
  transform: scale(1.07);
  opacity: 1;
}
.fab-laporan-bug.hidden {
  display: none;
}
.laporan-bug-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}
.laporan-bug-list-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}
.laporan-bug-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #e74c3c;
  border-radius: 8px;
  padding: 8px 10px;
}
.laporan-bug-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 6px;
}
.laporan-bug-kategori {
  font-size: 10px;
  font-weight: bold;
}
.laporan-bug-waktu {
  font-size: 8.5px;
  color: #94a3b8;
  white-space: nowrap;
}
.laporan-bug-isi {
  font-size: 10.5px;
  color: #1e293b;
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 4px;
  white-space: pre-wrap;
}
.laporan-bug-meta {
  font-size: 9px;
  color: #64748b;
  margin-bottom: 6px;
}
.laporan-bug-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.laporan-bug-status-select {
  margin: 0;
  width: auto;
  flex: 1;
  padding: 4px 6px;
  font-size: 9.5px;
}
.laporan-bug-delete-btn {
  margin: 0;
  width: auto;
  padding: 4px 9px;
  font-size: 11px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ==========================================
   PROFIL GURU: STATISTIK & RIWAYAT POIN (3 TAB)
   ========================================== */
.guru-stat-box {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  min-width: 0;
}
.guru-stat-num {
  font-weight: bold;
  font-size: 16px;
}
.guru-stat-lbl {
  color: #94a3b8;
  font-size: 8.5px;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.guru-riwayat-title {
  color: #f1c40f;
  font-weight: bold;
  font-size: 11.5px;
  margin-bottom: 8px;
}
.guru-riwayat-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.guru-riwayat-tab {
  flex: 1;
  width: auto;
  margin: 0;
  padding: 7px 4px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #34495e;
  cursor: pointer;
  white-space: nowrap;
}
.guru-riwayat-tab.active {
  background: #1e3c72;
  color: #fff;
  border-color: #f1c40f;
}
.guru-riwayat-list {
  max-height: 320px;
  overflow-y: auto;
}
.guru-riwayat-kosong {
  font-size: 10px;
  color: #888;
  text-align: center;
  padding: 10px;
}
.guru-riwayat-item {
  background: #1a2536;
  border: 1px solid #34495e;
  border-left: 3px solid #2ecc71;
  padding: 7px 9px;
  border-radius: 0 6px 6px 0;
  font-size: 11px;
  color: #ecf0f1;
  margin-bottom: 5px;
}
.guru-riwayat-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: bold;
  margin-bottom: 2px;
}
.guru-riwayat-item-bottom {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 9.5px;
  color: #bdc3c7;
}
.guru-riwayat-siswa {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   TAB MONITORING SISWA (WALI KELAS)
   ========================================== */
.monitor-kelas-lbl {
  color: #fff;
  background: #1e3c72;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 10px;
  margin-left: 4px;
}
.monitor-select {
  width: 100%;
  margin-bottom: 8px;
  padding: 6px;
  border-radius: 6px;
  background: #1a2536;
  color: #fff;
  border: 1px solid #34495e;
  font-size: 10.5px;
}
.monitor-info {
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 6px;
}
.monitor-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #34495e;
  border-radius: 8px;
}
.monitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  color: #ecf0f1;
}
.monitor-table th,
.monitor-table td {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1px solid #263448;
  white-space: nowrap;
}
.monitor-table thead th {
  position: sticky;
  top: 0;
  background: #1e3c72;
  font-size: 12px;
  z-index: 1;
}
.monitor-table tbody tr:nth-child(even) {
  background: #1a2536;
}
.monitor-table .monitor-nama {
  text-align: left;
  padding-left: 8px;
  white-space: normal;
  min-width: 110px;
}
.monitor-sub {
  display: block;
  font-size: 8.5px;
  font-weight: 400;
  color: #94a3b8;
}
.monitor-merah {
  color: #e74c3c;
  font-weight: 700;
}
.monitor-hijau {
  color: #2ecc71;
  font-weight: 700;
}
.monitor-legend {
  font-size: 9.5px;
  color: #94a3b8;
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}
.monitor-refresh {
  width: 100%;
  margin: 8px 0 0 0;
  padding: 7px;
  font-size: 10.5px;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #34495e;
  cursor: pointer;
}

/* ==========================================
   MODE MAINTENANCE
   ========================================== */
.maintenance-home-card {
  padding: 28px 20px;
}
.maintenance-home-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.maintenance-home-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 800;
  color: #1e3c72;
}
.maintenance-home-pesan {
  margin: 0 0 10px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
}
.maintenance-home-estimasi {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
}
.maintenance-home-info {
  margin-top: 12px;
  font-size: 11px;
  color: #94a3b8;
}
/* Saat maintenance: hanya kartu pemberitahuan yang tampil di halaman awal */
.menu-wrapper-container.maintenance-on > :not(#maintenanceHomeCard) {
  display: none !important;
}

.maintenance-admin-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  max-width: 100%;
  padding: 4px 12px;
  background: #d97706;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  border-radius: 0 0 8px 8px;
  pointer-events: none;
}

/* ==========================================
   SAPAAN SESUAI WAKTU + AFIRMASI HARIAN (v3.9.0)
   ========================================== */
.sapaan-wrap {
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}
.sapaan-judul {
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.2px;
  word-break: break-word;
}
.sapaan-afirmasi {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  /* kalimat ditumpuk dalam satu sel supaya bisa "berputar" bergantian */
  display: grid;
  overflow: hidden;
  perspective: 260px;
}
.sapaan-afirmasi.afm-bisa-ketuk {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.afm-teks {
  grid-area: 1 / 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  backface-visibility: hidden;
  transform-origin: 50% 50% -14px; /* poros di belakang → bergulir seperti balok */
}
.afm-teks.keluar.naik { animation: afmKeluarNaik 0.75s cubic-bezier(0.55, 0, 0.3, 1) forwards; }
.afm-teks.masuk.naik { animation: afmMasukNaik 0.75s cubic-bezier(0.55, 0, 0.3, 1) both; }
.afm-teks.keluar.turun { animation: afmKeluarTurun 0.75s cubic-bezier(0.55, 0, 0.3, 1) forwards; }
.afm-teks.masuk.turun { animation: afmMasukTurun 0.75s cubic-bezier(0.55, 0, 0.3, 1) both; }
@keyframes afmKeluarNaik { to { transform: rotateX(90deg); opacity: 0; } }
@keyframes afmMasukNaik { from { transform: rotateX(-90deg); opacity: 0; } }
@keyframes afmKeluarTurun { to { transform: rotateX(-90deg); opacity: 0; } }
@keyframes afmMasukTurun { from { transform: rotateX(90deg); opacity: 0; } }


/* Kartu terang (guru / kepala sekolah / admin) */
.sapaan-judul.sapaan-terang {
  font-size: 16.5px;
  color: #1e3c72;
}
.sapaan-afirmasi.sapaan-terang {
  color: #8a6d0b;
}

/* Header gelap murid */
.sapaan-judul.sapaan-gelap {
  font-size: 14.5px;
  color: #f1c40f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sapaan-afirmasi.sapaan-gelap {
  color: #bdc3c7;
}
.siswa-mini-header .mini-info {
  align-self: center;
}


/* ==========================================================
   v3.10.0 — BINGKAI FOTO SESUAI TIER
   Dipasang di kotak foto profil (.rpg-avatar-box) & foto header (.mini-avatar)
   lewat kelas tier-* (diatur di app.js → getTierRank().frame)
   ========================================================== */
@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.rpg-avatar-box[class*="tier-"],
.mini-avatar[class*="tier-"] {
  border: 4px solid transparent;
  outline: 2px solid var(--ring, transparent);
  outline-offset: 2px;
  background:
    linear-gradient(#2c3e50, #2c3e50) padding-box,
    var(--frame, linear-gradient(135deg, #95a5a6, #6c7a7b)) border-box;
  background-size: 100% 100%, var(--frame-size, 100% 100%);
  box-shadow:
    0 0 var(--glow-r, 8px) var(--glow, transparent),
    0 4px 8px rgba(0, 0, 0, 0.4);
  animation: var(--frame-anim, none);
}
.rpg-avatar-box[class*="tier-"] {
  position: relative;
}

/* NOVICE — abu-abu polos */
.tier-novice {
  --frame: linear-gradient(135deg, #c3cccd, #7d8a8c);
  --ring: rgba(163, 177, 178, 0.45);
}
/* IRON SQUIRE — besi gelap */
.tier-iron {
  --frame: linear-gradient(135deg, #d4dde6 0%, #66778a 28%, #1f2933 52%, #98a8b8 78%, #53626f 100%);
  --ring: #4f5d6b;
  --glow: rgba(150, 175, 200, 0.55);
  --glow-r: 10px;
}
/* BRONZE KNIGHT — perunggu hangat */
.tier-bronze {
  --ring: #b8681f;
  --frame: linear-gradient(135deg, #f2b67a 0%, #c0701f 35%, #7a3f10 62%, #e59a4a 100%);
  --glow: rgba(211, 131, 18, 0.55);
  --glow-r: 10px;
}
/* SILVER WARRIOR — perak berkilau, kilat putih melintas */
.tier-silver {
  --ring: #c9d6e4;
  --frame: linear-gradient(115deg, #8d9eb0 0%, #e8eef5 16%, #8d9eb0 33%, #b9c6d4 42%, #ffffff 50%, #b9c6d4 58%, #8d9eb0 67%, #e8eef5 83%, #8d9eb0 100%);
  --frame-size: 300% 100%;
  --frame-anim: frameShine 3.6s linear infinite;
  --glow: rgba(214, 228, 244, 0.6);
  --glow-r: 12px;
}
/* GOLD PALADIN — emas, kilat melintas */
.tier-gold {
  --ring: #f1c40f;
  --frame: linear-gradient(115deg, #9a6b06 0%, #ffd447 16%, #9a6b06 33%, #e0a91c 42%, #fffbe0 50%, #e0a91c 58%, #9a6b06 67%, #ffd447 83%, #9a6b06 100%);
  --frame-size: 300% 100%;
  --frame-anim: frameShine 3.2s linear infinite;
  --glow: rgba(255, 210, 0, 0.6);
  --glow-r: 13px;
}
/* PLATINUM GUARDIAN — hijau kebiruan, berdenyut */
.tier-platinum {
  --ring: #2fd6a0;
  --frame: linear-gradient(115deg, #0b6a62 0%, #38ef7d 16%, #0b6a62 33%, #19b29a 42%, #eafff4 50%, #19b29a 58%, #0b6a62 67%, #38ef7d 83%, #0b6a62 100%);
  --frame-size: 300% 100%;
  --frame-anim: frameShine 3.6s linear infinite, framePulse 2.6s ease-in-out infinite;
  --glow: rgba(56, 239, 125, 0.6);
}
/* DIAMOND VANGUARD — biru kristal, berdenyut + kilau ✦ */
.tier-diamond {
  --ring: #3ab8ff;
  --frame: linear-gradient(115deg, #0048b0 0%, #00c6ff 16%, #0048b0 33%, #0a8fe8 42%, #e6faff 50%, #0a8fe8 58%, #0048b0 67%, #00c6ff 83%, #0048b0 100%);
  --frame-size: 300% 100%;
  --frame-anim: frameShine 3s linear infinite, framePulse 2.2s ease-in-out infinite;
  --glow: rgba(0, 198, 255, 0.7);
}
/* MASTER CHAMPION — ungu berputar + mahkota */
.tier-master {
  --ring: #b86bff;
  --frame: conic-gradient(from var(--ang), #b224ef, #7579ff, #e7c2ff, #7579ff, #b224ef);
  --frame-anim: frameSpin 4s linear infinite, framePulse 2.4s ease-in-out infinite;
  --glow: rgba(178, 36, 239, 0.7);
}
/* MYTHIC LEGEND — pelangi kosmik berputar + kilau */
.tier-mythic {
  --ring: #ff6b8a;
  --frame: conic-gradient(from var(--ang), #ff0844, #ffb199, #ffd200, #b224ef, #00c6ff, #ff0844);
  --frame-anim: frameSpin 3s linear infinite, framePulse 1.8s ease-in-out infinite;
  --glow: rgba(255, 8, 68, 0.75);
  --glow-r: 12px;
}

/* lambang tier di pojok foto besar (novice - platinum) */
.rpg-avatar-box.tier-novice::after,
.rpg-avatar-box.tier-iron::after,
.rpg-avatar-box.tier-bronze::after,
.rpg-avatar-box.tier-silver::after,
.rpg-avatar-box.tier-gold::after,
.rpg-avatar-box.tier-platinum::after {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #111823;
  border: 2px solid var(--ring, #95a5a6);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}
.rpg-avatar-box.tier-novice::after { content: "🌱"; }
.rpg-avatar-box.tier-iron::after { content: "⚙️"; }
.rpg-avatar-box.tier-bronze::after { content: "🥉"; }
.rpg-avatar-box.tier-silver::after { content: "🥈"; }
.rpg-avatar-box.tier-gold::after { content: "🥇"; }
.rpg-avatar-box.tier-platinum::after { content: "💠"; }

/* ornamen (hanya di foto besar; foto header kecil dipotong overflow) */
.rpg-avatar-box.tier-master::before {
  content: "👑";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}
.rpg-avatar-box.tier-diamond::before,
.rpg-avatar-box.tier-mythic::before {
  content: "✦";
  position: absolute;
  top: -9px;
  right: -7px;
  font-size: 15px;
  line-height: 1;
  color: #e6faff;
  text-shadow: 0 0 6px #00c6ff, 0 0 12px #00c6ff;
  z-index: 3;
  pointer-events: none;
  animation: kilauBintang 1.8s ease-in-out infinite;
}
.rpg-avatar-box.tier-mythic::before {
  color: #fff3c4;
  text-shadow: 0 0 6px #ff0844, 0 0 12px #ffb199;
}
.rpg-avatar-box.tier-mythic::after {
  content: "✦";
  position: absolute;
  bottom: -8px;
  left: -7px;
  font-size: 13px;
  line-height: 1;
  color: #e9d5ff;
  text-shadow: 0 0 6px #b224ef, 0 0 12px #00c6ff;
  z-index: 3;
  pointer-events: none;
  animation: kilauBintang 1.8s ease-in-out 0.9s infinite;
}

@keyframes frameShine {
  from { background-position: 0 0, 0% 0; }
  to { background-position: 0 0, 100% 0; }
}
@keyframes frameSpin {
  to { --ang: 360deg; }
}
@keyframes framePulse {
  0%, 100% {
    box-shadow: 0 0 6px var(--glow), 0 4px 8px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 16px var(--glow), 0 0 26px var(--glow), 0 4px 8px rgba(0, 0, 0, 0.4);
  }
}
@keyframes kilauBintang {
  0%, 100% { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(20deg); }
}

/* ==========================================================
   v3.10.0 — BAR HP / SHIELD BERANIMASI
   ========================================================== */
.rpg-hp-fill {
  position: relative;
  z-index: 1;
  transition:
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.4s;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0) 55%,
    rgba(0, 0, 0, 0.14)
  );
}
.rpg-hp-fill.low {
  animation: hpKritis 1s ease-in-out infinite;
}
.rpg-hp-trail {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: rgba(255, 224, 138, 0.95);
  transition: width 0.8s ease 0.55s;
}
.rpg-shield-fill {
  position: relative;
  overflow: hidden;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0) 55%,
    rgba(0, 0, 0, 0.14)
  );
}
.rpg-shield-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: kilatPerisai 3s ease-in-out infinite;
}
.rpg-bar-outer.flash-damage { animation: barKena 0.8s ease; }
.rpg-bar-outer.flash-heal { animation: barPulih 0.9s ease; }
.rpg-bar-outer.flash-shield { animation: barPerisai 0.9s ease; }

@keyframes barKena {
  0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); transform: translateX(0); }
  15% { box-shadow: 0 0 12px 3px rgba(231, 76, 60, 0.9); transform: translateX(-3px); }
  30% { transform: translateX(3px); }
  45% { transform: translateX(-2px); }
  60% { transform: translateX(1px); }
  100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); transform: translateX(0); }
}
@keyframes barPulih {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
  30% { box-shadow: 0 0 12px 3px rgba(46, 204, 113, 0.85); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
@keyframes barPerisai {
  0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
  30% { box-shadow: 0 0 12px 3px rgba(52, 152, 219, 0.9); }
  100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
@keyframes hpKritis {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.55); }
}
@keyframes kilatPerisai {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

/* ==========================================================
   v3.10.0 — LATAR MENYESUAIKAN WAKTU
   body[data-waktu] diatur app.js (pagi 04-10 • siang 11-14 • sore 15-17 • malam 18-03)
   ========================================================== */
body[data-waktu] {
  background-size: 100% 100%;
  background-attachment: fixed;
  animation: none;
}
body[data-waktu]::before,
body[data-waktu]::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
body[data-waktu]::before {
  inset: 0;
  background-repeat: no-repeat;
}

/* PAGI — cerah hangat, matahari terbit, awan tipis */
body[data-waktu="pagi"] {
  background-image: linear-gradient(180deg, #8fd3ff 0%, #c8ecff 45%, #fff0c4 80%, #ffd9a0 100%);
}
body[data-waktu="pagi"]::before {
  background-image: radial-gradient(circle at 82% 16%, rgba(255, 244, 190, 1) 0, rgba(255, 236, 170, 0.75) 7%, rgba(255, 236, 170, 0) 30%);
}

/* SIANG — biru cerah */
body[data-waktu="siang"] {
  background-image: linear-gradient(180deg, #1f7ae8 0%, #4aa8fb 50%, #9fd6ff 100%);
}
body[data-waktu="siang"]::before {
  background-image: radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.98) 0, rgba(255, 252, 220, 0.8) 5%, rgba(255, 252, 220, 0) 24%);
}

/* SORE — jingga senja */
body[data-waktu="sore"] {
  background-image: linear-gradient(180deg, #4b3a7a 0%, #c2517a 28%, #ff7a45 58%, #ffb870 82%, #ffd89a 100%);
}
body[data-waktu="sore"]::before {
  background-image: radial-gradient(ellipse 60% 38% at 50% 92%, rgba(255, 225, 140, 0.95) 0, rgba(255, 160, 80, 0.5) 40%, rgba(255, 120, 60, 0) 75%);
}

/* awan melayang (pagi, siang, sore) */
body[data-waktu="pagi"]::after,
body[data-waktu="siang"]::after,
body[data-waktu="sore"]::after {
  top: 0;
  left: 0;
  width: 200%;
  height: 46%;
  background-size: 50% 100%;
  background-repeat: repeat-x;
  animation: awanMelayang 150s linear infinite;
}
body[data-waktu="pagi"]::after {
  background-image:
    radial-gradient(ellipse 110px 28px at 18% 24%, rgba(255, 255, 255, 0.85), transparent 72%),
    radial-gradient(ellipse 80px 20px at 30% 30%, rgba(255, 255, 255, 0.7), transparent 72%),
    radial-gradient(ellipse 130px 30px at 62% 14%, rgba(255, 255, 255, 0.75), transparent 72%),
    radial-gradient(ellipse 90px 22px at 80% 38%, rgba(255, 255, 255, 0.6), transparent 72%);
}
body[data-waktu="siang"]::after {
  background-image:
    radial-gradient(ellipse 120px 32px at 16% 22%, rgba(255, 255, 255, 0.95), transparent 72%),
    radial-gradient(ellipse 90px 24px at 28% 28%, rgba(255, 255, 255, 0.85), transparent 72%),
    radial-gradient(ellipse 140px 34px at 58% 12%, rgba(255, 255, 255, 0.9), transparent 72%),
    radial-gradient(ellipse 100px 26px at 78% 36%, rgba(255, 255, 255, 0.8), transparent 72%);
}
body[data-waktu="sore"]::after {
  background-image:
    radial-gradient(ellipse 130px 26px at 20% 40%, rgba(255, 190, 150, 0.75), transparent 72%),
    radial-gradient(ellipse 100px 20px at 34% 48%, rgba(255, 150, 120, 0.6), transparent 72%),
    radial-gradient(ellipse 150px 28px at 66% 34%, rgba(255, 200, 160, 0.7), transparent 72%),
    radial-gradient(ellipse 90px 20px at 84% 52%, rgba(255, 140, 110, 0.55), transparent 72%);
}
@keyframes awanMelayang {
  to { transform: translateX(-50%); }
}

/* MALAM — gelap berbintang + bulan */
body[data-waktu="malam"] {
  background-image: linear-gradient(180deg, #030816 0%, #0a1436 55%, #15275a 100%);
}
body[data-waktu="malam"]::before {
  background-image:
    radial-gradient(circle at 82% 13%, #fff8dc 0, #fff3c4 15px, rgba(255, 243, 196, 0.28) 17px, rgba(255, 243, 196, 0.1) 34px, rgba(255, 243, 196, 0) 60px),
    radial-gradient(1.8px 1.8px at 52.2% 80.9%, rgba(255,255,255,0.58) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 76.1% 70.7%, rgba(255,255,255,0.5) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 3.6% 39.0%, rgba(255,255,255,0.56) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 50.2% 32.4%, rgba(255,255,255,0.88) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 40.4% 99.8%, rgba(255,255,255,0.82) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 86.8% 15.9%, rgba(255,255,255,0.7) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 94.6% 21.8%, rgba(255,255,255,0.85) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 63.6% 31.6%, rgba(255,255,255,0.87) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 47.5% 99.6%, rgba(255,255,255,0.82) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 80.7% 92.1%, rgba(255,255,255,0.62) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 6.1% 75.5%, rgba(255,255,255,0.88) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 37.7% 77.7%, rgba(255,255,255,0.56) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 55.6% 95.8%, rgba(255,255,255,0.61) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 27.2% 78.9%, rgba(255,255,255,0.72) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 55.4% 55.8%, rgba(255,255,255,0.75) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 90.8% 32.6%, rgba(255,255,255,0.86) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 57.7% 28.0%, rgba(255,255,255,0.79) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 35.1% 47.2%, rgba(255,255,255,0.73) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 72.4% 31.7%, rgba(255,255,255,0.89) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 90.2% 3.0%, rgba(255,255,255,0.76) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 40.5% 73.4%, rgba(255,255,255,0.72) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 39.4% 20.4%, rgba(255,255,255,0.52) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 11.8% 22.0%, rgba(255,255,255,0.69) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 79.9% 92.1%, rgba(255,255,255,0.47) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 91.7% 10.2%, rgba(255,255,255,0.83) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 65.4% 41.0%, rgba(255,255,255,0.49) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 63.4% 24.9%, rgba(255,255,255,0.57) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 17.0% 30.2%, rgba(255,255,255,0.67) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 39.5% 49.2%, rgba(255,255,255,0.68) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 44.6% 96.8%, rgba(255,255,255,0.55) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 32.2% 19.7%, rgba(255,255,255,0.46) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 74.0% 57.2%, rgba(255,255,255,0.85) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 33.2% 58.3%, rgba(255,255,255,0.7) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 61.1% 37.4%, rgba(255,255,255,0.79) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 30.7% 36.2%, rgba(255,255,255,0.68) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 52.3% 20.0%, rgba(255,255,255,0.77) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 76.0% 45.5%, rgba(255,255,255,0.68) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 53.6% 48.0%, rgba(255,255,255,0.57) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 97.8% 82.8%, rgba(255,255,255,0.79) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 21.7% 27.4%, rgba(255,255,255,0.76) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 3.7% 47.7%, rgba(255,255,255,0.73) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 98.3% 10.8%, rgba(255,255,255,0.83) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 3.6% 54.1%, rgba(255,255,255,0.55) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 64.6% 85.2%, rgba(255,255,255,0.64) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 6.7% 54.4%, rgba(255,255,255,0.69) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 27.4% 35.4%, rgba(255,255,255,0.82) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 96.6% 41.1%, rgba(255,255,255,0.79) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 34.2% 76.0%, rgba(255,255,255,0.47) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 72.6% 29.2%, rgba(255,255,255,0.6) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 53.8% 25.1%, rgba(255,255,255,0.58) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 13.2% 25.7%, rgba(255,255,255,0.59) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 20.6% 37.2%, rgba(255,255,255,0.89) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 78.1% 16.0%, rgba(255,255,255,0.65) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 52.8% 39.5%, rgba(255,255,255,0.79) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 16.1% 56.4%, rgba(255,255,255,0.69) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 32.1% 80.5%, rgba(255,255,255,0.88) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 40.9% 62.1%, rgba(255,255,255,0.77) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 77.2% 43.3%, rgba(255,255,255,0.79) 0, transparent 100%),
    radial-gradient(1.2px 1.2px at 74.5% 80.1%, rgba(255,255,255,0.56) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 25.6% 19.9%, rgba(255,255,255,0.51) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 49.3% 43.6%, rgba(255,255,255,0.62) 0, transparent 100%),
    radial-gradient(1.1px 1.1px at 17.7% 93.2%, rgba(255,255,255,0.6) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 75.8% 32.8%, rgba(255,255,255,0.78) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 31.2% 86.5%, rgba(255,255,255,0.68) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 15.1% 11.3%, rgba(255,255,255,0.85) 0, transparent 100%),
    radial-gradient(1.6px 1.6px at 65.1% 77.6%, rgba(255,255,255,0.56) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 21.9% 86.9%, rgba(255,255,255,0.65) 0, transparent 100%),
    radial-gradient(1.3px 1.3px at 27.5% 8.8%, rgba(255,255,255,0.86) 0, transparent 100%),
    radial-gradient(1.0px 1.0px at 20.9% 32.3%, rgba(255,255,255,0.71) 0, transparent 100%),
    radial-gradient(1.4px 1.4px at 6.9% 67.8%, rgba(255,255,255,0.64) 0, transparent 100%);
}
body[data-waktu="malam"]::after {
  inset: 0;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(2.5px 2.5px at 26.4% 26.4%, rgba(255,255,255,0.99) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 74.7% 18.9%, rgba(255,255,255,0.87) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 86.8% 80.2%, rgba(255,255,255,0.93) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 38.2% 39.3%, rgba(255,255,255,0.94) 0, transparent 100%),
    radial-gradient(2.1px 2.1px at 77.6% 79.9%, rgba(255,255,255,0.89) 0, transparent 100%),
    radial-gradient(2.5px 2.5px at 64.3% 12.0%, rgba(255,255,255,0.95) 0, transparent 100%),
    radial-gradient(2.1px 2.1px at 23.3% 34.8%, rgba(255,255,255,0.97) 0, transparent 100%),
    radial-gradient(2.6px 2.6px at 68.9% 21.1%, rgba(255,255,255,0.99) 0, transparent 100%),
    radial-gradient(2.1px 2.1px at 85.1% 42.4%, rgba(255,255,255,0.88) 0, transparent 100%),
    radial-gradient(2.6px 2.6px at 96.8% 41.4%, rgba(255,255,255,0.84) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 4.0% 40.7%, rgba(255,255,255,0.85) 0, transparent 100%),
    radial-gradient(2.0px 2.0px at 4.5% 11.5%, rgba(255,255,255,0.82) 0, transparent 100%),
    radial-gradient(1.9px 1.9px at 30.0% 52.5%, rgba(255,255,255,0.86) 0, transparent 100%),
    radial-gradient(2.2px 2.2px at 38.1% 23.1%, rgba(255,255,255,0.96) 0, transparent 100%),
    radial-gradient(2.1px 2.1px at 4.0% 46.1%, rgba(255,255,255,0.98) 0, transparent 100%),
    radial-gradient(2.2px 2.2px at 70.0% 24.1%, rgba(255,255,255,0.98) 0, transparent 100%),
    radial-gradient(1.7px 1.7px at 94.2% 65.5%, rgba(255,255,255,0.87) 0, transparent 100%),
    radial-gradient(2.4px 2.4px at 47.9% 28.7%, rgba(255,255,255,0.9) 0, transparent 100%),
    radial-gradient(2.4px 2.4px at 96.9% 1.7%, rgba(255,255,255,0.82) 0, transparent 100%),
    radial-gradient(2.0px 2.0px at 51.8% 13.5%, rgba(255,255,255,0.92) 0, transparent 100%),
    radial-gradient(2.0px 2.0px at 95.0% 4.4%, rgba(255,255,255,0.82) 0, transparent 100%),
    radial-gradient(1.8px 1.8px at 73.8% 13.1%, rgba(255,255,255,0.96) 0, transparent 100%),
    radial-gradient(1.9px 1.9px at 5.6% 75.4%, rgba(255,255,255,1.0) 0, transparent 100%),
    radial-gradient(2.1px 2.1px at 11.4% 9.1%, rgba(255,255,255,0.86) 0, transparent 100%),
    radial-gradient(1.9px 1.9px at 64.1% 26.4%, rgba(255,255,255,0.8) 0, transparent 100%),
    radial-gradient(2.1px 2.1px at 9.7% 1.3%, rgba(255,255,255,0.98) 0, transparent 100%);
  animation: bintangBerkedip 4s ease-in-out infinite alternate;
}
@keyframes bintangBerkedip {
  0% { opacity: 0.35; }
  100% { opacity: 1; }
}

/* partikel: putih seperti serbuk cahaya di siang hari, emas tetap di sore/malam */
body[data-waktu="pagi"] .particle,
body[data-waktu="siang"] .particle {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .rpg-avatar-box[class*="tier-"],
  .mini-avatar[class*="tier-"],
  .rpg-avatar-box::before,
  .rpg-avatar-box::after,
  .rpg-hp-fill.low,
  .rpg-shield-fill::after,
  body[data-waktu]::after {
    animation: none !important;
  }
}

/* v3.10.2: foto kecil di header murid disembunyikan (foto & bingkai tier tetap
   tampil di tab Profil); sapaan memakai seluruh lebar. Header alumni tidak terpengaruh. */
#hasilPoinSiswa > .siswa-mini-header > .mini-avatar {
  display: none;
}

/* ========== v3.11.0 TAB GAME ========== */
.siswa-tab-btn .tab-lbl { font-size: 10.5px; }
.game-head { display: flex; gap: 10px; align-items: center; background: #111823; border: 2px solid #34495e; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.game-head-ico { font-size: 30px; }
.game-head-judul { color: #f1c40f; font-weight: 800; font-size: 15px; }
.game-head-sub { color: #94a3b8; font-size: 11px; line-height: 1.35; margin-top: 2px; }
.game-tutup { background: rgba(231, 76, 60, 0.15); border: 1.5px solid #e74c3c; color: #ffb4a9; border-radius: 12px; padding: 9px 12px; font-size: 12px; font-weight: 600; margin-bottom: 10px; text-align: center; }
.game-daftar { display: grid; gap: 12px; }
.game-daftar.game-terkunci { opacity: 0.5; filter: grayscale(0.6); }
.game-kartu { background: #1a2536; border: 2px solid #34495e; border-radius: 16px; overflow: hidden; transition: transform 0.15s, border-color 0.2s; }
.game-kartu:not(.game-segera):hover { border-color: #f1c40f; }
.game-banner { height: 92px; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 44px; position: relative; overflow: hidden; }
.gb-ttt { background: radial-gradient(circle at 30% 20%, #3b5b8c, transparent 60%), linear-gradient(135deg, #14233b, #2a1a2e); }
.gb-ttt span:first-child { animation: gameAyun 2.6s ease-in-out infinite; display: inline-block; }
.gb-ttt span:last-child { animation: gameAyun 2.6s ease-in-out 0.4s infinite; display: inline-block; }
.gb-vs { font-size: 20px; font-weight: 800; color: #e74c3c; text-shadow: 0 0 12px #e74c3c; }
.gb-soon { background: linear-gradient(135deg, #1b2433, #151c28); color: #475569; }
@keyframes gameAyun { 50% { transform: translateY(-6px) rotate(-6deg); } }
.game-isi { padding: 12px; display: grid; gap: 7px; }
.game-nama { color: #fff; font-weight: 800; font-size: 14.5px; }
.game-ket { color: #94a3b8; font-size: 11.5px; line-height: 1.4; }
.game-tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.game-tag { font-size: 10px; font-weight: 600; color: #cbd5e1; background: #111823; border: 1px solid #34495e; border-radius: 20px; padding: 2px 8px; }
.game-main { margin-top: 4px; width: 100%; border: none; border-radius: 12px; padding: 11px; font-weight: 800; font-size: 13px; letter-spacing: 0.5px; color: #111823; background: linear-gradient(135deg, #f1c40f, #d4ac0d); box-shadow: 0 3px 0 #8a6d03; cursor: pointer; }
.game-main:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a6d03; }
.game-main:disabled { background: #2b3647; color: #64748b; box-shadow: none; cursor: default; }

/* ========== v3.12.0 TAB ONLINE GURU ========== */
.online-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.online-wrap .online-chip { max-width: 100%; }
.online-grup { margin-top: 10px; }
.online-grup-judul { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: 0.4px; }
.online-grup-judul b { color: #2ecc71; margin-left: 4px; }
.online-chip.guru { border-color: #f1c40f66; padding-right: 12px; }
.online-chip.guru img { width: 28px; height: 28px; }
.online-chip.guru .nm { display: flex; flex-direction: column; line-height: 1.2; }
.online-chip.guru .nm small { font-size: 9.5px; color: #94a3b8; font-weight: 500; }

/* v3.14.1: versi "pudar" untuk perangkat dengan pengaturan kurangi gerakan */
.afm-teks.keluar.pudar { animation: afmPudarKeluar 0.6s ease forwards; }
.afm-teks.masuk.pudar { animation: afmPudarMasuk 0.6s ease both; }
@keyframes afmPudarKeluar { to { opacity: 0; transform: translateY(-6px); } }
@keyframes afmPudarMasuk { from { opacity: 0; transform: translateY(8px); } }


/* v3.15.0 — Tab Pratinjau (Super Admin) */
.pv-card { background:#f8f9fa; border:1px solid #e1e8f0; border-radius:10px; padding:12px; margin-bottom:12px; }
.pv-judul { font-size:13px; color:#1e3c72; margin:0 0 2px; }
.pv-ket { font-size:11px; color:#6b7a8c; margin:0 0 10px; }
.pv-row { display:flex; flex-wrap:wrap; gap:6px; }
.pv-btn { margin:0; flex:1; min-width:70px; padding:8px 6px; font-size:11px; background:#fff; color:#1e3c72; border:1px solid #1e3c72; border-radius:8px; cursor:pointer; }
.pv-btn.aktif { background:#1e3c72; color:#fff; }
.pv-tier-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px 8px; padding:12px 4px 4px; }
.pv-tier-item { display:flex; flex-direction:column; align-items:center; gap:7px; cursor:pointer; background:none; border:0; padding:0; margin:0; }
.pv-tier-item .rpg-avatar-box { overflow:visible; }
.pv-tier-item img { width:100%; height:100%; object-fit:cover; border-radius:4px; }
.pv-tier-nama { font-size:9px; font-weight:700; color:#1e3c72; text-align:center; line-height:1.2; }
.pv-tier-besar { display:none; margin-top:14px; padding:14px; background:#111823; border-radius:10px; text-align:center; }
.pv-tier-besar.tampak { display:block; }
.pv-tier-besar .rpg-avatar-box { width:110px; height:110px; margin:10px auto; }
.pv-tier-besar img { width:100%; height:100%; object-fit:cover; border-radius:4px; }
.pv-label { display:block; font-size:11px; color:#34495e; margin:8px 0 2px; }
#adminTabPratinjau input[type=range] { width:100%; padding:0; margin:0; }


/* v3.15.0 — Halaman admin */
#adminCard .admin-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
#adminCard .admin-nav::-webkit-scrollbar { display: none; }
#adminCard .admin-nav button { flex: 0 0 auto; min-width: 0; padding: 7px 11px; white-space: nowrap; position: relative; }

.rk-ringkas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.rk-kartu { margin: 0; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; color: #1e3c72; border: 1px solid #e2e8f0; border-top: 3px solid #1e3c72; border-radius: 8px; cursor: pointer; box-shadow: none; }
.rk-kartu .rk-angka { font-size: 17px; font-weight: 800; line-height: 1.1; }
.rk-kartu .rk-label { font-size: 8px; font-weight: 700; color: #64748b; text-align: center; line-height: 1.15; }
.rk-hijau { border-top-color: #2ecc71; } .rk-merah { border-top-color: #e74c3c; }
.rk-oranye { border-top-color: #e67e22; } .rk-biru { border-top-color: #3498db; }
.rk-kartu.aktif { background: #1e3c72; }
.rk-kartu.aktif .rk-angka, .rk-kartu.aktif .rk-label { color: #fff; }
.rk-kontrol { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin-bottom: 6px; }
.rk-kontrol input { margin: 0; padding: 7px 10px; font-size: 12px; min-width: 0; }
.rk-kontrol .admin-filter-select { padding: 6px 4px; }
.rk-info { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #64748b; margin: 4px 2px; }
.rk-salin { flex: 0 0 auto; min-width: 0; padding: 5px 9px; }
.rk-scroll { max-height: 60vh; overflow-y: auto; padding: 0 10px 10px; }
.rk-scroll .rekap-table { margin-top: 0; }
.rk-scroll .rekap-table th { position: sticky; top: 0; z-index: 1; box-shadow: 0 1px 0 #e2e8f0; }
.rk-kosong { text-align: center; color: #94a3b8; padding: 20px 0; font-size: 11px; }
.rk-tanda { font-size: 10px; margin-left: 3px; }
.rk-nisn { display: block; font-size: 9px; color: #94a3b8; }

.adm-riwayat { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.adm-riwayat-item { background: #fff; border: 1px solid #e2e8f0; border-left: 3px solid #1e3c72; border-radius: 6px; padding: 6px 8px; font-size: 10.5px; color: #334155; text-align: left; }
.adm-riwayat-item b { color: #1e3c72; }
.adm-riwayat-item small { display: block; color: #94a3b8; font-size: 9px; margin-top: 2px; }
.adm-riwayat-item.merah { border-left-color: #e74c3c; }
.adm-kunci-input { width: 100%; margin: 10px 0 0; padding: 10px; font-size: 14px; text-align: center; letter-spacing: 2px; text-transform: uppercase; border-radius: 8px; border: 2px solid #475569; background: #0f172a; color: #fff; box-sizing: border-box; }
.adm-kunci-input.cocok { border-color: #2ecc71; }
#adminCard .admin-nav button { width: auto; }
.rk-salin { width: auto; margin: 0; }
.rk-kartu { width: auto; }

.rk-galat { background:#fff5f5; border:1px solid #f5b7b1; border-left:4px solid #e74c3c; color:#922b21; border-radius:8px; padding:10px 12px; margin-bottom:10px; font-size:11px; line-height:1.5; text-align:left; }
.rk-galat code { background:#fdecea; padding:0 4px; border-radius:3px; }

/* kredit sumber data cuaca (syarat penggunaan Open-Meteo) */
.credit-cuaca {
  display: block; text-align: center; margin: 2px 0 0 0;
  font-size: 9px; color: rgba(148, 163, 184, 0.75); text-decoration: none;
}
.pv-input { padding: 6px 8px; border-radius: 6px; border: 1px solid #cbd5e1; font-size: 12px; width: auto; }
