/* محاسبة النفس — داخل غلاف ذِكرٌ وفِكر */

body.mhmode .locbar { display: none; }

.mh-entry { margin: 4px 0 14px; }
.mh-entry .qc-ic svg {
  width: 26px; height: 26px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.mh-entry .qc-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.mh-entry .qc-t small { font-size: 12px; color: var(--gold2); font-weight: 800; }
.mh-entry .qc-t b { font-size: 18px; font-weight: 800; }
.mh-entry .qc-t em { font-style: normal; font-size: 13px; color: rgba(255,248,230,.82); font-weight: 500; line-height: 1.6; }

.mh-sub { margin-bottom: 14px; }
.mh-sub a {
  display: flex; align-items: center; justify-content: center;
  height: 36px; border-radius: 999px; text-decoration: none;
  color: var(--mut); font: 800 14px 'Tajawal', sans-serif;
}
.mh-sub a.on {
  background: linear-gradient(160deg, var(--em2), var(--em));
  color: #fff8e6; box-shadow: inset 0 0 0 1px rgba(227,199,125,.5);
}

.mh-pane { display: none; }
.mh-pane.on { display: block; }

.mh-lead { margin: 0 0 8px; color: var(--mut); font-size: 14.5px; line-height: 1.85; }
.mh-day { margin: 0; font-size: 15px; font-weight: 800; color: var(--em); }
[data-theme="night"] .mh-day { color: var(--gold2); }
.mh-hint { margin: 0 0 12px; color: var(--mut); font-size: 13.5px; line-height: 1.75; font-weight: 500; }
#v-muhasaba .card .tgl { padding: 8px 0; border-bottom: 1px dashed var(--line); }
#v-muhasaba .card .tgl:last-child { border-bottom: 0; }

.mh-prayers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mh-salah {
  appearance: none; border: 1px solid var(--line); background: var(--bg);
  color: var(--mut); font: 800 12px 'Tajawal', sans-serif;
  border-radius: 14px; padding: 10px 2px; min-height: 44px; cursor: pointer;
}
.mh-salah[aria-pressed="true"] {
  background: linear-gradient(160deg, var(--em2), var(--em));
  color: #fff8e6; border-color: rgba(227,199,125,.55);
  box-shadow: inset 0 0 0 1px rgba(227,199,125,.35);
}

.mh-istighfar { font-family: 'Amiri', serif; font-size: 22px !important; margin: 0 0 14px !important; }
.mh-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.mh-list:empty { display: none; }
.mh-item {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(201,162,74,.08); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.mh-item p { margin: 0; flex: 1; font-size: 14.5px; line-height: 1.7; font-weight: 700; }
.mh-item button {
  flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--mut); cursor: pointer;
  font: 800 18px 'Tajawal', sans-serif; line-height: 1;
}
.mh-add { display: flex; gap: 8px; align-items: center; }
.mh-add input, #mh-niyya {
  flex: 1; width: 100%; min-width: 0;
  font: 700 14.5px 'Tajawal', sans-serif; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; outline: none;
}
#mh-niyya { resize: vertical; min-height: 88px; line-height: 1.8; }
#mh-niyya[readonly] { resize: none; }
.mh-add .btn { flex: 0 0 auto; height: 44px; padding: 0 14px; }
.mh-actions { display: grid; gap: 8px; margin: 4px 0 10px; }
.mh-actions .btn { width: 100%; height: 48px; font-size: 16px; }
.mh-saved { margin: 0; text-align: center; font-size: 13.5px; font-weight: 800; color: var(--em); }
[data-theme="night"] .mh-saved { color: var(--gold2); }
.mh-priv, .mh-ro { margin: 0 0 14px; text-align: center; font-size: 12.5px; color: var(--mut); line-height: 1.7; font-weight: 700; }
.mh-ro { color: var(--goldd); }

.mh-streak-n {
  margin: 0; text-align: center; font-size: 52px; font-weight: 800; line-height: 1;
  color: var(--em); font-variant-numeric: tabular-nums;
}
[data-theme="night"] .mh-streak-n { color: var(--gold2); }
.mh-streak-t { margin: 8px 0 0; text-align: center; color: var(--mut); font-size: 14.5px; line-height: 1.75; }

.mh-cal-nav { display: flex; gap: 6px; }
.mh-cal-week, .mh-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mh-cal-week { margin-bottom: 6px; }
.mh-cal-week span { font-size: 11.5px; font-weight: 800; color: var(--goldd); }
.mh-cal button {
  aspect-ratio: 1; border-radius: 11px; border: 1px solid transparent;
  background: transparent; color: var(--ink); font: 800 13px 'Tajawal', sans-serif;
  cursor: pointer; padding: 0; min-height: 36px;
}
.mh-cal button.out { color: var(--mut); opacity: .4; cursor: default; }
.mh-cal button.has { background: rgba(201,162,74,.16); border-color: rgba(201,162,74,.4); color: var(--goldd); }
[data-theme="night"] .mh-cal button.has { color: var(--gold2); }
.mh-cal button.today { outline: 2px solid var(--gold); outline-offset: 1px; }

.mh-hist { display: grid; gap: 8px; }
.mh-hist a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-decoration: none; color: inherit; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg);
}
.mh-hist a b { display: block; font-size: 14.5px; color: var(--em); }
[data-theme="night"] .mh-hist a b { color: var(--gold2); }
.mh-hist a small { color: var(--mut); font-size: 12.5px; font-weight: 700; }
.mh-hist a span { color: var(--goldd); font-size: 18px; font-weight: 800; }

.mh-danger { width: 100%; color: #9a4a2e !important; border-color: rgba(185,90,60,.45) !important; }
[data-theme="night"] .mh-danger { color: #e9a184 !important; }

.mh-time-lab {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 0; font-weight: 800; color: var(--em); font-size: 15px;
}
[data-theme="night"] .mh-time-lab { color: var(--gold2); }
.mh-time-lab input[type="time"] {
  font: 800 15px 'Tajawal', sans-serif; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 10px; min-height: 44px; min-width: 132px;
}
.mh-rem-btns { display: grid; gap: 8px; }
.mh-rem-btns .btn { width: 100%; height: 46px; }
#v-muhasaba .tgl.rem-main { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; }
#v-muhasaba .tgl.rem-main b { color: var(--em); font-size: 15.5px; }
[data-theme="night"] #v-muhasaba .tgl.rem-main b { color: var(--gold2); }

.mh-add[hidden], #mh-save[hidden], .mh-saved[hidden], .mh-ro[hidden], #mh-hist-empty[hidden], .mh-actions [hidden] { display: none !important; }

@media (max-width: 360px) {
  .mh-prayers { gap: 4px; }
  .mh-salah { font-size: 11px; padding: 8px 1px; }
}
