/* Dark Mode Styles - Updated for Timer Visibility - Version 2.0 */

/* Transition برای smooth تغییرات */
body.dark-mode-ready {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

body.dark-mode-ready * {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Main body */
body.dark-mode {
  background-color: var(--ds-surface) !important;
  color: #e0e0e0 !important;
}

/* Main containers */
body.dark-mode .main-content,
body.dark-mode .page-content {
  background-color: var(--ds-surface) !important;
  color: #e0e0e0 !important;
}

/* Cards and modals - قوانین قوی‌تر */
body.dark-mode .card,
body.dark-mode .modal-content,
body.dark-mode .card.bg-white,
body.dark-mode .card.bg-light,
body.dark-mode .card[class*="bg-"] {
  background-color: #18181b !important;
  color: #fafafa !important;
  border-color: #27272a !important;
}

/* Card headers - قوانین قوی‌تر */
body.dark-mode .card-header,
body.dark-mode .modal-header,
body.dark-mode .modal-footer,
body.dark-mode .card-header.bg-white,
body.dark-mode .card-header.bg-light,
body.dark-mode .card-header[class*="bg-"] {
  background-color: #27272a !important;
  color: #fafafa !important;
  border-color: #27272a !important;
}

body.dark-mode .card-header {
  background-color: #1a1d1e !important; /* پس‌زمینه خیلی تیره */
  color: #ff0000 !important; /* رنگ متن روشن */
  border-bottom: 1px solid #444 !important;
}

body.dark-mode .card-title,
body.dark-mode .card-header *,
body.dark-mode .card-header.bg-white *,
body.dark-mode .card-header.bg-light *,
body.dark-mode .card-header[class*="bg-"] * {
  color: #ffffff !important; /* رنگ متن روشن */
}

body.dark-mode .card-body,
body.dark-mode .card-body * {
  color: #e4e4e4 !important;
}

/* Override تمام کلاس‌های background - قوانین قوی‌تر */
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode [class*="bg-white"],
body.dark-mode [class*="bg-light"],
body.dark-mode .input-group-text.bg-light,
body.dark-mode .input-group-text.bg-white,
body.dark-mode .badge.bg-light,
body.dark-mode .badge.bg-white,
body.dark-mode .nav-tabs.bg-light,
body.dark-mode .nav-tabs.bg-white,
body.dark-mode .nav-link.bg-light,
body.dark-mode .nav-link.bg-white,
body.dark-mode .card-header.bg-light,
body.dark-mode .card-header.bg-white,
body.dark-mode .card.bg-light,
body.dark-mode .card.bg-white {
  background-color: #1a1d1e !important;
  color: #e0e0e0 !important;
}

/* قوانین اضافی با specificity بالاتر */
body.dark-mode div.bg-white,
body.dark-mode div.bg-light,
body.dark-mode span.bg-white,
body.dark-mode span.bg-light,
body.dark-mode button.bg-white,
body.dark-mode button.bg-light,
body.dark-mode ul.bg-white,
body.dark-mode ul.bg-light,
body.dark-mode li.bg-white,
body.dark-mode li.bg-light {
  background-color: #1a1d1e !important;
  color: #e0e0e0 !important;
}

/* Fix for btn-light in dark mode - قوانین قوی‌تر */
body.dark-mode .btn.btn-light,
body.dark-mode button.btn-light,
body.dark-mode a.btn-light {
  background-color: #2d3748 !important;
  border-color: #4a5568 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .btn.btn-light:hover,
body.dark-mode button.btn-light:hover,
body.dark-mode a.btn-light:hover {
  background-color: #4a5568 !important;
  border-color: #718096 !important;
  color: #ffffff !important;
}

body.dark-mode .btn.btn-light:active,
body.dark-mode .btn.btn-light:focus,
body.dark-mode button.btn-light:active,
body.dark-mode button.btn-light:focus,
body.dark-mode a.btn-light:active,
body.dark-mode a.btn-light:focus {
  background-color: #4a5568 !important;
  border-color: #007bff !important;
  color: #ffffff !important;
}

body.dark-mode .btn-light i,
body.dark-mode .btn-light .fa,
body.dark-mode .btn-light .fas,
body.dark-mode .btn-light .far {
  color: #e2e8f0 !important;
}

/* اطمینان از اینکه تمام المان‌های داخل btn-light روشن هستند */
body.dark-mode .btn-light *,
body.dark-mode button.btn-light *,
body.dark-mode a.btn-light * {
  color: #e2e8f0 !important;
}

/* Sidebar — uses DS tokens automatically, only override what can't be tokenized */
body.dark-mode .sidebar { background: var(--ds-surface) !important; border-left-color: var(--ds-border) !important; color: var(--ds-text) !important; }
body.dark-mode .sidebar-header { border-bottom-color: var(--ds-border) !important; }
body.dark-mode .sidebar-user { border-bottom-color: var(--ds-border) !important; }
body.dark-mode .sidebar .sidebar-brand { color: var(--ds-text) !important; }
body.dark-mode .sidebar .brand-logo { filter: brightness(0) invert(1) !important; }
body.dark-mode .sidebar .user-info h6 { color: var(--ds-text) !important; }
body.dark-mode .sidebar .user-info span { color: var(--ds-text-muted) !important; }
body.dark-mode .sidebar .user-avatar { background: var(--ds-blue-bg) !important; color: var(--ds-blue-fg) !important; }
body.dark-mode .sidebar .nav-link { color: var(--ds-text-muted) !important; }
body.dark-mode .sidebar .nav-link:hover { background: var(--ds-surface-hover) !important; color: var(--ds-text) !important; }
body.dark-mode .sidebar .nav-link.active { background: var(--ds-surface-hover) !important; color: var(--ds-text) !important; font-weight: 600; }
body.dark-mode .sidebar .nav-link i { color: inherit !important; }
body.dark-mode .sidebar .nav-link .nav-icon { color: inherit !important; }
body.dark-mode .sidebar .submenu-link { color: var(--ds-text-muted) !important; }
body.dark-mode .sidebar .submenu-link:hover { background: var(--ds-surface-hover) !important; color: var(--ds-text) !important; }
body.dark-mode .sidebar .submenu-link.active { background: var(--ds-surface-hover) !important; color: var(--ds-text) !important; font-weight: 600; }
body.dark-mode .sidebar .submenu-link.active::before { background: var(--ds-text-muted) !important; }
body.dark-mode .sidebar .nav-divider { background: var(--ds-border) !important; }
body.dark-mode .sidebar .sidebar-section-label { color: var(--ds-text-subtle) !important; }
body.dark-mode .sidebar .submenu { border-right-color: var(--ds-border-input) !important; }

/* Tables */
body.dark-mode .table {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}

body.dark-mode .table th,
body.dark-mode .table td {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(44, 49, 54, 0.2) !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(even) {
  background-color: #23272b !important;
}

/* بهبود hover برای ردیف‌های striped */
body.dark-mode .table-striped tbody tr:nth-of-type(odd):hover {
  background-color: rgba(67, 97, 238, 0.02) !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(even):hover {
  background-color: rgba(67, 97, 238, 0.02) !important;
}

body.dark-mode .table-hover tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.02) !important;
  color: #fff !important;
}

/* 🎯 اصلاح رنگ هدرهای جدول در دارک مود */
body.dark-mode .table-dark,
body.dark-mode .table-dark th,
body.dark-mode thead.table-dark,
body.dark-mode thead.table-dark th {
  background-color: #2c2f33 !important;
  color: #ffffff !important;
  border-color: #444 !important;
}

/* Forms */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .form-check-input {
  background-color: #1e2530 !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background-color: #1e2530 !important;
  color: #f1f5f9 !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.2) !important;
}

/* فیلدهای جستجو و placeholder - قوانین قوی‌تر */
body.dark-mode input[type="text"]::placeholder,
body.dark-mode input[type="search"]::placeholder,
body.dark-mode .form-control::placeholder,
body.dark-mode input::placeholder {
  color: #b0b0b0 !important;
  opacity: 1 !important;
}

body.dark-mode input[type="text"]::-webkit-input-placeholder,
body.dark-mode input[type="search"]::-webkit-input-placeholder,
body.dark-mode .form-control::-webkit-input-placeholder,
body.dark-mode input::-webkit-input-placeholder {
  color: #b0b0b0 !important;
  opacity: 1 !important;
}

body.dark-mode input[type="text"]::-moz-placeholder,
body.dark-mode input[type="search"]::-moz-placeholder,
body.dark-mode .form-control::-moz-placeholder,
body.dark-mode input::-moz-placeholder {
  color: #b0b0b0 !important;
  opacity: 1 !important;
}

body.dark-mode input[type="text"]:-ms-input-placeholder,
body.dark-mode input[type="search"]:-ms-input-placeholder,
body.dark-mode .form-control:-ms-input-placeholder,
body.dark-mode input:-ms-input-placeholder {
  color: #b0b0b0 !important;
  opacity: 1 !important;
}

body.dark-mode input[type="text"]:-moz-placeholder,
body.dark-mode input[type="search"]:-moz-placeholder,
body.dark-mode .form-control:-moz-placeholder,
body.dark-mode input:-moz-placeholder {
  color: #b0b0b0 !important;
  opacity: 1 !important;
}

/* اطمینان از رنگ متن در فیلدهای جستجو */
body.dark-mode input[type="text"],
body.dark-mode input[type="search"],
body.dark-mode .form-control {
  color: #e0e0e0 !important;
  background-color: #2c3136 !important;
  border-color: #555 !important;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="search"]:focus,
body.dark-mode .form-control:focus {
  color: #ffffff !important;
  background-color: #2c3136 !important;
  border-color: #4361ee !important;
}

body.dark-mode .form-label,
body.dark-mode .form-check-label {
  color: #e0e0e0 !important;
}

/* Input groups */
body.dark-mode .input-group-text {
  background-color: #3a3f44 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .input-group-text.bg-light,
body.dark-mode .input-group-text.bg-white {
  background-color: #3a3f44 !important;
  color: #e0e0e0 !important;
}

/* Buttons */
body.dark-mode .btn {
  color: #e0e0e0 !important;
  background-color: #2c3136 !important;
  border-color: #555 !important;
}

body.dark-mode .btn:hover {
  background-color: #3a3f44 !important;
  border-color: #666 !important;
}

body.dark-mode .btn-primary {
  background-color: #4361ee !important;
  border-color: #4361ee !important;
  color: #fff !important;
}

body.dark-mode .btn-primary:hover {
  background-color: #3a56d4 !important;
  border-color: #3a56d4 !important;
}

body.dark-mode .btn-outline-primary {
  color: #4361ee !important;
  border-color: #4361ee !important;
  background: transparent !important;
}

body.dark-mode .btn-outline-primary:hover {
  background-color: #4361ee !important;
  color: #fff !important;
}

/* دکمه‌های اضافی */
body.dark-mode .btn-light {
  background-color: #3a3f44 !important;
  border-color: #555 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .btn-light:hover {
  background-color: #4a4f54 !important;
  border-color: #666 !important;
  color: #fff !important;
}

body.dark-mode .btn-success {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
  color: #fff !important;
}

body.dark-mode .btn-success:hover {
  background-color: #218838 !important;
  border-color: #1e7e34 !important;
  color: #fff !important;
}

/* Dropdowns */
body.dark-mode .dropdown-menu {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .dropdown-item {
  color: #e0e0e0 !important;
}

body.dark-mode .dropdown-item:hover {
  background-color: #3a3f44 !important;
  color: #fff !important;
}

body.dark-mode .dropdown-header {
  color: #b0b0b0 !important;
}

/* Alerts */
body.dark-mode .alert {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .alert-success {
  background-color: #1e4d2b !important;
  border-color: #2d5a3a !important;
  color: #d4edda !important;
}

body.dark-mode .alert-danger {
  background-color: #4d1e1e !important;
  border-color: #5a2d2d !important;
  color: #f8d7da !important;
}

body.dark-mode .alert-warning {
  background-color: #4d3e1e !important;
  border-color: #5a4a2d !important;
  color: #fff3cd !important;
}

/* Progress bars */
body.dark-mode .progress {
  background-color: #2c3136 !important;
}

body.dark-mode .progress-bar {
  background-color: #4361ee !important;
}

/* Badges */
body.dark-mode .badge {
  background-color: #3a3f44 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .badge.bg-light,
body.dark-mode .badge.bg-white {
  background-color: #3a3f44 !important;
  color: #e0e0e0 !important;
}

/* Pagination */
body.dark-mode .pagination {
  background-color: #23272b !important;
}

body.dark-mode .page-link {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .page-link:hover {
  background-color: #3a3f44 !important;
  color: #fff !important;
}

body.dark-mode .page-item.active .page-link {
  background-color: #4361ee !important;
  border-color: #4361ee !important;
  color: #fff !important;
}

/* Navigation - قوانین قوی‌تر برای تب‌ها */
body.dark-mode .nav-tabs {
  border-color: #555 !important;
}

body.dark-mode .nav-tabs.bg-light,
body.dark-mode .nav-tabs.bg-white,
body.dark-mode .nav-tabs[class*="bg-"] {
  background-color: #1a1d1e !important;
  border-color: #555 !important;
}

body.dark-mode .nav-tabs .nav-link,
body.dark-mode .nav-tabs .nav-link.bg-white,
body.dark-mode .nav-tabs .nav-link.bg-light,
body.dark-mode .nav-tabs .nav-link[class*="bg-"],
body.dark-mode .nav-link {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .nav-tabs .nav-link:hover {
  background-color: #3a3f44 !important;
  color: #fff !important;
}

body.dark-mode .nav-tabs .nav-link.active,
body.dark-mode .nav-tabs .nav-link.active.bg-white,
body.dark-mode .nav-tabs .nav-link.active.bg-light,
body.dark-mode .nav-tabs .nav-link.active[class*="bg-"] {
  background-color: #4361ee !important;
  color: #fff !important;
  border-color: #4361ee !important;
}

body.dark-mode .tab-content {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}

/* Text colors */
body.dark-mode .text-muted {
  color: #b0b0b0 !important;
}

body.dark-mode .text-dark {
  color: #e0e0e0 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #e0e0e0 !important;
}

/* Background utilities - قوانین قوی‌تر */
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode [class*="bg-white"],
body.dark-mode [class*="bg-light"] {
  background-color: #1a1d1e !important;
  color: #e0e0e0 !important;
}

body.dark-mode .bg-primary {
  background-color: #4361ee !important;
  color: #fff !important;
}

body.dark-mode .bg-success {
  background-color: #28a745 !important;
  color: #fff !important;
}

body.dark-mode .bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

body.dark-mode .bg-danger {
  background-color: #dc3545 !important;
  color: #fff !important;
}

body.dark-mode .bg-info {
  background-color: #17a2b8 !important;
  color: #fff !important;
}

body.dark-mode .bg-secondary {
  background-color: #6c757d !important;
  color: #fff !important;
}

/* Borders */
body.dark-mode .border-0 {
  border-color: transparent !important;
}

body.dark-mode .border {
  border-color: #555 !important;
}

/* Shadows */
body.dark-mode .shadow,
body.dark-mode .shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5) !important;
}

/* Footer */
body.dark-mode .footer {
  background-color: var(--ds-surface) !important;
  color: #e0e0e0 !important;
  border-top: 1px solid #444 !important;
}

/* Top navbar — ds-topbar picks up DS tokens automatically in dark-mode */
body.dark-mode .top-navbar,
body.dark-mode .navbar { display: none !important; }

/* Notification items */
body.dark-mode .notification-item {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
}

/* Inventory Dashboard: Recent Activities */
body.dark-mode .recent-activities {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid #444 !important;
}

body.dark-mode .recent-activities h5,
body.dark-mode .recent-activities .activity-title {
  color: #ffffff !important;
}

body.dark-mode .recent-activities .activity-item {
  border-bottom: 1px solid #3a3f44 !important;
}

body.dark-mode .recent-activities .activity-item:last-child {
  border-bottom: none !important;
}

body.dark-mode .recent-activities .activity-icon {
  background-color: #4361ee !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(67, 97, 238, 0.35) !important;
}

body.dark-mode .recent-activities .activity-content {
  color: #e0e0e0 !important;
}

body.dark-mode .recent-activities .activity-time {
  color: #a0aec0 !important;
}

/* Inventory Locations Tree - Dark Mode */
body.dark-mode .location-node {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
  border: 1px solid #3a3f44 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .location-toggle {
  color: #a0aec0 !important;
}
body.dark-mode .location-toggle:hover {
  color: #ffffff !important;
}

body.dark-mode .location-icon {
  background-color: #2c3136 !important;
  color: #63b3ed !important; /* accent */
  border: 1px solid #3a3f44 !important;
}
body.dark-mode .location-icon.root {
  color: #ffd166 !important;
}

body.dark-mode .location-info .location-name {
  color: #ffffff !important;
}
body.dark-mode .location-info .location-details {
  color: #a0aec0 !important;
}
body.dark-mode .location-info .location-details i {
  color: #718096 !important;
}

body.dark-mode .location-stats .location-stat {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border: 1px solid #3a3f44 !important;
}
body.dark-mode .location-stats .location-stat i {
  color: #63b3ed !important;
}
body.dark-mode .location-stats .location-stat.materials i {
  color: #48bb78 !important; /* success tone */
}
body.dark-mode .location-stats .location-stat.children i {
  color: #f6ad55 !important; /* warning tone */
}

/* Action buttons (outline variants) */
body.dark-mode .btn-outline-info {
  color: #63b3ed !important;
  border-color: #63b3ed !important;
}
body.dark-mode .btn-outline-info:hover {
  background-color: rgba(99, 179, 237, 0.12) !important;
  color: #ffffff !important;
}
body.dark-mode .btn-outline-success {
  color: #68d391 !important;
  border-color: #68d391 !important;
}
body.dark-mode .btn-outline-success:hover {
  background-color: rgba(104, 211, 145, 0.12) !important;
  color: #ffffff !important;
}
body.dark-mode .btn-outline-primary {
  color: #4361ee !important;
  border-color: #4361ee !important;
}
body.dark-mode .btn-outline-primary:hover {
  background-color: rgba(67, 97, 238, 0.12) !important;
  color: #ffffff !important;
}
body.dark-mode .btn-outline-warning {
  color: #f6ad55 !important;
  border-color: #f6ad55 !important;
}
body.dark-mode .btn-outline-warning:hover {
  background-color: rgba(246, 173, 85, 0.12) !important;
  color: #1a1a1a !important;
}
body.dark-mode .btn-outline-danger {
  color: #fc8181 !important;
  border-color: #fc8181 !important;
}
body.dark-mode .btn-outline-danger:hover {
  background-color: rgba(252, 129, 129, 0.12) !important;
  color: #ffffff !important;
}

/* Loading overlay */
body.dark-mode .loading-overlay {
  background-color: rgba(24, 26, 27, 0.8) !important;
}

/* Empty message */
body.dark-mode .empty-message {
  color: #b0b0b0 !important;
}

/* Stat cards */
body.dark-mode .stat-card {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .stat-card:hover {
  background-color: #3a3f44 !important;
  transform: none !important;
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -o-transform: none !important;
  transition: none !important;
}

body.dark-mode .stat-card .icon {
  background-color: #3a3f44 !important;
}

body.dark-mode .stat-card .title {
  color: #e0e0e0 !important;
}

body.dark-mode .stat-card .value {
  color: #fff !important;
}

/* Quick action buttons */
body.dark-mode .quick-action-btn {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .quick-action-btn:hover {
  background-color: #4361ee !important;
  color: #fff !important;
}

/* Toast notifications */
body.dark-mode .toast {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .toast-header {
  background-color: #3a3f44 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .toast-body {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
}

/* Modal specific */
body.dark-mode .modal-content {
  background-color: #18181b !important;
  color: #fafafa !important;
  border-color: #27272a !important;
}

body.dark-mode .modal-header {
  background-color: #27272a !important;
  color: #fafafa !important;
  border-color: #27272a !important;
}

body.dark-mode .modal-body {
  background-color: #18181b !important;
  color: #fafafa !important;
}

body.dark-mode .modal-footer {
  background-color: #27272a !important;
  color: #fafafa !important;
  border-color: #27272a !important;
}

/* Disabled departments */
body.dark-mode .disabled-department {
  background-color: #1e2124 !important;
  color: #666 !important;
}

body.dark-mode .disabled-department:hover {
  background-color: #1e2124 !important;
  color: #666 !important;
}

/* Override any inline styles - قوانین قوی‌تر */
body.dark-mode [style*="background-color: white"],
body.dark-mode [style*="background-color: #fff"],
body.dark-mode [style*="background-color: #ffffff"],
body.dark-mode [style*="background-color: #f8f9fa"],
body.dark-mode [style*="background-color: #f5f7fb"] {
  background-color: #1a1d1e !important;
}

body.dark-mode [style*="color: #212529"],
body.dark-mode [style*="color: #495057"],
body.dark-mode [style*="color: #333"] {
  color: #e0e0e0 !important;
}

/* Specific overrides for common Bootstrap classes */
body.dark-mode .table-dark {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}

body.dark-mode .table-dark th,
body.dark-mode .table-dark td {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

body.dark-mode .list-group-item {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .list-group-item:hover {
  background-color: #3a3f44 !important;
}

/* Custom components */
body.dark-mode .info-box {
  background-color: #2c3136 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .info-box-text {
  color: #e0e0e0 !important;
}

body.dark-mode .info-box-number {
  color: #fff !important;
}

body.dark-mode .info-box-icon {
  background-color: #3a3f44 !important;
}

/* Persian DateTime Dark Mode — ds-topbar-datetime handles dark via DS tokens */
body.dark-mode .datetime-display .date { color: var(--ds-text-muted) !important; }
body.dark-mode .datetime-display .time { color: var(--ds-text) !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
  body.dark-mode .sidebar {
    background: var(--ds-surface) !important;
  }

  body.dark-mode .card {
    background-color: #1e2124 !important;
  }
}

/* Dark Mode Styles - Updated for Timer Visibility - Version 2.0 */

/* تایمر در دارک مود */
[data-bs-theme="dark"] .timer-display {
  color: #00ffff !important;
  background-color: #0a0a0a !important;
  border-color: #00ffff !important;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4) !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6) !important;
  font-weight: bold !important;
}

[data-bs-theme="dark"] .elapsed-time .timer-display {
  animation: pulse-dark 2s infinite !important;
}

@keyframes pulse-dark {
  0% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.8);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
  }
}

[data-bs-theme="dark"] .elapsed-time.overdue .timer-display {
  color: #ff4444 !important;
  background-color: #1a0a0a !important;
  border-color: #ff4444 !important;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.4) !important;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.6) !important;
  animation: pulse-danger-dark 1s infinite !important;
}

@keyframes pulse-danger-dark {
  0% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
    text-shadow: 0 0 12px rgba(255, 68, 68, 0.8);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
  }
}

/* ============================================ */
/* غیرفعال کردن انیمیشن‌های hover برای کارت‌ها در دارک مود */
/* ============================================ */

/* غیرفعال کردن transition و transform برای همه کارت‌ها در دارک مود */
body.dark-mode .card,
body.dark-mode .card.shadow,
body.dark-mode .card.shadow-sm,
body.dark-mode .card.h-100,
body.dark-mode .card.border,
body.dark-mode .card.shadow-lg,
body.dark-mode .card.shadow-md {
  transition: none !important;
  transform: none !important;
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -o-transform: none !important;
}

/* غیرفعال کردن انیمیشن hover برای کارت‌ها در دارک مود */
body.dark-mode .card:hover,
body.dark-mode .card.shadow:hover,
body.dark-mode .card.shadow-sm:hover,
body.dark-mode .card.h-100:hover,
body.dark-mode .card.border:hover,
body.dark-mode .card.shadow-lg:hover,
body.dark-mode .card.shadow-md:hover {
  transform: none !important;
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -o-transform: none !important;
  transition: none !important;
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
}

/* غیرفعال کردن انیمیشن برای card-body و card-header در دارک مود */
body.dark-mode .card-body,
body.dark-mode .card-header,
body.dark-mode .card-footer {
  transition: none !important;
  transform: none !important;
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
}

body.dark-mode .card-body:hover,
body.dark-mode .card-header:hover,
body.dark-mode .card-footer:hover {
  transform: none !important;
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -o-transform: none !important;
}
