/* General background for dashboard */
body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background-color 0.3s, color 0.3s;
  scroll-behavior: smooth;
}

.main-content {
  transition: all 0.3s ease;
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .navbar {
  background-color: #1f1f1f !important;
  color: #e0e0e0;
}

body.dark-mode .sidebar {
  background-color: #1e1e1e !important;
  color: #e0e0e0;
}

body.dark-mode .card {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .table {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .table thead th {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

body.dark-mode .form-control {
  background-color: #2d2d2d;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .form-control:focus {
  background-color: #2d2d2d;
  color: #e0e0e0;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

body.dark-mode .form-select {
  background-color: #2d2d2d;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .input-group-text {
  background-color: #2d2d2d;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .chart-container {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .modal-content {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .modal-header {
  background: linear-gradient(135deg, #2d2d2d, #1e1e1e);
  border-bottom: 1px solid #444;
  color: #e0e0e0;
}

body.dark-mode .modal-footer {
  background-color: #2d2d2d;
  border-top: 1px solid #444;
  color: #e0e0e0;
}

body.dark-mode .btn-close {
  filter: invert(1);
}

body.dark-mode .toast {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #444;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
  color: #ffffff;
}

body.dark-mode .text-muted {
  color: #adb5bd !important;
}

body.dark-mode .badge {
  color: #ffffff;
}

body.dark-mode .nav-link {
  color: #adb5bd;
}

body.dark-mode .nav-link:hover {
  color: #ffffff;
  background-color: rgba(110, 168, 254, 0.15);
}

body.dark-mode .nav-link.active {
  color: #6ea8fe !important;
  background-color: rgba(110, 168, 254, 0.2);
}

body.dark-mode .nav-link::before {
  background: #6ea8fe;
}

body.dark-mode .nav-link.active::before {
  background: #3d8bfd;
}

body.dark-mode .stat-card h3, 
body.dark-mode .stat-card h5 {
  color: #ffffff;
}

body.dark-mode .chart-container h5 {
  color: #ffffff;
}

body.dark-mode .table-responsive {
  color: #e0e0e0;
}

/* Sidebar styling */
.nav-link {
  color: #6c757d;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 12px;
  margin-bottom: 8px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

/* Mobile navigation menu */
.mobile-nav-trigger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 1rem;
}

.mobile-nav-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100vh;
  background: white;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.mobile-nav-menu.active {
  left: 0;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 20px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
}

.mobile-nav-menu .nav-link {
  padding: 15px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  border-radius: 15px;
}

.mobile-nav-menu .nav-link.active {
  background-color: rgba(13, 110, 253, 0.15);
}

/* Mobile top bar */
.mobile-top-bar {
  display: none;
  background: linear-gradient(135deg, #007bff, #0056b3);
  padding: 10px 15px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-top-bar .navbar-brand {
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
}

.mobile-top-bar .d-flex {
  align-items: center;
}

.mobile-top-bar .btn {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.mobile-top-bar #themeToggle {
  margin-right: 10px;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #007bff;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
  transform: translateX(5px);
}

.nav-link:hover::before {
  transform: scaleY(1);
}

.nav-link.active {
  font-weight: 600;
  color: #0d6efd !important;
  background-color: rgba(13, 110, 253, 0.15);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.nav-link.active::before {
  transform: scaleY(1);
  background: #0056b3;
}

.sidebar {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 0 15px 15px 0;
  padding: 20px !important;
  position: fixed;
  top: 56px; /* Height of navbar */
  left: 0;
  height: calc(100vh - 56px); /* Full height minus navbar */
  overflow-y: auto;
  width: 250px;
  z-index: 1000;
  background: white;
}

/* Main content offset to accommodate fixed sidebar */
.main-content {
  margin-left: 250px;
  padding: 20px;
  transition: margin-left 0.3s ease;
}

body.dark-mode .nav-link {
  color: #adb5bd;
}

body.dark-mode .nav-link:hover {
  color: #6ea8fe;
  background-color: rgba(110, 168, 254, 0.1);
}

body.dark-mode .nav-link.active {
  color: #6ea8fe !important;
  background-color: rgba(110, 168, 254, 0.1);
}

/* Card styling */
.stat-card {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  margin-bottom: 25px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  z-index: -1;
  border-radius: 20px;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.stat-card .card-body {
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.stat-card h5 {
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.stat-card h3 {
  font-weight: 800;
  font-size: 2.5rem;
  margin-top: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modern chart container */
.chart-container {
  padding: 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  overflow: hidden; /* Prevent content overflow */
}

.chart-container:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.chart-container h5 {
  font-weight: 700;
  margin-bottom: 25px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
}

/* Chart container responsive adjustments */
@media (max-width: 768px) {
  .chart-container {
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
  }
  
  .chart-container h5 {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }
  
  /* Make charts responsive */
  canvas {
    max-width: 100%;
    height: auto !important; /* Important to override Chart.js inline styles */
  }
}

@media (max-width: 576px) {
  .chart-container {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .chart-container h5 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
}

/* Modern table styling */
.table {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed; /* Help with text wrapping */
}

.table thead th {
  background-color: #f8f9fa;
  font-weight: 700;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid #e9ecef;
  word-wrap: break-word; /* Break long words */
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

/* Text truncation for table cells */
.table td a.text-truncate,
.table td span.text-truncate {
  display: inline-block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  .table {
    font-size: 0.9rem;
  }
  
  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.5rem;
  }
  
  /* Allow horizontal scrolling on small screens */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 576px) {
  .table {
    font-size: 0.85rem;
  }
  
  .table thead th,
  .table tbody td {
    padding: 0.5rem 0.25rem;
  }
  
  .table thead th {
    font-size: 0.8rem;
  }
}

/* Modern button styling */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 20px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545, #a71e2a);
  color: white;
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8, #117a8b);
  color: white;
}

.btn-outline-primary {
  border: 2px solid #007bff;
  color: #007bff;
  background: transparent;
}

.btn-outline-primary:hover {
  background: #007bff;
  color: white;
}

/* Modern modal styling */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .modal-content {
    border-radius: 15px;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1.25rem;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 5px;
    max-width: calc(100% - 10px);
  }
  
  .modal-content {
    border-radius: 12px;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1.15rem;
  }
  
  .chart-container {
    padding: 15px;
  }
}

/* Modern form styling */
.form-control {
  border-radius: 12px;
  padding: 15px 18px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  background: #fff;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
  background: #fff;
}

.form-select {
  border-radius: 12px;
  padding: 15px 18px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
}

.input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.input-group:focus-within {
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.input-group-text {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-right: none;
  padding: 15px 18px;
}

/* Modern navbar styling */
.navbar {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #007bff, #0056b3) !important;
  transition: all 0.3s ease;
}

.navbar-brand {
  transition: all 0.3s ease;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

/* Modern badge styling */
.badge {
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
}

/* Modern toast styling */
.toast {
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: none;
}

/* Theme toggle button */
#themeToggle {
  transition: all 0.3s ease;
  transform: rotate(0deg);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#themeToggle:hover {
  transform: rotate(20deg);
  border-color: rgba(255, 255, 255, 0.5);
}

body.dark-mode #themeToggle {
  transform: rotate(0deg);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

body.dark-mode #themeToggle:hover {
  transform: rotate(-20deg);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Modern sidebar styling */
.sidebar {
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
  border-radius: 0 20px 20px 0;
  padding: 25px !important;
  position: fixed;
  top: 56px; /* Height of navbar */
  left: 0;
  height: calc(100vh - 56px); /* Full height minus navbar */
  overflow-y: auto;
  width: 270px;
  z-index: 1000;
  background: white;
  transition: all 0.3s ease;
}

/* Main content offset to accommodate fixed sidebar */
.main-content {
  margin-left: 270px;
  padding: 15px;
  transition: margin-left 0.3s ease;
  margin-top: 0; /* Remove extra top space */
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: calc(100% - 270px); /* Ensure proper width */
  max-width: calc(100% - 270px); /* Ensure proper width on all devices */
}

/* Mobile responsive adjustments */
@media (max-width: 992px) {
  .sidebar {
    width: 200px;
  }
  
  .main-content {
    margin-left: 200px;
    width: calc(100% - 200px);
    max-width: calc(100% - 200px);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-top-bar {
    display: flex;
  }
  
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
    margin-top: 60px; /* Height of mobile top bar */
    width: 100%;
    max-width: 100%;
    padding: 10px;
  }
  
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .stat-card .card-body {
    padding: 1.25rem;
  }
  
  .chart-container {
    padding: 20px;
  }
  
  .table-responsive {
    font-size: 0.85rem;
  }
  
  .btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 8px;
  }
  
  .stat-card h3 {
    font-size: 1.75rem;
  }
  
  .stat-card h5 {
    font-size: 1.1rem;
  }
  
  .chart-container h5 {
    font-size: 1.15rem;
  }
  
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    gap: 8px;
  }
  
  .btn i {
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1.2rem;
  }
  
  .form-control,
  .form-select {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  
  .input-group-text {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
}

/* Primary stat card */
.stat-card-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: card-pulse 2s infinite;
}

.stat-card-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
  animation: none;
}

/* Success stat card */
.stat-card-success {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: card-pulse 2s infinite;
}

.stat-card-success:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
  animation: none;
}

/* Warning stat card */
.stat-card-warning {
  background: linear-gradient(135deg, #ffc107, #d39e00);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: card-pulse 2s infinite;
}

.stat-card-warning:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
  animation: none;
}

/* Danger stat card */
.stat-card-danger {
  background: linear-gradient(135deg, #dc3545, #a71e2a);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: card-pulse 2s infinite;
}

.stat-card-danger:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
  animation: none;
}

/* Info stat card */
.stat-card-info {
  background: linear-gradient(135deg, #17a2b8, #117a8b);
  color: white;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: card-pulse 2s infinite;
}

.stat-card-info:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(23, 162, 184, 0.4);
  animation: none;
}

/* Advanced color palette */
:root {
  --primary-gradient: linear-gradient(135deg, #007bff, #0056b3);
  --success-gradient: linear-gradient(135deg, #28a745, #1e7e34);
  --warning-gradient: linear-gradient(135deg, #ffc107, #d39e00);
  --info-gradient: linear-gradient(135deg, #17a2b8, #117a8b);
  --danger-gradient: linear-gradient(135deg, #dc3545, #a71e2a);
  --dark-gradient: linear-gradient(135deg, #343a40, #212529);
  --light-gradient: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

body.dark-mode .stat-card-primary {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

body.dark-mode .stat-card-success {
  background: linear-gradient(135deg, #198754, #157347);
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

body.dark-mode .stat-card-warning {
  background: linear-gradient(135deg, #ffc107, #ffca2c);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

body.dark-mode .stat-card-info {
  background: linear-gradient(135deg, #0dcaf0, #31d2f2);
  box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
}

body.dark-mode .stat-card-danger {
  background: linear-gradient(135deg, #dc3545, #bb2d3b);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Chart container */
.chart-container {
  padding: 25px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
  transition: box-shadow 0.3s ease;
}

.chart-container:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.chart-container h5 {
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Table styling */
.table {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.table thead th {
  background-color: #f1f5fd;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.075);
}

/* Button styling */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 10px 16px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #007bff, #00bcd4);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, #008ba3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #8bc34a);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #1e7e34, #6da83a);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545, #ff5722);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #bd2130, #e64a19);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8, #00bcd4);
  border: none;
}

.btn-info:hover {
  background: linear-gradient(135deg, #117a8b, #008ba3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
  border-color: #007bff;
  color: #007bff;
}

.btn-outline-primary:hover {
  background: #007bff;
  color: white;
}

/* Modal styling */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  padding: 1.25rem;
}

.modal-title {
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

/* Form styling */
.form-control {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #ced4da;
}

.form-select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-group {
  border-radius: 8px;
  overflow: hidden;
}

.input-group-text {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-right: none;
}

/* Navbar styling */
.navbar {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Alert styling */
.alert {
  border-radius: 8px;
}

/* Animation for loading */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

.loading {
  animation: pulse 1.5s infinite;
}

/* Pulse animation for stat cards */
@keyframes card-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Modern spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 123, 255, 0.2);
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modern loader with text */
.modern-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modern-loader .spinner {
  margin-bottom: 1rem;
}

.modern-loader p {
  margin: 0;
  font-weight: 500;
  color: #6c757d;
}

/* Copy button styling */
.copy-btn {
  transition: all 0.3s ease;
}

.copy-btn:hover {
  transform: scale(1.1);
}

/* Badge styling */
.badge {
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
}

/* Progress bar styling */
.progress {
  border-radius: 10px;
  height: 10px;
}

.progress-bar {
  border-radius: 10px;
}

/* Toast styling */
.toast {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Card header styling */
.card-header {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .scroll-to-top {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    margin-top: 10px;
    padding: 15px !important;
    height: auto;
    position: relative;
  }
  
  .stat-card h3 {
    font-size: 1.5rem;
  }
  
  .chart-container {
    padding: 15px;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
  
  .table-responsive th,
  .table-responsive td {
    padding: 0.5rem;
  }
  
  .btn {
    padding: 8px 12px;
    font-size: 0.875rem;
  }
  
  .modal-dialog {
    margin: 10px;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .form-control,
  .form-select {
    padding: 10px 12px;
  }
}

@media (max-width: 576px) {
  .stat-card h3 {
    font-size: 1.25rem;
  }
  
  .stat-card h5 {
    font-size: 1rem;
  }
  
  .chart-container h5 {
    font-size: 1.1rem;
  }
  
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    gap: 5px;
  }
  
  .btn i {
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1.1rem;
  }
  
  .form-control,
  .form-select {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  .input-group-text {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

/* Animation classes */
.animate__animated.animate__fadeIn {
  --animate-duration: 0.5s;
}

.animate__animated.animate__fadeInDown {
  --animate-duration: 0.5s;
}

/* Custom utility classes */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .scroll-to-top {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}
