/* Enhanced Card Styles */
.stat-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: relative;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-color), var(--card-color-light));
}

.stat-card-primary::before {
  --card-color: #5D87FF;
  --card-color-light: #7da1ff;
}

.stat-card-success::before {
  --card-color: #13DEB9;
  --card-color-light: #3de6c7;
}

.stat-card-warning::before {
  --card-color: #FFAE1F;
  --card-color-light: #ffbe4a;
}

.stat-card-info::before {
  --card-color: #49BEFF;
  --card-color-light: #6dcbff;
}

.stat-card-danger::before {
  --card-color: #FA896B;
  --card-color-light: #fb9d88;
}

.stat-card-secondary::before {
  --card-color: #8B8B8B;
  --card-color-light: #a3a3a3;
}

.stat-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.stat-icon-wrapper::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover .stat-icon-wrapper::before {
  opacity: 1;
}

.stat-icon-wrapper i {
  font-size: 28px;
  position: relative;
  z-index: 1;
}

.stat-content h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #1a1a1a, #4a4a4a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-content p {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.stat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.stat-card:hover .stat-badge {
  opacity: 1;
  transform: translateY(0);
}

.stat-card .card-body {
  padding: 24px;
}

/* Gradient backgrounds for icon wrappers */
.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #13DEB9 0%, #06A77D 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #FFAE1F 0%, #FFA500 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #49BEFF 0%, #2196F3 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #FA896B 0%, #F56036 100%);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, #8B8B8B 0%, #5a5a5a 100%);
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }
.stat-card:nth-child(7) { animation-delay: 0.7s; }
.stat-card:nth-child(8) { animation-delay: 0.8s; }

/* Sidebar Scrolling Fix */
.left-sidebar {
  height: 100vh;
  position: fixed;
  /* allow visible overflow so the internal scroll can show full content */
  overflow: visible;
  box-sizing: border-box;
}

.sidebar-nav {
  /* account for header and some breathing space */
  height: calc(100vh - 150px) !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  /* add extra bottom padding so floating buttons (FAB) don't cover last items */
  padding-bottom: 90px;
  box-sizing: border-box;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(93, 135, 255, 0.5);
  border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(93, 135, 255, 0.8);
}

/* Modern Dashboard Enhancements */
.dashboard-header {
  background: linear-gradient(135deg, #2962ff 0%, #1e4db7 100%);
  padding: 30px;
  border-radius: 15px;
  color: white;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(41, 98, 255, 0.3);
}

.dashboard-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.dashboard-header p {
  opacity: 0.95;
  font-size: 16px;
  color: white;
}

/* Enhanced Card Hover Effects */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Quick Action Cards */
.quick-action-card {
  background: linear-gradient(135deg, #2962ff 0%, #1e4db7 100%);
  border-radius: 15px;
  padding: 25px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.quick-action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(41, 98, 255, 0.4);
}

.quick-action-card.bg-success-gradient {
  background: linear-gradient(135deg, #13DEB9 0%, #06A77D 100%);
}

.quick-action-card.bg-warning-gradient {
  background: linear-gradient(135deg, #FFAE1F 0%, #FFA500 100%);
}

.quick-action-card.bg-info-gradient {
  background: linear-gradient(135deg, #49BEFF 0%, #2196F3 100%);
}

.quick-action-card.bg-danger-gradient {
  background: linear-gradient(135deg, #FA896B 0%, #F56036 100%);
}

/* Cricket Field Animation */
@keyframes cricket-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.cricket-icon {
  animation: cricket-pulse 2s ease-in-out infinite;
}

/* Modern Table Styles */
.table-modern {
  border-radius: 12px;
  overflow: hidden;
}

.table-modern thead {
  background: linear-gradient(135deg, #2962ff 0%, #1e4db7 100%);
  color: white;
}

.table-modern tbody tr {
  transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
  background: rgba(41, 98, 255, 0.05);
  transform: scale(1.01);
}

/* Progress Bars */
.progress-modern {
  height: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.05);
}

.progress-modern .progress-bar {
  border-radius: 10px;
  background: linear-gradient(90deg, #2962ff 0%, #1e4db7 100%);
}

/* Stats Counter Animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-number {
  animation: countUp 0.6s ease-out;
}

/* Card Title Enhancement */
.card-title-modern {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-modern::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #2962ff 0%, #1e4db7 100%);
  border-radius: 10px;
}

/* Badge Enhancements */
.badge-modern {
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Notification Bell Animation */
@keyframes ring {
  0% { transform: rotate(0); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-10deg); }
  50% { transform: rotate(0); }
  100% { transform: rotate(0); }
}

.notification-bell:hover {
  animation: ring 1s ease-in-out;
}

/* Glass Morphism Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Floating Action Button */
.fab-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2962ff 0%, #1e4db7 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(41, 98, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1050;
  border: none;
}

.fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(41, 98, 255, 0.6);
}

.fab-btn.active {
  background: linear-gradient(135deg, #1e4db7 0%, #2962ff 100%);
}

/* Chat Assistant Popup */
.chat-assistant-popup {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 600px;
  z-index: 1040;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  animation: slideUp 0.3s ease-out;
}

.chat-assistant-popup.show {
  display: block;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1030;
  display: none;
}

.chat-overlay.show {
  display: block;
}

/* Responsive Chat Assistant */
@media (max-width: 768px) {
  .chat-assistant-popup {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
    bottom: 90px;
    height: 500px;
  }
  
  .fab-btn {
    right: 20px;
    bottom: 20px;
  }
}

/* Timeline Styles */
.timeline-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 30px;
  border-left: 2px solid #e9ecef;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px #667eea;
}

.timeline-item:last-child {
  border-left: 2px solid transparent;
}

/* Cricket Ball Loader */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.cricket-ball-loader {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* SLC Theme Colors */
.slc-primary {
  color: #003d82 !important;
}

.slc-gold {
  color: #c9a961 !important;
}

.bg-slc-primary {
  background-color: #003d82 !important;
}

.bg-slc-gold {
  background-color: #c9a961 !important;
}
