/* Modern Dashboard UI - Inspired by kartikk-k/dashboard-ui */

/* CSS Custom Properties - Modern Dashboard Theme */
:root {
  /* Primary Colors */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic Colors */
  --success-400: #4ade80;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --danger-400: #f87171;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  
  /* Theme Variables */
  --sidebar-width: 256px;
  --sidebar-collapsed-width: 80px;
  --header-height: 64px;
  
  /* Shadows */
  --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);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
  overflow-x: hidden;
}

/* Professional Branding */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--primary-600);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-logo-large {
  margin-bottom: 1rem;
}

.logo-icon-large {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  box-shadow: var(--shadow-xl);
  margin: 0 auto;
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: var(--shadow-xl);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.25);
  }
}

/* Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  text-decoration: none;
}

.sidebar-brand i {
  font-size: var(--text-xl);
  color: var(--primary-600);
}

.sidebar-nav {
  padding: var(--space-4) 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.nav-item.active {
  background: var(--primary-50);
  color: var(--primary-700);
  border-left-color: var(--primary-600);
}

.nav-item i {
  font-size: var(--text-base);
  width: 20px;
  text-align: center;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin var(--transition-normal);
}

.main-content.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.main-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 var(--space-6);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.header-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: var(--space-1);
}

/* Content Container */
.content-container {
  padding: var(--space-6);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--gray-900);
}


/* Cards */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  overflow: hidden;
}

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

.card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  color: var(--gray-900);
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
  background: white;
}

/* Dashboard Stats Cards */
.stats-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stats-card.primary {
  background: white;
  border-left: 4px solid var(--primary-500);
}

.stats-card.success {
  background: white;
  border-left: 4px solid var(--success-500);
}

.stats-card.warning {
  background: white;
  border-left: 4px solid var(--warning-500);
}

.stats-card.info {
  background: white;
  border-left: 4px solid var(--primary-400);
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.stats-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gray-600);
  text-transform: none;
  letter-spacing: 0;
}

.stats-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  opacity: 0.3;
  font-size: 2rem;
}

/* Buttons */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition-fast);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-normal);
}

.btn:hover::before {
  left: 100%;
}

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

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

.btn-success {
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
  color: white;
}

.btn-info {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--primary-500);
  color: var(--primary-500);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-500);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Forms */
.form-control {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: var(--transition-fast);
  background: white;
  color: var(--gray-900);
}

.form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-select {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  background: white;
  color: var(--gray-900);
}

.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

/* Tables */
.table-responsive {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  margin-bottom: 0;
  background: white;
  color: var(--gray-900);
}

.table thead th {
  background: var(--gray-50);
  border: none;
  font-weight: 600;
  color: var(--gray-900);
  padding: 1rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table tbody tr {
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--gray-50);
  transform: scale(1.01);
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border: none;
}

/* Status Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-pending {
  background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
  color: white;
}

.status-completed {
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  color: white;
}

.status-received {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  background: white;
}

.modal-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: var(--gray-900);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1.5rem;
}

/* Ensure modals are hidden by default */
.modal {
  display: none !important;
}

.modal.show {
  display: block !important;
}

.modal.fade:not(.show) {
  opacity: 0;
}

.modal.fade.show {
  opacity: 1;
}

/* Modal backdrop */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Fix any potential conflicts with our CSS */
#addItemModal,
#editItemModal {
  display: none !important;
}

#addItemModal.show,
#editItemModal.show {
  display: block !important;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success-500);
  border-left-color: var(--success-500);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-500);
  border-left-color: var(--warning-500);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-500);
  border-left-color: var(--danger-500);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-500);
  border-left-color: var(--primary-500);
}

/* Low Stock Highlighting */
.low-stock {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
  border-left: 4px solid var(--warning-500);
}

.low-stock td {
  color: var(--warning-500);
  font-weight: 500;
}

/* Action Buttons */
.btn-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-actions .btn {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading States */
.spinner-border {
  color: var(--primary-500);
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.4s ease-out;
}

/* Page Transitions */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
}

/* Search and Filters */
.search-filter-bar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-card {
    padding: 1.5rem;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .btn-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .btn-actions .btn {
    width: 100%;
    min-width: auto;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
}

/* Mobile Navigation Elements */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-600);
  padding: 0.5rem;
  margin-right: 1rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.mobile-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-600);
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.mobile-close-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* Notification Center */
.notification-center {
  position: relative;
  margin-right: 1rem;
}

.notification-bell {
  position: relative;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-600);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
}

.notification-bell:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger-500);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  transform: translate(25%, -25%);
  animation: badgePulse 2s infinite;
}

.notification-badge:empty,
.notification-badge[data-count="0"] {
  display: none;
}

@keyframes badgePulse {
  0%, 100% {
    transform: translate(25%, -25%) scale(1);
  }
  50% {
    transform: translate(25%, -25%) scale(1.1);
  }
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  z-index: 1000;
  max-height: 500px;
  overflow: hidden;
}

.notification-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header h6 {
  margin: 0;
  font-weight: 600;
  color: var(--gray-900);
}

.notification-list {
  max-height: 300px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item.unread {
  background: var(--primary-50);
  border-left: 3px solid var(--primary-500);
}

.notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
}

.notification-item-icon.info {
  background: var(--primary-500);
}

.notification-item-icon.warning {
  background: var(--warning-500);
}

.notification-item-icon.success {
  background: var(--success-500);
}

.notification-item-icon.error {
  background: var(--danger-500);
}

.notification-item-content {
  flex: 1;
}

.notification-item-title {
  font-weight: 500;
  color: var(--gray-900);
  font-size: var(--text-sm);
  margin-bottom: 0.25rem;
}

.notification-item-message {
  color: var(--gray-600);
  font-size: var(--text-xs);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.notification-item-time {
  color: var(--gray-500);
  font-size: var(--text-xs);
}

.notification-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}

.notification-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--gray-500);
}

/* Header Layout Updates */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  flex-direction: column;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.username {
  color: var(--gray-900);
  font-weight: 500;
  font-size: var(--text-sm);
}

.user-role {
  color: var(--gray-600);
  font-size: var(--text-xs);
}

/* Mobile Responsive Sidebar */
@media (max-width: 768px) {
  .mobile-menu-btn,
  .mobile-close-btn {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-xl);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .main-header {
    padding: 1rem 1.5rem;
  }
  
  .header-title {
    font-size: var(--text-lg);
  }
  
  .header-subtitle {
    font-size: var(--text-xs);
  }
  
  .user-details {
    display: none;
  }
  
  .logout-btn {
    padding: 0.5rem;
    min-width: auto;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .main-header {
    padding: 0.75rem 1rem;
  }
  
  .header-title {
    font-size: var(--text-base);
  }
  
  .header-subtitle {
    display: none;
  }
  
  .user-info i {
    display: none;
  }
}

/* Skeleton Loading Animations */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text.large {
  height: 1.5rem;
}

.skeleton-text.small {
  height: 0.75rem;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 120px;
  margin-bottom: 1rem;
}

.skeleton-table-row {
  height: 60px;
  margin-bottom: 0.5rem;
}

.skeleton-button {
  height: 44px;
  width: 120px;
  border-radius: var(--radius-md);
}

/* Enhanced Loading States */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
  transition: opacity var(--transition-normal);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-dots {
  display: flex;
  gap: 0.25rem;
}

.loading-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: loading-dots 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0; }

@keyframes loading-dots {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Progress Bars */
.progress-modern {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-modern .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  border-radius: 3px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-modern .progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced Notifications */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  max-width: 400px;
}

.notification {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--primary-500);
  transform: translateX(400px);
  animation: slideInNotification 0.3s ease-out forwards;
}

.notification.success {
  border-left-color: var(--success-500);
}

.notification.warning {
  border-left-color: var(--warning-500);
}

.notification.error {
  border-left-color: var(--danger-500);
}

@keyframes slideInNotification {
  to {
    transform: translateX(0);
  }
}

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

.notification-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  margin-right: 0.75rem;
}

.notification.success .notification-icon {
  background: var(--success-500);
}

.notification.warning .notification-icon {
  background: var(--warning-500);
}

.notification.error .notification-icon {
  background: var(--danger-500);
}

.notification.info .notification-icon {
  background: var(--primary-500);
}

/* Professional Footer */
.main-footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  margin-top: 3rem;
  padding: 2rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-brand {
  margin-bottom: 0.75rem;
}

.footer-description {
  color: var(--gray-600);
  font-size: var(--text-sm);
  margin: 0;
  line-height: 1.5;
}

.footer-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-500);
  animation: statusPulse 2s infinite;
}

.status-dot.online {
  background: var(--success-500);
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.system-info {
  color: var(--gray-500);
  font-size: var(--text-xs);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: var(--gray-600);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--primary-600);
}

.footer-bottom {
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.footer-meta {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* Advanced Search & Filtering */
.advanced-search-bar .card {
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.search-input-group {
  position: relative;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition-fast);
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
  background: var(--primary-50);
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-title {
  font-weight: 500;
  color: var(--gray-900);
}

.suggestion-subtitle {
  font-size: var(--text-xs);
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.advanced-filters {
  animation: slideDown 0.3s ease-out;
}

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

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filter-tag .remove-filter {
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  color: var(--primary-600);
  font-size: 0.75rem;
}

.filter-tag .remove-filter:hover {
  color: var(--primary-800);
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preset-button {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.preset-button:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

.preset-button .remove-preset {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.preset-button .remove-preset:hover {
  color: var(--danger-500);
}

/* Bulk Actions Bar */
.bulk-actions-bar {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease-out;
}

.selected-count {
  font-weight: 500;
  color: var(--primary-700);
}

.bulk-actions {
  display: flex;
  gap: 0.5rem;
}

/* Table Enhancements */
.table-responsive-mobile {
  position: relative;
}

.table th {
  position: relative;
  user-select: none;
}

.table th.sortable {
  cursor: pointer;
  padding-right: 2rem;
}

.table th.sortable:hover {
  background: var(--gray-50);
}

.sort-indicator {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--gray-400);
}

.table th.sorted-asc .sort-indicator {
  color: var(--primary-600);
}

.table th.sorted-desc .sort-indicator {
  color: var(--primary-600);
}

.table-checkbox {
  width: 20px;
}

.table-row-selected {
  background: var(--primary-50) !important;
}

/* Search Highlighting */
.search-highlight {
  background: rgba(255, 235, 59, 0.3);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .main-footer {
    padding: 1.5rem 1rem 1rem;
  }
  
  .advanced-search-bar .row > div {
    margin-bottom: 1rem;
  }
  
  .bulk-actions {
    flex-direction: column;
  }
  
  .bulk-actions .btn {
    width: 100%;
  }
}

/* Utility Classes */
.text-primary { color: var(--gray-900); }
.text-secondary { color: var(--gray-600); }
.text-muted { color: var(--gray-500); }
.bg-primary { background-color: var(--primary-500); }
.bg-white { background-color: white; }
.border-gray { border-color: var(--gray-200); }
.rounded { border-radius: var(--radius-md); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Component Spacing */
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-6 > * + * { margin-top: var(--space-6); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Flexbox Utilities */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.flex-1 { flex: 1; }

/* Text Sizes */
.fs-4 { font-size: var(--text-xl); }
.fs-5 { font-size: var(--text-lg); }
.fs-6 { font-size: var(--text-base); }

/* Font Weights */
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }

/* Badge Styles */
.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.bg-light {
  background-color: var(--gray-100) !important;
}

/* Enhanced Button Styles */
.rounded-pill {
  border-radius: 50rem;
}

.btn-sm.rounded-pill {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Text Colors */
.text-success { color: var(--success-500) !important; }
.text-warning { color: var(--warning-500) !important; }
.text-danger { color: var(--danger-500) !important; }
.text-dark { color: var(--gray-900) !important; }

/* Grid System */
.grid {
  display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Mobile Table Responsiveness */
.table-responsive-mobile {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

@media (max-width: 768px) {
  .table-responsive-mobile {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
  
  .table-responsive-mobile table {
    min-width: 600px; /* Ensure table doesn't get too cramped */
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
    font-size: var(--text-sm);
  }
  
  .table th {
    white-space: nowrap;
  }
  
  /* Hide less important columns on mobile */
  .table .d-none-mobile {
    display: none !important;
  }
  
  /* Stack action buttons vertically on very small screens */
  .btn-actions {
    flex-direction: column;
    gap: 0.25rem;
    min-width: 120px;
  }
  
  .btn-actions .btn {
    width: 100%;
    font-size: var(--text-xs);
    padding: 0.375rem 0.5rem;
  }
}

/* Touch-friendly buttons and form elements */
@media (max-width: 768px) {
  .btn {
    min-height: 44px; /* Touch-friendly minimum */
    font-size: var(--text-sm);
  }
  
  .btn-sm {
    min-height: 36px;
    font-size: var(--text-xs);
  }
  
  .form-control,
  .form-select {
    min-height: 48px;
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.75rem;
  }
  
  .form-control:focus,
  .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  }
  
  /* Modal optimizations for mobile */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-content {
    border-radius: var(--radius-lg);
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: var(--text-lg);
  }
  
  /* Card spacing on mobile */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Stats cards mobile layout */
  .stats-card {
    padding: 1rem;
    text-align: center;
  }
  
  .stats-number {
    font-size: 1.75rem;
  }
  
  .stats-label {
    font-size: var(--text-xs);
  }
}

/* Very small screen optimizations */
@media (max-width: 480px) {
  .container-fluid {
    padding: 0.75rem;
  }
  
  .content-container {
    padding: 1rem;
  }
  
  .page-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .search-filter-bar {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .search-filter-bar .form-control {
    margin-bottom: 0.5rem;
  }
  
  /* Full-width modals on very small screens */
  .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100vh;
    display: flex;
  }
  
  .modal-content {
    flex: 1;
    border-radius: 0;
    border: none;
  }
  
  .modal-body {
    overflow-y: auto;
    flex: 1;
  }
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .grid-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .grid-cols-6,
  .grid-cols-4,
  .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .grid-cols-6,
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

/* Grid Column Spans */
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }

/* Spacing */
.mb-6 { margin-bottom: var(--space-12); }
.mb-8 { margin-bottom: var(--space-20); }
.me-2 { margin-right: var(--space-2); }