/* ============================
   GLOBAL SIDEBAR DARK MODE CSS
   ============================
   
   Include this file in any page with dashboard-sidebar
   Apply dark mode by adding 'dark-mode' class to body
*/

/* =========================
   SIDEBAR DARK MODE STYLES
========================= */

/* Header Dark Mode */
body.dark-mode .dashboard-header {
  background: rgba(15, 23, 42, 0.95) !important;
  border-bottom-color: #475569 !important;
}

body.dark-mode .header-left,
body.dark-mode .header-right {
  color: #f8fafc;
}

body.dark-mode .logo {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .sidebar-toggle {
  color: #cbd5e1;
}

body.dark-mode .sidebar-toggle:hover {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

/* Sidebar Dark Mode */
body.dark-mode .dashboard-sidebar {
  background: rgba(15, 23, 42, 0.98) !important;
  border-right-color: #475569 !important;
}

body.dark-mode .sidebar-header {
  border-bottom-color: #475569 !important;
}

body.dark-mode .sidebar-title {
  color: #f8fafc !important;
}

body.dark-mode .sidebar-subtitle {
  color: #cbd5e1 !important;
}

/* Navigation Section Titles */
body.dark-mode .nav-section-title {
  color: #cbd5e1 !important;
}

/* Navigation Links */
body.dark-mode .nav-link {
  color: #cbd5e1 !important;
}

body.dark-mode .nav-link:hover {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #60a5fa !important;
}

body.dark-mode .nav-link.active {
  background: rgba(96, 165, 250, 0.2) !important;
  color: #60a5fa !important;
  border-right-color: #60a5fa !important;
}

/* Navigation Icons */
body.dark-mode .nav-icon {
  color: inherit;
}

/* Navigation Badges */
body.dark-mode .nav-badge {
  color: white;
}

body.dark-mode .nav-badge.success {
  background: #10b981 !important;
}

body.dark-mode .nav-badge.warning {
  background: #f59e0b !important;
}

body.dark-mode .nav-badge.info {
  background: #60a5fa !important;
}

/* User Dropdown Dark Mode */
body.dark-mode .user-btn {
  background: transparent !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

body.dark-mode .user-btn:hover {
  background: #334155 !important;
}

body.dark-mode .user-menu {
  background: #1e293b !important;
  border-color: #475569 !important;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -4px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .user-menu-item {
  color: #f8fafc !important;
}

body.dark-mode .user-menu-item:hover {
  background: #334155 !important;
}

body.dark-mode .user-menu-divider {
  background: #475569 !important;
}

/* Sidebar Overlay Dark Mode */
body.dark-mode .sidebar-overlay {
  background: rgba(0, 0, 0, 0.7) !important;
}

/* Main Content Area Dark Mode Adjustments */
body.dark-mode .main-wrapper {
  background: transparent !important;
}

body.dark-mode .main-content {
  color: #f8fafc;
}

/* Scrollbar Dark Mode for Sidebar */
body.dark-mode .dashboard-sidebar::-webkit-scrollbar {
  width: 6px;
}

body.dark-mode .dashboard-sidebar::-webkit-scrollbar-track {
  background: #1e293b;
}

body.dark-mode .dashboard-sidebar::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}

body.dark-mode .dashboard-sidebar::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* =====================================
   RESPONSIVE DARK MODE ADJUSTMENTS
===================================== */

@media (max-width: 768px) {
  body.dark-mode .dashboard-sidebar.mobile-open {
    background: rgba(15, 23, 42, 0.98) !important;
    border-right-color: #475569 !important;
  }
}

/* =====================================
   THEME TOGGLE BUTTON STYLES
===================================== */

.theme-toggle-btn {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--bg-primary, #ffffff);
  border: 2px solid var(--border-color, #e2e8f0);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

body.dark-mode .theme-toggle-btn {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}

.theme-toggle-btn i {
  font-size: 18px;
  color: var(--text-primary, #1e293b);
}

body.dark-mode .theme-toggle-btn i {
  color: #f8fafc;
}

/* =====================================
   ANIMATION CLASSES
===================================== */

.sidebar-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.sidebar-slide-in {
  animation: slideInLeft 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* =====================================
   UTILITIES
===================================== */

.sidebar-dark-mode-ready {
  transition: all 0.3s ease !important;
}

/* Force dark mode styles when needed */
.force-dark-sidebar .dashboard-sidebar {
  background: rgba(15, 23, 42, 0.98) !important;
  border-right-color: #475569 !important;
}

.force-dark-sidebar .nav-link {
  color: #cbd5e1 !important;
}

.force-dark-sidebar .sidebar-title {
  color: #f8fafc !important;
}
