:root {
  /* GANTI: Warna primary jadi Biru (sebelumnya #27ae60) */
  --primary: #2980b9; 
  --dark: #2c3e50;
  --light: #ecf0f1;
  --danger: #c0392b;
  /* GANTI: Info jadi biru muda (cyan) untuk pembeda */
  --info: #3498db; 
  --warn: #f39c12;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--light);
  margin: 0;
  padding: 15px;
  color: #333;
}

.container {
  max-width: 100%; /* Agar lebar penuh mengikuti layar */
  width: 98%;      /* Opsional: Gunakan 98% atau 95% agar ada sedikit jarak kiri-kanan (tidak mepet banget) */
  margin: 0 auto;
  padding: 0px;   /* Sesuaikan padding jika perlu */
}

.btn {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  justify-content: center;
}

.btn:hover {
  opacity: 0.9;
}

.btn-green {
  background: var(--primary);
}

.btn-red {
  background: var(--danger);
}

.btn-blue {
  background: var(--info);
}

.btn-orange {
  background: var(--warn);
}

.btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  opacity: 0.7;
}

input,
select,
textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.tabs {
  display: flex;
  border-bottom: 2px solid #ddd;
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 12px 20px;
  cursor: pointer;
  color: #777;
  font-weight: bold;
  text-decoration: none;
}

.tab.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  background: #f9f9f9;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 10px;
  box-sizing: border-box;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 8px;
  width: 600px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  min-width: 600px;
}

th {
  background: var(--dark);
  color: white;
  padding: 10px;
  text-align: left;
}

td {
  border-bottom: 1px solid #eee;
  padding: 10px;
  vertical-align: top;
}

.badge {
  background: #eee;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
}

.game-grid {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.g-card {
  background: white;
  padding: 20px;
  width: 140px;
  text-align: center;
  border-radius: 8px;
  border-bottom: 4px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.g-card:hover {
  transform: translateY(-5px);
}

.thumb-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.header-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 85vh;
  /* GANTI: Gradient disesuaikan ke Biru (#2980b9) */
  background: linear-gradient(135deg, #2980b9 0%, #2c3e50 100%);
  padding: 20px;
  border-radius: 10px;
}

.login-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.l-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  font-size: 0.9em;
  color: #777;
  border-bottom: 2px solid transparent;
}

.l-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  font-weight: bold;
}

.login-form {
  display: none;
}

.login-form.active {
  display: block;
}

#student_list label {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  cursor: pointer;
}

#student_list input[type="checkbox"] {
  margin: 0 !important;
  margin-right: 10px !important;
  width: 18px;
  height: 18px;
}

.responsive-header {
  background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
  padding: 15px 25px;
  border-radius: 10px;
  margin-bottom: 25px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 768px) {
  .responsive-header {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
    gap: 15px;
  }

  .header-left {
    flex-direction: column;
    margin-bottom: 5px;

  }

  .header-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-right .btn {
    flex: 1 1 auto;
    min-width: 100px;
    font-size: 0.85em;
    padding: 10px;
    justify-content: center;
  }
}

.footer-wrapper {
  margin-top: 40px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: white;
}

.footer-sponsor-container {
  background: #ffffff;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  position: relative;
}

.sponsor-title {
  text-align: center;
  font-weight: bold;
  color: var(--dark);
  font-size: 0.9em;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sponsor-scroller {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}

.sponsor-scroller::-webkit-scrollbar {
  display: none;
}

.sponsor-track {
  display: inline-flex;
  gap: 40px;
  padding: 0 20px;
}

.sponsor-logo {
  height: 45px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}

.sponsor-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

@keyframes scrollSponsor {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.main-footer {
  background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9em;
  font-weight: 500;
  margin-top: 15px;
}

.slot-drop-zone {
  display: inline-block;
  min-width: 80px;
  height: 30px;
  border-bottom: 2px solid var(--primary);
  background: #f0f0f0;
  margin: 0 5px;
  vertical-align: middle;
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  padding: 0 5px;
  color: var(--dark);
  font-weight: bold;
  border-radius: 4px;
}

.slot-filled {
  background: var(--info);
  color: white;
  border: none;
}

.word-drag {
  display: inline-block;
  padding: 8px 15px;
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 20px;
  cursor: grab;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.word-drag:active {
  cursor: grabbing;
}

.word-used {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.word-selected {
  background: var(--warn);
  color: white;
  border-color: var(--warn);
  transform: scale(1.1);
}

.jodoh-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  user-select: none;
}

.j-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.j-item {
  background: white;
  border: 2px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-weight: bold;
  color: #555;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.j-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.j-item.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
  /* GANTI: Shadow disesuaikan ke biru */
  box-shadow: 0 5px 15px rgba(41, 128, 185, 0.4);
  z-index: 2;
}

.j-item.matched {
  background: #ecf0f1;
  color: #bdc3c7;
  border-color: #eee;
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
  transform: scale(0.95);
  text-decoration: line-through;
}

.j-item.wrong-anim {
  animation: shake 0.4s ease-in-out;
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.pair-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.pair-row input {
  margin-bottom: 0 !important;
}

.pkg-card {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.pkg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* GANTI: Warna background paket terpilih jadi biru muda */
.pkg-card.selected {
  border-color: var(--primary);
  background: #ebf5fb; 
}

.pkg-check {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--primary);
  font-size: 1.2em;
}

.pkg-card.selected .pkg-check {
  display: block;
}

.pkg-price {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--primary);
  margin: 10px 0;
}

.exam-nav-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  justify-content: center;
}

.exam-nav-item {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: bold;
  transition: all 0.2s;
}

.exam-nav-item:hover {
  background: #eee;
  transform: scale(1.1);
}

.exam-nav-item.active {
  border-color: var(--info);
  box-shadow: 0 0 0 2px var(--info) inset;
  font-weight: bold;
}

.exam-nav-item.filled {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.exam-nav-item.flagged {
  background: #f39c12;
  color: white;
  border-color: #f39c12;
}

.exam-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* GANTI: Nuansa jawaban terpilih jadi Biru */
.ans-selected {
  background-color: #d1ecf1 !important;
  border-color: var(--primary) !important;
  color: #0c5460 !important;
  font-weight: bold;
}

/* Duplikasi kelas exam-nav-container dihapus/digabung untuk rapih */

.fab-donate {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: #ec4899;
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
  cursor: pointer;
  z-index: 9999;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
}

.fab-donate:hover {
  transform: scale(1.05);
}

.don-hist-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

.site-title {
  font-size: 22px;
}

@media only screen and (max-width: 600px) {
  .site-title {
    font-size: 35px !important;
    letter-spacing: -0.5px;
  }
  .header-left {
    gap: 10px;
  }
}

@media (max-width: 600px) {
  #g-topics.game-grid {
    display: block !important;
    width: 100% !important;
    padding: 0 5px;
  }
  #g-menu.game-grid,
  #g-topics-list.game-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    justify-content: stretch !important;
  }
  .g-card {
    width: 100% !important;
    box-sizing: border-box;
    padding: 10px !important;
    margin: 0 !important;
    min-height: 110px;
  }
  #g-menu .g-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  #g-topics-list .g-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left !important;
  }
  .g-card div[style*="font-weight:bold"] {
    font-size: 0.9em !important;
    line-height: 1.3;
  }
  .g-card span[style*="background:rgba"] {
    display: none;
  }
  #g-topics>div:first-child {
    display: flex !important;
    gap: 10px;
    margin-bottom: 15px !important;
    width: 100%;
  }
  #g-menu[style*="none"],
  #g-topics[style*="none"],
  .game-grid[style*="none"] {
    display: none !important;
  }
}

/* Modal Styling */
#detailModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#detContent {
    background: white;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* --- STYLE TAMBAHAN UNTUK TOMBOL ADMIN --- */
.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%; /* Membuat tombol bulat */
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    margin-right: 5px;
}

/* Warna Tombol NAIK (Biru Muda) */
.btn-up {
    background-color: #e3f2fd;
    color: #1976d2;
}
.btn-up:hover {
    background-color: #bbdefb;
    transform: translateY(-2px);
}

/* Warna Tombol TURUN (Oranye Muda) */
.btn-down {
    background-color: #fff3e0;
    color: #f57c00;
}
.btn-down:hover {
    background-color: #ffe0b2;
    transform: translateY(2px);
}

/* Warna Tombol HAPUS (Merah Muda) */
.btn-del {
    background-color: #ffebee;
    color: #c62828;
    width: auto;     /* Khusus hapus agak lebar dikit kalau mau ada teks, atau bulat saja */
    border-radius: 8px;
    padding: 0 10px;
    height: 32px;
    font-weight: bold;
    font-size: 14px;
}
.btn-del:hover {
    background-color: #ffcdd2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Spacer untuk tombol yang disable (agar rata) */
.btn-spacer {
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-right: 5px;
}

/* CSS Tambahan untuk Floating Chat AI */
#aiChatWrapper {
    position: fixed;
    bottom: 90px; /* Di atas FAB Donate jika ada */
    right: 25px;
    z-index: 10000;
    display: none; /* Sembunyi di awal */
    flex-direction: column;
}

.ai-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s;
}

.ai-fab:hover { transform: scale(1.1); }

/* Copy CSS .chat-container dari sip.html ke sini, sesuaikan ukurannya jika perlu */
.chat-container-floating {
    width: 350px; /* Sedikit lebih kecil untuk mobile */
    height: 500px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.question-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}
.question-content p {
    margin-bottom: 10px;
}
.question-content ul, .question-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}
/* Style khusus untuk sel di tabel rekapitulasi */
.rekap-cell-wrapper {
    text-align: center;
    min-width: 80px;
    padding: 5px;
}

.img-rekap-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    margin: 4px 0;
    transition: transform 0.2s;
}

.img-rekap-thumb:hover {
    transform: scale(1.1);
    border-color: #3498db;
}

.badge-rekap {
    display: block;
    font-size: 9px;
    color: white;
    padding: 1px 3px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: bold;
}

.time-info {
    font-size: 9px;
    font-family: monospace;
    color: #555;
}

.reason-info {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    background: #95a5a6;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    cursor: help;
    margin-left: 3px;
}

.btn-edit-rekap {
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 10px;
    padding: 2px 5px;
    margin-top: 4px;
    cursor: pointer;
}

.btn-edit-rekap:hover {
    background: #e1e1e1;
}
/* Pastikan modal pending news posisinya di tengah layar */
#modalPendingNews, #modalPreviewPending {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* Default hidden, dikontrol JS via .css('display', 'flex') */
    justify-content: center;
    align-items: center;
    z-index: 10002;
}
/* Security UX */
.security-error{background:#fff3cd;color:#856404;border:1px solid #ffeeba;padding:10px;border-radius:6px;}

/* --- Posting Category, Tags, dan Showcase Alternatif --- */
.post-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.news-category-badge {
  background: #8e44ad;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}
.news-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.news-tag-chip {
  background: #eef5ff;
  color: #23639b;
  border: 1px solid #cfe4ff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}
.post-side-section {
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.post-side-section h4 {
  margin: 0 0 12px 0;
  color: var(--dark);
  border-bottom: 1px solid #eef1f5;
  padding-bottom: 8px;
}
.text-only-post-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.text-only-post-item {
  border: 0;
  border-left: 4px solid var(--primary);
  background: #f8fbff;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.text-only-post-item:hover {
  background: #eef7ff;
}
.text-only-title {
  display: block;
  font-weight: 700;
  color: #25313f;
  line-height: 1.35;
}
.text-only-post-item small {
  display: block;
  color: #6b7280;
  margin-top: 4px;
}
.category-post-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.category-showcase-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #f6fbff);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-showcase-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,.08);
}
.category-showcase-label {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 7px;
}
.category-showcase-title {
  font-weight: 700;
  color: #243447;
  line-height: 1.35;
}
.category-showcase-count {
  margin-top: 5px;
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 768px) {
  .post-meta-grid {
    grid-template-columns: 1fr;
  }
  .news-right-col {
    width: 100% !important;
    position: static !important;
  }
  #newsCategoryFilter,
  #newsTagFilter {
    min-width: 100% !important;
    flex: 1 1 100%;
  }
}

/* FIX FINAL: Halaman Statis - desktop hover only, mobile responsif */
.static-section-wrapper {
    overflow: visible !important;
    position: relative;
    z-index: 20;
}

.static-mobile-menu-toggle {
    display: none;
    width: 100%;
    border: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    padding: 12px 14px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.static-tabs-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch;
    gap: 0;
    overflow: visible !important;
    position: relative;
    z-index: 30;
}
.static-tab-wrap {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
}
.static-tab-wrap.has-submenu > .static-tab-item {
    cursor: default;
}
.static-tab-wrap.has-submenu > .static-tab-item:hover {
    background: #eee;
}
.static-tab-arrow {
    margin-left: 6px;
    font-size: 11px;
    opacity: .75;
    transition: transform .2s ease;
}
.static-submenu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    max-width: min(280px, calc(100vw - 30px));
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    z-index: 99999;
    overflow: visible !important;
}
.static-tab-wrap.has-submenu:hover > .static-submenu-dropdown {
    display: block;
}
.static-submenu-link {
    display: block;
    padding: 10px 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
    font-size: .9em;
    white-space: nowrap;
}
.static-submenu-link:hover {
    background: #f4f8fb;
    color: var(--primary);
}

@media (max-width: 600px) {
    .static-mobile-menu-toggle {
        display: flex !important;
    }
    .static-section-wrapper:not(.static-main-open) .static-tabs-header {
        display: none !important;
    }
    .static-section-wrapper.static-main-open .static-tabs-header {
        display: block !important;
    }
    .static-tabs-header {
        display: block !important;
        overflow: visible !important;
        border-bottom: 1px solid #ddd;
    }
    .static-tab-wrap {
        display: block !important;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    .static-tab-item {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px !important;
        border-right: 0 !important;
        white-space: normal !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    .static-tab-wrap.has-submenu > .static-tab-item {
        background: #f8f9fa;
        color: #333;
        font-weight: 700;
        border-bottom: 0 !important;
    }
    .static-tab-wrap.has-submenu:hover > .static-submenu-dropdown,
    .static-submenu-dropdown {
        display: none !important;
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: 0 !important;
        border-top: 1px solid #eee !important;
        border-radius: 0 !important;
        background: #fff !important;
    }
    .static-tab-wrap.has-submenu.mobile-open > .static-submenu-dropdown {
        display: block !important;
    }
    .static-tab-wrap.has-submenu.mobile-open > .static-tab-item {
        background: #eef7ff !important;
        color: var(--primary) !important;
    }
    .static-tab-wrap.has-submenu.mobile-open .static-tab-arrow {
        transform: rotate(180deg);
    }
    .static-submenu-link {
        white-space: normal !important;
        padding: 11px 14px 11px 28px !important;
        font-size: .95em;
        border-bottom: 1px solid #f3f3f3;
    }
}


/* FIX: Pagination Berita - tombol Prev/Next lebih jelas */
.news-pagination {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.page-indicator {
    font-weight: 800;
    color: #2c3e50;
    background: #ffffff;
    border: 1px solid #d7e3ef;
    border-radius: 999px;
    padding: 8px 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.btn-page-nav {
    background: #2980b9 !important;
    color: #ffffff !important;
    border: 1px solid #1f6694 !important;
    min-width: 86px;
    padding: 9px 14px !important;
    border-radius: 999px !important;
    box-shadow: 0 3px 8px rgba(41,128,185,0.25);
}

.btn-page-nav:hover:not(:disabled) {
    background: #1f6694 !important;
    transform: translateY(-1px);
}

.btn-page-nav:disabled {
    background: #e9eef3 !important;
    color: #8a97a3 !important;
    border-color: #d0d7de !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

@media (max-width: 600px) {
    .news-pagination {
        gap: 8px;
        margin-top: 16px;
    }
    .btn-page-nav {
        min-width: 78px;
        padding: 9px 10px !important;
        font-size: .85em !important;
    }
    .page-indicator {
        order: -1;
        width: 100%;
        box-sizing: border-box;
        border-radius: 10px;
    }
}

/* FINAL OVERRIDE: tombol pagination posting harus tetap jelas walau ada class lama btn-grey/btn-sm */
#btnPrev,
#btnNext,
.news-pagination #btnPrev,
.news-pagination #btnNext {
    background: #2980b9 !important;
    background-color: #2980b9 !important;
    color: #ffffff !important;
    border: 1px solid #1f6694 !important;
    min-width: 92px !important;
    padding: 10px 16px !important;
    border-radius: 999px !important;
    box-shadow: 0 3px 8px rgba(41,128,185,0.28) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}
#btnPrev:hover:not(:disabled),
#btnNext:hover:not(:disabled) {
    background: #1f6694 !important;
    background-color: #1f6694 !important;
}
#btnPrev:disabled,
#btnNext:disabled {
    background: #e9eef3 !important;
    background-color: #e9eef3 !important;
    color: #7b8794 !important;
    border-color: #cfd8e3 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}
#pageIndicator {
    font-weight: 800 !important;
    color: #2c3e50 !important;
    background: #ffffff !important;
    border: 1px solid #d7e3ef !important;
    border-radius: 999px !important;
    padding: 9px 15px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
@media (max-width: 600px) {
    #btnPrev, #btnNext {
        min-width: 86px !important;
        padding: 10px 12px !important;
        font-size: .86em !important;
    }
    #pageIndicator {
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 10px !important;
    }
}



/* Panel Pengaturan Tampilan Posting Samping */
.showcase-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.showcase-setting-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.showcase-setting-card label {
  font-weight: 700;
  color: #334155;
  display: block;
  margin-bottom: 6px;
}
.showcase-setting-card small {
  font-weight: 400;
  color: #64748b;
}
@media (max-width: 768px) {
  .showcase-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* === FIX Sorotan Kategori: klik kartu memfilter semua posting kategori === */
.category-showcase-card {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: block;
}
.category-showcase-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(41, 128, 185, 0.15);
}


/* === Sorotan Kategori: tampilkan judul posting sebagai slide, klik untuk filter seluruh kategori === */
.category-showcase-slider-card {
  overflow: hidden;
  position: relative;
  padding: 12px !important;
}
.category-showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.category-showcase-top .category-showcase-label {
  margin-bottom: 0;
  max-width: 68%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-showcase-top .category-showcase-count {
  margin-top: 0;
  white-space: nowrap;
  font-weight: 700;
  color: #64748b;
}
.category-title-slider {
  overflow: hidden;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid #e6eef8;
  min-height: 42px;
  display: flex;
  align-items: center;
}
.category-title-track {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 8px 10px;
  animation: categoryTitleSlide 24s linear infinite;
}
.category-showcase-slider-card:hover .category-title-track,
.category-showcase-slider-card:focus .category-title-track {
  animation-play-state: paused;
}
.category-slide-title {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-showcase-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}
@keyframes categoryTitleSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (max-width: 768px) {
  .category-title-track {
    animation-duration: 18s;
  }
  .category-slide-title {
    max-width: 180px;
  }
}

/* === Layout revisi: Sorotan Kategori dibuat lebar di bawah judul Berita === */
.post-wide-section.category-posts-wide {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  padding: 14px;
  margin: 8px 0 18px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  box-sizing: border-box;
}
.post-wide-section.category-posts-wide h4 {
  margin: 0 0 12px 0;
  color: var(--dark);
  border-bottom: 1px solid #eef1f5;
  padding-bottom: 8px;
}
.category-post-showcase-wide {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.category-post-showcase-wide .category-slide-title {
  max-width: 320px;
}

/* === Iklan gambar di kolom samping === */
.sidebar-ad-showcase {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-ad-item {
  display: block;
  text-decoration: none;
  color: #1f2937;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sidebar-ad-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
  border-color: var(--primary);
}
.sidebar-ad-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef2f7;
}
.sidebar-ad-item span {
  display: block;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .category-post-showcase-wide {
    grid-template-columns: 1fr !important;
  }
  .post-wide-section.category-posts-wide {
    margin-top: 10px;
  }
  .sidebar-ad-item img {
    aspect-ratio: 16 / 7;
  }
}


/* === FINAL FIX: Sorotan Kategori berada di bawah pagination dan tidak melebar/menumpuk === */
.below-pagination-showcase {
  margin-top: 18px !important;
  clear: both;
}
.category-post-showcase-wide {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)) !important;
  gap: 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.category-post-showcase-wide > .category-showcase-card,
.category-showcase-slider-card {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.category-showcase-top {
  min-width: 0 !important;
}
.category-showcase-top .category-showcase-label {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.category-title-slider {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.category-title-track {
  max-width: none !important;
}
.category-slide-title {
  max-width: clamp(140px, 24vw, 260px) !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 768px) {
  .category-post-showcase-wide {
    grid-template-columns: 1fr !important;
  }
  .category-slide-title {
    max-width: 180px !important;
  }
}

/* === Admin Upload Iklan & Sponsor === */
.sidebar-ad-admin-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-ad-admin-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px;
}

.sidebar-ad-admin-preview {
  width: 120px;
  height: 90px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.sidebar-ad-admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-ad-admin-fields {
  min-width: 0;
}

.sidebar-ad-admin-fields label {
  display: block;
  font-size: 12px;
  color: #334155;
  margin: 0 0 4px 0;
  font-weight: 700;
}

.sidebar-ad-admin-fields input {
  margin-bottom: 8px;
}

.sidebar-ad-remove-btn {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .sidebar-ad-admin-row {
    grid-template-columns: 1fr;
  }

  .sidebar-ad-admin-preview {
    width: 100%;
    height: 150px;
  }

  .sidebar-ad-remove-btn {
    width: 100%;
  }
}


/* === FINAL RESPONSIVE FIX: Admin Iklan/Sponsor Upload === */
.admin-showcase-settings,
.admin-donation-settings {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.showcase-settings-grid {
  align-items: start;
}
.showcase-setting-card,
.ad-upload-setting-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.ad-upload-setting-card {
  grid-column: 1 / -1;
}
.sidebar-ad-admin-row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.sidebar-ad-admin-fields input,
.sidebar-ad-admin-fields select,
.sidebar-ad-admin-fields textarea {
  max-width: 100%;
  box-sizing: border-box;
}
.sidebar-ad-admin-preview {
  max-width: 100%;
}
@media (max-width: 900px) {
  .sidebar-ad-admin-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .sidebar-ad-remove-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
@media (max-width: 640px) {
  .admin-showcase-settings,
  .admin-donation-settings {
    padding: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .showcase-settings-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .showcase-setting-card {
    padding: 12px !important;
  }
  .sidebar-ad-admin-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px !important;
  }
  .sidebar-ad-admin-preview {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
  .sidebar-ad-admin-fields,
  .sidebar-ad-admin-fields input {
    width: 100% !important;
  }
}

/* === Gambar/Banner Infaq sebagai alternatif tombol === */
.fab-donate-image {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 9999;
  width: min(260px, calc(100vw - 40px));
  background: #fff;
  border: 2px solid #f9a8d4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.25);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.fab-donate-image:hover,
.fab-donate-image:focus {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.35);
  outline: none;
}
.fab-donate-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fdf2f8;
}
.fab-donate-image span {
  display: block;
  padding: 8px 10px;
  color: #be185d;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
  background: linear-gradient(90deg, #fdf2f8, #fff7ed);
}
.fab-donate-with-image {
  bottom: 20px !important;
  right: 20px !important;
}
.donation-modal-content {
  overflow: hidden;
}
.donation-modal-banner {
  margin: -25px -25px 16px -25px;
  background: #fdf2f8;
}
.donation-modal-banner img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}
.donation-admin-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.donation-admin-preview {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px dashed #fb923c;
  border-radius: 12px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #9a3412;
  text-align: center;
  font-size: 13px;
}
.donation-admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.donation-admin-fields {
  min-width: 0;
}
.donation-admin-fields label {
  display: block;
  font-weight: 700;
  color: #7c2d12;
  margin: 0 0 5px 0;
}
.donation-admin-fields small {
  display: block;
  color: #9a3412;
  margin-top: -6px;
  margin-bottom: 8px;
  font-size: 12px;
}
.donation-remove-image {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 8px !important;
  font-weight: 600 !important;
}
.donation-remove-image input {
  width: auto !important;
  margin: 0 !important;
}
@media (max-width: 768px) {
  .fab-donate-image {
    right: 12px;
    bottom: 78px;
    width: min(210px, calc(100vw - 24px));
    border-radius: 14px;
  }
  .fab-donate-image span {
    font-size: 12px;
    padding: 7px 9px;
  }
  .fab-donate-with-image {
    bottom: 18px !important;
    right: 12px !important;
  }
  .donation-admin-grid {
    grid-template-columns: 1fr;
  }
  .donation-admin-preview {
    width: 100%;
  }
}
@media (max-width: 430px) {
  .fab-donate-image {
    width: min(180px, calc(100vw - 24px));
  }
  .fab-donate-image img {
    aspect-ratio: 16 / 8;
  }
}

/* === FINAL FIX: Banner infaq berada di bawah Iklan & Sponsor, tombol FAB tetap kanan bawah === */
.sidebar-donation-section {
  margin-top: 14px;
}
.sidebar-donation-banner {
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid #f9a8d4;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  display: block;
  text-align: left;
  box-shadow: 0 3px 10px rgba(236, 72, 153, .12);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sidebar-donation-banner:hover,
.sidebar-donation-banner:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(236, 72, 153, .22);
  border-color: #ec4899;
  outline: none;
}
.sidebar-donation-banner img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fdf2f8;
}
.sidebar-donation-banner span {
  display: block;
  padding: 10px 12px;
  color: #be185d;
  font-weight: 800;
  line-height: 1.35;
  background: linear-gradient(90deg, #fdf2f8, #fff7ed);
}
.post-broadcast-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}
.post-broadcast-panel label {
  color: #7c2d12;
  font-weight: 700;
}
.post-broadcast-panel textarea,
.post-broadcast-panel select {
  max-width: 100%;
}
@media (max-width: 768px) {
  .sidebar-donation-banner img {
    aspect-ratio: 16 / 7;
  }
}


/* Broadcast posting multi-unit di modal posting */
.post-broadcast-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
  box-sizing: border-box;
}
.edit-post-broadcast-panel {
  background: #ecfdf5;
  border-color: #99f6e4;
}
.broadcast-unit-select {
  width: 100%;
  min-height: 120px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: auto;
}
@media (max-width: 600px) {
  .post-broadcast-panel {
    padding: 12px;
    border-radius: 8px;
  }
  .broadcast-unit-select {
    min-height: 150px;
    font-size: 0.95em;
  }
}

/* Cloudflare visitor statistics */
.cf-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.cf-stat-card {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.cf-stat-card span {
  display: block;
  color: #64748b;
  font-size: 0.85em;
  font-weight: 700;
  margin-bottom: 6px;
}
.cf-stat-card b {
  display: block;
  color: #0f172a;
  font-size: 1.8em;
  line-height: 1.1;
}
.cf-stat-card small {
  display: block;
  margin-top: 8px;
  color: #475569;
  line-height: 1.4;
}
.cf-stats-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
  flex-wrap: wrap;
}
.cf-mini-chart {
  height: 150px;
  display: flex;
  gap: 5px;
  align-items: flex-end;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
}
.cf-bar {
  min-width: 13px;
  background: #2980b9;
  border-radius: 6px 6px 2px 2px;
  opacity: 0.85;
  transition: opacity .2s, transform .2s;
}
.cf-bar:hover {
  opacity: 1;
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  .cf-stats-grid { grid-template-columns: 1fr; }
  .cf-stats-layout { display: block; }
  .cf-stats-layout .card { margin-bottom: 12px; }
  .cf-mini-chart { gap: 4px; }
  .cf-bar { min-width: 10px; }
}


/* Statistik Pengunjung Hari Ini - sidebar */
.cf-today-stats-box {
  width: 100%;
  box-sizing: border-box;
}
.cf-today-card {
  background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  overflow: hidden;
}
.cf-today-title {
  font-size: 0.9em;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.cf-today-main {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.cf-today-main .num {
  display: block;
  font-size: 1.8em;
  line-height: 1;
  font-weight: 900;
}
.cf-today-main .label {
  display: block;
  font-size: 0.78em;
  opacity: 0.9;
  margin-top: 4px;
}
.cf-today-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cf-today-mini {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 9px;
}
.cf-today-mini b {
  display: block;
  font-size: 1.05em;
}
.cf-today-mini span {
  display: block;
  font-size: 0.72em;
  opacity: 0.9;
}
.cf-today-updated {
  font-size: 0.68em;
  opacity: 0.75;
  margin-top: 9px;
  text-align: right;
}
.cf-today-stats-loading, .cf-today-stats-error {
  background: #fff;
  color: #666;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.85em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
@media (max-width: 900px) {
  .cf-today-card { padding: 12px; }
  .cf-today-mini-grid { grid-template-columns: 1fr 1fr; }
}


.local-today-card {
  background: linear-gradient(135deg, #0f766e 0%, #164e63 100%);
}

/* ===============================
   YouTube Multi Channel Feed + Popup + Search
   =============================== */
.youtube-section {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #fee2e2;
}

.youtube-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #fee2e2;
}

.youtube-section-header h3 {
  margin: 0;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.youtube-logo-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  border-radius: 7px;
  background: #dc2626;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.youtube-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 10px;
  margin-bottom: 16px;
}

.youtube-search-wrap {
  position: relative;
}

.youtube-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #991b1b;
  font-size: 14px;
  opacity: .75;
}

#youtubeSearchInput,
#youtubeChannelFilter {
  width: 100%;
  min-height: 42px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff7f7;
  color: #3f3f46;
  margin-bottom: 0;
  outline: none;
}

#youtubeSearchInput {
  padding: 10px 14px 10px 38px;
}

#youtubeChannelFilter {
  padding: 10px 14px;
}

#youtubeSearchInput:focus,
#youtubeChannelFilter:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}

.youtube-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.youtube-item {
  display: block;
  width: 100%;
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.youtube-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
  border-color: #fecaca;
}

.youtube-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111827;
  overflow: hidden;
}

.youtube-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.youtube-item:hover .youtube-thumb-wrap img {
  transform: scale(1.04);
}

.youtube-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 38px;
  border-radius: 12px;
  background: rgba(220, 38, 38, .94);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

.youtube-card-body {
  padding: 11px 12px 12px;
}

.youtube-channel-badge {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: .72em;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-title {
  font-weight: 700;
  font-size: .93em;
  line-height: 1.38;
  min-height: 42px;
}

.youtube-date {
  margin-top: 8px;
  color: #64748b;
  font-size: .78em;
}

.youtube-snippet {
  margin-top: 8px;
  color: #64748b;
  font-size: .8em;
  line-height: 1.4;
}

.youtube-load-more {
  padding: 10px 25px;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: .2s ease;
}

.youtube-load-more:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.youtube-empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 16px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.youtube-empty-state.error {
  color: #b91c1c;
  background: #fff5f5;
  border-color: #fecaca;
}

.youtube-video-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}

.youtube-video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(3px);
}

.youtube-video-dialog {
  position: relative;
  z-index: 2;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.youtube-video-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 4;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.youtube-video-frame-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.youtube-video-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.youtube-video-detail {
  padding: 18px 20px 20px;
}

.youtube-modal-channel {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: .82em;
  font-weight: 700;
  margin-bottom: 9px;
}

.youtube-video-detail h3 {
  margin: 0 0 8px;
  color: #111827;
  line-height: 1.35;
}

.youtube-modal-date {
  color: #64748b;
  font-size: .88em;
  margin-bottom: 12px;
}

.youtube-modal-description {
  color: #374151;
  line-height: 1.6;
  max-height: 140px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  white-space: pre-wrap;
}

.youtube-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.youtube-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  color: #991b1b;
  background: #fff;
  text-decoration: none;
  font-weight: 700;
}

.youtube-modal-btn.primary {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

body.youtube-modal-open {
  overflow: hidden;
}

.youtube-admin-setting code {
  background: #fee2e2;
  color: #991b1b;
  padding: 1px 4px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .youtube-section {
    padding: 14px;
  }
  .youtube-toolbar {
    grid-template-columns: 1fr;
  }
  .youtube-feed-grid {
    grid-template-columns: 1fr;
  }
  .youtube-channel-row {
    flex-direction: column;
    align-items: stretch !important;
  }
  .youtube-video-modal {
    padding: 10px;
  }
  .youtube-video-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 14px;
  }
  .youtube-video-frame-wrap {
    border-radius: 14px 14px 0 0;
  }
  .youtube-video-detail {
    padding: 14px;
  }
}


/* YouTube admin setting responsive */
@media (max-width: 640px) {
  .youtube-admin-setting > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}


/* === Statistik Internal + Jumlah Baca Postingan === */
.post-read-count {
  margin: 8px 0 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.post-read-detail {
  margin: 0 0 14px 0;
  padding: 9px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}
.internal-stat-card {
  border-top: 4px solid #16a34a;
}
.internal-bar {
  background: #16a34a !important;
}
.top-read-posts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.top-read-post-item {
  width: 100%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  padding: 9px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  color: #0f172a;
}
.top-read-post-item:hover {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.top-read-post-item .rank {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}
.top-read-post-item .title {
  min-width: 0;
  font-weight: 800;
  line-height: 1.25;
}
.top-read-post-item .title small {
  display: block;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}
.top-read-post-item b {
  color: #1d4ed8;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .post-read-count { font-size: 11px; }
  .top-read-post-item { grid-template-columns: 30px minmax(0, 1fr); }
  .top-read-post-item b { grid-column: 2; }
}


/* === Beranda Absensi Digital Sederhana === */
.absensi-home-welcome {
  background: linear-gradient(135deg, rgba(41, 128, 185, 0.12), rgba(44, 62, 80, 0.08));
  border: 1px solid rgba(41, 128, 185, 0.18);
  border-radius: 18px;
  padding: 28px 22px;
  margin: 0 0 22px 0;
  text-align: center;
  box-shadow: 0 10px 24px rgba(44, 62, 80, 0.08);
}

.absensi-home-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 0.82em;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid rgba(41, 128, 185, 0.18);
}

.absensi-home-welcome h1 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.25;
}

.absensi-home-welcome p {
  max-width: 720px;
  margin: 12px auto 0 auto;
  color: #5f6f7a;
  font-size: 1em;
  line-height: 1.6;
}

.absensi-login-cta {
  margin-top: 16px;
  display: inline-flex;
}

.absensi-home-actions {
  background: #ffffff;
  border: 1px solid #e8eef3;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
  box-shadow: 0 8px 22px rgba(44, 62, 80, 0.06);
}

.absensi-home-actions > .btn,
.absensi-home-actions > button.btn {
  border-radius: 10px !important;
  min-height: 46px;
  box-shadow: 0 3px 10px rgba(44, 62, 80, 0.08);
}

@media (min-width: 760px) {
  .absensi-home-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .absensi-home-actions > .btn,
  .absensi-home-actions > button.btn {
    margin: 0 !important;
  }
}

@media (max-width: 759px) {
  .absensi-home-welcome {
    padding: 22px 16px;
  }
  .absensi-home-actions {
    padding: 14px;
  }
}
