/* (same as previous but included here) */
* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}
body {
  margin: 0;
  background: #f3f5f6;
}
.topbar {
  height: 60px;
  background: #1abc9c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.topbar .brand {
  font-weight: 700;
}
.topbar .userbox {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .online {
  background: #2ecc71;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}
/* .container{display:flex} */
.sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #e6e6e6;
  padding: 16px;
  min-height: calc(100vh - 60px);
}
.sidebar .profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}
.avatar.small {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eee;
  margin-bottom: 8px;
}
.nav a {
  display: block;
  padding: 8px 6px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  margin: 4px 0;
}
.nav a:hover {
  background: #f1f1f1;
}
.content {
  flex: 1;
  padding: 20px;
}
.page-title {
  font-size: 20px;
  margin-bottom: 12px;
}
.card {
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.btn {
  background: #3498db;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.btn.small {
  padding: 6px 8px;
  font-size: 13px;
}
.btn.ghost {
  background: #fff;
  color: #d84315;
  border: 2px solid #d84315;
}
.filter input {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th,
.tbl td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

/* Login */
.login-bg {
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 360px;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.login-card h1 {
  margin: 0 0 12px;
}
.login-card label {
  display: block;
  margin-top: 8px;
}
.login-card input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.login-card button {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border: none;
  background: #d84315;
  color: #fff;
  border-radius: 6px;
}
.alert {
  background: #fdecea;
  color: #611a15;
  padding: 8px;
  border-radius: 6px;
}
.hint {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
}

/* Form rows */
.form-row {
  margin-bottom: 12px;
}
.form-row label {
  display: block;
  margin-bottom: 6px;
}
.form-row input[type="text"],
.form-row input[type="date"],
.form-row select {
  width: 100%;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}

/* ensure topbar doesn't overlap content */
body {
  margin: 0;
}
.topbar {
  position: relative;
  z-index: 20;
}

/* main container uses flex (you already have .container and .sidebar, .content) */
/* responsive: for small screens, hide sidebar by default and show toggle */
@media (max-width: 767px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    left: -280px; /* hidden */
    top: 60px; /* below topbar (topbar height) */
    height: calc(100vh - 60px);
    width: 240px;
    transition: left 0.25s ease;
    z-index: 1000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }
  .sidebar.open {
    left: 0;
  }
  .content {
    padding: 16px;
  }
  #sidebar-toggle {
    display: inline-block;
  }
  /* dim overlay when sidebar open */
  .sidebar-overlay {
    position: fixed;
    inset: 60px 0 0 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 900;
    display: none;
  }
  .sidebar-overlay.show {
    display: block;
  }
}

/* Pastikan card admin sejajar dan memiliki tinggi sama */
.equal-card {
  min-height: 150px;
}
/* Untuk estetika, buat teks angka lebih konsisten */
.display-5 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.modal-premium .modal-content {
  border-radius: 15px;
  overflow: hidden;
  border: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.modal-premium .modal-header {
  background: linear-gradient(135deg, #f8f9fa, #eef1f5);
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
}

.modal-premium .modal-body {
  background: #fafbfc;
  padding: 1.5rem 1.8rem;
}

.modal-premium .modal-footer {
  background: #f7f9fb;
  border-top: 1px solid #dee2e6;
  padding: 1rem;
}

.detail-row {
  padding: 10px 0;
  border-bottom: 1px dashed #d6d8db;
}
.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #555;
}

.form-row-premium {
  margin-bottom: 18px;
  padding: 12px 10px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e8e9ec;
}

.form-row-premium label {
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

/* ------------------------- */
/* approval & layanan.php */
/* ------------------------- */
.search-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-input {
  width: 320px;
  padding: 6px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}
.search-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: 0;
  background: #1d4ed8;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

/* ------------------------- */
/* Filter Button */
/* ------------------------- */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  cursor: pointer;
}
.filter-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.filter-icon {
  width: 18px;
  height: 18px;
}

/* ------------------------- */
/* Table + Sorting */
/* ------------------------- */
.table.tbl th,
.table.tbl td {
  vertical-align: middle;
}
th.sortable {
  cursor: pointer;
  user-select: none;
}
.sort-indicator {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.9;
}
th.sortable:hover {
  background: #fbfdff;
}

/* ------------------------- */
/* Dropdown */
/* ------------------------- */
.dropdown.position-static {
  position: static !important;
}
.dropdown-menu {
  min-width: 180px;
  padding: 6px 0;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  z-index: 1100;
}
.dropdown .dropdown-menu {
  display: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
  position: absolute;
}
.dropdown.show .dropdown-menu,
.dropdown .dropdown-menu.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}
.dropdown-menu-end {
  margin-top: 6px;
}

/* Checkmark */
.checkmark {
  width: 18px;
  display: inline-block;
  text-align: center;
  color: transparent;
}
.filter-item.active .checkmark {
  color: #198754;
}
.filter-item.active .checkmark::before {
  content: "✔";
  font-size: 12px;
}

/* Fallback: Button-like menu item */
.dropdown-item.button-like {
  display: block;
  width: 100%;
  padding: 0.25rem 1rem;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.dropdown-item.button-like:hover {
  background: #f8f9fa;
}

/* Mobile */
@media (max-width: 768px) {
  .search-input {
    width: 180px;
  }
}

/* BRAND PADA NAVBAR */
.brand {
  position: relative;
  flex: 1;
  height: 60px;
  display: flex;
  align-items: center;
}

/* TOMBOL BURGER — SELALU DI KIRI */
.burger-btn {
  position: absolute;
  left: 0;
  top: 35%;
  transform: translateY(-50%);

  background: #1abc9c !important; /* warna sama seperti topbar */
  border: none;
  color: #fff;
  font-size: 15px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
}

/* JUDUL — SELALU DI TENGAH NAVBAR */
.brand-title {
  position: absolute;
  left: 70%;
  transform: translateX(-50%);
  font-weight: 900;
  font-size: 20px;
  color: #fff;
  pointer-events: none; /* penting agar klik tidak terganggu */
}
