/* =====================================================
   الحميري للحج — تطبيق الحجاج | الستايل
   الهوية: عنّابي #8E1838 · خلفيات فاتحة · رمادي داكن
   ===================================================== */
:root {
  --maroon: #8E1838;
  --maroon-2: #A02044;
  --maroon-deep: #6E1129;
  --maroon-ink: #4F0A1D;
  --grad: linear-gradient(135deg, var(--maroon-2) 0%, var(--maroon) 55%, var(--maroon-deep) 100%);
  --bg: #F8F4F2;
  --bg-out: #EFE7E4;
  --card: #FFFFFF;
  --tint: #F6E9EC;
  --tint-2: #FDF5F7;
  --text: #33302F;
  --muted: #8B8380;
  --line: #EDE3E0;
  --ok: #1D8A4E;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(110, 17, 41, .10);
  --shadow-sm: 0 4px 14px rgba(110, 17, 41, .08);
  --nav-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg-out);
  color: var(--text);
  min-height: 100dvh;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* إمكانية الوصول */
:focus-visible { outline: 3px solid #E8A5B8; outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================= شاشة البداية ================= */
#splash {
  position: fixed; inset: 0; z-index: 100;
  background: #8E1838;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity .55s ease;
}
#splash.away { opacity: 0; pointer-events: none; }
#splash { isolation: isolate; }
.splash-glow {
  position: absolute; inset: 0; margin: auto;
  width: 430px; height: 430px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.09) 0%, transparent 62%);
  animation: splashGlow 3.4s ease-in-out infinite;
}
.splash-logo {
  width: min(64vw, 300px);
  position: relative; z-index: 1;
  mix-blend-mode: lighten;
  animation: splashLogoIn .85s cubic-bezier(.22, 1, .36, 1) both,
             splashLogoFloat 3.6s ease-in-out 1.1s infinite;
}
@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(.9) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes splashLogoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes splashGlow {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
.splash-dots { position: absolute; bottom: 17%; display: flex; gap: 9px; z-index: 1; }
.splash-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  animation: splashDot 1.15s ease-in-out infinite;
}
.splash-dots i:nth-child(2) { animation-delay: .15s; }
.splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes splashDot {
  0%, 80%, 100% { opacity: .22; transform: scale(.8); }
  40%           { opacity: 1;   transform: scale(1.05); }
}
.splash-watermark {
  position: absolute; bottom: 0; inset-inline: 0;
  width: 100%; pointer-events: none;
  animation: splashWmIn 1.1s ease both .25s;
}
@keyframes splashWmIn { from { opacity: 0; } to { opacity: 1; } }

/* ================= تسجيل الدخول ================= */
#auth { min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: var(--bg); box-shadow: 0 0 60px rgba(0,0,0,.12); }
.auth-hero { background: #8E1838; padding: 52px 24px 40px; text-align: center; border-radius: 0 0 34px 34px; }
.auth-logo { width: min(60%, 250px); margin: 0 auto; mix-blend-mode: lighten; }
.auth-body { padding: 26px 24px 40px; }
.auth-body h1 { font-size: 24px; font-weight: 800; color: var(--maroon-ink); }
.auth-sub { color: var(--muted); font-size: 14px; margin: 4px 0 22px; }
.field { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 16px; margin-bottom: 14px; transition: border-color .2s, box-shadow .2s; }
.field:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(142,24,56,.08); }
.field-ic { display: inline-flex; width: 24px; height: 24px; color: var(--maroon); flex: none; }
.field-ic svg { width: 100%; height: 100%; }
.field input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; color: var(--text); min-width: 0; }
.field input::placeholder { color: #B9AFAC; }
.login-err { background: #FDECEF; color: #A3142F; border: 1px solid #F3C2CC; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.8; }
.demo-hint { margin-top: 22px; background: var(--tint-2); border: 1px dashed #E3B9C4; border-radius: 14px; padding: 12px 16px; font-size: 13px; color: #7C4A57; }
.demo-hint summary { cursor: pointer; font-weight: 600; color: var(--maroon); }
.demo-hint div { margin: 10px 0; }

/* أزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; border-radius: 14px; padding: 14px 22px; transition: transform .15s ease, box-shadow .2s ease, background .2s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(142,24,56,.35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(142,24,56,.45); }
.btn-outline { border: 2px solid var(--maroon); color: var(--maroon); background: #fff; }
.btn-outline:hover { background: var(--tint); }
.btn-block { width: 100%; }
.btn-mini { background: var(--maroon); color: #fff; font-size: 13px; padding: 8px 16px; border-radius: 10px; margin-top: 4px; }
.btn:disabled { opacity: .6; pointer-events: none; }

/* ================= الهيكل ================= */
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; background: var(--bg); box-shadow: 0 0 60px rgba(0,0,0,.12); position: relative; }
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: rgba(248, 244, 242, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; box-shadow: var(--shadow-sm); }
.topbar-titles { display: flex; flex-direction: column; line-height: 1.25; }
.topbar-titles strong { color: var(--maroon-ink); font-size: 15.5px; font-weight: 800; }
.topbar-titles small { color: var(--muted); font-size: 10px; letter-spacing: .14em; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #C9C2BF; transition: background .3s; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(29,138,78,.15); }

/* زر الإشعارات */
.notif-btn { position: relative; margin-inline-start: auto; }
.notif-badge {
  position: absolute; top: 3px; inset-inline-end: 3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #D93025; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  animation: badgePop .3s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes badgePop { from { transform: scale(0); } }
.notif-btn.ring svg { animation: bellRing .9s ease; transform-origin: top center; }
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); } 80% { transform: rotate(-6deg); }
}

/* لوحة الإشعارات */
#notifOverlay { position: fixed; inset: 0; background: rgba(52, 6, 20, .45); backdrop-filter: blur(3px); z-index: 48; }
#notifSheet {
  position: fixed; z-index: 50; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; max-height: 78dvh;
  background: var(--bg); border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 50px rgba(52,6,20,.35);
  display: flex; flex-direction: column;
  animation: sheetUp .32s cubic-bezier(.2,.9,.3,1.1);
}
.notif-enable { background: var(--tint-2); border: 1.5px dashed #E3B9C4; border-radius: 14px; margin: 14px 14px 0; padding: 12px 14px; }
.notif-enable p { font-size: 12.5px; color: #7C4A57; line-height: 1.8; margin-bottom: 10px; }
.notif-enable.done { border-style: solid; border-color: #BFE3CC; background: #EFF9F2; }
.notif-enable.done p { color: #1D6B40; }
.notif-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; }
.notif-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow-sm); animation: msgIn .25s ease; }
.notif-item.unread { border-inline-start: 4px solid var(--maroon); }
.notif-item b { display: block; font-size: 14px; color: var(--maroon-ink); margin-bottom: 3px; }
.notif-item p { font-size: 13px; color: #6B615E; line-height: 1.8; white-space: pre-line; }
.notif-item time { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.notif-empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 36px 10px; }

/* الشكاوى والطلبات والتقييم */
.fb-tabs { display: flex; gap: 6px; background: var(--tint-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 10px 14px 0; }
.fb-tabs button { flex: 1; padding: 9px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: all .2s; }
.fb-tabs button.active { background: var(--grad); color: #fff; box-shadow: 0 4px 10px rgba(142,24,56,.25); }
.fb-form { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 16px; }
.fb-form textarea { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 14px; resize: vertical; min-height: 74px; outline: none; font-family: inherit; }
.fb-form textarea:focus { border-color: var(--maroon); }
.fb-form .btn { align-self: flex-start; }
.fb-stars { display: flex; gap: 4px; }
.fb-stars button { font-size: 34px; line-height: 1; color: #E2D6D2; padding: 0 2px; transition: transform .12s ease, color .15s; }
.fb-stars button.on { color: #F5B301; }
.fb-stars button:active { transform: scale(1.25); }
.stars { display: inline-flex; gap: 1px; }
.stars button { font-size: 15px; color: #E2D6D2; padding: 0; }
.stars button.on { color: #F5B301; }
.fb-mine { border-top: 1px dashed var(--line); padding: 12px 14px 16px; }
.fb-mine h4 { font-size: 13px; color: var(--maroon-ink); margin-bottom: 8px; }
.fb-mine-item { background: var(--tint-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.fb-mine-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.fb-mine-head b { font-size: 13px; color: var(--maroon-ink); flex: 1; }
.fb-mine-item p { font-size: 12.5px; color: #6B615E; line-height: 1.7; }
.status-chip { font-size: 10.5px; font-weight: 800; border-radius: 8px; padding: 2px 8px; background: var(--tint); color: var(--maroon); }
.status-chip.done { background: #EAF3EE; color: #1D6B40; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: var(--maroon); transition: background .2s; flex: none; }
.icon-btn:hover { background: var(--tint); }
.icon-btn svg { width: 22px; height: 22px; }

#page { padding: 16px 16px calc(var(--nav-h) + 90px); outline: none; min-height: 60dvh; }

/* ================= التنقل السفلي ================= */
#bottomnav {
  position: fixed; bottom: 0; z-index: 40;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 6px 6px env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -8px 30px rgba(78, 8, 28, .12);
  display: flex; align-items: stretch;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #9C9290; font-size: 12px; font-weight: 600; border-radius: 16px; position: relative; transition: color .2s;
}
.nav-btn svg { width: 24px; height: 24px; }
.nav-btn i { font-style: normal; }
.nav-btn::after { content: ''; position: absolute; bottom: 6px; width: 0; height: 3px; border-radius: 2px; background: var(--maroon); transition: width .25s ease; }
.nav-btn.active { color: var(--maroon); }
.nav-btn.active::after { width: 26px; }
.nav-btn:hover { color: var(--maroon); }

/* ================= زر اسألني ================= */
#askBtn {
  position: fixed; z-index: 35;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: max(16px, calc(50% - 260px + 16px));
  display: flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff;
  padding: 12px 20px; border-radius: 18px 18px 6px 18px;
  font-size: 16px; box-shadow: 0 12px 28px rgba(142,24,56,.4);
  transition: transform .18s ease;
}
#askBtn:hover { transform: translateY(-2px); }
#askBtn:active { transform: scale(.95); }
#askBtn svg { width: 20px; height: 20px; }
#askBtn::before { content: ''; position: absolute; inset: -6px; border-radius: 24px; border: 2px solid rgba(160,32,68,.35); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { transform: scale(.96); opacity: 1; } 70% { transform: scale(1.06); opacity: 0; } 100% { opacity: 0; } }

/* ================= الرئيسية ================= */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 640/300; background: var(--tint); }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.carousel-dots b { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.55); transition: all .3s; }
.carousel-dots b.on { width: 20px; background: #fff; }

.sec-title { display: flex; align-items: center; gap: 10px; margin: 26px 2px 14px; font-size: 19px; font-weight: 800; color: var(--maroon-ink); }
.sec-title::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(to left, var(--maroon), transparent); opacity: .35; }

/* شبكة الخدمات — بطاقات متساوية الحجم */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc-card { background: var(--grad); border-radius: 16px; color: #fff; box-shadow: 0 8px 20px rgba(142,24,56,.28); transition: transform .18s ease, box-shadow .2s; overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 84px; }
.svc-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(142,24,56,.38); }
.svc-card:active { transform: scale(.98); }
.svc-card.wide { grid-column: 1 / -1; }
.svc-head { display: flex; align-items: center; gap: 10px; padding: 14px; min-height: 72px; text-align: start; width: 100%; color: #fff; flex: 1; }
.svc-ic { flex: none; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; }
.svc-ic svg { width: 21px; height: 21px; }
.svc-head b { font-size: 14.5px; font-weight: 700; line-height: 1.45; flex: 1; }
.svc-card.wide .svc-head b { font-size: 16px; }
.svc-chevron { flex: none; width: 18px; height: 18px; opacity: .8; transition: transform .3s; }

/* ============ صفحة الخيار ============ */
.svc-page { animation: svcIn .28s ease; }
@keyframes svcIn { from { opacity: 0; transform: translateY(10px); } }
.svc-appbar {
  position: sticky; top: 66px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff;
  border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(142,24,56,.35);
}
.svc-appbar .icon-btn { color: #fff; }
.svc-appbar .icon-btn:hover { background: rgba(255,255,255,.14); }
.svc-appbar-title { flex: 1; font-size: 16px; font-weight: 800; line-height: 1.4; }
.svc-appbar .svc-lang { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; margin: 0; }
.svc-intro { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 14px; font-size: 14px; line-height: 1.95; color: #5C5350; box-shadow: var(--shadow-sm); }
.svc-lang { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--maroon); border: 1.5px solid #E3B9C4; background: var(--tint-2); border-radius: 20px; padding: 3px 12px; flex: none; }
.svc-page-img { border-radius: 14px; margin-top: 14px; width: 100%; max-height: 320px; object-fit: cover; }

/* القائمة المنسدلة داخل صفحة الخيار */
.acc-list { display: flex; flex-direction: column; gap: 10px; }
.acc-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.acc-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; text-align: start; color: var(--maroon-ink); }
.acc-head b { flex: 1; font-size: 14.5px; font-weight: 800; line-height: 1.5; }
.acc-head .svc-chevron { color: var(--maroon); }
.acc-item.open { border-color: #E3B9C4; }
.acc-item.open .acc-head .svc-chevron { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.acc-body-in { padding: 2px 16px 14px; border-top: 1px dashed #EFD9DF; }
.acc-body-in p { font-size: 13.5px; line-height: 1.95; color: #5C5350; white-space: pre-line; }

/* ================= مناسك ================= */
.mnk-timeline { position: relative; padding-inline-start: 26px; }
.mnk-timeline::before { content: ''; position: absolute; inset-inline-start: 7px; top: 8px; bottom: 8px; width: 2px; background: #E8C6CF; border-radius: 2px; }
.mnk-step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.mnk-step::before { content: ''; position: absolute; inset-inline-start: -25px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 4px var(--tint); }
.mnk-num { position: absolute; top: 10px; inset-inline-end: 12px; font-size: 26px; font-weight: 900; color: var(--tint); line-height: 1; }
.mnk-step h3 { font-size: 15.5px; color: var(--maroon-ink); font-weight: 800; padding-inline-end: 40px; }
.mnk-step p { font-size: 13.5px; color: #6B615E; margin-top: 6px; line-height: 1.85; }

/* ================= عن الشركة ================= */
.about-hero { background: #8E1838; border-radius: var(--radius); padding: 30px 20px; text-align: center; color: #fff; box-shadow: var(--shadow); }
.about-hero img { width: min(62%, 230px); margin: 0 auto 8px; mix-blend-mode: lighten; }
.about-hero p { font-size: 14px; opacity: .95; margin-top: 10px; line-height: 1.9; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-align: center; padding: 18px 8px; box-shadow: var(--shadow-sm); }
.stat-card b { display: block; font-size: 26px; font-weight: 900; color: var(--maroon); }
.stat-card span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.about-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; box-shadow: var(--shadow-sm); }
.about-card h3 { color: var(--maroon-ink); font-size: 16px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.about-card p { font-size: 14px; color: #5C5350; line-height: 1.95; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.contact-row:last-child { border-bottom: none; }
.contact-row svg { width: 20px; height: 20px; color: var(--maroon); flex: none; }
.contact-row a { color: var(--maroon); font-weight: 700; text-decoration: none; }
.contact-cap { margin-inline-start: auto; font-size: 11px; color: var(--muted); background: var(--tint); border-radius: 8px; padding: 2px 8px; }

/* ================= السبحة والقبلة ================= */
.ibadat-tabs { display: flex; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 5px; gap: 6px; margin-bottom: 20px; }
.ibadat-tabs button { flex: 1; padding: 11px; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--muted); transition: all .25s; }
.ibadat-tabs button.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(142,24,56,.3); }

.tasbih-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 0 20px; }
.tasbih-targets { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.tasbih-targets button { border: 1.5px solid var(--line); background: #fff; color: var(--muted); font-weight: 700; border-radius: 22px; padding: 8px 18px; font-size: 14px; transition: all .2s; }
.tasbih-targets button.active { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.tasbih-ring { position: relative; width: 250px; height: 250px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tasbih-ring svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.tasbih-ring circle { fill: none; }
.ring-bg { stroke: var(--tint); stroke-width: 12; }
.ring-fg { stroke: var(--grad); stroke: var(--maroon); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .25s ease; }
.tasbih-btn { position: absolute; inset: 18px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 16px 36px rgba(142,24,56,.4); transition: transform .1s ease; }
.tasbih-btn:active { transform: scale(.94); }
.tasbih-count { font-size: 54px; font-weight: 900; line-height: 1; }
.tasbih-of { font-size: 14px; opacity: .85; }
.tasbih-total { margin-top: 4px; font-size: 13px; color: var(--muted); }
.tasbih-reset { margin-top: 14px; color: var(--maroon); font-weight: 700; font-size: 13.5px; border: 1.5px solid #E3B9C4; border-radius: 22px; padding: 8px 22px; background: var(--tint-2); transition: background .2s; }
.tasbih-reset:hover { background: var(--tint); }

.qibla-wrap { display: flex; flex-direction: column; align-items: center; padding: 6px 0 20px; }
.qibla-dial { position: relative; width: 280px; height: 280px; border-radius: 50%; background: #fff; border: 2px solid var(--line); box-shadow: var(--shadow); }
.qibla-rose { position: absolute; inset: 0; transition: transform .15s linear; }
.qibla-label { position: absolute; font-size: 13px; font-weight: 800; color: var(--muted); transform: translate(-50%, -50%); }
.qibla-label.n { color: var(--maroon); font-size: 15px; }
.qibla-tick { position: absolute; width: 2px; height: 10px; background: #E0D5D1; left: 50%; top: 8px; transform-origin: 50% 132px; }
.qibla-needle { position: absolute; left: 50%; top: 50%; width: 6px; height: 108px; margin-left: -3px; margin-top: -108px; transform-origin: 50% 100%; transition: transform .15s linear; }
.qibla-needle::before { content: ''; position: absolute; inset: 22px 0 0; border-style: solid; border-width: 0 4px 74px 4px; border-color: transparent transparent var(--maroon) transparent; }
.qibla-needle::after { content: ''; position: absolute; inset: 100% 0 0; border-style: solid; border-width: 14px 4px 0 4px; border-color: #D8CBC7 transparent transparent transparent; }
.qibla-needle .qibla-kaaba { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; color: var(--maroon-deep); background: #fff; border-radius: 9px; padding: 3px; box-shadow: var(--shadow-sm); }
.qibla-center { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--maroon-deep); box-shadow: 0 0 0 4px var(--tint); }
.qibla-info { margin-top: 22px; text-align: center; }
.qibla-deg { font-size: 15px; font-weight: 800; color: var(--maroon-ink); }
.qibla-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; max-width: 300px; line-height: 1.8; }

/* ================= حسابي ================= */
.locked { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 46px 26px; }
.locked-ic { width: 92px; height: 92px; border-radius: 50%; background: var(--tint); display: flex; align-items: center; justify-content: center; color: var(--maroon); margin-bottom: 20px; }
.locked-ic svg { width: 42px; height: 42px; }
.locked h2 { color: var(--maroon-ink); font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.locked p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 22px; }

.profile-head { background: var(--grad); border-radius: var(--radius); padding: 20px; color: #fff; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.profile-avatar { width: 66px; height: 66px; border-radius: 18px; background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.profile-avatar img { width: 86%; object-fit: contain; mix-blend-mode: lighten; }
.profile-head h2 { font-size: 19px; font-weight: 800; }
.profile-head small { display: block; font-size: 13px; opacity: .9; margin-top: 2px; }
.booking-chip { margin-inline-start: auto; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); padding: 7px 13px; border-radius: 12px; font-size: 13px; font-weight: 800; white-space: nowrap; }

.assembly-banner { display: flex; align-items: center; gap: 12px; background: var(--tint-2); border: 1.5px dashed #E3B9C4; border-radius: 16px; padding: 14px 16px; margin-top: 14px; }
.assembly-banner svg { width: 26px; height: 26px; color: var(--maroon); flex: none; }
.assembly-banner b { font-size: 22px; color: var(--maroon-ink); }
.assembly-banner span { font-size: 13px; color: #7C4A57; }

.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.info-card > h3, .about-card h3 { padding: 15px 18px 5px; color: var(--maroon-ink); font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.info-card > h3 [data-icon], .about-card h3 [data-icon] { display: inline-flex; width: 19px; height: 19px; color: var(--maroon); flex: none; }
.info-card > h3 svg, .about-card h3 svg { width: 100%; height: 100%; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--muted); flex: none; }
.info-row .v { font-weight: 700; color: var(--text); text-align: start; }
.sv-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px dashed var(--line); }
.sv-row:last-child { border-bottom: none; }
.sv-row .who { flex: 1; min-width: 0; }
.sv-row .who b { display: block; font-size: 14.5px; color: var(--maroon-ink); }
.sv-row .who small { color: var(--muted); font-size: 12.5px; }
.sv-call { width: 42px; height: 42px; border-radius: 13px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 6px 14px rgba(142,24,56,.3); flex: none; }
.sv-call svg { width: 19px; height: 19px; }

/* ================= المحادثة ================= */
#chatOverlay { position: fixed; inset: 0; background: rgba(52, 6, 20, .45); backdrop-filter: blur(3px); z-index: 48; }
#chatSheet {
  position: fixed; z-index: 50; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; max-height: 78dvh;
  background: var(--bg); border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 50px rgba(52,6,20,.35);
  display: flex; flex-direction: column;
  animation: sheetUp .32s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes sheetUp { from { transform: translate(-50%, 60px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--grad); color: #fff; border-radius: 26px 26px 0 0; }
.chat-avatar { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; }
.chat-avatar svg { width: 22px; height: 22px; }
.chat-head b { display: block; font-size: 16px; }
.chat-head small { font-size: 11.5px; opacity: .85; }
.chat-head .icon-btn { color: #fff; margin-inline-start: auto; }
.chat-head .icon-btn:hover { background: rgba(255,255,255,.14); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.msg { max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.8; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg.bot { background: #fff; border: 1px solid var(--line); border-start-end-radius: 5px; align-self: flex-start; box-shadow: var(--shadow-sm); }
.msg.user { background: var(--grad); color: #fff; border-start-start-radius: 5px; align-self: flex-end; }
.msg.typing { display: flex; gap: 5px; align-items: center; padding: 14px 18px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #C9A2AD; animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .18s; }
.msg.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 10px; scrollbar-width: none; }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips button { flex: none; background: #fff; border: 1.5px solid #E3B9C4; color: var(--maroon); font-size: 12.5px; font-weight: 700; border-radius: 20px; padding: 7px 14px; transition: background .2s; }
.chat-chips button:hover { background: var(--tint); }
.chat-form { display: flex; gap: 8px; padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; outline: none; transition: border-color .2s; }
.chat-form input:focus { border-color: var(--maroon); }
.chat-send { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(142,24,56,.3); }
.chat-send svg { width: 20px; height: 20px; }

/* ================= تنبيه ================= */
#toast {
  position: fixed; z-index: 90; bottom: calc(var(--nav-h) + 26px); left: 50%; transform: translateX(-50%);
  background: #3A2A2E; color: #fff; font-size: 13.5px; font-weight: 600;
  border-radius: 14px; padding: 11px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  animation: toastIn .3s ease; max-width: 86%; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* صفحة فارغة */
.empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 14px; }

/* سطح المكتب */
@media (min-width: 700px) {
  body { padding: 24px 0; }
  #app, #auth { border-radius: 34px; min-height: calc(100dvh - 48px); overflow: hidden; }
  #bottomnav { max-width: 520px; border-radius: 26px 26px 0 0; }
}

/* شاشة الكمبيوتر — تخطيط كامل متناسق */
@media (min-width: 1024px) {
  body { padding: 0; }
  #app, #auth { max-width: 940px; border-radius: 0; box-shadow: none; border-inline: 1px solid var(--line); min-height: 100dvh; }
  #page { padding: 24px 44px 150px; }
  #page > * { max-width: 800px; margin-inline: auto; }

  /* الرئيسية: 3 أعمدة */
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-item { max-height: 330px; }

  /* التنقل: شريط عائم */
  #bottomnav {
    bottom: 20px; width: auto; min-width: 620px; height: auto;
    padding: 8px 10px; border-radius: 26px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 44px rgba(78, 8, 28, .22);
  }
  .nav-btn { flex-direction: row; gap: 9px; padding: 10px 20px; font-size: 14px; border-radius: 18px; }
  .nav-btn::after { display: none; }
  .nav-btn.active { background: var(--tint); }
  #askBtn { bottom: 34px; inset-inline-end: max(28px, calc(50% - 470px + 28px)); }

  /* صفحة الخيار والمحتوى */
  .svc-appbar { top: 74px; }
  .chat-msgs { min-height: 220px; }

  /* لوحات المحادثة والإشعارات */
  #chatSheet, #notifSheet { max-width: 640px; }

  /* شاشة الدخول: بطاقة بعمودين */
  #auth { flex-direction: row; margin: 56px auto; min-height: 0; max-width: 960px; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(78, 8, 28, .25); border: 1px solid var(--line); }
  .auth-hero { flex: 1; align-self: stretch; display: flex; align-items: center; padding: 44px 36px; border-radius: 0; }
  .auth-logo { width: 100%; max-width: 320px; }
  .auth-body { flex: 1; padding: 44px 42px; }
}
