:root {
  --sidebar-width: 240px;
  --sidebar-collapsed: 90px;
  --sidebar-bg: #203d64;
  --sidebar-text: #ffffff;
  --sidebar-accent: #ffffff;
}

/* ------------------- BASE STYLES ------------------- */
html,
body {
  height: 100%;
}

body {
  margin: 0;
}

/* ------------------- SIDEBAR ------------------- */
/* .sidebar {
  width: var(--sidebar-collapsed);
  height: 100vh;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0.75rem;
  position: fixed;
  top: 0;
  left: 0;
  transition: width 0.3s ease;
  overflow: hidden;
  z-index: 1000;
  border-radius: 0 0.75rem 0.75rem 0;
}

.sidebar:hover {
  width: var(--sidebar-width);
} */


.sidebar {
  width: var(--sidebar-collapsed);
  height: 100vh;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0.75rem;
  position: fixed;
  top: 0;
  left: 0;
  transition: width 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 20000;
  border-radius: 0 0.75rem 0.75rem 0;
  scrollbar-width: thin;
  scrollbar-color: #888 #1e1e1e;
}

.sidebar:hover {
  width: 22vw;
}

/* -------------------------------------------
   ACTIVE TAB STYLES (collapsed vs expanded)
------------------------------------------- */

/* Active tab — visible in collapsed mode */
.sidebar .active {
  background-color: #ffffff;
  /* width: 48px; */
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  /* justify-content: center; */
  color: #1e3a5f !important;
  /* dark text on white box */
}

/* Expanded sidebar — full width active */
.sidebar:hover .active {
  background-color: blue !important;
  width: 100%;
  color: #ffffff !important;
  border-radius: 8px;
}

/* Default collapsed active text color */
.sidebar a.active {
  color: #1e3a5f !important;
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

.sidebar:hover::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.35);
}




/* ------------------- PROFILE ------------------- */
.sidebar .profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.sidebar .profile i {
  font-size: 2.5rem;
  background-color: #fff;
  color: var(--sidebar-bg);
  border-radius: 50%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar .profile span {
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar:not(:hover) .profile span {
  opacity: 0;
  visibility: hidden;
  height: 0;
}

/* ------------------- NAVIGATION ------------------- */
.sidebar nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  margin-top: 2rem;
}

/* Keep icons perfectly aligned even when collapsed */
.sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--sidebar-bg);
  background-color: #ffffff;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* Hover style (expanded only) */
.sidebar:hover nav a:hover {
  background-color: #f4f7fc;
  transform: translateY(-1px);
}

/* COLLAPSED STATE — same icon alignment */
.sidebar:not(:hover) nav a {
  background: transparent;
  color: #ffffff;
  justify-content: center;
  padding: 0.75rem 0;
}

/* Prevent icon from moving when expanded */
.sidebar nav a i {
  font-size: 1.3rem;
  min-width: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

/* Hide text smoothly when collapsed */
.sidebar .menu-text {
  transition: opacity 0.3s ease, width 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

.sidebar:not(:hover) .menu-text {
  opacity: 0;
  width: 0;
  visibility: hidden;
}

/* Keep icons centered vertically in both states */
.sidebar nav {
  justify-content: flex-start;
  flex-grow: 1;
  margin-top: 2rem;
}

/* ------------------- CARET / SUBMENU ARROW ------------------- */
.sidebar .caret {
  margin-left: auto;
  font-size: 0.9rem;
  /* color: var(--sidebar-bg); */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hide caret when sidebar collapsed */
/* Completely remove caret impact in collapsed state */
.sidebar:not(:hover) .caret {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  width: 0;
  height: 0;
  padding: 0;
  flex: 0 0 0;
}





/* Rotate caret on open (optional JS control) */
.menu-item.open .caret {
  transform: rotate(90deg);
}

/* ------------------- SUBMENU ------------------- */
.submenu {
  display: flex;
  flex-direction: column;
  margin-left: 1.5rem;
  gap: 0.5rem;
}

.submenu a {
  background-color: #f9f9f9;
  color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

.submenu a:hover {
  background-color: #eef2fa;
}

.sidebar:not(:hover) .submenu {
  display: none !important;
}

/* ------------------- MAIN CONTENT ------------------- */
.main-content {
  margin-left: var(--sidebar-collapsed);
  padding: 2rem;
  transition: margin-left 0.3s ease;
}

.sidebar:hover~.main-content {
  margin-left: var(--sidebar-width);
}

/* ------------------- RESPONSIVE ------------------- */
/* @media (max-width: 767.98px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: column;
  }

  .sidebar:hover {
    width: 100%;
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar:not(:hover) .menu-text {
    opacity: 1;
    visibility: visible;
    width: auto;
  }
} */

/* ⭐ REAL MOBILE SIDEBAR BEHAVIOR ⭐ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 240px !important;
    height: 100vh !important;
    transform: translateX(-100%) !important; /* Hidden by default */
    transition: transform 0.3s ease !important;
    border-radius: 0 !important;
  }

  /* When hamburger is clicked → add .open */
  .sidebar.open {
    transform: translateX(0) !important;
  }

  /* Show menu text always on mobile */
  .sidebar .menu-text {
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
  }

  /* Hamburger Button */
  .mobile-menu-button {
    display: block !important;
    position: fixed;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    color: white;
    z-index: 1100;
  }

  /* Remove hover-expand logic on mobile */
  .sidebar:hover {
    width: 240px !important;
  }

  /* Content shouldn't shift */
  .main-content {
    margin-left: 0 !important;
  }

  /* Disable collapsed mode on mobile */
  .sidebar:not(:hover) .menu-text {
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
  }
}


/* ------------------- OPTIONAL ACTIVE ------------------- */
.sidebar nav a.active {
  background-color: #f4f7fc;
  color: var(--sidebar-bg);
  font-weight: 600;
}



/* ------------------- STAT CARDS ------------------- */
.stat-card {
  border-radius: 10px;
  border-left: 3px solid #007bff;
  overflow: hidden;
}

.stat-card .card-body {
  padding: 1.25rem;
}

.stat-card--primary {
  border-left-color: #007bff;
}

.stat-card--success {
  border-left-color: #28a745;
}

.stat-card--info {
  border-left-color: #17a2b8;
}

.stat-card--warning {
  border-left-color: #ffc107;
}

.stat-card--danger {
  border-left-color: #dc3545;
}

.stat-card--muted {
  border-left-color: #6c757d;
}

/* ------------------- TABS ------------------- */
#dataTabs {
  border-bottom: 0;
}

#dataTabs .nav-item {
  margin-right: 4px;
}

#dataTabs .nav-link {
  color: #fff;
  background-color: #6c757d;
  border: none;
  border-radius: 20px 20px 0 0;
  padding: .75rem 2rem;
}

#dataTabs .nav-link.active {
  background-color: #203d64;
  color: #fff;
}

#dataTabsContent {
  background-color: transparent;
  border-radius: 0 20px 20px 20px;
  border: 1px solid #dee2e6;
  padding: 1.5rem;
}

/* ------------------- TABLES ------------------- */
#dataTabsContent .table {
  color: #212529;
  background: #fff;
  margin-bottom: 0;
}

#dataTabsContent .table thead th {
  border-top: none;
  border-bottom: 2px solid #dee2e6;
  background-color: #fff;
  color: #212529;
}

#dataTabsContent .table tbody tr:nth-child(even) {
  background-color: #fff;
}

#dataTabsContent .table tbody tr:nth-child(odd) {
  background-color: #f2f2f2;
}

#dataTabsContent .table td {
  border-top: 1px solid #dee2e6;
}

/* ------------------- PAGINATION ------------------- */
#dataTabsContent .pagination {
  margin-bottom: 0;
  margin-top: 1rem;
}

#dataTabsContent .page-link {
  background-color: #fff;
  border-color: #dee2e6;
  color: #333;
}

#dataTabsContent .page-item.active .page-link {
  background-color: #f2f2f2;
  border-color: #dee2e6;
  color: #333;
  font-weight: bold;
}

#dataTabsContent .page-item.disabled .page-link {
  background-color: #fff;
  border-color: #dee2e6;
  color: #6c757d;
}

#dataTabsContent .page-item:hover .page-link {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #333;
  z-index: 2;
}

/* previous and next btn  */

#pager-visitors .btn,
#pager-checkins .btn {
  border-radius: 0.375rem;
  min-width: 40px;
  margin-right: 6px;
}



/* ------------------- NOTIFICATION WIDGET ------------------- */
.notification-widget {
  background: #203d64;
  color: #fff;
}

.notification-widget .card-body {
  background: transparent;
  color: #fff;
}

.notification-list {}

.notification-row {
  align-items: flex-start;
}

.notif-avatar {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 60px;
}

.notif-body {
  min-width: 0;
}

.notif-username {
  color: #fff;
}

.notif-time {
  color: #adb5bd;
}

.notification-widget .btn-light {
  background-color: #fff;
  border-color: rgba(0, 0, 0, 0.05);
}

.btn-accept {
  color: #28a745;
}

.btn-reject {
  color: #dc3545;
}

@media (max-width: 575.98px) {
  .notif-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }

  .notification-row {
    margin-bottom: .75rem;
  }

  .notif-actions .btn {
    font-size: .75rem;
  }
}

/* ------------------- ACTION BUTTONS ------------------- */
.notif-actions .btn {
  padding: .25rem .5rem;
  font-size: .825rem;
  line-height: 1;
}

.notif-time {
  white-space: nowrap;
  margin-left: .5rem;
}  

