/* GPIB Survey — gaya halaman Survey Profiling Jemaat. */

.gpib-survey-page { padding-bottom: 64px; }
.gpib-survey-page .gpib-container { max-width: 1080px; }

.gpib-sv-kepala { margin: 26px 0 18px; }
.gpib-sv-pretitle {
  text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
  font-weight: 700; color: var(--gold, #b5892a); margin: 0 0 6px;
}
.gpib-sv-kepala h1 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; }
.gpib-sv-lede { margin: 0; color: #4a5568; max-width: 72ch; }

/* ---------------------------------------------------------------- bilah atas */
.gpib-sv-bilah {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between;
  background: #0f2744; color: #e8eef6; border-radius: 12px;
  padding: 10px 14px; margin: 18px 0 14px; box-shadow: 0 6px 18px rgba(9, 24, 44, .18);
}
.gpib-sv-bilah-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.gpib-sv-bilah-info strong { color: #fff; }
.gpib-sv-titik { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }
.gpib-sv-status.is-draf { color: #ffd27d; }
.gpib-sv-status.is-terkirim { color: #86efac; }
.gpib-sv-bilah-aksi { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.gpib-sv-progress { width: 130px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; display: inline-block; }
.gpib-sv-progress-batang { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f0c05a, #4ade80); transition: width .25s ease; }
.gpib-sv-keluar { color: #ffd27d; text-decoration: none; border: 1px solid rgba(255, 210, 125, .45); border-radius: 99px; padding: 3px 12px; }
.gpib-sv-keluar:hover { background: rgba(255, 210, 125, .12); }

/* ---------------------------------------------------------------- notis */
.gpib-sv-notis { border-left: 4px solid #1a7f37; background: #f0fdf4; padding: 12px 16px; border-radius: 8px; margin: 0 0 18px; }
.gpib-sv-notis.is-galat { border-left-color: #b32d2e; background: #fef2f2; }

/* ------------------------------------------------- navigasi bagian (select) */
/* Dulu deretan chip 17 seksi; sekarang satu select box supaya rapi di HP/aplikasi. */
.gpib-sv-toc {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 12px 14px; margin: 0 0 20px;
}
.gpib-sv-toc-label { font-size: 13px; font-weight: 700; color: #22405f; }
.gpib-sv-toc-pilih { flex: 1 1 280px; min-width: 0; display: block; }
.gpib-sv-lompat {
  width: 100%; min-height: 44px; font-size: 15px; background: #fff; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
.gpib-sv-toc-jumlah { font-size: 12.5px; color: #64748b; white-space: nowrap; }

/* ---------------------------------------------------------------- seksi */
.gpib-sv-seksi { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px 22px; margin: 0 0 18px; }
.gpib-sv-seksi-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 12px; }
.gpib-sv-seksi-no {
  flex: 0 0 auto; font-weight: 700; font-size: 15px; color: #b5892a;
  background: #fdf6e6; border: 1px solid #f0dfb4; border-radius: 8px; padding: 4px 9px;
}
.gpib-sv-seksi-head h2 { margin: 0 0 3px; font-size: 18px; line-height: 1.3; }
.gpib-sv-seksi-head p { margin: 0; font-size: 13.5px; color: #64748b; }

.gpib-sv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.gpib-sv-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gpib-sv-f.is-lebar, .gpib-sv-f.is-foto { grid-column: 1 / -1; }
.gpib-sv-label { font-size: 13.5px; font-weight: 600; color: #1f2f45; line-height: 1.35; }
.gpib-sv-wajib { color: #b32d2e; }
.gpib-sv-input {
  width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; font-size: 14px;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #14213d;
}
.gpib-sv-input:focus { outline: none; border-color: #2b5c8a; box-shadow: 0 0 0 3px rgba(43, 92, 138, .14); }
textarea.gpib-sv-input { resize: vertical; min-height: 76px; }
.gpib-sv-bantuan { margin: 0; font-size: 12px; color: #64748b; }
.gpib-sv-galat { margin: 0; font-size: 12.5px; color: #b32d2e; font-weight: 600; }
.gpib-sv-f.is-galat .gpib-sv-input { border-color: #b32d2e; background: #fff7f7; }
.gpib-sv-satuan { display: inline-flex; align-items: center; gap: 6px; }
.gpib-sv-satuan em { font-style: normal; color: #64748b; font-size: 13px; }

/* pilihan */
.gpib-sv-pilih { display: flex; flex-wrap: wrap; gap: 6px; }
.gpib-sv-pil {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  border: 1px solid #dbe4ee; border-radius: 99px; padding: 5px 11px; background: #f8fafc; cursor: pointer;
}
.gpib-sv-pil:hover { border-color: #b9c9dd; }
.gpib-sv-pil input { margin: 0; }
.gpib-sv-pil:has(input:checked) { background: #e8eef7; border-color: #2b5c8a; font-weight: 600; }
.gpib-sv-pilih.is-banyak .gpib-sv-pil { border-radius: 8px; }

/* lk / pr & fasilitas */
.gpib-sv-lkpr, .gpib-sv-fas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gpib-sv-mini { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gpib-sv-mini em { font-style: normal; font-size: 11.5px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.gpib-sv-total { font-size: 15px; font-weight: 700; color: #1f2f45; padding: 8px 10px; background: #f1f5f9; border-radius: 8px; }

/* foto */
.gpib-sv-foto { display: flex; flex-direction: column; gap: 8px; }
.gpib-sv-file { font-size: 13px; }
.gpib-sv-foto-daftar { display: flex; flex-wrap: wrap; gap: 8px; }
.gpib-sv-foto-item {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px;
  border: 1px solid #dbe4ee; border-radius: 8px; padding: 4px 8px; background: #f8fafc;
}
.gpib-sv-foto-item a { text-decoration: none; color: #22405f; }
.gpib-sv-kosong { color: #94a3b8; font-size: 12.5px; }

/* blok berulang */
.gpib-sv-ulang { display: flex; flex-direction: column; gap: 8px; }
.gpib-sv-ulang-baris-daftar { display: flex; flex-direction: column; gap: 8px; }
.gpib-sv-ulang-baris {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px;
  border: 1px dashed #dbe4ee; border-radius: 10px; padding: 10px; background: #fbfdff;
}
/* Kolom tanggal (mis. Tanggal Lahir) di dalam baris berulang: jangan meluber di layar HP */
.gpib-sv-ulang-baris input[type=date] { min-width: 0; }
.gpib-sv-ulang-hapus, .gpib-sv-ulang-tambah {
  font: inherit; font-size: 12.5px; border-radius: 8px; cursor: pointer;
  border: 1px solid #dbe4ee; background: #fff; padding: 6px 10px; color: #22405f;
}
.gpib-sv-ulang-hapus { color: #b32d2e; border-color: #f3d1d1; align-self: end; }
.gpib-sv-ulang-tambah { align-self: flex-start; }
.gpib-sv-ulang-hapus:hover { background: #fef2f2; }
.gpib-sv-ulang-tambah:hover { background: #f1f5f9; }

/* aksi bawah */
.gpib-sv-aksi {
  position: sticky; bottom: 0; z-index: 25;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px 16px; margin-top: 8px;
  box-shadow: 0 -6px 18px rgba(15, 39, 68, .07);
}
.gpib-sv-tombol {
  font: inherit; font-size: 14.5px; font-weight: 600; border-radius: 99px; padding: 10px 20px; cursor: pointer; border: 1px solid transparent;
}
.gpib-sv-tombol.is-draf { background: #fff; border-color: #b9c9dd; color: #22405f; }
.gpib-sv-tombol.is-draf:hover { background: #f1f5f9; }
.gpib-sv-tombol.is-kirim { background: #0f2744; color: #fff; }
.gpib-sv-tombol.is-kirim:hover { background: #16375c; }
.gpib-sv-aksi-ket { flex: 1 1 260px; margin: 0; font-size: 12.5px; color: #64748b; }

.gpib-sv-kaki { margin: 26px 0 0; font-size: 12.5px; color: #64748b; }

/* ---------------------------------------------------------------- HP */
@media (max-width: 860px) {
  .gpib-sv-grid { grid-template-columns: minmax(0, 1fr); }
  .gpib-sv-lkpr, .gpib-sv-fas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpib-sv-seksi { padding: 16px 14px 18px; border-radius: 12px; }
  .gpib-sv-bilah { position: static; }
  .gpib-sv-aksi { position: static; }
  .gpib-sv-aksi-ket { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .gpib-sv-lkpr, .gpib-sv-fas { grid-template-columns: minmax(0, 1fr); }
  .gpib-sv-toc a { font-size: 12px; }
}

/* HP: kolom TANGGAL diperkecil + diberi barisnya sendiri supaya tidak bertumpuk
   dengan kolom di sebelahnya. Kontrol tanggal bawaan peramban punya lebar
   minimum sendiri (iOS/Android sering tetap ~170 px walau min-width:0), jadi
   di layar sempit ia tidak boleh dibiarkan berdampingan. */
@media (max-width: 720px) {
  .gpib-sv-input[type=date] {
    font-size: 15px; padding: 8px; min-width: 0; max-width: 240px;
  }
  .gpib-sv-input[type=date]::-webkit-calendar-picker-indicator {
    width: 15px; height: 15px; padding: 0; margin-inline-start: 2px; opacity: .7;
  }
  .gpib-sv-ulang-baris .gpib-sv-mini:has(> input[type=date]) { grid-column: 1 / -1; }
}

/* Gerbang login (dipakai bersama plugin gpib-aplikasi) — pastikan tetap rapi
   walau CSS gpib-aplikasi tidak termuat. */
.gpib-apl-gerbang { max-width: 620px; margin: 24px auto; }
.gpib-apl-gerbang-kartu { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 26px; text-align: center; }
.gpib-apl-gerbang-kartu h2 { margin: 12px 0 8px; font-size: 20px; }
.gpib-apl-tombol {
  display: inline-flex; align-items: center; gap: 10px; margin: 14px auto 6px;
  min-height: 52px; padding: 0 22px; border-radius: 10px; border: 1px solid #d7dce3; background: #fff;
  font: inherit; font-size: 15.5px; font-weight: 600; color: #22405f; cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 39, 68, .08);
}
.gpib-apl-tombol:hover { background: #f8fafc; }
.gpib-apl-pesan { min-height: 18px; font-size: 13px; color: #b32d2e; }
.gpib-apl-kecil { font-size: 12.5px; color: #64748b; }
.gpib-apl-notice { background: #fff7e6; border: 1px solid #f0dfb4; border-radius: 10px; padding: 12px; font-size: 13.5px; }

/* ============================================================================
   HALAMAN DAFTAR SURVEY (periode: Soon / Aktif / Expired)
   ========================================================================= */

.gpib-sv-kepala-periode { margin: 6px 0 0; font-size: 13.5px; color: #4a5568; }

/* filter urut */
.gpib-sv-saring {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 8px 12px; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 10px; font-size: 13.5px;
}
.gpib-sv-saring-label { color: #64748b; }
.gpib-sv-saring a {
  text-decoration: none; color: #22405f; border: 1px solid #dbe4ee; background: #fff;
  border-radius: 99px; padding: 3px 12px; font-weight: 600;
}
.gpib-sv-saring a:hover { background: #eef2f7; }
.gpib-sv-saring a.is-aktif { background: #0f2744; border-color: #0f2744; color: #fff; }
.gpib-sv-saring-jumlah { margin-left: auto; color: #64748b; }

/* daftar kartu */
.gpib-sv-daftar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.gpib-sv-kartu {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #cbd5e1;
  border-radius: 14px; padding: 16px 18px;
}
.gpib-sv-kartu.is-aktif { border-left-color: #1a7f37; }
.gpib-sv-kartu.is-soon { border-left-color: #d9a11a; }
.gpib-sv-kartu.is-expired { border-left-color: #b32d2e; }
.gpib-sv-kartu.is-tutup { border-left-color: #64748b; }
.gpib-sv-kartu-utama { flex: 1 1 420px; min-width: 0; }
.gpib-sv-kartu-judul { margin: 0 0 6px; font-size: 18px; line-height: 1.3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gpib-sv-kartu-ket { margin: 0 0 8px; font-size: 13.5px; color: #4a5568; }
.gpib-sv-kartu-meta { margin: 0; font-size: 13px; color: #64748b; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.gpib-sv-kartu-periode strong { color: #1f2f45; }
.gpib-sv-kartu-sudah { margin: 8px 0 0; font-size: 12.5px; color: #12703a; }
.gpib-sv-kartu-aksi { flex: 0 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 190px; text-align: center; }
.gpib-sv-kartu-note { font-size: 12px; color: #64748b; }

/* lencana status */
.gpib-sv-lencana {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.gpib-sv-lencana.is-aktif { background: #e6f6ec; color: #12703a; border: 1px solid #b7e2c6; }
.gpib-sv-lencana.is-soon { background: #fff5e0; color: #8a5b00; border: 1px solid #f0dfb4; }
.gpib-sv-lencana.is-expired { background: #fdecec; color: #9d2222; border: 1px solid #f2c9c9; }
.gpib-sv-lencana.is-tutup { background: #eef0f3; color: #4a5568; border: 1px solid #d8dee7; }
.gpib-sv-lencana.is-kosong { background: #eaf1fb; color: #1d4e89; border: 1px solid #c6dbf5; }

/* tombol mati (di luar periode) */
.gpib-sv-tombol.is-mati {
  background: #eef0f3 !important; color: #8b95a5 !important; border-color: #dde2ea !important;
  cursor: not-allowed; box-shadow: none;
}

/* kartu status di halaman form yang belum/ sudah lewat periode */
.gpib-sv-tutup {
  background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #d9a11a;
  border-radius: 14px; padding: 22px 24px; max-width: 720px;
}
.gpib-sv-tutup.is-expired { border-left-color: #b32d2e; }
.gpib-sv-tutup.is-tutup { border-left-color: #64748b; }
.gpib-sv-tutup h2 { margin: 12px 0 8px; font-size: 20px; }
.gpib-sv-tutup p { margin: 0 0 10px; color: #4a5568; }
.gpib-sv-tutup-periode { font-size: 13px; color: #64748b; }
.gpib-sv-kosong2 { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 22px; text-align: center; }

.gpib-sv-daftar-link { color: #ffd27d; text-decoration: none; border-bottom: 1px dotted rgba(255, 210, 125, .6); }
.gpib-sv-bilah-survey { color: #cfe0f5; }

@media (max-width: 720px) {
  .gpib-sv-kartu { padding: 14px 15px; }
  .gpib-sv-kartu-aksi { min-width: 0; width: 100%; }
  .gpib-sv-kartu-aksi .gpib-sv-tombol { width: 100%; }
}

/* ============================================================================
   v1.2.0 — kolom terkunci (dari Peta Jemaat), batas kiriman, mode baca
   ========================================================================= */

.gpib-sv-f.is-kunci .gpib-sv-label { color: #38495e; }
.gpib-sv-input.is-terkunci {
  background: #f1f5f9; border-style: dashed; border-color: #cbd5e1;
  color: #33455c; font-weight: 600; cursor: not-allowed;
}
.gpib-sv-gembok { color: var(--gold, #b5892a); font-size: 15px; line-height: 1; }

.gpib-sv-kepala-identitas {
  margin: 6px 0 0; font-size: 13.5px; color: #33455c;
  background: #f4f8fd; border: 1px solid #dbe6f4; border-radius: 10px; padding: 8px 12px;
}
.gpib-sv-kepala-identitas em { color: #64748b; font-style: normal; }

/* mode baca: batas kiriman tercapai — form hanya dilihat */
.gpib-sv-form.is-baca .gpib-sv-grid,
.gpib-sv-form.is-baca .gpib-sv-toc { opacity: .92; }
.gpib-sv-form.is-baca .gpib-sv-seksi,
.gpib-sv-form.is-baca .gpib-sv-grid { pointer-events: none; }
.gpib-sv-form.is-baca .gpib-sv-input { background: #f8fafc; }
.gpib-sv-aksi.is-baca {
  position: static; background: #fff8e6; border-color: #f0dfb4;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.gpib-sv-aksi.is-baca .gpib-sv-aksi-ket { color: #6b5417; }

/* ------------------------------------------------------------------ TAB daftar */
.gpib-sv-tab {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: #eef2f7; border: 1px solid #dde5ee; border-radius: 14px; padding: 5px;
  margin: 0 0 18px; scrollbar-width: none;
}
.gpib-sv-tab::-webkit-scrollbar { display: none; }
.gpib-sv-tab a {
  flex: 1 1 auto; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; text-decoration: none; white-space: nowrap;
  color: #33475e; font-size: 14px; font-weight: 600;
}
.gpib-sv-tab-pdk { display: none; }
.gpib-sv-tab a:hover { color: #0f2744; background: #e4eaf2; }
.gpib-sv-tab a.is-aktif { background: #fff; color: #0f2744; box-shadow: 0 1px 3px rgba(15, 39, 68, .16); }

/* ------------------------------------------------- tab "History survey saya" */
.gpib-sv-kartu.is-history.is-terkirim { border-left-color: #1a7f37; }
.gpib-sv-kartu.is-history.is-draf { border-left-color: #d9a11a; }
.gpib-sv-lencana.is-terkirim { background: #e6f6ec; color: #12703a; border: 1px solid #b7e2c6; }
.gpib-sv-lencana.is-draf { background: #fff5e0; color: #8a5b00; border: 1px solid #f0dfb4; }
.gpib-sv-hapus-form { margin: 0; }
.gpib-sv-tombol.is-hapus { background: #fff; color: #b32d2e; border: 1px solid #efc7c7; }
.gpib-sv-tombol.is-hapus:hover { background: #fdecec; border-color: #e2a5a5; color: #8f1f1f; }

/* ------------------------------------- penyesuaian HP / aplikasi (PWA, iOS) */
@media (max-width: 720px) {
  .gpib-sv-toc { gap: 8px; padding: 12px; }
  .gpib-sv-toc-pilih { flex: 1 1 100%; order: 3; }
  .gpib-sv-toc-jumlah { margin-left: auto; }
  .gpib-sv-tab { border-radius: 12px; }
  .gpib-sv-tab a { padding: 10px 13px; font-size: 13.5px; }
  .gpib-sv-kartu-aksi { gap: 8px; }
  .gpib-sv-kartu-aksi .gpib-sv-tombol { min-height: 46px; }
  .gpib-sv-input, .gpib-sv-lompat, .gpib-sv-seksi select, .gpib-sv-seksi input, .gpib-sv-seksi textarea { font-size: 16px; }
}
/* Di HP label dipendekkan supaya tiga tab tetap muat tanpa perlu digeser. */
@media (max-width: 560px) {
  .gpib-sv-tab-pjg { display: none; }
  .gpib-sv-tab-pdk { display: inline; }
  .gpib-sv-tab a { padding: 10px 8px; font-size: 13px; }
}
/* bilah aksi lengket: beri ruang untuk bilah aman iPhone */
.gpib-sv-aksi { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.gpib-sv-kartu-aksi .gpib-sv-tombol { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
