* {
  font-family: sans-serif;
  padding: 0;
  margin: 0;
  list-style-type: none;
  text-decoration: none;
}

.body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Dashbord Start */
/* sidebar start */
.sidebar {
  background-color: #5eadcf;
  height: 100%;
  width: 300px;
  position: fixed;
  border-left: 10px solid #5eadcf;
  transition: 0.6s;
  overflow: hidden;
  z-index: 100;
}

.sidebar.active {
  width: 85px;
}

/* Saat sidebar mengecil (active), sembunyikan curve */
.sidebar.active ul li a::before,
.sidebar.active ul li a::after {
  display: none;
}

.sidebar ul {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin-top: 6rem;
}

.sidebar ul li {
  position: relative;
  width: 100%;
  list-style: none;
  border-bottom-left-radius: 30px;
  border-top-left-radius: 30px;
}

.sidebar ul li a {
  position: relative;
  display: block;
  width: 100%;
  display: flex;
  text-decoration: none;
  color: #ffff;
  padding: 0 10px;
  height: 60px;
  line-height: 60px;
}

.sidebar ul li a i {
  position: relative;
  display: block;
  min-width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  font-size: 1.75rem;
  padding-right: 2rem;
}

.sidebar ul li:hover,
.sidebar ul li.hovered {
  background-color: white;
}

.sidebar ul li:hover a,
.sidebar ul li.hovered a {
  color: #0d6efd;
}

.sidebar .nama-web h1 {
  color: #ffff;
  padding: 1rem 0rem 1rem 4.6rem;
  font-size: 1.8rem; /* Sesuaikan ukuran sesuai kebutuhan */
  margin-bottom: 1rem;
  font-weight: 600; /* Opsional: buat font sedikit lebih tebal */
}

/* Responsive: lebih kecil lagi di layar kecil */
@media (max-width: 768px) {
  .sidebar .nama-web h1 {
    font-size: 1.2rem;
    padding: 0.8rem 0 0.8rem 1.5rem;
  }
}

.nama-web i {
  margin-right: 1rem;
}

/* ========================
   NAVBAR ACTIVE STATE
   ======================== */
.navbar.active {
  margin-left: 85px;
}

/* ========================
   MAIN ACTIVE STATE  
   ======================== */
main.active {
  width: calc(100% - 85px);
  left: 85px;
}

/* ========================
   ACTIVE PAGE MENU HIGHLIGHT
   ======================== */
.menu-sidebar ul li.active-page {
  background-color: white;
}

.menu-sidebar ul li.active-page a {
  color: #0d6efd;
}

/* Curve untuk active page */
.menu-sidebar ul li.active-page a::before {
  content: "";
  position: absolute;
  right: 0;
  top: -50px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 35px 35px 0 10px white;
  pointer-events: none;
}

.menu-sidebar ul li.active-page a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -50px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 35px -35px 0 10px white;
  pointer-events: none;
}

/* Sembunyikan curve saat sidebar collapsed */
.sidebar.active ul li.active-page a::before,
.sidebar.active ul li.active-page a::after {
  display: none;
}

/* ========================
   TOOLTIP SAAT SIDEBAR COLLAPSED
   ======================== */
.sidebar.active .menu-sidebar ul li {
  position: relative;
}

.sidebar.active .menu-sidebar ul li a span {
  position: absolute;
  left: 85px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.sidebar.active .menu-sidebar ul li a span::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #333;
}

.sidebar.active .menu-sidebar ul li:hover a span {
  opacity: 1;
  visibility: visible;
  left: 75px;
}

/* ========================
   RESPONSIVE FIXES
   ======================== */
@media (max-width: 992px) {
  .navbar.active {
    margin-left: 300px;
  }

  main.active {
    width: calc(100% - 300px);
    left: 300px;
  }
}

@media (max-width: 768px) {
  .navbar.active {
    margin-left: 250px;
  }

  main.active {
    width: calc(100% - 250px);
    left: 250px;
  }
}

@media (max-width: 480px) {
  .navbar.active,
  main.active {
    margin-left: 0;
    left: 0;
    width: 100%;
  }
}
/* end sidebar */

/* curve start */
.sidebar ul li:hover a::before,
.sidebar ul li.hovered a::before {
  content: "";
  position: absolute;
  right: 0;
  top: -50px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 35px 35px 0 10px white;
  pointer-events: none;
}

.sidebar ul li:hover a::after,
.sidebar ul li.hovered a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -50px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 35px -35px 0 10px white;
  pointer-events: none;
}
/* curve end */

/* navbar start */
.navbar {
  position: relative;
  margin-left: 300px;
  display: flex;
  justify-content: space-between;
  background: #f8f9fa;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.5s;
}

.bar h2 {
  margin-left: 2rem;
  padding-top: 0.5rem;
}
.user-profile {
  display: flex;
  align-items: center;
}
.user-profile h4 {
  margin-right: 1rem;
  padding-top: 0.5rem;
}
.user-profile img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  margin-right: 1rem;
}
.sidebar.active ~ .navbar {
  margin-left: 80px;
}
/* navbar end  */

/* main start */
main {
  position: absolute;
  width: calc(100% - 300px);
  left: 300px;
  min-height: 100vh;
  background-color: white;
  transition: 0.5s;
}
.sidebar.active ~ main {
  width: calc(100% - 85px);
  left: 85px;
}

/* card start */

.content {
  position: relative;
  width: 100%;
  padding: 25px;
}
.content .card {
  position: relative;
  border-radius: 25px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
}

.content .card:hover {
  background: #5eadcf;
  color: white;
  transform: translateY(-7px); /* kartu naik*/
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: 0.4s;
}
.card-body {
  position: relative; /* supaya absolute di dalam card-body */
  min-height: 100px; /* kasih tinggi minimal biar ada ruang */
  padding: 15px;
}

.card-body h3 {
  text-align: left; /* teks tetap rata kiri */
}
.card-body h6 {
  text-align: left;
}

.card-body i {
  position: absolute;
  bottom: 15px; /* geser ke bawah */
  right: 15px; /* geser ke kanan */
  top: 20px;
  font-size: 28px; /* ukuran icon */
}
/* card end */

/* grafik Start */
.graft {
  position: relative;
  width: 100%;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
}

.graft .grafik {
  position: relative;
  background: white;
  padding: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  display: flex;
  flex-direction: column; /* atas - bawah */
  align-items: flex-start;
}
.graft .grafik:hover {
  background: white;
  transform: translateY(-7px); /* kartu naik*/
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: 0.4s;
}
.grafik h6 {
  text-align: left;
  margin-bottom: 15px;
  font-weight: bold;
  color: black;
}
.graft .grafik canvas {
  width: 100% !important; /* biar responsive */
  max-width: 400px; /* batas maksimal */
  height: 220px !important; /* tinggi fix */
  display: block;
  margin: 0 auto;
}
/* grafik End*/

/* Jadwal Imunisasi  & data anak start */
.content2 {
  position: relative;
  width: 100%;
  padding: 4px;
  display: grid;
  grid-gap: 30px;
  margin-top: 10px;
}
.content2 .jadmun {
  position: relative;
  background: white;
  padding: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  display: flex;
  flex-direction: column; /* atas - bawah */
  align-items: flex-start;
}
.content2 .jadmun:hover {
  background: white;
  color: white;
  transform: translateY(-7px); /* kartu naik*/
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: 0.4s;
}
.jadmun h6 {
  text-align: left;
  font-weight: bold;
  margin-bottom: 15px;
  color: black;
}
.jadmun .table th {
  padding: 15px;
  text-align: left;
  font-weight: bold;
  color: black;
  border-bottom: 1px solid black;
}
.jadmun .table td {
  padding: 20px 15px;
  border-bottom: 1px solid black;
}

.jadmun .table tr:hover {
  color: white;
  transform: translateY(-5px); /* kartu naik*/
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: 0.4s;
}

/* Jadwal Imunisasi & data anak end */
/* Dashbord end */

/* Fitur Data Anak Start */

.graft2 {
  position: relative;
  width: 100%;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
}

.graft2 .grafik2 {
  background: white;
  padding: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  height: 300px; /* tinggi proporsional */
}

.grafik2 h6 {
  text-align: left;
  margin-bottom: 10px;
  font-weight: bold;
  color: black;
}

/* Canvas isi card tapi tidak terlalu membesar */
.grafik2 canvas {
  width: 100% !important; /* biar responsive */
  max-width: 400px; /* batas maksimal */
  height: 220px !important; /* tinggi fix */
  display: block;
  margin: 0 auto;
}

.table-container {
  position: inherit;
  width: 100%;
  margin: 10px auto;
  background: #fff;
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.2);
}

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

.search-box-anak {
  position: relative;
  width: 800px;
}

.search-box-anak input {
  width: 100%;
  padding: 10px 35px;
  border: none;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  outline: none;
}

.search-box-anak i {
  position: absolute;
  left: 760px;
  top: 10px;
  color: gray;
}

.table-header select,
.export-btn {
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.export-btn {
  background: #fff;
  transition: 0.3s;
}

.export-btn:hover {
  background: #f0f0f0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.data-table th {
  font-weight: 600;
}

.data-table td img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.data-table td span {
  vertical-align: middle;
}

.data-table td i.fa-eye {
  color: black;
  cursor: pointer;
  transition: 0.3s;
}

.data-table td i.fa-eye:hover {
  color: red;
}
.data-table td i.fa-trash {
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.data-table td i.fa-trash:hover {
  color: red;
}

/* Status Colors */
.status {
  padding: 5px 10px;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  font-size: 12px;
}

.aksi .btn-detail {
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 5px 2px;
  cursor: pointer;
  transition: 0.2s;
}

.aksi .btn-detail:hover {
  background-color: #2980b9;
}
/* Fitur Data Anak end */

/* fitur Jadwal Imunisasi Start */
.table-container2 {
  position: relative;
  width: 100%;
  margin: 40px auto;
  background: #fff;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.2);
}

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

.table-header input,
.table-header select {
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  background: #fff;
  font-size: 14px;
  outline: none;
}

.add-btn {
  background: #0066ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  cursor: pointer;
}
.add-btn:hover {
  background: #0052cc;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.data-table td img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 10px;
}

.data-table td span {
  vertical-align: middle;
}

/* Status Colors */
.status {
  padding: 6px 12px;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}
.status.lengkap {
  background: #00d084;
}
.status.proses {
  background: #7fb3d5;
}
.status.belum {
  background: #ff4242;
}

.search-box-jadwal {
  position: relative;
  width: 800px;
}

.search-box-jadwal input {
  width: 100%;
  padding: 10px 35px;
  border: none;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  outline: none;
}

.search-box-jadwal i {
  position: absolute;
  left: 750px;
  top: 10px;
  color: gray;
}
/* Form Style */
.form-container {
  width: 40%;
  border: 2px solid #007bff;
  border-radius: 5px;
  padding: 15px 25px;
}

.form-container h3 {
  margin-bottom: 15px;
}

.form-container form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-container label {
  font-weight: 500;
  margin-top: 5px;
}

.form-container input {
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.save-btn {
  background: #0066ff;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.save-btn:hover {
  background: #004dcc;
}
/* fitur Jadwal Imunisasi End */

/* fitur artikel start */
.artikel-container {
  position: inherit;
  width: 100%;
  margin: 40px auto;
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.2);
}

/* Header bagian atas */
.artikel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

/* Kotak pencarian */
.search-box {
  position: relative;
  width: 800px;
}

.search-box input {
  width: 100%;
  padding: 10px 35px;
  border: none;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  outline: none;
}

.search-box i {
  position: absolute;
  left: 750px;
  top: 10px;
  color: gray;
}

.modal {
  z-index: 9999 !important;
}
/* Tombol tambah */
.add-article {
  background: #0066ff;
  z-index: 10;
  position: relative;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: 0.3s;
}
.add-article:hover {
  background: #004dcc;
}

/* Tabel artikel */
.artikel-table {
  width: 100%;
  border-collapse: collapse;
}

.artikel-table th,
.artikel-table td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.artikel-table th {
  font-weight: 600;
}
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.badge-success {
  background: #28a745;
  color: #fff;
}

.badge-danger {
  background: #dc3545;
  color: #fff;
}

/* fitur artikel end */

/* fitur akun admin start */
.profile-container {
  width: 100%;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Kartu Profil Admin */
.profile-card {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#profileImage {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #eee;
}

#previewFoto {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ccc;
}

.profile-info h3 {
  font-size: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-info p {
  margin: 5px 0 0;
  color: gray;
}

/* Kartu Data User */
.user-card {
  background: #fff;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.user-card h4 {
  font-weight: 600;
  margin-bottom: 15px;
}

/* Tabel user */
.user-table {
  width: 100%;
  border-collapse: collapse;
}

.user-table th,
.user-table td {
  text-align: left;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.user-table th {
  font-weight: 600;
}

.aksi {
  text-align: center;
}

/* fitur akun admin end */

.aksi .btn.edit,
.aksi .btn-primary.edit {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: white !important;
}

.aksi .btn.edit:hover,
.aksi .btn-primary.edit:hover {
  background-color: #0b5ed7 !important;
  border-color: #0a58ca !important;
  color: white !important;
}

.aksi .btn.delete,
.aksi .btn-danger.delete {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
}

.aksi .btn.delete:hover,
.aksi .btn-danger.delete:hover {
  background-color: #bb2d3b !important;
  border-color: #b02a37 !important;
  color: white !important;
}

/* main end */

@media (max-width: 992px) {
  .sidebar {
    width: 85px; /* Sidebar default lebih kecil */
  }

  /* Navbar dan Main menyesuaikan dengan sidebar yang lebih kecil */
  .navbar,
  main {
    margin-left: 85px;
    left: 85px;
    width: calc(100% - 85px);
  }
  .sidebar.active {
    width: 300px; /* Saat aktif, lebar penuh */
  }
  .sidebar.active ~ .navbar,
  .sidebar.active ~ main {
    margin-left: 300px;
    left: 300px;
    width: calc(100% - 300px);
  }

  /* Sembunyikan teks menu di sidebar yang lebih kecil */
  .sidebar ul li a span {
    display: none;
  }
  .sidebar.active ul li a span {
    display: inline;
  }

  .sidebar .nama-web h1 {
    display: none; /* Sembunyikan teks nama web */
  }
  .sidebar.active .nama-web h1 {
    display: block;
  }
}

/* Ponsel/Layar Kecil (Max 768px) */
@media (max-width: 768px) {
  /* Atur Sidebar */
  .sidebar {
    width: 0; /* Sembunyikan sidebar secara default */
    left: -80px;
  }
  .sidebar.active {
    width: 250px; /* Munculkan sidebar saat aktif */
    left: 0;
  }

  /* Atur Navbar dan Main */
  .navbar {
    margin-left: 0; /* Navbar memenuhi lebar penuh */
    width: 100%;
    padding: 10px 15px;
    /* Sembunyikan search bar di navbar */
    .search {
      display: none;
    }
  }
  main {
    margin-left: 0;
    left: 0;
    width: 100%;
    padding: 10px;
  }

  /* Saat sidebar aktif, main akan bergeser ke kanan */
  .sidebar.active ~ .navbar {
    margin-left: 250px;
  }
  .sidebar.active ~ main {
    left: 250px;
    width: calc(100% - 250px);
    /* Tambahkan overflow hidden agar tidak ada scrollbar horizontal berlebih */
    overflow-x: hidden;
  }

  /* User Profile di Navbar */
  .user-profile {
    /* Kurangi margin dan ukuran */
    margin-right: 0;
  }
  .user-profile h4,
  .user-profile small {
    display: none; /* Sembunyikan nama dan role di navbar kecil */
  }

  /* Penyesuaian Grid Content */
  .content,
  .graft,
  .content2,
  .graft2 {
    grid-template-columns: 1fr; /* Semua grid menjadi satu kolom */
    padding: 0;
  }
  .content .card,
  .graft .grafik,
  .content2 .jadmun,
  .content2 .datnak {
    margin-bottom: 15px;
  }

  /* Sidebar saat aktif, teks nama web muncul */
  .sidebar .nama-web h1 {
    display: block;
  }
}

/* Ponsel Sangat Kecil (Max 480px) */
@media (max-width: 480px) {
  /* Penyesuaian saat sidebar aktif */
  .sidebar.active {
    width: 100%; /* Sidebar mengambil lebar penuh saat aktif */
  }
  .sidebar.active ~ .navbar,
  .sidebar.active ~ main {
    margin-left: 0; /* Tidak ada offset main */
    left: 0;
    width: 100%;
  }

  /* User Profile di Navbar */
  .user-profile img {
    width: 35px;
    height: 35px;
  }

  /* Penyesuaian elemen tabel header */
  .table-header {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box-anak,
  .search-box-jadwal,
  .search-box {
    width: 100%;
    order: 1;
  }
  .table-header select,
  .export-btn,
  .add-btn,
  .add-article {
    width: 100%;
    margin-top: 5px;
    order: 2;
  }
}

/* Tablet (Max 992px) */
@media (max-width: 992px) {
  .sidebar {
    width: 85px;
  }

  .navbar,
  main {
    margin-left: 85px;
    left: 85px;
    width: calc(100% - 85px);
  }

  .sidebar.active {
    width: 300px;
  }

  .sidebar.active ~ .navbar,
  .sidebar.active ~ main {
    margin-left: 300px;
    left: 300px;
    width: calc(100% - 300px);
  }

  .sidebar ul li a span {
    display: none;
  }

  .sidebar.active ul li a span {
    display: inline;
  }

  .sidebar .nama-web h1 {
    font-size: 1.2rem; /* ✅ Tambahkan ini */
    padding: 1rem 0; /* ✅ Kurangi padding */
    text-align: center; /* ✅ Ratakan tengah */
    display: none;
  }

  .sidebar.active .nama-web h1 {
    display: block;
  }

  /* ✅ Grid jadi 1 kolom di tablet */
  .graft,
  .graft2 {
    grid-template-columns: 1fr;
  }
}

/* Mobile (Max 768px) */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    left: -80px;
  }

  .sidebar.active {
    width: 250px;
    left: 0;
  }

  .navbar {
    margin-left: 0;
    width: 100%;
    padding: 10px 15px;
  }

  main {
    margin-left: 0;
    left: 0;
    width: 100%;
    padding: 10px;
  }

  .sidebar.active ~ .navbar {
    margin-left: 250px;
  }

  .sidebar.active ~ main {
    left: 250px;
    width: calc(100% - 250px);
    overflow-x: hidden;
  }

  .user-profile h4,
  .user-profile small {
    display: none;
  }

  /* ✅ Semua grid jadi 1 kolom */
  .content,
  .graft,
  .content2,
  .graft2 {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .content .card,
  .graft .grafik,
  .content2 .jadmun {
    margin-bottom: 15px;
  }

  /* ✅ Sidebar nama web */
  .sidebar .nama-web h1 {
    display: block;
    font-size: 1.2rem;
    padding: 1rem;
    text-align: center;
  }

  /* ✅ Card body icon lebih kecil */
  .card-body i {
    font-size: 20px;
  }

  /* ✅ Tabel scroll horizontal */
  .data-table,
  .artikel-table,
  .user-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Mobile Kecil (Max 480px) */
@media (max-width: 480px) {
  .sidebar.active {
    width: 100%;
  }

  .sidebar.active ~ .navbar,
  .sidebar.active ~ main {
    margin-left: 0;
    left: 0;
    width: 100%;
  }

  .user-profile img {
    width: 35px;
    height: 35px;
  }

  /* ✅ Table header vertikal */
  .table-header,
  .artikel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-box-anak,
  .search-box-jadwal,
  .search-box {
    width: 100%;
    max-width: 100%;
    order: 1;
  }

  .table-header select,
  .export-btn,
  .add-btn,
  .add-article {
    width: 100%;
    margin-top: 5px;
    order: 2;
  }

  /* ✅ Nama web lebih kecil */
  .sidebar .nama-web h1 {
    font-size: 1rem;
    padding: 0.8rem;
  }

  /* ✅ Navbar bar */
  .bar h2 {
    font-size: 1 2rem;
    margin-left: 1rem;
  }
}
/* ===== MODAL DETAIL MODERN ===== */
#modalDetail .modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0 25);
  overflow: hidden;
}

#modalDetail .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 1.5rem 2rem;
}

#modalDetail .modal-title {
  color: white;
  font-weight: 700;
  font-size: 1 4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

#modalDetail .modal-title i {
  font-size: 1.2rem;
}

#modalDetail .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0 3s ease;
}

#modalDetail .modal-header .btn-close:hover {
  opacity: 1;
}

#modalDetail .modal-body {
  padding: 2rem;
  background: #f8fafc;
}

#modalDetail .modal-footer {
  border: none;
  padding: 1rem 2rem 1 5rem;
  background: #f8fafc;
}

/* Profile Card */
.detail-profile-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0 1);
  margin-bottom: 1.5rem;
}

.detail-profile-header {
  display: flex;
  align-items: center;
  gap: 1 5rem;
  margin-bottom: 1 5rem;
  padding-bottom: 1 5rem;
  border-bottom: 2px dashed #e2e8f0;
}

.detail-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
}

.detail-avatar.male {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0 4);
}

.detail-avatar.female {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.4);
}

.detail-info h4 {
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  font-size: 1.5rem;
}

.detail-info .badge-gender {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.detail-info .badge-gender.male {
  background: #dbeafe;
  color: #1d4ed8;
}

.detail-info .badge-gender.female {
  background: #fce7f3;
  color: #be185d;
}

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

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-icon.age {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.stat-icon.parent {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.stat-icon.email {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.stat-content label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-content span {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

/* Imunisasi Section */
.imunisasi-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.imunisasi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.imunisasi-header h5 {
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.imunisasi-header h5 i {
  color: #667eea;
}

.imunisasi-count {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Modern Table */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table thead th {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  border: none;
  text-align: left;
}

.modern-table thead th:first-child {
  border-radius: 12px 0 0 12px;
}

.modern-table thead th:last-child {
  border-radius: 0 12px 12px 0;
}

.modern-table tbody tr {
  transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
  background: #f8fafc;
}

.modern-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 0.9rem;
  vertical-align: middle;
}

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

/* Vaccine Name with Icon */
.vaccine-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.vaccine-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f46e5;
  font-size: 0.9rem;
}

/* Age Badge */
.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #92400e;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.age-badge i {
  font-size: 0.7rem;
}

/* Date Display */
.date-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-display .date {
  font-weight: 600;
  color: #1e293b;
}

.date-display .day {
  font-size: 0 75rem;
  color: #94a3b8;
}

/* Status Badge Modern */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.status-badge:hover {
  transform: scale(1.05);
}

.status-badge.sudah {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.status-badge.sudah i {
  color: #10b981;
}

.status-badge.belum {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.status-badge.belum i {
  color: #f59e0b;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
}

.empty-state i {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.empty-state h6 {
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
}

/* Modal Footer Button */
#modalDetail .btn-close-modern {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#modalDetail .btn-close-modern:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .detail-profile-header {
    flex-direction: column;
    text-align: center;
  }

  .detail-stats {
    grid-template-columns: 1fr;
  }

  .modern-table {
    font-size: 0.85rem;
  }

  .modern-table thead th,
  .modern-table tbody td {
    padding: 0.75rem 0.5rem;
  }

  .vaccine-icon {
    display: none;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#modalDetail.show .modal-content {
  animation: fadeInUp 0.3s ease;
}
