@import url("bootstrap-icons-1.7.1/font/bootstrap-icons.css");
/* @import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400&display=swap'); */

@font-face {
  font-family: 'Ubuntu';
  src: URL('fonts/Ubuntu/Ubuntu-Regular.ttf') format('truetype');
}

/* ============================================
   MODERN DARK SIDEBAR THEME (#2a3042)
   ============================================ */
:root {
  /* Main System Color - Based on #2a3042 */
  --main-color: #2a3042;
  --main-dark: #1f2435;
  --main-darker: #181c28;
  --main-light: #353b52;
  --main-lighter: #3f4659;
  --main-lightest: #4a5266;
  
  /* Sidebar Colors - Using Main Color */
  --sidebar-bg: var(--main-color);
  --sidebar-dark: var(--main-dark);
  --sidebar-light: var(--main-light);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: rgba(255, 255, 255, 0.1);
  --sidebar-text: rgba(255, 255, 255, 0.9);
  --sidebar-text-muted: rgba(255, 255, 255, 0.6);
  --sidebar-text-light: rgba(255, 255, 255, 1);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  
  /* Primary Colors - Based on Main Color */
  --primary: #2a3042;
  --primary-dark: #1f2435;
  --primary-darker: #181c28;
  --primary-light: #353b52;
  --primary-lighter: #3f4659;
  --primary-lightest: #4a5266;
  --primary-bg: #f0f2f5;
  --primary-bg-light: #f8f9fa;
  
  /* Secondary Colors - Complementary shades */
  --secondary: #3f4659;
  --secondary-dark: #353b52;
  --secondary-light: #4a5266;
  
  /* Accent Colors - Harmonious with main color */
  --success: #2d7a4f;
  --success-light: #3a9b66;
  --success-bg: #e8f5ed;
  
  --warning: #8b6f2a;
  --warning-light: #b8943a;
  --warning-bg: #f5f0e0;
  
  --danger: #8b2d2d;
  --danger-light: #b83a3a;
  --danger-bg: #f5e8e8;
  
  --info: #2d5a7a;
  --info-light: #3a7ab8;
  --info-bg: #e8f0f5;
  
  /* Neutral Colors */
  --gray-50: #f7f9fa;
  --gray-100: #eef1f3;
  --gray-200: #dde2e6;
  --gray-300: #c8d0d6;
  --gray-400: #9aa5b0;
  --gray-500: #6b7885;
  --gray-600: #4d5863;
  --gray-700: #3a4249;
  --gray-800: #2a3036;
  --gray-900: #1a1e22;
  
  /* Background Colors */
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef1f3;
  
  /* Text Colors */
  --text-primary: #2a3042;
  --text-secondary: #4d5863;
  --text-tertiary: #6b7885;
  --text-muted: #9aa5b0;
  
  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;
  
  /* Shadow Colors - Using Main Color */
  --shadow-sm: 0 1px 2px 0 rgba(42, 48, 66, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(42, 48, 66, 0.12), 0 2px 4px -1px rgba(42, 48, 66, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(42, 48, 66, 0.15), 0 4px 6px -2px rgba(42, 48, 66, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(42, 48, 66, 0.15), 0 10px 10px -5px rgba(42, 48, 66, 0.08);
  --shadow-primary: 0 4px 14px 0 rgba(42, 48, 66, 0.25);
  --shadow-sidebar: 4px 0 20px rgba(0, 0, 0, 0.2);
}

body {
  background-color: var(--bg-primary);
  font-family: 'Ubuntu', sans-serif;
  color: var(--text-primary);
}

/* Main Content Area */
main {
  background-color: var(--bg-primary);
  min-height: calc(100vh - 56px);
}

/* Content wrapper */
.container-fluid {
  max-width: 100%;
}

/* Card Improvements - Modern */
.card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 20px;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

/* Enhanced hover for dashboard chart cards */
.card[style*="border-radius: 12px"]:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  border-bottom: 1px solid var(--border-light);
  padding: 18px 24px;
  background: var(--bg-tertiary);
  font-weight: 600;
  border-radius: 12px 12px 0 0 !important;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

/* Sidebar Styling - Dark Professional Theme */
.sidebar-menu {
  background: var(--sidebar-bg);
  box-shadow: var(--shadow-sidebar);
  transition: transform 0.3s ease-in-out;
  border-right: none;
  color: var(--sidebar-text);
  z-index: 1000;
}

/* Ensure main content area is properly positioned */
/* Main content area */
main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 56px);
}

/* Container and row fixes */
.container-fluid {
  position: relative;
  z-index: 1;
  width: 100%;
}

.container-fluid .row {
  margin-left: 0;
  margin-right: 0;
  position: relative;
}

.container-fluid .row > .col-auto {
  position: relative;
  z-index: 1000;
}

.container-fluid .row > .col {
  position: relative;
  z-index: 1;
  min-width: 0; /* Prevent overflow */
}

/* Desktop: Ensure content doesn't overlap sidebar */
@media (min-width: 992px) {
  .container-fluid .row > .col {
    margin-left: 0;
    padding-left: 1rem;
  }
  
  .sidebar-menu {
    position: sticky;
    top: 56px;
    z-index: 1000;
    width: 240px;
  }
}

/* Tablet: Adjust for sidebar */
@media (min-width: 768px) and (max-width: 991px) {
  .sidebar-menu {
    width: 240px;
  }
  
  .container-fluid .row > .col {
    padding-left: 1rem;
  }
}

.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: var(--sidebar-dark);
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: var(--sidebar-light);
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: var(--sidebar-hover);
}

/* Sidebar Logo Section - Simple */
.sidebar-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 0;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.sidebar-logo-icon i {
  font-size: 20px;
  color: white;
}

.sidebar-logo-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Section Headers - Simple */
.sidebar-section-header {
  padding: 12px 20px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sidebar-text-muted);
  margin-top: 0;
}

/* Mobile Sidebar */
@media (max-width: 767px) {
  .sidebar-menu {
    position: fixed !important;
    left: 0;
    top: 56px !important;
    z-index: 1060 !important;
    transform: translateX(-100%);
    box-shadow: none;
    pointer-events: auto !important;
    width: 280px;
    height: calc(100vh - 56px);
    overflow-y: auto;
  }
  
  .sidebar-menu.show {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    pointer-events: auto !important;
  }
  
  /* Ensure all sidebar links are clickable */
  .sidebar-menu.show {
    pointer-events: auto !important;
    z-index: 1060 !important;
  }
  
  .sidebar-menu.show * {
    pointer-events: auto !important;
  }
  
  .sidebar-menu .nav-link,
  .sidebar-menu .nav-link *,
  .sidebar-menu button,
  .sidebar-menu a,
  .sidebar-menu .btn-close,
  .sidebar-menu .dropdown-toggle,
  .sidebar-menu .dropdown-item {
    pointer-events: auto !important;
    position: relative;
    z-index: 1061 !important;
    cursor: pointer;
  }
  
  /* Ensure dropdown toggles work */
  .sidebar-menu .dropdown-toggle {
    pointer-events: auto !important;
    cursor: pointer;
    z-index: 1061 !important;
  }
  
  /* Ensure collapse menus are clickable */
  .sidebar-menu .collapse,
  .sidebar-menu .collapse * {
    pointer-events: auto !important;
    z-index: 1061 !important;
  }
  
  /* Ensure dropdown menus are clickable */
  .sidebar-menu .dropdown-menu {
    pointer-events: auto !important;
    z-index: 1062 !important;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    pointer-events: auto;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  /* Prevent overlay from blocking sidebar clicks */
  .sidebar-overlay.show {
    pointer-events: auto;
  }
}

/* Modal Fix - Proper z-index and interaction handling */
/* Backdrop should be below modal */
.modal-backdrop {
  z-index: 1040;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal container - above backdrop */
.modal {
  z-index: 1055;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Modal dialog - fully interactive */
.modal-dialog {
  position: relative;
  margin: 1.75rem auto;
  pointer-events: auto;
}

/* Modal content - fully interactive */
.modal-content {
margin-top: 100px;
  position: relative;
  pointer-events: auto;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* When modal is shown - ensure it's visible and interactive */
.modal.show {
  display: block;
}

/* Ensure all modal elements are fully interactive */
.modal.show .modal-dialog,
.modal.show .modal-content,
.modal.show .modal-body,
.modal.show .modal-header,
.modal.show .modal-footer {
  pointer-events: auto;
}

/* Body modal-open state - ensure proper stacking */
body.modal-open {
  overflow: hidden;
}

body.modal-open .modal-backdrop {
  z-index: 1040;
}

body.modal-open .modal {
  z-index: 1055;
}

/* Prevent multiple backdrops from stacking */
.modal-backdrop:not(:first-of-type) {
  display: none;
}

/* Hide sidebar by default on mobile and make content full width */
@media (max-width: 767px) {
  .row > .col-auto {
    display: none;
  }
  
  .row > .col-auto.show {
    display: block;
  }

  /* Make content full width on mobile */
  .container-fluid .row > .col {
    max-width: 100%;
    flex: 0 0 100%;
    margin-left: 0;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
  }
  
  /* Ensure main content doesn't overlap */
  main {
    position: relative;
    z-index: 1;
    width: 100%;
  }
  
  /* Fix container-fluid padding on mobile */
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
  }
  
  /* Ensure content inside doesn't overflow */
  .container-fluid .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Tablet responsive - Keep full sidebar with text */
@media (min-width: 768px) and (max-width: 991px) {
  .sidebar-menu {
    width: 240px !important;
  }
  
  .sidebar-menu .nav-link {
    padding: 10px 20px;
  }
  
  .sidebar-menu .nav-link i {
    min-width: 20px;
  }
}

/* Sidebar Navigation Links - Simple & Clean */
.sidebar-menu .nav-item {
  margin-bottom: 0;
}

.sidebar-menu .nav-item > .nav.collapse {
  border-left: none;
  background: transparent;
  margin-left: 0;
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.sidebar-menu .nav-link {
  color: var(--sidebar-text);
  padding: 10px 20px;
  font-size: 0.875rem;
  border-radius: 0;
  margin: 0;
  transition: background-color 0.2s ease;
  font-weight: 400;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-menu .nav-link i {
  font-size: 1rem;
  min-width: 20px;
  opacity: 0.9;
}

.sidebar-menu .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text-light);
}

.sidebar-menu .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

.sidebar-menu .nav-link.active i {
  opacity: 1;
}

/* Dropdown Arrow in Sidebar */
.sidebar-menu .nav-link .bi-chevron-down {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.sidebar-menu .nav-link[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

/* Submenu Items in Sidebar */
.sidebar-menu .nav.collapse .nav-link {
  padding: 8px 20px 8px 40px;
  font-size: 0.8rem;
  color: var(--sidebar-text-muted);
  margin: 0;
}

.sidebar-menu .nav.collapse .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text-light);
}

.sidebar-menu .nav.collapse .nav-link i {
  font-size: 0.9rem;
}

/* Dashboard Stat Cards - Modern Professional */
.stat-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  transition: width 0.3s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-lighter);
  transform: translateY(-2px);
}

.stat-card:hover::before {
  width: 100%;
  opacity: 0.05;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  background: var(--primary-bg);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  border: 1px solid var(--primary-lighter);
}

.stat-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  color: var(--primary-dark);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin: 6px 0 0 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Stat Cards - Clean & Minimal */
.stat-card-modern {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  height: 100%;
}

.stat-card-modern:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.stat-icon-modern {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--primary);
  color: white;
  flex-shrink: 0;
}

.stat-content-modern {
  flex: 1;
}

.stat-number-modern {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text-primary);
}

.stat-label-modern {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Elegant Stat Cards - Modern Design */
.stat-card-elegant {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card-elegant:hover {
  box-shadow: 0 8px 24px rgba(42, 48, 66, 0.12);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.stat-card-header {
  margin-bottom: 16px;
}

.stat-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.stat-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.stat-card-main {
  flex: 1;
}

.stat-card-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.stat-card-details {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.stat-card-details i {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-card-text {
  font-weight: 500;
}

.stat-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: absolute;
  right: 0;
  top: 0;
}

/* Mini Stats Cards - Bootstrap Design */
.mini-stats-wid {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mini-stats-wid:hover {
  box-shadow: 0 8px 24px rgba(42, 48, 66, 0.12);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.mini-stats-wid .card-body {
  padding: 20px;
}

.avatar-sm {
  width: 56px;
  height: 56px;
  min-width: 56px;
}

.avatar-title {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Modern Welcome Icon */
.welcome-icon-modern {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--primary);
  color: white;
  flex-shrink: 0;
}

/* Welcome Cards - Modern Professional */
.welcome-card {
  padding: 28px;
  border-radius: 16px;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-bg) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.welcome-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-lighter);
  transform: translateY(-4px);
}

.welcome-card:hover::after {
  opacity: 0.3;
}

.welcome-card .welcome-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  border: 1px solid var(--primary-dark);
}

.welcome-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.welcome-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.bg-dark {
  background: var(--primary);
}

.navbar-pad {
  padding-top: 0;
  padding-bottom: 0;
}

/* Modern Navbar Styles */
.navbar-brand-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.navbar-brand-logo {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 40px;
  max-height: 40px;
}

.user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.user-avatar-small img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.navbar .dropdown-toggle::after {
  margin-left: 8px;
}

.navbar .dropdown-menu {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  margin-top: 8px;
  padding: 8px;
  min-width: 220px;
}

.navbar .dropdown-header {
  padding: 12px;
  margin-bottom: 0;
}

.navbar .dropdown-item {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.navbar .dropdown-item.text-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.navbar .badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
}

.pos-fix-bt0-z10 {
  position: fixed;
  bottom: 0;
  z-index: 10;
}

.border-top-e6 {
  /* border-top: 1px solid #e6e6e6; */
  border-top: 1px solid #d9d9d9;
}

.border-btm-e6 {
  /* border-bottom: 1px solid #e6e6e6; */
  border-bottom: 1px solid #d9d9d9;
}

.border-rt-e6 {
  /* border-right: 1px solid #e6e6e6; */
  border-right: 1px solid #d9d9d9;
}

.loading-bg-color {
  background-color: #f8f9fa;
}

.dropdown-toggle.caret-off::after {
  display: none;
}
/*https://mdbootstrap.com/docs/standard/extended/timeline/*/
.timeline-1 {
  border-left: 3px solid #b565a7;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
  background: rgba(177, 99, 163, 0.09);
  margin: 0 auto;
  position: relative;
  padding: 50px;
  list-style: none;
  text-align: left;
  max-width: 40%;
}
  
@media (max-width: 767px) {
  .timeline-1 {
    max-width: 98%;
    padding: 25px;
  }
}
  
  .timeline-1 .event {
    border-bottom: 1px dashed #000;
    padding-bottom: 25px;
    margin-bottom: 25px;
    position: relative;
  }
  
  @media (max-width: 767px) {
    .timeline-1 .event {
      padding-top: 30px;
    }
  }
  
  .timeline-1 .event:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border: none;
  }
  
  .timeline-1 .event:before,
  .timeline-1 .event:after {
    position: absolute;
    display: block;
    top: 0;
  }
  
  .timeline-1 .event:before {
    left: -207px;
    content: attr(data-date);
    text-align: right;
    font-weight: 100;
    font-size: 0.9em;
    min-width: 120px;
  }
  
  @media (max-width: 767px) {
    .timeline-1 .event:before {
      left: 0px;
      text-align: left;
    }
  }
  
  .timeline-1 .event:after {
    -webkit-box-shadow: 0 0 0 3px #b565a7;
    box-shadow: 0 0 0 3px #b565a7;
    left: -55.8px;
    background: #fff;
    border-radius: 50%;
    height: 9px;
    width: 9px;
    content: "";
    top: 5px;
  }
  
  @media (max-width: 767px) {
    .timeline-1 .event:after {
      left: -31.8px;
    }
  }

/* https://laracasts.com/discuss/channels/laravel/loading-spinner-in-blade?page=1&replyId=611191*/
.loading {
  z-index: 20;
  position: absolute;
  top: 0;
  left:-5px;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}
.loading-content {
  position: absolute;
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  top: 40%;
  left:35%;
  animation: spin 2s linear infinite;
}
    
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* .table:not(.syllabus-table) th:first-child,
.table:not(.syllabus-table) td:first-child {
  position: sticky;
  left: 0;
  background-color: #fff;
  color: #212529;
} */

.table th, .table td {
  white-space: nowrap;
}

figure.table th, figure.table td {
  width: 100%;
}

/* Footer Styling - Modern */
footer {
  background: var(--bg-tertiary);
  margin-top: auto;
  border-top: 1px solid var(--border-light);
}

footer .border-top {
  border-top: 1px solid var(--border-light) !important;
}

/* Modern Button Styles - Muted Cool */
.btn-primary {
  background: var(--primary);
  border: 1px solid var(--primary-dark);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  border: 1px solid var(--success);
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: #3a7a62;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Modern Badge Styles */
.badge {
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 500;
}

.badge.bg-light {
  background: var(--primary-bg) !important;
  color: var(--primary-dark) !important;
}

/* Universal Clean Table Styling - Applied to all tables */
.table {
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ffffff;
  border-radius: 0;
}



.table tbody tr {
  background-color: #ffffff;
  transition: none;
}

/* Remove all table hover effects */
.table tbody tr:hover,
.table-hover tbody tr:hover,
.table tbody tr:hover td,
.table-hover tbody tr:hover td {
  background-color: #ffffff !important;
  color: inherit !important;
}

.table tbody tr:last-child td {
  border-bottom: none;
}


/* Table bordered variant */
.table-bordered {
  border: 1px solid #ffffff;
}

.table-bordered thead th {
  border: 1px solid #e9ecef;
}

.table-bordered tbody td {
  border: 1px solid #ffffff;
}

/* Chart Cards - Bootstrap Enhanced */
.chart-card {
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.chart-container {
  min-height: 280px;
}

.chart-container-lg {
  min-height: 320px;
}

/* Dashboard Section Headers */
.dashboard-section-header {
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e9ecef;
}

.dashboard-section-header h4 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dashboard-section-header p {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Section Spacing */
.dashboard-section {
  margin-bottom: 3rem;
}

.dashboard-section:last-child {
  margin-bottom: 0;
}

/* Quick Link Cards */
.quick-link-card {
  transition: all 0.2s ease;
}

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

.quick-link-icon {
  width: 60px;
  height: 60px;
}

/* Avatar Sizes */
.avatar-xs {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-xs .avatar-title {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Staff Table Styling */
.staff-table {
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ffffff;
}

/* Ensure staff table is completely hidden on mobile */
@media (max-width: 767.98px) {
  /* Force hide staff table on mobile screens */
  .staff-table,
  .table-responsive .staff-table,
  .d-none.d-md-block .staff-table {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Hide table-responsive wrapper containing staff-table on mobile */
  .table-responsive.d-none.d-md-block {
    display: none !important;
  }
}

.staff-table tbody tr {
  background-color: #ffffff;
}

.staff-table tbody tr:last-child td {
  border-bottom: none;
}

/* Staff Avatar */
.staff-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 2px solid #e9ecef;
}

.staff-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:#353d53;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e9ecef;
}

.staff-avatar-initials {
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Performance Stars */
.performance-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.performance-stars i {
  font-size: 0.875rem;
}

/* Action Buttons */
.btn-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: none;
  transition: all 0.2s ease;
}

.btn-action-view {
  background-color: #e7f3ff;
  color: #0d6efd;
}

.btn-action-view:hover {
  background-color: #0d6efd;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-action-edit {
  background-color: #f3e8ff;
  color: #6f42c1;
}

.btn-action-edit:hover {
  background-color: #6f42c1;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

.btn-action-delete {
  background-color: #ffe7e7;
  color: #dc3545;
}

.btn-action-delete:hover {
  background-color: #dc3545;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Badge Subtle Styles */
.bg-primary-subtle {
  background-color: #e7f3ff !important;
}

.bg-success-subtle {
  background-color: #d1e7dd !important;
}

.bg-secondary-subtle {
  background-color: #e9ecef !important;
}

.bg-warning-subtle {
  background-color: #fff3cd !important;
}

.bg-info-subtle {
  background-color: #cff4fc !important;
}

.bg-danger-subtle {
  background-color: #f8d7da !important;
}

/* Staff Profile Page */
.staff-profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #353d53;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #e9ecef;
}

.staff-profile-initials {
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.staff-profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #353d53;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #e9ecef;
}

.staff-profile-initials-large {
  color: white;
  font-weight: 600;
  font-size: 2rem;
  text-transform: uppercase;
}

.staff-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.info-item {
  padding: 8px 0;
}

.info-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Table Centered */
.table-centered {
  text-align: center;
}

.table-centered th,
.table-centered td {
  vertical-align: middle;
}

/* Modern Form Controls */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42, 48, 66, 0.1);
}

/* Links - Using Main Color */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

a:focus {
  color: var(--primary-dark);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Breadcrumb Links */
.breadcrumb a {
  color: var(--primary);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.breadcrumb-item.active {
  color: var(--text-secondary);
}

/* Modern Alert Styles */
.alert {
  border-radius: 12px;
  border: none;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: var(--success-bg);
  color: #065f46;
}

.alert-danger {
  background: var(--danger-bg);
  color: #991b1b;
}

.alert-warning {
  background: var(--warning-bg);
  color: #92400e;
}

.alert-info {
  background: var(--info-bg);
  color: #155e75;
}

/* Responsive Navbar */
@media (max-width: 576px) {
  .navbar-brand {
    font-size: 0.9rem !important;
  }
  
  .navbar-brand i {
    font-size: 1rem;
  }
}

/* Mobile Dropdown Fixes */
@media (max-width: 767px) {
  .navbar .dropdown-menu {
    position: fixed !important;
    top: 56px !important;
    right: 10px !important;
    left: auto !important;
    width: calc(100% - 20px) !important;
    max-width: 280px !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    z-index: 1050 !important;
  }
  
  .navbar .dropdown-toggle {
    padding: 0.5rem !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  .navbar .user-avatar-small {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }
  
  /* Prevent body scroll when dropdown is open on mobile */
  body.dropdown-open {
    overflow: hidden !important;
  }
}

/* Responsive tables */
@media (max-width: 767px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .dashboard .col-md-4,
  .dashboard .col-md-6 {
    margin-bottom: 1rem;
  }
}

/* ============================================
   MODERN CLASS CARDS
   ============================================ */
.class-card-modern {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(42, 48, 66, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}

.class-card-modern:hover {
  box-shadow: 0 8px 24px rgba(42, 48, 66, 0.15);
  transform: translateY(-2px);
  border-color: rgba(42, 48, 66, 0.2);
}

.class-card-header {
  padding: 1.25rem;
  background: #2a3042;
  color: white;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.class-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.class-title-section {
  flex: 1;
  min-width: 0;
}

.class-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  margin-top: 0.25rem;
}

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

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: scale(1.05);
}

.class-stats {
  display: flex;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e2e8f0;
  gap: 1rem;
}

.stat-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
  background: #f0f2f5;
  color: #2a3042;
}

.stat-icon.sections {
  background: #f0f2f5;
  color: #2a3042;
}

.stat-icon.courses {
  background: #f0f2f5;
  color: #2a3042;
}

.stat-icon.syllabus {
  background: #f0f2f5;
  color: #2a3042;
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2a3042;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7885;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.class-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.class-section-list {
  flex: 1;
}

.section-list-title,
.courses-preview-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4d5863;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.section-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.section-item:hover {
  background: #f0f2f5;
  border-color: #cbd5e1;
}

.section-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.section-name {
  font-weight: 600;
  color: #2a3042;
  font-size: 0.9375rem;
}

.section-room {
  font-size: 0.75rem;
  color: #6b7885;
}

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

.btn-link-sm {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #2a3042;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.btn-link-sm:hover {
  background: #2a3042;
  color: white;
  border-color: #2a3042;
  transform: scale(1.05);
}

.class-courses-preview {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.courses-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: #2a3042;
  color: white;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.course-badge.more {
  background: #353b52;
}

.class-footer {
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border-top: 1px solid #e2e8f0;
}

.btn-view-details {
  width: 100%;
  padding: 0.625rem 1rem;
  background: #2a3042;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-view-details:hover {
  background: #353b52;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 48, 66, 0.3);
}

.btn-view-details:active {
  transform: translateY(0);
}

/* Responsive adjustments for class cards */
@media (max-width: 991px) {
  .class-stats {
    flex-wrap: wrap;
  }
  
  .stat-item {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

@media (max-width: 767px) {
  .class-card-modern {
    margin-bottom: 1rem;
  }
  
  .class-stats {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .stat-item {
    flex: 1;
  }
  
  .section-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .section-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ============================================
   ACADEMIC SETTINGS MODERN CARDS
   ============================================ */
.card-modern {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(42, 48, 66, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  overflow: hidden;
}

.card-modern:hover {
  box-shadow: 0 4px 16px rgba(42, 48, 66, 0.12);
  transform: translateY(-2px);
}

.card-header-modern {
  background: #2a3042;
  color: white;
  padding: 1rem 1.25rem;
  border-bottom: none;
}

.card-header-modern h6 {
  color: white;
  font-weight: 600;
  margin: 0;
  font-size: 0.9375rem;
}

.card-modern .card-body {
  padding: 1.25rem;
}

.card-modern .form-control,
.card-modern .form-select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  transition: all 0.2s ease;
}

.card-modern .form-control:focus,
.card-modern .form-select:focus {
  border-color: #2a3042;
  box-shadow: 0 0 0 3px rgba(42, 48, 66, 0.1);
}

.card-modern .btn-primary {
  background: #2a3042;
  border-color: #2a3042;
  border-radius: 8px;
  padding: 0.625rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.card-modern .btn-primary:hover {
  background: #353b52;
  border-color: #353b52;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 48, 66, 0.2);
}

.card-modern .form-check-input:checked {
  background-color: #2a3042;
  border-color: #2a3042;
}

.card-modern .form-switch .form-check-input:checked {
  background-color: #2a3042;
  border-color: #2a3042;
}

/* ============================================
   STAFF MOBILE CARD STYLES
   ============================================ */
.staff-card-mobile {
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}

.staff-card-mobile:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.staff-card-mobile .card-body {
  padding: 1rem;
}

.staff-card-mobile h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #2a3042;
  margin-bottom: 0.5rem;
}

.staff-card-mobile .badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.625rem;
}

.staff-card-mobile small.text-muted {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7885;
}

.staff-card-mobile .btn-group-sm .btn,
.staff-card-mobile .btn-sm {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
}

/* Responsive adjustments for staff page */
@media (max-width: 767px) {
  .staff-card-mobile {
    margin-bottom: 1rem;
  }
  
  .card-header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .card-header .d-flex > * {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .card-header .d-flex > *:last-child {
    margin-bottom: 0;
  }
  
  .card-header .form-select {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  .card-header .btn-group,
  .card-header .btn {
    width: 100%;
  }
  
  .card-header .dropdown-menu {
    width: 100%;
    min-width: 100% !important;
  }
}

@media (min-width: 768px) {
  .d-md-none .staff-card-mobile {
    display: none !important;
  }
}

/* HR Dashboard Quick Links Cards */
.hr-dashboard .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
  border-color: var(--primary) !important;
}

.hr-dashboard .card {
  cursor: pointer;
}