@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazir.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

.justify-text {
  text-align: justify;
}


/* فایل style.css بازنویسی شده */
:root {
  /* رنگ‌های پایه */
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #252525;
  --text-primary: #f0f0f0;
  --text-secondary: #cccccc;
  --border-color: #333;
  --accent-color: #42a5f5;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --warning-color: #ff9800;
  --info-color: #2196f3;
}

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body.dark-theme .card,
body.dark-theme .modal-content {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body.dark-theme .table {
  --bs-table-bg: var(--bg-secondary);
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-color);
}

body.dark-theme .table thead th {
  background-color: var(--bg-tertiary);
  color: var(--accent-color);
}

body.dark-theme .table tbody tr {
  background-color: var(--bg-secondary);
}

body.dark-theme .table tbody tr:nth-child(even) {
  background-color: var(--bg-tertiary);
}

body.dark-theme .table tbody tr:hover {
  background-color: #333;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-theme .accordion-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .accordion-detail td {
  background-color: var(--bg-tertiary);
}

/* کلاس‌های کمکی برای رنگ‌ها */
body.dark-theme .text-success { color: var(--success-color) !important; }
body.dark-theme .text-danger { color: var(--danger-color) !important; }
body.dark-theme .text-warning { color: var(--warning-color) !important; }
body.dark-theme .text-info { color: var(--info-color) !important; }

body.dark-theme .bg-success { background-color: var(--success-color) !important; }
body.dark-theme .bg-danger { background-color: var(--danger-color) !important; }
body.dark-theme .bg-warning { background-color: var(--warning-color) !important; }
body.dark-theme .bg-info { background-color: var(--info-color) !important; }

/* بهبود آکاردئون */
.accordion-detail {
  transition: all 0.3s ease;
  background-color: inherit;
}

.accordion-detail .card {
  background-color: inherit;
  border-color: var(--border-color);
}


/* در بخش مدیریت تم */
#themeToggle i {
  font-size: 1.2rem;
  transition: color 0.3s;
}

body.light-theme #themeToggle i {
  color: #333; /* رنگ مشکی در حالت روشن */
}

body.dark-theme #themeToggle i {
  color: #f0f0f0; /* رنگ سفید در حالت تاریک */
}

/* تغییر رنگ دکمه تغییر تم */
body.light-theme #themeToggle {
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

body.dark-theme #themeToggle {
  background-color: #2d2d2d;
  border-color: #444;
}


/* در بخش استایل‌های جدول */
body.light-theme .table thead th {
  background-color: #e9ecef;
  color: #333 !important; /* رنگ مشکی در حالت روشن */
}

body.dark-theme .table thead th {
  background-color: #2d2d2d;
  color: #f0f0f0 !important; /* رنگ سفید در حالت تاریک */
}

/* استایل لینک‌های قابل مرتب‌سازی */
body.light-theme .table thead th a {
  color: #333;
  text-decoration: none;
}

body.dark-theme .table thead th a {
  color: #f0f0f0;
  text-decoration: none;
}


/* برای اطمینان از اعمال صحیح رنگ‌ها */
.table thead th {
  font-weight: 600;
  vertical-align: middle;
  text-align: center;
}

/* استایل فلش‌های مرتب‌سازی */
body.light-theme .table thead th a::after {
  color: #666;
}

body.dark-theme .table thead th a::after {
  color: #aaa;
}

/* در بخش استایل‌های جدول در تم تاریک */
body.dark-theme .table tbody tr:hover td {
  color: #ffffff !important; /* رنگ سفید برای متن در حالت هاور */
  background-color: #333333; /* رنگ زمینه خاکستری تیره */
}

/* برای اطمینان از اعمال رنگ متن در حالت عادی */
body.dark-theme .table tbody tr td {
  color: #f0f0f0; /* رنگ سفید برای متن در حالت عادی */
}


/* استایل‌های صفحه‌بندی در تم تاریک */
body.dark-theme .pagination .page-item .page-link {
  background-color: #2d2d2d;
  color: #f0f0f0;
  border-color: #444;
}

body.dark-theme .pagination .page-item.active .page-link {
  background-color: #42a5f5;
  color: #ffffff;
  border-color: #42a5f5;
}

body.dark-theme .pagination .page-item.disabled .page-link {
  background-color: #252525;
  color: #777;
}

body.dark-theme .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  background-color: #3d3d3d;
  color: #ffffff;
}


/* بهبود ظاهر جدول در هر دو تم */
.table {
  --bs-table-hover-color: inherit; /* رنگ متن در حالت هاور را از حالت عادی به ارث می‌برد */
}

/* تضمین خوانایی متن در حالت انتخاب (selected) */
body.dark-theme .table tbody tr:focus td,
body.dark-theme .table tbody tr:focus-within td {
  color: #ffffff !important;
}



.bottom-nav {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background-color: #2a2a2a;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  border-top: 1px solid #444;
}

.bottom-nav .nav-item {
  color: #aaa;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.bottom-nav .nav-item.active {
  color: #00bfff;
  transform: scale(1.2);
}

.bottom-nav .nav-item:hover {
  color: #ffffff;
  transform: scale(1.1);
}

body.light-mode .bottom-nav {
  background-color: #f8f9fa;
  border-top: 1px solid #ccc;
}

body.light-mode .bottom-nav .nav-item {
  color: #666;
}

body.light-mode .bottom-nav .nav-item.active {
  color: #007bff;
}

