/* قهوة وببرونة — تنسيق التطبيق (RTL، ألوان دافية) */

.qh-app {
  --qh-bg: #17130F;
  --qh-surface: #241D18;
  --qh-surface2: #2E2620;
  --qh-ink: #F8F0E7;
  --qh-ink2: #CDBBA9;
  --qh-rose: #E9A0B0;
  --qh-rose-deep: #C96A85;
  --qh-gold: #E7C079;
  --qh-line: rgba(255, 255, 255, 0.09);
  direction: rtl;
  text-align: right;
  font-family: "Noto Kufi Arabic", "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--qh-ink);
  background: var(--qh-bg);
  border-radius: 24px;
  padding: 18px 16px 34px;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.qh-app *, .qh-app *::before, .qh-app *::after { box-sizing: border-box; }
.qh-app button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
.qh-app input, .qh-app select, .qh-app textarea {
  font-family: inherit; font-size: 16px; color: var(--qh-ink);
  background: #1D1712; border: 1px solid var(--qh-line); border-radius: 12px;
  padding: 12px 14px; width: 100%; min-height: 48px;
}
.qh-app input:focus, .qh-app select:focus, .qh-app textarea:focus {
  outline: 2px solid var(--qh-rose); outline-offset: 1px;
}
.qh-app input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; accent-color: var(--qh-rose); }
.qh-app textarea { line-height: 1.9; resize: vertical; }
.qh-app .ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qh-app .qh-banner {
  position: sticky; top: 0; z-index: 6;
  margin: -6px -4px 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(233, 160, 176, 0.16); color: var(--qh-ink);
  border: 1px solid rgba(233, 160, 176, 0.35); font-size: 15px;
}
.qh-app .qh-banner-warn { background: rgba(231, 192, 121, 0.16); border-color: rgba(231, 192, 121, 0.4); }

/* الرئيسية */
.qh-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qh-logo {
  width: 54px; height: 54px; border-radius: 18px; flex: 0 0 auto;
  background: rgba(233, 160, 176, 0.14); display: grid; place-items: center;
  border: 1px solid rgba(233, 160, 176, 0.3);
}
.qh-logo .bottle { width: 34px; height: 34px; fill: none; stroke: var(--qh-rose); stroke-width: 2.2; }
.qh-logo .bottle .heart { fill: var(--qh-rose); stroke: none; }
.qh-title { font-size: 23px; margin: 0; line-height: 1.3; letter-spacing: 0; }
.qh-sub { margin: 2px 0 0; font-size: 13px; color: var(--qh-ink2); }
.qh-welcome {
  background: #F7E5E9; color: #4A2A33; border-radius: 22px;
  padding: 18px 16px; text-align: center; margin-bottom: 16px;
}
.qh-hello { font-size: 21px; font-weight: 700; margin: 0; }
.qh-hello-sub { font-size: 14px; margin: 4px 0 12px; color: #7A4E58; }
.qh-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.qh-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, 0.06); border: 1px solid rgba(74, 42, 51, 0.14);
  color: #5A323C; border-radius: 999px; padding: 5px 11px; font-size: 12.5px;
}
.qh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qh-card {
  background: var(--qh-surface); border: 1px solid var(--qh-line); border-radius: 20px;
  padding: 16px 12px 14px; min-height: 122px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
}
.qh-card:active { transform: scale(0.985); }
.qh-card-ic { color: var(--qh-rose); }
.qh-card-ic .ic { width: 26px; height: 26px; }
.qh-card-label { font-size: 17px; font-weight: 700; }
.qh-card-note { font-size: 12px; color: var(--qh-ink2); }
.qh-card.is-soon { opacity: 0.62; }
.qh-safe { font-size: 12px; color: var(--qh-ink2); text-align: center; margin: 18px 0 0; }

/* رأس الأقسام */
.qh-shead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.qh-back {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 14px;
  background: var(--qh-surface); border: 1px solid var(--qh-line);
  display: grid; place-items: center;
}
.qh-h2 { font-size: 21px; margin: 0; line-height: 1.35; }
.qh-h2sub { margin: 2px 0 0; font-size: 12.5px; color: var(--qh-ink2); }
.qh-h3 { font-size: 16px; margin: 0 0 10px; }
.qh-h4 { font-size: 14px; color: var(--qh-rose); margin: 18px 0 8px; }

/* صناديق */
.qh-box {
  background: var(--qh-surface); border: 1px solid var(--qh-line);
  border-radius: 18px; padding: 14px; margin-bottom: 14px;
}
.qh-empty-box { text-align: center; color: var(--qh-ink2); }
.qh-label { display: block; font-size: 13px; color: var(--qh-ink2); margin: 10px 0 6px; }
.qh-label:first-child { margin-top: 0; }
.qh-num { font-size: 24px; font-weight: 700; }
.qh-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qh-stat { display: flex; flex-direction: column; justify-content: center; font-size: 12.5px; color: var(--qh-ink2); }
.qh-stat b { color: var(--qh-ink); font-size: 15px; }
.qh-ages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.qh-age { font-size: 12.5px; color: var(--qh-ink2); display: block; }
.qh-age input { margin-top: 4px; }
.qh-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.qh-add .qh-input { flex: 1 1 120px; }
.qh-add .qh-small { flex: 1 1 84px; }
.qh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--qh-rose); color: #2A161B; border: none; border-radius: 14px;
  padding: 12px 16px; font-weight: 700; min-height: 48px; flex: 0 0 auto;
}
.qh-btn .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.qh-btn-ghost { background: transparent; color: var(--qh-rose); border: 1px solid rgba(233, 160, 176, 0.45); }
.qh-btn-soft { background: rgba(233, 160, 176, 0.14); color: var(--qh-rose); }
.qh-wide { width: 100%; margin-top: 10px; }
.qh-mini {
  background: rgba(233, 160, 176, 0.14); color: var(--qh-rose); border: none;
  border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px;
}
.qh-mini .ic { width: 14px; height: 14px; }
.qh-icon-btn { background: transparent; border: none; color: var(--qh-ink2); padding: 6px; }
.qh-icon-btn .ic { width: 19px; height: 19px; }
.qh-chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.qh-chip-btn { background: var(--qh-surface2); color: var(--qh-ink); border: 1px solid var(--qh-line); }
.qh-chip-btn.is-on { background: rgba(233, 160, 176, 0.2); border-color: var(--qh-rose); color: var(--qh-rose); }
.qh-chip-x { color: var(--qh-rose); border-color: rgba(233, 160, 176, 0.35); background: rgba(233, 160, 176, 0.1); }
.qh-chip-x .ic { width: 12px; height: 12px; }

/* قوائم */
.qh-list { list-style: none; padding: 0; margin: 0; }
.qh-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 0; border-bottom: 1px dashed var(--qh-line); font-size: 15px;
}
.qh-item:last-child { border-bottom: none; }
.qh-item-name { flex: 1 1 auto; font-weight: 600; text-align: right; background: none; border: none; padding: 0; }
.qh-item-val { color: var(--qh-ink2); font-size: 13.5px; white-space: nowrap; }
.qh-item.is-done .qh-item-name, .qh-item.is-done .qh-check span { text-decoration: line-through; color: var(--qh-ink2); }
.qh-check { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; font-size: 15px; }
.qh-tag {
  font-size: 11px; background: rgba(233, 160, 176, 0.12); color: var(--qh-rose);
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.qh-split { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--qh-ink2); margin-top: 10px; }
.qh-split b { color: var(--qh-ink); }
.qh-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qh-empty { color: var(--qh-ink2); font-size: 14px; margin: 10px 0; }
.qh-note { font-size: 12.5px; color: var(--qh-ink2); line-height: 1.75; margin: 10px 0 0; }
.qh-warn {
  font-size: 13px; color: #F4D7A8; background: rgba(231, 192, 121, 0.12);
  border: 1px solid rgba(231, 192, 121, 0.3); border-radius: 12px; padding: 10px 12px;
}
.qh-tip { font-size: 14px; color: var(--qh-gold); background: rgba(231, 192, 121, 0.1); border-radius: 12px; padding: 10px 12px; }
.qh-ul, .qh-ol { padding-inline-start: 22px; margin: 6px 0 14px; font-size: 15px; }
.qh-ul li, .qh-ol li { margin-bottom: 6px; }

/* الميزانية */
.qh-sum { background: var(--qh-surface2); border-radius: 16px; padding: 14px; margin: 12px 0; }
.qh-sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--qh-ink2); }
.qh-sum-row b { color: var(--qh-ink); font-size: 16px; }
.qh-sum-row.qh-big b { font-size: 22px; color: var(--qh-rose); }
.qh-red, .qh-sum-row.qh-red b { color: #FF9E9E !important; }
.qh-bar { height: 8px; background: #3A2E24; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.qh-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--qh-rose-deep), var(--qh-rose)); }

/* الأكل */
.qh-day { border-bottom: 1px dashed var(--qh-line); padding: 10px 0; }
.qh-day:last-of-type { border-bottom: none; }
.qh-day-head { font-size: 13px; color: var(--qh-rose); font-weight: 700; margin-bottom: 4px; }
.qh-meal { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 15px; }
.qh-meal-lbl { color: var(--qh-ink2); font-size: 12.5px; width: 34px; flex: 0 0 auto; }
.qh-meal-name { flex: 1 1 auto; text-align: right; background: none; border: none; padding: 0; font-weight: 600; }
.qh-meal-cost { color: var(--qh-ink2); font-size: 13px; }
.qh-sug { flex-wrap: wrap; }
.qh-missing { flex: 1 1 100%; font-size: 12px; color: #F4D7A8; }
.qh-ok { flex: 1 1 100%; font-size: 12px; color: #9BE0B0; }
.qh-shop .qh-check { font-size: 14.5px; }
.qh-task { flex-wrap: nowrap; }
.qh-task .qh-check { min-width: 0; }
.qh-task .qh-check span { overflow-wrap: anywhere; }

/* المهام والتايمر */
.qh-rest {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: right;
  background: rgba(233, 160, 176, 0.08); border: 1px solid rgba(233, 160, 176, 0.3);
  border-radius: 16px; padding: 12px 14px;
}
.qh-rest.is-on { background: rgba(233, 160, 176, 0.22); border-color: var(--qh-rose); }
.qh-rest-ic { color: var(--qh-rose); }
.qh-rest b { display: block; font-size: 15px; }
.qh-rest small { color: var(--qh-ink2); font-size: 12px; }
.qh-timer {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: #3A2028; border: 1px solid rgba(233, 160, 176, 0.5);
  border-radius: 16px; padding: 10px 14px; margin-bottom: 14px;
}
.qh-timer-lbl { display: block; font-size: 12px; color: var(--qh-ink2); }
.qh-timer-val { font-size: 26px; color: var(--qh-rose); letter-spacing: 1px; }

/* الصلاة */
.qh-next {
  background: linear-gradient(160deg, #F7E5E9, #EFC9D2); color: #4A2A33;
  border-radius: 20px; padding: 16px; text-align: center; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.qh-next-lbl { font-size: 12.5px; color: #7A4E58; }
.qh-next-name { font-size: 24px; }
.qh-next-time { font-size: 30px; letter-spacing: 0; }
.qh-next-city { font-size: 12.5px; color: #7A4E58; }
.qh-prayers { list-style: none; padding: 0; margin: 0 0 10px; }
.qh-prayers li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 2px; border-bottom: 1px dashed var(--qh-line); font-size: 16px;
}
.qh-prayers li b { font-size: 17px; }
.qh-prayers li.is-next { color: var(--qh-rose); }
.qh-alert { margin: 14px 0 6px; }
.qh-details { margin-top: 12px; border-top: 1px solid var(--qh-line); padding-top: 10px; }
.qh-details summary { color: var(--qh-rose); font-size: 14px; cursor: pointer; padding: 6px 0; }
.qh-offsets { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.qh-linkrow {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: var(--qh-surface2); border: 1px solid var(--qh-line); border-radius: 14px;
  padding: 12px 14px; margin-top: 8px; font-size: 15px; font-weight: 600;
}
.qh-linkrow b { color: var(--qh-rose); font-size: 13px; }

/* الأذكار */
.qh-dhikr { background: var(--qh-surface2); border-radius: 16px; padding: 12px 14px; margin: 10px 0; }
.qh-dhikr.is-done { opacity: 0.65; }
.qh-dhikr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qh-dhikr-head b { font-size: 15.5px; }
.qh-dhikr-text { font-size: 17px; line-height: 2.15; margin: 8px 0; }
.qh-dhikr-src { font-size: 12px; color: var(--qh-ink2); margin: 0 0 8px; }
.qh-count { background: rgba(0, 0, 0, 0.25); border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px; font-size: 12.5px; }

/* التسبيح والورد */
.qh-tasbih { text-align: center; }
.qh-tasbih-circle {
  width: 200px; height: 200px; border-radius: 50%; margin: 18px auto 10px;
  background: radial-gradient(circle at 50% 40%, rgba(233, 160, 176, 0.22), rgba(233, 160, 176, 0.06));
  border: 2px solid rgba(233, 160, 176, 0.5); color: var(--qh-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.qh-tasbih-circle b { font-size: 46px; line-height: 1; }
.qh-tasbih-circle span { font-size: 12.5px; color: var(--qh-ink2); }
.qh-tasbih-lbl { font-size: 18px; font-weight: 700; margin: 4px 0 0; }
.qh-days { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: 12px 0 4px; }
.qh-wdot { aspect-ratio: 1; border-radius: 5px; background: #33291F; }
.qh-wdot.is-on { background: var(--qh-rose); }

@media (min-width: 560px) {
  .qh-app { padding: 22px 20px 36px; }
  .qh-card { min-height: 132px; }
}
@media (prefers-reduced-motion: reduce) {
  .qh-app * { transition: none !important; animation: none !important; }
}

/* الوضع الصحي */
.qh-healthy {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px;
  background: rgba(155, 224, 176, 0.08); border: 1px solid rgba(155, 224, 176, 0.3);
  border-radius: 14px; padding: 12px 14px; text-align: right; font-size: 15px; font-weight: 600;
}
.qh-healthy .ic { color: #9BE0B0; }
.qh-healthy span { flex: 1 1 auto; }
.qh-healthy b { font-size: 12.5px; color: #9BE0B0; }
.qh-healthy.is-on { background: rgba(155, 224, 176, 0.2); border-color: #9BE0B0; }
.qh-tag-ok { background: rgba(155, 224, 176, 0.16); color: #9BE0B0; }
.qh-swap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--qh-line); font-size: 14px; }
.qh-swap:last-child { border-bottom: none; }
.qh-swap-from { color: var(--qh-ink2); text-decoration: line-through; }
.qh-swap-arrow { color: var(--qh-rose); }
.qh-swap-to { font-weight: 700; }
.qh-swap-why { flex: 1 1 100%; font-size: 12px; color: var(--qh-ink2); }

/* أكل الأطفال */
.qh-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; margin-bottom: 14px; }
.qh-tab {
  flex: 0 0 auto; background: var(--qh-surface); border: 1px solid var(--qh-line);
  color: var(--qh-ink2); border-radius: 999px; padding: 9px 14px; font-size: 13.5px; min-height: 42px;
}
.qh-tab.is-on { background: rgba(233, 160, 176, 0.18); border-color: var(--qh-rose); color: var(--qh-rose); font-weight: 700; }
.qh-kidmeal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; font-size: 15px; }
.qh-kidmeal-name { flex: 1 1 60%; }
.qh-sources { list-style: none; padding: 0; margin: 0; }
.qh-sources li { padding: 9px 0; border-bottom: 1px dashed var(--qh-line); font-size: 13.5px; display: flex; flex-direction: column; gap: 3px; }
.qh-sources li:last-child { border-bottom: none; }
.qh-sources a { color: var(--qh-rose); text-decoration: none; font-weight: 700; font-size: 13px; word-break: break-word; }
.qh-sources span { color: var(--qh-ink2); line-height: 1.7; }

/* شاشة الكود وأكواد الدخول */
.qh-gate { padding-bottom: 40px; }
.qh-gate-h { margin-bottom: 6px; }
.qh-code-input {
  text-align: center;
  letter-spacing: 4px;
  font-size: 22px;
  font-weight: 700;
  direction: ltr;
  text-transform: uppercase;
  margin: 10px 0;
}
.qh-gate-msg { color: #F4D7A8; font-size: 14px; line-height: 1.8; margin: 4px 0 10px; }
.qh-coderow {
  border: 1px solid var(--qh-line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.qh-coderow.is-off { opacity: 0.55; }
.qh-coderow-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qh-codename { font-size: 15.5px; font-weight: 700; }
.qh-codeval {
  font-family: ui-monospace, Menlo, monospace;
  direction: ltr;
  letter-spacing: 2px;
  color: var(--qh-rose);
  font-size: 15px;
}
.qh-codemet { color: var(--qh-ink2); font-size: 13px; margin: 4px 0 8px; }
.qh-coderow-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.qh-btn-sm { font-size: 13px; padding: 8px 12px; min-height: 38px; }
.qh-btn-ghost { background: transparent; border: 1px solid var(--qh-line); color: var(--qh-ink2); }
