/* Doctors System — نظام تصميم احترافي (RTL) */
:root {
  /* لوحة الألوان — موحّدة لكل الصفحات (بدون أزرق قوي) */
  --bg: #eef2f7;
  --bg-soft: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --primary: #0f766e;        /* أخضر زمردي هادئ (بديل الأزرق) */
  --primary-dark: #115e59;
  --primary-soft: #f0fdfa;
  --accent: #0891b2;         /* سماوي هادئ */
  --info: #0891b2;
  --info-soft: #ecfeff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .10);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .08);
  --font: "Segoe UI", "Tahoma", "Cairo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 1.05rem;            /* خط أساس أوضح لضعاف النظر */
  line-height: 1.65;
  background: linear-gradient(160deg, #f1f5f9 0%, #e2e8f0 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;        /* يمنع pull-to-refresh على الهاتف */
}

/* بطاقة مركزية */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card.wide { max-width: 820px; }

/* رأس العيادة */
.brand {
  text-align: center;
  margin-bottom: 22px;
}
.brand .logo {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem; margin-bottom: 10px;
}
.brand h1 { font-size: 1.4rem; margin: 6px 0 2px; color: var(--text); }
.brand .doc { color: var(--primary); font-weight: 600; }
.brand .sub { color: var(--muted); font-size: .85rem; }

/* عناوين */
h2 { font-size: 1.05rem; color: var(--text); margin: 20px 0 10px; }
h2:first-child { margin-top: 0; }

/* نصوص */
.muted { color: var(--muted); }
.soft { color: var(--text-soft); }

/* حقول الإدخال */
.field { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
label { font-weight: 600; font-size: 1.02rem; color: var(--text-soft); margin-bottom: 2px; }
input, select, textarea {
  font-family: var(--font);
  font-size: 1.15rem;            /* أوضح لضعاف النظر */
  padding: 15px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .2);
  background: #fff;
}
input::placeholder { color: var(--muted); font-size: 1.05rem; }

/* أزرار */
.btn {
  display: block; width: 100%;
  font-family: var(--font);
  font-size: 1.2rem; font-weight: 700;   /* أوضح وأسهل للنقر */
  padding: 16px; margin-top: 12px;
  border: none; border-radius: 12px;
  background: var(--primary); color: #fff;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn.success { background: var(--success); }
.btn.success:hover { background: #15803d; }
.btn.ghost {
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn.ghost:hover { background: #eff6ff; }
.btn.sm { font-size: .9rem; padding: 10px; width: auto; display: inline-block; }

/* رسائل */
.msg { text-align: center; font-weight: 600; min-height: 1.2em; margin-top: 10px; }
.msg.ok { color: var(--success); }
.msg.err { color: var(--danger); }

/* بطاقات إحصائية (الطبيب) */
.stats { display: flex; gap: 12px; margin: 16px 0; }
.stat {
  flex: 1; background: var(--success-soft); border-radius: 14px;
  padding: 16px; text-align: center;
}
.stat .num { font-size: 2.2rem; font-weight: 800; color: var(--success); }
.stat .label { font-size: .78rem; color: #15803d; margin-top: 2px; }
.stat.blue { background: #ccfbf1; }
.stat.blue .num { color: var(--primary); }
.stat.blue .label { color: var(--primary-dark); }

/* روابط */
.links { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.links a {
  flex: 1; min-width: 150px; text-align: center;
  background: #fff; border: 1.5px solid var(--primary);
  color: var(--primary); border-radius: 12px; padding: 13px;
  text-decoration: none; font-weight: 600; transition: background .15s;
}
.links a:hover { background: #eff6ff; }

/* قوائم (طابور / زيارات) */
ul.list { list-style: none; padding: 0; margin: 8px 0; }
ul.list li {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
ul.list li .t { font-weight: 700; color: var(--primary); }

/* صندوق المريض الحالي */
.patient-box {
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; margin-top: 12px;
}
.patient-box .name { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.patient-box .row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; color: var(--text-soft); }
.patient-box .row b { color: var(--text); }

/* شارة الرقم الكبير — موحّدة مع home.html (تدرّج أخضر/سماوي + أبيض) */
.big-ticket {
  text-align: center; margin: 18px 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: var(--radius); padding: 22px 16px;
  border: none; box-shadow: var(--shadow);
}
.big-ticket .n { font-size: 3.4rem; font-weight: 900; color: #fff; line-height: 1; }
.big-ticket .l { color: rgba(255,255,255,.9); margin-top: 4px; }

/* الباركود */
#qr { text-align: center; margin: 14px 0; }
#qr img { max-width: 220px; border: 8px solid #fff; border-radius: 12px; box-shadow: var(--shadow); }

/* تقسيم لوحة الطبيب */
.doc-wrap { width: 100%; max-width: 820px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* طباعة الباركود */
@media print {
  body { background: #fff; padding: 0; }
  .no-print { display: none !important; }
  #qr img { max-width: 320px; }
}

/* صندوق تقدير وقت الانتظار (ميزة المريض) */
.estbox {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
  border-radius: 14px; padding: 14px 16px; margin: 16px 0;
  font-size: .95rem; text-align: center;
}
.estbox b { color: var(--warning); font-size: 1.1rem; }
.estbox .star { color: var(--warning); font-weight: 800; }

/* صندوق التقييم */
.ratebox {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; margin: 16px 0; text-align: center;
}
.rate-title { font-weight: 700; margin-bottom: 10px; color: var(--text); }
.stars { font-size: 2rem; cursor: pointer; user-select: none; }
.stars span { color: #cbd5e1; transition: color .1s; margin: 0 2px; }
.stars span.on { color: #f59e0b; }
#ratecomment { margin: 12px 0; min-height: 64px; resize: vertical; }

/* إحصائيات التقرير (الطبيب) */
.stats.report { flex-wrap: wrap; }
.stats.report .stat { flex: 1 1 30%; min-width: 120px; }
.stat.green { background: var(--success-soft); }
.stat.green .num { color: var(--success); }
.stat.green .label { color: #15803d; }
.stat.red { background: #fee2e2; }
.stat.red .num { color: var(--danger); }
.stat.red .label { color: #b91c1c; }

/* تنسيق صف أزرار التحكّم (متوازن ومتماسك) */
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.actions-row .btn { flex: 1 1 auto; min-width: 140px; }

/* فاصل أنيق */
hr.sep { border: none; border-top: 1px solid var(--border); margin: 26px 0; }

/* بطاقة الباركود للطباعة */
.qr-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0;
  text-align: center;
}
.qr-card h2 { margin: 0 0 6px; font-size: 1.1rem; }
.qr-card .muted { margin-bottom: 12px; }
.qr-center { display: flex; justify-content: center; margin: 10px 0 14px; }
#qr img, .qr-center img {
  width: 200px; height: 200px;
  background: #fff; padding: 10px;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
}

/* تحسين أقسام بطاقة المريض (① ② ③) لتوازن بصري */
.pt-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
}
.pt-sec-title {
  font-size: .95rem; font-weight: 800; color: var(--primary);
  margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-soft);
}
.pt-cell {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px;
}
.pt-cell .pt-k { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.pt-cell .pt-v { font-size: .95rem; font-weight: 700; color: var(--text); }
.pt-session-actions { margin-top: 10px; }
.session-form { display: flex; flex-direction: column; gap: 8px; }
.session-form label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.session-form textarea {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; font-family: inherit; font-size: .9rem; resize: vertical;
}
.pt-visits .pt-visit {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
}
.pt-visit-head { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.pt-visit-body { font-size: .85rem; line-height: 1.5; }
.pt-visit-body .pt-k { color: var(--muted); font-weight: 600; }
.stat.gold { background: #fef3c7; }
.stat.gold .num { color: var(--warning); }
.stat.gold .label { color: #92400e; }

/* تطبيق */
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.actions .btn { flex: 1; min-width: 140px; }

/* بطاقات صغيرة إضافية في لوحة المريض */
.stat { position: relative; }

/* صفحة ترحيب الزائر (مسح الباركود) */
.welcome { text-align: center; }
.welcome .logo-box {
  margin: 4px auto 10px;
  display: flex;                 /* توسيط الشعار في المنتصف */
  justify-content: center;
  align-items: center;
  min-height: 128px;
}
.welcome .logo-box img {
  width: 128px; height: 128px; object-fit: contain;
  border-radius: 18px; box-shadow: var(--shadow); background: #fff; padding: 8px;
  display: block; margin: 0 auto;
}
.welcome .logo {
  width: 88px; height: 88px; border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.6rem; box-shadow: var(--shadow);
}
.welcome-name { font-size: 2rem; font-weight: 800; margin: 10px 0 2px; color: var(--text); letter-spacing: .2px; }
.welcome .doc { color: var(--primary); font-weight: 700; font-size: 1.25rem; }
.welcome-sub { color: var(--text-soft); font-size: 1.15rem; line-height: 1.75; margin: 12px 4px 18px; font-weight: 500; }
.hint {
  color: #15803d; font-size: 1.02rem; margin-top: 10px; line-height: 1.7; font-weight: 600;
  background: var(--success-soft); border-radius: 12px; padding: 12px 14px; text-align: center;
}
.welcome-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 1rem; line-height: 1.7;
}

/* معاينة الشعار في الأدمين */
.logo-prev { text-align: center; margin-bottom: 8px; }
.logo-prev img {
  width: 96px; height: 96px; object-fit: contain;
  border-radius: 14px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 6px;
}

/* صفحة التسجيل — عناصر محسّنة */
.phone-confirm {
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 12px 14px; margin: 6px 0 16px; text-align: center;
}
.phone-confirm .pc-label { display: block; font-size: .9rem; color: var(--muted); }
.phone-confirm .pc-num { display: block; font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: .5px; margin: 2px 0; }
.phone-confirm .pc-note { display: block; font-size: .9rem; color: var(--text-soft); }

/* أزرار جنس كبيرة */
.seg { display: flex; gap: 10px; }
.seg-btn {
  flex: 1; font-family: var(--font); font-size: 1.15rem; font-weight: 700;
  padding: 14px; border: 2px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--text-soft); cursor: pointer; transition: all .12s;
}
.seg-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.25); }

/* تاريخ الميلاد: ثلاث منسدلات */
.dob { display: flex; gap: 8px; }
.dob select { text-align: center; }

/* رقائق سبب الزيارة */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font); font-size: 1rem; font-weight: 600;
  padding: 10px 14px; border: 2px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text-soft); cursor: pointer; transition: all .12s;
}
.chip.active { border-color: var(--primary); background: var(--primary); color: #fff; }

/* شارة سبب الزيارة في صفحة الطبيب */
.reason-pill {
  margin: 10px 0; padding: 10px 14px; border-radius: 12px;
  background: var(--primary-soft, #eff6ff); border: 1px solid var(--primary);
  color: var(--primary-dark); font-size: 1.05rem; font-weight: 600;
}

/* صفحة الطبيب الموحّدة — عناصر جديدة */
.prev-box {
  background: var(--success-soft); border: 1px solid var(--success);
  color: #15803d; border-radius: 12px; padding: 10px 14px;
  font-size: 1rem; font-weight: 600; margin: 12px 0;
}
.patient-box .pt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.patient-box .pt-name { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.patient-box .pt-ticket {
  background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem;
  padding: 6px 14px; border-radius: 999px;
}
.patient-box .row { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0; font-size: 1.02rem; }
.patient-box .row span { color: var(--text-soft); }
.patient-box .row b { color: var(--text); }
.small { font-size: .92rem; }
.session-form { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.session-form label { font-weight: 600; font-size: .98rem; color: var(--text-soft); margin-top: 6px; }
.session-form textarea {
  font-family: var(--font); font-size: 1.05rem; padding: 11px 12px;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2);
  color: var(--text); width: 100%; resize: vertical;
}
.session-form textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.list.sm { font-size: .95rem; }
.list.sm li { padding: 6px 0; }

/* ===== صفحة الطبيب — أقسام بطاقة المريض الثلاثة (الخطوة 3) ===== */

/* رأس بطاقة المريض: الرقم + زر النطق */
.patient-box .pt-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.patient-box .pt-ticket {
  background: var(--primary); color: #fff; font-weight: 800; font-size: 1.25rem;
  padding: 8px 18px; border-radius: 999px;
}

/* عنوان قسم موحّد */
.pt-section { margin: 16px 0; }
.pt-sec-title {
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  margin: 0 0 10px; padding: 8px 14px; border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
}
.pt-sec-title::before { margin-left: 6px; }

/* ① بيانات المريض — شبكة عمودين متوازنة */
.pt-data .grid2 { margin: 0; }
.pt-cell {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.pt-cell .pt-k { font-size: .85rem; color: var(--muted); font-weight: 600; }
.pt-cell .pt-v { font-size: 1.1rem; color: var(--text); font-weight: 700; }

/* ② السجل الطبي — قائمة كاملة لكل زيارة */
.pt-visits { margin: 0; }
.pt-visit {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.pt-visit-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.pt-visit-date { font-weight: 800; color: var(--primary); font-size: 1.05rem; }
.pt-visit-num {
  background: var(--primary-soft, #eff6ff); color: var(--primary-dark);
  border: 1px solid var(--primary); border-radius: 999px;
  font-size: .85rem; font-weight: 700; padding: 3px 10px;
}
.pt-visit-body { display: flex; flex-direction: column; gap: 6px; font-size: 1rem; color: var(--text-soft); line-height: 1.6; }
.pt-visit-body .pt-k { color: var(--text-soft); font-weight: 600; }

/* ③ تسجيل الجلسة الحالية */
.pt-session .session-form {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
}
.pt-session .session-form label { font-weight: 600; font-size: .98rem; color: var(--text-soft); margin-top: 4px; }
.pt-session .session-form textarea {
  font-family: var(--font); font-size: 1.05rem; padding: 11px 12px;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  color: var(--text); width: 100%; resize: vertical;
}
.pt-session .session-form textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.pt-session-actions { margin-top: 8px; }

/* زر صغير معاد استخدامه */
.btn.sm { font-size: .9rem; padding: 10px 16px; width: auto; display: inline-block; }

/* تغيير سبب الزيارة من صفحة الانتظار */
.reason-edit { margin-top: 10px; }
.reason-edit .chips { margin-top: 8px; }
.reason-edit .btn.ghost.sm { width: 100%; }

/* تنبيه وصول الدور — Overlay كبير + صوت + اهتزاز */
.turn-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, 0.72);
  display: none; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
  animation: turnfade .25s ease;
}
.turn-overlay.show { display: flex; }
@keyframes turnfade { from { opacity: 0; } to { opacity: 1; } }
.turn-card {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 3px solid var(--success, #10b981);
  border-radius: 22px; padding: 30px 26px; text-align: center;
  max-width: 360px; width: 100%;
  box-shadow: 0 20px 60px rgba(16,185,129,.45);
  animation: turnpop .35s cubic-bezier(.2,.8,.3,1.2);
}
@keyframes turnpop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.turn-emoji { font-size: 3.4rem; animation: turnring 1s ease-in-out infinite; }
@keyframes turnring { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
.turn-title { font-size: 1.7rem; font-weight: 900; color: #047857; margin: 8px 0 6px; }
.turn-sub { font-size: 1.05rem; color: #065f46; margin-bottom: 18px; }
.turn-sub b { color: #047857; font-size: 1.2rem; }
/* عند تنبيه الدور: تلوين خفيف لخلفية الصفحة */
body.turn-active { background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important; }

/* صندوق تفاصيل السبب الديناميكي */
.reason-details { margin-top: 10px; padding: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.reason-details label { font-size: .85rem; color: #475569; margin-top: 4px; }
.reason-details input { margin-bottom: 2px; }
.hint { font-size: .82rem; color: #64748b; margin: 6px 0 0; line-height: 1.5; }

/* ===== صفحة الانتظار (المريض) — سبب الزيارة + سجل الزيارات المحسّن ===== */
.req-star { color: var(--danger); font-weight: 800; }
.reason-box {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  border-radius: 12px; padding: 12px 16px; margin: 16px 0;
}
.reason-box .rb-label { font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.reason-box .rb-value { font-weight: 600; color: var(--text); }

.visits-head { margin: 18px 0 10px; }
.visits-head .vh-count {
  display: inline-block; font-size: .85rem; font-weight: 700;
  color: var(--primary-dark); background: var(--primary-soft, #eff6ff);
  border: 1px solid var(--primary); border-radius: 999px; padding: 4px 12px;
}

.visits { display: flex; flex-direction: column; gap: 10px; }
.visit-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.visit-card .vc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.visit-card .vc-num {
  background: var(--primary); color: #fff; font-weight: 800; font-size: .95rem;
  border-radius: 999px; padding: 3px 12px;
}
.visit-card .vc-date { font-weight: 700; color: var(--primary); font-size: .95rem; }
.visit-card .vc-row { display: flex; gap: 8px; font-size: .92rem; margin-top: 6px; line-height: 1.5; }
.visit-card .vc-k { color: var(--muted); font-weight: 600; white-space: nowrap; min-width: 90px; }
.visit-card .vc-v { color: var(--text); }

/* ===== تحسينات الجوال (RTL) — لجعل الصفحات تعمل على الهاتف ===== */
@media (max-width: 600px) {
  body {
    padding: 10px;
    align-items: flex-start;   /* يسمح بالتمرير عند طول المحتوى */
    min-height: 100vh;
  }
  .card { padding: 18px 14px; border-radius: 14px; max-width: 100%; }
  body { font-size: 1rem; }
  .big-ticket .n { font-size: 3rem; }
  .grid2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .actions-row { flex-direction: column; }
  .actions-row .btn { width: 100%; }
  .links { flex-direction: column; }
  .links .btn { width: 100%; }
  .estbox { font-size: .85rem; padding: 12px; }
  .pt-section { padding: 12px; }
  .pt-cell { padding: 8px 10px; }
  .dob { flex-wrap: wrap; }
  .dob select { flex: 1 1 30%; }
}
@media (max-width: 380px) {
  .grid2 { grid-template-columns: 1fr; }
  .big-ticket .n { font-size: 2.6rem; }
}

/* ====== تحسينات صفحة الانتظار (المريض) ====== */
/* أصناف ph-* و turn-overlay وُنقِلت إلى home.html (inline) لتوحيد
   التناسق اللوني مع :root الجديد. لا حاجة لتكرارها هنا. */
