// ============================================================================
// Enterprise Doctor Dashboard SCSS
// Modern, Professional, and Responsive Styling
// ============================================================================

// ============================================================================
// CSS Custom Properties (Design Tokens)
// ============================================================================

// Define CSS variables globally for the component
:host,
app-doctor {
  display: block;
  width: 100%;
}

:root {
  // Color Palette - Medical Professional Theme
  --color-primary: #2563eb;
  --color-primary-dark: #1e40af;
  --color-primary-light: #3b82f6;
  --color-secondary: #10b981;
  --color-secondary-dark: #059669;
  --color-accent: #8b5cf6;
  
  // Semantic Colors
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  
  // Neutral Colors
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  // Background Colors
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-glass-dark: rgba(255, 255, 255, 0.95);
  
  // Text Colors
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --text-inverse: #ffffff;
  --text-disabled: #9ca3af;
  
  // Spacing Scale (8px base)
  --space-xs: 0.25rem;  // 4px
  --space-sm: 0.5rem;   // 8px
  --space-md: 1rem;     // 16px
  --space-lg: 1.5rem;   // 24px
  --space-xl: 2rem;      // 32px
  --space-2xl: 3rem;    // 48px
  --space-3xl: 4rem;    // 64px
  
  // Typography
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  --font-size-xs: 0.75rem;   // 12px
  --font-size-sm: 0.875rem;  // 14px
  --font-size-base: 1rem;    // 16px
  --font-size-lg: 1.125rem;  // 18px
  --font-size-xl: 1.25rem;   // 20px
  --font-size-2xl: 1.5rem;   // 24px
  --font-size-3xl: 1.875rem; // 30px
  --font-size-4xl: 2.25rem;   // 36px
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  // Border Radius
  --radius-sm: 0.375rem;  // 6px
  --radius-md: 0.5rem;    // 8px
  --radius-lg: 0.75rem;   // 12px
  --radius-xl: 1rem;      // 16px
  --radius-2xl: 1.5rem;   // 24px
  --radius-full: 9999px;
  
  // Shadows - Elevation System
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  // Transitions
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  // Z-Index Scale
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  // Layout
  --header-height: 80px;
  --sidebar-width: 280px;
  --max-width: 1400px;
  
  // Breakpoints (for media queries)
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

// ============================================================================
// Base Styles & Reset
// Scoped to component to avoid conflicts with ViewEncapsulation.None
// ============================================================================

app-doctor,
:host {
  display: block;
  width: 100%;
}

.dashboard-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  font-family: var(--font-family-base);
  color: var(--text-primary);
  line-height: var(--line-height-normal);
}

// ============================================================================
// Header Styles
// ============================================================================

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: var(--z-fixed);
  background: var(--bg-glass-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  flex-shrink: 0;
  
  .header-content {
    max-width: 100%;
    margin: 0;
    padding: var(--space-md) var(--space-xl) var(--space-md) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-left: 0;
    padding-left: 0;
  }
  
  .logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: 0;
    padding-left: 0;
  }
  
  .medical-icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    transition: transform var(--transition-base);
    
    &:hover {
      transform: scale(1.05);
    }
  }
  
  .header-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .dashboard-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .dashboard-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }
}

// ============================================================================
// Chat Menu (Facebook-style)
// ============================================================================

.chat-menu-container {
  position: relative;
  z-index: var(--z-dropdown);
}

.chat-menu-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  
  svg {
    width: 20px;
    height: 20px;
  }
  
  &:hover {
    background: var(--color-gray-100);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  &.active {
    background: var(--color-primary);
    color: var(--text-inverse);
    
    svg {
      color: var(--text-inverse);
    }
  }
  
  &.has-unread {
    animation: pulse-chat 2s infinite;
  }
}

.blocked-users-container {
  position: relative;
  z-index: var(--z-dropdown);
}

.blocked-users-button-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  
  svg {
    width: 20px;
    height: 20px;
  }
  
  &:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  &.active {
    background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
    color: var(--text-inverse);
    
    svg {
      color: var(--text-inverse);
    }
    
    &:hover {
      background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
    }
  }
}

@keyframes pulse-chat {
  0%, 100% {
    box-shadow: var(--shadow-sm);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
  }
}

.chat-menu-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  border: 2px solid var(--bg-primary);
  box-shadow: var(--shadow-sm);
  animation: bounce-badge 1s infinite;
}

@keyframes bounce-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.chat-menu-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 380px;
  max-height: 500px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  z-index: var(--z-dropdown);
  animation: slideDown 0.2s ease-out;
  display: flex;
  flex-direction: column;
}

.chat-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-200);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  flex-shrink: 0;
  
  h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
  }

  .chat-menu-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

}

.chat-menu-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  
  svg {
    width: 18px;
    height: 18px;
  }
  
  &:hover {
    background: var(--color-gray-100);
    color: var(--text-primary);
  }
}

.chat-menu-blocked-users {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  
  svg {
    width: 18px;
    height: 18px;
  }
  
  &:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
  }
}

// Blocked Users Panel Dropdown
.blocked-users-panel-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 380px;
  max-height: 500px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  z-index: var(--z-dropdown);
  animation: slideDown 0.2s ease-out;
  display: flex;
  flex-direction: column;
}

.blocked-users-header-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-200);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
  flex-shrink: 0;
  
  h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
  }
  
  .close-blocked-users {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    
    svg {
      width: 18px;
      height: 18px;
    }
    
    &:hover {
      background: var(--color-gray-100);
      color: var(--text-primary);
    }
  }
}

.blocked-users-content-dropdown {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: var(--space-md);
}

.blocked-loading {
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

.blocked-users-list-dropdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.blocked-user-item-dropdown {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  gap: var(--space-md);
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
  }
  
  &:hover {
    background: var(--color-danger-light);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateX(3px) scale(1.01);
    box-shadow: var(--shadow-md);
    
    &::before {
      opacity: 1;
    }
  }
  
  &:active {
    transform: translateX(2px) scale(0.98);
    box-shadow: var(--shadow-sm);
  }
}

.blocked-user-avatar-dropdown {
  position: relative;
  flex-shrink: 0;
  
  .avatar-circle-dropdown,
  .avatar-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    object-fit: cover;
  }
  
  .avatar-circle-dropdown {
    background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
  }
}

.blocked-user-info-dropdown {
  flex: 1;
  min-width: 0;
  
  .blocked-user-name-dropdown {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .blocked-user-details-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    flex-wrap: wrap;
    
    span {
      white-space: nowrap;
    }
  }
}

.unblock-button-dropdown {
  background: linear-gradient(135deg, var(--color-success) 0%, var(--color-secondary-dark) 100%);
  border: none;
  color: var(--text-inverse);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: auto;
  position: relative;
  z-index: 10;
  
  svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    transition: transform var(--transition-base);
  }
  
  &:hover {
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #047857 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
    
    svg {
      transform: rotate(90deg);
    }
  }
  
  &:active {
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow-sm);
  }
}

.no-blocked-users-dropdown {
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  color: var(--text-secondary);
  
  svg {
    margin-bottom: var(--space-md);
    color: var(--text-tertiary);
  }
  
  p {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
  }
  
  span {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
  }
}

.chat-menu-search {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--bg-primary);
  flex-shrink: 0;
}

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 40px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  
  &::placeholder {
    color: var(--text-secondary);
  }
  
  &:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }
}

.search-clear {
  position: absolute;
  right: var(--space-sm);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  
  svg {
    width: 14px;
    height: 14px;
  }
  
  &:hover {
    background: var(--color-gray-100);
    color: var(--text-primary);
  }
}

.search-results-section {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.search-results-header,
.conversations-header {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conversations-section {
  padding: var(--space-sm) 0;
}

.conversation-list-dropdown {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 200px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    
    &:hover {
      background: var(--color-gray-400);
    }
  }
}

.no-conversations {
  padding: var(--space-2xl);
  text-align: center;
  color: var(--text-secondary);
  
  p {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
  }
  
  .subtext {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-weight-normal);
  }
}

.conversation-item-dropdown {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--color-gray-100);
  
  &:hover {
    background: var(--color-gray-50);
  }
  
  &.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left: 3px solid var(--color-primary);
  }
}

.conversation-avatar-dropdown {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 2px solid var(--color-gray-200);
}

.conversation-avatar-dropdown .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-circle-dropdown {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--text-inverse);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  text-transform: uppercase;
}

.online-indicator-dropdown {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
  background: var(--color-gray-400);
  
  &.online {
    background: var(--success-green);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 4px rgba(16, 185, 129, 0.5);
  }
  
  &.busy {
    background: var(--warning-orange);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 4px rgba(245, 158, 11, 0.5);
  }
  
  &.offline {
    background: var(--color-gray-400);
  }
}

.conversation-info-dropdown {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.conversation-name-dropdown {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview-dropdown {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta-dropdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.conversation-time-dropdown {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  white-space: nowrap;
}

.conversation-unread-dropdown {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-sm);
}

// ============================================================================
// Profile Dropdown (Facebook-style)
// ============================================================================

.profile-menu-container {
  position: relative;
  z-index: var(--z-dropdown);
}

.profile-menu-button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs);
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  
  &:hover {
    background: var(--color-gray-100);
  }
  
  &.active {
    background: var(--color-gray-100);
  }
}

.profile-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 2px solid var(--color-gray-200);
  transition: border-color var(--transition-base);
  
  .profile-menu-button:hover & {
    border-color: var(--color-primary-light);
  }
}

.avatar-image-small {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-circle-small {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--text-inverse);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform var(--transition-base);
  
  .profile-menu-button.active & {
    transform: rotate(180deg);
  }
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 320px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  z-index: var(--z-dropdown);
  animation: slideDown 0.2s ease-out;
}

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

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-bottom: 1px solid var(--color-gray-200);
}

.profile-avatar-medium {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 3px solid var(--color-primary-light);
}

.avatar-image-medium {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-circle-medium {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--text-inverse);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xl);
  text-transform: uppercase;
}

.profile-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
}

.profile-dropdown-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-email {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--color-gray-200);
  margin: var(--space-xs) 0;
}

.profile-dropdown-menu {
  display: flex;
  flex-direction: column;
  padding: var(--space-xs);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: none;
  background: transparent;
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
  width: 100%;
  
  svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color var(--transition-base);
  }
  
  &:hover {
    background: var(--color-gray-100);
    color: var(--color-primary-dark);
    
    svg {
      color: var(--color-primary);
    }
  }
  
  &.logout-item {
    color: var(--color-danger);
    
    &:hover {
      background: rgba(239, 68, 68, 0.1);
      color: var(--color-danger);
      
      svg {
        color: var(--color-danger);
      }
    }
  }
}

// ============================================================================
// Facebook-style Chat Widget
// ============================================================================

.chat-widget-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--text-inverse);
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  transition: all var(--transition-base);
  
  svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  }
  
  &:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  }
  
  &:active {
    transform: scale(0.95);
  }
  
  &.has-unread {
    animation: pulse 2s infinite;
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.6);
  }
}

.chat-toggle-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border: 2px solid var(--bg-primary);
  box-shadow: var(--shadow-sm);
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.chat-widget-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 420px;
  height: 650px;
  max-height: calc(100vh - 120px);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
  z-index: 10002;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
  pointer-events: auto;
  
  &.hidden {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
  }
  
  @media (max-height: 800px) {
    height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);
  }
}

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

.chat-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--text-inverse);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  position: relative;
  z-index: 2;
  gap: var(--space-md);
}

.chat-widget-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  cursor: pointer;
  flex: 1;
  min-width: 0;
  
  svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
}


.chat-widget-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--text-inverse);
  color: var(--color-primary-dark);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  margin-left: var(--space-xs);
}

.chat-widget-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  visibility: visible;
  opacity: 1;
}

.chat-action-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  color: var(--text-inverse);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-inverse);
    stroke-width: 2.5;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  }
  
  &:hover:not(.disabled):not(:disabled) {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  &:active:not(.disabled):not(:disabled) {
    transform: scale(0.95);
  }
  
  &.disabled,
  &:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.15);
  }
  
  &.delete-btn {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    
    &:hover:not(.disabled):not(:disabled) {
      background: rgba(239, 68, 68, 0.4);
      border-color: rgba(239, 68, 68, 0.6);
    }
  }
  
  &.call-btn {
    &:hover:not(.disabled):not(:disabled) {
      background: rgba(34, 197, 94, 0.3);
      border-color: rgba(34, 197, 94, 0.5);
    }
  }
  
  &.video-call-btn {
    &:hover:not(.disabled):not(:disabled) {
      background: rgba(59, 130, 246, 0.3);
      border-color: rgba(59, 130, 246, 0.5);
    }
  }
}

.chat-widget-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: var(--text-inverse);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
  
  svg {
    width: 18px;
    height: 18px;
  }
  
  &:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }
}

.chat-widget-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  
  app-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    pointer-events: auto;
    
    .chat-container {
      height: 100% !important;
      min-height: 0 !important;
      max-height: 100% !important;
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border-radius: 0;
      box-shadow: none;
      border: none;
    }
    
    .chat-sidebar {
      height: 100%;
      flex: 1;
      min-height: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    
    .chat-main {
      height: 100%;
      flex: 1;
      min-height: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    
    .conversation-list {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }
    
    .messages-container {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    }
  }
}

// ============================================================================
// Notification Styles
// ============================================================================

.notification-container {
  position: relative;
}

.notification-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  
  svg {
    width: 20px;
    height: 20px;
  }
  
  &:hover {
    background: var(--color-gray-100);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  &:active {
    transform: translateY(0);
  }
  
  &.has-notifications {
    color: var(--color-primary);
    
    &::before {
      content: '';
      position: absolute;
      top: 8px;
      right: 8px;
      width: 8px;
      height: 8px;
      background: var(--color-danger);
      border-radius: var(--radius-full);
      border: 2px solid var(--bg-primary);
      animation: pulse 2s infinite;
    }
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-danger);
  color: var(--text-inverse);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
  border: 2px solid var(--bg-primary);
  animation: bounce-in 0.3s ease-out;
}

@keyframes bounce-in {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--bg-glass-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  animation: slide-down 0.2s ease-out;
  z-index: var(--z-dropdown);
}

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

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--bg-primary);
  
  h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin: 0;
    color: var(--text-primary);
  }
  
  .header-actions {
    display: flex;
    gap: var(--space-sm);
  }
}

.mark-all-read,
.delete-all {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-sm);
  border: none;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  
  &:hover {
    background: var(--color-gray-100);
  }
}

.delete-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-danger);
  
  svg {
    width: 16px;
    height: 16px;
  }
}

.notification-list {
  max-height: 400px;
  overflow-y: auto;
  
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: var(--bg-secondary);
  }
  
  &::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    
    &:hover {
      background: var(--color-gray-400);
    }
  }
}

.no-notifications {
  padding: var(--space-2xl);
  text-align: center;
  color: var(--text-tertiary);
  
  p {
    margin: 0;
  }
}

.notification-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-gray-200);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-primary);
  
  &:last-child {
    border-bottom: none;
  }
  
  &:hover {
    background: var(--bg-secondary);
  }
  
  &.unread {
    background: var(--color-info-light);
    border-left: 4px solid var(--color-primary);
    
    .notification-title {
      font-weight: var(--font-weight-semibold);
    }
  }
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  
  svg {
    width: 20px;
    height: 20px;
  }
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin: 0 0 var(--space-xs) 0;
}

.notification-message {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-xs) 0;
  line-height: var(--line-height-relaxed);
}

.notification-time {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin: 0;
}

.notification-delete {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  opacity: 0;
  
  .notification-item:hover & {
    opacity: 1;
  }
  
  &:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
  }
  
  svg {
    width: 16px;
    height: 16px;
  }
}

// ============================================================================
// Button Styles
// ============================================================================

.refresh-button,
.logout-button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-gray-300);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  
  svg {
    width: 18px;
    height: 18px;
  }
  
  &:hover:not(:disabled) {
    background: var(--color-gray-50);
    border-color: var(--color-gray-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  &:active:not(:disabled) {
    transform: translateY(0);
  }
  
  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.logout-button {
  color: var(--color-danger);
  border-color: var(--color-danger-light);
  background: var(--color-danger-light);
  
  &:hover:not(:disabled) {
    background: var(--color-danger);
    color: var(--text-inverse);
    border-color: var(--color-danger);
  }
}

// ============================================================================
// Main Content Area
// ============================================================================

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

// ============================================================================
// Loading & Error States
// ============================================================================

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 400px;
  gap: var(--space-lg);
  height: 100%;
  overflow: hidden;
  
  .spinner-wrapper {
    width: 64px;
    height: 64px;
  }
  
  .spinner {
    width: 100%;
    height: 100%;
    color: var(--color-primary);
    animation: spin 1s linear infinite;
  }
}

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

.loading-text {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin: 0;
}

.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 400px;
  padding: var(--space-xl);
  height: 100%;
  overflow: hidden;
}

.error-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-danger);
  max-width: 600px;
  width: 100%;
}

.error-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: var(--color-danger);
}

.error-content {
  flex: 1;
  
  h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
  }
  
  p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0 0 var(--space-md) 0;
  }
}

.retry-button {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  background: var(--color-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  
  &:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

// ============================================================================
// Dashboard Layout - Sidebar and Content
// ============================================================================

.dashboard-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

// ============================================================================
// Sidebar Navigation
// ============================================================================

.sidebar-navigation {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 251, 252, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--color-gray-200);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: var(--z-sticky);
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    opacity: 0.8;
    z-index: 1;
  }
}

.tabs-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  padding-top: calc(var(--space-md) + 4px);
  
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    
    &:hover {
      background: var(--color-gray-400);
    }
  }
}

.tab-button {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  text-align: left;
  width: 100%;
  min-height: 48px;
  visibility: visible;
  opacity: 1;
  text-decoration: none;
  outline: none;
  border-left: 3px solid transparent;
  
  &:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-md);
  }
  
  svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: currentColor;
    transition: transform var(--transition-fast);
    stroke-width: 2.5;
  }
  
  &:hover:not(.active) {
    background: var(--color-gray-100);
    color: var(--color-primary-dark);
    border-left-color: var(--color-primary-light);
    
    svg {
      transform: scale(1.1);
      color: var(--color-primary);
    }
  }
  
  &:active:not(.active) {
    transform: scale(0.98);
  }
  
  &.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: var(--color-primary-dark);
    border-left-color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    box-shadow: var(--shadow-sm);
    
    svg {
      color: var(--color-primary);
      filter: drop-shadow(0 1px 2px rgba(37, 99, 235, 0.2));
    }
    
    .tab-badge {
      background: var(--color-primary);
      color: var(--text-inverse);
      box-shadow: var(--shadow-sm);
    }
    
    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 3px;
      height: 60%;
      background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
      border-radius: 0 3px 3px 0;
      z-index: 1;
    }
  }
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  margin-left: auto;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--bg-primary);
  transition: all var(--transition-fast);
  animation: pulse-badge 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: var(--shadow-sm);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
  }
}

// ============================================================================
// Content Area
// ============================================================================

.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg-secondary);
}

// ============================================================================
// Tab Content
// ============================================================================

.tab-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-xl);
  animation: fade-in 0.3s ease-out;
  min-height: 0;
  
  &::-webkit-scrollbar {
    width: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    
    &:hover {
      background: var(--color-gray-400);
    }
  }
}

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

.tab-panel {
  min-height: 400px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

// ============================================================================
// Section Styles
// ============================================================================

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-xl) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
  
  h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
  }
}

// ============================================================================
// Stats Section
// ============================================================================

.stats-section {
  margin-bottom: var(--space-2xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--color-gray-200);
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    transition: width var(--transition-base);
  }
  
  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    
    &::before {
      width: 100%;
      opacity: 0.05;
    }
  }
  
  &.stat-card-primary {
    .stat-icon {
      background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
      color: var(--text-inverse);
    }
    
    &::before {
      background: var(--color-primary);
    }
  }
  
  &.stat-card-success {
    .stat-icon {
      background: linear-gradient(135deg, var(--color-success) 0%, #34d399 100%);
      color: var(--text-inverse);
    }
    
    &::before {
      background: var(--color-success);
    }
  }
  
  &.stat-card-info {
    .stat-icon {
      background: linear-gradient(135deg, var(--color-info) 0%, #60a5fa 100%);
      color: var(--text-inverse);
    }
    
    &::before {
      background: var(--color-info);
    }
  }
  
  &.stat-card-warning {
    .stat-icon {
      background: linear-gradient(135deg, var(--color-warning) 0%, #fbbf24 100%);
      color: var(--text-inverse);
    }
    
    &::before {
      background: var(--color-warning);
    }
  }
}

.stat-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  
  svg {
    width: 32px;
    height: 32px;
  }
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-xs) 0;
  font-weight: var(--font-weight-medium);
}

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0;
  line-height: var(--line-height-tight);
}

// ============================================================================
// Quick Actions
// ============================================================================

.quick-actions-section {
  margin-bottom: var(--space-2xl);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  background: var(--bg-primary);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  
  svg {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    transition: transform var(--transition-base);
  }
  
  h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
  }
  
  p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
  }
  
  &:hover {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--color-primary-light) 0.5%);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    
    svg {
      transform: scale(1.1);
      color: var(--color-primary-dark);
    }
  }
  
  &:active {
    transform: translateY(-2px);
  }
}

// ============================================================================
// Info & Error Messages
// ============================================================================

.info-message {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-info-light);
  border: 1px solid var(--color-info);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  
  svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-info);
  }
  
  div {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: var(--line-height-relaxed);
  }
}

.error-message {
  padding: var(--space-lg);
  background: var(--color-danger-light);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  
  button {
    background: transparent;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: var(--font-size-xl);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    
    &:hover {
      background: var(--color-danger);
      color: var(--text-inverse);
    }
  }
}

// ============================================================================
// Responsive Design
// ============================================================================

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 1024px) {
  .sidebar-navigation {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
  }
  
  .tab-button {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    
    svg {
      width: 20px;
      height: 20px;
    }
  }
  
  .tab-content {
    padding: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .dashboard-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-md);
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .dashboard-layout {
    flex-direction: column;
  }
  
  .sidebar-navigation {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-200);
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    
    &::before {
      display: none;
    }
  }
  
  .tabs-container {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-xs);
    flex-wrap: nowrap;
    
    &::-webkit-scrollbar {
      height: 4px;
      width: auto;
    }
    
    &::-webkit-scrollbar-thumb {
      background: var(--color-gray-300);
    }
  }
  
  .tab-button {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
    min-width: auto;
    width: auto;
    flex-shrink: 0;
    border-left: none;
    border-bottom: 3px solid transparent;
    
    &.active {
      border-left: none;
      border-bottom-color: var(--color-primary);
      background: var(--bg-primary);
      
      &::before {
        display: none;
      }
    }
    
    svg {
      width: 18px;
      height: 18px;
    }
  }
  
  .content-area {
    flex: 1;
    min-height: 0;
  }
  
  .tab-content {
    padding: var(--space-md);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .notification-dropdown {
    width: calc(100vw - 32px);
    right: auto;
    left: 0;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 60px;
    --sidebar-width: 100%;
  }
  
  .dashboard-title {
    font-size: var(--font-size-xl);
  }
  
  .section-title {
    font-size: var(--font-size-xl);
  }
  
  .sidebar-navigation {
    max-height: 180px;
  }
  
  .tab-button {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    gap: var(--space-sm);
    
    svg {
      width: 16px;
      height: 16px;
    }
  }
  
  .tab-content {
    padding: var(--space-md);
  }
  
  .chat-menu-dropdown {
    width: calc(100vw - 40px);
    right: 16px;
    max-width: 380px;
    max-height: calc(100vh - 120px);
  }
  
  .chat-widget-container {
    width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
    height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);
    bottom: 80px;
    
    .chat-widget-content app-chat {
      .chat-container {
        height: 100% !important;
        flex-direction: column !important;
      }
      
      .chat-sidebar {
        width: 100% !important;
        max-width: 100% !important;
      }
      
      .chat-main {
        display: none;
      }
    }
  }
  
  .chat-widget-toggle {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    
    svg {
      width: 22px;
      height: 22px;
    }
  }
  
  .profile-dropdown {
    width: calc(100vw - 32px);
    right: 16px;
    max-width: 320px;
  }
}

// ============================================================================
// Patient Safety Alerts Styles
// ============================================================================

.safety-alerts-container {
  padding: var(--space-xl);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-200);
}

.safety-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-gray-200);
  
  h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.btn-create {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  
  svg {
    width: 18px;
    height: 18px;
  }
  
  &:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  &.active {
    background: var(--color-danger);
    border-color: var(--color-danger);
    
    &:hover {
      background: var(--color-danger);
      opacity: 0.9;
    }
  }
}

.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-gray-300);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  
  &:hover {
    background: var(--color-gray-100);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: rotate(180deg);
  }
}

.alerts-section {
  margin-bottom: var(--space-2xl);
  
  &:last-child {
    margin-bottom: 0;
  }
  
  h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-sm);
}

.no-alerts {
  padding: var(--space-2xl);
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-gray-300);
  
  p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
  }
}

.alert-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: all var(--transition-base);
  
  &:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
  
  &.severity-info {
    border-left: 4px solid var(--color-info);
    
    .severity-badge.severity-info {
      background: var(--color-info);
      color: var(--text-inverse);
    }
  }
  
  &.severity-warning {
    border-left: 4px solid var(--color-warning);
    
    .severity-badge.severity-warning {
      background: var(--color-warning);
      color: var(--text-inverse);
    }
  }
  
  &.severity-critical {
    border-left: 4px solid var(--color-danger);
    
    .severity-badge.severity-critical {
      background: var(--color-danger);
      color: var(--text-inverse);
    }
  }
  
  &.critical-result {
    border-left: 4px solid var(--color-danger);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, var(--bg-primary) 4px);
  }
}

.alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--color-gray-200);
}

.alert-type {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.severity-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-type-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.alert-time {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.alert-body {
  padding: var(--space-lg);
}

.alert-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-sm) 0;
}

.alert-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin: 0 0 var(--space-md) 0;
  line-height: var(--line-height-relaxed);
}

.alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-gray-200);
}

.patient-name,
.medication {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  
  strong {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
  }
}

.lab-result-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.detail-row {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  
  strong {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    margin-right: var(--space-xs);
  }
}

.alert-actions {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-top: 1px solid var(--color-gray-200);
}

.btn-acknowledge,
.btn-resolve {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-acknowledge {
  background: var(--color-primary);
  color: var(--text-inverse);
  
  &:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

.btn-resolve {
  background: var(--color-success);
  color: var(--text-inverse);
  
  &:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

// ============================================================================
// Create Alert Form Styles
// ============================================================================

.create-alert-section {
  background: var(--bg-secondary);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  animation: slideDown 0.3s ease-out;
  
  h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
  }
}

.alert-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  
  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  
  label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    
    .required {
      color: var(--color-danger);
      margin-left: var(--space-xs);
    }
  }
  
  input,
  select,
  textarea {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    transition: all var(--transition-base);
    
    &:focus {
      outline: none;
      border-color: var(--color-primary);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    
    &::placeholder {
      color: var(--text-secondary);
    }
  }
  
  textarea {
    resize: vertical;
    min-height: 100px;
  }
  
  select {
    cursor: pointer;
  }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray-200);
}

.btn-cancel,
.btn-submit {
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-cancel {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--color-gray-300);
  
  &:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-400);
  }
}

.btn-submit {
  background: var(--color-primary);
  color: var(--text-inverse);
  
  &:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  &:active {
    transform: translateY(0);
  }
}

// ============================================================================
// Utility Classes
// ============================================================================

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
