
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "DM Sans", sans-serif;
}

.admin-container {
  display: flex;
  min-height: 100vh; /* Pastikan tinggi sesuai layar */
}
.login-container {
  justify-content: center;
  margin: 20px auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  width: 300px;
  text-align: center;
}
.login-container h2 {
  color: #0f8950;
  font-size: 20px;
  font-weight: 700;
}
.login-container label {
  font-size: 12px;
  margin: auto;
  text-align: right;
}

.login-container input {
  width: 70%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.login-container button {
  width: 100%;
  padding: 10px;
  background: #0f8950;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.login-container button:hover {
  background: #0b6840;
}
.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.sidebar {
  width: 250px;
  background:linear-gradient(180deg, #12553d 0%, #0e3b31 49.17%, #0a2225 100%);
  box-shadow: 0px 4px 4px 0px #00000040;
  color: #ffffff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh; /* Sidebar memiliki tinggi penuh */
  position: fixed; /* Sidebar tetap di posisi */
  top: 0;
  left: 0;
  overflow-y: auto; /* Jika konten panjang, sidebar bisa di-scroll */
}

.sidebar h2 {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}

.sidebar ul {
  list-style: none;
  width: 100%;
}

.sidebar ul li {
  width: 100%;
}

.sidebar ul li a {
  display: block;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  background-color: #0b6840;
  border-radius: 5px;
}

/* Konten utama */
.content {
  flex: 1;
  margin-left: 250px; /* Sesuai dengan lebar sidebar */
  padding: 20px;
  min-height: 100vh; /* Agar mengikuti tinggi sidebar */
  display: flex;
  flex-direction: column;
}

/* Header */
.content header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.content header h2 {
  font-size: 24px;
  color: #333;
  text-align: center;
  display: flex;
  margin: auto;
}

/* Tombol tambah */
.add-btn {
  padding: 8px 12px;
  background: linear-gradient(180deg, #12553d 0%, #0e3b31 49.17%, #0a2225 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: 14px;
  transition: background 0.3s ease-in-out;
  margin-bottom: 20px;
}

.add-btn:hover {
  background-color: #0b6840;
}

/* Search dan Filter */
.search-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-filter input,
.search-filter select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

.search-filter input {
  width: 300px;
}

/* Tabel Data */
.table-container {
  display: none; /* Awalnya disembunyikan */
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

th {
  background: linear-gradient(180deg, #12553d 0%, #0e3b31 49.17%, #0a2225 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  color: white;
}

td .edit-btn,
td .delete-btn {
  display: block; /* ini bikin tombol tampil di baris terpisah */
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  margin: 5px auto; /* kasih margin atas bawah dan tengahin horizontal */
  text-align: center;
  width: 80px; /* opsional, biar ukuran tombol konsisten */
}

td .edit-btn {
  background-color: #ffc107;
  color: black;
}

td .delete-btn {
  background-color: #dc3545;
  color: white;
}

td .edit-btn:hover {
  background-color: #e0a800;
}

td .delete-btn:hover {
  background-color: #c82333;
}

/* Pagination */
.pagination {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination button {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  margin: 0 5px;
  cursor: pointer;
  background-color: #0f8950;
  color: white;
  transition: 0.3s;
}

.pagination button:hover {
  background-color: #0b6840;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  overflow-y: auto; /* Tambahkan agar modal bisa di-scroll */
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  align-items: center;
  margin: auto;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 15px;
}

.modal-content label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modal-content button {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  background-color: #0f8950;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.modal-content button:hover {
  background-color: #0b6840;
}

.close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
  color: red;
}

/* Grid Lembaga */
.grid-lembaga {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
  padding-bottom: 50px; /* Beri jarak dari bawah */
  width: 80%;
  margin-left: auto;
}

/* Item Lembaga */
.lembaga-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: white;
  border: 1px solid #0f8950;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  width: 180px;
  box-shadow: 5px 8px 24px 0px rgba(76, 76, 76, 0.233);
}

.lembaga-item img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

.lembaga-item:hover {
  background-color: rgb(180, 182, 183);
}

/* Tombol kembali */
.back-btn {
  background: linear-gradient(180deg, #12553d 0%, #0e3b31 49.17%, #0a2225 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  margin: 10px 0;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .content {
    margin-left: 0;
    width: 100%;
    min-height: auto;
  }

  .grid-lembaga {
    flex-direction: column;
  }
}

/* dashboard*/
.grid-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.card p {
  font-size: 24px;
  font-weight: bold;
  color: #0f8950;
}
/* ===== Modal Styling ===== */
#editModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  background: #fff;
  padding: 20px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  z-index: 1000;

  /* Tambahkan Scroll */
  max-height: 80vh; /* Modal maksimal 80% dari tinggi layar */
  overflow-y: auto; /* Aktifkan scroll jika konten melebihi modal */
}

/* Styling untuk header modal */
#editModal h3 {
  margin-bottom: 15px;
  text-align: center;
}

/* Styling label dan input */
#editModal label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

#editModal input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* ===== Button Styling ===== */
#editModal button {
  display: inline-block;
  width: 48%;
  padding: 10px;
  margin-top: 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

#editModal button[type="submit"] {
  background: #4caf50;
  color: white;
}

#editModal button[type="button"] {
  background: #f44336;
  color: white;
}

/* ===== Overlay untuk Modal (Background Abu-Abu) ===== */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}
/* Gaya untuk menu utama */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown > a {
  display: block;
  padding: 10px 15px;
  background: #2c3e50; /* Warna navbar */
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

/* Gaya untuk submenu */
.submenu {
  display: none;
  position: absolute;
  background: rgba(0, 0, 0, 0.801);
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #ddd;
  min-width: 180px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.submenu li {
  display: block;
}

.submenu a {
  display: block;
  padding: 8px 15px;
  color: #000;
  text-decoration: none;
  transition: background 0.3s;
}

.submenu a:hover {
  background: #f4f4f4;
}

/* Tampilkan submenu saat hover */
.dropdown:hover .submenu {
  display: block;
}
.containlemabagaadmin {
  width: 80%;
  margin-left: auto;
}

/*ini lala 20 3*/
/* === FORM PENCARIAN === */
.form-cari {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.form-cari input[type="text"] {
  width: 300px;
  padding: 8px 12px;
  border: 2px solid #0f8950;
  border-radius: 5px;
  outline: none;
  font-size: 14px;
}

.form-cari .btn-cari,
.form-cari .btn-reset {
  background: linear-gradient(180deg, #12553d 0%, #0e3b31 49.17%, #0a2225 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease;
}

.form-cari .btn-reset {
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 49.17%, #992d22 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.form-cari .btn-cari:hover {
  background-color: #0c6d3f;
}

.form-cari .btn-reset:hover {
  background-color: #c0392b;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 5px;
}

.pagination .btn {
  background-color: #0f8950;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.pagination .btn:hover {
  background-color: #0c6d3f;
}

.pagination .btn.active {
  background-color: #0a5f35;
  cursor: default;
}

.pagination .btn:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}
/* === TOMBOL KEMBALI === */
.btn-kembali {
  display: flex;
  background: linear-gradient(180deg, #12553d 0%, #0e3b31 49.17%, #0a2225 100%);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  margin-bottom: 15px;
  justify-content: center;
  align-items: center; /* Jarak dari elemen lain */
}

.btn-kembali:hover {
  background-color: #0c6d3f;
}
/* Wrapper tombol untuk Flexbox */
.tombol-aksi {
  display: flex;
  flex-direction: row;
  gap: 5px; /* Jarak antar tombol */
  justify-content: center;
}
.dots {
  padding: 0 5px;
  font-size: 14px;
  color: gray;
}
