/* ===== ARTICLES SECTION ===== */
.articles-section {
  background: #f6f9ff;
  padding: 70px 20px;
}
.articles-container {
  max-width: 1250px;
  margin: 0 auto;
}
.articles-head {
  text-align: center;
  margin-bottom: 28px;
}
.articles-head .section-title::after {
  margin: 10px auto 0;
}
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.articles-subhead {
  margin: 16px 0 12px; /* add more breathing room above/below */
  font-size: 1.25rem;
  color: #0b2447;
}

.article-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  background: #eaf1ff;
  border: 1px solid #deebff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  height: 160px;
}
.ac-media {
  height: 160px;
  overflow: hidden;
}
.ac-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ac-body {
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ac-title {
  font-size: 1.1rem;
  color: #0b2447;
  margin: 0;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  word-break: break-word;
}
.ac-excerpt {
  color: #445;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  word-break: break-word;
}
.ac-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.ac-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4a5568;
  font-weight: 500;
}
.ac-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.ac-tag {
  background: #d9e8ff;
  color: #0b5ed7;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .article-card {
    grid-template-columns: 1fr;
    height: auto;
  }
  .ac-media {
    height: 180px;
  }
  .ac-title {
    font-size: 1.05rem;
  }
}

/* ===== Article Carousel ===== */
.article-carousel {
  position: relative;
  margin-bottom: 24px; /* space below each carousel */
}
.article-carousel .car-viewport {
  overflow: hidden;
}
.article-carousel .car-track {
  display: flex;
  gap: 18px;
  transition: transform 400ms ease;
  will-change: transform;
}
.article-carousel .article-card {
  flex: 0 0 calc(50% - 9px);
  height: 160px;
}
.article-carousel .ac-media {
  height: 160px;
}
.article-carousel .car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
}
.article-carousel .car-prev {
  left: -12px;
}
.article-carousel .car-next {
  right: -12px;
}

@media (max-width: 900px) {
  .article-carousel .article-card {
    flex: 0 0 100%;
    height: auto;
  }
  .article-carousel .ac-media {
    height: 180px;
  }
}
/* ===== CONTACT SECTION ===== */
.contact-section {
  background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.95) 24%,
      rgba(255, 255, 255, 0.88) 44%,
      rgba(255, 255, 255, 0.7) 60%,
      rgba(255, 255, 255, 0.4) 78%,
      rgba(255, 255, 255, 0) 100%
    ),
    url("../images/lide.webp");
  background-size: cover;
  background-position: 80% center; /* ensure image area shows fully */
  background-repeat: no-repeat;
  padding: 80px 20px;
  min-height: calc(100vh - 160px);
}

.contact-container {
  max-width: 1250px;
  margin: 0 auto;
  min-height: inherit;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.contact-left {
  text-align: left;
}
.contact-desc {
  max-width: 560px;
  margin-left: 0;
}

.contact-form {
  margin-top: 14px;
  max-width: 640px;
}
.contact-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9dbe1;
  border-radius: 8px;
  background: #fff;
}
.contact-submit {
  margin-top: 10px;
}

.contact-right {
  height: 100%;
}

@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  .contact-form .row {
    grid-template-columns: 1fr;
  }
}
/* ==== RESET ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html,
body {
  height: 100%;
}

/* Smooth scroll for in-page anchors */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #fafafa;
  color: #333;
  line-height: 1.6;
}

.site-content {
  min-height: calc(
    100vh - 70px
  ); /* biar tetap minimal satu layar, tapi bisa lebih panjang */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* biar section atas tetap di posisi awal */
  padding-top: 70px; /* kompensasi tinggi navbar fixed */
}

/* ===== NAVBAR - PERTAMA (DIGUNAKAN UNTUK HOME) ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

/* ===== LOADING OVERLAY (Register) ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #e3efff;
  border-top-color: #0077ff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-text {
  margin-top: 12px;
  color: #0b2447;
  font-weight: 600;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== POPUP SUCCESS (Register) ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  display: none; /* shown via JS */
  align-items: center;
  justify-content: center;
  z-index: 2100;
}

/* ===== CREATE POST OVERLAY ===== */
.overlay-create {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2100;
  padding: 20px;
}
.overlay-card {
  width: 540px;
  max-width: 95vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  padding: 18px 16px 16px;
}
.overlay-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0b2447;
}
.overlay-form .form-group {
  margin-bottom: 12px;
}
.overlay-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
.overlay-form input,
.overlay-form select,
.overlay-form textarea {
  width: 100%;
  border: 1px solid #d9dbe1;
  border-radius: 8px;
  padding: 10px 12px;
}
.editor-toolbar {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid #e5e7ef;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.editor-toolbar button {
  border: 1px solid #e1e3ea;
  background: #fff;
  border-radius: 6px;
  padding: 4px 6px;
}
.overlay-form textarea {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  min-height: 110px;
}
.overlay-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 8px;
}

.popup-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 30px 16px;
}

.popup-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  max-width: 560px;
  width: 100%;
  text-align: center;
  padding: 36px 28px 32px;
}

.popup-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0b2447;
  margin-bottom: 10px;
}

.popup-subtext {
  color: #4a4a4a;
  margin-bottom: 26px;
}

.popup-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-outline {
  border: 1px solid #d0d7e2;
  background: transparent;
  color: #0b2447;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none; /* remove underline */
}
/* Hover/active for outline buttons (Draft/Batal, overlay, popups) */
.overlay-actions .btn-outline,
.popup-actions .btn-outline {
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.overlay-actions .btn-outline:hover,
.popup-actions .btn-outline:hover {
  background: #f1f5ff;
  border-color: #bcd4ff;
  color: #005fc4;
}
.overlay-actions .btn-outline:active,
.popup-actions .btn-outline:active {
  transform: translateY(1px);
}

/* Make sure popup buttons are never underlined */
.popup-actions a {
  text-decoration: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  width: 95%; /* biar hampir full */
  max-width: 1600px; /* biar lebih lebar dari default */
  margin: 0 auto;
  padding: 0 20px; /* kurangi padding biar tidak terlalu menjorok ke dalam */
}

/* Logo */
.logo a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: #002244;
  transition: color 0.3s ease;
}

.logo a:hover {
  color: #005eff;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #005eff;
}

/* Tombol Login */
.btn-nav {
  padding: 8px 18px;
  border: 1px solid #005eff;
  border-radius: 10px;
  color: #005eff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-nav:hover {
  background: #005eff;
  color: #fff;
}

/* Tombol Primary (Register/Daftar/Login) */
.btn-primary {
  display: inline-block;
  padding: 12px 18px; /* spacing 12-15px as requested */
  border-radius: 12px;
  background: #0077ff;
  color: #fff !important;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.05s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 119, 255, 0.25);
}

.btn-primary:hover {
  background: #005fc4;
}
.btn-primary:active {
  transform: translateY(1px);
}

/* Tombol Primary dalam konteks lain (Post List, Auth) */
.btn-primary.full-width {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 6px;
}

/* Spesifik untuk tombol di navbar, kecilkan padding */
.navbar .btn-primary {
  padding: 8px 18px;
  border-radius: 10px;
  box-shadow: none;
  background: transparent;
  color: #0077ff !important;
  border: 1px solid #0077ff;
}
.navbar .btn-primary:hover,
.navbar .btn-primary.active {
  background: #0077ff;
  color: #ffffff !important;
}

.btn-nav {
  border: 1px solid #0077ff;
  color: #0077ff !important;
  padding: 8px 18px;
  border-radius: 10px;
  transition: 0.3s;
}

.btn-nav:hover {
  background: #0077ff;
  color: white !important;
}

/* ===== HERO SECTION (50/50 FULL HEIGHT & RESPONSIVE) ===== */
.hero-section {
  width: 100vw; /* pastikan ambil lebar penuh layar */
  height: 100%;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match contact section background */
  background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.95) 24%,
      rgba(255, 255, 255, 0.88) 44%,
      rgba(255, 255, 255, 0.7) 60%,
      rgba(255, 255, 255, 0.4) 78%,
      rgba(255, 255, 255, 0) 100%
    ),
    url("../images/lide.webp");
  background-size: cover;
  background-position: 80% center;
  background-repeat: no-repeat;
  overflow: hidden;
  padding: 0;
}

.hero-container {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  max-width: none; /* Hapus batasan lebar */
  margin: 0; /* Hilangkan margin tengah */
}

/* Kolom kiri */
.hero-left {
  flex: 0 0 50%; /* Take up to 50% width */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 160px; /* tambahkan padding kanan agar konten geser kanan */
  max-width: 50%; /* Stop at middle */
}
/* Tombol khusus di hero section */
.hero-left .btn-primary,
.hero-btn {
  display: inline-block !important;
  width: auto !important; /* cegah melebar */
  padding: 12px 32px !important; /* ukuran tombol */
  font-size: 1.1rem !important;
  border-radius: 10px !important;
  font-weight: 600;
  background: #0066ff !important;
  color: #fff !important;
  text-decoration: none !important;
  transition: all 0.3s ease;
  margin-top: 15px;
  align-self: flex-start;
}

.hero-left .btn-primary:hover,
.hero-btn:hover {
  background: #004ecc !important;
  transform: translateY(-2px);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 400px;
}

.hero-form label {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.hero-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.hero-form input:focus {
  border-color: #0077ff;
  outline: none;
}

/* Tombol di hero */
.hero-form .btn-primary {
  margin-top: 10px;
  align-self: flex-start;
  padding: 10px 26px;
  border-radius: 8px;
  font-weight: 600;
}

/* Kolom kanan (gambar) */
.hero-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%; /* Stop at middle */
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* biar full edge */
}

/* ===== RESPONSIVE UNTUK HERO SECTION ===== */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
  }

  .hero-right {
    order: -1;
    height: 300px;
  }

  .hero-left {
    padding: 40px 20px;
    text-align: center;
    align-items: center;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-form {
    max-width: 100%;
    align-items: center;
  }

  .hero-form input {
    max-width: 300px;
  }

  .hero-form .btn-primary {
    align-self: center;
  }
}

/* ===== AUTH SECTION (50/50 FULL HEIGHT & FULL RIGHT EDGE) ===== */
.auth-section {
  /* Mirip dengan hero-section, full height 50/50 */
  min-height: 100vh; /* Setidaknya full viewport */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  overflow: hidden; /* Hindari scrollbar yang tidak perlu */
}

/* Menggunakan kelas baru untuk kontainer 50/50 di Auth Section */
.auth-layout-container {
  display: flex;
  height: 100vh; /* KUNCI: Ambil tinggi penuh dari viewport */
  width: 100vw; /* KUNCI: Ambil seluruh lebar viewport */
}

/* Kolom Kiri (Konten Form) */
.auth-left {
  flex: 1; /* 50% lebar */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Konten di tengah vertikal */
  padding: 80px 50px 80px 50px;
  position: relative;
}

/* Back control (Login/Register): only icon clickable */
.back-icon {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: 8px;
}
.back-icon .fa {
  background: #e9f1ff;
  color: #0077ff;
  padding: 8px;
  border-radius: 8px;
}
.back-icon:hover .fa {
  background: #d9e9ff;
}
.back-text {
  color: #0b2447;
  font-weight: 600;
}

/* Penyesuaian Teks */
.auth-title {
  font-size: 3rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 5px;
}

.auth-subtext {
  font-size: 1rem;
  color: #555;
  margin-bottom: 30px;
}

/* Logo di Sudut Kanan Atas Kolom Kiri */
.auth-logo-top {
  position: absolute;
  top: 40px;
  right: 40px;
  font-weight: 600;
  color: #000;
}

/* Tata Letak Form Menjadi 2 Kolom */
.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 kolom yang sama lebar */
  gap: 20px 30px;
  width: 100%;
  max-width: 600px; /* Batasan lebar form */
}

/* Pastikan tombol di form auth tidak melar penuh */
.auth-form-grid .btn-primary {
  width: auto;
  inline-size: max-content; /* pastikan selebar konten */
  justify-self: start; /* kiri; ubah ke center jika perlu */
  align-self: center;
}

/* Pastikan tombol tidak membentang dua kolom secara tak sengaja */
.auth-form-grid button.btn-primary,
.auth-form-grid a.btn-primary {
  grid-column: auto / span 1;
}

.auth-form-grid .form-group {
  margin-bottom: 0;
}

/* Elemen yang membentang 2 kolom */
.full-span {
  grid-column: 1 / span 2;
}

.auth-form-grid .auth-alt {
  margin-top: 5px;
  margin-bottom: 5px;
}

/* Kolom Kanan (Gambar) */
.auth-right {
  flex: 1; /* 50% lebar */
  height: 100%;
  display: flex;
  align-items: stretch; /* KUNCI: Regangkan gambar secara vertikal */
  justify-content: flex-start;
  overflow: hidden;
}

.auth-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* KUNCI: Hilangkan border radius agar menempel ke tepi kanan */
}

/* ===== LAYOUT & FORM UMUM (Digunakan di Auth Page) ===== */
.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: 0.3s;
}

.form-group input:focus {
  border-color: #0077ff;
  outline: none;
}

.auth-alt {
  margin-top: 20px;
  font-size: 0.95rem;
}

.auth-alt a {
  color: #0077ff;
  text-decoration: none;
}

.auth-alt a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE UNTUK LAYOUT 50/50 (Mobile) ===== */
@media (max-width: 768px) {
  /* Navbar Responsif */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links li {
    display: inline-block;
  }

  .logo {
    margin-bottom: 10px;
  }

  /* Hero Section Responsif */
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .hero-right {
    order: -1;
    height: 300px; /* Batasi tinggi gambar di mobile */
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-form input {
    margin: 0 auto;
  }

  /* Auth Section Responsif (50/50) */
  .auth-layout-container {
    flex-direction: column; /* Tumpuk kolom */
    height: auto;
  }

  .auth-right {
    order: -1; /* Gambar di atas form */
    height: 300px; /* Beri tinggi tetap untuk gambar di mobile */
    width: 100%;
    padding: 0;
  }

  .auth-left {
    padding: 40px 20px;
    align-items: center;
    text-align: center;
  }

  .auth-form-grid {
    grid-template-columns: 1fr; /* Form kembali 1 kolom */
    gap: 15px;
    max-width: 100%;
  }

  .auth-form-grid .full-span {
    grid-column: 1 / span 1; /* Hanya 1 kolom */
  }

  .auth-title {
    font-size: 2.5rem;
  }

  .auth-logo-top {
    position: static;
    margin-bottom: 20px;
  }
}
/* ===== SISA KODE (Dashboard, Post List, dll.) ===== */

/* ==== FOOTER (Modern & Responsive) ==== */
.site-footer {
  background: #0a0a23; /* biru gelap elegan */
  color: #cfcfcf;
  padding: 50px 0 30px;
  font-size: 0.95rem;
  position: relative;
  width: 100%;
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  text-align: left;
}

.footer-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
}

.footer-logo span {
  color: #0077ff;
}

.footer-about {
  line-height: 1.7;
  color: #ddd;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cfcfcf;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #0077ff;
}

.footer-address address {
  color: #ddd;
  line-height: 1.7;
  font-style: normal;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.footer-social a {
  display: inline-block;
  width: 36px;
  height: 36px;
  background: #1a1a3d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  background: #0077ff;
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 0.85rem;
  margin-top: 30px;
}

/* Responsif */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* ===== DASHBOARD (SIDEBAR & BACKGROUND IMAGE) ===== */
.dashboard-section {
  padding: 0; /* Hapus padding agar gambar mengisi penuh */
  background: none; /* Hapus background #fafafa */
  min-height: 100vh; /* Setidaknya setinggi viewport */

  /* Background image */
  background-image: url("../images/image1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex; /* Untuk memposisikan dashboard-container di tengah */
  align-items: center;
  justify-content: center;
}

.dashboard-container {
  width: 94%;
  max-width: 1100px; /* lebih kecil agar tampak overlay di atas background */
  margin: 40px auto;
  background: #fff;
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  min-height: 70vh;

  /* Grid layout untuk Sidebar & Konten */
  display: grid;
  grid-template-columns: 250px 1fr; /* 250px sidebar, sisanya konten */
  overflow: hidden; /* Penting untuk menjaga border-radius */
}

/* Sidebar */
.sidebar-menu {
  background: #ffffff;
  padding: 40px 0;
  height: 100%;
  border-right: 1px solid #f0f0f0;
}

.sidebar-menu .logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #002244;
  padding: 0 30px;
  margin-bottom: 40px;
}

.sidebar-menu ul {
  list-style: none;
  padding: 0;
}

.sidebar-menu ul li {
  margin-bottom: 5px;
}

.sidebar-menu ul li a {
  display: block;
  padding: 10px 30px;
  text-decoration: none;
  color: #333;
  border-radius: 0 8px 8px 0;
  transition: background 0.2s;
  font-weight: 500;
}

.sidebar-menu ul li a.active {
  background: #e9f1ff;
  color: #0077ff;
  font-weight: 600;
  border-left: 4px solid #0077ff;
  padding-left: 26px; /* Sesuaikan padding karena ada border kiri */
}

.sidebar-menu ul li a:hover:not(.active) {
  background: #f8f9fa;
}

/* Logout link in sidebar */
.sidebar-menu a.logout {
  color: #dc3545;
}
.sidebar-menu a.logout:hover {
  background: #fff0f1;
  color: #c82333;
}

/* Konten Kanan */
.dashboard-content-area {
  padding: 40px;
  padding-right: 50px;
  overflow-x: auto;
}

/* Untuk styling umum pop-up */
.popup-card.text-center {
  text-align: center;
}

.popup-icon {
  margin-bottom: 16px;
}

/* Styling untuk tombol Batal dan Logout */
.popup-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* Tombol Batal (secondary) */
.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-secondary:hover {
  background-color: #f9fafb;
}

/* Tombol Logout */
.btn-danger {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #dc2626;
  background-color: #dc2626;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

/* ===== PROFILE PAGE ===== */
.profile-content {
  padding: 10px 0 20px;
}
.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.profile-avatar {
  width: 83px;
  height: 83px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-form {
  max-width: 720px;
}
.profile-form .form-group {
  margin-bottom: 14px;
}
.profile-form .form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8dbe2;
  border-radius: 10px;
}
.profile-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
.profile-form .btn-primary {
  margin-top: 6px;
}
.upload-btn {
  height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.dashboard-header h2 {
  margin: 0;
  color: #222;
}

.username {
  color: #0077ff;
}

/* Tabel Artikel */
.dashboard-posts {
  max-height: calc(90vh - 200px);
  overflow-y: auto;
  overflow-x: auto;
  margin-right: 10px;
}

.post-table {
  width: 100%;
  border-collapse: separate; /* allow rounded corners */
  border-spacing: 0; /* remove gaps */
  margin-top: 15px;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  overflow: visible; /* Allow expanded rows to show */
  table-layout: auto;
}

.post-table th,
.post-table td {
  border-bottom: 1px solid #edf1f5;
  padding: 12px;
  text-align: left;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 300px;
}

.post-table th:first-child,
.post-table td:first-child {
  max-width: 400px;
}

.post-table th {
  background: #f6f9fc;
  color: #333;
}

.category-badge {
  display: inline-block;
  white-space: nowrap; /* KUNCI: Memaksa teks tetap 1 baris */
  background-color: #f3f4f6; /* Warna latar abu-abu muda */
  color: #4b5563; /* Warna teks abu-abu gelap */
  padding: 4px 12px; /* Ruang di dalam badge */
  border-radius: 50px; /* Membuat sudut bulat (kapsul) */
  font-size: 0.85em; /* Ukuran font sedikit lebih kecil */
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

/* Target kolom ke-3 (Status) agar tidak melipat */
.post-table td:nth-child(3) {
  width: 1%; /* Trik agar kolom menyusut sepas-pasnya konten */
  white-space: nowrap; /* Memaksa sel tabel tidak melipat teks */
  text-align: center; /* Posisi badge di tengah */
}

/* Opsional: Agar kolom kategori tidak melebar paksa */
.post-table td:nth-child(4) {
  width: 1%; /* Trik agar kolom menyusut sesuai isi konten */
  white-space: nowrap;
}

/* Status Artikel Badge */
.post-status {
  display: inline-block; /* Agar padding & ukuran konsisten */
  padding: 6px 12px; /* Sedikit lebih besar agar lega */
  border-radius: 50px; /* Sudut membulat penuh (kapsul) lebih modern */
  font-size: 0.75rem; /* Ukuran font pas */
  font-weight: 700; /* Lebih tebal */
  text-transform: uppercase; /* Huruf besar semua agar rapi */
  letter-spacing: 0.5px;
  white-space: nowrap; /* Wajib: agar tidak turun baris */
  text-align: center;
  min-width: 80px; /* Wajib: agar lebar badge seragam */
}

/* Warna (Tetap sama) */
.status-published {
  background-color: #e6ffed;
  color: #28a745;
  border: 1px solid #b7ebc5; /* Tambah border tipis agar tajam */
}

.status-draft {
  background-color: #fff8e1;
  color: #f57c00; /* Warna oranye yang lebih mudah dibaca */
  border: 1px solid #ffe0b2;
}

/* Tombol Edit & Hapus */
.btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: transparent;
  color: #0077ff;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  margin-right: 8px;
  transition: color 0.2s, background 0.2s;
  min-width: 32px;
  height: 32px;
}

.btn-edit svg {
  display: block;
  width: 16px;
  height: 16px;
}

.btn-edit:hover {
  background: #eaf3ff;
  color: #0056b3;
}

.btn-delete {
  display: none; /* Sembunyikan btn-delete lama */
}

.btn-delete-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #dc3545;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  padding: 6px 10px;
  border: 1px solid #ffd5da;
  border-radius: 8px;
  min-width: 32px;
  height: 32px;
}

.btn-delete-link svg {
  display: block;
  width: 16px;
  height: 16px;
}

.btn-delete-link:hover {
  color: #c82333;
  background: #ffebee;
}

/* Category actions container */
.category-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Action buttons container in table */
.post-table td:last-child {
  white-space: nowrap;
}

.post-table td:last-child .btn-edit,
.post-table td:last-child .btn-delete-link {
  vertical-align: middle;
}

/* Pesan jika tidak ada artikel */
.no-post {
  text-align: center;
  color: #777;
  margin-top: 20px;
}

/* === DAFTAR ARTIKEL === */

.post-list-page {
  padding-top: 60px;
  padding-bottom: 60px;
}

.post-list-main-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.article-card-link {
  text-decoration: none;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 119, 255, 0.15);
}

/* ===== FILTER/SEARCH BAR ===== */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  margin-bottom: 24px;
}

.search-container {
  position: relative;
  flex-grow: 1;
  max-width: 60%;
}

.search-container .fa {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #999;
  font-size: 0.9rem;
}

.search-container input,
.category-container select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d9dbe1;
  border-radius: 10px;
  font-size: 0.95rem;
  background-color: #f9faff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container input {
  padding-left: 40px;
}

.category-container select {
  min-width: 200px;
  cursor: pointer;
}

.search-container input:focus,
.category-container select:focus {
  outline: none;
  border-color: #0077ff;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
}

@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: 100%;
  }

  .category-container select {
    min-width: 100%;
  }
}

/* ===== Custom DropDown ===== */
.custom-select-wrapper {
  position: relative;
  min-width: 200px;
}

.custom-select-trigger {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d9dbe1;
  border-radius: 10px;
  font-size: 0.95rem;
  background-color: #f9faff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-arrow {
  font-size: 0.8rem;
  color: #999;
  transition: transform 0.2s ease;
}

.custom-select-trigger:focus,
.custom-select-wrapper.is-open .custom-select-trigger {
  outline: none;
  border-color: #0077ff;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
}

.custom-select-wrapper.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;

  background-color: #ffffff;
  border: 1px solid #d9dbe1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

  z-index: 10;
  padding: 6px;
  list-style: none;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.custom-select-wrapper.is-open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-option {
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.custom-option:hover,
.custom-option.is-selected {
  background-color: #0077ff;
  color: #ffffff;
}

/* ===== Pagination ===== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 40px 0 20px 0;
  margin-top: 30px;
  border-top: 1px solid #eee;
}

.pagination-nav {
}

.btn-pagination {
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background-color: #ffffff;
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-pagination:hover {
  border-color: #0077ff;
  color: #0077ff;
}

.page-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.page-link {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border-bottom: 3px solid transparent;
  transition: background-color 0.2s;
}

.page-link:hover {
  background-color: #f4f8ff;
}

.page-link.active {
  color: #0077ff;
  font-weight: 700;
  border-bottom-color: #0077ff;
  border-radius: 2px;
  padding-bottom: 4px;
}

.page-ellipsis {
  padding: 6px 4px;
  color: #999;
}

@media (max-width: 768px) {
  .pagination-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .page-links {
    width: 100%;
    justify-content: center;
    order: -1;
  }

  .pagination-nav {
    flex-grow: 1;
  }
  .pagination-nav:first-child {
    text-align: left;
  }
  .pagination-nav:last-child {
    text-align: right;
  }
}

/* ===== POST VIEW ===== */
.post-view-section {
  padding: 60px 20px;
  background-color: #f6f9ff;
  min-height: 80vh;
}

.post-view-container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  border: 1px solid #eef0f2;
  box-shadow: none;
}

.post-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0077ff;
  margin-bottom: 20px;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
  border-bottom: none;
  padding-bottom: 0;
}

.post-divider {
  border: 0;
  border-top: 1px solid #eee;
  margin: 0;
  margin-bottom: 30px;
}

.meta-author {
  font-weight: 600;
}

.meta-category-date {
  text-align: right;
}

.post-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 20px;
}

.post-content pre {
  background: #f4f4f4;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.post-content code {
  font-family: "Courier New", monospace;
  color: #e83e8c;
}

.btn-back {
  display: inline-block;
  margin-top: 25px;
  text-decoration: none;
  color: #0077ff;
  font-weight: 600;
  transition: 0.3s;
}

.btn-back:hover {
  color: #005fc4;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  /* Match contact section background */
  background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.95) 24%,
      rgba(255, 255, 255, 0.88) 44%,
      rgba(255, 255, 255, 0.7) 60%,
      rgba(255, 255, 255, 0.4) 78%,
      rgba(255, 255, 255, 0) 100%
    ),
    url("../images/lide.webp");
  background-size: cover;
  background-position: 80% center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  text-align: center;
  min-height: calc(100vh - 102px);
}

.about-container {
  max-width: 1250px;
  margin: 0 auto;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Two-column layout for About section on desktop */
.about-split {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 61px;
  align-items: center;
}
.about-split::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  width: 8px; /* 7-8px divider thickness */
  height: 80%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}
.about-text {
  text-align: left;
  justify-self: start;
}
.about-media {
  justify-self: end;
}
.about-media img {
  width: 100%;
  max-width: 620px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

/* Tighter typographic scale to match the mock */
.about-title {
  margin-bottom: 10px;
}
.about-desc {
  max-width: 560px;
  margin-left: 0;
}
.about-cta {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.section-title {
  font-size: 2.6rem;
  color: #0b2447;
  margin-bottom: 16px;
  font-weight: 800;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  background: linear-gradient(90deg, #4f7cff, #71a6ff);
  border-radius: 6px;
  margin: 10px auto 0;
}
.section-title.inverse {
  color: #ffffff;
}

.section-subtitle {
  max-width: 900px;
  margin: 8px auto 26px;
  color: #4a4a4a;
  font-size: 1.1rem;
  line-height: 1.85;
}
.section-subtitle.inverse {
  color: #e9f1ff;
}

/* badges removed per request */

/* ===== FEATURES SECTION ===== */
.features-section {
  /* Match contact section background */
  background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.95) 24%,
      rgba(255, 255, 255, 0.88) 44%,
      rgba(255, 255, 255, 0.7) 60%,
      rgba(255, 255, 255, 0.4) 78%,
      rgba(255, 255, 255, 0) 100%
    ),
    url("../images/lide.webp");
  background-size: cover;
  background-position: 80% center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  text-align: center;
  min-height: calc(100vh - 102px);
}

.features-container {
  max-width: 1100px;
  margin: 0 auto;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.features-note {
  margin-top: 28px;
  color: #5b6b81;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 900px) {
  .about-split {
    grid-template-columns: 1fr;
  }
  .about-text {
    text-align: center;
  }
  .about-split::after {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: #f3f7ff;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.feature-card:hover {
  transform: translateY(-6px);
  background: #e9f1ff;
}

.feature-card h3 {
  color: #005eff;
  margin-bottom: 10px;
}

.feature-card p {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #005eff, #0077ff);
  color: #fff;
  text-align: center;
  padding: 100px 20px;
  min-height: calc(100vh - 102px);
}

.cta-container {
  max-width: 700px; /* narrower CTA width */
  margin: auto;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cta-container h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.cta-container p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.cta-container .btn-primary {
  background: #fff;
  color: #005eff !important;
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 10px;
  transition: 0.3s;
}

.cta-container .btn-primary:hover {
  background: #e6e6e6;
}

/* ===== SCROLL REVEAL / FOCUS ANIMATION ===== */
.scroll-section {
  opacity: 0.35;
  transform: scale(0.97);
  transition: opacity 420ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 420ms ease;
  will-change: opacity, transform, filter;
}

.scroll-section.is-active {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

/* When dimming siblings, make non-active sections fade slightly */
.scroll-section.is-dim {
  opacity: 0.22;
  filter: saturate(0.8) contrast(0.98);
}

/* ===== CONTACT PAGE ===== */
.contact-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.stat-item {
  padding: 6px 12px;
  background: #f6f9fc;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #555;
}

.stat-item.unread {
  background: #fff3e0;
  color: #ff9800;
  font-weight: 600;
}

.sidebar-menu ul li a .badge {
  display: inline-block;
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.75rem;
  margin-left: 5px;
  font-weight: 600;
}

.contact-messages {
  margin-top: 20px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message-card {
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.message-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.message-card.unread {
  border-left: 4px solid #0077ff;
  background: #f8fbff;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf1f5;
}

.message-sender {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sender-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0077ff, #0056b3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.sender-info {
  flex: 1;
}

.sender-name {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: #222;
  font-weight: 600;
}

.sender-email {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.message-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.message-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-unread {
  background: #e3f2fd;
  color: #1976d2;
}

.status-read {
  background: #e8f5e9;
  color: #388e3c;
}

.message-date {
  font-size: 0.85rem;
  color: #888;
}

.message-subject {
  margin-bottom: 10px;
  padding: 10px;
  background: #f6f9fc;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
}

.message-contact {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #666;
}

.message-body {
  margin-bottom: 15px;
  padding: 15px;
  background: #fafafa;
  border-radius: 8px;
  line-height: 1.6;
  color: #444;
}

.message-body p {
  margin: 0;
}

.message-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #edf1f5;
}

.btn-reply {
  padding: 8px 16px;
  background: #0077ff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-reply:hover {
  background: #0056b3;
}

.btn-mark-read {
  padding: 8px 16px;
  background: transparent;
  color: #0077ff;
  border: 1px solid #0077ff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mark-read:hover {
  background: #e9f1ff;
}

.no-messages {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.no-messages p {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .message-header {
    flex-direction: column;
    gap: 15px;
  }

  .message-meta {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .message-actions {
    flex-direction: column;
  }

  .btn-reply,
  .btn-mark-read {
    width: 100%;
    text-align: center;
  }
}

/* ===== CATEGORY MANAGEMENT PAGE ===== */
.category-form small {
  font-size: 0.85em;
  color: #666;
  margin-top: 5px;
  display: block;
}

.alert-danger p {
  color: red;
  margin: 4px 0;
}

/* Category row expansion styles */
.category-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.clickable-row:hover {
  background-color: #f8f9fa;
}

.category-row.expanded {
  background-color: #f0f7ff;
}

.total-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.total-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.total-badge.status-published {
  background-color: #e6ffed;
  color: #28a745;
}

.total-badge.status-draft {
  background-color: #fff3e0;
  color: #ff9800;
}

.expanded-row {
  background: #f8f9fa;
}

.expanded-content {
  padding: 20px;
  background: #f8f9fa;
}

.expanded-articles {
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e6eaf0;
}

.expanded-articles h4 {
  margin: 0 0 15px 0;
  color: #222;
  font-size: 1rem;
  font-weight: 600;
}

.expanded-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: auto;
}

.expanded-table thead {
  background: #f6f9fc;
}

.expanded-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e6eaf0;
  font-size: 0.85rem;
}

.expanded-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 400px;
}

.expanded-table tbody tr:last-child td {
  border-bottom: none;
}

.expanded-table tbody tr:hover {
  background: #f8f9fa;
}

.article-link {
  color: #0077ff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.article-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* 1. CSS untuk Ikon Mata (Show/Hide Password) */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

.password-wrapper .toggle-password:hover {
  color: #333;
}

/* 2. CSS untuk Validasi Live */
.password-strength-checker {
  display: none;
  /* Sembunyi secara default */
  font-size: 0.85em;
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.password-strength-checker ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.password-strength-checker li {
  margin-bottom: 5px;
  color: #dc3545;
  /* Merah (gagal) */
}

/* Status 'valid' akan ditambahkan oleh JS */
.password-strength-checker li.valid {
  color: #28a745;
  /* Hijau (sukses) */
  text-decoration: line-through;
}

.password-strength-checker li.valid::before {
  content: "✓ ";
  /* Tambahkan ikon ceklis */
  display: inline-block;
  margin-right: 5px;
}
