/* iOS 26 Liquid Glass Morphism Styles - Theme Aware */
:root {
  /* Light theme glass variables */
  --glass-bg-light: rgba(255, 255, 255, 0.15);
  --glass-border-light: rgba(255, 255, 255, 0.3);
  --glass-shadow-light: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --glass-text-light: rgba(0, 0, 0, 0.9);
  --glass-text-secondary-light: rgba(0, 0, 0, 0.7);
  
  /* Dark theme glass variables */
  --glass-bg-dark: rgba(0, 0, 0, 0.2);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --glass-shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --glass-text-dark: rgba(255, 255, 255, 0.95);
  --glass-text-secondary-dark: rgba(255, 255, 255, 0.7);
  
  /* Shared glass properties */
  --glass-blur: 20px;
  --glass-saturate: 180%;
  
  /* Professional Learning Platform Colors */
  --primary-purple: #667eea;  /* Sophisticated teal - trust & growth */
  --secondary-purple: #764ba2;  /* Sage green - balance & learning */
  --accent-purple: #8b5cf6;  /* Soft coral - warmth for CTAs */
  --neutral-slate: #4A5568;  /* Professional slate */
}

/* Light theme glass styles for dashboard elements */
[data-theme="light"] .dashboard-sidebar,
[data-theme="light"] .dashboard-content,
[data-theme="light"] .course-card,
[data-theme="light"] .dashboard-card,
[data-theme="light"] .content-section {
  background: var(--glass-bg-light) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--glass-shadow-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme glass styles for dashboard elements */
[data-theme="dark"] .dashboard-sidebar,
[data-theme="dark"] .dashboard-content,
[data-theme="dark"] .course-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .content-section {
  background: var(--glass-bg-dark) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-dark);
  box-shadow: var(--glass-shadow-dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced sidebar glass effect */
.dashboard-sidebar {
  position: relative;
  overflow: hidden;
  border-radius: 0 20px 20px 0;
  margin: 10px 0 10px 10px;
}

.dashboard-sidebar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 20% 80%,
    rgba(45, 123, 127, 0.08),
    transparent 50%
  );
  animation: liquidMove 20s ease-in-out infinite;
  pointer-events: none;
}

/* Dashboard header glass enhancement */
/* DISABLED - Using inline styles in dashboard.html
header.dashboard-header,
.dashboard-header {
  position: relative !important;
  overflow: visible !important;
  border-radius: 20px !important;
  margin: 10px 10px 15px 10px !important;
  padding: 12px 20px !important;
  min-height: 60px !important;
  max-height: 70px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 0.5px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  transition: all 0.3s ease !important;
}
*/

.dashboard-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.dashboard-header .page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.dashboard-header .header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dashboard-header .search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.dashboard-header .search-bar:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dashboard-header .search-bar i {
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
  flex-shrink: 0;
}

.dashboard-header .search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: rgba(0, 0, 0, 0.9);
  width: 200px;
  font-size: 14px;
  font-weight: 500;
}

.dashboard-header .search-bar input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

/* Dark theme search bar */
[data-theme="dark"] .dashboard-header .search-bar {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .dashboard-header .search-bar:hover {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .dashboard-header .search-bar i {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .dashboard-header .search-bar input {
  color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .dashboard-header .search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.dashboard-header .notification-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dashboard-header .notification-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}


/* Theme-specific dashboard header glass effect */
[data-theme="light"] .dashboard-header {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 0.5px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] .dashboard-header {
  background: rgba(0, 0, 0, 0.15) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.dashboard-header .notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.dashboard-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
  pointer-events: none;
}

/* Dashboard content sections */
.dashboard-content {
  padding: 20px;
  background: transparent !important;
}

.content-section {
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.content-section::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(107, 144, 128, 0.06),
    transparent 40%
  );
  animation: floatBubble 25s ease-in-out infinite;
  pointer-events: none;
}

/* Course cards glass effect */
.course-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin-bottom: 15px;
}

/* Hover effects for glass elements */
[data-theme="light"] .course-card:hover,
[data-theme="light"] .dashboard-card:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-5px);
  box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.2);
}

[data-theme="dark"] .course-card:hover,
[data-theme="dark"] .dashboard-card:hover {
  background: rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-5px);
  box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.4);
}

/* Sidebar navigation items glass effect */
.sidebar-link {
  border-radius: 12px;
  margin: 5px 10px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.active {
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .sidebar-link:hover,
[data-theme="dark"] .sidebar-link.active {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
}

/* PROFESSIONAL BUTTON STYLES - Glass Morphism with Sophisticated Colors */

/* Primary Buttons - Light Theme (Teal gradient with glass) */
[data-theme="light"] .btn-primary,
[data-theme="light"] button.btn-primary,
[data-theme="light"] a.btn-primary {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6)) !important;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1.5px solid rgba(102, 126, 234, 0.4);
  border-radius: 12px;
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] button.btn-primary:hover,
[data-theme="light"] a.btn-primary:hover {
  background: linear-gradient(135deg, rgba(45, 123, 127, 0.85), rgba(107, 144, 128, 0.85)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 123, 127, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Primary Buttons - Dark Theme (Lighter teal with stronger glass) */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] button.btn-primary,
[data-theme="dark"] a.btn-primary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(147, 101, 255, 0.5)) !important;
  backdrop-filter: blur(15px) saturate(180%);
  border: 1.5px solid rgba(139, 92, 246, 0.6);
  border-radius: 12px;
  color: white !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] button.btn-primary:hover,
[data-theme="dark"] a.btn-primary:hover {
  background: linear-gradient(135deg, rgba(77, 183, 187, 0.7), rgba(107, 164, 148, 0.7)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(77, 183, 187, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* General buttons - Light Theme */
[data-theme="light"] .btn,
[data-theme="light"] button:not(.theme-toggle):not(.logout-btn):not(.btn-primary) {
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.5), rgba(102, 126, 234, 0.5)) !important;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1.5px solid rgba(118, 75, 162, 0.3);
  border-radius: 12px;
  color: white !important;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(118, 75, 162, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

[data-theme="light"] .btn:hover,
[data-theme="light"] button:not(.theme-toggle):not(.logout-btn):not(.btn-primary):hover {
  background: linear-gradient(135deg, rgba(74, 85, 104, 0.75), rgba(107, 144, 128, 0.65)) !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(74, 85, 104, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* General buttons - Dark Theme */
[data-theme="dark"] .btn,
[data-theme="dark"] button:not(.theme-toggle):not(.logout-btn):not(.btn-primary) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(167, 139, 250, 0.4)) !important;
  backdrop-filter: blur(12px) saturate(160%);
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  border-radius: 12px;
  color: white !important;
  transition: all 0.3s ease;
  box-shadow: 0 3px 15px rgba(139, 92, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

[data-theme="dark"] .btn:hover,
[data-theme="dark"] button:not(.theme-toggle):not(.logout-btn):not(.btn-primary):hover {
  background: linear-gradient(135deg, rgba(107, 144, 128, 0.55), rgba(134, 181, 161, 0.55)) !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(107, 144, 128, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* CTA/Action buttons (Enroll, Start Course) - Warm accent */
.enroll-btn,
.start-course-btn,
.continue-btn {
  background: linear-gradient(135deg, rgba(147, 101, 255, 0.6), rgba(168, 85, 247, 0.6)) !important;
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(147, 101, 255, 0.5) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(147, 101, 255, 0.25);
}

.enroll-btn:hover,
.start-course-btn:hover,
.continue-btn:hover {
  background: linear-gradient(135deg, rgba(147, 101, 255, 0.75), rgba(168, 85, 247, 0.75)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 101, 255, 0.35);
}

/* Theme Toggle - Special glass treatment */
.theme-toggle,
.theme-switch {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.2)) !important;
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 215, 0, 0.4) !important;
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.9) !important;
}

.theme-toggle:hover,
.theme-switch:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 193, 7, 0.35)) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Logout button - Subtle warning */
.logout-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2)) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.4) !important;
  color: white !important;
}

.logout-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.35)) !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  color: white !important;
}

/* Outline/Secondary buttons */
.btn-outline-primary,
.btn-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px);
  border: 2px solid rgba(102, 126, 234, 0.5) !important;
  color: var(--primary-purple) !important;
}

[data-theme="dark"] .btn-outline-primary,
[data-theme="dark"] .btn-secondary {
  border: 2px solid rgba(139, 92, 246, 0.6) !important;
  color: rgba(139, 92, 246, 0.9) !important;
}

.btn-outline-primary:hover,
.btn-secondary:hover {
  background: rgba(102, 126, 234, 0.15) !important;
  transform: translateY(-1px);
}

/* Input fields glass effect */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .search-bar {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .search-bar {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--glass-text-dark);
  border-radius: 10px;
}

/* Animations */
@keyframes liquidMove {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  33% {
    transform: rotate(120deg) scale(1.1);
  }
  66% {
    transform: rotate(240deg) scale(0.9);
  }
}

@keyframes floatBubble {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(40px, 10px) scale(1.05);
  }
}

/* Background gradient for the whole dashboard - Professional palette */
[data-theme="light"] body.dashboard-body {
  background: linear-gradient(135deg, #E8F5F0 0%, #D6E9E4 50%, #C4DDD7 100%);
  min-height: 100vh;
}

[data-theme="dark"] body.dashboard-body {
  background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
  min-height: 100vh;
}

/* Stats cards specific glass styling */
.stats-grid > div,
.quick-stats > div {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-grid > div::before,
.quick-stats > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple));
  border-radius: 20px 20px 0 0;
}

/* Progress bars glass effect */
.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple));
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

/* Chart containers glass effect */
.chart-container,
.chart-wrapper {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Table glass styling */
[data-theme="light"] table,
[data-theme="light"] .table {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

[data-theme="dark"] table,
[data-theme="dark"] .table {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

[data-theme="light"] thead,
[data-theme="light"] .table-header {
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] thead,
[data-theme="dark"] .table-header {
  background: rgba(0, 0, 0, 0.3);
}

/* Smooth transitions for theme switching */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Ensure text remains readable - Preserve existing text colors */
[data-theme="light"] .dashboard-sidebar {
  color: var(--glass-text-light);
}

[data-theme="dark"] .dashboard-sidebar {
  color: var(--glass-text-dark);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(107, 144, 128, 0.3);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 144, 128, 0.5);
}

/* Loading animation with glass effect */
.loading-spinner,
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(45, 123, 127, 0.5);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  backdrop-filter: blur(5px);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification glass styling */
.notification,
.alert {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Modal glass enhancement */
.modal-content,
.modal-dialog {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-dialog {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dropdown menus glass effect */
.dropdown-menu {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .dropdown-menu {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Badges and tags glass effect */
.badge,
.tag {
  background: rgba(107, 144, 128, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(107, 144, 128, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
}

/* Cards inside content sections */
.content-section .card,
.content-section .panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 15px;
}

/* Sidebar profile glass enhancement */
.sidebar-profile {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 15px;
  margin: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Search bar glass effect */
.search-container {
  position: relative;
}

.search-bar {
  width: 100%;
  padding: 12px 20px 12px 45px;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(107, 144, 128, 0.6);
}

/* Welcome section glass enhancement */
.welcome-section {
  background: linear-gradient(135deg, rgba(45, 123, 127, 0.08), rgba(107, 144, 128, 0.08));
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Quick action buttons */
.quick-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.quick-action-btn {
  flex: 1;
  min-width: 150px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Ensure existing functionality is preserved */
.sidebar-toggle {
  z-index: 10;
  position: relative;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .dashboard-sidebar {
    border-radius: 0;
    margin: 0;
  }
  
  .dashboard-header {
    border-radius: 0;
    margin: 0 0 10px 0;
  }
  
  .content-section {
    border-radius: 12px;
    padding: 15px;
  }
}

/* Fixed Logout Button Styles */
[data-theme="light"] .logout-btn,
[data-theme="light"] .sidebar-link.logout-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.6), rgba(220, 38, 38, 0.6)) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.7) !important;
  color: white !important;
}

[data-theme="light"] .logout-btn:hover,
[data-theme="light"] .sidebar-link.logout-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8)) !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  color: white !important;
  transform: translateY(-1px);
}

[data-theme="dark"] .logout-btn,
[data-theme="dark"] .sidebar-link.logout-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.35)) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  color: white !important;
}

[data-theme="dark"] .logout-btn:hover,
[data-theme="dark"] .sidebar-link.logout-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(220, 38, 38, 0.5)) !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  color: white !important;
  transform: translateY(-1px);
}

/* Enhanced Darker Buttons for Light Theme */
[data-theme="light"] .btn-primary,
[data-theme="light"] button.btn-primary,
[data-theme="light"] a.btn-primary {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.75), rgba(118, 75, 162, 0.75)) !important;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1.5px solid rgba(102, 126, 234, 0.6);
  border-radius: 12px;
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] button.btn-primary:hover,
[data-theme="light"] a.btn-primary:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85), rgba(118, 75, 162, 0.85)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* General buttons - Light Theme (Darker) */
[data-theme="light"] .btn,
[data-theme="light"] button:not(.theme-toggle):not(.logout-btn):not(.btn-primary) {
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.65), rgba(102, 126, 234, 0.65)) !important;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1.5px solid rgba(118, 75, 162, 0.5);
  border-radius: 12px;
  color: white !important;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(118, 75, 162, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

[data-theme="light"] .btn:hover,
[data-theme="light"] button:not(.theme-toggle):not(.logout-btn):not(.btn-primary):hover {
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.8), rgba(102, 126, 234, 0.8)) !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(118, 75, 162, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* CTA/Action buttons (Darker for Light Theme) */
[data-theme="light"] .enroll-btn,
[data-theme="light"] .start-course-btn,
[data-theme="light"] .continue-btn {
  background: linear-gradient(135deg, rgba(147, 101, 255, 0.75), rgba(168, 85, 247, 0.75)) !important;
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(147, 101, 255, 0.6) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(147, 101, 255, 0.35);
}

[data-theme="light"] .enroll-btn:hover,
[data-theme="light"] .start-course-btn:hover,
[data-theme="light"] .continue-btn:hover {
  background: linear-gradient(135deg, rgba(147, 101, 255, 0.85), rgba(168, 85, 247, 0.85)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 101, 255, 0.45);
}

/* Theme Toggle Button (Slightly Darker) */
[data-theme="light"] .theme-toggle,
[data-theme="light"] .theme-switch {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 193, 7, 0.35)) !important;
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 215, 0, 0.5) !important;
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white !important;
}

[data-theme="light"] .theme-toggle:hover,
[data-theme="light"] .theme-switch:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.5), rgba(255, 193, 7, 0.5)) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* ============================================
   MOBILE DASHBOARD - CLEAN CONSOLIDATED CSS
   ============================================ */

@media (max-width: 768px) {
    /* Sidebar: Narrow strip showing only hamburger */
    .dashboard-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 70px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        overflow: visible !important;
        transition: width 0.3s ease !important;
    }
    
    /* Expanded state */
    .dashboard-sidebar.sidebar-mobile-open {
        width: 280px !important;
    }
    
    /* Hide logo and branding on mobile */
    .sidebar-logo,
    .logo-text,
    .logo-img {
        display: none !important;
    }
    
    /* Show ONLY hamburger button */
    .sidebar-header {
        padding: 15px 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .sidebar-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 50px !important;
        height: 50px !important;
        margin: 0 auto !important;
        background: #667eea !important;
        border: 2px solid white !important;
        border-radius: 12px !important;
        color: white !important;
        font-size: 24px !important;
        cursor: pointer !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6) !important;
    }
    
    .sidebar-toggle i {
        color: white !important;
        font-size: 24px !important;
    }
    
    /* Hide notification button on mobile */
    .notification-btn-header {
        display: none !important;
    }
    
    /* Hide sidebar navigation until expanded */
    .sidebar-nav {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .dashboard-sidebar.sidebar-mobile-open .sidebar-nav {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Main content full width */
    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
    }
    
    /* Responsive grids */
    .course-grid {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-header {
        flex-direction: column !important;
        padding: 1rem !important;
        margin: 5px !important;
    }
    
    .search-bar {
        width: 100% !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .dashboard-sidebar {
        width: 60px !important;
    }
    
    .sidebar-toggle {
        width: 45px !important;
        height: 45px !important;
    }
}

/* FINAL FIX - Maximum Button Visibility */
@media (max-width: 768px) {
    /* Sidebar positioning */
    body .dashboard-container .dashboard-sidebar {
        width: 70px !important;
        overflow-x: visible !important;
        overflow-y: auto !important;
    }
    
    /* Button with maximum specificity */
    body .dashboard-container .dashboard-sidebar .sidebar-header #sidebar-toggle,
    body .dashboard-sidebar #sidebar-toggle,
    #sidebar-toggle.sidebar-toggle {
        display: block !important;
        width: 50px !important;
        height: 50px !important;
        margin: 10px auto !important;
        background: #667eea !important;
        border: 2px solid #ffffff !important;
        border-radius: 10px !important;
        font-size: 0 !important; /* Hide text */
        position: relative !important;
    }
    
    #sidebar-toggle i,
    #sidebar-toggle .fas {
        display: inline-block !important;
        font-size: 24px !important;
        color: white !important;
    }
}
