/* ================================== */
/* GAYA GLOBAL & DASAR                */
/* ================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

/* ================================== */
/* KOMPONEN YANG DAPAT DIPAKAI ULANG  */
/* ================================== */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: scale(1.02);
}

.btn-primary {
  background-color: #2a7854;
  color: white;
}
.btn-primary:hover {
  background-color: #226144;
}

.btn-secondary {
  background-color: #eaeaea;
  color: #555;
}
.btn-secondary:hover {
  background-color: #dcdcdc;
}

/* =========================================== */
/* GAYA LAYOUT UTAMA (Digunakan oleh kedua halaman) */
/* =========================================== */
.home-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Fallback untuk browser lama */
  min-height: 100dvh; /* Menggunakan Dynamic Viewport Height */
  overflow: hidden; /* Mencegah body dari scrolling */
}

.mobile-container {
  width: 100%;
  max-width: 420px;
  height: 100vh; /* Fallback untuk browser lama */
  height: 100dvh; /* Mengunci ke tinggi layar yang terlihat */
  max-height: 840px;
  background-color: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN UTAMA (SLIDER)      */
/* =========================================== */
.image-section {
  position: relative;
  flex-shrink: 0;
  height: 45%;
  overflow: hidden;
}

.slider-wrapper {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  width: calc(100% / 3);
  height: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dots-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background-color: white;
}

.content-section {
  background-color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  margin-top: -24px;
  position: relative;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.content-section h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.content-section p {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.6;
  margin-bottom: auto;
  padding-bottom: 1.5rem;
}

.action-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guest-link {
  margin-top: 1rem;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN DAFTAR (FORM)    */
/* =========================================== */
.page-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eeeeee;
  flex-shrink: 0; /* Mencegah header menyusut */
}

.page-header h1 {
  flex-grow: 1;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  margin-left: -24px;
}

.main-content {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto; /* Agar bisa scroll jika kontennya panjang */
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.phone-input-group {
  display: flex;
  align-items: center;
}

.country-code {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #f7f7f7;
  border: 1px solid #dddddd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 1rem;
}

input[type="tel"] {
  flex-grow: 1;
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #dddddd;
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
}

input[type="tel"]:focus {
  outline: none;
  border-color: #2a7854;
  box-shadow: 0 0 0 3px rgba(42, 120, 84, 0.15);
}

.helper-text {
  font-size: 0.8rem;
  color: #888888;
}

/* =========================================== */
/* GAYA BARU UNTUK FORM DENGAN STICKY FOOTER */
/* =========================================== */

.form-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  /* Mencegah konten keluar dari wrapper */
  overflow: hidden;
}

/* Penyesuaian untuk action-footer */
.action-footer {
  padding: 1rem 1.5rem;
  background-color: #ffffff;
  border-top: 1px solid #eeeeee;
  flex-shrink: 0; /* Mencegah footer menyusut */
}

/* Menambahkan style untuk tombol kembali agar lebih besar */
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* Memberi ruang 8px di sekeliling ikon */
  border-radius: 50%; /* Membuat area klik menjadi bulat */
  transition: background-color 0.2s ease;
}

.back-button:hover {
  background-color: #f1f1f1; /* Memberi efek visual saat disentuh */
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN VERIFIKASI (OTP)      */
/* =========================================== */
.verification-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.verification-page h2 {
  font-size: 1.75rem; /* 28px */
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.instruction-text {
  color: #666;
  max-width: 250px;
  margin-bottom: 2rem;
}

.timer {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  color: #333;
  margin-bottom: 1.5rem;
}

.otp-input-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 2rem;
}

.otp-input {
  width: 45px;
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
  border: 1px solid #ccc;
  border-radius: 8px;
  /* Mencegah tombol panah muncul di input type number */
  -moz-appearance: textfield;
  appearance: textfield;
}
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-input:focus {
  outline: none;
  border-color: #2a7854;
  box-shadow: 0 0 0 3px rgba(42, 120, 84, 0.15);
}

.resend-text {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.resend-link {
  font-weight: 600;
  color: #2a7854;
  text-decoration: none;
}

.resend-link:hover {
  text-decoration: underline;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN REGISTRASI AKHIR      */
/* =========================================== */

.final-reg-form .form-group {
  margin-bottom: 1rem;
}

/* Gaya umum untuk semua input dan select */
.form-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  background-color: #fff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: #2a7854;
  box-shadow: 0 0 0 3px rgba(42, 120, 84, 0.15);
}

/* Wrapper untuk ikon di field password */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-input {
  padding-right: 2.5rem; /* Ruang untuk ikon mata */
}
.password-toggle-icon {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23cccccc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

/* Wrapper untuk panah dropdown custom */
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23888888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none; /* Agar bisa klik select di bawahnya */
}
select.form-input {
  color: #666;
}
select.form-input:invalid {
  color: #bbb;
}
select.form-input option {
  color: #333;
}

/* Grid untuk 2 kolom */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Area upload verifikasi wajah */
.face-verification-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 180px;
  background-color: #eeeeee;
  border: 2px dashed #cccccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.face-verification-box:hover {
  background-color: #e0e0e0;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN SUKSES                */
/* =========================================== */

.success-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* Menengahkan secara horizontal */
  justify-content: center; /* Menengahkan secara vertikal */
  text-align: center;
  height: 100%;
  padding: 2rem;
}

.success-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 1.5rem;
}

.success-icon-circle {
  fill: #e0f2e9; /* Warna hijau muda untuk lingkaran */
  stroke-width: 0;
}

.success-icon-checkmark {
  fill: none;
  stroke: #2a7854; /* Warna hijau tua untuk centang */
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-container h1 {
  font-size: 2rem; /* 32px */
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.success-container p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2.5rem;
}

.success-container .btn {
  max-width: 250px; /* Agar tombol tidak terlalu lebar */
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN LOGIN                 */
/* =========================================== */
.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-options {
  text-align: center;
  margin-top: 1.5rem;
}

.alt-login-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.alt-login-text a {
  font-weight: 600;
  color: #2a7854;
  text-decoration: none;
}

.forgot-password-link {
  font-size: 0.9rem;
  color: #888;
  text-decoration: none;
}

.forgot-password-link:hover,
.alt-login-text a:hover {
  text-decoration: underline;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN SCAN WAJAH            */
/* =========================================== */
.scan-page-body {
  background-color: #212121; /* Latar belakang gelap */
  overflow: hidden; /* Mencegah scroll */
}

/* Posisi video kamera di seluruh layar */
#camera-feed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Memastikan video menutupi layar tanpa distorsi */
  z-index: 1;
}

/* Lapisan overlay gelap */
.scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(33, 33, 33, 0.9); /* Hitam semi-transparan */
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.scan-header {
  padding: 1rem 1.25rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.scan-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scan-instruction {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 500;
  position: absolute;
  top: 15%;
  text-align: center;
}

/* Bingkai area wajah */
.face-cutout {
  width: 280px;
  height: 380px;
  border: 3px dashed #ffffff;
  border-radius: 60px;
  background-color: transparent; /* Membuatnya 'lubang' transparan */
  display: flex;
  align-items: center;
  justify-content: center;
}

.face-placeholder {
  width: 60%;
  fill: #858585; /* Warna abu-abu untuk siluet */
}

/* Menghapus gaya default dari link area scan wajah */
.face-cutout-link {
  text-decoration: none;
}

/* =========================================== */
/* GAYA PICKER TANGGAL (DROPDOWN)            */
/* =========================================== */
.date-picker-group {
  display: flex;
  gap: 10px; /* Jarak antar kotak */
}

.date-item {
  flex: 1; /* Membagi lebar secara merata */
}

/* Khusus agar dropdown bulan sedikit lebih lebar jika diperlukan */
.date-item:nth-child(2) {
  flex: 1.5;
}

/* Pastikan tampilan dropdown konsisten */
.date-item select {
  padding: 0.8rem 0.4rem; /* Sedikit penyesuaian padding */
  background-color: #fff;
  cursor: pointer;
}
