/* =========================
   (1) ستايلاتك الحالية — أبقيناها كما هي
   ========================= */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2a5298;
    --secondary: #4e73df;
    --accent: #1cc88a;
    --light: #f8f9fc;
    --dark: #5a5c69;
    --danger: #e74a3b;
    --warning: #f6c23e;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}
body {
    background-color: #f5f7fb;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}
body-index {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: #f5f5f5;
    background: linear-gradient(135deg, #050d12 0%, #08121a 100%);
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden;
  }
  
  /* منطقة الـ Hero */
  #hero {
    position: relative;
    height: 100vh;
    text-align: center;
    overflow: hidden;
    /* طبقة شفافة خفيفة لمزج الخلفية */
    background: rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 0 60px rgba(0, 191, 165, 0.05);
  }
  
  /* عشان تضيف عمق خفيف عند التمرير */
  #hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 70%, rgba(0, 191, 165, 0.08), transparent 80%);
    pointer-events: none;
  }
  
  
.container {
    display: flex;
    min-height: 100vh;
}

.dt-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
  }
  

.modal {
    z-index: 2000 !important;
}

.dropdown-menu,
.dropdown-panel {
    z-index: 2000 !important;
    /* مهم جدًا: position: fixed أو absolute بيتم حسابه من أقرب parent position:relative */
    /* فخلي أي container رئيسي يكون position: relative */
}

.logo {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.menu {
    list-style: none;
    padding: 0 15px;
}

.menu-item {
    margin-bottom: 5px;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-link i {
    margin-left: 10px;
    font-size: 18px;
}

.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    direction: rtl;
  }
  .dropdown-item {
    text-align: right;
  }
  
/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    padding: 20px;
    transition: var(--transition);
}

.main-content-wrapper {
    /* يغطي كامل العرض، لكن يحترم الهيدر والفوتر */
    margin-top: 75px; /* نفس ارتفاع الهيدر */
    margin-bottom: 200px; /* احتياطي للفوتر (عدّله حسب ارتفاع فعلي) */
    min-height: calc(100vh - 275px); /* 75px header + 200px footer تقريبًا */
    padding: 0;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e3e6f0;
}

.page-title {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

/* بطاقات الإحصائيات */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--secondary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-card.primary { border-left-color: var(--primary); }
.stat-card.accent { border-left-color: var(--accent); }
.stat-card.warning { border-left-color: var(--warning); }

.stat-title {
    color: var(--dark);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-change {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-size: 14px;
}

.stat-change i {
    margin-left: 5px;
}

/* جدول العيادات */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.form-section {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.form-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e3e6f0;
}

.table th {
    background-color: #f8f9fc;
    color: var(--primary);
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fc;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status.active {
    background-color: rgba(28, 200, 138, 0.2);
    color: var(--accent);
}

.status.inactive {
    background-color: rgba(231, 74, 59, 0.2);
    color: var(--danger);
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #1e3a8a;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: #17a673;
}

.btn-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c53727;
}

/* نموذج الإضافة */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d3e2;
    border-radius: 6px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* محتوى الصفحات */
.page-content {
    display: block;
}

/* نموذج إضافة طبيب */
.doctor-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* تنبيهات */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.alert-success {
    background-color: rgba(28, 200, 138, 0.2);
    color: var(--accent);
    border-left: 4px solid var(--accent);
}

.alert-danger {
    background-color: rgba(231, 74, 59, 0.2);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

/* محتوى الصفحة الرئيسية (القديمة) */
.welcome-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.welcome-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.welcome-card h2 {
    color: var(--dt-text);
    margin-bottom: 20px;
    font-size: 28px;
}

.welcome-card p {
    color: #dbe2ff;
    margin-bottom: 30px;
    font-size: 18px;
}

/* ... (باقي أنماطك) ... */

/* =========================
   (2) Landing Page — Dark Mode (جديد)
   ========================= */
:root {
  --dt-bg-dark: #0a0f14;
  --dt-cyan: #00bfa5;
  --dt-text: #f5f5f5;
  --dt-card: #0c1318;
  --dt-glow: rgba(0,191,165,0.28);
}

/* نفعّل هذه الأنماط فقط عندما يضيف main.js كلاس .landing للـ body */
body.landing {
  background: var(--dt-bg-dark);
  color: var(--dt-text);
  overflow-x: hidden;
}

/* Preloader */
body.landing #preloader {
  position: fixed; inset: 0;
  background: var(--dt-bg-dark);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  z-index: 9999;
}
body.landing .preloader-logo { width: 100px; animation: dt-pulse 2s infinite alternate; }
@keyframes dt-pulse { from { opacity: 0.5; } to { opacity: 1; } }
body.landing .preloader-bar { width: 60%; height: 4px; background: var(--dt-cyan); margin-top: 10px; border-radius: 5px; }
body.landing .preloader-text { margin-top: 10px; font-size: 14px; color: #e0f7f4; }

/* Navbar */
body.landing .navbar {
  position: fixed; top:0; width:100%;
  background: rgba(10,15,20,0.7);
  backdrop-filter: blur(8px);
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 36px; z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.landing .logo { color: var(--dt-cyan); font-weight: 600; letter-spacing: .3px; }
body.landing .nav-actions { display:flex; gap:10px; }
body.landing .login-btn, body.landing .lang-btn {
  background: var(--dt-cyan); color: #052225;
  padding: 8px 14px; border-radius: 22px; border: none; cursor: pointer;
  transition: .3s;
}
body.landing .login-btn:hover, body.landing .lang-btn:hover { opacity: 0.85; }

/* Hero */
body.landing #hero { height: 100vh; position: relative; overflow: hidden; text-align: center; }
body.landing #bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
body.landing .hero-content {
  position: relative; z-index: 1; top: 50%; transform: translateY(-50%);
}
body.landing #heroTitle { font-size: 3rem; color: var(--dt-cyan); margin-bottom: 10px; }
body.landing #heroSubtitle, body.landing #heroSubtitleAr { font-size: 1.15rem; opacity: .9; margin-bottom: 16px; }
body.landing #exploreBtn {
  background: var(--dt-cyan); color: #052225; border: none; padding: 10px 22px; border-radius: 24px; cursor:pointer;
}

/* Features */
body.landing #features { padding: 100px 40px; text-align: center; background: var(--dt-card); }
body.landing #features h2 { color: var(--dt-text); font-weight: 600; }
body.landing .features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-top: 36px;
}
body.landing .feature-card {
  background: rgba(0,191,165,0.08);
  border: 1px solid rgba(0,191,165,0.22);
  border-radius: 12px; padding: 20px; transition: .3s;
}
body.landing .feature-card:hover { transform: translateY(-5px); box-shadow: 0 0 20px var(--dt-glow); }
body.landing .feature-card .icon { font-size: 32px; display:block; margin-bottom: 10px; }

/* Screens */
body.landing #screens { padding: 100px 40px; text-align: center; }
body.landing #screens h2 { color: var(--dt-text); font-weight: 600; }
body.landing .screens-slider { position: relative; max-width: 1000px; margin: 24px auto 0; min-height: 380px; }
body.landing .screens-slider img {
  position: absolute; top:0; left:50%; transform: translateX(-50%);
  width: 100%; max-width: 1000px; height: auto; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45); opacity: 0; transition: opacity 1s;
}

/* Footer */
body.landing .footer {
  background: var(--dt-bg-dark);
  padding: 60px 20px 30px;
  text-align: center;
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.05);
}
body.landing .footer-logo { width: 82px; opacity: .65; filter: drop-shadow(0 0 12px rgba(0,191,165,0.2)); }
body.landing .footer-text p { margin: 6px 0; font-size: 14px; opacity: .9; }
body.landing .footer-text a { color: var(--dt-cyan); text-decoration: none; }
body.landing .footer-qr {
  position: absolute; right: 20px; bottom: 14px; text-align: center;
}
body.landing .footer-qr img { width: 72px; opacity: .9; transition: .3s; border-radius: 8px; }
body.landing .footer-qr img:hover { transform: scale(1.05); box-shadow: 0 0 20px var(--dt-glow); }
body.landing .footer-qr small { display:block; color:#9fded6; margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
  body.landing .navbar { padding: 10px 16px; }
  body.landing #heroTitle { font-size: 2.2rem; }
  body.landing .screens-slider { min-height: 240px; }
}
/* ===== إصلاح Tabs في صفحة الصلاحيات ===== */

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    gap: 0.5rem;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 0.75rem 1.5rem;
    color: #495057 !important;  /* ⚠️ لون غامق */
    background-color: transparent;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1);
}

.nav-tabs .nav-link.active {
    color: #0d6efd !important;  /* ⚠️ أزرق واضح */
    background-color: #fff !important;
    border-bottom: 3px solid #0d6efd;
    font-weight: 600;
}

.nav-tabs .nav-link i {
    margin-left: 0.5rem;
    font-size: 1.1rem;
}