/* 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;
}

/* Stat Cards */
.stat-card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.stat-icon.bg-primary {
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--primary-dark)) 100%);
}

.stat-icon.bg-success {
  background: linear-gradient(135deg, rgb(var(--success)) 0%, #16a34a 100%);
}

.stat-icon.bg-warning {
  background: linear-gradient(135deg, rgb(var(--warning)) 0%, #d97706 100%);
}

.stat-icon.bg-danger {
  background: linear-gradient(135deg, rgb(var(--danger)) 0%, #dc2626 100%);
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.875rem;
  font-weight: 700;
  color: rgb(var(--text-primary));
  margin: 0 0 0.25rem;
}

.stat-label {
  color: rgb(var(--text-secondary));
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-change.positive {
  background: rgba(var(--success), 0.1);
  color: rgb(var(--success));
}

.stat-change.negative {
  background: rgba(var(--danger), 0.1);
  color: rgb(var(--danger));
}

.stat-change.neutral {
  background: rgba(var(--secondary), 0.1);
  color: rgb(var(--secondary));
}

/* Stat Card Footer */
.stat-card-footer {
  border-top: 1px solid rgb(var(--border));
  padding: 0.625rem 0;
  margin-top: auto;
}

.stat-card-footer a.more-info {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(var(--primary));
  text-decoration: none;
  transition: var(--transition);
}

.stat-card-footer a.more-info:hover {
  color: rgb(var(--primary-dark));
  gap: 0.5rem;
}

.stat-card-footer a.more-info .arrow {
  font-size: 0.75rem;
  transition: transform var(--transition);
}

.stat-card-footer a.more-info:hover .arrow {
  transform: translateX(3px);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(var(--text-primary));
  margin-bottom: 0.25rem;
}
/* .form-label {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 400;
    margin-bottom: 0.25rem;
}*/

.form-control {
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius-sm);
  padding: .375rem .75rem;
  transition: var(--transition);
  background: rgb(var(--surface));
  color: rgb(var(--text-primary));
  font-size: 0.875rem;
}

.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: .375rem 2.25rem .375rem .75rem;
  background: rgb(var(--surface));
  color: rgb(var(--text-primary));
  font-size: 0.875rem;
}

.form-check-input:checked {
  background-color: rgb(var(--primary));
  border-color: rgb(var(--primary));
}

.section-header .noback {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header {
    background-color: #f0f0f0;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin-bottom: 6px;
}


/* 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; }
.bg-black { background-color: #000 }

.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;
}
/* Bootstrap 5 dynamically generated table data for accounts and contacts */
#accountsTable tbody tr {
  cursor: pointer;
}
#contactsTable tbody tr {
  cursor: pointer;
}
/* Dashboard Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-feed .activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.activity-feed .activity-icon {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}
.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.activity-content h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--text-primary));
  margin: 0 0 0.25rem;
}
.activity-content p {
  font-size: 0.875rem;
  color: rgb(var(--text-secondary));
  margin: 0 0 0.25rem;
}
.activity-content small {
  color: rgb(var(--text-muted));
}
.activity-content .textsmalldark {
  font-size: 0.875rem;
  color: rgb(var(--dark));
}
.left-border {
  border-left: 4px solid rgb(var(--dark));
  background: rgba(var(--primary), 0.02);
}
/* ===================================
   Project STYLES
   =================================== */

.project-list {
  max-height: 600px;
  overflow-y: auto;
}

.project-category {
  border-bottom: 1px solid #eee;
  margin-bottom: 0.5rem;
}

.category-header {
  padding: 0.75rem 1rem;
  background: #f0f0f0;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #000;
  border-bottom: 1px solid #dee2e6;
}

.project-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.project-link {
  display: flex;
  align-items: center;
  color: #000000;
  text-decoration: none;
  transition: var(--transition);
  gap: 0.5rem;
}

.project-item:hover {
  background: #f8f9fa;
  border-left-color: #007bff;
}

.project-item.active {
  background: #e3f2fd;
  border-left-color: #007bff;
  color: #007bff;
  font-weight: 500;
}

.project-item i {
  width: 20px;
  text-align: center;
}

.projectdetail-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.form-label.fw-bold {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 500;
}
/*  Project Details page card body swap */

#quick-access-tab .nav-link {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 0;
    padding: 0.75rem 1rem;
}

#quick-access-tab .nav-link:hover {
  background: #f8f9fa;
  border-left-color: #007bff;
}


#quick-access-tab .nav-link.active {
  background: #e3f2fd;
  border-left-color: #007bff;
  color: #000;
  font-weight: 500;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
}

/*  Project Details Notes */
.note-input-container {
  background: rgb(var(--surface));
  /*border-top: 1px solid rgb(var(--border));*/
  padding: 1.5rem;
}
.note-modal-header {
    background: #344054;
    color: white;
}

.note-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--border-radius);
  padding: 0.75rem;
}
.note-input-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.note-input {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: rgb(var(--text-primary));
  min-height: 24px;
  max-height: 120px;
}
.note-history {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.history-btn {
  background: rgb(var(--surface-hover));
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: rgb(var(--text-secondary));
  cursor: pointer;
  transition: var(--transition);
}

.history-btn:hover {
  background: rgb(var(--primary));
  color: white;
  border-color: rgb(var(--primary));
}
.drop-zone {
  border: 2px dashed #6c757d;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
/*  Project Details attachments drop zone */
.drop-zone:hover,
.drop-zone.dragover {
  border-color: #0d6efd;
  background-color: #e9f3ff;
}

.drop-zone input[type="file"] {
  display: none;
}

.file-meta {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Quotes Tab */
  .details-wrapper {
  max-width: 100%;
  /*max-width: 1400px;*/
  margin: 12px auto;
  padding: 0 8px;
}

.detail-column {
  padding: 0 12px;
}

.detail-row {
  min-height: 42px;
  border-bottom: 1px solid #d9d9d9;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6px 28px 6px 0;
  font-size: 14px;
}

.detail-label {
  width: 160px;
  color: #000000;
  flex-shrink: 0;
  line-height: 1.2;
  font-weight: 600;
}

.detail-value {
  flex: 1;
  color: #222;
  line-height: 1.2;
  word-break: break-word;
}

.detail-value a {
  color: #0d6efd;
  text-decoration: underline;
}

.edit-icon {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  font-size: 14px;
  cursor: pointer;
}

.user-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}


.create-project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px dotted #222;
  border-radius: 3px;
}

@media (max-width: 991.98px) {
  .detail-label {
    width: 160px;
  }
}

@media (max-width: 767.98px) {
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 28px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .detail-label {
    width: 100%;
    margin-bottom: 4px;
    font-weight: 600;
  }

  .detail-value {
    width: 100%;
  }
}
.responsive-table {
  font-size: .875rem;
}
@media (max-width: 768px) {
  .responsive-table {
    font-size: 0.875rem;
  }
}
.text-initial-case {
    text-transform: capitalize;
}
.note_button_padding {
  padding: 0.5rem .5rem !important;
}
/* Image Modal */
#imageModal .modal-header {
  background: #344054;
  color: #fff;
  border-bottom: none;
  padding: 0.75rem 1rem;
}

#imageModal .modal-header .modal-title {
  font-size: 1rem;
  font-weight: 600;
}

#imageModal .modal-header .btn-close {
  filter: invert(1);
}

#imageModal .modal-body {
  background: #13131f;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#imageModal .modal-body img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#imageModal .modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

#imageModal .btn-download {
  background-color: #6366f1;
  color: #fff;
  border: none;
  font-size: 0.85rem;
}

#imageModal .btn-download:hover {
  background-color: #3a75d4;
  color: #fff;
}

#imageModal .btn-delete {
  background-color: #e74c3c;
  color: #fff;
  border: none;
  font-size: 0.85rem;
}

#imageModal .btn-delete:hover {
  background-color: #c0392b;
  color: #fff;
}

#imageModal .header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Delete confirmation overlay */
#imageModal .delete-confirm {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  border-radius: 12px;
}

#imageModal .delete-confirm.show {
  display: flex;
}

#imageModal .delete-confirm p {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}
.nav-pills {
    --bs-nav-link-color: #000;
    --bs-nav-pills-link-active-color: #fff;
    --bs-nav-pills-link-active-bg: #0d6efd;
}
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .form-control {
    padding-right: 2.5rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}
/* Custom Modals */

.form-label.required::before {
    content: "* ";
    color: #dc3545;
}

.form-control, .form-select {
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .form-control {
    padding-right: 2.5rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.dual-listbox-container {
    margin-top: 0.023rem;
}

.dual-listbox {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.listbox-panel {
    flex: 1;
}

.listbox-header {
    font-size: 0.75rem;
    color: #495057;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.listbox {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    min-height: 200px;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background-color: #fff;
}

.listbox-item {
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    user-select: none;
}

.listbox-item:hover {
    background-color: #e9ecef;
}

.listbox-item.selected {
    background-color: #0d6efd;
    color: #fff;
}

.listbox-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.listbox-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ced4da;
    background-color: #fff;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.listbox-btn:hover:not(:disabled) {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.listbox-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.sales-total-item {
    font-size: 0.85rem;
    color: #333;
    padding: 2px 0;
}
.checklist-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}
.address-search-wrapper {
    position: relative;
}
.address-search-wrapper .bi-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}
.subheading {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
}
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    /*justify-content: center;
    gap: 8px;*/
}

.form-check-input {
    border: 1px solid #ced4da;
}

.section-divider {
    margin: 1.5rem 0;
    border-top: 1px solid #e9ecef;
}
.modal-body {
  background-color: #f8f9fc;
}


/* Custom Leads Modal */
#leadsModal .modal-dialog {
  max-width: 780px;
}

#leadsModal .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* Header */
#leadsModal .modal-header {
  background: #344054;
  color: white;
  padding: 1.5rem 2rem;
  border: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

#leadsModal .leads-modal-title {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.3px;
  color: white;
  margin: 0;
}

#leadsModal .leads-modal-subtitle {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
  color: white;
}

#leadsModal .leads-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.8;
  cursor: pointer;
  padding: 0;
}

#leadsModal .leads-close-btn:hover { opacity: 1; }

/* Scrollable body */
#leadsModal .modal-body {
  padding: 0;
  background: #f8f9fc;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* Form wrapper */
#leadsModal .leads-form-inner {
  padding: 2rem;
}

/* Section headings */
#leadsModal .leads-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1.25rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ede9fe;
}

#leadsModal .leads-section-heading i {
  color: #4f46e5;
  font-size: 1.1rem;
}

/* Labels */
#leadsModal .leads-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 4px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#leadsModal .leads-required-star {
  color: #e63757;
  margin-left: 2px;
}

/* Inputs & selects */
#leadsModal .leads-input,
#leadsModal .leads-select,
#leadsModal .leads-account,
#leadsModal .leads-owner,
#leadsModal .leads-textarea {
  width: 100%;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  color: #212529;
  outline: none;
  box-sizing: border-box;
}

#leadsModal .leads-input:focus,
#leadsModal .leads-select:focus,
#leadsModal .leads-account:focus,
#leadsModal .leads-owner:focus,
#leadsModal .leads-textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

#leadsModal .leads-input.leads-invalid,
#leadsModal .leads-account.leads-invalid,
#leadsModal .leads-owner.leads-invalid,
#leadsModal .leads-select.leads-invalid {
  border-color: #e63757;
}

#leadsModal .leads-textarea {
  resize: vertical;
  min-height: 90px;
}

/* Input with icon */
#leadsModal .leads-input-wrap {
  position: relative;
}

#leadsModal .leads-input-wrap .leads-input {
  padding-left: 2.4rem;
}

#leadsModal .leads-field-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Validation message */
#leadsModal .leads-invalid-msg {
  font-size: 0.75rem;
  color: #e63757;
  margin-top: 3px;
  display: none;
}

#leadsModal .leads-invalid-msg.leads-show {
  display: block;
}

/* Divider between sections */
#leadsModal .leads-section-gap {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

/* Owner badge */
#leadsModal .leads-owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ede9fe;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #4f46e5;
  font-weight: 600;
}

#leadsModal .leads-owner-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #4f46e5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Scope of Work chips */
#leadsModal .leads-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

#leadsModal .leads-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  font-size: 0.85rem;
  color: #495057;
  user-select: none;
}

#leadsModal .leads-chip:hover {
  border-color: #4f46e5;
  background: #f5f3ff;
}

#leadsModal .leads-chip.leads-chip-selected {
  border-color: #4f46e5;
  background: #ede9fe;
  color: #4f46e5;
  font-weight: 600;
}

#leadsModal .leads-chip-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

#leadsModal .leads-chip.leads-chip-selected .leads-chip-icon {
  background: #4f46e5;
  color: white;
}

/* Footer */
#leadsModal .modal-footer {
  background: white;
  border-top: 1px solid #e9ecef;
  padding: 1rem 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#leadsModal .leads-btn-cancel {
  background: transparent;
  border: 1.5px solid #dee2e6;
  color: #6c757d;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#leadsModal .leads-btn-cancel:hover {
  border-color: #adb5bd;
  color: #495057;
  background: #f8f9fa;
}

#leadsModal .leads-btn-save-new {
  background: white;
  border: 1.5px solid #4f46e5;
  color: #4f46e5;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#leadsModal .leads-btn-save-new:hover {
  background: #f5f3ff;
}

#leadsModal .leads-btn-save {
  background: #4f46e5;
  border: none;
  color: white;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#leadsModal .leads-btn-save:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}

@media (max-width: 600px) {
  #leadsModal .leads-scope-grid { grid-template-columns: 1fr; }
}

/* Buttons */
.btn-new {
  background: #4f46e5;
  border: none;
  color: white;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-new:hover {
  background: #4338ca;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}
.btn-save-new {
  background: white;
  border: 1.5px solid #4f46e5;
  color: #4f46e5;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-save-new:hover {
  background: #f5f3ff;
  border: 1.5px solid #4f46e5;
}
.btn-save {
  background: #4f46e5;
  border: none;
  color: white;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-save:hover {
  background: #4338ca;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}
.btn-cancel {
  background: #f8f9fa;
  border: 1.5px solid #adb5bd;
  color: #6c757d;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel:hover {
  border-color: #adb5bd;
  color: #495057;
  background: white;
}
.btn-delete {
  background: white;
  border: 1.5px solid rgb(var(--danger));
  color: rgb(var(--danger));
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-delete:hover {
  background: #f5f3ff;
  border: 1.5px solid rgb(var(--danger));
  color: rgb(var(--danger));
}
.btn-print-csv {
  background: #f0f0f0;
  border: 1.5px solid #adb5bd;
  color: #000;
  border-radius: 8px;
  padding: 0.5rem .8rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-print-csv:hover {
  background: #f5f3ff;
  border: 1.5px solid #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}
.btn-print-pdf {
  background: #f0f0f0;  
  border: 1.5px solid #adb5bd;
  color: #000;
  border-radius: 8px;
  padding: 0.5rem .8rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-print-pdf:hover {
  background: #f5f3ff;
  border: 1.5px solid #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}

/* Bootstrap Modal Style Overrides */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.3px;
    color: white;
    margin: 0;
}
/* Rating Color */
.ratings-cold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2d29fc;
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
}
.ratings-warm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fcf829;
  border-radius: 8px;
  padding: 6px 12px;
  color: #000;
}
.ratings-hot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fa3333;
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
}
/* Reports */
.report-card { background: #fff;}
.summary-box { background: #eef4fb; border-radius: 6px; padding: 16px 24px; }
.summary-box h6 { color: #555; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.summary-box .val { font-size: 1.6rem; font-weight: 700; color: #1a1a2e; }
.summary-box .lbl { font-size: 0.78rem; color: #777; }
/*.table thead th { background: #f0f4fa; color: #4a6080; font-weight: 600; font-size: 0.78rem; border-bottom: 2px solid #d8e3f0; white-space: nowrap; }
.table tbody td { vertical-align: middle; font-size: 0.82rem; }*/
.link-cell a { color: #2563eb; text-decoration: none; font-weight: 500; }
.link-cell a:hover { text-decoration: underline; }
.grand-total td { font-weight: 700; background: #f8fafc; border-top: 2px solid #d8e3f0; }
.badge-status { font-size: 0.75rem; padding: 3px 8px; border-radius: 12px; background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.filter-bar { background: #fff; border-radius: 8px;}

.col-fixed-55 { width: 55px; min-width: 55px; }

/* Projects Toolbar */
.projects-toolbar-right {
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.projects-search {
    width: 260px;
    min-width: 260px;
    flex: 0 0 260px;
}

.projects-toolbar-right .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 1199.98px) {
    .projects-toolbar-right {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .projects-toolbar-right {
        flex-wrap: wrap;
    }

    .projects-search {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }
}

/* Change the background color when the toggle is ON */
.form-switch .form-check-input:checked {
    background-color: #5c60f5; /* Replace with your exact primary hex code */
    border-color: #5c60f5;
}

/* Optional: Adjust the focus shadow (glow) to match */
.form-check-input:focus {
    border-color: #5c60f5;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(92, 96, 245, 0.25);
}

/* Lorne, if you want the toggle handle to be a specific color change the value below and un-comment
.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ff0000'/%3e%3c/svg%3e");
}*/

/* Modal GC & Subs */
    .modal-header-custom {
      background: #344054;
      color: white;
      border-radius: 0.5rem 0.5rem 0 0;
      padding: 1rem 1.25rem;
    }

    .modal-header-custom .btn-close {
      filter: invert(1);
      opacity: 1;
    }

    .modal-header-custom h5 {
      font-size: 1.1rem;
      font-weight: 700;
      margin: 0;
    }

    .modal-header-custom p {
      font-size: 0.78rem;
      margin: 0.15rem 0 0;
      opacity: 0.9;
    }

    .section-title {
      font-weight: 700;
      font-size: 1rem;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      border-bottom: 1px solid #dee2e6;
      padding-bottom: 0.5rem;
      margin-bottom: 1rem;
      color: #212529;
    }

    .section-title i {
      color: #4f46e5;
    }

    .list-label {
      font-size: 0.75rem;
      color: #6c757d;
      margin-bottom: 0.3rem;
    }

    .dual-list {
      height: 200px;
      overflow-y: auto;
      border: 1px solid #ced4da;
      border-radius: 0.375rem;
      background: #fff;
      padding: 0.25rem 0;
    }

    .dual-list .list-item {
      padding: 0.4rem 0.75rem;
      font-size: 0.85rem;
      cursor: pointer;
      user-select: none;
      color: #212529;
    }

    .dual-list .list-item:hover {
      background: #e8e8ff;
    }

    .dual-list .list-item.selected {
      background: #c7d2fe;
      color: #1e1b4b;
    }

    .dual-list .list-item.inactive {
      color: #6c757d;
    }

    .dual-list .list-item .badge-star {
      color: #dc3545;
      font-weight: 700;
    }

    .transfer-btns {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }

    .transfer-btns .btn {
      width: 36px;
      height: 36px;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #ced4da;
      background: #fff;
      color: #495057;
      border-radius: 0.375rem;
    }

    .transfer-btns .btn:hover {
      background: #4f46e5;
      color: #fff;
      border-color: #4f46e5;
    }

    .select-all-label {
      font-size: 0.82rem;
      color: #6c757d;
      margin-bottom: 0.75rem;
    }
    /* Breadcrumb */
    .breadcrumb-container {
        background: transparent;
    }
    .breadcrumb {
        font-size: 13px;
    }
    .breadcrumb-item a {
        color: #6b7280;
        text-decoration: none;
        font-weight: 500;
    }
    .breadcrumb-item a:hover {
        color: #4f46e5;
    }
    .breadcrumb-item.active {
        color: #111827;
        font-weight: 600;
    }
    .breadcrumb-item + .breadcrumb-item::before {
        color: #9ca3af;
    }
        /* ---------- Quick-Activity trigger button ---------- */
    .qa-trigger {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 16px;
        border: none;
        border-radius: 8px;
        background: #0d6efd;
        /*background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);*/
        color: #fff;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        cursor: pointer;
        transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
        white-space: nowrap;
        position: relative;
    }
    .qa-trigger i.qa-icon   { font-size: 1.05rem; transition: transform 0.3s; }
    .qa-trigger i.qa-caret  { font-size: 0.7rem; opacity: 0.8; transition: transform 0.3s; }
    .qa-trigger:hover {
        background: linear-gradient(135deg, #3a56d4 0%, #3049c0 100%);
        box-shadow: 0 4px 14px rgba(67,97,238,0.35);
    }
    .qa-trigger:active { transform: scale(0.97); }
    .qa-trigger:focus-visible {
        outline: 2px solid #4361ee;
        outline-offset: 3px;
        box-shadow: 0 0 0 4px rgba(67,97,238,0.25);
    }
    .qa-trigger[aria-expanded="true"] i.qa-caret { transform: rotate(180deg); }

    /* ---------- Quick-Activity wrapper (positioned) ---------- */
    .qa-wrapper {
        position: relative;
        display: inline-block;
        margin-right: 8px;
    }

    /* ---------- Dropdown panel ---------- */
    .qa-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 1050;
        min-width: 300px;
        background: #fff;
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
        padding: 6px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.97);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }
    .qa-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }



    /* Menu section label */
    .qa-section-label {
        padding: 8px 16px 4px;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #adb5bd;
        pointer-events: none;
    }

    /* Menu items */
    .qa-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 16px;
        cursor: pointer;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        font-size: 0.85rem;
        color: #212529;
        transition: background 0.15s;
        border-radius: 0;
    }
    .qa-item:hover, .qa-item:focus {
        background: #f4f6ff;
        outline: none;
    }
    .qa-item:focus-visible {
        background: #f4f6ff;
        box-shadow: inset 3px 0 0 #4361ee;
    }
    .qa-item:active { background: #e8ecff; }

    .qa-item-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px; height: 36px;
        border-radius: 8px;
        flex-shrink: 0;
        font-size: 1rem;
    }
    .qa-item-icon.call   { background: #e7f0ff; color: #0d6efd; }
    .qa-item-icon.task   { background: #e6f4ec; color: #198754; }
    .qa-item-icon.event  { background: #fff3e6; color: #fd7e14; }
    .qa-item-icon.email  { background: #f0ebff; color: #6f42c1; }

    .qa-item-text { flex: 1; min-width: 0; }
    .qa-item-title {
        display: block;
        font-weight: 600;
        line-height: 1.25;
    }
    .qa-item-desc {
        display: block;
        font-size: 0.72rem;
        color: #6c757d;
        line-height: 1.3;
        margin-top: 1px;
    }

    .qa-item-kbd {
        font-size: 0.65rem;
        color: #52667a;
        padding: 2px 6px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 4px;
        font-family: 'SFMono-Regular', Consolas, monospace;
        flex-shrink: 0;
    }

    .qa-divider {
        height: 1px;
        background: #f0f0f0;
        margin: 4px 0;
    }

    /* ---------- Visual separator before bell icon ---------- */
    .qa-separator {
        width: 1px;
        height: 24px;
        background: rgba(128,128,128,0.25);
        margin: 0 6px;
        flex-shrink: 0;
    }



    /* ---------- Mobile ---------- */
    @media (max-width: 767.98px) {
        .qa-trigger .qa-label { display: none; }
        .qa-trigger { padding: 8px 10px; border-radius: 6px; }
        .qa-menu {
            min-width: 260px;
            right: -20px;     /* nudge so it doesn't clip right edge */
        }
        .qa-item-kbd { display: none; }
    }

    @media (max-width: 400px) {
        .qa-menu { min-width: 220px; right: -40px; }
    }

    /* ── Activities Modal Specific ── */
    /* =========================================================
       ACTIVITIES TAB — UI/UX refresh (2026)
       Scoped design tokens for the four activity types so the
       palette stays consistent across cards, tabs, timeline & badges.
       ========================================================= */
    #activities-pane {
      --act-call:  #0d6efd;  --act-call-soft:  #e7f0ff;
      --act-task:  #198754;  --act-task-soft:  #e6f4ec;
      --act-event: #f97316;  --act-event-soft: #fff3e6;
      --act-email: #7c3aed;  --act-email-soft: #f1ebff;
      --act-ink:     #1f2937;
      --act-muted:   #6b7280;
      --act-line:    #e9edf2;
      --act-surface: #ffffff;
      --act-radius:  14px;
      --act-shadow:        0 1px 3px rgba(16,24,40,.06);
      --act-shadow-hover:  0 10px 26px rgba(16,24,40,.12);
    }

    /* ── Stats Bar ── */
    .activity-stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 22px;
    }
    .act-stat-card {
      background: var(--act-surface);
      border: 1px solid var(--act-line);
      border-left: 4px solid transparent;
      border-radius: var(--act-radius);
      padding: 16px 18px;
      display: flex; align-items: center; gap: 14px;
      box-shadow: var(--act-shadow);
      cursor: pointer; position: relative; overflow: hidden;
      transition: box-shadow .22s ease, transform .18s ease, border-color .2s ease;
    }
    .act-stat-card::after {
      content: ''; position: absolute; inset: 0;
      background: currentColor; opacity: 0; transition: opacity .2s ease;
      pointer-events: none;
    }
    .act-stat-card:hover { box-shadow: var(--act-shadow-hover); transform: translateY(-3px); }
    .act-stat-card:hover::after { opacity: .03; }
    .act-stat-card:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
    .act-stat-card.call  { color: var(--act-call);  border-left-color: var(--act-call); }
    .act-stat-card.task  { color: var(--act-task);  border-left-color: var(--act-task); }
    .act-stat-card.event { color: var(--act-event); border-left-color: var(--act-event); }
    .act-stat-card.email { color: var(--act-email); border-left-color: var(--act-email); }
    .act-stat-icon {
      width: 46px; height: 46px; border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem; flex-shrink: 0;
      background: currentColor;
    }
    .act-stat-icon > i { color: #fff; }
    .act-stat-card.call  .act-stat-icon { background: var(--act-call-soft);  color: var(--act-call); }
    .act-stat-card.task  .act-stat-icon { background: var(--act-task-soft);  color: var(--act-task); }
    .act-stat-card.event .act-stat-icon { background: var(--act-event-soft); color: var(--act-event); }
    .act-stat-card.email .act-stat-icon { background: var(--act-email-soft); color: var(--act-email); }
    .act-stat-card .act-stat-icon > i { color: inherit; }
    .act-stat-label {
      font-size: .72rem; color: var(--act-muted);
      text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
    }
    .act-stat-count { font-size: 1.65rem; font-weight: 700; line-height: 1.05; color: var(--act-ink); }

    /* ── Sub-tabs (pills) ── */
    .activity-subtabs { gap: 8px; }
    .activity-subtabs .nav-link {
      border-radius: 999px !important;
      padding: 6px 18px;
      font-size: .85rem; font-weight: 500;
      color: #475467;
      border: 1px solid var(--act-line) !important;
      background: #fff;
      transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
    }
    .activity-subtabs .nav-link:hover { background: #f4f6fa; color: var(--act-ink); transform: translateY(-1px); }
    .activity-subtabs .nav-link:focus-visible { outline: 2px solid var(--act-call); outline-offset: 2px; }
    .activity-subtabs .nav-link.active {
      background: var(--act-call) !important; color: #fff !important;
      border-color: var(--act-call) !important;
      box-shadow: 0 4px 10px rgba(13,110,253,.28);
    }
    .activity-subtabs .nav-link.act-task-tab.active  { background: var(--act-task) !important;  border-color: var(--act-task) !important;  box-shadow: 0 4px 10px rgba(25,135,84,.28); }
    .activity-subtabs .nav-link.act-event-tab.active { background: var(--act-event) !important; border-color: var(--act-event) !important; box-shadow: 0 4px 10px rgba(249,115,22,.28); }
    .activity-subtabs .nav-link.act-email-tab.active { background: var(--act-email) !important; border-color: var(--act-email) !important; box-shadow: 0 4px 10px rgba(124,58,237,.28); }

    /* ── Panel card ── */
    .act-panel {
      background: var(--act-surface);
      border: 1px solid var(--act-line);
      border-radius: var(--act-radius);
      box-shadow: var(--act-shadow); overflow: hidden;
    }
    .act-panel-header {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 14px 18px; border-bottom: 1px solid var(--act-line);
      background: #fcfcfd;
    }
    .act-panel-header h6 { margin: 0; font-weight: 600; font-size: .92rem; color: var(--act-ink); display: flex; align-items: center; }
    .btn-act-add {
      font-size: .78rem; font-weight: 600; padding: 6px 14px; border-radius: 999px;
      display: inline-flex; align-items: center; gap: 6px;
      box-shadow: 0 2px 6px rgba(13,110,253,.22);
      transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
    }
    .btn-act-add:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(13,110,253,.3); filter: brightness(1.03); }
    .btn-act-add:active { transform: translateY(0); }

    /* ── Tables ── */
    .act-table { margin: 0; font-size: .82rem; }
    .act-table thead th {
      background: #f8f9fb; font-weight: 600; font-size: .72rem;
      text-transform: uppercase; letter-spacing: .05em;
      color: var(--act-muted); border-bottom: 1px solid var(--act-line);
      padding: 10px 14px; white-space: nowrap;
    }
    .act-table tbody td { padding: 11px 14px; vertical-align: middle; border-color: #f1f3f6; color: #344054; }
    .act-table tbody tr { transition: background-color .15s ease; }
    .act-table tbody tr:hover { background: #f6f9ff; }
    .act-table tbody tr:last-child td { border-bottom: 0; }

    /* ── Status badges ── */
    .act-badge {
      font-size: .68rem; padding: 3px 10px; border-radius: 999px; font-weight: 600;
      display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
      line-height: 1.4;
    }
    .act-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
    .act-badge-open      { background: var(--act-call-soft);  color: #0a58ca; }
    .act-badge-completed { background: var(--act-task-soft);  color: #14723f; }
    .act-badge-pending   { background: var(--act-event-soft); color: #c2410c; }
    .act-badge-overdue   { background: #fdeaea;               color: #c92a2a; }
    .act-badge-sent      { background: var(--act-email-soft); color: #6d28d9; }

    /* ── Priority dots ── */
    .act-priority { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
    .act-p-high   { background: #dc3545; }
    .act-p-medium { background: #f97316; }
    .act-p-low    { background: #198754; }

    /* ── Action icon buttons ── */
    .act-tbl-action {
      color: var(--act-muted); cursor: pointer; font-size: .9rem;
      display: inline-flex; padding: 5px; border-radius: 7px;
      transition: color .15s ease, background-color .15s ease;
    }
    .act-tbl-action:hover { color: var(--act-call); background: var(--act-call-soft); }
    .act-tbl-action.del:hover { color: #dc3545; background: #fdeaea; }

    /* =========================================================
       Recent Activity Timeline
       ========================================================= */
    .act-timeline-section {
      margin-top: 26px;
      background: #fcfcfd;
      border: 1px solid var(--act-line);
      border-radius: var(--act-radius);
      padding: 18px 20px;
    }
    .act-tl-header h6 {
      font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
      color: var(--act-muted); font-weight: 700; display: flex; align-items: center;
    }
    .act-tl-header h6 #actTlFilterLabel { color: var(--act-ink); }

    /* ── Filter control ── */
    .act-tl-filter { gap: 6px; }
    .act-tl-filter .btn {
      font-size: .75rem; font-weight: 600; border-radius: 999px !important;
      padding: 5px 13px; display: inline-flex; align-items: center;
      border-color: var(--act-line); color: #475467; background: #fff;
      transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
    }
    .act-tl-filter .btn:hover { background: #f4f6fa; color: var(--act-ink); }
    .act-tl-filter .btn:focus-visible { outline: 2px solid var(--act-call); outline-offset: 2px; box-shadow: none; }
    .act-tl-filter .btn .badge {
      font-size: .62rem; font-weight: 700; vertical-align: middle;
      background: #eef1f5 !important; color: #475467 !important;
    }
    /* Per-type active (selected) filter states */
    .act-tl-filter .btn.active { color: #fff; box-shadow: 0 3px 9px rgba(16,24,40,.16); }
    .act-tl-filter .btn[data-act-filter="all"].active   { background: #344054; border-color: #344054; }
    .act-tl-filter .btn[data-act-filter="call"].active   { background: var(--act-call);  border-color: var(--act-call); }
    .act-tl-filter .btn[data-act-filter="task"].active   { background: var(--act-task);  border-color: var(--act-task); }
    .act-tl-filter .btn[data-act-filter="event"].active  { background: var(--act-event); border-color: var(--act-event); }
    .act-tl-filter .btn[data-act-filter="email"].active  { background: var(--act-email); border-color: var(--act-email); }
    .act-tl-filter .btn.active .badge {
      background-color: rgba(255,255,255,.9) !important; color: #1f2937 !important;
    }

    /* ── Timeline rail + items ── */
    .act-timeline { position: relative; padding-left: 32px; }
    .act-timeline::before {
      content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px;
      width: 2px; background: linear-gradient(#dfe3ea, #eef1f5);
    }
    .act-tl-item { position: relative; margin-bottom: 14px; animation: actTlFade .35s ease both; }
    .act-tl-item:last-of-type { margin-bottom: 0; }
    @keyframes actTlFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
    .act-tl-dot {
      position: absolute; left: -27px; top: 2px;
      width: 24px; height: 24px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: .72rem; color: #fff; flex-shrink: 0;
      box-shadow: 0 0 0 4px #fcfcfd, 0 1px 3px rgba(16,24,40,.18);
      z-index: 1;
    }
    .act-tl-dot.call  { background: var(--act-call); }
    .act-tl-dot.task  { background: var(--act-task); }
    .act-tl-dot.event { background: var(--act-event); }
    .act-tl-dot.email { background: var(--act-email); }
    .act-tl-body {
      background: var(--act-surface);
      border: 1px solid var(--act-line);
      border-left: 3px solid var(--act-line);
      border-radius: 10px; padding: 12px 16px;
      box-shadow: var(--act-shadow); font-size: .82rem; color: #344054;
      transition: box-shadow .2s ease, transform .15s ease, border-color .2s ease;
    }
    .act-tl-body:hover { box-shadow: var(--act-shadow-hover); transform: translateY(-2px); }
    .act-tl-item[data-act-type="call"]  .act-tl-body { border-left-color: var(--act-call); }
    .act-tl-item[data-act-type="task"]  .act-tl-body { border-left-color: var(--act-task); }
    .act-tl-item[data-act-type="event"] .act-tl-body { border-left-color: var(--act-event); }
    .act-tl-item[data-act-type="email"] .act-tl-body { border-left-color: var(--act-email); }
    .act-tl-title { font-size: .85rem; font-weight: 600; color: var(--act-ink); }
    .act-tl-meta {
      font-size: .72rem; color: var(--act-muted); margin-top: 6px;
      padding-top: 6px; border-top: 1px dashed #eef1f5;
      display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
    }
    .act-tl-empty-icon { font-size: 1.8rem; opacity: .5; }

    /* ── Type badge ── */
    .act-type-badge {
      font-size: .62rem; padding: 3px 9px; border-radius: 999px; font-weight: 700;
      text-transform: uppercase; letter-spacing: .05em;
    }
    .act-type-badge.call  { background: var(--act-call-soft);  color: #0a58ca; }
    .act-type-badge.task  { background: var(--act-task-soft);  color: #14723f; }
    .act-type-badge.event { background: var(--act-event-soft); color: #c2410c; }
    .act-type-badge.email { background: var(--act-email-soft); color: #6d28d9; }

    /* Smoothly hide non-matching timeline items */
    .act-timeline .act-tl-item.act-tl-hidden { display: none !important; }

    /* Respect reduced-motion preferences */
    @media (prefers-reduced-motion: reduce) {
      .act-stat-card, .act-tl-body, .activity-subtabs .nav-link, .btn-act-add, .act-tl-item { transition: none; animation: none; }
    }

    /* ── Responsive ── */
    @media (max-width: 991.98px) {
      .activity-stats { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 575.98px) {
      .activity-stats { grid-template-columns: 1fr; }
      .act-tl-header { flex-direction: column; align-items: flex-start !important; }
      .act-tl-filter { width: 100%; }
      .act-tl-filter .btn { flex: 1 1 auto; justify-content: center; }
      .act-timeline-section { padding: 16px 14px; }
      .act-panel-header { flex-direction: column; align-items: flex-start; }
      .act-panel-header .btn-act-add { align-self: stretch; justify-content: center; }
    }
        /* ── Activities Modal Specific ── */
    /* ── Attendee tag-input ── */
    .attendee-input-wrap {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: center;
      border: 1px solid #ced4da;
      border-radius: .375rem;
      padding: 6px 10px;
      background: #fff;
      cursor: text;
      min-height: 42px;
    }
    .attendee-input-wrap:focus-within {
      border-color: #0d6e6e;
      box-shadow: 0 0 0 .2rem rgba(13,110,110,.2);
    }
    .attendee-input-wrap.is-invalid {
      border-color: #dc3545;
    }
    .attendee-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #e0f2f1;
      color: #0d6e6e;
      border: 1px solid #b2dfdb;
      border-radius: 20px;
      padding: 2px 10px 2px 10px;
      font-size: .82rem;
      font-weight: 500;
      white-space: nowrap;
    }
    .attendee-tag .tag-remove {
      cursor: pointer;
      font-size: .9rem;
      line-height: 1;
      color: #0d6e6e;
      background: none;
      border: none;
      padding: 0;
      margin-left: 2px;
      opacity: .7;
    }
    .attendee-tag .tag-remove:hover { opacity: 1; }
    .attendee-ghost-input {
      border: none;
      outline: none;
      flex: 1;
      min-width: 180px;
      font-size: .9rem;
      padding: 2px 0;
      background: transparent;
    }
    .attendee-hint {
      font-size: .78rem;
      color: #6c757d;
      margin-top: 4px;
    }
    .attendee-error {
      font-size: .8rem;
      color: #dc3545;
      margin-top: 4px;
      display: none;
    }

        /* ── Tag-input (To field) ── */
    .tag-input-wrapper {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      padding: 6px 10px;
      border: 1px solid #ced4da;
      border-radius: .375rem;
      background: #fff;
      cursor: text;
      min-height: 42px;
      align-items: center;
    }
    .tag-input-wrapper:focus-within { border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
    .tag-input-wrapper.is-invalid   { border-color: #dc3545; }
    .tag-input-wrapper.is-invalid:focus-within { box-shadow: 0 0 0 .25rem rgba(220,53,69,.25); }

    .email-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #e7f0fb;
      border: 1px solid #b6d0f0;
      border-radius: 20px;
      padding: 2px 10px 2px 10px;
      font-size: .82rem;
      color: #1a3c5e;
      white-space: nowrap;
    }
    .email-tag .remove-tag {
      background: none;
      border: none;
      padding: 0;
      cursor: pointer;
      color: #6c757d;
      font-size: .9rem;
      line-height: 1;
      display: flex;
      align-items: center;
    }
    .email-tag .remove-tag:hover { color: #dc3545; }

    .tag-input-field {
      border: none;
      outline: none;
      flex: 1;
      min-width: 180px;
      font-size: .875rem;
      padding: 2px 0;
      background: transparent;
    }
    /* Transfer Account Owner badge / transfer trigger */
    .owner-badge {
        background-color: #ede9fe;
        color: #4f46e5;
        font-weight: 500;
        font-size: 0.75rem;
        padding: 0.3em 0.55em;
        border-radius: 0.375rem;
        border: 1px solid #c4b5fd;
        cursor: pointer;
    }
    .owner-badge:hover {
        background-color: #ddd6fe;
        border-color: #a78bfa;
    }
    .owner-badge .bi-person-fill {
        font-size: 0.7rem;
    }
    .owner-badge .bi-arrow-left-right {
        font-size: 0.65rem;
    }
/* ---- Toolbar card ---- */
    .toolbar-card {
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      padding: 16px 20px;
      margin-bottom: 16px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    /* ---- Search row ---- */
    .search-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
    }
    .search-wrapper {
      position: relative;
      flex: 1;
    }
    .search-wrapper .search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #9ca3af;
      font-size: 13px;
      pointer-events: none;
    }
    .search-input {
      width: 100%;
      height: 38px;
      padding: 0 12px 0 36px;
      border: 1px solid #d1d5db;
      border-radius: 7px;
      font-size: 13px;
      color: #111827;
      background: #fff;
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .search-input:focus {
      border-color: #6366f1;
      box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    }
    .search-input::placeholder { color: #9ca3af; }

    .project-search-clear-btn {
        height: 38px;
        padding: 0 12px;
        border: 1px solid #e5e7eb;
        border-radius: 7px;
        background: #fff;
        color: #9ca3af;
        font-size: 12px;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.12s;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .project-search-clear-btn:hover:not(:disabled) {
        border-color: #d1d5db;
        color: #374151;
    }

    .project-search-clear-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }
    
    .project-page-size-select {
    width: 66px;
    padding: 0 8px;
    text-align: left;
    appearance: auto;
    cursor: pointer;
    }


    /* ---- Column filter button ---- */
    .col-filter-btn {
      height: 38px;
      padding: 0 14px;
      border: 1px solid #d1d5db;
      border-radius: 7px;
      background: #fff;
      color: #374151;
      font-size: 13px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      cursor: pointer;
      transition: all 0.15s;
      position: relative;
    }
    .col-filter-btn:hover { border-color: #6366f1; color: #4f46e5; background: #f5f3ff; }
    .col-filter-btn.active { border-color: #6366f1; color: #4f46e5; background: #ede9fe; }
    .col-filter-badge {
      background: #4f46e5;
      color: #fff;
      font-size: 10px;
      font-weight: 700;
      border-radius: 10px;
      padding: 1px 6px;
      min-width: 18px;
      text-align: center;
      line-height: 16px;
    }
    .col-filter-badge.all { background: #d1d5db; color: #6b7280; }

    /* ---- Column filter dropdown ---- */
    .col-filter-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      width: 280px;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.12);
      z-index: 1000;
      overflow: hidden;
      display: none;
    }
    .col-filter-dropdown.show { display: block; }
    .col-filter-header {
      padding: 12px 16px 10px;
      border-bottom: 1px solid #f3f4f6;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .col-filter-header span {
      font-size: 12px;
      font-weight: 600;
      color: #374151;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .col-filter-header a {
      font-size: 11px;
      color: #6366f1;
      text-decoration: none;
      font-weight: 500;
    }
    .col-filter-header a:hover { text-decoration: underline; }
    .col-filter-body { padding: 8px 0; }
    .col-filter-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 16px;
      cursor: pointer;
      transition: background 0.12s;
    }
    .col-filter-item:hover { background: #f9fafb; }
    .col-filter-item label {
      font-size: 13px;
      color: #374151;
      cursor: pointer;
      flex: 1;
      margin: 0;
    }
    .col-filter-item input[type="checkbox"] {
      width: 15px;
      height: 15px;
      accent-color: #4f46e5;
      cursor: pointer;
      flex-shrink: 0;
    }

    .col-filter-footer {
      padding: 10px 16px;
      border-top: 1px solid #f3f4f6;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .col-filter-footer small {
      font-size: 11px;
      color: #9ca3af;
    }
    .col-filter-footer .saved-indicator {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: #10b981;
      font-weight: 500;
    }

    /* ---- Filter controls row ---- */
    .filters-row {
      display: flex;
      align-items: center;
      gap: 20px;
      flex-wrap: wrap;
    }
    .filter-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .filter-label {
      font-size: 13px;
      color: #6b7280;
      white-space: nowrap;
    }
    .filter-input-sm {
      width: 58px;
      height: 32px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 13px;
      text-align: center;
      color: #111827;
      font-weight: 600;
      outline: none;
      transition: border-color 0.15s;
    }
    .filter-input-sm:focus {
      border-color: #6366f1;
      box-shadow: 0 0 0 2px rgba(99,102,241,0.1);
    }
    .filter-input-days {
      width: 52px;
    }
    .filter-divider {
      width: 1px;
      height: 24px;
      background: #e5e7eb;
      flex-shrink: 0;
    }

    /* ---- Toggle switch ---- */
    .toggle-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .toggle-switch {
      position: relative;
      width: 36px;
      height: 20px;
      flex-shrink: 0;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0; left: 0; right: 0; bottom: 0;
      background: #d1d5db;
      border-radius: 20px;
      transition: 0.2s;
    }
    .toggle-slider:before {
      content: '';
      position: absolute;
      width: 14px;
      height: 14px;
      left: 3px;
      bottom: 3px;
      background: #fff;
      border-radius: 50%;
      transition: 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }
    .toggle-switch input:checked + .toggle-slider { background: #4f46e5; }
    .toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }

    /* ---- Apply button ---- */
    .btn-apply {
      height: 32px;
      padding: 0 14px;
      background: #4f46e5;
      color: #fff;
      border: none;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
      white-space: nowrap;
    }
    .btn-apply:hover { background: #4338ca; }

    .helper-text {
      font-size: 11px;
      color: #9ca3af;
    }

    /* ---- New Project Button Keep for future---- */
    /*.btn-new-project {
      height: 38px;
      padding: 0 18px;
      background: #4f46e5;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s;
      white-space: nowrap;
    }
    .btn-new-project:hover { background: #4338ca; }*/

        /* ---- Search highlight chip ---- */
    .search-scope-bar {
      display: none;
      align-items: center;
      gap: 6px;
      padding: 7px 12px;
      background: #ede9fe;
      border: 1px solid #c4b5fd;
      border-radius: 7px;
      font-size: 12px;
      color: #5b21b6;
      margin-bottom: 12px;
    }
    .search-scope-bar.active { display: flex; }
    .scope-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #fff;
      border: 1px solid #c4b5fd;
      border-radius: 12px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 500;
      color: #5b21b6;
    }

    /* ---- Column filter persisted indicator ---- */
    .persist-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #10b981;
      display: inline-block;
      margin-left: 2px;
    }
