/* Modern Color Palette */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4338ca;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --border-color: #e2e8f0;
  --text-muted: #64748b;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Base HTML and Body Setup for Sticky Footer */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Modern Body Styling */
body {
  margin-bottom: 120px; /* Increased to accommodate footer height */
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
}

/* Modern Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  z-index: 1030 !important;
  position: relative;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none !important;
}

.navbar-brand:hover {
  opacity: 0.8;
}

/* Modern Navigation Links */
.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--secondary-color) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: rgba(99, 102, 241, 0.1);
}

/* Dropdown Menu Styling */
.dropdown-menu {
  z-index: 1040 !important;
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}

.dropdown-item:hover {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid var(--border-color);
}

/* Modern Buttons */
.btn {
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background-color: var(--success-color);
  border: none;
}

.btn-success:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.btn-outline-danger {
  color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-outline-danger:hover {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  color: var(--secondary-color);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Modern Cards */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  background: white;
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.card-body {
  padding: 1.5rem;
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--dark-color);
  line-height: 1.2;
}

.display-5, .display-4 {
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Modern Forms */
.form-control, .form-select {
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: all 0.2s ease;
  background-color: white;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Modern Input Groups */
.input-group .btn {
  border-radius: 0 0.5rem 0.5rem 0;
}

.input-group .form-control {
  border-radius: 0.5rem 0 0 0.5rem;
}

.input-group-text {
  border: 2px solid var(--border-color);
  background-color: white;
}

/* Modern Alerts */
.alert {
  border: none;
  border-radius: 0.75rem;
  font-weight: 500;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  color: #92400e;
}

/* Modern List Groups */
.list-group-item {
  border: none;
  border-radius: 0.5rem !important;
  margin-bottom: 0.5rem;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.list-group-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

/* Modern Footer - Fixed at Bottom */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: auto;
  min-height: 80px;
  background: white;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Main content wrapper to ensure proper spacing */
.main-wrapper {
  min-height: calc(100vh - 140px); /* Adjust based on navbar and footer height */
  padding-top: 2rem; /* Add space between navbar and content */
}

/* Modern Spacing */
.vstack.gap-3 > * + * {
  margin-top: 1.5rem !important;
}

/* Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Modern Text Colors */
.text-muted {
  color: var(--text-muted) !important;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
  body {
    margin-bottom: 140px; /* More space on mobile for footer */
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .btn-group-sm .btn, .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .footer {
    min-height: 100px; /* Taller footer on mobile */
  }

  .main-wrapper {
    padding-top: 1.5rem; /* Less padding on mobile */
  }
}

/* Modern Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.3s ease forwards;
}

/* Modern Search Bar */
.search-container {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 0.25rem;
  position: relative;
  z-index: 5;
}

.search-container .form-control {
  border: none;
  box-shadow: none;
}

.search-container .btn {
  border-radius: 0.75rem;
}

/* Hero Section Styling */
.hero-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 2rem;
  margin: 2rem 0;
}

.features-section {
  background: transparent;
}

.feature-icon {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}