/* =========================================================
   حكيم · نظام التصميم
   ========================================================= */

:root {
  /* الهوية: أزرق-تركوازي طبي */
  --brand: #0a4d63;
  --brand-2: #0f6f8c;
  --brand-3: #1a97b8;
  --brand-deep: #06303f;
  --brand-glow: #2fc4e6;
  --brand-text: #0a4d63;
  --brand-soft: #e6f3f7;
  --on-brand: #ffffff;
  --on-brand-soft: #bfd9e2;

  --accent: #1fae82;
  --accent-2: #2bd39f;
  --on-accent: #063527;

  /* الأسطح */
  --bg: #f4f7f8;
  --page: #e6ecee;
  --card: #ffffff;
  --card-2: #f7fafb;

  /* النصوص */
  --text: #12211f;
  --text-2: #334442;
  --muted: #5b6d6d;

  /* الحدود */
  --line: #dfe8ea;
  --line-strong: #c6d5d9;

  /* حالات */
  --ok: #0f7a4e;
  --ok-bg: #e2f4ea;
  --warn: #8a6300;
  --warn-bg: #fcf2d6;
  --danger: #c03434;
  --danger-bg: #fbe9e9;
  --info-bg: #e9f2fb;

  /* الزوايا */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* الظلال */
  --sh-1: 0 1px 2px rgba(11, 74, 92, .05), 0 2px 8px rgba(11, 74, 92, .05);
  --sh-2: 0 2px 6px rgba(11, 74, 92, .06), 0 12px 28px rgba(11, 74, 92, .08);
  --sh-3: 0 -8px 30px rgba(11, 74, 92, .10);

  --font: "IBM Plex Sans Arabic", "Noto Sans Arabic", -apple-system,
          "SF Arabic", "Segoe UI", Tahoma, sans-serif;

  font-size: 17px;
  color-scheme: light;
}

/* ===== الوضع الليلي (بيتفعل تلقائياً حسب الساعة) ===== */
html[data-theme="dark"] {
  --brand: #0f5f78;
  --brand-2: #0a4457;
  --brand-3: #1a97b8;
  --brand-deep: #072632;
  --brand-glow: #2fc4e6;
  --brand-text: #6cc8e0;
  --brand-soft: #14303a;
  --on-brand: #ffffff;
  --on-brand-soft: #a9c8d2;

  --accent: #35b184;
  --accent-2: #6fd3ab;
  --on-accent: #04281d;

  --bg: #0f1719;
  --page: #080d0e;
  --card: #162225;
  --card-2: #1c2b2f;

  --text: #e9f2f2;
  --text-2: #c2d3d3;
  --muted: #9cb0b0;

  --line: #263539;
  --line-strong: #394b50;

  --ok: #5fd3a5;
  --ok-bg: #123529;
  --warn: #f0c458;
  --warn-bg: #33290f;
  --danger: #ef8a8a;
  --danger-bg: #3a1e1e;
  --info-bg: #16242f;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 4px 10px rgba(0, 0, 0, .3), 0 14px 34px rgba(0, 0, 0, .28);
  --sh-3: 0 -8px 30px rgba(0, 0, 0, .35);

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* ===== أيقونات Material Symbols =====
   أيقونات حقيقية بدل الإيموجي — مظهر موحد واحترافي عكل الأجهزة */
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal;
  font-size: 1.5rem; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal;
  direction: ltr; vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  /* الخط متغيّر (FILL 0..1 · wght 300..600): مفرّغة ونضيفة بالعادي، ومليانة للشي النشط أو المهم */
  font-variation-settings: "FILL" 0, "wght" 400;
  user-select: none;
}
.ms.fill,
.star .ms, .rt .ms,
.success-hero .s-icon .ms,
.promo .ms,
.emergency .ms { font-variation-settings: "FILL" 1, "wght" 400; }

/* شارة منصة الاستضافة: مو جزء من هوية التطبيق */
#hf-watermark { display: none !important; }

html { height: 100%; }

body {
  min-height: 100%;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--page);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, .16);
}

h1, h2, h3, h4 { line-height: 1.4; font-weight: 800; }

:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== الشاشات ===== */
/* أي عنصر عليه hidden لازم يختفي — حتى لو ستايلو بيعطيه display.
   قبل هالسطر كان بانر «أول طلب» ونقطة الدردشة يطلعوا لكل الناس حتى وقت الكود يخبّيهن. */
[hidden] { display: none !important; }

.screen {
  display: none;
  min-height: 100dvh;
  padding-bottom: calc(146px + env(safe-area-inset-bottom));
  animation: fadeIn .28s ease;
}
/* شاشة الطلب فيها شريط تأكيد ثابت تحت */
#screen-order { padding-bottom: calc(225px + env(safe-area-inset-bottom)); }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.content { padding: 18px 16px; }

/* ===== أدوات نصية ===== */
.muted { color: var(--muted); }
.small { font-size: .9rem; line-height: 1.65; }
.tiny  { font-size: .84rem; line-height: 1.75; margin-top: 6px; }
.grow  { flex: 1; min-width: 0; }

.section-title {
  margin: 22px 0 12px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.note {
  background: var(--info-bg);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: .86rem;
  line-height: 1.85;
  margin-top: 12px;
}
.note strong { color: var(--text); }
.note.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.note.warn strong { color: var(--warn); }

/* ===== شريط الطوارئ ===== */
.emergency .ms { font-size: 1.5rem; flex-shrink: 0; }
.hero-emoji .ms { font-size: 1.7rem; color: var(--brand-text); }
.list-item .ms { color: var(--brand-text); }
.btn .ms { font-size: 1.3rem; }
.promo .ms { font-size: 2rem; flex-shrink: 0; opacity: .85; }
.success-hero .s-icon .ms { font-size: 3.2rem; }
.emergency {
  display: flex; align-items: center; gap: 10px;
  background: var(--danger-bg);
  border: 1.5px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--r-md);
  padding: 11px 14px;
  margin-top: 16px;
  color: var(--danger);
  font-size: .86rem; font-weight: 700; line-height: 1.6;
}
.emergency { text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, box-shadow .15s ease; }
.emergency:active { transform: scale(.985); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.emergency .em-num,
.emergency a {
  color: #fff; background: var(--danger);
  border-radius: 999px; padding: 7px 16px;
  text-decoration: none; font-weight: 800; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}

/* ===== أزرار ===== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px;
  padding: 14px 18px; border: 0; border-radius: var(--r-md);
  font-size: 1rem; font-weight: 700; font-family: inherit; line-height: 1.3;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease;
}
.btn:active { transform: scale(.985); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
  color: var(--on-brand);
  box-shadow: 0 6px 18px rgba(10, 77, 99, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }

.btn-light { background: #fff; color: #0b4a5c; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }

.btn-ghost {
  background: transparent; color: var(--brand-text);
  border: 1.5px solid var(--brand-text);
  margin-top: 12px;
}

.btn-wa {
  background: #1faa55; color: #fff;
  box-shadow: 0 4px 14px rgba(31, 170, 85, .3);
}

.icon-btn {
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  color: var(--text);
  width: 44px; height: 44px; border-radius: var(--r-md);
  font-size: 1.15rem; cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}

/* ===== زر تبديل اللغة عشاشة البداية =====
   منستعمل ID بالمحدد ليغلب قاعدة .splash > * يلي بتعمل position:relative */
#screen-splash .lang-pill {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  inset-inline-start: 18px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  padding: 8px 18px; border-radius: 999px;
  font-family: inherit; font-size: .88rem; font-weight: 700;
  cursor: pointer; z-index: 3;
  transition: background .2s;
}
.lang-pill:active { background: rgba(255, 255, 255, .26); }

/* ===== دعم الإنكليزي (ltr) =====
   التخطيط كلو flex/grid متناظر — بس محاذاة النصوص بدها تنعكس */
.service { text-align: start; }
input[type="tel"] { text-align: right; }
html[dir="ltr"] input[type="tel"] { text-align: left; }

/* ===== شاشة البداية ===== */
#screen-splash { padding-bottom: 0; }
.splash {
  min-height: 100dvh;
  background:
    radial-gradient(90% 60% at 85% 0%, rgba(47, 196, 230, .45) 0%, rgba(47, 196, 230, 0) 60%),
    radial-gradient(70% 50% at 8% 100%, rgba(43, 211, 159, .28) 0%, rgba(43, 211, 159, 0) 60%),
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .08) 0%, transparent 60%),
    linear-gradient(160deg, #0d5f79 0%, #083f52 55%, #052b3a 100%);
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  /* تحت مساحة محجوزة لخط النبض (٦٠px + ١٤ من الحافة + فراغ) لحتى زر الإسعاف ما يغطّي عليه */
  padding: calc(26px + env(safe-area-inset-top)) 26px calc(96px + env(safe-area-inset-bottom));
  text-align: center;
  position: relative; overflow: hidden;
}
.splash > *:not(.splash-anim) { position: relative; z-index: 2; }

/* الخلفية المتحركة: أيقونات طبية طافية + خط نبض */
.splash-anim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.splash-anim .fl {
  position: absolute; bottom: -70px;
  color: #fff; font-size: 22px; opacity: 0;
  animation: floatUp linear infinite;
}
.splash-anim .i1  { right: 8%;  font-size: 24px; animation-duration: 15s; animation-delay: 0s; }
.splash-anim .i2  { right: 22%; font-size: 20px; animation-duration: 17s; animation-delay: 3.5s; }
.splash-anim .i3  { right: 38%; font-size: 22px; animation-duration: 14s; animation-delay: 6.5s; }
.splash-anim .i4  { right: 55%; font-size: 20px; animation-duration: 18s; animation-delay: 2s; }
.splash-anim .i5  { right: 70%; font-size: 18px; animation-duration: 13s; animation-delay: 5s; }
.splash-anim .i6  { right: 84%; font-size: 20px; animation-duration: 16s; animation-delay: 8.5s; }
.splash-anim .i7  { right: 15%; font-size: 21px; animation-duration: 16s; animation-delay: 10.5s; }
.splash-anim .i8  { right: 48%; font-size: 17px; animation-duration: 14s; animation-delay: 9s; }
.splash-anim .i9  { right: 64%; font-size: 20px; animation-duration: 17s; animation-delay: 12s; }
.splash-anim .i10 { right: 30%; font-size: 19px; animation-duration: 15s; animation-delay: 5.5s; }

@keyframes floatUp {
  0%   { transform: translateY(0) scale(.7) rotate(0deg); opacity: 0; }
  10%  { opacity: .22; }
  60%  { opacity: .16; }
  100% { transform: translateY(-108dvh) scale(1.15) rotate(12deg); opacity: 0; }
}

/* خط تخطيط القلب ECG أسفل الشاشة */
.ecg {
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom));
  left: 0; right: 0; height: 60px; opacity: .55;
}
.ecg svg { width: 200%; height: 100%; animation: ecgMove 6s linear infinite; }
/* لما يشتغل السكربت، الخط بيصير شاشة مراقبة حيّة (canvas) متزامنة مع النبض */
.ecg canvas { width: 100%; height: 100%; display: block; }
.ecg path {
  fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(140, 230, 255, .8));
}
@keyframes ecgMove { from { transform: translateX(0); } to { transform: translateX(50%); } }

.splash-logo {
  background: transparent;
  border: 0;
  width: 132px; height: 132px; border-radius: 40px;
  display: grid; place-items: center;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .14), 0 0 60px rgba(47, 196, 230, .25);
  /* النبض بيتحرّك من السكربت (Pulse) مع كل دقة، ليتزامن مع الصوت وخط القلب */
  overflow: hidden;
}
.splash-logo.beat { animation: heartbeat .9s ease-out; }
.splash-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes heartbeat {
  0%   { transform: scale(1); }
  9%   { transform: scale(1.08); }   /* لَب */
  22%  { transform: scale(1); }
  34%  { transform: scale(1.05); }   /* دَب */
  48%, 100% { transform: scale(1); }
}

.splash-title {
  font-size: 3.1rem; font-weight: 800; letter-spacing: 0;
  margin-top: 4px;
}
.splash-sub {
  color: rgba(255, 255, 255, .88);
  font-size: 1.04rem; line-height: 1.85; max-width: 345px;
}
.splash .btn { max-width: 320px; margin-top: 24px; }

.splash-services {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 9px; max-width: 360px; margin-top: 8px;
}
.splash-services span {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 10px 16px; border-radius: 999px;
  font-size: .88rem; font-weight: 600;
}

/* ===== الرئيسية ===== */
.home-header {
  background:
    radial-gradient(80% 90% at 90% 0%, rgba(47, 196, 230, .38) 0%, rgba(47, 196, 230, 0) 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(43, 211, 159, .22) 0%, rgba(43, 211, 159, 0) 60%),
    linear-gradient(160deg, var(--brand-2) 0%, var(--brand) 55%, var(--brand-deep) 100%);
  color: #fff;
  padding: 24px 16px 54px;
  padding-top: calc(24px + env(safe-area-inset-top));
  border-radius: 0 0 30px 30px;
}
.home-header .muted { color: var(--on-brand-soft); }
.home-header-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.home-header .icon-btn {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}
.loc-line { font-size: 1.08rem; font-weight: 700; margin-top: 3px; }

/* بطاقة "التطبيق مو للطوارئ" أعلى الرئيسية */
.hero-card {
  margin-top: 20px; margin-bottom: -46px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-2);
  padding: 14px; display: flex; align-items: center; gap: 12px;
  position: relative; z-index: 2;
}
.hero-emoji {
  font-size: 1.55rem; background: var(--brand-soft);
  width: 52px; height: 52px; border-radius: var(--r-md);
  display: grid; place-items: center; flex-shrink: 0;
}
.hero-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hero-info strong { font-size: .95rem; }

#screen-home .content { padding-top: 44px; }
#screen-home .content > .section-title:first-child { margin-top: 0; }

/* شبكة الخدمات */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-family: inherit; font-size: .95rem; text-align: start; color: var(--text);
  cursor: pointer; box-shadow: var(--sh-1);
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.service:active { transform: scale(.975); }
.service.svc-off {
  opacity: .45;
  filter: grayscale(1);
  cursor: not-allowed;
  pointer-events: none;
}
.service.svc-off .svc-note { color: #b3261e; font-weight: 700; }
.service strong { font-size: .98rem; line-height: 1.4; }
.service .small { color: var(--muted); }
.service-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 6px;
}
.service-icon .ms { font-size: 1.6rem; font-variation-settings: "FILL" 0, "wght" 500; }
.service-icon.doctor    { background: #ddf0f8; color: #0e6e8f; }
.service-icon.dentist   { background: #eee9fb; color: #6d4fb0; }
.service-icon.lab       { background: #fbe6e6; color: #b23b3b; }
.service-icon.injection { background: #fdf1d4; color: #8a6300; }
.service-icon.iv        { background: #ddf5ea; color: #0f7a4e; }
.service-icon.nursing   { background: #f3e9dd; color: #8a5a1d; }
.service-icon.physio    { background: #e4ecfb; color: #3556a8; }
.service-icon.consult   { background: #e0f4f1; color: #0d7a6b; }
html[data-theme="dark"] .service-icon.doctor    { background: #142f3a; color: #6cc8e0; }
html[data-theme="dark"] .service-icon.dentist   { background: #241d3a; color: #b39ce6; }
html[data-theme="dark"] .service-icon.lab       { background: #3a1c1c; color: #ef8a8a; }
html[data-theme="dark"] .service-icon.injection { background: #3a3216; color: #f0c458; }
html[data-theme="dark"] .service-icon.iv        { background: #14352a; color: #5fd3a5; }
html[data-theme="dark"] .service-icon.nursing   { background: #362a1c; color: #dbaa6b; }
html[data-theme="dark"] .service-icon.physio    { background: #1a2640; color: #93b0ec; }
html[data-theme="dark"] .service-icon.consult   { background: #12332f; color: #62d0bf; }

/* البانر الترويجي */
.promo {
  margin-top: 20px;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(255, 255, 255, .18) 0%, transparent 60%),
    linear-gradient(135deg, #1fae82 0%, #17a0a0 100%);
  border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  color: var(--on-accent);
  box-shadow: 0 8px 22px rgba(42, 167, 122, .25);
}
.promo strong { font-size: 1rem; }
.promo .small { opacity: .9; }
.promo-emoji { font-size: 2rem; flex-shrink: 0; }

/* الأسعار */
.prices { display: flex; flex-direction: column; gap: 8px; }
.price-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 13px 14px;
  display: flex; align-items: center; gap: 10px;
}
.price-row strong { flex: 1; font-size: .93rem; font-weight: 600; }
.price-tag { color: var(--brand-text); font-weight: 800; font-size: .95rem; white-space: nowrap; }

/* ===== هيدر مسار الطلب ===== */
.flow-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.flow-header h2 { flex: 1; font-size: 1.12rem; font-weight: 800; }

.flow-footer {
  position: fixed; bottom: 0; right: 50%; transform: translateX(50%);
  width: 100%; max-width: 430px;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: var(--sh-3);
  z-index: 6;
}
.total-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.total-line > .muted { font-size: .875rem; }
.total-line strong { color: var(--brand-text); font-size: 1.12rem; text-align: left; }

/* ===== بطاقات الاختيار ===== */
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: border-color .18s, background .18s, transform .1s;
}
.choice:active { transform: scale(.99); }
.choice.selected { border-color: var(--brand-text); background: var(--brand-soft); }
.choice .c-icon { font-size: 1.4rem; flex-shrink: 0; }
.choice .grow strong { display: block; font-size: .96rem; margin-bottom: 1px; }
.choice .grow .small { color: var(--muted); }
.choice .c-price { color: var(--brand-text); font-weight: 800; font-size: .92rem; white-space: nowrap; }

/* علامة صح للتحاليل (اختيار متعدد) */
.choice .c-check {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  border: 2px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: .9rem; color: transparent;
  transition: all .18s;
}
.choice.selected .c-check {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* كمية */
.qty-box {
  background: var(--card); border-radius: var(--r-lg);
  border: 1px solid var(--line); padding: 20px; text-align: center;
  box-shadow: var(--sh-1);
}
.qty-value { font-size: 2.5rem; font-weight: 800; color: var(--brand-text); line-height: 1.2; }
.qty-controls { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.qty-controls button {
  width: 54px; height: 54px; border-radius: var(--r-md); border: 0;
  background: var(--brand); color: #fff; font-size: 1.5rem; font-family: inherit;
  cursor: pointer; transition: transform .1s;
}
.qty-controls button:active { transform: scale(.95); }
.qty-controls button.minus { background: var(--brand-soft); color: var(--brand-text); }

.chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--text);
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: .88rem; font-weight: 600;
  transition: background .18s, border-color .18s, color .18s;
}
.chip.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
/* زيادة سعر ع خانة (متل الزيارة الليلية) — بتبيّن جوّا الخانة نفسها */
.chip-fee {
  display: inline-block; margin-inline-start: 4px; padding: 1px 7px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); font-size: .76rem; font-weight: 700;
}
.chip.selected .chip-fee { background: rgba(255, 255, 255, .2); color: #fff; }
/* ===== إلغاء الطلب · الدعوة · صور الدردشة ===== */
.order-cancel { margin-top: 10px; min-height: 0; padding: 10px; font-size: .9rem; }
.ref-card {
  background: linear-gradient(135deg, var(--brand-soft), var(--card)); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px; margin-bottom: 16px; display: grid; gap: 10px;
}
.ref-code {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1.5px dashed var(--brand-text); border-radius: var(--r-md); padding: 10px 14px;
}
.ref-code b { font-size: 1.25rem; letter-spacing: 2px; color: var(--brand-text); }
.ok-text { color: var(--ok); font-weight: 700; }
.ref-draw { display: flex; gap: 10px; align-items: flex-start; background: var(--ok-bg); border-radius: var(--r-md); padding: 10px 12px; }
.ref-draw .ms { color: var(--ok); font-variation-settings: "FILL" 1, "wght" 400; flex-shrink: 0; }
.ref-draw p { font-size: .88rem; line-height: 1.8; color: var(--text-2); }
.warn-text { color: var(--warn); font-weight: 600; }
.chat-attach {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--brand-text); background: var(--brand-soft);
}
.msg-bubble.has-img { padding: 6px 6px 8px; }
.chat-img { display: block; max-width: 100%; max-height: 320px; border-radius: 14px; margin-bottom: 4px; cursor: zoom-in; background: rgba(0,0,0,.08); min-height: 80px; min-width: 120px; object-fit: cover; }

/* ===== الباكجات ===== */
.svc-badge {
  align-self: flex-start; margin-top: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok); font-size: .74rem; font-weight: 700;
}
.pkg-nudge {
  background: var(--ok-bg); color: var(--ok); border-radius: var(--r-md);
  padding: 10px 12px; font-size: .86rem; font-weight: 600; margin-bottom: 10px; line-height: 1.7;
}
.order-save { color: var(--ok); font-size: .82rem; font-weight: 700; margin: -4px 0 8px; text-align: end; }
.pkg-save {
  display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok); font-size: .74rem; font-weight: 700; vertical-align: 2px;
}
.pkg-banner {
  display: flex; gap: 10px; align-items: center;
  background: var(--brand-soft); color: var(--brand-text); border-radius: var(--r-md); padding: 12px 14px;
}
.pkg-banner p { color: var(--text); font-size: .9rem; font-weight: 600; }
.pkg-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px; margin-bottom: 12px; display: grid; gap: 10px;
}
.pkg-head { display: flex; gap: 10px; align-items: center; }
.pkg-head .ms {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-text); font-size: 1.3rem;
}
.pkg-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pkg-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
#my-packages:empty { display: none; }

/* «هاد المبلغ كامل» — آخر شي قبل زر الطلب وبملخص الطلب */
.no-extra {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px;
  background: var(--ok-bg); color: var(--ok); border-radius: var(--r-md); padding: 12px 14px;
}
.no-extra .ms { font-size: 1.3rem; flex-shrink: 0; font-variation-settings: "FILL" 1, "wght" 400; }
.no-extra p { color: var(--text-2); line-height: 1.8; }
.no-extra a { color: var(--ok); font-weight: 700; }

/* ===== نماذج ===== */
.form { display: flex; flex-direction: column; gap: 15px; }
.form label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: .9rem; font-weight: 700; color: var(--text-2);
}
.form input, .form select, .form textarea {
  font-family: inherit; font-size: 1rem; font-weight: 600;
  padding: 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--card);
  color: var(--text); outline-color: var(--brand-text);
  transition: border-color .18s, box-shadow .18s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--brand-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-text) 18%, transparent);
  outline: none;
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); opacity: .85; font-weight: 400; }
.form select option { color: var(--text); background: var(--card); }
.form .btn { margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== قوائم عامة ===== */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
.list-item > span:first-child { font-size: 1.3rem; flex-shrink: 0; }
/* أيقونة أول السطر بمربّع ناعم — كل السطور بنفس الشكل والمقاس */
.list-item > .ms:first-child {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-text);
  font-size: 1.3rem; font-variation-settings: "FILL" 0, "wght" 500;
}
.list-item strong { font-size: .95rem; }
.list-item .muted { color: var(--muted); }

/* خريطة تحديد الموقع */
#pick-map {
  background: var(--brand-soft);
  height: 240px; border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}
/* isolation: طبقات الخريطة (z-index 400–1000) بتضل جوّا صندوقها — قبل كانت تطلع فوق شريط الإجمالي والرسايل */
.leaflet-container { font-family: inherit; isolation: isolate; z-index: 0; }
html[data-theme="dark"] .leaflet-tile { filter: brightness(.72) contrast(1.05) saturate(.85); }

/* ===== ملخص الطلب ===== */
.order-summary {
  margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card-2);
  padding: 14px;
  display: flex; flex-direction: column; gap: 9px; font-size: .93rem;
}
.order-summary .row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.order-summary .row > span:first-child { color: var(--text-2); }
.order-summary .row > span:last-child { text-align: left; font-weight: 600; }
.order-summary .row strong { color: var(--brand-text); font-size: .98rem; text-align: left; }
.order-summary .row.ok, .order-summary .row.ok span { color: var(--ok); }

/* ===== شاشة نجاح الطلب ===== */
.success-hero {
  text-align: center; padding: 40px 20px 10px;
}
.success-hero .s-icon {
  font-size: 3rem;
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  display: grid; place-items: center; margin: 0 auto 16px;
  animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-hero h2 { font-size: 1.4rem; margin-bottom: 6px; }

/* ===== طلباتي ===== */
.order-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 15px; margin-bottom: 10px;
  box-shadow: var(--sh-1);
}
.order-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.order-card .top strong { font-size: .98rem; line-height: 1.5; }
.badge {
  font-size: .76rem; padding: 5px 11px; border-radius: 999px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.badge.done { background: var(--ok-bg); color: var(--ok); }
.badge.active { background: var(--warn-bg); color: var(--warn); }
.badge.cancelled { background: var(--danger-bg); color: var(--danger); }

/* تقرير الدكتور والأدوية عند المريض */
.report-block {
  margin-top: 10px;
  background: var(--ok-bg);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.report-block strong { display: block; color: var(--ok); font-size: .86rem; margin-bottom: 2px; }
.report-block p { font-size: .9rem; line-height: 1.8; margin-bottom: 8px; white-space: pre-wrap; }
.report-block p:last-child { margin-bottom: 0; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; line-height: 1.9; }
.empty .e-icon { font-size: 3rem; display: block; margin-bottom: 10px; }

/* ===== صندوق الدفع (الاستشارة الأونلاين) ===== */
.pay-num {
  display: flex; align-items: center; gap: 10px;
  background: var(--brand-soft); border: 1.5px dashed var(--brand-text);
  border-radius: var(--r-md); padding: 12px 14px; margin-top: 10px;
}
.pay-num b { font-size: 1.15rem; letter-spacing: 1px; color: var(--brand-text); }
.pay-num button {
  border: 0; background: var(--brand); color: #fff; border-radius: 999px;
  padding: 7px 14px; font-family: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
}

/* ===== دردشة خدمة العملاء ===== */
#screen-chat { padding-bottom: 0; display: none; }
#screen-chat.active { display: flex; flex-direction: column; height: 100dvh; }
.chat-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg);
}
.msg-bubble {
  max-width: 82%; padding: 11px 15px; border-radius: 18px;
  font-size: .95rem; line-height: 1.7; word-break: break-word; white-space: pre-wrap;
}
.msg-bubble.me {
  align-self: flex-start;
  background: var(--brand); color: #fff;
  border-bottom-left-radius: 5px;
}
.msg-bubble.them {
  align-self: flex-end;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line);
  border-bottom-right-radius: 5px;
}
.msg-bubble .t { display: block; font-size: .68rem; opacity: .7; margin-top: 4px; }
.chat-footer {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}
.chat-footer input {
  flex: 1; font-family: inherit; font-size: 1rem;
  padding: 13px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--text);
  outline-color: var(--brand-text);
}
.chat-send {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  border: 0; background: var(--brand); color: #fff;
  cursor: pointer; display: grid; place-items: center;
}
html[dir="rtl"] .chat-send .ms { transform: scaleX(-1); }
.chat-dot {
  position: absolute; top: 4px; inset-inline-end: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #ff5252; border: 2px solid var(--brand);
  color: #fff; font-size: .68rem; font-weight: 800; line-height: 14px;
  text-align: center; font-variant-numeric: tabular-nums;
}

/* ===== التنقل السفلي ===== */
.bottom-nav {
  position: fixed; bottom: 0; right: 50%; transform: translateX(50%);
  width: 100%; max-width: 430px;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
}
.nav-item {
  flex: 1; background: none; border: 0; font-family: inherit;
  padding: 11px 0 9px; font-size: 1.2rem; cursor: pointer; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  position: relative; transition: color .2s;
}
/* الزر النشط: أيقونة مليانة جوّا كبسولة ناعمة (بدل الخط الرفيع فوق) */
.nav-item .ms {
  font-size: 1.4rem; width: 54px; height: 30px; border-radius: 999px;
  display: grid; place-items: center;
  transition: background .2s, font-variation-settings .2s;
}
.nav-item span { font-size: .78rem; font-weight: 700; }
.nav-item span.ms { font-weight: normal; }
.nav-item.active { color: var(--brand-text); }
.nav-item.active .ms { background: var(--brand-soft); font-variation-settings: "FILL" 1, "wght" 400; }
.bottom-nav.hidden { display: none; }
.bottom-nav { transition: transform .28s ease; }
.bottom-nav.nav-away { transform: translateX(50%) translateY(calc(100% + 8px)); }
@media (prefers-reduced-motion: reduce) { .bottom-nav { transition: none; } }

/* ===== توست ===== */
.toast {
  position: fixed; bottom: 100px; right: 50%; transform: translateX(50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 13px 22px; border-radius: 999px; font-size: .93rem; font-weight: 600;
  box-shadow: var(--sh-2);
  opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 50;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

/* ===== ورقة منزلقة من تحت ===== */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(9, 20, 24, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-wrap[hidden] { display: none; }
.sheet {
  background: var(--card); color: var(--text);
  width: 100%; max-width: 520px;
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--sh-2);
  max-height: 85vh; overflow-y: auto;
  animation: sheet-up .22s ease;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 1.05rem; font-weight: 800; }
.sheet-x {
  border: 0; background: var(--bg); color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%;
  font-size: .95rem; font-family: inherit; cursor: pointer;
}

/* ===== احترام تفضيل تقليل الحركة ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ===== شاشات صغيرة ===== */
/* موبايلات قصيرة (متل آيفون SE): منضغط شاشة الافتتاح شوي لحتى زر الإسعاف وخط النبض يبينوا سوا بلا ما يتراكبوا */
@media (max-height: 740px) {
  .splash { gap: 10px; padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .splash-logo { width: 108px; height: 108px; border-radius: 32px; }
  .splash-title { font-size: 2.6rem; }
  .splash-sub { line-height: 1.7; }
  .splash-services span { padding: 8px 14px; }
  .splash .btn { margin-top: 12px; }
  .splash-sos { margin-top: 6px; }
}
@media (max-width: 360px) {
  .splash-title { font-size: 2.3rem; }
  .services-grid { gap: 10px; }
  .service { padding: 14px 12px; }
}

/* ===== تقييم الزيارة ===== */
.rate-block {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--card-2, #f3f7f8); border: 1px solid var(--line);
}
.rate-block > strong { display: block; font-size: .9rem; margin-bottom: 6px; }
.stars { display: flex; gap: 4px; direction: ltr; justify-content: center; }
[dir="rtl"] .stars { flex-direction: row-reverse; }
.stars .star {
  background: none; border: 0; padding: 4px; cursor: pointer; line-height: 0;
  color: var(--line-strong, #c9d3d6);
}
.stars .star .ms { font-size: 2.2rem; font-variation-settings: "FILL" 0; transition: transform .12s; }
.stars .star.on { color: #f5a524; }
.stars .star.on .ms { font-variation-settings: "FILL" 1; }
.stars .star:active .ms { transform: scale(.9); }
.stars.static { justify-content: flex-start; }
.stars.static .star { cursor: default; padding: 0 1px; }
.stars.static .star .ms { font-size: 1.3rem; }
.rate-label { text-align: center; font-size: .85rem; font-weight: 700; color: var(--text-2, #486068); min-height: 1.4em; margin: 2px 0 8px; }
.rate-block textarea {
  width: 100%; font: inherit; font-size: .9rem; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text); resize: vertical;
}
.rate-block .btn { margin-top: 10px; min-height: 46px; }
.rate-block.done p { font-size: .88rem; margin-top: 6px; white-space: pre-wrap; }
.rate-banner {
  width: 100%; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; text-align: start;
  background: var(--card); border: 1.5px solid #f5d38a; border-radius: var(--r-lg);
  padding: 13px 14px; font: inherit; color: var(--text); cursor: pointer;
}
.rate-banner .ms { font-size: 1.9rem; color: #f5a524; font-variation-settings: "FILL" 1; }
.rate-banner strong { display: block; font-size: .95rem; }
.rate-banner .muted { display: block; }

/* ===== المحفظة ===== */
.wallet-box { background: var(--brand); color: var(--on-brand); border-radius: var(--r-lg, 18px); padding: 18px 20px; display: grid; gap: 4px; }
.wallet-box .muted { color: var(--on-brand-soft); }
.wallet-num { font-size: 2rem; font-weight: 800; letter-spacing: .5px; }
.wal-in { color: var(--ok); font-weight: 800; }
.wal-out { color: var(--text-2); font-weight: 800; }
.wal-pend { color: #9a6700; font-weight: 700; }
/* ملفات المرضى */
.pt-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md, 14px); padding: 13px 14px; margin-bottom: 10px; cursor: pointer; }
.pt-av { width: 44px; height: 44px; border-radius: 14px; background: var(--bg); color: var(--brand-text); display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; flex-shrink: 0; }
.pt-card strong { display: block; font-size: .96rem; }
.pt-card .muted { font-size: .82rem; }
.pt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pt-tag { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--text-2); border: 1px solid var(--line); }
.pt-tag.blood { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.pt-head { background: var(--brand); color: var(--on-brand); border-radius: var(--r-lg, 18px); padding: 18px; display: flex; gap: 14px; align-items: center; }
.pt-head .pt-av { background: rgba(255,255,255,.16); color: #fff; width: 54px; height: 54px; font-size: 1.3rem; }
.pt-head strong { font-size: 1.1rem; display: block; }
.pt-head .muted { color: var(--on-brand-soft); font-size: .85rem; }
.pt-head .pt-tag { background: rgba(255,255,255,.14); color: #fff; border-color: transparent; }
.pt-info { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md, 14px); padding: 4px 14px; margin-top: 12px; }
.pt-info .row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.pt-info .row:first-child { border-top: 0; }
.pt-info .row span:first-child { color: var(--muted); font-weight: 700; }
.pt-info .row span:last-child { white-space: pre-wrap; line-height: 1.7; }
.pt-actions { display: flex; gap: 10px; margin-top: 12px; }
.pt-actions .btn { flex: 1; margin-top: 0; min-height: 46px; font-size: .92rem; }
.pt-pick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin-bottom: 4px; scrollbar-width: none; }
.pt-pick::-webkit-scrollbar { display: none; }
.pt-pick .chip { flex-shrink: 0; margin: 0; }
.gender-chips { display: flex; gap: 8px; }
.gender-chips .chip { flex: 1; text-align: center; margin: 0; }

/* ===== بانر التثبيت ===== */
.install-banner { text-decoration: none; color: inherit; border-color: var(--line-strong, #c6d5d9); }
.install-banner .ms:first-child { color: var(--brand-text); font-variation-settings: "FILL" 0; }
.install-x { background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; font: inherit; }
.install-x .ms { font-size: 1.2rem; }
/* شرح التثبيت جوا التطبيق */
.install-apk { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.install-steps .ist { display: grid; grid-template-columns: 34px 1fr; gap: 6px 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.install-steps .ist-n { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); color: var(--brand-text); display: grid; place-items: center; font-weight: 800; }
.install-steps p { font-size: .92rem; line-height: 1.6; margin: 0; padding-top: 4px; }
.install-steps img { grid-column: 2; width: 100%; max-width: 240px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--sh-1, 0 6px 18px rgba(0,0,0,.08)); }


/* ===== زر الإسعاف بشاشة الافتتاح ===== */
.splash-sos {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  color: #fff; text-decoration: none; font-size: .86rem; font-weight: 700;
  background: rgba(192, 52, 52, .9); border-radius: 999px; padding: 9px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.splash-sos .ms { font-size: 1.1rem; }
.splash-sos b { background: #fff; color: #c03434; border-radius: 999px; padding: 1px 10px; font-weight: 900; }
.emergency .em-num .ms { font-size: 1rem; }

/* ضو الإسعاف: أحمر، طفي، أزرق، طفي (قفزات بلا تدرّج متل الضو الحقيقي)، ٣ دورات بثانية لكل دورة.
   ومضتين بالثانية، تحت حد الـ٣ ومضات بالثانية */
.splash-sos { --sos-base: rgba(192, 52, 52, .9); }
.emergency .em-num { --sos-base: var(--danger); }
.emergency { --sos-edge: color-mix(in srgb, var(--danger) 35%, transparent); }
@keyframes sos-lights {
  0%  { background: #e81c24; box-shadow: 0 0 0 3px rgba(232, 28, 36, .35), 0 0 22px 6px rgba(232, 28, 36, .6); }
  25% { background: var(--sos-base); box-shadow: 0 0 0 0 transparent; }
  50% { background: #1b5cff; box-shadow: 0 0 0 3px rgba(27, 92, 255, .35), 0 0 22px 6px rgba(27, 92, 255, .6); }
  75% { background: var(--sos-base); box-shadow: 0 0 0 0 transparent; }
}
@keyframes sos-card {
  0%  { border-color: #e81c24; box-shadow: 0 0 16px rgba(232, 28, 36, .4); }
  25% { border-color: var(--sos-edge); box-shadow: 0 0 0 transparent; }
  50% { border-color: #1b5cff; box-shadow: 0 0 16px rgba(27, 92, 255, .4); }
  75% { border-color: var(--sos-edge); box-shadow: 0 0 0 transparent; }
}
.sos-flash.emergency { animation: sos-card 1s step-end 3; }
.sos-flash .em-num,
.sos-flash.splash-sos { animation: sos-lights 1s step-end 3; }
@media (prefers-reduced-motion: reduce) {
  .sos-flash.emergency, .sos-flash .em-num, .sos-flash.splash-sos { animation: none; }
}

/* ===== الفوتر وروابط السياسات ===== */
.app-foot { text-align: center; color: var(--muted); font-size: .76rem; padding: 6px 16px 18px; }
.legal-links { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 14px; }
.legal-links a { color: var(--brand-text); font-weight: 700; text-decoration: none; }

/* ===== ورقة الخصوصية والبيانات ===== */
.pd-link { text-decoration: none; color: inherit; margin-bottom: 8px; }
.btn-danger-ghost { background: transparent; color: var(--danger);
  border: 1.5px solid color-mix(in srgb, var(--danger) 40%, transparent); }

/* ===== ترحيب أول تسجيل ===== */
.welcome-sheet { text-align: center; }
.welcome-sheet h3 { font-size: 1.15rem; font-weight: 800; margin-top: 4px; }
.welcome-ic { font-size: 2.6rem; color: var(--brand-text); }
.welcome-big { font-size: 1.35rem; font-weight: 900; color: var(--brand-text); margin: 8px 0 6px; }
