/* public/css/style.css */

/* 1. RESET & BASIC */
* {
  box-sizing: border-box;
}

body {
  /* Font Serif (Times New Roman/Cambria) agar terlihat resmi */
  font-family: "Cambria", "Times New Roman", serif;

  /* Background Hijau Gradasi (Gelap ke Terang) */
  background: linear-gradient(135deg, #002200 0%, #004d26 100%);

  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Posisi tengah secara horizontal */
  color: #333;
}

/* 2. WRAPPER UTAMA (Membungkus Header & Form) */
.main-wrapper {
  width: 100%;
  max-width: 500px; /* Lebar maksimal konten */
  margin-top: 20px;
}

/* 3. KARTU HEADER (Bagian Logo & Judul) */
.header-card {
  background-color: white;
  padding: 25px 20px;
  border-radius: 15px; /* Sudut membulat */
  text-align: center;
  margin-bottom: 25px; /* Jarak antara header dan form */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo {
  width: 160px; /* Ukuran Logo */
  height: auto;
  margin-bottom: -15px;
}

.header-title {
  font-size: 18px;
  font-weight: bold;
  margin: 5px 0;
  text-transform: uppercase;
  line-height: 1.4;
  color: #000;
}

.header-subtitle {
  font-size: 14px;
  font-weight: bold;
  margin-top: 8px;
  color: #333;
}

.form-card {
  background-color: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative; /* Penting untuk posisi watermark */
  overflow: hidden;
}

/* Watermark Logo Transparan di Background Form */
.form-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 130%;
  background-image: url("../image/logo.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.1; /* Sangat transparan */
  z-index: 0;
  pointer-events: none;
}

/* Pastikan input form berada di atas watermark */
form {
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: normal;
  font-size: 16px;
  color: #000;
}

/* 5. STYLING INPUT FIELDS */
input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #888; /* Border abu agak gelap */
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  background-color: rgba(255, 255, 255, 0.9); /* Sedikit transparan */
  transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #004d26; /* Hijau saat diklik */
  box-shadow: 0 0 5px rgba(0, 77, 38, 0.3);
}

/* 6. RADIO BUTTON (Disusun Vertikal sesuai gambar) */
.radio-group {
  display: flex;
  flex-direction: column; /* Ke bawah */
  gap: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
}

.radio-option input {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.radio-option label {
  margin: 0;
  cursor: pointer;
}

/* 7. TOMBOL KIRIM */
button {
  width: 100%;
  padding: 14px;
  margin-top: 25px;
  /* Gradasi Hijau */
  background: linear-gradient(to bottom, #004d26, #002b15);
  color: white;
  font-family: "Cambria", serif;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 30px; /* Sangat bulat (Pill shape) */
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s,
    filter 0.2s;
}

button:hover {
  filter: brightness(1.15); /* Lebih terang saat hover */
}

button:active {
  transform: scale(0.98); /* Efek tekan */
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#message {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
}

/* 8. RESPONSIVE (HP) */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  .header-card,
  .form-card {
    padding: 20px;
  }
  .header-title {
    font-size: 16px;
  }
}

/* --- TAMBAHAN UNTUK HALAMAN DEPAN (LANDING PAGE) --- */

/* Override body khusus untuk halaman depan agar backgroundnya putih/biru muda */
body.landing-page {
  background: #f0fbf4; /* Warna background halaman terang */
  display: block; /* Reset display flex dari settingan lama */
}

/* Header Kiri Atas */
.top-header {
  display: flex;
  align-items: center;
  padding: 20px;
}

.top-header img {
  width: 70px;
  height: auto;
  margin-right: 15px;
}

.top-header .header-text {
  font-weight: bold;
  font-size: 16px;
  line-height: 1.2;
  color: #000;
  text-transform: uppercase;
}

/* Wrapper Tengah */
.welcome-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh; /* Agar posisi di tengah layar */
  padding: 20px;
}

/* Kartu Hijau Besar */
.welcome-card {
  background: linear-gradient(135deg, #002200 0%, #004d26 100%);
  width: 100%;
  max-width: 600px;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

.welcome-title {
  font-family: "Cambria", serif;
  font-size: 24px;
  margin-bottom: 20px;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.welcome-title .small-text {
  font-size: 16px;
  font-weight: normal;
  font-style: italic;
}

/* Kotak Putih di Dalam Kartu */
.white-box {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  color: #333;
  font-family: sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.white-box p {
  margin-bottom: 10px;
}

.white-box p:last-child {
  margin-bottom: 0;
}

/* Tombol Mulai */
.btn-start {
  background: linear-gradient(to bottom, #004d26, #002b15);
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-family: "Cambria", serif;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 18px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: inline-block;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-start:active {
  transform: scale(0.98);
}

/* --- STYLE UMUM (LAPTOP) --- */
.table-container {
  width: 100%;
  overflow-x: auto; /* Jaga-jaga */
  padding: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #014f25; /* Warna Hijau Tua sesuai gambar */
  color: white;
  text-transform: uppercase;
  font-size: 14px;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* --- STYLE RESPONSIVE (HP) --- */
@media screen and (max-width: 768px) {
  /* 1. Paksa tabel menjadi block layout, bukan table layout */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  /* 2. Sembunyikan Header Tabel (Judul Kolom) karena kita ganti pakai label nanti */
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* 3. Style untuk setiap Baris Data menjadi seperti "Kartu" */
  tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  /* 4. Style untuk setiap Sel Data */
  td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%; /* Beri ruang untuk label di kiri */
    text-align: right; /* Isi data rata kanan */
  }

  td:last-child {
    border-bottom: 0;
  }

  /* 5. MENGGUNAKAN DATA-LABEL (Judul muncul di kiri) */
  td:before {
    position: absolute;
    top: 12px;
    left: 15px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: #014f25; /* Warna hijau biar senada */
    content: attr(data-label); /* Ambil teks dari atribut HTML */
  }
}

/* Anggap wrapper header kelasnya .navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 15px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Judul Kiri */
.brand-title {
  font-weight: bold;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tombol Keluar */
.btn-keluar {
  background-color: #c0392b;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
}

/* Responsive Navbar untuk HP */
@media screen and (max-width: 600px) {
  .navbar {
    flex-direction: column; /* Susun ke bawah */
    gap: 15px;
    text-align: center;
  }

  .btn-keluar {
    width: 100%; /* Tombol jadi full width biar mudah dipencet */
    text-align: center;
  }
}

/* --- TAMBAHAN UNTUK HALAMAN KONFIRMASI --- */

/* Style untuk Data yang Ditampilkan (Nama, Alamat, dll) */
.confirm-data {
  margin-bottom: 15px;
  border-bottom: 1px solid #ccc; /* Garis pemisah tipis */
  padding-bottom: 8px;
}

.confirm-label {
  font-weight: bold;
  color: #004d26; /* Warna hijau tua untuk label */
  margin-bottom: 5px;
  display: block;
}

.confirm-value {
  font-size: 16px;
  color: #000;
  font-weight: normal; /* Isi data tidak terlalu tebal */
}

/* Style Khusus Tombol "Ubah Data" */
.btn-ubah {
  background: transparent; /* Latar transparan */
  border: 2px solid #004d26; /* Border hijau tua */
  color: #004d26; /* Teks hijau tua */
  margin-top: 10px; /* Jarak dari tombol Kirim */
  box-shadow: none; /* Hilangkan bayangan */
}

.btn-ubah:hover {
  background: #e6f0ea; /* Latar hijau sangat muda saat hover */
  filter: none; /* Reset filter brightness */
}

/* --- UPDATE TAMPILAN LOGIN  --- */

/* Wrapper Login yang Ramping */
.login-wrapper {
  width: 100%;
  max-width: 400px; /* Lebar kartu sesuai gambar */
  margin: 0 auto;
}

/* Override Header Card khusus Login */
.login-header-card {
  background-color: white;
  padding: 25px 20px;
  border-radius: 20px; /* Sudut sangat membulat */
  text-align: center;
  margin-bottom: 15px; /* Jarak ke kartu bawah */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Bayangan lembut */
}

.login-header-card .logo {
  width: 70px;
  margin-bottom: 10px;
}

.login-header-card h2 {
  font-family: "Cambria", serif; /* Font resmi */
  font-size: 22px;
  font-weight: bold;
  color: #000;
  margin: 0;
  line-height: 1.2;
}

.login-header-card h3 {
  font-family: "Cambria", serif;
  font-size: 18px;
  font-weight: normal;
  color: #000;
  margin: 5px 0 15px 0;
}

.login-header-card p {
  font-family: sans-serif;
  font-size: 14px;
  color: #333;
  margin: 0;
}

/* Override Form Card khusus Login */
.login-form-card {
  background-color: white;
  padding: 30px 30px;
  border-radius: 20px; /* Sudut sangat membulat */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  text-align: left; /* Teks rata kiri */
}

.login-title-text {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 5px;
}

.login-subtitle-text {
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: 25px;
}

/* Style Input Login */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  font-size: 14px;
  color: #444;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.input-field-container {
  position: relative;
}

/* Inputan */
.input-field-container input {
  width: 100%;
  padding: 12px 12px 12px 45px; /* Padding kiri besar untuk ikon */
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  outline: none;
  transition: all 0.3s;
}

.input-field-container input:focus {
  border-color: #00b050; /* Border hijau saat aktif */
  box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
}

/* Ikon di dalam input */
.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  width: 20px;
  height: 20px;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  width: 20px;
  height: 20px;
}

/* Baris Opsi (Checkbox & Lupa Password) */
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 14px;
}

.options-row label {
  display: flex;
  align-items: center;
  color: #666;
  cursor: pointer;
}

.options-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  accent-color: #00b050; /* Warna centang hijau */
}

.forgot-pass {
  color: #00b050; /* Hijau cerah sesuai gambar */
  text-decoration: none;
  font-weight: 500;
}

.forgot-pass:hover {
  text-decoration: underline;
}

/* Tombol Masuk */
.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(
    90deg,
    #00b050 0%,
    #009e48 100%
  ); /* Gradasi Hijau Cerah */
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 176, 80, 0.3); /* Bayangan hijau */
  transition: transform 0.2s;
}

.btn-login:hover {
  filter: brightness(1.05);
}

.btn-login:active {
  transform: scale(0.98);
}

/* Footer Teks */
.footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.copyright {
  text-align: center;
  margin-top: 25px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}
