*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brown-dark: #3D2B1F;
  --brown-mid: #5C3D2E;
  --brown-light: #8B7355;
  --gold: #FFD700;
  --gold-dark: #C8A600;
  --cream: #F5E6C8;
  --cream-light: #FAF0DC;
  --bg: #F2F2F2;
  --white: #FFFFFF;
  --text-dark: #2D1B0E;
  --text-muted: #6B5744;

  --sidebar-w: 200px;
  --topbar-h: 52px;
}

html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
}

body {
  display: flex;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--brown-dark) 0%, #2A1A10 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-top {
  padding: 1.25rem 0.85rem 1rem;
}

.sidebar-brand h1 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.sidebar-brand .highlight {
  color: var(--gold);
}

/* Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.75rem 0.6rem 0.3rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-item.active {
  background-color: rgba(255, 215, 0, 0.12);
  color: var(--white);
  border-left-color: var(--gold);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.user-info {
  min-width: 0;
}

.user-name {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-settings {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.btn-settings svg {
  width: 18px;
  height: 18px;
}

.btn-settings:hover {
  color: var(--white);
}

/* ========================================
   MAIN AREA
   ======================================== */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-bottom: 1px solid #E5E5E5;
  flex-shrink: 0;
}

.page-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.hamburger {
  display: none;
}

/* Content grid */
.content {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}

/* Cards */
.card {
  background-color: var(--cream-light);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid rgba(139, 115, 85, 0.15);
}

.card-instruksi h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.card-instruksi ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.card-instruksi ol li {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-dark);
}

/* Clock card */
.card-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.clock-date {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.clock-time {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -1px;
}

.clock-ampm {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ========================================
   OVERLAY (mobile)
   ======================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 90;
}

.sidebar-overlay.show {
  display: block;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet: stack cards */
@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
  }

  .card-clock {
    padding: 1.5rem;
  }

  .clock-time {
    font-size: 2.75rem;
  }
}

/* Mobile: sidebar off-canvas */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-right: 0.75rem;
  }

  .hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.2s ease;
  }

  .content {
    padding: 1rem;
    gap: 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card-instruksi h3 {
    font-size: 0.88rem;
  }

  .card-instruksi ol li {
    font-size: 0.78rem;
  }

  .clock-date {
    font-size: 1rem;
  }

  .clock-time {
    font-size: 2.25rem;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .topbar {
    padding: 0 1rem;
  }

  .page-title {
    font-size: 0.9rem;
  }

  .content {
    padding: 0.75rem;
  }

  .card {
    padding: 1rem;
  }
}

/* Logout Popup */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: var(--cream-light);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  text-align: center;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-box p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.modal-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.modal-yes {
  background: var(--brown-dark);
  color: var(--white);
}

.modal-yes:hover {
  background: var(--brown-mid);
}

.modal-no {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--brown-light);
}

.modal-no:hover {
  background: rgba(139, 115, 85, 0.1);
}

/* Instrumen Pemantauan */
.content-stack {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card heading, kartu keterangan di atas */
.card-heading {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--cream);
  border: none;
}

.heading-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brown-dark);
  flex-shrink: 0;
  min-width: 180px;
}

.heading-divider {
  width: 2px;
  align-self: stretch;
  background-color: var(--brown-dark);
  opacity: 0.4;
}

.heading-desc {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-dark);
  line-height: 1.5;
}

/* Card upload, form pilih file */
.card-upload {
  background-color: var(--cream);
  border: none;
  padding: 1rem 1.5rem;
}

.upload-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 0;
  flex-shrink: 0;
  min-width: 180px;
}

.upload-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem
}

.upload-filename {
  flex: 1;
  background-color: var(--white);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-filename.has-file {
  color: var(--brown-dark);
}

.file-input-hidden {
  display: none;
}

/* Buttons */
.btn {
  padding: 0.55rem 1.5rem;
  border: none;
  border-radius: 100px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-pilih {
  background-color: #2f2f2f;
  color: var(--white);
}

.btn-pilih:hover {
  background-color: #6F5B42;
}

.btn-kirim {
  background-color: var(--brown-dark);
  color: var(--white);
}

.btn-kirim:hover {
  background-color: var(--brown-mid);
}

.btn-hapus {
  background-color: #D32F2F;
  color: var(--white);
  padding: 0.4rem 1.25rem;
  font-size: 0.8rem;
}

.btn-hapus:hover {
  background-color: #B71C1C;
}

/* Card list, container list file */
.card-list {
  background-color: var(--cream);
  border: none;
  padding: 1.5rem;
  min-height: 400px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.card-list .list-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

/* Baris kepala kotak list: judul di kiri, tombol unduh di kanan */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.card-list .list-head .list-title {
  margin-bottom: 0;
}

/* Tombol unduh Excel, warnanya nyamain tombol aksi coklat yang lain */
.btn-unduh {
  background-color: var(--brown-light);
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  padding: 0.45rem 1.25rem;
  font-size: 0.8rem;
}

.btn-unduh:hover {
  background-color: var(--brown-mid);
}

@media (max-width: 600px) {
  .list-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Inner card (white) dengan scroll */
.list-scroll {
  background-color: var(--white);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Modifier: kotak tumbuh mengikuti konten, halaman yang scroll (bukan kotak) */
.card-list--grow {
  max-height: none;
}

.list-scroll--grow {
  overflow-y: visible;
}

/* Custom scrollbar */
.list-scroll::-webkit-scrollbar {
  width: 8px;
}

.list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.list-scroll::-webkit-scrollbar-thumb {
  background: rgba(61, 43, 31, 0.2);
  border-radius: 4px;
}

.list-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(61, 43, 31, 0.4);
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(61, 43, 31, 0.1);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-dark);
  text-decoration: none;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-name:hover {
  text-decoration: underline;
}

.list-item-actions {
  margin: 0;
  flex-shrink: 0;
}

.list-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

/* Flash messages */
.flash-msg {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.flash-error {
  background-color: #FEE2E2;
  color: #991B1B;
  border-left: 3px solid #DC2626;
}

.flash-success {
  background-color: #DCFCE7;
  color: #166534;
  border-left: 3px solid #16A34A;
}

/* Responsive */
@media (max-width: 900px) {
  .card-heading,
  .card-upload {
    flex-wrap: wrap;
  }

  .heading-title,
  .upload-label {
    min-width: auto;
  }

  .heading-divider {
    display: none;
  }

  .upload-form {
    flex-wrap: wrap;
    width: 100%;
  }

  .upload-filename {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .content-stack {
    padding: 1rem;
  }

  .upload-form .btn {
    flex: 1;
  }

  .list-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .list-item-name {
    flex: 1 1 100%;
  }
}

/* Dokumen Sekolah */
.dok-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(61, 43, 31, 0.1);
}

.dok-item:last-child {
  border-bottom: none;
}

.dok-info {
  flex: 1;
  min-width: 0;
}

.dok-actions {
  flex-shrink: 0;
}

/* Text styles dalam item */
.dok-judul {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.15rem;
}

.dok-meta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.15rem;
}

.dok-meta a {
  color: var(--brown-dark);
  text-decoration: none;
}

.dok-meta a:hover {
  text-decoration: underline;
}

.dok-filename {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.25rem;
}

.dok-tanggal {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Button Unduh hijau */
.btn-unduh {
  background-color: #15803D;
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  padding: 0.45rem 1.5rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-unduh:hover {
  background-color: #14532D;
}

.btn-unduh:active {
  transform: scale(0.98);
}

/* Responsive */
@media (max-width: 600px) {
  .dok-item {
    flex-wrap: wrap;
  }

  .dok-actions {
    width: 100%;
  }

  .btn-unduh {
    width: 100%;
    text-align: center;
  }
}

/* Instrumen */
.list-item span.list-item-name {
  color: var(--brown-dark);
  text-decoration: none;
  cursor: default;
  font-weight: 700;
}

.list-item span.list-item-name:hover {
  text-decoration: none;
}

/* Unggah Dokumen */
.card-upload-form {
  background-color: var(--cream);
  border: none;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-upload-form .upload-label {
  margin-bottom: 0;
  min-width: auto;
}

/* Form grid */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-row-full {
  align-items: flex-start;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-dark);
  min-width: 90px;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  background-color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-dark);
  outline: none;
}

.form-input:focus {
  box-shadow: 0 0 0 2px rgba(61, 43, 31, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Form row khusus untuk file picker + buttons */
.form-row-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.form-row-file .upload-filename {
  flex: 1;
}

/* Responsive */
@media (max-width: 700px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .form-label {
    min-width: auto;
  }

  .form-row-file {
    flex-wrap: wrap;
  }

  .form-row-file .upload-filename {
    flex: 1 1 100%;
  }

  .form-row-file .btn {
    flex: 1;
  }
}

/* ========================================
   PROFIL PENGAWAS PAGE
   ======================================== */

/* Card profil, foto + info side by side */
.card-profil {
  background-color: var(--cream);
  border: none;
  padding: 2rem;
}

.profil-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Foto section */
.profil-foto-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.profil-foto-box {
  width: 200px;
  height: 200px;
  background-color: var(--white);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(61, 43, 31, 0.15);
}

.profil-foto-icon {
  width: 80px;
  height: 80px;
  color: var(--text-dark);
  opacity: 0.5;
}

.btn-unggah-foto {
  background-color: var(--brown-light);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 100px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-unggah-foto:hover:not(:disabled) {
  background-color: var(--brown-mid);
}

.btn-unggah-foto:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Info section */
.profil-info {
  flex: 1;
  min-width: 0;
}

.profil-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 1rem;
}

.profil-field {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.5rem;
}

/* ========================================
   CARD GAME (PLACEHOLDER V2)
   ======================================== */

.card-game-wrapper {
  background-color: var(--cream);
  border: none;
  padding: 1.5rem;
}

.card-game-inner {
  background-color: var(--white);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.game-icon-box {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-icon {
  width: 80px;
  height: 80px;
  color: var(--brown-dark);
}

.game-info {
  flex: 1;
  min-width: 0;
}

.game-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 0.4rem;
}

.game-desc {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brown-dark);
  line-height: 1.5;
}

.game-divider {
  width: 2px;
  align-self: stretch;
  background-color: var(--gold-dark);
  opacity: 0.6;
  flex-shrink: 0;
}

.game-action {
  flex-shrink: 0;
}

.btn-mainkan {
  background-color: var(--brown-light);
  color: var(--white);
  padding: 0.65rem 2rem;
  border: none;
  border-radius: 100px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-mainkan:hover:not(:disabled) {
  background-color: var(--brown-mid);
}

.btn-mainkan:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet & mobile, stack vertical */
@media (max-width: 700px) {
  .card-profil {
    padding: 1.5rem;
  }

  .profil-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .profil-foto-box {
    width: 160px;
    height: 160px;
  }

  .profil-info {
    width: 100%;
    text-align: center;
  }

  .profil-title {
    font-size: 1.25rem;
  }

  .profil-field {
    font-size: 0.88rem;
    text-align: left;
  }

  /* Game card, stack di mobile */
  .card-game-inner {
    flex-direction: column;
    padding: 1.25rem;
    text-align: center;
  }

  .game-icon-box {
    width: 70px;
    height: 70px;
  }

  .game-icon {
    width: 60px;
    height: 60px;
  }

  .game-divider {
    display: none;
  }

  .btn-mainkan {
    width: 100%;
  }
}

/* ========================================
   PROFIL PENGAWAS, SEKOLAH VIEW additions
   ======================================== */

/* Info full-width untuk sekolah-view */
.profil-info-full {
  padding: 0.5rem 0;
}

.profil-info-full .profil-title {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.profil-info-full .profil-field {
  font-size: 0.95rem;
}

/* Sekolah Binaan items, beda dari list-item biasa */
.binaan-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(61, 43, 31, 0.15);
}

.binaan-item:last-child {
  border-bottom: none;
}

.binaan-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 0.5rem;
}

.binaan-field {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 700px) {
  .profil-info-full .profil-title {
    font-size: 1.15rem;
  }

  .profil-info-full .profil-field {
    font-size: 0.85rem;
  }

  .binaan-name {
    font-size: 0.9rem;
  }

  .binaan-field {
    font-size: 0.8rem;
  }
}

/* ========================================
   PROFIL SEKOLAH BINAAN PAGE
   ======================================== */

/* Nama sekolah biru clickable */
.binaan-name-link {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #2462EB;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
}

.binaan-name-link:hover {
  color: #1D4FC4;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 700px) {
  .binaan-name-link {
    font-size: 1rem;
  }
}

/* ========================================
   SEARCH FORM
   ======================================== */

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
  margin-bottom: 0.5rem;
}

.search-input {
  flex: 1;
  background-color: var(--white);
  border: 1px solid rgba(139, 115, 85, 0.25);
  border-radius: 100px;
  padding: 0.55rem 1.25rem 0.55rem 2.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-dark);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;

  /* Icon kaca pembesar via background SVG */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B5744' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.85rem center;
  background-size: 16px 16px;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-input:focus {
  border-color: var(--brown-light);
  box-shadow: 0 0 0 2px rgba(61, 43, 31, 0.12);
}

.btn-search {
  background-color: var(--brown-dark);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 0.55rem 1.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}

.btn-search:hover {
  background-color: var(--brown-mid);
}

.btn-search:active {
  transform: scale(0.98);
}

/* Responsive */
@media (max-width: 600px) {
  .search-form {
    max-width: 100%;
  }

  .search-input {
    font-size: 0.8rem;
    padding: 0.5rem 1rem 0.5rem 2.25rem;
  }

  .btn-search {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* ========================================
   KATEGORI MENU (Dokumen Sekolah, Unggah Dokumen)
   ======================================== */

.kategori-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(61, 43, 31, 0.15);
}

.kategori-item:last-child {
  border-bottom: none;
}

.kategori-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brown-dark);
  flex: 1;
}

/* Button Buka */
.btn-buka {
  background-color: var(--brown-light);
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  padding: 0.45rem 1.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}

.btn-buka:hover {
  background-color: var(--brown-mid);
}

.btn-buka:active {
  transform: scale(0.98);
}

/* Responsive */
@media (max-width: 600px) {
  .kategori-name {
    font-size: 0.9rem;
  }

  .btn-buka {
    padding: 0.4rem 1.25rem;
    font-size: 0.75rem;
  }
}

/* ========================================
   DETAIL TOPBAR (Back button + Search)
   ======================================== */

.detail-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.detail-topbar .search-form {
  flex: 1;
  margin-bottom: 0;
}

/* Back button di halaman detail (panah kiri, bundar, hover coklat) */
.btn-back-detail {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  border: 1px solid rgba(139, 115, 85, 0.25);
  border-radius: 50%;
  color: var(--brown-dark);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  padding: 0;
}

.btn-back-detail:hover {
  background-color: var(--cream);
  border-color: var(--brown-light);
  transform: translateX(-2px);
}

.btn-back-detail svg {
  width: 18px;
  height: 18px;
}

/* Responsive */
@media (max-width: 600px) {
  .btn-back-detail {
    width: 34px;
    height: 34px;
  }

  .btn-back-detail svg {
    width: 16px;
    height: 16px;
  }
}

/* ========================================
   CAROUSEL SECTION (Dashboard)
   ======================================== */

.carousel-section {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.carousel-card {
  background-color: var(--cream);
  border: none;
  padding: 1.5rem;
}

.carousel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.carousel-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--cream-light);
  border: 1.5px solid rgba(61, 43, 31, 0.5);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

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

.carousel-placeholder {
  width: 80px;
  height: 80px;
  color: var(--brown-dark);
  opacity: 0.4;
}

/* Delete button overlay */

.btn-carousel-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;                          /* di atas foto */
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(220, 38, 38, 0.95);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.9);   /* border putih biar visible di foto gelap */
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background-color 0.15s ease, transform 0.05s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);    /* shadow biar pop out */
}

.btn-carousel-delete:hover {
  background-color: rgba(185, 28, 28, 1);
  transform: scale(1.1);
}

.btn-carousel-delete:active {
  transform: scale(0.95);
}

/* Upload button */
.carousel-upload-form {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.85rem;
}

.btn-unggah-foto-carousel {
  background-color: var(--brown-light);
  color: var(--white);
  padding: 0.65rem 2rem;
  border: none;
  border-radius: 100px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-unggah-foto-carousel:hover {
  background-color: var(--brown-mid);
}

.btn-unggah-foto-carousel:active {
  transform: scale(0.98);
}

/* Responsive */
@media (max-width: 900px) {
  .carousel-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .carousel-frame:nth-child(3) {
    display: none; /* hide third frame di tablet */
  }
}

@media (max-width: 600px) {
  .carousel-section {
    padding: 0 1rem 1rem;
  }
  
  .carousel-grid {
    grid-template-columns: 1fr;
  }
  
  .carousel-frame:nth-child(2),
  .carousel-frame:nth-child(3) {
    display: none; /* mobile: 1 frame aja */
  }
  
  .carousel-placeholder {
    width: 60px;
    height: 60px;
  }
  
  .btn-unggah-foto-carousel {
    width: 100%;
  }
}

/* ========================================
   SUPER ADMIN
   ======================================== */

.super-admin-subnav {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1.5px solid rgba(61, 43, 31, 0.2);
}

.subnav-link {
  text-decoration: none;
  color: var(--brown-mid);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.subnav-link:hover {
  background-color: var(--cream-light);
}

.subnav-link.active {
  background-color: var(--brown-dark);
  color: var(--white);
}

.super-admin-table-wrapper {
  padding: 1.5rem;
  overflow-x: auto;
}

.super-admin-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--cream);
  border-radius: 16px;
  overflow: hidden;
}

.super-admin-table thead {
  background-color: var(--brown-dark);
  color: var(--white);
}

.super-admin-table th,
.super-admin-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
}

.super-admin-table tbody tr {
  border-bottom: 1px solid rgba(61, 43, 31, 0.1);
}

.super-admin-table tbody tr:last-child {
  border-bottom: none;
}

.super-admin-table tbody tr:hover {
  background-color: var(--cream-light);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-active {
  background-color: #d1fae5;
  color: #065f46;
}

.status-inactive {
  background-color: #fee2e2;
  color: #991b1b;
}

.action-cell {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-toggle-active,
.btn-toggle-game,
.btn-reassign,
.btn-toggle-sekolah,
.btn-toggle-guru,
.btn-lihat-guru {
  background-color: var(--brown-light);
  color: var(--white);
  text-decoration: none;
  display: inline-block;
}

.btn-toggle-active:hover,
.btn-toggle-game:hover,
.btn-reassign:hover,
.btn-toggle-sekolah:hover,
.btn-toggle-guru:hover,
.btn-lihat-guru:hover {
  background-color: var(--brown-mid);
}

/* Reset password = aksi sensitif, merah biar beda dari aksi admin lain */
.btn-reset-password {
  background-color: #c0392b;
  color: var(--white);
  text-decoration: none;
  display: inline-block;
}

.btn-reset-password:hover {
  background-color: #96281b;
}

.btn-action:active {
  transform: scale(0.97);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--brown-mid);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ========================================
   SUPER ADMIN - CONFIG
   ======================================== */

.config-section {
  padding: 1.5rem;
}

.config-card {
  background-color: var(--cream);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.config-info {
  flex: 1;
}

.config-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin: 0 0 0.5rem 0;
}

.config-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--brown-mid);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.config-status {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--brown-dark);
  margin: 0;
}

.config-action {
  flex-shrink: 0;
}

.btn-toggle-config {
  background-color: var(--brown-light);
  color: var(--white);
  padding: 0.65rem 1.5rem;
}

.btn-toggle-config:hover {
  background-color: var(--brown-mid);
}

/* Responsive */
@media (max-width: 700px) {
  .config-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .config-action {
    width: 100%;
  }
  
  .btn-toggle-config {
    width: 100%;
  }
}

/* ========================================
   MODAL CONFIG
   ======================================== */
   .modal-box-confirm {
  max-width: 480px;
}

.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin: 0 0 0.75rem 0;
}

.modal-message {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--brown-mid);
  margin: 0 0 1.25rem 0;
  line-height: 1.5;
}

.reassign-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reassign-select {
  width: 100%;
  padding: 0.65rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid rgba(61, 43, 31, 0.3);
  border-radius: 12px;
  background-color: var(--cream-light);
  color: var(--brown-dark);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233D2B1F' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.reassign-select:focus {
  outline: none;
  border-color: var(--brown-dark);
}

/* ========================================
   EDIT DOKUMEN
   ======================================== */

.dok-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dok-action-form {
  margin: 0;
  display: inline-block;
}

.modal-box-edit {
  max-width: 600px;
  width: 90%;
  padding: 32px;
}

.modal-box-edit .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
  color: #5d4e3a;
}

.modal-box-edit .edit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-box-edit .form-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: center;
}

.modal-box-edit .form-row-full {
  grid-template-columns: 100px 1fr;
  align-items: start;
}

.modal-box-edit .form-label {
  font-weight: 500;
  text-align: right;
}

.modal-box-edit .form-input {
  padding: 10px 14px;
  border: 1px solid #d4c8b0;
  border-radius: 6px;
  font-size: 0.95rem;
  width: 100%;
}

.modal-box-edit .form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.modal-box-edit .modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ========================================
   FOTO PROFIL
   ======================================== */

.profil-foto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;            /* eliminate inline gap */
}

.profil-foto-box {
  /* properties existing lu (background, border-radius, dll) */
  overflow: hidden;          /* PENTING, clip konten yang keluar */
  position: relative;        /* defensive */
}

/* ========================================
   SIZING FOTO
   ======================================== */

.modal-box-crop {
  max-width: 600px;
  width: 90%;
  padding: 32px;
}

.modal-box-crop .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #5d4e3a;
}

.crop-container {
  max-width: 100%;
  max-height: 400px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.crop-container img {
  max-width: 100%;
  max-height: 400px;
  display: block;
}

.modal-box-crop .modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Cropper.js wraps img, pastikan canvas Cropper juga constrained */
.crop-container .cropper-container {
  max-width: 100%;
  max-height: 400px;
}

/* ========================================
   USERNAME
   ======================================== */

.profil-username {
  font-weight: 650;
  color: #000000;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
/* ========================================
   Dashboard berisi data (sapaan, quick link,
   banner, progres, dsb, dipakai 3 role)
   ======================================== */

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

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

.sapaan-text h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brown-dark);
}

.sapaan-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background-color: var(--brown-light);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.quick-link:hover {
  background-color: var(--brown-mid);
}

/* Banner full-width di atas .content (absensi belum diisi / notice nonaktif) */
.dash-banner {
  margin: 1.5rem 1.5rem 0;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  background-color: var(--cream);
  border: 1px solid var(--gold-dark);
}

/* Switcher role di banner mode guest */
.guest-switch {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
}

.guest-switch a {
  color: var(--text-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guest-switch a:hover {
  color: var(--brown-mid);
}

/* Kotak Statistik Portal di dashboard (semua akun) */
.stat-portal-desc {
  font-size: 0.82rem;
  color: var(--text-dark);
  opacity: 0.7;
  margin-bottom: 0.6rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(139, 115, 85, 0.15);
}

.stat-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-row-label {
  font-size: 0.88rem;
  color: var(--text-dark);
}

.stat-row-angka {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.dash-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.85rem;
}

.progres-bar {
  height: 8px;
  border-radius: 4px;
  background-color: rgba(139, 115, 85, 0.2);
  overflow: hidden;
  margin: 0.5rem 0 0.85rem;
}

.progres-bar-fill {
  height: 100%;
  background-color: var(--gold-dark);
}

.progres-teks {
  font-size: 0.85rem;
  color: var(--text-dark);
}

.progres-teks + .progres-teks {
  margin-top: 0.35rem;
}

/* Margin banner ikut padding .content di breakpoint kecil */
@media (max-width: 768px) {
  .dash-banner {
    margin: 1rem 1rem 0;
  }
}

@media (max-width: 400px) {
  .dash-banner {
    margin: 0.75rem 0.75rem 0;
  }
}

/* ================= Ganti Password ================= */

/* Checklist aturan password */
.pw-rules {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pw-rule {
  position: relative;
  padding-left: 1.5rem;
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-dark);
  opacity: 0.7;
}

.pw-rule::before {
  content: "\2715"; /* ✕ */
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #c0392b;
}

.pw-rule.ok {
  opacity: 1;
}

.pw-rule.ok::before {
  content: "\2713"; /* ✓ */
  color: #2e7d32;
}

.btn-kirim:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal reset password (panel admin) */
.reset-pw-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.reset-pw-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.5;
}

/* Sort & filter tabel panel admin */
.th-sort {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.th-sort:hover {
  color: var(--gold);
}

.th-sort-arah {
  font-size: 0.7rem;
}

.filter-select {
  background-color: var(--white);
  border: 1px solid rgba(139, 115, 85, 0.25);
  border-radius: 100px;
  padding: 0.55rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-dark);
  outline: none;
  cursor: pointer;
}

/* Link logout di topbar base polos */
.btn-logout-polos {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brown-mid);
  text-decoration: none;
}

.btn-logout-polos:hover {
  text-decoration: underline;
}

/* ========================================
   PASSWORD VISIBILITY TOGGLE (halaman ganti password)
   ======================================== */

/* Wrapper untuk input password + icon mata */
.password-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.password-wrapper .form-input {
  padding-right: 2.75rem; /* ruang buat icon */
}

/* Icon toggle (mata) */
.password-toggle {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: var(--brown-dark);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Hide salah satu icon tergantung state */
.password-toggle .icon-show {
  display: block;
}

.password-toggle .icon-hide {
  display: none;
}

.password-toggle.visible .icon-show {
  display: none;
}

.password-toggle.visible .icon-hide {
  display: block;
}

/* ========================================
   PEMANTAUAN: UMPAN BALIK KBM
   Dipakai halaman sekolah (pemantauan.html), form tambah/edit
   (umpan-balik-form.html), dan halaman pengawas (pemantauan-binaan-detail.html).
   ======================================== */
.ub-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* --- Penyaring rentang tanggal + cari --- */
.ub-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  background-color: var(--white);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ub-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ub-filter-cari {
  flex: 1 1 220px;
}

.ub-filter-aksi {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-search-reset {
  background-color: var(--brown-light);
  text-decoration: none;
  display: inline-block;
}

/* --- Kartu hasil (collapsible) --- */
.ub-card {
  background-color: var(--white);
  border: 1px solid #E5E0D5;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.ub-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
}

.ub-judul {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.ub-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.ub-head-kanan {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ub-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.ub-badge-hadir {
  background-color: #E3F2E5;
  color: #2E7D32;
}

.ub-badge-absen {
  background-color: #FBE4E4;
  color: #C62828;
}

.btn-buka-ub {
  background-color: var(--brown-dark);
  color: var(--cream);
  border: none;
  border-radius: 100px;
  padding: 0.4rem 1.2rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-buka-ub:hover {
  background-color: var(--brown-mid);
}

.ub-detail {
  display: none;
  padding: 0 1.1rem 1rem;
  border-top: 1px solid #F0ECE2;
}

.ub-detail.show {
  display: block;
}

.ub-baris {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
  padding: 0.55rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #F7F4EC;
}

.ub-label {
  flex: 0 0 180px;
  font-weight: 700;
  color: var(--brown-mid);
}

.ub-isi {
  flex: 1 1 200px;
  color: var(--text-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.ub-chip {
  background-color: var(--cream);
  color: var(--brown-mid);
  border-radius: 100px;
  padding: 0.15rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.ub-chip-lain {
  background-color: #EFEAE0;
  font-style: italic;
}

.ub-waktu-input {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ub-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.btn-edit-ub {
  background-color: var(--brown-light);
  color: var(--white);
  text-decoration: none;
  display: inline-block;
}

/* --- Form tambah/edit --- */
.ub-field {
  margin-bottom: 1.4rem;
}

.ub-field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.ub-field-label .req {
  color: #C62828;
}

.ub-sub-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0.45rem;
}

.ub-opsi-baris {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ub-opsi-kolom {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ub-opsi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
}

.ub-opsi {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--white);
  border: 1.5px solid #D8CDB8;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.ub-opsi:hover {
  border-color: var(--brown-light);
}

.ub-opsi input {
  accent-color: var(--brown-mid);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.ub-opsi input:disabled {
  cursor: not-allowed;
}

/* Pilihan yang dimatikan karena "Tidak Ada" dicentang */
.ub-opsi:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.ub-jam-baris {
  display: flex;
  gap: 0.6rem;
}

.ub-jam-baris .form-input {
  flex: 1 1 0;
  min-width: 0;
}

.ub-lainnya {
  margin-top: 0.5rem;
}

/* Blok pertanyaan 8-10, disembunyikan kalau guru tidak hadir */
.ub-hidden {
  display: none;
}

.ub-error {
  color: #C62828;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ub-form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* .btn dasarnya buat <button>, jadi <a class="btn"> perlu ini biar padding & rata tengahnya bener */
.ub-bar .btn,
.ub-actions .btn,
.ub-form-actions .btn {
  display: inline-block;
  text-decoration: none;
  line-height: 1.4;
}

.btn-batal-ub {
  background-color: var(--brown-light);
  color: var(--white);
}

.btn-batal-ub:hover {
  background-color: var(--brown-mid);
}

@media (max-width: 600px) {
  .ub-label {
    flex: 1 1 100%;
  }

  .ub-filter-row,
  .ub-filter-aksi {
    flex: 1 1 100%;
  }
}

/* --- Navigasi halaman (partial _pagination.html, generik) --- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 0.5rem 0.2rem;
}

.pager-btn {
  background-color: var(--brown-dark);
  color: var(--cream);
  text-decoration: none;
  display: inline-block;
  border-radius: 100px;
  padding: 0.45rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 0.15s ease;
}

.pager-btn:hover {
  background-color: var(--brown-mid);
}

.pager-mati {
  background-color: #D8CDB8;
  color: var(--text-muted);
  cursor: not-allowed;
}

.pager-mati:hover {
  background-color: #D8CDB8;
}

.pager-info {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-mid);
}
