/* Enhanced Customer Dashboard Styles */

/* Modern Color Palette */
:root {
  --primary-color: #673AB7;
  --primary-light: #9C27B0;
  --primary-dark: #512DA8;
  --accent-color: #FF5722;
  --success-color: #4CAF50;
  --warning-color: #FF9800;
  --error-color: #F44336;
  --info-color: #2196F3;
  
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-primary: #212529;
  --text-secondary: #6C757D;
  --text-light: #ADB5BD;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
}

/* Dark Mode Support - DISABLED for better visibility */
/* Keeping light theme for all users to ensure text readability */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-light: #ADB5BD;
  }
}

/* Enhanced Dashboard Layout */
.customer-interface {
  background: var(--bg-primary);
  min-height: 100vh;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* Enhanced Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.sidebar-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(45deg, #fff, #e8eaf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Navigation */
.nav-menu {
  padding: 20px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(255,255,255,0.1);
  transition: width 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  border-left-color: var(--accent-color);
  background: rgba(255,255,255,0.1);
}

.nav-link .material-icons {
  font-size: 24px;
  opacity: 0.9;
}

.nav-link span {
  font-weight: 500;
  font-size: 0.95rem;
}

/* Enhanced Main Content */
.main-content {
  flex: 1;
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* Enhanced Header */
.dashboard-header {
  background: var(--bg-secondary);
  padding: 20px 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E9ECEF;
}

.header-title h2 {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-title h2::before {
  content: '';
  width: 4px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 2px;
}

/* Enhanced User Dropdown */
.user-dropdown {
  position: relative;
}

.user-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 2px solid #E9ECEF;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.user-button:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

/* Enhanced Content Area */
.tab-content-container {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #E9ECEF;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-title {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-content {
  padding: 24px;
}

/* Enhanced Stats Cards */
.dashboard-stats {
  margin-bottom: 32px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #E9ECEF;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.stat-content h4 {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.text-button {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.text-button:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Enhanced Empty States */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state .material-icons {
  font-size: 64px;
  color: var(--text-light);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1.125rem;
  margin: 16px 0;
}

.hint-text {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .dashboard-header {
    padding: 16px 20px;
  }
  
  .tab-content-container {
    padding: 20px 16px;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .card-content {
    padding: 20px;
  }
  
  .header-title h2 {
    font-size: 1.5rem;
  }
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid #E9ECEF;
  padding: 12px 0;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    justify-content: space-around;
  }
  
  .main-content {
    padding-bottom: 80px;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  border-radius: var(--border-radius-sm);
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--primary-color);
  background: rgba(103, 58, 183, 0.1);
}

.mobile-nav-item .material-icons {
  font-size: 20px;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E9ECEF;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Welcome Section Enhancement */
.dashboard-welcome .card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border: none;
}

.dashboard-welcome .card-title h3 {
  color: white;
  font-size: 1.5rem;
}

.dashboard-welcome .card-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Fun Fact Card Enhancement */
.fun-fact-container {
  background: linear-gradient(135deg, #E8F5E9, #F3E5F5);
  padding: 24px;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--success-color);
}

#fun-fact-text {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  font-style: italic;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
.nav-link:focus,
.btn:focus,
.user-button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  }
  
  .card {
    border: 2px solid #000;
  }
}
