/* ============================================================
   SI-RT — tema Hijau Tosca #0D9488 + Putih
   Mobile-first: konten maksimum 480px, di tengah pada desktop.
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --teal: #0D9488;
  --teal-600: #0F766E;
  --teal-700: #115E59;
  --teal-050: #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --ink: #0F172A;
  --ink-2: #1E293B;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --bg: #F4F8F8;
  --white: #FFFFFF;
  --ok: #059669;
  --ok-bg: #ECFDF5;
  --warn: #B45309;
  --warn-bg: #FFFBEB;
  --bad: #DC2626;
  --bad-bg: #FEF2F2;
  --info: #0369A1;
  --info-bg: #F0F9FF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 26px -18px rgba(13, 148, 136, .45);
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #E8F1F0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 520px) {
  body {
    background:
      radial-gradient(1200px 500px at 50% -10%, #D6EFEC 0%, transparent 60%),
      #E8F1F0;
  }
}

a { color: var(--teal-600); text-decoration: none; }
img { max-width: 100%; }

.sheet {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 70px -20px rgba(13, 148, 136, .35);
  position: relative;
}

/* ------------------------------- appbar ------------------------------ */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #0B7F76 0%, #0A756D 60%, #0A6E67 100%);
  color: #fff;
  box-shadow: 0 6px 18px -12px rgba(13, 148, 136, .9);
}
.appbar__brand { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.appbar__logo { font-weight: 800; letter-spacing: .06em; font-size: 15px; }
.appbar__sub { font-size: 11px; opacity: .86; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar__back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; color: #fff;
  background: rgba(255, 255, 255, .16);
}
.appbar__user {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  border: 1.5px solid rgba(255, 255, 255, .5);
  color: #fff; font-weight: 800; font-size: 13px;
}

.pagehead { padding: 18px 16px 4px; }
.pagehead h1 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.pagehead p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.main { padding: 14px 16px 104px; }

/* -------------------------------- kartu ------------------------------ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border: 1px solid rgba(13, 148, 136, .07);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card__head h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.card__ico { color: var(--teal); }
.card--flat { padding: 0; overflow: hidden; }
.card--teal { background: linear-gradient(140deg, #0B8079, #0A726B 70%, #085F59); color: #fff; border: 0; }
.card--teal .card__head h2 { color: #fff; }
.mb-0 { margin-bottom: 0; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* ------------------------------ dashboard ---------------------------- */
.hello { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.hello-title { margin: 0; font-size: 19px; line-height: 1.32; letter-spacing: -.015em; }

.saldo {
  background: linear-gradient(140deg, #0B8079 0%, #0A726B 55%, #085F59 100%);
  color: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  box-shadow: 0 14px 30px -18px rgba(13, 148, 136, .85);
  position: relative; overflow: hidden;
}
.saldo::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 150px; height: 150px;
  border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.saldo__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .88; font-weight: 600; }
.saldo__value { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.saldo__meta { display: flex; gap: 14px; margin-top: 12px; font-size: 11.5px; position: relative; z-index: 1; }
.saldo__meta div { background: rgba(255, 255, 255, .14); border-radius: 10px; padding: 6px 10px; }
.saldo__meta b { display: block; font-size: 12.5px; }

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  padding: 15px 14px; border-radius: 16px; background: var(--white);
  border: 1px solid rgba(13, 148, 136, .12); box-shadow: var(--shadow);
  color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none;
  min-height: 104px; justify-content: space-between; transition: transform .12s ease;
}
.menu:active { transform: scale(.98); }
.menu__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--teal-050); color: var(--teal-600); border: 1px solid var(--teal-100);
}
.menu__sub { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.menu--wide { grid-column: span 2; flex-direction: row; align-items: center; min-height: 70px; gap: 12px; }
.menu--wide .menu__ico { flex: none; }

/* ronda card */
.ronda-card { display: flex; gap: 12px; align-items: center; }
.ronda-card__ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  background: var(--teal-050); color: var(--teal-600);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--teal-100);
}
.ronda-card__body { min-width: 0; }
.ronda-card__title { font-weight: 800; font-size: 16px; }
.ronda-card__meta { color: var(--muted); font-size: 12.5px; }

/* pengumuman */
.news { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.news:last-child { border-bottom: 0; padding-bottom: 0; }
.news:first-child { padding-top: 0; }
/* pengumuman yang bisa diketuk → detail (beranda & pengumuman.php) */
a.news--link { text-decoration: none; color: inherit; border-radius: 12px; }
a.news--link:active { background: var(--teal-050); }
a.news--link:hover { background: var(--teal-050); }
.news__more { font-size: 11.5px; font-weight: 700; color: var(--teal-700); margin-top: 5px; }
.peng-isi { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin: 14px 0 16px; }
.news__dot {
  flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--teal-050);
  color: var(--teal-600); display: inline-flex; align-items: center; justify-content: center;
}
.news__title { font-weight: 700; font-size: 14px; }
.news__date { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.news__body { color: var(--ink-2); font-size: 13px; margin-top: 4px; }

/* ------------------------------- tombol ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 18px;
  border-radius: 14px; border: 1.5px solid transparent;
  font-family: inherit; font-size: 15.5px; font-weight: 700;
  background: var(--white); color: var(--ink); cursor: pointer;
  text-align: center; text-decoration: none; transition: transform .1s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.99); }
.btn--primary { background: linear-gradient(135deg, #0B8177, #0A756D 55%, #0A6E67); color: #fff; box-shadow: 0 10px 22px -14px rgba(13, 148, 136, .95); }
.btn--outline { border-color: var(--line-2); color: var(--ink); background: #fff; }
.btn--ghost { background: var(--teal-050); color: var(--teal-700); border-color: var(--teal-100); }
/* Tombol "Klik Bayar" di daftar iuran: sengaja LATAR TERANG + garis teal tegas supaya langsung
   bisa dibedakan dari badge status (Lunas / Menunggu verifikasi) di baris yang sama.
   Permintaan user 17 Nov 2026: teks "Bayar" → "Klik Bayar", warnanya agak terang. */
.btn--bayar {
  background: #E9FBF8; color: var(--teal-700); border-color: var(--teal-600); font-weight: 800;
  box-shadow: 0 2px 0 rgba(15, 118, 110, .18);
}
.btn--bayar:hover { background: #DCF7F2; }
.btn--xs.btn--bayar { min-height: 30px; padding: 0 9px; gap: 5px; }
.btn--bayar svg { color: var(--teal-600); }
.btn--danger { background: var(--bad-bg); color: var(--bad); border-color: #FECACA; }
.btn--wa { background: #25D366; color: #fff; }
.btn--sm { min-height: 40px; font-size: 13px; border-radius: 11px; padding: 0 12px; width: auto; }
.btn--xs { min-height: 34px; font-size: 12.5px; border-radius: 10px; padding: 0 10px; width: auto; font-weight: 700; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { width: auto; flex: 1 1 140px; }
.btn-row--tight > .btn { flex: 0 1 auto; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* ------------------------------- form -------------------------------- */
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field__hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; }
input[type="text"], input[type="tel"], input[type="password"], input[type="number"],
input[type="date"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-2); border-radius: 13px;
  padding: 13px 14px; min-height: 52px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13, 148, 136, .12); }
input[readonly] { background: #F8FAFC; color: var(--ink-2); }
input[type="file"] { width: 100%; font-size: 13.5px; padding: 11px 12px; background: #fff; border: 1.5px dashed var(--line-2); border-radius: 13px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 380px) { .form-grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal); flex: none; }
.form-actions { margin-top: 6px; }
.inline-form { display: inline; }

/* -------------------------------- badge ------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--bad { background: var(--bad-bg); color: var(--bad); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--teal { background: var(--teal-050); color: var(--teal-700); }
.badge--muted { background: #F1F5F9; color: var(--muted); }

/* ------------------------------- flash ------------------------------- */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 13.5px;
  border: 1px solid;
}
.flash__ico {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff;
}
.flash--ok { background: var(--ok-bg); border-color: #A7F3D0; color: #065F46; }
.flash--ok .flash__ico { background: var(--ok); }
.flash--error { background: var(--bad-bg); border-color: #FECACA; color: #991B1B; }
.flash--error .flash__ico { background: var(--bad); }
.flash--info { background: var(--info-bg); border-color: #BAE6FD; color: #075985; }
.flash--info .flash__ico { background: var(--info); }

/* ------------------------------- daftar ------------------------------ */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row:first-child { padding-top: 0; }
.row__body { flex: 1; min-width: 0; }
/* Baris daftar warga: isi baris tetap berupa tautan ke detail, tombol Hapus di kanan (di luar
   tautan supaya tidak ada tombol di dalam <a>). */
.row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--ink); }
.row__del { flex: none; display: flex; }
/* Tombol hapus berupa tanda X kecil (permintaan user: "Tulisan Hapus ganti X saja") —
   nama warga tetap disebut di atribut title & aria-label. */
.row__del-btn {
  width: 32px; min-width: 32px; padding: 0; font-size: 18px; font-weight: 800;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.row__del-note { flex: none; font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.row__title { font-weight: 700; font-size: 14px; }
.row__meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.row__right { text-align: right; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
/* Baris daftar yang bisa diketuk (mis. Jadwal Ronda → anggota regu): beri chevron kanan. */
.row__chev { flex: none; color: var(--muted-2); }
a.row { text-decoration: none; }
a.row:active { background: var(--teal-050); }
.row__ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--teal-050); color: var(--teal-600);
}
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 13px; background: var(--teal-050);
  color: var(--teal-700); font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.thumb { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; background: var(--line); border: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty__ico { color: var(--teal-200); }
.empty p { margin: 8px 0 0; font-size: 13px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }

/* Data pemohon surat — blok review persetujuan (permintaan user 17 Nov 2026) */
.surat-data {
  margin-top: 9px; padding: 9px 11px; border-radius: 12px;
  background: #F8FAFC; border: 1px solid var(--line); font-size: 12px;
}
.surat-data__row {
  display: flex; gap: 10px; justify-content: space-between;
  padding: 2.5px 0; border-bottom: 1px dashed var(--line);
}
.surat-data__row:last-child { border-bottom: 0; }
.surat-data__row span { color: var(--muted); flex: 0 0 42%; }
.surat-data__row b { text-align: right; font-weight: 700; word-break: break-word; }

/* tabel */
.table-wrap { overflow-x: auto; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th, table.data td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #FAFCFC; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tfoot td { font-weight: 800; border-top: 2px solid var(--line-2); background: #F8FBFA; }

/* progress */
.bar { height: 9px; border-radius: 999px; background: #E6EFEE; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #14B8A6, #0D9488); }
.bar--bad > i { background: linear-gradient(90deg, #F87171, #DC2626); }

/* statistik kecil */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: #fff; border: 1px solid rgba(13, 148, 136, .09); border-radius: 15px; padding: 12px; }
.stat__label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat--ok .stat__value { color: var(--ok); }
.stat--bad .stat__value { color: var(--bad); }
.stat--warn .stat__value { color: var(--warn); }

/* grafik batang */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 6px; }
.chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart__bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.chart__bars i { display: block; width: 11px; border-radius: 5px 5px 2px 2px; min-height: 3px; }
.chart__bar--in { background: linear-gradient(180deg, #2DD4BF, #0D9488); }
.chart__bar--out { background: linear-gradient(180deg, #FCA5A5, #DC2626); }
.chart__x { font-size: 10px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* timeline status */
.steps { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; }
.step { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); }
.step__dot { width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 4px; display: flex; align-items: center; justify-content: center; background: #F1F5F9; color: var(--muted-2); font-size: 11px; font-weight: 800; }
.step.is-done .step__dot { background: var(--teal); color: #fff; }
.step.is-done { color: var(--teal-700); font-weight: 700; }

/* tabbar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 480px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 12px; }
.tab__ico { color: inherit; }
.tab.is-active { color: var(--teal-600); }
.tab.is-active .tab__ico { transform: translateY(-1px); }

/* -------------------------------- auth ------------------------------- */
body.is-auth { background: linear-gradient(160deg, #0B8079 0%, #0A7068 45%, #085F59 100%); min-height: 100vh; }
.auth { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 32px 20px 24px; display: flex; flex-direction: column; }
.auth__brand { text-align: center; color: #fff; margin-bottom: 22px; }
.auth__mark {
  width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 12px;
  background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .34);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.auth__app { font-size: 25px; font-weight: 800; letter-spacing: .1em; }
.auth__rt { font-size: 12px; opacity: .86; margin-top: 2px; }
.auth__card { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 24px 50px -26px rgba(2, 44, 34, .8); }
.auth__card h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.01em; }
.auth__sub { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.auth__foot { text-align: center; color: rgba(255, 255, 255, .78); font-size: 11.5px; margin-top: auto; padding-top: 22px; line-height: 1.6; }
.auth__help { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* foto pratinjau absen */
.cam { border: 2px dashed var(--teal-200); border-radius: 16px; padding: 18px; text-align: center; background: var(--teal-050); }
.cam img { max-height: 200px; border-radius: 12px; margin-top: 10px; }

/* isian foto dua sumber: galeri / kamera + kompres otomatis (foto_input()) */
.foto-in .field { margin-bottom: 0; }
.foto-in input[data-foto-cam] { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.foto-in input[type="file"][data-preview] { font-size: 12px; }
/* input berkas asli disembunyikan setelah app.js memasang dua tombol sumber foto */
.foto-in input[type="file"].is-file-hidden { display: none; }
.foto-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.foto-info { font-size: 11.5px; font-weight: 700; margin-top: 8px; min-height: 1px; }
.foto-prev img { max-height: 200px; border-radius: 12px; margin-top: 10px; }
/* pratinjau logo kop surat di Pengaturan (logo tampil seperti di kop: tinggi ±58 pt) */
.kop-preview {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; border: 1.5px dashed var(--line-2); border-radius: 14px;
  padding: 14px; margin-bottom: 12px; min-height: 96px;
}
.kop-preview img { max-height: 120px; max-width: 100%; object-fit: contain; }
/* Pratinjau mini-kop: logo di kiri + teks RT/RW di tengah + garis kop (posisi asli di PDF) */
.kop-strip {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 12px 18px; margin-top: 12px; overflow: hidden;
}
.kop-strip__logo { flex: none; width: 92px; height: 46px; object-fit: contain; }
.kop-strip__txt { flex: 1 1 auto; min-width: 0; text-align: center; line-height: 1.3; }
.kop-strip__txt b { display: block; font-size: 11px; color: var(--ink); }
.kop-strip__txt span { display: block; font-size: 8.5px; color: var(--muted); }
.kop-strip__line {
  position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px;
  background: linear-gradient(to bottom, var(--ink) 0 1.2px, var(--teal) 1.2px 2px);
}
.gps { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: #F8FAFC; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.gps.is-ok { color: var(--ok); background: var(--ok-bg); border-color: #A7F3D0; }
.gps.is-bad { color: var(--bad); background: var(--bad-bg); border-color: #FECACA; }

.note { font-size: 12px; color: var(--muted); background: #F8FAFC; border-left: 3px solid var(--teal-200); padding: 9px 12px; border-radius: 0 10px 10px 0; }
.warnbox { background: var(--warn-bg); border: 1px solid #FDE68A; color: #92400E; border-radius: 13px; padding: 11px 13px; font-size: 12.5px; }
.errbox { background: var(--bad-bg); border: 1px solid #FECACA; color: #991B1B; border-radius: 13px; padding: 11px 13px; font-size: 12.5px; }
.okbox { background: var(--ok-bg); border: 1px solid #A7F3D0; color: #065F46; border-radius: 13px; padding: 11px 13px; font-size: 12.5px; }

.pill-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.pill { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pill.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

.footer-note { text-align: center; color: var(--muted-2); font-size: 11px; margin: 18px 0 0; }

/* sub-tabs admin */
.seg { display: flex; background: #E8F1F0; border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 14px; overflow-x: auto; }
.seg a { flex: 1; text-align: center; padding: 9px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg a.is-active { background: #fff; color: var(--teal-700); box-shadow: 0 2px 8px -4px rgba(15, 23, 42, .3); }

/* pencarian & filter daftar warga (permintaan user 17 Nov 2026) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar__search { position: relative; flex: 1 1 230px; min-width: 0; }
.filter-bar__search input {
  width: 100%; padding-left: 34px; font-size: 13.5px;
}
.filter-bar__ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); pointer-events: none;
}
.filter-bar select { flex: 0 1 168px; min-width: 0; font-size: 12.5px; }
.filter-bar .btn { flex: 0 1 auto; }
.filter-bar__note { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.filter-bar__note b { color: var(--ink); }

@media (max-width: 620px) {
  .filter-bar { gap: 7px; }
  .filter-bar__search { flex: 1 1 100%; }
  .filter-bar select { flex: 1 1 calc(50% - 4px); }
  .filter-bar .btn { flex: 1 1 calc(50% - 4px); }
}

/* baris dinamis data keluarga (Nama Anak / Keluarga Lain) — permintaan user 17 Nov 2026 */
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows__row { display: flex; align-items: center; gap: 8px; }
.rows__row input { flex: 1 1 auto; min-width: 0; }
.rows__no {
  flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--teal-050);
  color: var(--teal-700); font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.rows__del { flex: none; width: 32px; height: 32px; padding: 0; font-size: 17px; line-height: 1; }
.rows__add { margin-top: 8px; }

@media (max-width: 400px) {
  .rows__no { width: 22px; height: 22px; font-size: 11px; }
  .rows__del { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
