/* ========================================
   🎨 MODERN DESIGN SYSTEM - 2025
   Shadcn UI / Aceternity / HeroUI Style
   ======================================== */

/* ========================================
   GLOBAL DESIGN TOKENS
   ======================================== */

:root {
  /* Colors now inherit from theme.css */
  /* Using CSS variables for dynamic theming */
  
  /* Legacy support - map to new theme variables */
  --border-light: var(--border-color);
  --border-dark: var(--border-color);
  --text-primary: var(--text-primary);
  --text-secondary: var(--text-secondary);
  --text-muted: var(--text-tertiary);
  --bg-white: var(--bg-primary);
  --bg-dark: var(--bg-tertiary);
  --bg-subtle: var(--bg-secondary);
  
  /* Gradients - now using theme gradients */
  --gradient-purple-blue: var(--gradient-primary);
  --gradient-blue-cyan: var(--gradient-secondary);
  --gradient-orange-pink: var(--gradient-accent);
  --gradient-green-teal: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  
  /* Pastel Icons */
  --pastel-blue: #dbeafe;
  --pastel-purple: #ede9fe;
  --pastel-orange: #fed7aa;
  --pastel-green: #d1fae5;
  --pastel-pink: #fce7f3;
  --pastel-yellow: #fef3c7;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Shadows now use theme shadows */
}

/* ========================================
   MODERN CARD SYSTEM
   ======================================== */

.modern-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.modern-card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   STAT CARDS (Dashboard)
   ======================================== */

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.stat-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: none !important;
  transform: none !important;
}

.stat-card-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
}

.stat-card-icon.purple {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #ffffff;
}

.stat-card-icon.orange {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: #ffffff;
}

.stat-card-icon.green {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #ffffff;
}

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.stat-card-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card-trend {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.stat-card-trend.up {
  background: #d1fae5;
  color: #10b981;
}

.stat-card-trend.down {
  background: #fee2e2;
  color: #ef4444;
}

/* ========================================
   BENTO GRID LAYOUT
   ======================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: var(--spacing-2xl);
}

.bento-item {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  min-height: 200px;
  transition: all 0.3s ease;
}

.bento-item:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.bento-item-large {
  grid-column: span 2;
}

/* ========================================
   FLOATING GLASS SIDEBAR
   ======================================== */

.modern-sidebar {
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 260px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--spacing-lg);
  z-index: 1000;
  overflow-y: auto;
}

.modern-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.modern-sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.modern-sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modern-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modern-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.modern-sidebar-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modern-sidebar-item.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.modern-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
}

.modern-sidebar-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   MODERN TABLE
   ======================================== */

.modern-table-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table thead {
  border-bottom: 1px solid var(--border-color);
}

.modern-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.modern-table tbody tr {
  transition: all 0.2s ease;
}

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

.modern-table tbody tr:hover {
  background: var(--bg-tertiary);
}

/* ========================================
   GRID BACKGROUND PATTERN (Aceternity)
   ======================================== */

.grid-background {
  position: relative;
  background-color: var(--bg-white);
  background-image: 
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 50px 50px;
}

.grid-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* ========================================
   SPOTLIGHT EFFECT (Mouse Follow)
   ======================================== */

.spotlight-container {
  position: relative;
  overflow: hidden;
}

.spotlight {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.spotlight-container:hover .spotlight {
  opacity: 1;
}

/* ========================================
   GRADIENT TEXT
   ======================================== */

.gradient-text {
  background: var(--gradient-purple-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-blue-cyan {
  background: var(--gradient-blue-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   HOVER LIFT CARDS (HeroUI)
   ======================================== */

.hover-lift-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.hover-lift-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: #a78bfa;
}

/* ========================================
   MODERN BUTTON SYSTEM
   ======================================== */

.modern-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.modern-btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.modern-btn-primary:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.modern-btn-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modern-btn-ghost:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

/* ========================================
   AVATAR WITH STATUS
   ======================================== */

.modern-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.modern-avatar:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.modern-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modern-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-secondary);
}

.modern-avatar-large {
  width: 80px;
  height: 80px;
}

.modern-avatar-large .modern-avatar-status {
  width: 16px;
  height: 16px;
  border-width: 3px;
}

/* ========================================
   BADGE SYSTEM
   ======================================== */

.modern-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.modern-badge-success {
  background: var(--pastel-green);
  color: #10b981;
}

.modern-badge-warning {
  background: var(--pastel-yellow);
  color: #f59e0b;
}

.modern-badge-error {
  background: #fee2e2;
  color: #ef4444;
}

.modern-badge-info {
  background: var(--pastel-blue);
  color: #2563eb;
}

/* ========================================
   HERO SECTION
   ======================================== */

.modern-hero {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
}

.modern-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.modern-hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-lg);
}

.modern-hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  font-weight: 400;
}

/* ========================================
   CONTENT LAYOUT
   ======================================== */

.modern-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.modern-main {
  margin-left: 292px; /* Sidebar width + gap */
  padding: var(--spacing-lg) var(--spacing-2xl);
  min-height: 100vh;
  max-width: none !important;
  width: calc(100% - 292px);
}

.modern-section {
  margin-bottom: var(--spacing-2xl);
}

.modern-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
}

/* ========================================
   UTILITIES
   ======================================== */

.text-gradient {
  background: var(--gradient-purple-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.backdrop-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.shadow-premium {
  box-shadow: var(--shadow-xl);
}

.border-premium {
  border: 1px solid var(--border-light);
}

.radius-premium {
  border-radius: var(--radius-md);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .modern-sidebar {
    transform: translateX(-100%);
  }
  
  .modern-sidebar.open {
    transform: translateX(0);
  }
  
  .modern-main {
    margin-left: 0;
  }
  
  .bento-item-large {
    grid-column: span 1;
  }
  
  /* Responsive table - horizontal scroll */
  .modern-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .modern-table {
    min-width: 800px;
  }
}

@media (max-width: 768px) {
  .modern-hero-title {
    font-size: 36px;
  }
  
  .stat-card-value {
    font-size: 24px;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  /* Mobile table adjustments */
  .modern-table th,
  .modern-table td {
    padding: 12px 14px;
    font-size: 13px;
  }
  
  .modern-table th {
    font-size: 11px;
  }
  
  /* Stack action buttons on mobile */
  .modern-table .btn-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .modern-table .btn-group .btn {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  /* Card layout alternative for small screens */
  @media (max-width: 600px) {
    .modern-table-container.mobile-cards {
      overflow-x: visible;
    }
    
    .modern-table-container.mobile-cards .modern-table {
      min-width: auto;
    }
    
    .modern-table-container.mobile-cards .modern-table thead {
      display: none;
    }
    
    .modern-table-container.mobile-cards .modern-table tbody,
    .modern-table-container.mobile-cards .modern-table tr {
      display: block;
    }
    
    .modern-table-container.mobile-cards .modern-table tr {
      margin-bottom: 16px;
      border: 1px solid var(--border-color);
      border-radius: 8px;
      overflow: hidden;
    }
    
    .modern-table-container.mobile-cards .modern-table td {
      display: flex;
      justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--border-color);
    }
    
    .modern-table-container.mobile-cards .modern-table td:last-child {
      border-bottom: none;
    }
    
    .modern-table-container.mobile-cards .modern-table td::before {
      content: attr(data-label);
      font-weight: 600;
      color: var(--text-secondary);
      margin-right: 12px;
      text-transform: uppercase;
      font-size: 11px;
      letter-spacing: 0.5px;
    }
  }
}

/* ========================================
   MODERN NAVIGATION STYLES
   ======================================== */

.nav-link:hover {
  background: rgba(124, 58, 237, 0.05) !important;
  color: #7c3aed !important;
}

.nav-link.active {
  background: rgba(124, 58, 237, 0.1) !important;
  color: #7c3aed !important;
}

/* Responsive navbar */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 12px;
    padding: 16px;
    box-shadow: var(--shadow-md);
  }
  
  .navbar-nav {
    flex-direction: column !important;
    width: 100%;
    gap: 8px !important;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link,
  .modern-btn {
    width: 100% !important;
    justify-content: flex-start !important;
    margin-bottom: 0 !important;
  }
  
  .modern-btn-primary {
    justify-content: center !important;
  }
}

@media (max-width: 768px) {
  .spotlight-container {
    padding: 60px 16px 40px 16px !important;
  }
  
  .container {
    padding: 0 16px !important;
  }
  
  .stat-card {
    padding: 20px !important;
  }
  
  .hover-lift-card {
    padding: 24px !important;
  }
  
  .modern-card-glass {
    border-radius: 12px;
  }
}

@media (max-width: 576px) {
  .modern-btn {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  .stat-card-value {
    font-size: 28px !important;
  }
  
  .stat-card-icon {
    width: 40px !important;
    height: 40px !important;
  }
  
  .stat-card-icon i {
    font-size: 18px !important;
  }
}

/* ========================================
   PROFILE TABS SYSTEM
   ======================================== */

.profile-tabs-container {
  background: transparent;
}

.profile-tabs-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.profile-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px;
}

.profile-tab-btn i {
  font-size: 16px;
}

.profile-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-radius: 8px 8px 0 0;
}

.profile-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.profile-tabs-content {
  min-height: 400px;
}

.profile-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.profile-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Input Fields */
.modern-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s ease;
}

.modern-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--bg-secondary);
}

.modern-input::placeholder {
  color: var(--text-tertiary);
}

.form-label {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Feature Toggle Cards */
.feature-toggle-card {
  padding: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.feature-toggle-card:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
}

/* Info Cards */
.info-card {
  padding: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

/* Avatar Dropdown */
.avatar-dropdown {
  position: relative;
}

.avatar-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-dropdown-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  transform: scale(1.05);
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.avatar-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.avatar-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.avatar-email {
  font-size: 12px;
  color: var(--text-secondary);
}

.avatar-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: none;
  z-index: 1000;
}

.avatar-dropdown.active .avatar-dropdown-menu {
  display: block;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar-dropdown-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.avatar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.avatar-dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
}

.avatar-dropdown-item i {
  width: 20px;
  font-size: 16px;
}

.avatar-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}

/* ========================================
   QUILL EDITOR DARK THEME
   FIX: Vertical Overlap & Dropdown Clipping
   ======================================== */

#bio-editor {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: visible !important;
  position: relative;
  z-index: 1;
  height: auto !important;
  min-height: 350px;
}

#bio-editor .ql-toolbar {
  background: #0a0a0a;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

#bio-editor .ql-formats {
  margin-right: 12px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

#bio-editor .ql-container {
  background: #1a1a1a;
  border: none;
  font-size: 14px;
  height: auto !important;
  min-height: 320px !important;
  max-height: 500px;
  overflow-y: auto !important;
  overflow-x: hidden;
  border-radius: 0 0 8px 8px;
}

#bio-editor .ql-editor {
  min-height: 320px !important;
  height: auto !important;
  color: #ffffff;
  padding: 16px;
  padding-bottom: 24px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-y: visible !important;
}

#bio-editor .ql-editor.ql-blank::before {
  color: rgba(255, 255, 255, 0.4);
  font-style: normal;
  left: 16px;
  right: 16px;
  top: 16px;
}

#bio-editor .ql-editor p,
#bio-editor .ql-editor ol,
#bio-editor .ql-editor ul {
  margin-bottom: 0.5em;
}

#bio-editor .ql-stroke {
  stroke: rgba(255, 255, 255, 0.6);
  transition: stroke 0.2s;
}

#bio-editor .ql-fill {
  fill: rgba(255, 255, 255, 0.6);
  transition: fill 0.2s;
}

#bio-editor .ql-picker {
  color: rgba(255, 255, 255, 0.6);
  height: 28px;
  display: inline-flex;
  align-items: center;
  overflow: visible !important;
  position: relative;
  z-index: 100;
}

#bio-editor .ql-picker-label {
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
  background: transparent;
  transition: all 0.2s;
  height: 28px;
  display: inline-flex;
  align-items: center;
}

#bio-editor .ql-picker-label:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

#bio-editor .ql-toolbar button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#bio-editor .ql-toolbar button:hover,
#bio-editor .ql-toolbar button.ql-active {
  background: rgba(59, 130, 246, 0.1);
}

#bio-editor .ql-toolbar button:hover .ql-stroke,
#bio-editor .ql-toolbar button.ql-active .ql-stroke {
  stroke: #3b82f6;
}

#bio-editor .ql-toolbar button:hover .ql-fill,
#bio-editor .ql-toolbar button.ql-active .ql-fill {
  fill: #3b82f6;
}

#bio-editor .ql-picker-options {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  z-index: 99999 !important;
  margin-top: 4px;
  min-width: 180px;
  position: absolute !important;
  display: none;
  overflow: visible !important;
}

#bio-editor .ql-snow .ql-picker.ql-expanded {
  z-index: 99999 !important;
}

#bio-editor .ql-snow .ql-picker.ql-expanded .ql-picker-options {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#bio-editor .ql-picker-item {
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

#bio-editor .ql-picker-item:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

#bio-editor .ql-picker-item.ql-selected {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

#bio-editor .ql-snow .ql-picker.ql-expanded .ql-picker-label {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

#bio-editor .ql-snow .ql-picker.ql-expanded .ql-picker-options {
  display: block;
}

/* Header dropdown specific styling */
#bio-editor .ql-picker.ql-header {
  width: 130px;
}

#bio-editor .ql-picker.ql-header .ql-picker-label {
  padding-left: 12px;
  padding-right: 30px;
  position: relative;
}

#bio-editor .ql-picker.ql-header .ql-picker-label::before {
  content: 'Normal';
}

#bio-editor .ql-picker.ql-header .ql-picker-label[data-value="1"]::before {
  content: 'Heading 1';
}

#bio-editor .ql-picker.ql-header .ql-picker-label[data-value="2"]::before {
  content: 'Heading 2';
}

#bio-editor .ql-picker.ql-header .ql-picker-label[data-value="3"]::before {
  content: 'Heading 3';
}

#bio-editor .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  content: 'Heading 1';
  font-size: 18px;
  font-weight: 600;
}

#bio-editor .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  content: 'Heading 2';
  font-size: 16px;
  font-weight: 600;
}

#bio-editor .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  content: 'Heading 3';
  font-size: 14px;
  font-weight: 600;
}

#bio-editor .ql-picker.ql-header .ql-picker-item:not([data-value])::before {
  content: 'Normal';
  font-size: 14px;
}

/* Prevent overlap with fields below editor */
.col-12:has(#bio-editor) {
  overflow: visible !important;
  margin-bottom: 40px !important;
  position: relative;
  z-index: 1;
}

.modern-card,
.profile-tab-pane {
  overflow: visible !important;
  position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .profile-tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .profile-tab-btn {
    white-space: nowrap;
  }
}

/* ========================================
   LIGHT MODE OVERRIDES
   ======================================== */

html.light-mode .modern-card,
html.light-theme .modern-card,
html.light-mode .stat-card,
html.light-theme .stat-card,
html.light-mode .bento-item,
html.light-theme .bento-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

html.light-mode .modern-card:hover,
html.light-theme .modern-card:hover,
html.light-mode .stat-card:hover,
html.light-theme .stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html.light-mode .modern-card-glass,
html.light-theme .modern-card-glass {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

html.light-mode .stat-card-icon,
html.light-theme .stat-card-icon {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html.light-mode .modern-sidebar,
html.light-theme .modern-sidebar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

html.light-mode .modern-sidebar-item:hover,
html.light-theme .modern-sidebar-item:hover,
html.light-mode .modern-sidebar-item.active,
html.light-theme .modern-sidebar-item.active {
  background: rgba(0, 0, 0, 0.04);
}

html.light-mode .modern-table-container,
html.light-theme .modern-table-container {
  background: #ffffff;
}

html.light-mode .modern-table thead,
html.light-theme .modern-table thead {
  background: #f9fafb;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

html.light-mode .modern-table tbody tr,
html.light-theme .modern-table tbody tr {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

html.light-mode .modern-table tbody tr:hover,
html.light-theme .modern-table tbody tr:hover {
  background: #f9fafb;
}

html.light-mode .badge,
html.light-theme .badge {
  background: #f3f4f6;
  color: #111827;
}

html.light-mode .badge-primary,
html.light-theme .badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

html.light-mode .badge-success,
html.light-theme .badge-success {
  background: #d1fae5;
  color: #065f46;
}

html.light-mode .badge-warning,
html.light-theme .badge-warning {
  background: #fef3c7;
  color: #92400e;
}

html.light-mode .badge-danger,
html.light-theme .badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

html.light-mode .modern-btn-secondary,
html.light-theme .modern-btn-secondary {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.2);
  color: #111827;
}

html.light-mode .modern-btn-secondary:hover,
html.light-theme .modern-btn-secondary:hover {
  background: #f9fafb;
  border-color: rgba(0, 0, 0, 0.3);
}

/* Fix button visibility in light mode */
html.light-mode .modern-btn-primary,
html.light-theme .modern-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  border: none;
}

html.light-mode .modern-btn-primary:hover,
html.light-theme .modern-btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

html.light-mode .timeline-item::before,
html.light-theme .timeline-item::before {
  background: rgba(0, 0, 0, 0.1);
}

html.light-mode .timeline-dot,
html.light-theme .timeline-dot {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.2);
}

html.light-mode .timeline-content,
html.light-theme .timeline-content {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

html.light-mode .profile-tab-btn,
html.light-theme .profile-tab-btn {
  color: #6b7280;
}

html.light-mode .profile-tab-btn.active,
html.light-theme .profile-tab-btn.active,
html.light-mode .profile-tab-btn:hover,
html.light-theme .profile-tab-btn:hover {
  color: #111827;
  background: rgba(0, 0, 0, 0.04);
}

html.light-mode .profile-tab-btn.active::after,
html.light-theme .profile-tab-btn.active::after {
  background: #3b82f6;
}
