/* jurnal.css — Jurnal Amalan Harian (terpisah dari Misi 40 Hari)
   Tab harian (form), mingguan, bulanan (kalender + rekap). */

.jurnal-page { gap: 14px; }

/* ---------- tab ---------- */
.jrn-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.jrn-tab {
  min-height: 44px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 750;
  line-height: 1.1;
  transition: background .14s ease, color .14s ease;
}
.jrn-tab.is-active {
  background: var(--emerald);
  color: var(--surface);
  box-shadow: 0 6px 14px rgba(18, 113, 90, .18);
}

/* ---------- tab harian: tanggal ---------- */
.jrn-date-card { padding: 16px 18px; }
.jrn-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.jrn-date-row p {
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--fs-13);
  font-weight: 700;
  line-height: 1.35;
}
.jrn-date-field { flex: 0 0 auto; width: 150px; }
.jrn-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.jrn-date-field input { min-height: 44px; }

.jrn-day-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.jrn-sum-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: var(--r-pill);
  background: var(--mint-soft);
  color: var(--emerald-2);
  font-size: var(--fs-10);
  font-weight: 750;
  line-height: 1;
}
.jrn-sum-pill .ico { width: 14px; height: 14px; }

.jrn-form { display: grid; gap: 12px; }

/* ---------- navigasi periode (minggu/bulan) ---------- */
.jrn-period {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.jrn-nav-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  transition: background .12s ease, opacity .12s ease;
}
.jrn-nav-btn:active { background: var(--surface-3); }
.jrn-nav-btn:disabled { opacity: .35; }
.jrn-period-copy { min-width: 0; text-align: center; }
.jrn-period-copy b {
  display: block;
  font-size: var(--fs-14);
  font-weight: 800;
  line-height: 1.2;
}
.jrn-period-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-10);
  line-height: 1.3;
}

/* ---------- rekap angka ---------- */
.jrn-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.jrn-stat {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 14px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.jrn-stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border-radius: 11px;
}
.jrn-stat.is-sunnah .jrn-stat-icon { background: var(--mint-soft); color: var(--deep); }
.jrn-stat.is-quran .jrn-stat-icon { background: var(--mint-soft-2); color: var(--emerald-2); }
.jrn-stat.is-buku .jrn-stat-icon { background: var(--gold-soft); color: var(--amber-ink); }
.jrn-stat.is-azan .jrn-stat-icon { background: var(--surface-3); color: var(--deep-2); }
.jrn-stat strong {
  max-width: 100%;
  font-size: clamp(22px, 7.2vw, 31px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.jrn-stat > span:last-child {
  color: var(--muted);
  font-size: var(--fs-10);
  font-weight: 650;
  line-height: 1.25;
}

/* ---------- daftar hari (mingguan) ---------- */
.jrn-day-list { display: grid; gap: 8px; }
.jrn-day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  background: var(--surface);
  text-align: left;
  transition: background .12s ease, transform .12s ease;
}
.jrn-day-row:active { transform: scale(.985); background: var(--surface-4); }
.jrn-day-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-3);
}
.jrn-day-row.is-light .jrn-day-dot { background: var(--gold-d); }
.jrn-day-row.is-full .jrn-day-dot { background: var(--emerald); }
.jrn-day-copy { min-width: 0; flex: 1 1 auto; }
.jrn-day-copy b {
  display: block;
  font-size: var(--fs-12);
  font-weight: 750;
  line-height: 1.25;
  text-transform: capitalize;
}
.jrn-day-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-10);
  line-height: 1.3;
}
.jrn-day-row.is-empty .jrn-day-copy b { color: var(--muted); }
.jrn-day-surah {
  flex: 0 0 auto;
  max-width: 96px;
  padding: 5px 8px;
  border-radius: var(--r-pill);
  background: var(--mint-soft);
  color: var(--emerald-2);
  font-size: var(--fs-10);
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- kalender (bulanan) ---------- */
.jrn-cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}
.jrn-cal-head span {
  color: var(--muted-3);
  font-size: var(--fs-10);
  font-weight: 700;
  text-align: center;
}
.jrn-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.jrn-cal-empty { aspect-ratio: 1; }
.jrn-cal-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: transform .12s ease, background .12s ease;
}
.jrn-cal-day:active { transform: scale(.92); }
.jrn-cal-day.is-light { background: var(--mint-soft-2); color: var(--emerald-2); }
.jrn-cal-day.is-full { background: var(--emerald); color: var(--surface); }
.jrn-cal-day.is-today {
  outline: 2px solid var(--gold-d);
  outline-offset: 2px;
}
.jrn-cal-day:disabled { opacity: .32; }

.jrn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--fs-10);
}
.jrn-legend span { display: inline-flex; align-items: center; gap: 5px; }
.jrn-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--surface-3);
}
.jrn-legend i.is-light { background: var(--mint-soft-2); }
.jrn-legend i.is-full { background: var(--emerald); }

@media (max-width: 360px) {
  .jrn-date-row { flex-direction: column; align-items: stretch; }
  .jrn-date-field { width: 100%; }
  .jrn-day-surah { max-width: 78px; }
}
