/* Gaya modul bantuan kebutuhan anak.
 *
 * Sengaja dipisahkan dari qira.css: proses integrasi otomatis pernah menulis
 * ulang qira.css dari salinan lama sehingga gaya baru hilang tanpa konflik.
 * Berkas ini hanya memuat gaya modul bantuan dan tidak disentuh pemulihan aset.
 */

/* ===== Bantuan kebutuhan: pemilih anak dan samakan permintaan ===== */
.need-picker { max-width: 900px; }
.need-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 20px 0 8px;
  padding: 16px;
  border: 1px solid var(--line, #e2e6ee);
  border-radius: 14px;
  background: var(--surface, #fff);
}
.need-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 220px;
  min-width: 0;
}
.need-filter-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #5b6472);
}
.need-filter-field input,
.need-filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8dde8);
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
}
.need-filter-reset { font-size: 0.85rem; color: var(--muted, #5b6472); }
.need-result-count { margin: 14px 0; color: var(--muted, #5b6472); font-size: 0.92rem; }
.need-picker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.need-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e6ee);
  border-radius: 12px;
  background: #fff;
}
.need-picker-row.is-selectable { padding: 0; }
.need-picker-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  cursor: pointer;
  border-radius: 12px;
}
.need-picker-choice:active { background: #f4f7fb; }
.need-picker-choice input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 auto; }
.need-picker-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.need-picker-main strong { font-size: 1rem; }
.need-picker-meta { color: var(--muted, #5b6472); font-size: 0.85rem; }
.need-picker-action { flex: 0 0 auto; }
.need-picker-back { margin-top: 22px; font-size: 0.9rem; }
.need-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  padding: 14px;
  border: 1px solid #cfd8e6;
  border-left: 4px solid var(--brand, #14532d);
  border-radius: 12px;
  background: #f7faf8;
}
.need-chosen-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand, #14532d);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}
.need-chosen-copy { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.need-copy-source {
  display: grid;
  gap: 4px;
  margin: 18px 0 4px;
  padding: 14px 16px;
  border: 1px dashed #c7d2c9;
  border-radius: 12px;
  background: #f8fbf8;
}
.need-copy-tag {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand, #14532d);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.need-copy-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
  font-size: 0.9rem;
}
.need-copy-all { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.need-copy-all input { width: 18px; height: 18px; }
.need-copy-count { color: var(--muted, #5b6472); }
.need-copy-submit {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 0;
  background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}
@media (max-width: 720px) {
  .need-filter { flex-direction: column; align-items: stretch; }
  .need-filter .primary-button { width: 100%; }
  .need-picker-row { align-items: flex-start; }
  .need-picker-action { min-height: 44px; display: inline-flex; align-items: center; }
  .need-copy-tools { flex-direction: column; align-items: flex-start; gap: 6px; }
  .need-copy-submit { flex-direction: column-reverse; }
  .need-copy-submit .primary-button,
  .need-copy-submit .secondary-action { width: 100%; text-align: center; }
}

/* Kartu ringkasan bantuan: kolom ikon tetap agar tidak menimpa label di ponsel */
.needs-summary { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.needs-summary-card {
  grid-template-columns: 1.9rem minmax(0, 1fr);
  align-items: center;
  column-gap: .55rem;
  min-width: 0;
}
.needs-summary-card .needs-summary-icon { grid-column: 1; grid-row: 1; }
.needs-summary-card .needs-summary-label { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
.needs-summary-card strong { grid-column: 1 / -1; grid-row: 2; }
.needs-summary-card small { grid-column: 1 / -1; grid-row: 3; }

/* Pemberitahuan bantuan yang sudah pernah diterima */
.need-picker-history {
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fdf3dd;
  color: #8a5a12;
  font-size: .74rem;
  font-weight: 600;
  align-self: flex-start;
  line-height: 1.35;
}
.need-picker-row.has-history { border-color: #ecd9a8; background: #fffdf7; }
.need-history-notice {
  margin: 16px 0 6px;
  padding: 14px 16px;
  border: 1px solid #ecd9a8;
  border-left: 4px solid #d9a441;
  border-radius: 12px;
  background: #fffaf0;
}
.need-history-notice strong { display: block; margin-bottom: 6px; color: #7a4f0c; }
.need-history-notice ul { margin: 0 0 6px; padding-left: 18px; font-size: .88rem; color: #4b3a1c; }
.need-history-notice li { margin-bottom: 2px; }
.need-history-notice p { margin: 0; font-size: .82rem; color: #7a602c; }
.need-copy-warning {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #ecd9a8;
  border-radius: 12px;
  background: #fffaf0;
  color: #6b4a10;
  font-size: .86rem;
  line-height: 1.45;
}
@media (max-width: 480px) {
  .needs-summary { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .needs-summary-card { padding: .8rem .85rem; }
  .needs-summary-card strong { font-size: 1.4rem; }
}

/* ===== Ponsel / Mini App: pemilih anak hemat layar ===== */
@media (max-width: 720px) {
  .need-picker { max-width: 100%; }
  .need-picker h1 {
    font-size: clamp(1.45rem, 6.4vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: .15rem 0 .4rem;
  }
  .need-picker .lead {
    font-size: .9rem;
    line-height: 1.5;
    margin: .2rem 0 .6rem;
  }
  .need-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin: 10px 0 6px;
    border-radius: 12px;
  }
  /* tanpa ini flex:1 1 220px membuat tinggi kolom melar di arah kolom */
  .need-filter-field { flex: 0 0 auto; }
  .need-filter-field label { font-size: .78rem; }
  .need-filter-field input,
  .need-filter-field select {
    min-height: 42px;
    padding: 9px 11px;
    font-size: .95rem;
  }
  .need-filter .primary-button { width: 100%; min-height: 44px; }
  .need-result-count { margin: 10px 0; font-size: .85rem; }
  .need-picker-list { gap: 6px; }
  .need-picker-row { padding: 10px 12px; gap: 10px; }
  .need-picker-main strong { font-size: .95rem; }
  .need-picker-meta { font-size: .78rem; }
  .need-picker-history { font-size: .7rem; }
  .need-picker-back { margin-top: 14px; }
}

/* ===== Baris pemilih anak: nama di kiri, tombol Pilih kecil di kanan ===== */
.need-picker-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
}
.need-picker-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.need-picker-main strong {
  font-size: .95rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.need-picker-meta {
  display: block;
  font-size: .76rem;
  line-height: 1.3;
  color: #5b6472;
  white-space: normal;
  overflow-wrap: anywhere;
}
.need-picker-action {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: auto;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid #14603f;
  border-radius: 999px;
  background: #14603f;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}
.need-picker-action:hover,
.need-picker-action:focus-visible { background: #0f4a33; color: #fff; }
.need-picker-history {
  margin-top: 2px;
  padding: 2px 7px;
  font-size: .68rem;
}
@media (max-width: 720px) {
  .need-picker-row { padding: 8px 8px 8px 12px; gap: 8px; border-radius: 10px; }
  .need-picker-main strong { font-size: .9rem; }
  .need-picker-meta { font-size: .72rem; }
  .need-picker-action { min-height: 32px; padding: 6px 12px; font-size: .78rem; }
  .need-picker-list { gap: 5px; }
}

/* Tombol kembali untuk halaman web yang dibuka di dalam Telegram */
a.mini-kembali {
  position: fixed;
  left: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border: 1px solid rgba(15, 74, 51, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .97);
  color: #0f4a33;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(16, 37, 28, .18);
}
a.mini-kembali:hover,
a.mini-kembali:focus-visible { background: #14603f; color: #fff; }
@media print { a.mini-kembali { display: none; } }

/* Catatan cakupan wilayah akun pendamping */
.need-scope-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid #d7e3da;
  border-radius: 10px;
  background: #f4f8f5;
  color: #33513f;
  font-size: .86rem;
  line-height: 1.45;
}

/* ===== Bantuan kebutuhan: saringan daftar dan unduhan laporan ===== */
.need-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 100%;
  font-size: 0.88rem;
  color: var(--muted, #5b6472);
}
.need-filter-check input { width: 18px; height: 18px; }
.need-history-tools .need-filter { width: 100%; margin: 12px 0 6px; }
@media (max-width: 720px) {
  .need-filter-check { flex: 1 1 auto; }
}

/* ===== Bantuan kebutuhan: kartu unduh laporan ===== */
.need-report-card {
  margin: 0 0 22px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line, #e2e6ee);
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdfc, #ffffff);
}
.need-report-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.need-report-head p { margin: 0; max-width: 60ch; }
.need-report-head h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--green-dark, #14523f);
}
.need-report-head p {
  color: var(--muted, #5b6472);
  font-size: 0.92rem;
}
.need-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.need-report-field { display: flex; flex-direction: column; gap: 6px; }
.need-report-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #5b6472);
}
.need-report-field input,
.need-report-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8dde8);
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
}
.need-report-card .need-filter-check { margin: 14px 0 4px; }
.need-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e8ecf2);
}
.need-report-actions .primary-button,
.need-report-actions .secondary-action { min-height: 44px; }
@media (max-width: 560px) {
  .need-report-actions > * { flex: 1 1 100%; }
}
