:root {
    --bg: #FAF8F4;
    --bg-deep: #F0EDE6;
    --fg: #1B2A1B;
    --fg-light: #3D4F3D;
    --muted: #7A8B7A;
    --accent: #0E7C5F;
    --accent-dark: #095E47;
    --accent-light: #D6F0E5;
    --gold: #C4962C;
    --gold-light: #F5ECD0;
    --card: #FFFFFF;
    --border: #DDE3DD;
    --danger: #DC2626;
    --doctor: #2563EB;
    --pharmacy: #C4962C;
    --center: #9333EA;
    --lab: #DC2626;
    --hospital: #0D9488;
}

/* إعادة تعيين عامة */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: 'Noto Kufi Arabic', sans-serif;
}

html { scroll-behavior: smooth; }


/* ═══════════════════════════════════════════════════════════════════
   🌄 قسم الهيرو (الشاشة الرئيسية)
   ═══════════════════════════════════════════════════════════════════ */
.hero-bg {
    position: relative;
    overflow: hidden;
    background-color: #031410;
    z-index: 1;
}

/* شعار طبي متحرك */
.hero-medical-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 2.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-medical-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 0 0 8px rgba(14, 124, 95, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(196, 150, 44, 0.4);
    transition: transform 0.4s ease;
}

.hero-medical-logo img:hover {
    transform: scale(1.08) rotate(2deg);
}

/* إخفاء الشعار على الشاشات الصغيرة */
@media (max-width: 640px) {
    .hero-medical-logo { width: 150px; height: 150px; }
}
@media (max-width: 400px) {
    .hero-medical-logo { width: 130px; height: 130px; }
}

/* توهج زمردي علوي */
.hero-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 50% -10%, rgba(16, 185, 129, 0.7) 0%, transparent 60%);
    z-index: -1;
}

/* شبكة طبية ثلاثية الأبعاد */
.hero-bg::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    bottom: -50%;
    left: -50%;
    background-image: 
        linear-gradient(rgba(20, 184, 166, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 184, 166, 0.6) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: center top;
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 80%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════════════
   🔋 وضع الأداء — إيقاف الحركات الثقيلة (لتقليل الحرارة)
   ═══════════════════════════════════════════════════════════════════ */

/* إيقاف الشبكة ثلاثية الأبعاد */
.hero-bg::after {
    animation: none !important;
    opacity: 0.25;
    transform: perspective(500px) rotateX(60deg) translateY(25px) !important;
}

/* إيقاف نبض التوهج العلوي */
.hero-bg::before {
    animation: none !important;
    opacity: 0.6;
}

/* إيقاف حركة الشعار */
.hero-medical-logo img {
    animation: none !important;
}

/* إخفاء الحلقات النابضة حول الشعار */
.hero-medical-logo::before,
.hero-medical-logo::after {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🔍 حقل البحث والفلاتر
   ═══════════════════════════════════════════════════════════════════ */
.search-container {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(196, 150, 44, 0.6);
    box-shadow: 0 0 40px rgba(196, 150, 44, 0.2);
}

.search-input {
    background: transparent;
    color: white;
    outline: none;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* أزرار الفلترة */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid var(--border);
    background: #FFFFFF;
    cursor: pointer;
}

.filter-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.12);
    border-color: transparent !important;
}

.filter-btn.active {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
    border-color: transparent !important;
}

.filter-btn.active i,
.filter-btn.active span {
    color: white !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🃏 البطاقات والشارات والأيقونات
   ═══════════════════════════════════════════════════════════════════ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 0;
    transition: height 0.3s ease;
    border-radius: 0 0 4px 0;
    z-index: 2;
}

.card:hover::before { height: 100%; }
.card:hover { box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.15); border-color: transparent; }

.card.doctor-card::before { background: var(--doctor); }
.card.pharmacy-card::before { background: var(--pharmacy); }
.card.center-card::before { background: var(--center); }
.card.lab-card::before { background: var(--lab); }
.card.hospital-card::before { background: var(--hospital); }

/* الشارات */
.badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-doctor { background: #DBEAFE; color: #1E40AF; }
.badge-pharmacy { background: var(--gold-light); color: #92610A; }
.badge-center { background: #F3E8FF; color: #6B21A8; }
.badge-lab { background: #FEE2E2; color: #991B1B; }
.badge-hospital { background: #CCFBF1; color: #115E59; }

/* أيقونات الفئات */
.cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cat-icon-doctor { background: #DBEAFE; color: #2563EB; }
.cat-icon-pharmacy { background: var(--gold-light); color: var(--gold); }
.cat-icon-center { background: #F3E8FF; color: #9333EA; }
.cat-icon-lab { background: #FEE2E2; color: #DC2626; }
.cat-icon-hospital { background: #CCFBF1; color: var(--hospital); }

/* زر الاتصال */
.call-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.call-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
}

.call-btn:hover::before { width: 200%; height: 200%; }
.call-btn:hover { transform: scale(1.05); }


/* ═══════════════════════════════════════════════════════════════════
   📊 بطاقات الإحصائيات
   ═══════════════════════════════════════════════════════════════════ */
.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(14, 124, 95, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════
   🧭 شريط التنقل
   ═══════════════════════════════════════════════════════════════════ */
.ornament-line {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.ornament-line::before,
.ornament-line::after {
    content: '';
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: rgba(7, 61, 46, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}


/* ═══════════════════════════════════════════════════════════════════
   💬 التنبيهات (Toast) والأزرار العائمة
   ═══════════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--fg);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 10001;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(0.5);
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(14, 124, 95, 0.4);
    z-index: 1000;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
}


/* ═══════════════════════════════════════════════════════════════════
   📱 قائمة الجوال
   ═══════════════════════════════════════════════════════════════════ */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}


/* ═══════════════════════════════════════════════════════════════════
   🎨 شريط التمرير والتفاصيل
   ═══════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.detail-row i {
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
}


/* ═══════════════════════════════════════════════════════════════════
   🪟 النوافذ المنبثقة (Modal)
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-content {
    background: var(--card);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    opacity: 1;
    transform: scale(1);
}

/* لوحة التحكم (CtrlPanel) */
.ctrl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.ctrl-content {
    background: var(--bg);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.ctrl-overlay.active .ctrl-content {
    opacity: 1;
    transform: scale(1);
}


/* ═══════════════════════════════════════════════════════════════════
   ⌨️ حقول الإدخال الموحدة
   ═══════════════════════════════════════════════════════════════════ */
.ctrl-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--fg);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.ctrl-input:focus {
    background: var(--card);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(14, 124, 95, 0.1);
}

.ctrl-input::placeholder {
    color: var(--muted);
    font-weight: 400;
}

/* الوضع الليلي */
html.dark .ctrl-input {
    background: var(--bg-deep) !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

html.dark .ctrl-input:focus {
    background: #1e293b !important;
    border-color: var(--accent) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🔲 أنماط الخلفيات
   ═══════════════════════════════════════════════════════════════════ */
.dot-pattern {
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 30px 30px;
}

.filters-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-scroll::-webkit-scrollbar { display: none; }


/* ═══════════════════════════════════════════════════════════════════
   📅 نظام الحجز
   ═══════════════════════════════════════════════════════════════════ */
.booking-step { display: none; }
.booking-step.active { display: block; }

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

/* أزرار اختيار اليوم */
.day-btn {
    background: var(--card);
    border: 2px solid var(--border);
    color: var(--fg);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-btn:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px -4px rgba(14, 124, 95, 0.15);
}

.day-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 10px 20px -5px rgba(14, 124, 95, 0.4);
    transform: translateY(-3px);
}

.day-btn.active span { color: #ffffff; }

/* أزرار الأوقات (Slots) */
#slotsContainer button {
    background: var(--bg-deep);
    color: var(--accent);
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.2s ease;
}

#slotsContainer button:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

#slotsContainer button.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 124, 95, 0.3);
}

#slotsContainer button:disabled {
    background: var(--bg-deep);
    color: var(--muted);
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

html.dark #slotsContainer button {
    background: #1e293b;
    color: #10B981;
}

html.dark #slotsContainer button:hover {
    background: #134e4a;
    color: #ffffff;
}

/* زر التالي */
#step1Next {
    background: var(--accent);
    color: white;
    border-radius: 14px;
    font-weight: 800;
    padding: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -5px rgba(14, 124, 95, 0.4);
}

#step1Next:disabled {
    background: var(--muted);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.5;
}

#step1Next:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(14, 124, 95, 0.5);
}

/* الوضع الليلي */
html.dark .day-btn {
    background: #1e293b;
    border-color: #334155;
}

html.dark .day-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

html.dark .booking-step { color: var(--fg) !important; }

.day-checkbox {
    accent-color: var(--accent);
    width: 20px;
    height: 20px;
    cursor: pointer;
}


/* ═══════════════════════════════════════════════════════════════════
   🌙 الوضع المظلم الشامل
   ═══════════════════════════════════════════════════════════════════ */
html.dark {
    --bg: #0f172a;
    --bg-deep: #020617;
    --fg: #f8fafc;
    --fg-light: #cbd5e1;
    --muted: #94a3b8;
    --card: #1e293b;
    --border: #334155;
    --accent-light: #134e4a;
    --accent-dark: #10B981 !important;
    --gold-light: #422006 !important;
    --gold: #F0D77B !important;
}

/* تحويل ألوان Tailwind في الوضع المظلم */
html.dark .bg-white { background-color: var(--card) !important; }
html.dark .bg-gray-50,
html.dark .bg-gray-100 { background-color: var(--bg-deep) !important; }
html.dark .text-gray-900,
html.dark .text-gray-800 { color: var(--fg) !important; }
html.dark .text-gray-700 { color: var(--fg-light) !important; }
html.dark .text-gray-600,
html.dark .text-gray-500,
html.dark .text-gray-400 { color: var(--muted) !important; }
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-300 { border-color: var(--border) !important; }

/* نوافذ منبثقة */
html.dark .ctrl-content,
html.dark .modal-content { background-color: var(--card) !important; }
html.dark .toast { background-color: var(--fg) !important; color: var(--bg) !important; }

/* أدوات طبية */
html.dark .accordion-item { background-color: var(--card) !important; border-color: var(--border) !important; }
html.dark .accordion-body { background-color: var(--bg-deep) !important; }
html.dark .disease-card,
html.dark .med-symbol-card,
html.dark .burn-option {
    background-color: var(--card) !important;
    border-color: var(--border) !important;
}
html.dark .file-input-label {
    background-color: var(--bg-deep) !important;
    color: var(--muted) !important;
    border-color: var(--border) !important;
}

/* أنماط الخلفيات */
html.dark .dot-pattern { background-image: radial-gradient(circle, #334155 1px, transparent 1px) !important; }
html.dark .filter-btn {
    background: var(--card) !important;
    border-color: var(--border) !important;
    color: var(--fg) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🖼️ عارض الصور (Lightbox)
   ═══════════════════════════════════════════════════════════════════ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10002;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img { transform: scale(1); }


/* ═══════════════════════════════════════════════════════════════════
   👨‍💻 اسم المطور
   ═══════════════════════════════════════════════════════════════════ */
.alixjori-dev {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.dev-subtext {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.dev-credit-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(196, 150, 44, 0.1);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.dev-credit-wrapper:hover {
    background: rgba(196, 150, 44, 0.05);
    border-color: rgba(196, 150, 44, 0.3);
    box-shadow: 0 0 20px rgba(196, 150, 44, 0.1);
}

.dev-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dev-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(110deg, var(--gold) 20%, #ffffff 50%, var(--gold) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerGold 3s linear infinite;
    letter-spacing: 0.5px;
}

.dev-icon {
    color: var(--gold);
    font-size: 0.75rem;
    filter: drop-shadow(0 0 4px rgba(196, 150, 44, 0.5));
}

@keyframes shimmerGold {
    to { background-position: -200% center; }
}


/* ═══════════════════════════════════════════════════════════════════
   📁 رفع الملفات
   ═══════════════════════════════════════════════════════════════════ */
.input-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg);
    color: var(--muted);
}

.file-input-label:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent-dark);
}

.preview-image {
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
}


/* ═══════════════════════════════════════════════════════════════════
   🔧 قائمة الأدوات المنسدلة
   ═══════════════════════════════════════════════════════════════════ */
.tools-dropdown { position: relative; }

.tools-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    overflow: hidden;
}

.tools-dropdown:hover .tools-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tools-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.tools-dropdown-item:last-child { border-bottom: none; }
.tools-dropdown-item:hover { background: var(--bg-deep); }

.tools-dropdown-item i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}


/* ═══════════════════════════════════════════════════════════════════
   🔬 بطاقات رموز التحاليل
   ═══════════════════════════════════════════════════════════════════ */
.med-symbol-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.med-symbol-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.med-symbol-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-family: monospace;
    margin-bottom: 8px;
}


/* ═══════════════════════════════════════════════════════════════════
   🦠 بطاقات الأمراض الموسمية
   ═══════════════════════════════════════════════════════════════════ */
.disease-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.disease-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1);
}

.disease-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.disease-body { padding: 16px; }

.disease-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.disease-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   🩸 بنك الدم
   ═══════════════════════════════════════════════════════════════════ */
.blood-type-badge {
    font-weight: 900;
    font-size: 1.5rem;
    padding: 10px 20px;
    border-radius: 12px;
    background: #FEE2E2;
    color: #DC2626;
    display: inline-block;
}


/* ═══════════════════════════════════════════════════════════════════
   🔥 حاسبة الحروق
   ═══════════════════════════════════════════════════════════════════ */
.burn-option {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.burn-option:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.burn-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent-dark);
    font-weight: bold;
}


/* ═══════════════════════════════════════════════════════════════════
   💡 نصائح اليوم + الأكورديون
   ═══════════════════════════════════════════════════════════════════ */
#dailyTipText { transition: opacity 0.3s ease; }

.accordion-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    font-weight: bold;
    font-size: 0.9rem;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg);
}

.accordion-item.active .accordion-body { max-height: 2000px; }
.accordion-item.active .accordion-header i { transform: rotate(180deg); }


/* ═══════════════════════════════════════════════════════════════════
   🔗 قائمة المشاركة
   ═══════════════════════════════════════════════════════════════════ */
#shareDropdown .share-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

#shareDropdown .share-menu-item:hover { background: var(--bg-deep); }

#shareDropdown .share-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

html.dark #shareDropdown { background: var(--card); border-color: var(--border); }
html.dark #shareDropdown .share-menu-item { color: var(--fg); }
html.dark #shareDropdown .share-menu-item:hover { background: var(--bg-deep); }


/* ═══════════════════════════════════════════════════════════════════
   📢 شريط الإعلانات المتحرك
   ═══════════════════════════════════════════════════════════════════ */
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

#announcementText {
    white-space: nowrap;
    display: inline-block;
    animation: marquee 30s linear infinite;
    padding-left: 100%;
}

#announcementText:hover { animation-play-state: paused; }
#announcementText.no-marquee { animation: none; padding-left: 0; }


/* ═══════════════════════════════════════════════════════════════════
   🧪 دليل التحاليل (Pre-Test Guide)
   ═══════════════════════════════════════════════════════════════════ */
.fasting-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
}

.fasting-8 { background: #FEF3C7; color: #92400E; }
.fasting-10 { background: #FFEDD5; color: #9A3412; }
.fasting-12 { background: #FEE2E2; color: #991B1B; }
.fasting-none { background: #D1FAE5; color: #065F46; }
.fasting-special { background: #EDE9FE; color: #5B21B6; }

.prelab-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.prelab-accordion.open { max-height: 800px; }
.prelab-toggle { cursor: pointer; transition: background 0.2s; }
.prelab-toggle:hover { background: var(--bg-deep); }

.tab-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
}

.tab-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.tab-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.glow-border { position: relative; }

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--gold), var(--accent));
    background-size: 200% 200%;
    animation: glowShift 4s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-border:hover::before { opacity: 1; }

@keyframes glowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}


/* ═══════════════════════════════════════════════════════════════════
   📊 شارة الزوار والتحقق
   ═══════════════════════════════════════════════════════════════════ */
.stat-pill-pro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 11px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-pill-pro:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(196, 150, 44, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.radar-dot-pro {
    width: 7px;
    height: 7px;
    background-color: #10B981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 8px #10B981;
    flex-shrink: 0;
}

.radar-dot-pro::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #10B981;
    animation: radar-pulse-pro 2s ease-out infinite;
}

@keyframes radar-pulse-pro {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* شارة التحقق الذهبية */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #0E7C5F 0%, #10B981 100%);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
    box-shadow: 0 2px 6px rgba(14, 124, 95, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.verified-badge i { font-size: 0.7rem; }

.verified-gold {
    background: linear-gradient(135deg, #C4962C 0%, #e6c976 50%, #C4962C 100%);
    color: #422006;
    box-shadow: 0 2px 6px rgba(196, 150, 44, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════
   🏙️ لوحة اختيار المدينة
   ═══════════════════════════════════════════════════════════════════ */
.city-pill-btn { border: 1px solid rgba(255, 255, 255, 0.15); }
.city-pill-btn:hover { border-color: rgba(196, 150, 44, 0.5); }

.city-selector-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.city-selector-overlay.active {
    opacity: 1;
    visibility: visible;
}

.city-selector-panel {
    background: var(--bg);
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.city-selector-overlay.active .city-selector-panel {
    transform: translateY(0);
}

.city-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.city-option:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateX(5px);
}

.city-option.selected {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════════
   🚑 زر الطوارئ العائم
   ═══════════════════════════════════════════════════════════════════ */
.emergency-fab-wrapper {
    position: fixed;
    bottom: 90px;
    left: 30px;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.emergency-fab-wrapper.hidden-fab {
    opacity: 0;
    visibility: hidden;
}

.emergency-fab-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #DC2626;
    color: #DC2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 1001;
}

.emergency-fab-close:hover {
    background: #DC2626;
    color: white;
    transform: scale(1.1);
}


/* ═══════════════════════════════════════════════════════════════════
   🌟 شعار LomedX
   ═══════════════════════════════════════════════════════════════════ */
.lomedx-brand {
    font-family: 'Outfit', 'Poppins', 'Segoe UI', sans-serif;
    font-weight: 800;
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 50%, #0E7C5F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 0.5px;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(196, 150, 44, 0.15);
}

html.dark .lomedx-brand {
    background: linear-gradient(135deg, #f8d674 0%, #F0D77B 50%, #10B981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ═══════════════════════════════════════════════════════════════════
   📱 قائمة الجوال الفاخرة (Premium)
   ═══════════════════════════════════════════════════════════════════ */
.mobile-menu-premium {
    background: radial-gradient(circle at top center, #0a4d3a 0%, #052E22 40%, #021410 100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-premium.open { transform: translateX(0); }

.mobile-menu-premium::-webkit-scrollbar { width: 5px; }
.mobile-menu-premium::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.mobile-menu-premium::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

.text-gold-gradient {
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 50%, #92610A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(196, 150, 44, 0.3));
}

.icon-gold-gradient {
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-card {
    background: linear-gradient(180deg, rgba(14, 124, 95, 0.15) 0%, rgba(2, 20, 16, 0.4) 100%);
    border: 1px solid rgba(196, 150, 44, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(196, 150, 44, 0.1);
}

.menu-item-premium {
    border-bottom: 1px solid rgba(196, 150, 44, 0.1);
    transition: all 0.3s ease;
}

.menu-item-premium:last-child { border-bottom: none; }

.menu-item-premium:hover {
    background: linear-gradient(90deg, rgba(196, 150, 44, 0.1) 0%, transparent 100%);
    padding-right: 10px !important;
}

.btn-dark-gold {
    background: linear-gradient(135deg, #92610A 0%, #C4962C 50%, #92610A 100%);
    box-shadow: 0 10px 25px rgba(196, 150, 44, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid #F0D77B;
}

.portal-grid-btn {
    background: linear-gradient(180deg, rgba(196, 150, 44, 0.05) 0%, rgba(196, 150, 44, 0.15) 100%);
    border: 1px solid rgba(196, 150, 44, 0.5);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(240, 215, 123, 0.2);
}

.portal-grid-btn:hover {
    background: linear-gradient(180deg, rgba(196, 150, 44, 0.15) 0%, rgba(196, 150, 44, 0.3) 100%);
    border-color: #F0D77B;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(196, 150, 44, 0.2), inset 0 1px 0 rgba(240, 215, 123, 0.4);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.accordion-active .accordion-content { max-height: 1000px; }
.accordion-active .chevron-icon { transform: rotate(180deg); color: #F0D77B; }
.chevron-icon { transition: all 0.3s ease; }
.glow-gold { text-shadow: 0 0 10px rgba(240, 215, 123, 0.5); }

/* إخفاء عناصر Google Translate */
.goog-te-balloon,
.goog-tooltip,
.goog-tooltip:hover { display: none !important; }


/* ═══════════════════════════════════════════════════════════════════
   ⏳ مؤشرات التحميل (Spinner)
   ═══════════════════════════════════════════════════════════════════ */
.mini-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 0;
    color: var(--muted);
    font-size: 0.85rem;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════════════
   🔎 البحث الذكي (Smart Search Dropdown)
   ═══════════════════════════════════════════════════════════════════ */
#smartSearchDropdown {
    background-color: #ffffff;
    border: 1px solid #DDE3DD;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-height: 350px;
    overflow-y: auto;
}

html.dark #smartSearchDropdown {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.smart-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #DDE3DD;
    transition: background 0.2s;
}

.smart-result-item:last-child { border-bottom: none; }
.smart-result-item:hover { background-color: #F0EDE6; }
html.dark .smart-result-item:hover { background-color: #334155; }

.smart-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.smart-text { flex: 1; min-width: 0; }

.smart-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: #1B2A1B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .smart-name { color: #f8fafc; }

.smart-desc {
    font-size: 0.75rem;
    color: #7A8B7A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .smart-desc { color: #94a3b8; }

.smart-arrow { font-size: 0.75rem; color: #DDE3DD; }
html.dark .smart-arrow { color: #334155; }

.smart-empty {
    padding: 24px;
    text-align: center;
    font-size: 0.875rem;
    color: #7A8B7A;
}

html.dark .smart-empty { color: #94a3b8; }


/* ═══════════════════════════════════════════════════════════════════
   ⚡ تحسينات الأداء
   ═══════════════════════════════════════════════════════════════════ */
.card,
.premium-card,
.accordion-item {
    content-visibility: auto;
    contain-intrinsic-size: 200px;
}

/* احترام إعداد "تقليل الحركة" */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* إيقاف حركات الهيرو عند التمرير بعيداً */
.hero-bg.paused-anim *,
.hero-bg.paused-anim *::before,
.hero-bg.paused-anim *::after {
    animation-play-state: paused !important;
}

/* إيقاف كل الحركات عند مغادرة التبويب */
body.tab-hidden *,
body.tab-hidden *::before,
body.tab-hidden *::after {
    animation-play-state: paused !important;
}

/* إيقاف الحركات عند فتح النوافذ (مع استثناء القائمة الصحية) */
body.stop-animations *:not(.mobile-menu-premium):not(.mobile-menu-premium *):not(.btn-health-glow):not(.btn-health-glow *),
body.stop-animations *::before,
body.stop-animations *::after {
    animation-play-state: paused !important;
}

body.stop-animations .btn-health-glow::before,
body.stop-animations .btn-health-glow::after,
body.stop-animations .btn-health-glow span::before {
    animation-play-state: running !important;
}


/* ═══════════════════════════════════════════════════════════════════
   📱 تحسينات الجوال (Touch & Safe Area)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .btn,
    .call-btn,
    .filter-btn,
    .portal-grid-btn {
        transition: transform 0.1s ease-out, box-shadow 0.2s ease;
    }

    .btn:active,
    .call-btn:active,
    .filter-btn:active,
    .card:active {
        transform: scale(0.96) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }

    .back-to-top,
    .emergency-fab-wrapper {
        bottom: calc(30px + env(safe-area-inset-bottom)) !important;
    }

    .accordion-header,
    .day-btn,
    .tools-dropdown-item {
        min-height: 44px;
    }

    .modal-content > div > button:first-child {
        width: 36px;
        height: 36px;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   🖱️ التمرير وتحديد النص
   ═══════════════════════════════════════════════════════════════════ */
.ctrl-content,
.mobile-menu-premium,
.city-selector-panel {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

::selection {
    background: rgba(14, 124, 95, 0.2);
    color: #0E7C5F;
    text-shadow: none;
}

::-moz-selection {
    background: rgba(14, 124, 95, 0.2);
    color: #0E7C5F;
}

input:focus,
select:focus,
textarea:focus,
.ctrl-input:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(14, 124, 95, 0.1) !important;
    transition: box-shadow 0.2s ease;
}


/* ═══════════════════════════════════════════════════════════════════
   💀 مؤشرات التحميل الوهمية (Skeleton)
   ═══════════════════════════════════════════════════════════════════ */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    height: 20px;
    width: 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ═══════════════════════════════════════════════════════════════════
   ✨ زر "ملفي الصحي" المتوهج
   ═══════════════════════════════════════════════════════════════════ */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.btn-health-glow {
    position: relative !important;
    border: none !important;
    z-index: 1 !important;
    isolation: isolate;
    overflow: hidden !important;
    animation: btnMedicalPulse 3s ease-in-out infinite !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-health-glow::before {
    content: '' !important;
    position: absolute !important;
    width: 200% !important;
    height: 200% !important;
    top: -50% !important;
    left: -50% !important;
    border-radius: 50% !important;
    background: conic-gradient(from 0deg, #F0D77B, #10B981, #C4962C, #FFFFFF, #F0D77B) !important;
    z-index: -2 !important;
    filter: drop-shadow(0 0 8px rgba(240, 215, 123, 0.8)) !important;
    animation: rotateGlowBorder 4s linear infinite !important;
}

@keyframes rotateGlowBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-health-glow::after {
    content: '' !important;
    position: absolute !important;
    inset: 2px !important;
    border-radius: calc(1rem - 2px) !important;
    z-index: -1 !important;
    background-image: 
        linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.35) 47%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.35) 53%, rgba(255, 255, 255, 0.05) 60%, transparent 70%),
        linear-gradient(135deg, #F0D77B 0%, #C4962C 50%, #92610A 100%);
    background-size: 300% 100%, 100% 100%;
    background-repeat: no-repeat, no-repeat;
    background-position: 200% 0, 0 0;
    will-change: background-position;
    animation: shineMoveRTL 6.5s cubic-bezier(0.65, 0.05, 0.36, 1) infinite !important;
}

@keyframes shineMoveRTL {
    0% { background-position: 200% 0, 0 0; }
    60% { background-position: -100% 0, 0 0; }
    100% { background-position: -100% 0, 0 0; }
}

.btn-health-glow span {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    z-index: 1 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

@keyframes btnMedicalPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(196, 150, 44, 0.6), 0 0 10px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 30px rgba(196, 150, 44, 1), 0 0 20px rgba(16, 185, 129, 0.8); }
}


/* ═══════════════════════════════════════════════════════════════════
   🌟 شاشة التحميل 3D
   ═══════════════════════════════════════════════════════════════════ */
.splash-3d-scene {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, #064D3A 0%, #021410 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.splash-stars {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(196, 150, 44, 0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(14, 124, 95, 0.8), transparent),
        radial-gradient(1px 1px at 250px 80px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 300px 300px;
    background-repeat: repeat;
    animation: starsMove 8s linear infinite;
    opacity: 0.6;
    z-index: 1;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: 300px 300px; }
}

.splash-3d-stage {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: stageFloat 4s ease-in-out infinite;
    z-index: 10;
}

@keyframes stageFloat {
    0%, 100% { transform: translateY(0) rotateX(10deg) rotateY(0deg); }
    50% { transform: translateY(-15px) rotateX(15deg) rotateY(10deg); }
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px solid transparent;
    transform-style: preserve-3d;
    box-shadow: 0 0 20px rgba(196, 150, 44, 0.3);
}

.orbit-1 {
    width: 180px;
    height: 180px;
    margin-left: -90px;
    margin-top: -90px;
    border-top-color: #C4962C;
    border-right-color: #0E7C5F;
    animation: spin1 4s linear infinite;
}

.orbit-2 {
    width: 240px;
    height: 240px;
    margin-left: -120px;
    margin-top: -120px;
    border-bottom-color: #C4962C;
    border-left-color: rgba(14, 124, 95, 0.5);
    transform: rotateX(70deg);
    animation: spin2 6s linear infinite reverse;
}

.orbit-3 {
    width: 300px;
    height: 300px;
    margin-left: -150px;
    margin-top: -150px;
    border-top-color: rgba(14, 124, 95, 0.3);
    border-left-color: #C4962C;
    transform: rotateY(70deg);
    animation: spin3 8s linear infinite;
}

@keyframes spin1 {
    from { transform: rotateZ(0deg); }
    to { transform: rotateZ(360deg); }
}

@keyframes spin2 {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes spin3 {
    from { transform: rotateY(70deg) rotateZ(0deg); }
    to { transform: rotateY(70deg) rotateZ(360deg); }
}

.splash-logo-3d {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
    transform-style: preserve-3d;
    transform: translateZ(50px);
    z-index: 5;
}

.splash-logo-3d img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 40px rgba(196, 150, 44, 0.6), 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.splash-logo-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 150, 44, 0.4) 0%, transparent 70%);
    filter: blur(15px);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.orbit-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    color: #C4962C;
    text-shadow: 0 0 10px rgba(196, 150, 44, 0.8);
    font-size: 1.2rem;
    transform-style: preserve-3d;
}

.orbit-icon-1 { animation: orbitMove1 4s linear infinite; }
.orbit-icon-2 { animation: orbitMove2 6s linear infinite; }
.orbit-icon-3 { animation: orbitMove3 8s linear infinite; }

@keyframes orbitMove1 {
    from { transform: rotate(0deg) translateX(90px) rotate(0deg) translateZ(20px); }
    to { transform: rotate(360deg) translateX(90px) rotate(-360deg) translateZ(20px); }
}

@keyframes orbitMove2 {
    from { transform: rotate(120deg) translateX(120px) rotate(-120deg) translateZ(-20px); }
    to { transform: rotate(480deg) translateX(120px) rotate(-480deg) translateZ(-20px); }
}

@keyframes orbitMove3 {
    from { transform: rotate(240deg) translateX(150px) rotate(-240deg) translateZ(0); }
    to { transform: rotate(600deg) translateX(150px) rotate(-600deg) translateZ(0); }
}

.splash-text-3d-container {
    margin-top: 4rem;
    text-align: center;
    z-index: 10;
    transform-style: preserve-3d;
    animation: textFloat 3s ease-in-out infinite;
}

@keyframes textFloat {
    0%, 100% { transform: translateY(0) translateZ(30px); }
    50% { transform: translateY(-5px) translateZ(50px); }
}

.splash-text-3d {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 50%, #0E7C5F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(1px 1px 0 #073D2E) drop-shadow(2px 2px 0 #073D2E) drop-shadow(3px 3px 0 #073D2E) drop-shadow(4px 4px 0 #073D2E) drop-shadow(5px 5px 8px rgba(0, 0, 0, 0.6));
}

.splash-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.splash-loader-bar {
    margin-top: 2rem;
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.splash-loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #C4962C, transparent);
    box-shadow: 0 0 15px #C4962C;
    animation: loaderSlide 1.5s ease-in-out infinite;
}

@keyframes loaderSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

.splash-3d-scene.hidden {
    opacity: 0;
    transform: scale(1.1);
    visibility: hidden;
}


/* ═══════════════════════════════════════════════════════════════════
   🎯 قسم الدعوة للتسجيل (CTA)
   ═══════════════════════════════════════════════════════════════════ */
.cta-section {
    padding: 80px 16px;
    background: var(--bg-deep);
}

.cta-box {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
    background: linear-gradient(135deg, #021410 0%, #052E22 100%);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cta-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.cta-box::before,
.cta-box::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: ctaGlowShift 8s ease-in-out infinite;
}

.cta-box::before {
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(196, 150, 44, 0.15), transparent 65%);
}

.cta-box::after {
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 124, 95, 0.2), transparent 70%);
    animation-direction: reverse;
}

@keyframes ctaGlowShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.cta-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 2;
    padding: 8px 16px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.cta-icon-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 32px;
    display: grid;
    place-items: center;
    z-index: 1;
}

.cta-icon-wrap::before,
.cta-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(196, 150, 44, 0.4);
    animation: ctaRingOut 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.cta-icon-wrap::after { animation-delay: 1.5s; }

@keyframes ctaRingOut {
    0% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

.cta-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(196, 150, 44, 0.25), rgba(196, 150, 44, 0.1));
    border: 1.5px solid rgba(196, 150, 44, 0.4);
    color: #F0D77B;
    display: grid;
    place-items: center;
    font-size: 34px;
    z-index: 2;
    box-shadow: 0 0 40px rgba(196, 150, 44, 0.2);
}

.cta-eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(196, 150, 44, 0.15);
    border: 1px solid rgba(196, 150, 44, 0.3);
    color: #F0D77B;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.cta-title {
    position: relative;
    z-index: 1;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
    font-family: 'Noto Kufi Arabic';
}

.cta-title .gold { color: #F0D77B; }

.cta-desc {
    position: relative;
    z-index: 1;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 40px;
}

.cta-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    text-decoration: none;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #C4962C 0%, #F0D77B 100%);
    color: #052E22;
    box-shadow: 0 8px 24px rgba(196, 150, 44, 0.35);
}

.cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(196, 150, 44, 0.45);
}

.cta-btn.ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.cta-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.cta-features {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.cta-feature i { color: #F0D77B; }


/* ═══════════════════════════════════════════════════════════════════
   📝 نموذج "أضف منشأتك" (Add Facility Modal)
   ═══════════════════════════════════════════════════════════════════ */
.add-facility-modal {
    position: relative;
    background: var(--card, #0a1f1a);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 36px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border, rgba(196, 150, 44, 0.2));
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 150, 44, 0.4) transparent;
}

.modal-overlay.active .add-facility-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.add-facility-modal::-webkit-scrollbar { width: 4px; }
.add-facility-modal::-webkit-scrollbar-thumb {
    background: rgba(196, 150, 44, 0.4);
    border-radius: 4px;
}

.modal-handle {
    display: none;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted, #94a3b8);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.25s ease;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.modal-close-btn:active {
    transform: rotate(90deg) scale(0.9);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 4px;
}

.modal-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(196, 150, 44, 0.2), rgba(196, 150, 44, 0.05));
    border: 1.5px solid rgba(196, 150, 44, 0.3);
    color: var(--accent, #C4962C);
    display: grid;
    place-items: center;
    font-size: 24px;
    margin: 0 auto 16px;
    box-shadow: 0 0 30px rgba(196, 150, 44, 0.15);
}

.modal-header h3 {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--fg, #fff);
    margin-bottom: 8px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.modal-header p {
    font-size: 13px;
    color: var(--muted, #94a3b8);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-light, #e2e8f0);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.required-mark {
    color: #ef4444;
    font-size: 14px;
    line-height: 1;
}

.input-wrap {
    position: relative;
    display: block;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--muted, #64748b);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.25s ease;
    z-index: 2;
}

.input-wrap:focus-within .input-icon {
    color: var(--accent, #C4962C);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border, rgba(148, 163, 184, 0.15));
    background: var(--bg, rgba(0, 0, 0, 0.2));
    color: var(--fg, #fff);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
}

.form-group input::placeholder {
    color: var(--muted, #64748b);
    opacity: 0.7;
    font-weight: 400;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent, #C4962C);
    background: rgba(196, 150, 44, 0.05);
    box-shadow: 0 0 0 4px rgba(196, 150, 44, 0.15);
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C4962C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 18px;
    padding-left: 44px;
    cursor: pointer;
}

.form-group select option {
    background: #052E22;
    color: #fff;
    padding: 10px;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted, #64748b);
    font-weight: 500;
}

.input-hint i {
    color: var(--accent, #C4962C);
    font-size: 11px;
    opacity: 0.8;
}

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

.submit-facility-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #C4962C 0%, #F0D77B 100%);
    color: #052E22;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    min-height: 54px;
    box-shadow: 0 8px 24px rgba(196, 150, 44, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    letter-spacing: 0.3px;
}

.submit-facility-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(196, 150, 44, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.submit-facility-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.submit-facility-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: var(--muted, #64748b);
    font-weight: 500;
    text-align: center;
}

.form-footer-note i {
    color: #10B981;
    font-size: 12px;
}

/* استجابة الجوال */
@media (max-width: 700px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .add-facility-modal {
        max-width: 100%;
        width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 40px 22px 28px;
        max-height: 92dvh;
        transform: translateY(100%);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
        border: none;
        border-top: 1px solid rgba(196, 150, 44, 0.2);
    }

    .modal-overlay.active .add-facility-modal { transform: translateY(0); }
    .modal-handle { display: block; top: 10px; width: 44px; height: 5px; background: rgba(255, 255, 255, 0.2); }

    .modal-close-btn { top: 20px; left: auto; right: 20px; width: 44px; height: 44px; font-size: 16px; }
    .modal-header { margin-bottom: 24px; padding-top: 8px; }
    .modal-header-icon { width: 56px; height: 56px; font-size: 20px; margin-bottom: 14px; }
    .modal-header h3 { font-size: 18px; }
    .modal-header p { font-size: 12px; }
    .form-group { margin-bottom: 16px; }
    .form-group label { font-size: 12px; margin-bottom: 7px; }
    .form-group input,
    .form-group select { padding: 14px 42px 14px 14px; font-size: 16px; min-height: 54px; border-radius: 11px; }
    .input-icon { right: 14px; font-size: 15px; }
    .form-group select { background-position: left 14px center; padding-left: 40px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .submit-facility-btn { padding: 17px 24px; font-size: 15px; margin-top: 8px; min-height: 56px; }
    .form-footer-note { font-size: 10px; margin-top: 14px; padding-top: 14px; flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
    .add-facility-modal { padding: 36px 18px 24px; }
    .modal-header-icon { width: 50px; height: 50px; font-size: 18px; }
    .modal-header h3 { font-size: 16px; }
    .form-group input,
    .form-group select { font-size: 15px; min-height: 50px; }
    .submit-facility-btn { font-size: 14px; padding: 15px 20px; }
}

@media (max-height: 600px) and (max-width: 900px) {
    .add-facility-modal { max-height: 95dvh; padding-top: 32px; }
    .modal-header-icon { width: 44px; height: 44px; font-size: 16px; margin-bottom: 10px; }
    .modal-header h3 { font-size: 16px; margin-bottom: 4px; }
    .modal-header p { font-size: 11px; }
    .form-group { margin-bottom: 12px; }
    .form-group input,
    .form-group select { min-height: 46px; padding-top: 11px; padding-bottom: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .add-facility-modal,
    .modal-close-btn,
    .submit-facility-btn {
        transition-duration: 0.01ms !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   📞 نموذج "اتصل بنا"
   ═══════════════════════════════════════════════════════════════════ */
.contact-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.2rem;
}

.contact-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-required {
    color: var(--danger);
    font-size: 0.9rem;
}

.contact-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--fg);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.contact-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.contact-input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.contact-select-wrapper {
    position: relative;
    width: 100%;
}

.contact-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-left: 40px;
}

.contact-select-arrow {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.contact-select-wrapper:hover .contact-select-arrow { color: var(--accent); }

html.dark .contact-input {
    background-color: var(--bg-deep) !important;
    border-color: var(--border) !important;
    color: var(--fg) !important;
}

html.dark .contact-input:focus {
    background-color: var(--card) !important;
    border-color: var(--accent) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🖨️ نظام طباعة الروشتات
   ═══════════════════════════════════════════════════════════════════ */
#rxPrintWindow {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: linear-gradient(135deg, #0a1f1a 0%, #052E22 100%);
    padding: 30px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

#rxPrintWindow .toolbar {
    max-width: 800px;
    width: 100%;
    margin: 0 auto 25px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

#rxPrintWindow .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 14px;
    border: none;
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#rxPrintWindow .btn-primary {
    background: linear-gradient(135deg, #C4962C 0%, #F0D77B 100%);
    color: #052E22;
}

#rxPrintWindow .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(196, 150, 44, 0.5);
}

#rxPrintWindow .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

#rxPrintWindow .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

#rxPrintWindow .paper {
    max-width: 800px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(196, 150, 44, 0.15);
    position: relative;
}

#rxPrintWindow .paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0E7C5F, #C4962C, #F0D77B, #C4962C, #0E7C5F);
    z-index: 2;
}

#rxPrintWindow .header {
    background: linear-gradient(135deg, #052E22 0%, #0E7C5F 100%);
    color: white;
    padding: 32px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#rxPrintWindow .header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(196, 150, 44, 0.25), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#rxPrintWindow .header::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#rxPrintWindow .doctor-info {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
}

#rxPrintWindow .doctor-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #052E22;
    box-shadow: 0 8px 24px rgba(196, 150, 44, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#rxPrintWindow .doctor-text h1 {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

#rxPrintWindow .doctor-text p {
    margin: 0;
    opacity: 0.85;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

#rxPrintWindow .doctor-text p i {
    color: #F0D77B;
    font-size: 12px;
}

#rxPrintWindow .header-brand {
    position: relative;
    z-index: 2;
    text-align: left;
}

#rxPrintWindow .brand-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, #F0D77B, #C4962C);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

#rxPrintWindow .brand-date {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 600;
}

#rxPrintWindow .patient-section {
    background: linear-gradient(135deg, #F8FAF9 0%, #F0F4F2 100%);
    padding: 22px 40px;
    border-bottom: 1px solid #E5EAE7;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

#rxPrintWindow .patient-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#rxPrintWindow .patient-label {
    font-size: 11px;
    color: #7A8B7A;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#rxPrintWindow .patient-label i {
    color: #0E7C5F;
    font-size: 10px;
}

#rxPrintWindow .patient-value {
    font-size: 15px;
    color: #1B2A1B;
    font-weight: 800;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

#rxPrintWindow .content {
    padding: 30px 40px 20px;
    min-height: 320px;
    position: relative;
}

#rxPrintWindow .content::before {
    content: 'Rx';
    position: absolute;
    top: 10px;
    left: 30px;
    font-family: 'Outfit', serif;
    font-size: 140px;
    font-weight: 800;
    color: #F0EDE6;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

#rxPrintWindow .med-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

#rxPrintWindow .med-list li {
    padding: 16px 18px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #F8FAF9 0%, #F0F4F2 100%);
    border-radius: 14px;
    border-right: 4px solid #0E7C5F;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s;
}

#rxPrintWindow .med-list li:hover {
    background: linear-gradient(135deg, #F0F4F2 0%, #E8F0EC 100%);
    transform: translateX(-3px);
}

#rxPrintWindow .num-circle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0E7C5F, #095E47);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(14, 124, 95, 0.25);
    font-family: 'Outfit', sans-serif;
}

#rxPrintWindow .med-name {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-weight: 800;
    color: #1B2A1B;
    font-size: 16px;
    min-width: 140px;
}

#rxPrintWindow .med-dose {
    color: #4A5A4A;
    font-size: 14.5px;
    font-weight: 600;
    margin-right: auto;
    padding-right: 8px;
}

#rxPrintWindow .notes-box {
    margin-top: 22px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-right: 5px solid #F59E0B;
    border-radius: 14px;
    font-size: 14.5px;
    color: #854D0E;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

#rxPrintWindow .notes-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

#rxPrintWindow .notes-content b {
    display: block;
    color: #713F12;
    font-family: 'Noto Kufi Arabic', sans-serif;
    margin-bottom: 4px;
    font-size: 13px;
}

#rxPrintWindow .footer {
    padding: 22px 40px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    border-top: 2px dashed #E5EAE7;
    margin-top: 20px;
}

#rxPrintWindow .verification-block {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

#rxPrintWindow .qr-container {
    width: 90px;
    height: 90px;
    background: white;
    padding: 6px;
    border: 2px solid #0E7C5F;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(14, 124, 95, 0.15);
    position: relative;
}

#rxPrintWindow .qr-container::after {
    content: 'امسح للتحقق';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #7A8B7A;
    white-space: nowrap;
    font-weight: 700;
}

#rxPrintWindow .qr-container img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

#rxPrintWindow .ver-code {
    font-family: 'Courier New', monospace;
    background: #F8FAF9;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    color: #0E7C5F;
    border: 1.5px dashed #A7D5C2;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#rxPrintWindow .signature {
    text-align: center;
    min-width: 200px;
}

#rxPrintWindow .signature-line {
    border-top: 2px solid #1B2A1B;
    padding-top: 10px;
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-weight: 800;
    color: #1B2A1B;
    font-size: 14px;
    position: relative;
}

#rxPrintWindow .signature-line::before {
    content: '\f304';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    color: #0E7C5F;
    font-size: 14px;
    background: white;
    padding: 0 8px;
}

@media print {
    #rxPrintWindow {
        background: white;
        padding: 0;
        display: block;
    }

    #rxPrintWindow .toolbar { display: none !important; }

    #rxPrintWindow .paper {
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
        margin: 0;
    }

    #rxPrintWindow .header,
    #rxPrintWindow .patient-section,
    #rxPrintWindow .med-list li,
    #rxPrintWindow .num-circle,
    #rxPrintWindow .notes-box,
    #rxPrintWindow .notes-icon,
    #rxPrintWindow .paper::before {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        size: A4;
        margin: 10mm;
    }
}

@media (max-width: 640px) {
    #rxPrintWindow .header { padding: 24px 24px; flex-direction: column; text-align: center; gap: 16px; }
    #rxPrintWindow .doctor-info { flex-direction: column; gap: 12px; }
    #rxPrintWindow .header-brand { text-align: center; }
    #rxPrintWindow .patient-section { padding: 18px 24px; grid-template-columns: 1fr; gap: 12px; }
    #rxPrintWindow .content { padding: 24px 24px 15px; }
    #rxPrintWindow .content::before { font-size: 100px; top: 5px; left: 15px; }
    #rxPrintWindow .footer { padding: 18px 24px 28px; flex-direction: column; align-items: stretch; gap: 20px; }
    #rxPrintWindow .signature { min-width: auto; }
    #rxPrintWindow .med-list li { flex-wrap: wrap; }
    #rxPrintWindow .med-dose { margin-right: 0; padding-right: 0; padding-top: 6px; width: 100%; }
}


/* ═══════════════════════════════════════════════════════════════════
   🌓 مبدّل الوضع الليلي (Theme Toggle)
   ═══════════════════════════════════════════════════════════════════ */
.theme-compact {
    position: relative;
    width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.5s ease, border-color 0.5s ease;
    overflow: visible;
    isolation: isolate;
}

html.dark .theme-compact {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-compact-canvas {
    position: absolute;
    inset: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    pointer-events: none;
    z-index: 1;
}

.theme-compact-ring {
    position: relative;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.5s ease, background 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    outline: none;
}

.theme-compact-ring:focus-visible {
    box-shadow: 0 0 0 2px rgba(196, 150, 44, 0.5);
}

.theme-compact-ring svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-compact-light { color: rgba(255, 255, 255, 0.7); }

html.dark .theme-compact-light {
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.5);
}

html:not(.dark) .theme-compact-light {
    background: linear-gradient(145deg, #C4962C, #F0D77B);
    color: #052E22;
    box-shadow: 0 2px 8px rgba(196, 150, 44, 0.4), 0 0 0 1px rgba(240, 215, 123, 0.4), 0 0 16px rgba(196, 150, 44, 0.3);
    transform: scale(1.05);
}

html:not(.dark) .theme-compact-light svg {
    filter: drop-shadow(0 0 3px rgba(240, 215, 123, 0.7));
    stroke: #052E22;
}

.theme-compact-dark { color: rgba(255, 255, 255, 0.7); }
html:not(.dark) .theme-compact-dark { opacity: 0.5; }

html.dark .theme-compact-dark {
    background: linear-gradient(145deg, #C4962C, #F0D77B);
    color: #052E22;
    box-shadow: 0 2px 8px rgba(196, 150, 44, 0.4), 0 0 0 1px rgba(240, 215, 123, 0.4), 0 0 16px rgba(196, 150, 44, 0.3);
    transform: scale(1.05);
}

html.dark .theme-compact-dark svg {
    filter: drop-shadow(0 0 3px rgba(240, 215, 123, 0.7));
    stroke: #052E22;
}

.theme-compact-ring:hover { transform: scale(1.12); }
.theme-compact-ring:active { transform: scale(0.92); }
html:not(.dark) .theme-compact-light:hover { transform: scale(1.12); }
html.dark .theme-compact-dark:hover { transform: scale(1.12); }

.theme-compact-ring.pulse {
    animation: compactRingPulse 0.7s ease;
}

@keyframes compactRingPulse {
    0% { transform: scale(1.05); }
    40% { transform: scale(1.3); }
    100% { transform: scale(1.05); }
}

@media (max-width: 640px) {
    .theme-compact { width: 86px; height: 36px; padding: 2px; }
    .theme-compact-ring { width: 28px; height: 28px; }
    .theme-compact-ring svg { width: 15px; height: 15px; }
}

@media (max-width: 380px) {
    .theme-compact { width: 78px; height: 32px; }
    .theme-compact-ring { width: 26px; height: 26px; }
    .theme-compact-ring svg { width: 13px; height: 13px; }
}


/* ═══════════════════════════════════════════════════════════════════
   🌟 شعار LomedX في Hero
   ═══════════════════════════════════════════════════════════════════ */
.lomedx-brand-hero {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: 0.08em;
    margin: 1.5rem 0 2rem 0;
    display: inline-block;
    position: relative;
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 50%, #0E7C5F 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shimmerGoldHero 4s linear infinite;
    filter: drop-shadow(0 0 15px rgba(196, 150, 44, 0.35)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

html.dark .lomedx-brand-hero {
    background: linear-gradient(135deg, #f8d674 0%, #F0D77B 50%, #10B981 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lomedx-brand-hero::after {
    content: 'LomedX';
    position: absolute;
    inset: 0;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(20px);
    opacity: 0.5;
    animation: pulseGlowHero 3s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes shimmerGoldHero { to { background-position: -200% center; } }

@keyframes pulseGlowHero {
    0%, 100% { opacity: 0.3; filter: blur(15px); }
    50% { opacity: 0.6; filter: blur(25px); }
}

@media (max-width: 640px) {
    .lomedx-brand-hero { font-size: 2rem; letter-spacing: 0.06em; }
}

@media (max-width: 380px) {
    .lomedx-brand-hero { font-size: 1.75rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   🌙 لوحة إدارة المناوبات
   ═══════════════════════════════════════════════════════════════════ */
#dutyRosterPanel {
    padding: 10px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

#dutyRosterPanel .duty-card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

#dutyRosterPanel .duty-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

#dutyRosterPanel .duty-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #EFF6FF;
    color: #1E3A5F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

#dutyRosterPanel .duty-header h3 {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1E3A5F;
}

#dutyRosterPanel .filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

@media (max-width: 768px) {
    #dutyRosterPanel .filter-grid { grid-template-columns: 1fr; }
}

#dutyRosterPanel .form-label {
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#dutyRosterPanel .form-input,
#dutyRosterPanel .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s;
}

#dutyRosterPanel .form-input:focus,
#dutyRosterPanel .form-select:focus {
    outline: none;
    border-color: #0891B2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

#dutyRosterPanel .btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

#dutyRosterPanel .btn-primary { background: #1E3A5F; color: white; }
#dutyRosterPanel .btn-success { background: #059669; color: white; }
#dutyRosterPanel .btn-danger { background: #DC2626; color: white; }
#dutyRosterPanel .btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }

#dutyRosterPanel .actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    #dutyRosterPanel .actions-grid { grid-template-columns: repeat(2, 1fr); }
}

#dutyRosterPanel .action-btn {
    padding: 16px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#dutyRosterPanel .action-btn i { font-size: 1.3rem; margin-bottom: 2px; }

#dutyRosterPanel .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #0891B2;
}

#dutyRosterPanel .action-btn-excel { color: #059669; }
#dutyRosterPanel .action-btn-export { color: #2563EB; }
#dutyRosterPanel .action-btn-print { color: var(--muted); }

#dutyRosterPanel .duty-table-wrapper {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    scrollbar-width: thin;
}

#dutyRosterPanel .duty-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#dutyRosterPanel .duty-table thead { background: #1E3A5F; color: white; }

#dutyRosterPanel .duty-table th {
    padding: 12px 14px;
    text-align: right;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#dutyRosterPanel .duty-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

#dutyRosterPanel .duty-table tbody tr:last-child { border-bottom: none; }
#dutyRosterPanel .duty-table tbody tr:hover { background: #F8FAFC; }
#dutyRosterPanel .duty-table td { padding: 12px 14px; vertical-align: middle; }

#dutyRosterPanel .col-date { font-family: 'IBM Plex Sans Arabic', sans-serif; white-space: nowrap; }
#dutyRosterPanel .date-day { font-weight: 900; color: #1E3A5F; font-size: 1rem; }
#dutyRosterPanel .date-month { font-size: 0.7rem; color: var(--muted); display: block; }
#dutyRosterPanel .col-pharmacy { font-family: 'Noto Kufi Arabic', sans-serif; font-weight: 800; color: var(--text); }
#dutyRosterPanel .col-phone { font-family: 'Courier New', monospace; font-weight: 700; color: #0E7490; direction: ltr; text-align: right; }
#dutyRosterPanel .col-actions { text-align: center; width: 100px; }

#dutyRosterPanel .row-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-size: 0.75rem;
}

#dutyRosterPanel .row-btn-del { color: #DC2626; }
#dutyRosterPanel .row-btn-del:hover { background: #DC2626; color: white; border-color: #DC2626; }

#dutyRosterPanel .empty-state { text-align: center; padding: 60px 20px; }

#dutyRosterPanel .empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

#dutyRosterPanel .drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card);
}

#dutyRosterPanel .drop-zone:hover { border-color: #0891B2; background: #F0FDFF; }
#dutyRosterPanel .drop-zone-icon { font-size: 2.5rem; color: var(--muted); margin-bottom: 12px; }

/* شارات المناوبة */
.badge-duty-today {
    background: #10B981 !important;
    color: white !important;
    animation: pulse-duty 2s infinite;
}

@keyframes pulse-duty {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

#dutyRosterPanel .badge-midnight {
    display: inline-block;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #78350F;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #FCD34D;
    white-space: nowrap;
}

#dutyRosterPanel .badge-normal {
    display: inline-block;
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: #1E40AF;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #93C5FD;
    white-space: nowrap;
}

/* الوضع الليلي للوحة المناوبات */
html.dark #dutyRosterPanel .duty-card { background: var(--card); border-color: var(--border); }
html.dark #dutyRosterPanel .duty-header-icon { background: rgba(30, 58, 95, 0.3); color: #7DD3FC; }
html.dark #dutyRosterPanel .duty-header h3 { color: #7DD3FC; }
html.dark #dutyRosterPanel .duty-header { border-bottom-color: var(--border); }
html.dark #dutyRosterPanel .form-input,
html.dark #dutyRosterPanel .form-select { background: var(--bg-deep); color: var(--fg); border-color: var(--border); }
html.dark #dutyRosterPanel .duty-table thead { background: #0F172A; }
html.dark #dutyRosterPanel .duty-table tbody tr:hover { background: var(--bg-deep); }
html.dark #dutyRosterPanel .date-day { color: #7DD3FC; }
html.dark #dutyRosterPanel .col-phone { color: #67E8F9; }
html.dark #dutyRosterPanel .action-btn { background: var(--card); border-color: var(--border); color: var(--fg); }
html.dark #dutyRosterPanel .drop-zone { background: var(--card); border-color: var(--border); }
html.dark #dutyRosterPanel .drop-zone:hover { background: rgba(8, 145, 178, 0.1); border-color: #0891B2; }
html.dark #dutyRosterPanel .row-btn { background: var(--card); border-color: var(--border); }
html.dark #dutyRosterPanel .empty-state-icon { background: rgba(30, 41, 59, 0.5); }
html.dark #dutyRosterPanel .badge-midnight { background: linear-gradient(135deg, #422006, #713F12); color: #FDE68A; border-color: #B45309; }
html.dark #dutyRosterPanel .badge-normal { background: linear-gradient(135deg, #1E3A8A, #1E40AF); color: #BFDBFE; border-color: #3B82F6; }
html.dark .badge-duty-today { background: #059669 !important; color: #FFFFFF !important; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }

/* شارات حالة المناوبة */
.badge-duty-active {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: #FFFFFF !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3) !important;
    animation: pulse-duty-active 2s ease-in-out infinite !important;
    white-space: nowrap !important;
}

@keyframes pulse-duty-active {
    0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); transform: scale(1.03); }
}

.duty-pulse-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 0 8px #FFFFFF;
    animation: dot-blink 1s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.badge-duty-upcoming {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    color: #FFFFFF !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
    white-space: nowrap !important;
}

.badge-duty-ended {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: linear-gradient(135deg, #64748B 0%, #475569 100%) !important;
    color: #FFFFFF !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    border: none !important;
    white-space: nowrap !important;
    opacity: 0.9;
}

html.dark .badge-duty-active { background: linear-gradient(135deg, #059669 0%, #047857 100%) !important; }
html.dark .badge-duty-upcoming { background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important; }
html.dark .badge-duty-ended { background: linear-gradient(135deg, #475569 0%, #334155 100%) !important; }


/* ═══════════════════════════════════════════════════════════════════
   🌙 زر بوابة المناوبات
   ═══════════════════════════════════════════════════════════════════ */
.duty-portal-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(196, 150, 44, 0.05) 0%, rgba(196, 150, 44, 0.15) 100%);
    border: 1px solid rgba(196, 150, 44, 0.5);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(240, 215, 123, 0.2);
    color: #FFFFFF;
    cursor: pointer;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    text-align: right;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.duty-portal-bar::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(240, 215, 123, 0.15) 50%, transparent 100%);
    z-index: -1;
    animation: dutyBarShine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes dutyBarShine {
    0%, 100% { right: -100%; }
    50% { right: 100%; }
}

.duty-portal-bar:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(196, 150, 44, 0.15) 0%, rgba(196, 150, 44, 0.3) 100%);
    border-color: #F0D77B;
    box-shadow: 0 8px 20px rgba(196, 150, 44, 0.2), inset 0 1px 0 rgba(240, 215, 123, 0.4);
}

.duty-portal-bar:hover .duty-portal-bar-icon {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 0 15px rgba(240, 215, 123, 0.5);
}

.duty-portal-bar:hover .duty-portal-bar-arrow {
    transform: translateX(-5px);
    color: #F0D77B;
}

.duty-portal-bar:active { transform: translateY(0) scale(0.99); }

.duty-portal-bar-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(196, 150, 44, 0.15) 0%, rgba(196, 150, 44, 0.3) 100%);
    border: 1px solid rgba(240, 215, 123, 0.4);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(240, 215, 123, 0.3);
}

.duty-portal-bar-icon i {
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 4px rgba(240, 215, 123, 0.4));
}

.duty-portal-bar-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.duty-portal-bar-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.duty-portal-bar-subtitle {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.3;
}

.duty-portal-bar-arrow {
    font-size: 0.75rem;
    color: rgba(240, 215, 123, 0.4);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

@media (max-width: 380px) {
    .duty-portal-bar { padding: 10px 12px; gap: 10px; }
    .duty-portal-bar-icon { width: 36px; height: 36px; font-size: 0.9rem; }
    .duty-portal-bar-title { font-size: 0.8rem; }
    .duty-portal-bar-subtitle { font-size: 0.62rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   🤖 المساعد الذكي (AI Chat)
   ═══════════════════════════════════════════════════════════════════ */
.ai-message.ai-user {
    align-self: flex-end;
    background: #0E7C5F;
    color: white;
    padding: 10px 15px;
    border-radius: 15px;
    border-top-left-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 85%;
}

.ai-typing {
    display: flex;
    gap: 4px;
    padding: 12px 15px;
    background: white;
    border-radius: 15px;
    border-top-right-radius: 4px;
    width: fit-content;
    border: 1px solid #DDE3DD;
}

.ai-typing span {
    width: 6px;
    height: 6px;
    background: #7A8B7A;
    border-radius: 50%;
    animation: ai-bounce 1.4s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.ai-title-typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3.5s steps(30, end), blink-caret 0.75s step-end infinite;
    font-weight: 900;
    color: #F0D77B;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #F0D77B; }
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: #0E7C5F;
    margin-right: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {
    50% { opacity: 0; }
}


/* ═══════════════════════════════════════════════════════════════════
   📸 إعلان "البطاقة الحية" (Live Card Ad)
   ═══════════════════════════════════════════════════════════════════ */
.live-card-ad {
    background: linear-gradient(135deg, #021410 0%, #052E22 100%);
    border: 2px solid #C4962C;
    border-radius: 16px;
    padding: 18px 20px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(196, 150, 44, 0.15), inset 0 0 20px rgba(196, 150, 44, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.lc-ad-left {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.lc-ad-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #F0D77B 0%, #C4962C 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #021410;
    box-shadow: 0 8px 20px rgba(196, 150, 44, 0.4);
    flex-shrink: 0;
}

.lc-ad-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 17px;
    font-weight: 900;
    margin: 0 0 5px 0;
    color: #F0D77B;
    line-height: 1.4;
}

.lc-ad-desc {
    font-size: 12px;
    color: #8EA8A1;
    margin: 0;
    font-weight: 600;
    line-height: 1.6;
}

.lc-ad-tag {
    background: rgba(196, 150, 44, 0.15);
    border: 1px solid rgba(196, 150, 44, 0.4);
    color: #F0D77B;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .live-card-ad { flex-direction: column; text-align: center; padding: 18px 16px; }
    .lc-ad-left { flex-direction: column; gap: 12px; }
    .lc-ad-title { font-size: 15px; }
    .lc-ad-desc { font-size: 11px; }
}


/* ═══════════════════════════════════════════════════════════════════
   🏙️ شريط تحديد المدينة (City Banner)
   ═══════════════════════════════════════════════════════════════════ */
#cityBanner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 560px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    z-index: 9997;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: cityBannerSlideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: rtl;
    backdrop-filter: blur(12px);
}

#cityBanner.hiding {
    animation: cityBannerSlideDown 0.35s ease forwards;
}

@keyframes cityBannerSlideUp {
    from { transform: translateY(120%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes cityBannerSlideDown {
    to { transform: translateY(120%); opacity: 0; }
}

.city-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.city-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(14, 124, 95, 0.3);
}

.city-banner-text { min-width: 0; }

.city-banner-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--fg);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-banner-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.city-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.city-banner-select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    min-width: 100px;
    transition: border-color 0.2s;
}

.city-banner-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 124, 95, 0.12);
}

.city-banner-confirm {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.city-banner-confirm:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.city-banner-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.city-banner-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

@media (max-width: 640px) {
    #cityBanner {
        bottom: 16px;
        left: 12px;
        right: 12px;
        padding: 12px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .city-banner-actions { justify-content: space-between; }
    .city-banner-select { flex: 1; min-width: 0; }
    .city-banner-title { white-space: normal; }
}

html.dark #cityBanner {
    background: var(--card);
    border-color: var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

html.dark .city-banner-select { background: var(--bg-deep); }


/* ═══════════════════════════════════════════════════════════════════
   🎬 نهاية الملف
   ═══════════════════════════════════════════════════════════════════ */
