/* ==========================================================================
   جامع‌ترین و کامل‌ترین استایل تم تیره و متغیرهای اختصاصی - دبیرستان فرزانگان ۱
   Complete Dark Mode & CSS Variable Overrides - Farzanegan 1 High School
   ========================================================================== */

/* --------------------------------------------------------------------------
   ۱. بازنویسی متغیرهای عمومی CSS در حالت تم تیره (CSS Variables Overrides)
   -------------------------------------------------------------------------- */
html.dark-mode, 
body.dark-mode {
  /* متغیرهای پایه تم تیره */
  --bg-dark-primary: #0f172a;
  --bg-dark-secondary: #1e293b;
  --bg-dark-card: #182234;
  --text-dark-primary: #f8fafc;
  --text-dark-secondary: #94a3b8;
  --border-dark: #334155;
  --accent-glow: rgba(99, 102, 241, 0.4);

  /* بازنویسی متغیرهای بوت‌استرپ و قالب (Bootstrap & Template Vars) */
  --bs-body-bg: #0f172a !important;
  --bs-body-color: #f8fafc !important;
  --bs-dark: #f8fafc !important;
  --bs-light: #1e293b !important;
  --color-heading: #f8fafc !important;
  --color-paragraph: #cbd5e1 !important;
  --dark: #0f172a !important;
  
  /* بازنویسی متغیرهای گرادیان و رنگ‌های زمینه روشن */
  --bg-gray: #1e293b !important;
  --bg-gray-secondary: #182234 !important;
  --color-style-six: #182234 !important;
  --bg-gray-gradient: linear-gradient(90deg, #1e293b 30%, #0f172a 100%) !important;
  --bg-gray-gradient-secondary: linear-gradient(to left, #1e293b 0%, #0f172a 50%, #182234 100%) !important;

  /* اِعمال پس‌زمینه و رنگ متن اصلی */
  background-color: var(--bg-dark-primary) !important;
  background: #0f172a !important;
  color: var(--text-dark-primary) !important;
}

/* --------------------------------------------------------------------------
   ۲. اِعمال رنگ متن روی تمامی المان‌های متنی در تم تیره
   -------------------------------------------------------------------------- */
body.dark-mode p,
body.dark-mode span,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode li,
body.dark-mode label,
body.dark-mode dt,
body.dark-mode dd,
body.dark-mode td,
body.dark-mode th,
body.dark-mode div,
body.dark-mode b,
body.dark-mode strong,
body.dark-mode i,
body.dark-mode a:not(.btn):not(.support-toggle-btn):not(.badge) {
  color: var(--text-dark-primary);
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary,
body.dark-mode small,
body.dark-mode .sub-title {
  color: var(--text-dark-secondary) !important;
}

/* --------------------------------------------------------------------------
   ۳. خنثی‌سازی کامل کدهای استایل داخلی (Inline Styles & Background Gradients)
   -------------------------------------------------------------------------- */
body.dark-mode [style*="color: #444"],
body.dark-mode [style*="color:#444"],
body.dark-mode [style*="color: #333"],
body.dark-mode [style*="color:#333"],
body.dark-mode [style*="color: #222"],
body.dark-mode [style*="color:#222"],
body.dark-mode [style*="color: #555"],
body.dark-mode [style*="color:#555"],
body.dark-mode [style*="color: #666"],
body.dark-mode [style*="color:#666"],
body.dark-mode [style*="color: #000"],
body.dark-mode [style*="color:#000"],
body.dark-mode [style*="color: black"],
body.dark-mode [style*="color: #003366"],
body.dark-mode [style*="color:#003366"],
body.dark-mode [style*="color: #111"],
body.dark-mode [style*="color:#111"],
body.dark-mode [style*="color: #1e293b"],
body.dark-mode [style*="color: #2d3748"],
body.dark-mode [style*="color: #4a5568"] {
  color: #f8fafc !important;
}

body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background: #ffffff"],
body.dark-mode [style*="background:#ffffff"],
body.dark-mode [style*="background-color: #fff"],
body.dark-mode [style*="background-color:#fff"],
body.dark-mode [style*="background-color: #ffffff"],
body.dark-mode [style*="background-color:#ffffff"],
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background-color: white"],
body.dark-mode [style*="background-color: #f8f9fa"],
body.dark-mode [style*="background-color: #f4f6f9"],
body.dark-mode [style*="background-color: #eef2f5"],
body.dark-mode [style*="background-color: #fafafa"],
body.dark-mode [style*="background-color: #f9f9f9"],
body.dark-mode [style*="background: linear-gradient"] {
  background: var(--bg-dark-secondary) !important;
  background-color: var(--bg-dark-secondary) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode [style*="border: 1px solid #eee"],
body.dark-mode [style*="border:1px solid #eee"],
body.dark-mode [style*="border: 1px solid #ddd"],
body.dark-mode [style*="border:1px solid #ddd"],
body.dark-mode [style*="border: 1px solid #e2e8f0"],
body.dark-mode [style*="border-bottom: 1px solid #f0f0f0"],
body.dark-mode [style*="border-bottom: 1px solid #eee"] {
  border-color: var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۴. نوار بالایی سایت (Top Bar) و منوی ناوبری اصلی (Navbar)
   -------------------------------------------------------------------------- */
body.dark-mode .top-bar-area,
body.dark-mode .top-bar-style-one,
body.dark-mode .top-bar-area.bg-theme,
body.dark-mode .top-bar-area.bg-dark,
body.dark-mode .mobile-panel-bar {
  background-color: #0b1120 !important;
  background: #0b1120 !important;
  border-bottom: 1px solid var(--border-dark) !important;
}

body.dark-mode .top-bar-area a,
body.dark-mode .top-bar-area p,
body.dark-mode .top-bar-area span,
body.dark-mode .top-bar-area i,
body.dark-mode .top-bar-area li {
  color: #e2e8f0 !important;
}

body.dark-mode header nav.navbar,
body.dark-mode .validnavs,
body.dark-mode nav.navbar.validnavs,
body.dark-mode nav.navbar.navbar-fixed,
body.dark-mode .navbar-sticky.sticked {
  background-color: #0b1120 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode nav.navbar .nav > li > a,
body.dark-mode .validnavs ul.nav > li > a,
body.dark-mode .navbar-nav > li > a {
  color: #f8fafc !important;
}

body.dark-mode nav.navbar .nav > li > a:hover,
body.dark-mode .validnavs ul.nav > li > a:hover {
  color: #38bdf8 !important;
}

body.dark-mode .dropdown-menu,
body.dark-mode .megamenu-content {
  background-color: var(--bg-dark-secondary) !important;
  border-color: var(--border-dark) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .dropdown-menu > li > a,
body.dark-mode .megamenu-content a,
body.dark-mode .megamenu-content h1,
body.dark-mode .megamenu-content h2,
body.dark-mode .megamenu-content h3,
body.dark-mode .megamenu-content h4,
body.dark-mode .megamenu-content h5,
body.dark-mode .megamenu-content h6,
body.dark-mode .megamenu-content p,
body.dark-mode .megamenu-content span,
body.dark-mode .megamenu-content li {
  color: var(--text-dark-primary) !important;
}

body.dark-mode .dropdown-menu > li > a:hover,
body.dark-mode .megamenu-content a:hover {
  background-color: var(--bg-dark-card) !important;
  color: #38bdf8 !important;
}

/* --------------------------------------------------------------------------
   ۵. بخش بنر اصلی صفحه اول و کادرهای شناور دور بنر (Main Hero Banner Area)
   -------------------------------------------------------------------------- */
body.dark-mode .banner-style-seven-area,
body.dark-mode .theme-style-three .banner-style-seven-area,
body.dark-mode .banner-style-seven-area::after,
body.dark-mode .theme-style-three .banner-style-seven-area::after {
  background-color: #0b1120 !important;
  background: #0b1120 !important;
}

body.dark-mode .banner-round-shape::after,
body.dark-mode .theme-style-three .banner-round-shape::after,
body.dark-mode .banner-round-shape::before,
body.dark-mode .theme-style-three .banner-round-shape::before {
  box-shadow: 0 20px 0 0 #0b1120 !important;
}

/* --------------------------------------------------------------------------
   ۶. بخش دسترسی سریع و آسان (Quick Access / Features Grid)
   -------------------------------------------------------------------------- */
body.dark-mode .feature-style-one-area,
body.dark-mode .feature-style-one-item,
body.dark-mode .quick-access-area,
body.dark-mode .quick-link-box,
body.dark-mode .services-area,
body.dark-mode .service-style-one-item,
body.dark-mode .feature-style-two-area,
body.dark-mode .bg-gray-gradient-secondary {
  background-color: var(--bg-dark-card) !important;
  background: var(--bg-dark-card) !important;
  border: 1px solid var(--border-dark) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .feature-style-one-item h4,
body.dark-mode .feature-style-one-item p,
body.dark-mode .feature-style-one-item a,
body.dark-mode .feature-style-one-item i,
body.dark-mode .quick-link-box h5,
body.dark-mode .quick-link-box p {
  color: var(--text-dark-primary) !important;
}

/* --------------------------------------------------------------------------
   ۷. پنل‌های مدیریتی و کاربری (Dashboards & User Panels)
   -------------------------------------------------------------------------- */
body.dark-mode .dashboard-card,
body.dark-mode .sidebar-item,
body.dark-mode .profile-card,
body.dark-mode .stat-widget,
body.dark-mode .user-panel-box {
  background-color: var(--bg-dark-card) !important;
  background: var(--bg-dark-card) !important;
  border: 1px solid var(--border-dark) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .dashboard-card h1,
body.dark-mode .dashboard-card h2,
body.dark-mode .dashboard-card h3,
body.dark-mode .dashboard-card h4,
body.dark-mode .dashboard-card h5,
body.dark-mode .dashboard-card h6,
body.dark-mode .dashboard-card p,
body.dark-mode .dashboard-card span,
body.dark-mode .dashboard-card a:not(.btn),
body.dark-mode .sidebar-item h4,
body.dark-mode .sidebar-item h5,
body.dark-mode .sidebar-item p,
body.dark-mode .sidebar-item span {
  color: var(--text-dark-primary) !important;
}

/* --------------------------------------------------------------------------
   ۸. کارت‌ها، بخش‌ها، کتابخانه و اجزای مختلف سایت
   -------------------------------------------------------------------------- */
body.dark-mode .bg-light,
body.dark-mode .bg-gray,
body.dark-mode .breadcrumb-area,
body.dark-mode .default-padding,
body.dark-mode .blog-area,
body.dark-mode .category-style-one-area,
body.dark-mode .about-style-five-area,
body.dark-mode .course-style-one-carousel-area,
body.dark-mode .panel,
body.dark-mode .card,
body.dark-mode .bg-white,
body.dark-mode .site-heading,
body.dark-mode .home-blog-style-two-item,
body.dark-mode .course-style-one-item,
body.dark-mode .category-style-one-item,
body.dark-mode .single-item,
body.dark-mode .info-box,
body.dark-mode .fun-factor-area,
body.dark-mode .book-card,
body.dark-mode .membership-card,
body.dark-mode .stats-card,
body.dark-mode .list-group-item,
body.dark-mode .modal-content,
body.dark-mode .well {
  background-color: var(--bg-dark-secondary) !important;
  color: var(--text-dark-primary) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .home-blog-style-two-item,
body.dark-mode .course-style-one-item,
body.dark-mode .category-style-one-item,
body.dark-mode .card,
body.dark-mode .box-item,
body.dark-mode .book-card,
body.dark-mode .membership-card,
body.dark-mode .stats-card {
  background: var(--bg-dark-card) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۹. پاپ‌آپ پشتیبانی شناور (Support Panel Widget)
   -------------------------------------------------------------------------- */
body.dark-mode .support-panel {
  background: var(--bg-dark-secondary) !important;
  border: 1px solid var(--border-dark) !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .support-option {
  border-bottom-color: var(--border-dark) !important;
}

body.dark-mode .support-option:hover {
  background-color: var(--bg-dark-card) !important;
}

body.dark-mode .support-option strong,
body.dark-mode .support-option span {
  color: var(--text-dark-primary) !important;
}

/* --------------------------------------------------------------------------
   ۱۰. جامع‌ترین استایل پس‌زمینه فرم‌ها، فیلدها و جدول‌ها (Forms & Data Controls)
   -------------------------------------------------------------------------- */
/* پس‌زمینه کلی فرم‌ها و باکس‌های فرم (Login, Signup, Contact, Edit Forms) */
body.dark-mode form,
body.dark-mode .form-box,
body.dark-mode .register-form,
body.dark-mode .contact-form,
body.dark-mode .form-area,
body.dark-mode .form-wrapper,
body.dark-mode .account-form,
body.dark-mode .app-form {
  background-color: var(--bg-dark-card) !important;
  background: var(--bg-dark-card) !important;
  border-color: var(--border-dark) !important;
  color: var(--text-dark-primary) !important;
}

/* پس‌زمینه فیلدهای ورودی (Inputs, Textarea, Selects, Input Groups) */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text,
body.dark-mode .custom-select {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid var(--border-dark) !important;
}

/* وضعیت فوکوس (Focus state) فیلدها */
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus,
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background-color: #0b1120 !important;
  color: #ffffff !important;
  border-color: #E1768D !important;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.3) !important;
}

/* گزینه‌های منوی کشویی (Select Options) */
body.dark-mode select option,
body.dark-mode .form-select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

/* متن راهنما و Placeholder در فرم‌ها */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode .form-control::placeholder {
  color: var(--text-dark-secondary) !important;
  opacity: 0.8;
}

/* لیبل‌ها، چک‌باکس‌ها و رادیوباتن‌ها */
body.dark-mode label,
body.dark-mode .form-label,
body.dark-mode .form-check-label {
  color: var(--text-dark-primary) !important;
}

body.dark-mode .form-check-input {
  background-color: #0f172a !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .form-check-input:checked {
  background-color: #E1768D !important;
  border-color: #E1768D !important;
}

/* فیلدهای غیرفعال (Disabled inputs) */
body.dark-mode input:disabled,
body.dark-mode textarea:disabled,
body.dark-mode select:disabled,
body.dark-mode .form-control:disabled {
  background-color: #1e293b !important;
  color: var(--text-dark-secondary) !important;
  opacity: 0.6;
}

/* جدول‌های داده (Tables) */
body.dark-mode .table {
  color: var(--text-dark-primary) !important;
  background-color: var(--bg-dark-secondary) !important;
}

body.dark-mode .table tr,
body.dark-mode .table td,
body.dark-mode .table th {
  border-color: var(--border-dark) !important;
  color: var(--text-dark-primary) !important;
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--bg-dark-card) !important;
}

/* --------------------------------------------------------------------------
   ۱۱. یکپارچه‌سازی کامل رنگ فوتر و بخش پایانی سایت (Unified Footer Area)
   -------------------------------------------------------------------------- */
body.dark-mode footer,
body.dark-mode .footer-area,
body.dark-mode .footer-style-two,
body.dark-mode .footer-style-two .f-items,
body.dark-mode .footer-bottom,
body.dark-mode .footer-bottom.style-two,
body.dark-mode .footer-item,
body.dark-mode .f-item {
  background-color: #0b1120 !important;
  background: #0b1120 !important;
  color: var(--text-dark-secondary) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode footer p,
body.dark-mode footer span,
body.dark-mode footer a,
body.dark-mode footer h4,
body.dark-mode footer h5,
body.dark-mode footer li,
body.dark-mode footer strong {
  color: #cbd5e1 !important;
}

body.dark-mode footer a:hover {
  color: #38bdf8 !important;
}

/* --------------------------------------------------------------------------
   ۱۲. دکمه‌ها و لینک‌ها (Buttons & Links)
   -------------------------------------------------------------------------- */


body.dark-mode .btn-theme,
body.dark-mode .btn-gradient {
  background: linear-gradient(135deg, #E1768D, #8b5cf6) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px var(--accent-glow) !important;
}

/* --------------------------------------------------------------------------
   ۱۳. دکمه شناور تعویض تم (Floating Theme Switcher Button)
   -------------------------------------------------------------------------- */
.theme-toggle-floating-btn {
  position: fixed;
  bottom: 95px;
  left: 25px;
  z-index: 99999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #890C25;
  color: #f59e0b;
  border: 2px solid #38bdf8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
}

.theme-toggle-floating-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.6);
}

body.dark-mode .theme-toggle-floating-btn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* --------------------------------------------------------------------------
   ۱۴. دکمه درون نوار بالایی هدر (Header Inline Toggle Button)
   -------------------------------------------------------------------------- */
.header-theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 10px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.header-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

body.dark-mode .header-theme-toggle {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

/* --------------------------------------------------------------------------
   ۱۵. اسکرول‌بار، انتخاب متن و لایه‌های عمومی (Scrollbar & Selection)
   -------------------------------------------------------------------------- */
body.dark-mode {
  scrollbar-color: #475569 #0f172a;
  scrollbar-width: thin;
}

body.dark-mode ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #0f172a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 6px;
  border: 2px solid #0f172a;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

body.dark-mode ::selection {
  background: rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

body.dark-mode hr,
body.dark-mode .divider,
body.dark-mode .separator {
  border-color: var(--border-dark) !important;
  opacity: 1;
}

body.dark-mode .overlay,
body.dark-mode .bg-overlay,
body.dark-mode .black-overlay {
  background: rgba(15, 23, 42, 0.75) !important;
}

/* --------------------------------------------------------------------------
   ۱۶. مسیر صفحه (Breadcrumb) و عنوان صفحات داخلی
   -------------------------------------------------------------------------- */
body.dark-mode .breadcrumb-area,
body.dark-mode .page-title-area,
body.dark-mode .page-heading,
body.dark-mode .sub-heading,
body.dark-mode .site-heading .title,
body.dark-mode .site-heading h2,
body.dark-mode .site-heading p {
  color: var(--text-dark-primary) !important;
}

body.dark-mode .breadcrumb,
body.dark-mode .breadcrumb-item,
body.dark-mode .breadcrumb-item a {
  color: var(--text-dark-secondary) !important;
}

body.dark-mode .breadcrumb-item.active {
  color: #e2e8f0 !important;
}

body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
  color: #64748b !important;
}

/* --------------------------------------------------------------------------
   ۱۷. هشدارها، نوتیفیکیشن و Toast (Alerts & Notifications)
   -------------------------------------------------------------------------- */
body.dark-mode .alert {
  border-color: var(--border-dark) !important;
  color: var(--text-dark-primary) !important;
}

body.dark-mode .alert-primary {
  background-color: rgba(99, 102, 241, 0.15) !important;
  border-color: #E1768D !important;
  color: #c7d2fe !important;
}

body.dark-mode .alert-success {
  background-color: rgba(34, 197, 94, 0.12) !important;
  border-color: #22c55e !important;
  color: #bbf7d0 !important;
}

body.dark-mode .alert-warning {
  background-color: rgba(245, 158, 11, 0.12) !important;
  border-color: #f59e0b !important;
  color: #fde68a !important;
}

body.dark-mode .alert-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border-color: #ef4444 !important;
  color: #fecaca !important;
}

body.dark-mode .alert-info {
  background-color: rgba(56, 189, 248, 0.12) !important;
  border-color: #38bdf8 !important;
  color: #bae6fd !important;
}

body.dark-mode .toast,
body.dark-mode .toast-header,
body.dark-mode .notification-item,
body.dark-mode .notice-box {
  background-color: var(--bg-dark-card) !important;
  color: var(--text-dark-primary) !important;
  border-color: var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۱۸. بج، برچسب و وضعیت (Badges & Status)
   -------------------------------------------------------------------------- */
body.dark-mode .badge {
  border: 1px solid transparent;
}

body.dark-mode .badge.bg-light,
body.dark-mode .badge.bg-white {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .badge.bg-secondary {
  background-color: #475569 !important;
  color: #f8fafc !important;
}

body.dark-mode .tag,
body.dark-mode .post-tags a,
body.dark-mode .course-meta span,
body.dark-mode .meta-item {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۱۹. تب، آکاردئون و Collapse (Tabs & Accordion)
   -------------------------------------------------------------------------- */
body.dark-mode .nav-tabs {
  border-bottom-color: var(--border-dark) !important;
}

body.dark-mode .nav-tabs .nav-link {
  color: var(--text-dark-secondary) !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.dark-mode .nav-tabs .nav-link:hover {
  color: #38bdf8 !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .nav-tabs .nav-link.active {
  color: #f8fafc !important;
  background-color: var(--bg-dark-card) !important;
  border-color: var(--border-dark) var(--border-dark) var(--bg-dark-card) !important;
}

body.dark-mode .nav-pills .nav-link {
  color: var(--text-dark-secondary) !important;
}

body.dark-mode .nav-pills .nav-link.active {
  background-color: #E1768D !important;
  color: #ffffff !important;
}

body.dark-mode .accordion-item,
body.dark-mode .accordion-button,
body.dark-mode .panel-group .panel,
body.dark-mode .panel-default > .panel-heading {
  background-color: var(--bg-dark-card) !important;
  color: var(--text-dark-primary) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .accordion-button:not(.collapsed) {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: inset 0 -1px 0 var(--border-dark) !important;
}

body.dark-mode .accordion-button::after {
  filter: invert(1) brightness(0.85);
}

body.dark-mode .accordion-body,
body.dark-mode .panel-body,
body.dark-mode .tab-content,
body.dark-mode .tab-pane {
  background-color: var(--bg-dark-secondary) !important;
  color: var(--text-dark-primary) !important;
  border-color: var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۲۰. صفحه‌بندی (Pagination)
   -------------------------------------------------------------------------- */
body.dark-mode .pagination .page-link {
  background-color: var(--bg-dark-card) !important;
  border-color: var(--border-dark) !important;
  color: var(--text-dark-primary) !important;
}

body.dark-mode .pagination .page-link:hover {
  background-color: #334155 !important;
  color: #38bdf8 !important;
}

body.dark-mode .pagination .page-item.active .page-link {
  background-color: #E1768D !important;
  border-color: #E1768D !important;
  color: #ffffff !important;
}

body.dark-mode .pagination .page-item.disabled .page-link {
  background-color: #1e293b !important;
  color: #64748b !important;
}

/* --------------------------------------------------------------------------
   ۲۱. مودال، پاپ‌اور و تولتیپ (Modal, Popover, Tooltip)
   -------------------------------------------------------------------------- */
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
  background-color: var(--bg-dark-card) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .modal-title,
body.dark-mode .modal-body,
body.dark-mode .modal-body p,
body.dark-mode .modal-body label {
  color: var(--text-dark-primary) !important;
}

body.dark-mode .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.8;
}

body.dark-mode .popover,
body.dark-mode .tooltip-inner {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid var(--border-dark);
}

body.dark-mode .popover-header {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-bottom-color: var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۲۲. منوی موبایل، آف‌کنواس و همبرگر (Mobile Nav & Offcanvas)
   -------------------------------------------------------------------------- */
body.dark-mode .navbar-toggle,
body.dark-mode .navbar-toggler {
  border-color: var(--border-dark) !important;
}

body.dark-mode .navbar-toggler-icon {
  filter: invert(1);
}

body.dark-mode .mobile-menu,
body.dark-mode .side-menu,
body.dark-mode .offcanvas,
body.dark-mode .offcanvas-header,
body.dark-mode .offcanvas-body,
body.dark-mode .navbar-collapse.collapse.in,
body.dark-mode .navbar-collapse.show {
  background-color: #0b1120 !important;
  color: var(--text-dark-primary) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .offcanvas .nav-link,
body.dark-mode .mobile-menu a,
body.dark-mode .side-menu a {
  color: #e2e8f0 !important;
}

body.dark-mode .offcanvas .nav-link:hover,
body.dark-mode .mobile-menu a:hover {
  color: #38bdf8 !important;
  background-color: var(--bg-dark-card) !important;
}

/* --------------------------------------------------------------------------
   ۲۳. اسلایدر، کاروسل و Owl/Swiper
   -------------------------------------------------------------------------- */
body.dark-mode .swiper,
body.dark-mode .owl-carousel,
body.dark-mode .carousel-inner,
body.dark-mode .carousel-item {
  background-color: transparent !important;
}

body.dark-mode .swiper-button-next,
body.dark-mode .swiper-button-prev,
body.dark-mode .owl-nav button,
body.dark-mode .carousel-control-prev-icon,
body.dark-mode .carousel-control-next-icon {
  filter: invert(1) brightness(1.2);
}

body.dark-mode .swiper-pagination-bullet {
  background: #64748b !important;
  opacity: 1;
}

body.dark-mode .swiper-pagination-bullet-active {
  background: #38bdf8 !important;
}

body.dark-mode .owl-dots .owl-dot span,
body.dark-mode .carousel-indicators [data-bs-target] {
  background-color: #64748b !important;
}

body.dark-mode .owl-dots .owl-dot.active span,
body.dark-mode .carousel-indicators .active {
  background-color: #38bdf8 !important;
}

/* --------------------------------------------------------------------------
   ۲۴. جستجو، فیلتر و سایدبار (Search, Filters, Widget Sidebar)
   -------------------------------------------------------------------------- */
body.dark-mode .search-box,
body.dark-mode .search-form,
body.dark-mode .widget,
body.dark-mode .sidebar-widget,
body.dark-mode .widget-title,
body.dark-mode .recent-post,
body.dark-mode .archive-list {
  background-color: var(--bg-dark-card) !important;
  border-color: var(--border-dark) !important;
  color: var(--text-dark-primary) !important;
}

body.dark-mode .widget-title h4,
body.dark-mode .widget h4,
body.dark-mode .sidebar-widget h4 {
  color: #f8fafc !important;
  border-bottom-color: var(--border-dark) !important;
}

body.dark-mode .search-box button,
body.dark-mode .search-form button {
  background-color: #E1768D !important;
  border-color: #E1768D !important;
  color: #ffffff !important;
}

body.dark-mode .filter-box,
body.dark-mode .sort-box,
body.dark-mode .toolbar {
  background-color: var(--bg-dark-secondary) !important;
  border: 1px solid var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۲۵. محتوای وبلاگ، نقل‌قول و نظرات (Blog, Blockquote, Comments)
   -------------------------------------------------------------------------- */
body.dark-mode .blog-item .content,
body.dark-mode .blog-details,
body.dark-mode .post-content,
body.dark-mode .article-content,
body.dark-mode .entry-content {
  color: var(--text-dark-primary) !important;
}

body.dark-mode .blog-meta,
body.dark-mode .post-meta,
body.dark-mode .author-meta {
  color: var(--text-dark-secondary) !important;
}

body.dark-mode blockquote,
body.dark-mode .blockquote {
  background-color: #1e293b !important;
  border-right: 4px solid #E1768D !important;
  color: #e2e8f0 !important;
}

body.dark-mode .comments-area,
body.dark-mode .comment-list,
body.dark-mode .comment-body,
body.dark-mode .comment-respond {
  background-color: var(--bg-dark-secondary) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .comment-author,
body.dark-mode .comment-metadata {
  color: var(--text-dark-secondary) !important;
}

/* --------------------------------------------------------------------------
   ۲۶. گالری، ویدیو و لایت‌باکس (Gallery & Media)
   -------------------------------------------------------------------------- */
body.dark-mode .gallery-item,
body.dark-mode .video-box,
body.dark-mode .plyr,
body.dark-mode .ratio {
  background-color: var(--bg-dark-card) !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .mfp-bg,
body.dark-mode .lg-backdrop {
  background: rgba(2, 6, 23, 0.92) !important;
}

body.dark-mode .mfp-counter,
body.dark-mode .lg-sub-html {
  color: #e2e8f0 !important;
}

/* --------------------------------------------------------------------------
   ۲۷. دکمه‌های ثانویه Bootstrap (Outline, Light, Link)
   -------------------------------------------------------------------------- */
body.dark-mode .btn-light,
body.dark-mode .btn-outline-light {
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

body.dark-mode .btn-dark {
  background-color: #E1768D !important;
  border-color: #E1768D !important;
  color: #ffffff !important;
}

body.dark-mode .btn-outline-dark,
body.dark-mode .btn-outline-secondary {
  color: #e2e8f0 !important;
  border-color: #64748b !important;
}

body.dark-mode .btn-outline-dark:hover,
body.dark-mode .btn-outline-secondary:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-link {
  color: #38bdf8 !important;
}

/* --------------------------------------------------------------------------
   ۲۸. Progress، Spinner و حالت بارگذاری (Loading States)
   -------------------------------------------------------------------------- */
body.dark-mode .progress {
  background-color: #1e293b !important;
}

body.dark-mode .progress-bar {
  background-color: #E1768D !important;
}

body.dark-mode .spinner-border,
body.dark-mode .spinner-grow {
  color: #38bdf8 !important;
}

body.dark-mode .preloader,
body.dark-mode #preloader,
body.dark-mode .loader-wrap {
  background-color: #0f172a !important;
}

body.dark-mode .skeleton,
body.dark-mode .placeholder {
  background-color: #1e293b !important;
}

/* --------------------------------------------------------------------------
   ۲۹. DataTables و جدول‌های پیشرفته (اگر استفاده می‌کنید)
   -------------------------------------------------------------------------- */
body.dark-mode .dataTables_wrapper,
body.dark-mode .dataTables_filter input,
body.dark-mode .dataTables_length select {
  color: var(--text-dark-primary) !important;
}

body.dark-mode table.dataTable thead th,
body.dark-mode table.dataTable tbody td {
  border-color: var(--border-dark) !important;
}

body.dark-mode table.dataTable.stripe tbody tr.odd,
body.dark-mode table.dataTable.display tbody tr.odd {
  background-color: var(--bg-dark-card) !important;
}

body.dark-mode .dataTables_info,
body.dark-mode .dataTables_paginate .paginate_button {
  color: var(--text-dark-secondary) !important;
}

body.dark-mode .dataTables_paginate .paginate_button.current {
  background: #E1768D !important;
  border-color: #E1768D !important;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   ۳۰. Select2 / Chosen / Datepicker (پلاگین‌های رایج فرم)
   -------------------------------------------------------------------------- */
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple,
body.dark-mode .chosen-container-single .chosen-single,
body.dark-mode .chosen-container-multi .chosen-choices {
  background-color: #0f172a !important;
  border-color: var(--border-dark) !important;
  color: #f8fafc !important;
}

body.dark-mode .select2-dropdown,
body.dark-mode .chosen-container .chosen-drop {
  background-color: #1e293b !important;
  border-color: var(--border-dark) !important;
}

body.dark-mode .select2-results__option--highlighted,
body.dark-mode .chosen-container .chosen-results li.highlighted {
  background-color: #E1768D !important;
  color: #ffffff !important;
}

body.dark-mode .datepicker,
body.dark-mode .datepicker-dropdown,
body.dark-mode .ui-datepicker {
  background-color: #1e293b !important;
  border-color: var(--border-dark) !important;
  color: #f8fafc !important;
}

body.dark-mode .datepicker table tr td.day:hover,
body.dark-mode .ui-datepicker-calendar td a:hover {
  background-color: #334155 !important;
}

/* --------------------------------------------------------------------------
   ۳۱. بخش‌های تم آموزشی (Testimonial, Team, FAQ, CTA, Subscribe)
   -------------------------------------------------------------------------- */
body.dark-mode .testimonial-style-one-item,
body.dark-mode .testimonial-item,
body.dark-mode .team-style-one-item,
body.dark-mode .team-item,
body.dark-mode .faq-style-one-item,
body.dark-mode .cta-area,
body.dark-mode .subscribe-box,
body.dark-mode .newsletter-area {
  background-color: var(--bg-dark-card) !important;
  border: 1px solid var(--border-dark) !important;
  color: var(--text-dark-primary) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .testimonial-style-one-item p,
body.dark-mode .team-style-one-item h4,
body.dark-mode .faq-style-one-item .question {
  color: var(--text-dark-primary) !important;
}

body.dark-mode .cta-area .btn,
body.dark-mode .subscribe-box .btn {
  box-shadow: 0 4px 15px var(--accent-glow) !important;
}

/* --------------------------------------------------------------------------
   ۳۲. دکمه بازگشت به بالا و نوار اعلان (Back to Top & Announcement)
   -------------------------------------------------------------------------- */
body.dark-mode .scroll-top,
body.dark-mode .back-to-top,
body.dark-mode #scrollUp {
  background: linear-gradient(135deg, #E1768D, #8b5cf6) !important;
  color: #ffffff !important;
  border: 1px solid #818cf8 !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45) !important;
}

body.dark-mode .announcement-bar,
body.dark-mode .top-notice,
body.dark-mode .marquee-news {
  background-color: #1e293b !important;
  color: #fde68a !important;
  border-bottom: 1px solid var(--border-dark) !important;
}

/* --------------------------------------------------------------------------
   ۳۳. نقشه، iframe و embed (Maps & Embeds)
   -------------------------------------------------------------------------- */
body.dark-mode .map-area,
body.dark-mode .google-map,
body.dark-mode iframe {
  border: 1px solid var(--border-dark) !important;
  filter: grayscale(0.2) contrast(1.05) brightness(0.9);
}

/* --------------------------------------------------------------------------
   ۳۴. چاپ و دسترسی‌پذیری (Print — اختیاری)
   -------------------------------------------------------------------------- */
@media print {
  body.dark-mode {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* --------------------------------------------------------------------------
   ۳۵. اصلاحات نهایی اولویت بالا (High-Priority Fixes)
   -------------------------------------------------------------------------- */
body.dark-mode img:not([src*=".svg"]) {
  opacity: 0.95;
}

body.dark-mode .text-dark {
  color: #f8fafc !important;
}

body.dark-mode .text-black-50,
body.dark-mode .text-body {
  color: var(--text-dark-secondary) !important;
}

body.dark-mode .border,
body.dark-mode .border-top,
body.dark-mode .border-bottom,
body.dark-mode .border-start,
body.dark-mode .border-end {
  border-color: var(--border-dark) !important;
}

body.dark-mode .shadow,
body.dark-mode .shadow-sm,
body.dark-mode .shadow-lg {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

/* جلوگیری از فلش سفید هنگام لود */
html.dark-mode {
  background-color: #0f172a;
  color-scheme: dark;
}

body.dark-mode .your-card-class {
    background: #182234 !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
}

body.dark-mode .your-card-class h1,
body.dark-mode .your-card-class h2,
body.dark-mode .your-card-class h3,
body.dark-mode .your-card-class h4,
body.dark-mode .your-card-class h5,
body.dark-mode .your-card-class h6 {
    color: #f8fafc !important;
}

body.dark-mode .your-card-class p,
body.dark-mode .your-card-class span,
body.dark-mode .your-card-class li,
body.dark-mode .your-card-class small,
body.dark-mode .your-card-class label {
    color: #cbd5e1 !important;
}

body.dark-mode .your-card-class a {
    color: #E1768D !important;
}

body.dark-mode .your-card-class a:hover {
    color: #f3a6b6 !important;
}

body.dark-mode .dashboard-card {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28) !important;
}

body.dark-mode .dashboard-card:hover {
    border-color: #E1768D !important;
    box-shadow: 0 10px 25px rgba(225, 118, 141, 0.25) !important;
}

body.dark-mode .dashboard-card i {
    color: #E1768D !important;
}

body.dark-mode .dashboard-card h5 {
    color: #f8fafc !important;
}

body.dark-mode .dashboard-card p,
body.dark-mode .dashboard-card span,
body.dark-mode .dashboard-card label,
body.dark-mode .dashboard-card small {
    color: #cbd5e1 !important;
}

body.dark-mode .stat-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .stat-card h5 {
    color: #E1768D !important;
}

body.dark-mode .stat-card p {
    color: #cbd5e1 !important;
}

body.dark-mode .dashboard-card .form-control {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

body.dark-mode .dashboard-card .form-control:focus {
    border-color: #E1768D !important;
    box-shadow: 0 0 0 0.2rem rgba(225, 118, 141, 0.18) !important;
}

body.dark-mode .dashboard-card button {
    background: #E1768D !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-mode .sidebar-item[style] {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #E1768D !important;
}

body.dark-mode .sidebar-item .title,
body.dark-mode .sidebar-item p,
body.dark-mode .sidebar-item span {
    color: #f8fafc !important;
}


body.dark-mode tr, 
body.dark-mode td {
    background: #1e293b !important;
}

body.dark-mode #button2{
    background: #e3a856  !important;
}


body.dark-mode .edu-form-card {
    background: #1e293b !important;
}


body.dark-mode .btn-edit{
    background:#92b4eb !important;
}


body.dark-mode .fa-map-marker-alt, body.dark-mode #fa-book-open-index{
    background: #1CB098 !important;
}
body.dark-mode .btn-delete{background-color: #da6262 !important;}

body.dark-mode .wow{
    background-color:  #1e293b !important;
}

body.dark-mode .bartar-logo{
    background-color:  #1e293b !important; 
}

body.dark-mode .quick-links-section{
    background-color:  #1e293b !important; 
}

body.dark-mode #fa-plus-circle1 {
    background-color:  #1e293b !important; 
}

body.dark-mode .upload-body ,body.dark-mode .recipients-box{
    background-color:  #1e293b !important; 
}

body.dark-mode .none-display-image {
  display: none !important;
}

body.dark-mode .block-display-image {
  display: block !important;
} 

body.dark-mode .login-form,
body.dark-mode .login-register-item, 
body.dark-mode .login-style-one-items{
  background-color:  #1e293b !important; 

}


body.dark-mode #header_top_index_myweb{
  background-color:  #1e293b !important; 
}

body.dark-mode .dark-row{
  background-color:  #1e293b !important; 
}

body.dark-mode .theme-style-three, body.dark-mode .card-style-two::after {
	background-image: url(../img/shape/9-dark2.png) !important;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-position: left top !important;
}

body.dark-mode small{
  color: #ffffff !important;
}

body.dark-mode .article-manage-card-body{
  background-color:  #1e293b !important; 
}

body.dark-mode .status-pill{
  color:  #16A34A !important;
} 

body.dark-mode a:not(.btn):not(.support-toggle-btn):not(.footer a) {
  color: #38bdf8;
}

body.dark-mode a:not(.btn):not(.support-toggle-btn):not(.footer a):hover {
  color: #7dd3fc;
}

.chat-header{
  color: #ffffff !important;
}

body.dark-mode .fa-user-circle, body.dark-mode .fa-plus-circle, body.dark-mode .btn-add-news, body.dark-mode .btn-add-gallery{
  color: #E1768D !important;
}


    

body.dark-mode .btn-add{color: #E1768D !important;}

@media (max-width: 480px) {
    .theme-toggle-floating-btn {
        left: 20px !important;
    }
}