/* ==========================================================================
   Daf Web - منظومة العيادات الطبية الذكية
   تصميم بصري متقدم عالي الفخامة • دعم كامل للعربية والإنجليزية (RTL First)
   ========================================================================== */

:root {
  --brand-primary: #12675B;
  --brand-primary-hover: #0d5248;
  --brand-primary-light: #e8f5f3;
  --brand-primary-border: #99d5cb;

  --brand-accent: #0284c7;
  --brand-accent-light: #e0f2fe;
  
  --brand-navy: #0f172a;
  --brand-slate: #1e293b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;

  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;

  --status-success: #10b981;
  --status-success-bg: #ecfdf5;
  --status-warning: #f59e0b;
  --status-warning-bg: #fffbeb;
  --status-danger: #ef4444;
  --status-danger-bg: #fef2f2;
  --status-info: #3b82f6;
  --status-info-bg: #eff6ff;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(18, 103, 91, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-numeric: 'Outfit', 'Cairo', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 68px; /* For fixed floating demo dock */
}

/* الأرقام والرموز اللاتينية */
.num, .code, .price, .timer, .ref-id, .token-num {
  font-family: var(--font-numeric);
  direction: ltr;
  display: inline-block;
}

/* ==========================================================================
   1. شريط التحكم في الديمو (Floating Demo Control Bar)
   ========================================================================== */
.demo-dock {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 8px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.demo-dock-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-badge-logo {
  background: linear-gradient(135deg, var(--brand-primary), #0284c7);
  color: white;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-live-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.demo-role-tabs {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 2px;
  overflow-x: auto;
}

.demo-role-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-family: var(--font-arabic);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.demo-role-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.demo-role-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(18, 103, 91, 0.4);
}

.demo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  font-family: var(--font-arabic);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.demo-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.demo-action-btn.reset-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
}

/* شريط التنبيه الطبي للتجربة */
.demo-disclaimer-strip {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   2. تخطيط الصفحة الرئيسي (Main Application Container)
   ========================================================================== */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  width: 100%;
  flex: 1;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* بطاقات لوحة التحكم العامة */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  color: var(--brand-primary);
  font-size: 20px;
}

/* شبكة المؤشرات (KPI Stats Grid) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.kpi-teal { background: var(--brand-primary-light); color: var(--brand-primary); }
.kpi-blue { background: var(--brand-accent-light); color: var(--brand-accent); }
.kpi-green { background: var(--status-success-bg); color: var(--status-success); }
.kpi-amber { background: var(--status-warning-bg); color: var(--status-warning); }
.kpi-rose { background: var(--status-danger-bg); color: var(--status-danger); }

.kpi-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-info .kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

/* ==========================================================================
   3. الموقع العام وحجز المريض (Public Site & Booking Flow)
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #12675B 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-clinic-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 24px;
  line-height: 1.7;
}

.hero-meta-strip {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* خطوات معالج الحجز (Booking Wizard) */
.booking-wizard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.wizard-steps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.wizard-steps-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
  transform: translateY(-50%);
}

.wizard-step-node {
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}

.wizard-step-node.active .step-circle {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 0 12px rgba(18, 103, 91, 0.4);
}

.wizard-step-node.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.wizard-step-node.active .step-label {
  color: var(--brand-primary);
  font-weight: 700;
}

/* شبكة اختيار الخدمات */
.services-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.service-select-card {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-select-card:hover {
  border-color: var(--brand-primary-border);
  background: var(--bg-main);
}

.service-select-card.selected {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
  box-shadow: var(--shadow-sm);
}

.service-card-top {
  margin-bottom: 12px;
}

.service-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.service-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.service-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
}

.service-price-tag {
  font-weight: 800;
  color: var(--brand-primary);
  font-size: 15px;
}

/* أطباء العيادة */
.clinicians-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.clinician-card {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
}

.clinician-card:hover {
  border-color: var(--brand-primary-border);
}

.clinician-card.selected {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.clinician-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.clinician-details h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.clinician-details p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* اختيار الوقت والمواعيد المتاحة */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}

.time-slot-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-numeric);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  transition: all 0.2s;
}

.time-slot-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.time-slot-btn.selected {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(18, 103, 91, 0.3);
}

/* شريط عداد الحجز المؤقت (Booking Hold Countdown) */
.hold-timer-alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  color: #92400e;
}

.timer-digits {
  font-size: 18px;
  font-weight: 800;
  color: #b45309;
  letter-spacing: 1px;
}

/* ==========================================================================
   4. جداول البيانات والقوائم (Tables & Lists)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(248, 250, 252, 0.8);
}

/* شارات الحالة (Status Badges) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-success { background: var(--status-success-bg); color: var(--status-success); }
.badge-warning { background: var(--status-warning-bg); color: #b45309; }
.badge-danger { background: var(--status-danger-bg); color: var(--status-danger); }
.badge-info { background: var(--status-info-bg); color: var(--status-info); }
.badge-slate { background: #f1f5f9; color: #475569; }

/* أزرار الإجراءات */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 4px 12px rgba(18, 103, 91, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

/* ==========================================================================
   5. مساحة الطبيب وسجل SOAP والروشتة
   ========================================================================== */
.doctor-workspace-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

@media (max-width: 992px) {
  .doctor-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.patient-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.patient-header-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.patient-avatar-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.vitals-snapshot-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 16px 0;
}

.vitals-grid-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
  margin-top: 8px;
}

.vital-tag {
  background: white;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* نموذج SOAP الطبي */
.soap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.soap-field-group {
  margin-bottom: 20px;
}

.soap-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.soap-textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-arabic);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-surface);
  resize: vertical;
  transition: border-color 0.2s;
}

.soap-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(18, 103, 91, 0.15);
}

.soap-textarea:disabled {
  background: #f8fafc;
  color: #475569;
  cursor: not-allowed;
}

/* توقيع إلكتروني مشفر */
.signature-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 20px;
  font-size: 13px;
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   6. النوافذ المنبثقة (Modals)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-light);
  animation: modalSlide 0.25s ease;
}

@keyframes modalSlide {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

/* نماذج الإدخال */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input, .form-select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-family: var(--font-arabic);
  font-size: 14px;
  color: var(--text-main);
  background: white;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(18, 103, 91, 0.15);
}

/* ==========================================================================
   7. الروشتة والإيصال الطبي المطبوع (Prescription & Official Receipt)
   ========================================================================== */
.rx-paper {
  background: white;
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.rx-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 42px;
  font-weight: 900;
  color: rgba(239, 68, 68, 0.08);
  pointer-events: none;
  white-space: nowrap;
  border: 4px dashed rgba(239, 68, 68, 0.15);
  padding: 10px 30px;
  border-radius: var(--radius-md);
}

.rx-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--brand-primary);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.rx-clinic-info h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-primary);
}

.rx-doctor-info h4 {
  font-size: 16px;
  font-weight: 700;
}

.rx-items-list {
  list-style: none;
  margin: 24px 0;
}

.rx-item {
  padding: 12px 16px;
  border-bottom: 1px dashed var(--border-light);
  margin-bottom: 8px;
}

.rx-item-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-navy);
}

.rx-item-freq {
  font-size: 13px;
  color: var(--text-muted);
}

.rx-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   8. إشعارات Toast التفاعلية
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  border-right: 4px solid var(--brand-primary);
  max-width: 400px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   9. التجاوب مع الجوال والطباعة
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-top: 110px; /* Space for multi-line demo dock */
  }

  .hero-banner {
    padding: 28px 20px;
  }

  .hero-title {
    font-size: 26px;
  }

  .wizard-steps-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .wizard-steps-header::before {
    display: none;
  }
}

@media print {
  .demo-dock, .demo-disclaimer-strip, .btn, .card-header .btn {
    display: none !important;
  }
  body {
    padding-top: 0 !important;
    background: white !important;
  }
  .card, .rx-paper {
    box-shadow: none !important;
    border: none !important;
  }
}
