/* --------------------------------------------------
   GLOBAL – White Gray Soft Theme
-------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f3f3f3; /* Putih abu */
  color: #333;
  display: flex;
  flex-direction: column;
}

html,
body {
  height: 100%;
}

/* Basic Input + Select */
input,
select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #ccc;
  margin-bottom: 12px;
  transition: 0.3s;
}

input:focus,
select:focus {
  border-color: #4caf50; /* Hijau soft */
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
  outline: none;
}

/* Button */
button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #4caf50; /* Hijau profesional */
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #3e8e41;
}

/* --------------------------------------------------
   HEADER – White Clean With Shadow
-------------------------------------------------- */
.header-admin-siswa {
  width: 100%;
  padding: 15px 40px;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* NAV */
.header-admin-siswa nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  align-items: center;
}

.header-admin-siswa nav ul li a {
  color: #444;
  text-decoration: none;
  font-size: 15px;
  transition: 0.2s;
}

.header-admin-siswa nav ul li a:hover {
  color: #4caf50;
}

/* USER INFO */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.user-info img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #4caf50; /* hijau tipis */
  object-fit: cover;
}

.user-info .nama-siswa {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* --------------------------------------------------
   CARD / FORM BOX – Abu Putih Bersih
-------------------------------------------------- */
.form-container,
.container-siswa,
.visi-misi,
.edit-siswa,
.login-container,
.login-admin-siswa {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e2e2;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  max-width: 800px;
  margin: 20px auto;
}

.form-container h2.judul-riwayat {
  text-align: center;
}

.btn-dft {
  color: #ffffff !important;
  text-decoration: none;
  background-color: #0cca68;
  display: inline-block;
  width: 100%;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  margin-top: 10px;
}
h2,
h3 {
  color: #4caf50;
  margin-bottom: 15px;
}

/* Upload File */
input[type="file"] {
  background: #fff;
  border: 1px solid #ccc;
}

/* foto img pendaftaran */
img.img-daftar {
  width: 100px;
  display: inline-block;
  margin: 0 auto;
}
/* eror */
.error-popup-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: rgba(255, 77, 77, 0.15);
  backdrop-filter: blur(12px);
  padding: 14px 22px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-left: 6px solid #ff3b3b;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  animation: slideDown 0.45s ease, fadeOut 0.6s ease 2.6s forwards;
  z-index: 9999;
}

.error-icon {
  font-size: 20px;
  color: #ff3b3b;
}

.eror-akun {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  color: #b30000;
  letter-spacing: 0.3px;
}

/* Animasi slide turun + fade in */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animasi fade out */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* succes */
.popup-success {
  position: fixed;
  top: 60px; /* geser ke bawah sedikit */
  left: 50%;
  transform: translateX(-50%);

  padding: 15px 25px;
  background: #7fcd78; /* hijau pudar */
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);

  animation: fadeout 3s forwards;
  z-index: 9999;
}

@keyframes fadeout {
  0%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* siswa di ditolak dan tidak bisa lihat form pendaftaran */
.text-tolak {
  background-color: #dc3545;
  text-align: center;
  margin: 10px auto;
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
}

.tolak-icon {
  font-size: 20px;
  color: #ff3b3b;
}

.text-tolak p {
  color: black;
}

/* siswa diterima */
.text-terima {
  background-color: #28a745;
  text-align: center;
  margin: 10px auto;
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
}

.terima-icon {
  font-size: 20px;
  color: #37e215;
}

.text-terima p {
  color: black;
}

/* siswa di proses */
.text-proses {
  background-color: #ffc107;
  text-align: center;
  margin: 10px auto;
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
}

.proses-icon {
  font-size: 20px;
  color: #cee83f;
}

.text-proses p {
  color: black;
}

/* Animasi slide turun + fade in */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animasi fade out */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* siswa tidak diketahu */
.text-none {
  background-color: #1c1c1a;
  text-align: center;
  margin: 10px auto;
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
}

.none-icon {
  font-size: 20px;
  color: #cee83f;
}

.text-none p {
  color: white;
}

/* Animasi slide turun + fade in */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animasi fade out */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

.btn-regis-login {
  text-decoration: none;
  color: #007f3b;
}

/* riwayat pendaftaran */
/* --------------------------------------------------
   RIWAYAT PENDAFTARAN – CARD STYLE
-------------------------------------------------- */

.riwayat-item {
  background: #fafafa;
  border: 1px solid #e2e2e2;
  padding: 18px 20px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: 0.25s;
}

.riwayat-item:hover {
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* Foto siswa */
.riwayat-item img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #4caf50;
  margin-bottom: 10px;
}

/* Info text */
.riwayat-item p {
  font-size: 14px;
  margin: 4px 0;
  color: #444;
}

/* Judul section */
.judul-riwayat {
  color: #4caf50;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------
   BADGE STATUS
-------------------------------------------------- */

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  margin: 6px 0;
}

/* --------------------------------------------------
   LINK DOKUMEN
-------------------------------------------------- */

.link-doc {
  display: inline-block;
  margin-top: 10px;
  background: #4caf50;
  color: white;
  text-decoration: none;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  transition: 0.3s;
}

.link-doc:hover {
  background: #3b8e40;
}

/* Grid dokumen */
.dokumen-list {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --------------------------------------------------
  ADMIN TABLE – Auto Width, No Wrap, Clean Style
-------------------------------------------------- */

.admin-container {
  width: max-content;
  max-width: 100%;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e2e2;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  margin: 20px auto;
  overflow-x: auto;
}

.tabel-siswa {
  width: max-content;
  border-collapse: collapse;
  white-space: nowrap;
}

.tabel-siswa th,
.tabel-siswa td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  font-size: 14px;
}

.tabel-siswa th {
  background: #f4f4f4;
  text-align: center;
  font-weight: 600;
}

.btn-detail {
  color: white;
  background-color: #1aff89;
  text-align: center;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
}

.btn-detail a {
  margin-top: 10px;
  text-decoration: none;
  color: white;
}

.btn-kembali {
  margin-top: 10px;
  color: white;
  background-color: #1aff89;
  text-align: center;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
}

.btn-kembali a {
  text-decoration: none;
  color: white;
}

.btn-kembali:hover {
  background-color: #0cca68;
}

footer.main-footer {
  background: #ffffff;
  border-top: 1px solid #ddd;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

footer.main-footer p {
  text-align: center;
  color: #101010;
}

/* --------------------------------------------------
   CUSTOM BUTTON - CENTERING (btn-kembali-pusat)
-------------------------------------------------- */
.btn-kembali-pusat {
  /* Logic untuk mengubah link menjadi blok */
  display: block;
  width: 200px; /* Atur lebar tombol */

  /* Centering Tombol di Tengah */
  margin: 20px auto;
  text-align: center;

  /* Gaya Tombol (menggunakan tema hijau yang sudah ada) */
  padding: 12px 20px;
  border-radius: 6px;
  background: #4caf50;
  color: white !important; /* Pastikan warna teks putih */
  font-weight: 600;
  text-decoration: none; /* Hapus garis bawah link */
  transition: 0.3s;
}

.btn-kembali-pusat:hover {
  background: #3e8e41; /* Efek hover */
}

/* table siswa melihat riwayatnya */
/* --------------------------------------------------
   TABLE BROWSE SISWA - RIWAYAT TABLE STYLE
-------------------------------------------------- */
/* Container utama untuk menampung semua kartu siswa */
.siswa-container {
  /* Menggunakan Flexbox atau Grid untuk tata letak yang responsif */
  display: grid;
  /* Membuat kartu berjejer ke samping dan otomatis pindah baris jika layar sempit */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; /* Jarak antar kartu */
  margin-top: 15px;
}

/* Styling untuk setiap kartu siswa (riwayat-item) */
.riwayat-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex; /* Untuk menyusun header, detail, dan dokumen */
  flex-direction: column;
}

/* Bagian Header (Foto dan Status) */
.riwayat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f4f4f4;
}

/* Styling Foto Siswa */
.siswa-foto {
  width: 60px;
  height: 60px;
  border-radius: 50%; /* Membuat foto bulat */
  object-fit: cover;
  border: 3px solid #4caf50; /* Border hijau */
}

/* Styling untuk status badge (menggunakan warna yang Anda definisikan) */
.status-badge {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
}
.status-proses {
  background-color: #ffc107; /* Kuning - Proses Verifikasi */
  color: #333;
}
.status-tolak {
  background-color: #dc3545; /* Merah - Ditolak */
  color: white;
}
.status-diterima {
  background-color: #28a745; /* Hijau - Diterima */
  color: white;
}
.status-none {
  background-color: #000000; /* Hitam - None */
  color: white;
}

/* Styling Detail Siswa */
.riwayat-detail {
  flex-grow: 1; /* Memastikan detail mengambil ruang sebanyak mungkin */
  margin-bottom: 15px;
  border: 1px solid #28a745;
  padding: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between; /* Membuat Label dan Value bersebelahan */
  padding: 5px 0;
  border: 1px dotted #e0e0e0;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #555;
  flex-basis: 40%; /* Mengatur lebar label */
  text-align: left;
}

.detail-value {
  color: #333;
  flex-basis: 60%; /* Mengatur lebar nilai */
  text-align: right; /* Rata kanan untuk nilai */
}

/* Styling Dokumen */
.riwayat-dokumen {
  padding-top: 10px;
  border-top: 1px solid #f4f4f4;
}

.dokumen-label {
  font-weight: 600;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

.dokumen-list {
  display: flex;
  flex-wrap: wrap; /* Memastikan link dokumen pindah baris jika terlalu banyak */
  gap: 8px;
}

.link-doc {
  /* Gaya link dokumen Anda, disarankan menggunakan gaya tombol */
  background-color: #0dd26c; /* Biru */
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.2s;
}

.link-doc:hover {
  background-color: #1aff89;
}

/* tombol edit delet */
.btn-edit {
  color: #ffffff !important;
  text-decoration: none;
  margin-top: 10px;
  background-color: #1aff89;
  text-align: center;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
}
.btn-delete {
  color: #ffffff !important;
  text-decoration: none;
  margin-top: 10px;
  background-color: #ff1a1a;
  text-align: center;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
}

.btn-tambah {
  color: #ffffff !important;
  text-decoration: none;
  margin-top: 10px;
  background-color: #4caf50;
  text-align: center;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
}

/* dasbor admin */
.dashboard-card {
  background: #13da6d;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #ababab;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  margin: 20px auto;
  display: flex;
  width: 300px;
  flex-wrap: wrap;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: bold;
  font-size: 30px;
  justify-content: center;
  align-items: center;
}

.dashboard-container {
  gap: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-card .img-dashboard-admin img {
  margin-top: 10px;
  width: 150px;
  border-radius: 10px;
}
/* footer */
footer.main-footer {
  background: #ffffff;
  border-top: 1px solid #ddd;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  margin-top: auto;
}

footer.main-footer p {
  text-align: center;
  color: #4caf50;
  font-weight: bold;
}

.eror-jurusan {
  text-align: center;
  color: red;
  width: 250px;
  margin: 10px auto;
}

.edit-form-siswa img {
  width: 100px;
  border-radius: 20%;
  border: 2px solid #4caf50; /* hijau tipis */
  object-fit: cover;
}

/* Styling for Admin Status Update Buttons */
.status-update-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* Base button style for these specific actions, overriding default button/btn-detail */
.status-update-container button.btn-detail {
  width: auto;
  cursor: pointer;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
}

/* Button style for DITERIMA (Status 1) */
.btn-terima {
  background-color: #28a745;
}
.btn-terima:hover {
  background-color: #1c6e2f;
}
/* Button style for DITOLAK (Status 2) */
.btn-tolak {
  background-color: #dc3545;
}
.btn-tolak:hover {
  background-color: #c12736;
}

/* Button style for PROSES (Status 0) */
.btn-proses {
  background-color: #ffc107;
  color: #333; /* Warna teks gelap untuk latar belakang terang */
}
.btn-proses:hover {
  background-color: #e3ad0a;
  color: #333; /* Warna teks gelap untuk latar belakang terang */
}

/* Utility Class for Margin */
.mt-20 {
  margin-top: 20px;
}

.eror-validasi {
  margin-bottom: 10px;
  color: red;
  font-size: 12px;
  text-align: right;
}

.nb {
  font-size: 12px;
  color: red;
  font-style: italic;
}

.judul-riwayat {
  margin-top: 20px;
}

.verif-siswa {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* =========================================
   RESPONSIVE MEDIA QUERIES (TAMBAHAN)
   ========================================= */

/* --- Tablet & Layar Kecil (Max Width 768px) --- */
@media screen and (max-width: 768px) {
  /* 1. Header menjadi tumpuk (Stack) */
  .header-admin-siswa {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    text-align: center;
  }

  .header-admin-siswa nav ul {
    gap: 10px;
    flex-wrap: wrap; /* Agar menu turun ke bawah jika sempit */
    justify-content: center;
  }

  /* 2. Container agar tidak terlalu mepet layar */
  .form-container,
  .container-siswa,
  .visi-misi,
  .edit-siswa,
  .login-container,
  .login-admin-siswa,
  .admin-container {
    width: 95%; /* Gunakan persentase, bukan fixed width */
    margin: 15px auto;
    padding: 15px;
  }

  /* 3. Dashboard Admin (Kartu menjadi vertikal) */
  .dashboard-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .dashboard-card {
    width: 100%; /* Kartu memenuhi lebar container */
    max-width: 400px; /* Batasi agar tidak terlalu lebar */
  }

  /* 4. Perbaikan Tabel Admin agar bisa di-scroll horizontal */
  .admin-container {
    width: 95%;
    display: block; /* Override flex/max-content */
    overflow-x: auto; /* Scrollbar horizontal jika tabel kepanjangan */
  }

  .tabel-siswa {
    width: 100%;
  }
}

/* --- HP / Layar Sangat Kecil (Max Width 480px) --- */
@media screen and (max-width: 480px) {
  /* 1. Font lebih kecil sedikit agar muat */
  h2 {
    font-size: 20px;
  }
  h3 {
    font-size: 18px;
  }

  /* 2. Navigasi Header lebih rapi di HP */
  .header-admin-siswa nav ul li a {
    font-size: 13px;
    padding: 5px;
  }

  /* 3. Detail Riwayat (Label dan Isi menjadi atas-bawah) */
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-label {
    flex-basis: 100%;
    margin-bottom: 2px;
    color: #4caf50; /* Highlight label sedikit */
  }

  .detail-value {
    flex-basis: 100%;
    text-align: left; /* Rata kiri untuk nilai */
  }

  /* 4. Tombol di halaman detail (Terima/Tolak) menjadi vertikal */
  .status-update-container {
    flex-direction: column;
  }

  .status-update-container button {
    width: 100%;
  }

  /* 5. Popup Eror/Sukses agar tidak kepotong */
  .error-popup-container,
  .popup-success {
    min-width: 90%;
    width: 90%;
    font-size: 14px;
  }

  /* 6. Login Form Image/Input */
  .login-admin-siswa-input input {
    font-size: 14px;
  }
}

.eror-404 {
  background-color: #007f3b;
  max-width: 300px;
  padding: 10px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}
