/* Tracker CSS Custom Properties */
:root {
  /* Color Palette */
  --primary: 99 102 241; /* #6366f1 */
  --primary-dark: 79 70 229; /* #4f46e5 */
  --secondary: 100 116 139; /* #64748b */
  --success: 34 197 94; /* #22c55e */
  --danger: 239 68 68; /* #ef4444 */
  --warning: 245 158 11; /* #f59e0b */
  --info: 59 130 246; /* #3b82f6 */
  --light: 248 250 252; /* #f8fafc */
  --dark: 15 23 42; /* #0f172a */
  
  /* Background Colors - Light Mode */
  --background: 248 250 252; /* #f8fafc */
  --surface: 255 255 255; /* #ffffff */
  --surface-hover: 241 245 249; /* #f1f5f9 */
  
  /* Text Colors - Light Mode */
  --text-primary: 15 23 42; /* #0f172a */
  --text-secondary: 71 85 105; /* #475569 */
  --text-muted: 148 163 184; /* #94a3b8 */
  
  /* Border Colors - Light Mode */
  --border: 226 232 240; /* #e2e8f0 */
  --border-light: 241 245 249; /* #f1f5f9 */
  
  /* Sizes */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 70px;
  --header-height: 70px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  /* Background Colors - Dark Mode */
  --background: 15 23 42; /* #0f172a */
  --surface: 30 41 59; /* #1e293b */
  --surface-hover: 51 65 85; /* #334155 */
  
  /* Text Colors - Dark Mode */
  --text-primary: 248 250 252; /* #f8fafc */
  --text-secondary: 203 213 225; /* #cbd5e1 */
  --text-muted: 148 163 184; /* #94a3b8 */
  
  /* Border Colors - Dark Mode */
  --border: 51 65 85; /* #334155 */
  --border-light: 71 85 105; /* #475569 */
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: rgb(var(--background));
  color: rgb(var(--text-primary));
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Layout */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: rgb(var(--surface));
  border-right: 1px solid rgb(var(--border));
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
}
.sidebar.collapsed .sidebar-footer {
    padding: 14px;
}
.sidebar.collapsed .user-info {
    display: inline-flex
;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .menu-section-title{
  display: none;
}
.sidebar.collapsed .menu-text {
    opacity: 0;
    visibility: hidden;
}
.sidebar.collapsed .submenu-items {
    padding: 0;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-logo,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .user-details,
.sidebar.collapsed .nav-submenu {
  opacity: 0;
  visibility: hidden;
}

.sidebar.collapsed .brand {
  justify-content: center;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-header {
  padding: 1.5rem 0.5rem;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgb(var(--border-light));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: rgb(var(--text-primary));
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: rgb(var(--text-secondary));
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
}

.sidebar-menu {
  padding: 0;
  height: calc(100vh - 140px);
  overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(var(--border), 0.5);
  border-radius: 2px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--border), 0.8);
}

.menu-section {
  margin-bottom: 1.5rem;
}

.menu-section-title {
  padding: 0.75rem 1.5rem 0.5rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgb(var(--text-primary));
  border-top: 1px solid rgb(var(--border-light));
  margin-top: 1rem;
}

.menu-section:first-child .menu-section-title {
  border-top: none;
  margin-top: 0;
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  margin-bottom: 0.125rem;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.5rem;
  color: rgb(var(--text-secondary));
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
}

.menu-link:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
}

.menu-link.active {
  background: rgba(var(--primary), 0.1);
  color: rgb(var(--primary));
  border-right: 3px solid rgb(var(--primary));
}

.menu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgb(var(--primary));
}

.menu-icon {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.menu-text {
  flex: 1;
}

.menu-badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  background: rgb(var(--primary));
  color: white;
  font-weight: 600;
}

.menu-badge.warning {
  background: rgb(var(--warning));
}

.menu-badge.success {
  background: rgb(var(--success));
}

.menu-badge.danger {
  background: rgb(var(--danger));
}

/* Submenu styles */
.submenu-items {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.submenu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
  color: rgb(var(--text-muted));
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.8125rem;
  font-weight: 500;
  position: relative;
}

.submenu-link:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
}

.submenu-link.active {
  background: rgba(var(--primary), 0.08);
  color: rgb(var(--primary));
}

.submenu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgb(var(--primary));
}

.submenu-icon {
  font-size: 0.875rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Profile Avatar Placeholder */
.profile-avatar {
  position: relative;
  display: inline-block;
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  margin: 0 auto;
}

.avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgb(var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-stats {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(var(--border));
}

.profile-stats .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgb(var(--text-primary));
  margin-bottom: 0.25rem;
}

.profile-stats .stat-label {
  font-size: 0.75rem;
  color: rgb(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* User Avatar Small */
.user-avatar-sm {
  display: inline-block;
}

.avatar-placeholder-sm {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  border-top: 1px solid rgb(var(--border-light));
  background: rgb(var(--surface));
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: rgb(var(--text-primary));
  font-size: 0.875rem;
}

.user-role {
  color: rgb(var(--text-muted));
  font-size: 0.75rem;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: var(--transition);
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.header {
  height: var(--header-height);
  background: rgb(var(--surface));
  border-bottom: 1px solid rgb(var(--border));
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgb(var(--text-primary));
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgb(var(--border));
  background: rgb(var(--surface));
  color: rgb(var(--text-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}

.btn-icon:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
  border-color: rgb(var(--primary));
}

.sidebar-collapse-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgb(var(--border));
  background: rgb(var(--surface));
  color: rgb(var(--text-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-collapse-toggle:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
  border-color: rgb(var(--primary));
}

.theme-toggle {
  position: relative;
}

.theme-toggle:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--primary));
  border-color: rgb(var(--primary));
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: rgb(var(--danger));
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content {
  padding: 2rem;
}

/* Dashboard Cards */
.dashboard-card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.dashboard-card:hover {
  box-shadow: var(--shadow-lg);
}

.dashboard-card .card-header {
  padding: 1.5rem 1.5rem 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: between;
}

.dashboard-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgb(var(--text-primary));
  margin: 0;
  flex: 1;
}

.dashboard-card .card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-card .card-body {
  padding: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 500;
  color: rgb(var(--text-primary));
  margin-bottom: 0.5rem;
}

.form-control {
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  background: rgb(var(--surface));
  color: rgb(var(--text-primary));
}

.form-control:focus {
  border-color: rgb(var(--primary));
  box-shadow: 0 0 0 3px rgba(var(--primary), 0.1);
  outline: none;
}

.form-select {
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  background: rgb(var(--surface));
  color: rgb(var(--text-primary));
}

.form-check-input:checked {
  background-color: rgb(var(--primary));
  border-color: rgb(var(--primary));
}

/* Button Styles */
.header-right .btn{
  border: 1px solid #ddd;
}
.btn {
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
  color: white;
  border-color: rgb(var(--primary));
}

.btn-primary:hover {
  background: rgb(var(--primary-dark));
  border-color: rgb(var(--primary-dark));
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: rgb(var(--primary));
  border-color: rgb(var(--primary));
}

.btn-outline-primary:hover {
  background: rgb(var(--primary));
  color: white;
  transform: translateY(-1px);
}

.btn-outline-secondary {
  color: rgb(var(--text-secondary));
  border-color: rgb(var(--border));
}

.btn-outline-secondary:hover {
  background: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
}

.btn-outline-success {
  color: rgb(var(--success));
  border-color: rgb(var(--success));
}

.btn-outline-success:hover {
  background: rgb(var(--success));
  color: white;
}

.btn-outline-danger {
  color: rgb(var(--danger));
  border-color: rgb(var(--danger));
}

.btn-outline-danger:hover {
  background: rgb(var(--danger));
  color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .chat-history-col {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .content {
    padding: 1rem;
  }
  
  .header {
    padding: 0 1rem;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .chat-input-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .chat-suggestions {
    flex-direction: column;
  }
  
  .model-stats {
    grid-template-columns: 1fr;
  }
  
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utilities */
.text-primary { color: rgb(var(--text-primary)) !important; }
.text-secondary { color: rgb(var(--text-secondary)) !important; }
.text-muted { color: rgb(var(--text-muted)) !important; }
.text-success { color: rgb(var(--success)) !important; }
.text-danger { color: rgb(var(--danger)) !important; }
.text-warning { color: rgb(var(--warning)) !important; }
.text-info { color: rgb(var(--info)) !important; }

.bg-primary { background-color: rgb(var(--primary)) !important; }
.bg-success { background-color: rgb(var(--success)) !important; }
.bg-danger { background-color: rgb(var(--danger)) !important; }
.bg-warning { background-color: rgb(var(--warning)) !important; }
.bg-info { background-color: rgb(var(--info)) !important; }

.border-radius { border-radius: var(--border-radius) !important; }
.border-radius-sm { border-radius: var(--border-radius-sm) !important; }

/* Additional Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-card,
.stat-card,
.model-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgb(var(--surface-hover));
}

::-webkit-scrollbar-thumb {
  background: rgb(var(--border));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--text-muted));
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-text {
  position: absolute;
  left: 1rem;
  z-index: 10;
  color: rgb(var(--text-muted));
  background: transparent;
  border: none;
  padding: 0;
}

.input-group .form-control {
  padding-left: 3rem;
  height: 48px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius-sm);
  background: rgb(var(--surface));
  color: rgb(var(--text-primary));
  font-size: 0.875rem;
  transition: var(--transition);
}

.input-group .form-control:focus {
  border-color: rgb(var(--primary));
  box-shadow: 0 0 0 3px rgba(var(--primary), 0.1);
  outline: none;
}

.input-group .form-control:focus + .input-group-text {
  color: rgb(var(--primary));
}

.input-group button {
  position: absolute;
  right: 0.5rem;
  z-index: 10;
  background: transparent;
  border: none;
  color: rgb(var(--text-muted));
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: var(--transition);
}

.input-group button:hover {
  color: rgb(var(--text-primary));
  background: rgb(var(--surface-hover));
}

.form-text {
  font-size: 0.75rem;
  color: rgb(var(--text-muted));
  margin-top: 0.5rem;
}

/* Form Check Row */
.form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  margin: 0;
  accent-color: rgb(var(--primary));
}

.form-check-label {
  font-size: 0.875rem;
  color: rgb(var(--text-secondary));
  cursor: pointer;
  margin: 0;
}

.forgot-link {
  color: rgb(var(--primary));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.forgot-link:hover {
  color: rgb(var(--primary-dark));
  text-decoration: underline;
}

/* ===================================
   USER DROPDOWN STYLES
   =================================== */

/* Enhanced User Dropdown Styles */
.user-dropdown {
  position: relative;
}

.user-menu-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.user-menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  color: white;
}

.user-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}

.user-avatar-img, .user-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-fallback {
  background: rgba(255, 255, 255, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.user-info-header {
  text-align: left;
}
.user-menu-btn.show .user-info-header {
    color: #fff;
}
.user-name-header {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

.status-indicator.online { background: #10b981; }
.status-indicator.away { background: #f59e0b; }
.status-indicator.busy { background: #ef4444; }
.status-indicator.offline { background: #6b7280; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.user-menu-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 0;
  min-width: 320px;
  margin-top: 0.5rem;
  animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-header {
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.375rem 0.375rem 0 0;
  color: white;
}

.user-profile-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.user-profile-section .status-badge.online {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    color: #22C55E;
    position: absolute;
    bottom: -6px;
    right: -8px;
}
.user-avatar-large {
  position: relative;
  width: 56px;
  height: 56px;
}

.user-avatar-img-large, .user-avatar-fallback-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-avatar-fallback-large {
  background: rgba(255, 255, 255, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}


.user-details-dropdown {
  flex: 1;
}

.user-name-dropdown {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.user-email {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 0.85rem;
  opacity: 0.9;
  color: white;
}

.plan-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: white;
}

.plan-badge.premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: rgba(251, 191, 36, 0.3);
}

.enhanced-item {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  color: #374151;
}

.enhanced-item:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
  color: #667eea;
  transform: translateX(4px);
}

.enhanced-item.logout-item:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #667eea;
  transition: all 0.3s ease;
}

.enhanced-item:hover .item-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.1);
}

.logout-item:hover .item-icon {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
}

.item-content {
  flex: 1;
  text-align: left;
}

.item-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.item-subtitle {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.1rem;
}

.item-arrow {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.enhanced-item:hover .item-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: #e5e7eb;
}

/* Security Badge Styling */
.menu-badge.security {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  margin-left: auto;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  animation: securityPulse 2s infinite;
}

@keyframes securityPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.95); }
}

.menu-link:hover .menu-badge.security {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}


/* Success Modal */
.success-modal {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.success-modal .modal-body {
  padding: 3rem 2rem;
}

@keyframes successPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.success-modal h4 {
  color: #1f2937;
  margin-bottom: 1rem;
  font-weight: 600;
}

.success-modal p {
  color: #6b7280;
  margin-bottom: 2rem;
}


/* ===================================
   UTILITY CLASSES FOR INLINE STYLES
   =================================== */

.resend-timer-hidden {
  display: none;
}

.success-message-hidden {
  display: none;
}

.user-info-link {
  text-decoration: none;
  color: inherit;
}

.progress-bar-12 {
  width: 12.47%;
}

.progress-bar-42 {
  width: 42.3%;
}

.progress-bar-11 {
  width: 11.34%;
}

.progress-bar-25 {
  width: 25%;
}

.progress-bar-50 {
  width: 50%;
}

.progress-bar-75 {
  width: 75%;
}

.file-input-hidden {
  display: none;
}

.textarea-resize-vertical {
  resize: vertical;
}

.results-section-hidden {
  display: none;
}

.loading-state-hidden {
  display: none;
}

.progress-bar-animated {
  width: 0%;
}

.sort-select-auto-width {
  width: auto;
}

/* Dark mode support for user dropdown */
[data-theme="dark"] .user-dropdown-menu {
  background: #1f2937;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .enhanced-item {
  color: #e5e7eb;
}

[data-theme="dark"] .enhanced-item:hover {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  color: #93c5fd;
}

[data-theme="dark"] .item-icon {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  color: #93c5fd;
}

[data-theme="dark"] .dropdown-divider {
  border-color: #374151;
}

/* Responsive design for user dropdown */
@media (max-width: 768px) {
  .user-dropdown-menu {
    min-width: 280px;
  }
  
  .user-menu-btn {
    padding: 0.5rem;
    border-radius: 50%;
  }
  
  .user-menu-btn .user-info-header,
  .user-menu-btn .dropdown-arrow {
    display: none !important;
  }
}


/* High contrast mode support */
@media (prefers-contrast: high) {
  .auth-body {
    background: #000;
  }
  
  .auth-container {
    border: 2px solid #fff;
  }
  
  .form-control:focus {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .floating-element,
  .bg-pattern {
    animation: none;
  }
  
  .btn-auth:hover,
  .social-btn:hover {
    transform: none;
  }
}

/* Dark mode considerations */
@media (prefers-color-scheme: dark) {
  .auth-body {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  }
}


/* Enhanced User Dropdown Styles */
.user-dropdown {
  position: relative;
}

.user-menu-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.user-menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  color: white;
}

.user-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}

.user-avatar-img, .user-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-fallback {
  background: rgba(255, 255, 255, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.user-info-header {
  text-align: left;
}

.user-name-header {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

.status-indicator.online { background: #10b981; }
.status-indicator.away { background: #f59e0b; }
.status-indicator.busy { background: #ef4444; }
.status-indicator.offline { background: #6b7280; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.user-menu-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 0;
  min-width: 320px;
  margin-top: 0.5rem;
  animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
  from {
      opacity: 0;
      transform: translateY(-10px) scale(0.95);
  }
  to {
      opacity: 1;
      transform: translateY(0) scale(1);
  }
}

.user-avatar-img-large, .user-avatar-fallback-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-avatar-fallback-large {
  background: rgba(255, 255, 255, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.user-details-dropdown {
  flex: 1;
}

.user-name-dropdown {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.user-email {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 0.85rem;
  opacity: 0.9;
  color: white;
}

.plan-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: white;
}

.plan-badge.premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: rgba(251, 191, 36, 0.3);
}

.enhanced-item {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  color: #374151;
}

.enhanced-item:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #667eea;
  transform: translateX(4px);
}

.enhanced-item.logout-item:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #667eea;
  transition: all 0.3s ease;
}

.enhanced-item:hover .item-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.1);
}

.logout-item:hover .item-icon {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
}

.item-content {
  flex: 1;
  text-align: left;
}

.item-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.item-subtitle {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.1rem;
}

.item-arrow {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.enhanced-item:hover .item-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: #e5e7eb;
}

/* Dark mode support */
[data-theme="dark"] .user-dropdown-menu {
  background: #1f2937;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .enhanced-item {
  color: #e5e7eb;
}

[data-theme="dark"] .enhanced-item:hover {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  color: #93c5fd;
}

[data-theme="dark"] .item-icon {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  color: #93c5fd;
}

[data-theme="dark"] .dropdown-divider {
  border-color: #374151;
}

/* Responsive design */
@media (max-width: 768px) {
  .user-dropdown-menu {
      min-width: 280px;
  }
  
  .user-menu-btn {
      padding: 0.5rem;
      border-radius: 50%;
  }
  
  .user-menu-btn .user-info-header,
  .user-menu-btn .dropdown-arrow {
      display: none !important;
  }
}

/* Tooltip styles for collapsed sidebar */
.sidebar.collapsed .menu-link {
    position: relative;
}

.sidebar.collapsed .menu-link[data-bs-toggle="tooltip"] {
    cursor: pointer;
}

/* Custom tooltip styles - only for sidebar */
.sidebar .tooltip {
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar .tooltip.show {
    opacity: 1;
}

.sidebar .tooltip .tooltip-inner {
    background-color: rgb(var(--surface-dark));
    color: rgb(var(--text-primary));
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar .tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: rgb(var(--surface-dark));
}
/* ===================================
   AUTHENTICATION PAGES CSS
   =================================== */

/* Authentication Body */
.auth-body {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Auth Container */
.auth-container {
  display: flex;
  max-width: 1200px;
  width: 100%;
  min-height: 600px;
  background: rgb(var(--surface));
  border-radius: var(--border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* Auth Card */
.auth-card {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem;
  background: rgb(var(--surface));
  position: relative;
  z-index: 3;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: .5rem;
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgb(var(--text-primary));
  margin: 0;
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: rgb(var(--text-primary));
  margin: 0 0 0.5rem;
}

.auth-header p {
  color: rgb(var(--text-secondary));
  font-size: 1rem;
  margin: 0;
}

/* Auth Form */
.auth-form {
  width: 100%;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-text {
  position: absolute;
  left: 1rem;
  z-index: 10;
  color: rgb(var(--text-muted));
  background: transparent;
  border: none;
  padding: 0;
}

.input-group .form-control {
  padding-left: 3rem;
  height: 48px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius-sm);
  background: rgb(var(--surface));
  color: rgb(var(--text-primary));
  font-size: 0.875rem;
  transition: var(--transition);
}

.input-group .form-control:focus {
  border-color: rgb(var(--primary));
  box-shadow: 0 0 0 3px rgba(var(--primary), 0.1);
  outline: none;
}

.input-group .form-control:focus + .input-group-text {
  color: rgb(var(--primary));
}

.input-group button {
  position: absolute;
  right: 0.5rem;
  z-index: 10;
  background: transparent;
  border: none;
  color: rgb(var(--text-muted));
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: var(--transition);
}

.input-group button:hover {
  color: rgb(var(--text-primary));
  background: rgb(var(--surface-hover));
}

.form-text {
  font-size: 0.75rem;
  color: rgb(var(--text-muted));
  margin-top: 0.5rem;
}

/* Form Check Row */
.form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  margin: 0;
  accent-color: rgb(var(--primary));
}

.form-check-label {
  font-size: 0.875rem;
  color: rgb(var(--text-secondary));
  cursor: pointer;
  margin: 0;
}

.forgot-link {
  color: rgb(var(--primary));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.forgot-link:hover {
  color: rgb(var(--primary-dark));
  text-decoration: underline;
}

/* Password Strength */
.password-strength {
  margin-top: 0.75rem;
}

.strength-bar {
  height: 4px;
  background: rgb(var(--border-light));
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  background: rgb(var(--danger));
  transition: var(--transition);
  border-radius: 2px;
}

/* Auth Button */
.btn-auth {
  width: 100%;
  height: 48px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(var(--primary), 0.3);
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Auth Background */
.auth-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
}

.bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  background-size: 400px 400px;
  animation: float 20s ease-in-out infinite;
}
/* Customizing the pagination colors */
.pagination {
  --bs-pagination-color: #4f46e5;              /* Link text color */
  --bs-pagination-bg: #fff;                   /* Link background */
  --bs-pagination-border-color: #dee2e6;      /* Border color */

  --bs-pagination-hover-color: #5a32a3;        /* Hover text color */
  --bs-pagination-hover-bg: #f3e5f5;          /* Hover background */
  --bs-pagination-hover-border-color: #4f46e5; /* Hover border */

  --bs-pagination-active-color: #fff;         /* Active text color */
  --bs-pagination-active-bg: #4f46e5;         /* Active background */
  --bs-pagination-active-border-color: #4f46e5;/* Active border */

  --bs-pagination-focus-color: #5a32a3;
  --bs-pagination-focus-bg: #e9ecef;
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25);
}
/* Optional: Style the table header to match the theme */
.thead-custom {
    background-color: #4f46e5;
    color: white;
}
/* Ensure the active text remains white or a legible color */
.page-item.active .page-link {
    color: #fff;
}