/* Modern Hando-style Admin Layout - Enhanced */
:root {
  --sidebar-width: 260px;
  --topbar-height: 70px;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e5e7eb;
  --sidebar-color: #6b7280;
  --sidebar-active: #108dff;
  --sidebar-active-bg: #ffffff;
  --topbar-bg: #ffffff;
  --content-bg: #f8fafc;
  --primary-color: #108dff;
  --secondary-color: #963b68;
  --success-color: #287F71;
  --warning-color: #E77636;
  --danger-color: #E7366B;
  --info-color: #01D4FF;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --card-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #108dff 0%, #01D4FF 100%);
  --gradient-success: linear-gradient(135deg, #287F71 0%, #10b981 100%);
  --gradient-warning: linear-gradient(135deg, #E77636 0%, #f59e0b 100%);
  --gradient-danger: linear-gradient(135deg, #E7366B 0%, #ef4444 100%);
}

/* --- Additional responsive utilities and component tweaks (added) --- */

/* Compact form grid for small screens */
.form-grid-sm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 576px) {
  .form-grid-sm {
    grid-template-columns: 1fr;
  }
}

/* Search form adjustments */
.search-inline {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-inline .form-control {
  min-width: 0;
  flex: 1 1 auto;
}

/* Responsive table wrapper: change table layout on small screens */
.table-responsive-stack {
  display: block;
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 576px) {
  .table-responsive-stack table thead {
    display: none;
  }
  .table-responsive-stack table tbody td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding-left: 50% !important;
    position: relative;
  }
  .table-responsive-stack table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
  }
}

/* Quick actions grid used in page headers */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .quick-actions { width: 100%; justify-content: flex-start; }
}

/* Small utility to collapse long text in cards */
.text-truncate-2 {
  display: -webkit-box; 
  line-clamp: 2;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;  
  overflow: hidden;
}

/* Topbar adjustments for dense screens */
.topbar-dense .topbar-custom { height: 56px; }
.topbar-dense .topbar-custom .container-fluid { padding: 0 12px; }

/* Make action buttons in headers consistent */
.page-header .btn { padding: 8px 12px; font-size: 13px; }

/* Accessible focus outlines for interactive elements */
.focus-ring:focus { outline: 3px solid rgba(16,141,255,0.15); outline-offset: 2px; }

/* form helper to stack labels above inputs on small screens */
@media (max-width: 576px) {
  .form-stack-sm .form-label { display: block; margin-bottom: 6px; }
  .form-stack-sm .form-control, .form-stack-sm .form-select { width: 100%; }
}

/* Small tweaks for pagination on mobile */
.pagination-sm { font-size: 13px; }

/* Minor spacing helpers */
.gap-sm { gap: 0.5rem !important; }
.gap-md { gap: 1rem !important; }

/* end of appended responsive utilities */

* {
  box-sizing: border-box;
}

html, body { 
  height: 100%; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body { 
  background: var(--content-bg);
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
}

/* Hando Style Topbar - Enhanced (Positioned below sidebar) */
.topbar-custom {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
  z-index: 1050;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.topbar-custom .container-fluid {
  padding: 0 1.5rem;
  width: 100%;
}

/* Ensure topbar content is properly aligned */
.topbar-custom .d-flex {
  height: 100%;
  align-items: center;
}

.topnav-menu {
  gap: 1rem;
}

/* Topbar left section */
.topbar-custom .d-flex.align-items-center {
  gap: 1rem;
}

/* Topbar icon buttons */
.topbar-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
}

.topbar-icon-btn:hover {
  background: rgba(16, 141, 255, 0.1);
  color: var(--sidebar-active);
}

.topbar-icon-btn i {
  font-size: 18px;
}

/* User profile button */
.user-profile-btn {
  padding: 6px 12px;
  border-radius: 50px;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
}

.user-profile-btn:hover {

}

/* Avatar sizes */
.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 18px;
  object-fit: cover;
  border-radius: 50%;
}

/* Dropdown improvements */
.dropdown-menu {
  border: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.dropdown-lg {
  min-width: 320px;
}

.dropdown-header {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {

  color: var(--sidebar-active);
}

.dropdown-divider {
  margin: 0.5rem 0;
  opacity: 0.1;
}

/* Notification badge */
.badge.rounded-pill {
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toggle button spacing */
.topbar-custom .nav-link.me-3 {
  margin-right: 1rem !important;
}

.topnav-menu li {
  list-style: none;
}

.button-toggle-menu {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

.button-toggle-menu:hover {

  color: var(--sidebar-active);
}

.button-toggle-menu:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Ensure toggle button is visible on all screen sizes */
.button-toggle-menu {
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Mobile specific styling for toggle button */
@media (max-width: 767.98px) {
  .button-toggle-menu {
    min-width: 44px;
    min-height: 44px;
    padding: 0.75rem;
  }
  
  .button-toggle-menu .noti-icon {
    font-size: 20px;
  }
}

.noti-icon {
  font-size: 18px;
}

.topbar-custom h5 {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Topbar Search */
.app-search .topbar-search {
  position: relative;
}

.topbar-search .form-control {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 14px;
  width: 250px;
}

.topbar-search .form-control:focus {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Topbar Navigation Links */
.topbar-custom .nav-link {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.topbar-custom .nav-link:hover {

  color: var(--sidebar-active);
}

/* Notification Badge */
.noti-icon-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 10px;
  padding: 2px 5px;
  min-width: 16px;
  text-align: center;
}

/* User Navigation */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-user img {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.pro-user-name {
  font-size: 14px;
  font-weight: 500;
}

/* Dropdown Menus */
.dropdown-lg {
  min-width: 320px;
}

.noti-title h5 {
  font-size: 16px;
  font-weight: 600;
  padding: 1rem 1.5rem 0.5rem;
}

.noti-scroll {
  max-height: 300px;
  overflow-y: auto;
}

.notify-item {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition);
}

.notify-item:hover {

}

.notify-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 50%;
  margin-right: 0.75rem;
}

.profile-dropdown {
  min-width: 200px;
}

.profile-dropdown .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Remove logo-section since we moved logo-link directly to navbar-left */


/* Hamburger toggle styled exactly like mockup - no border */
.sidebar-toggle {
  display: flex;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-left: 12px; /* spacing after logo */
}

.sidebar-toggle:hover {
  background: #f1f5f9 !important;
  color: var(--text-primary);
}

.sidebar-toggle:focus {

  color: var(--sidebar-active);
  box-shadow: none !important;
  outline: none !important;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--primary-color);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
}

.logo-text {
  font-weight: 700;
}

.greeting-section {
  color: var(--text-secondary);
  font-size: 14px;
  margin-left: 16px; /* spacing after toggle */
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-section {
  position: relative;
}

.search-box {
  position: relative;
  width: 300px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #f9fafb;
  font-size: 14px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-icon-btn {
  position: relative;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 8px;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-btn:hover {

  color: var(--sidebar-active);
}

.nav-icon-btn:focus {

  color: var(--sidebar-active);
  box-shadow: none !important;
  outline: none !important;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger-color);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none !important;
  border: 1px solid var(--border-color) !important;
  padding: 6px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
}

.user-btn:hover {
  border-color: var(--primary-color) !important;
  background: var(--sidebar-active-bg) !important;
  color: var(--text-primary);
}

.user-btn:focus {
  border-color: var(--primary-color) !important;
  background: var(--sidebar-active-bg) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.dropdown-arrow {
  font-size: 12px;
  color: var(--text-muted);
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--topbar-height);
}

/* Hando Style Sidebar - Enhanced (Positioned above topbar) */
.app-sidebar-menu {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1001;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

/* Desktop sidebar states */
body[data-sidebar="hidden"] .app-sidebar-menu {
  transform: translateX(-100%);
}

body[data-sidebar="default"] .app-sidebar-menu {
  transform: translateX(0);
}

body[data-sidebar="hidden"] .main-content {
  margin-left: 0;
}

/* Logo Box */
.logo-box {
  height: var(--topbar-height);
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.logo-box .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.125rem;
}

.logo-sm {
  display: none;
}

.logo-lg {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Collapsed sidebar logo */
.app-sidebar-menu.collapsed .logo-sm {
  display: flex;
  justify-content: center;
  width: 100%;
}

.app-sidebar-menu.collapsed .logo-lg {
  display: none;
}

/* Icon utilities - appended */
.bi, .mdi, .ti { vertical-align: middle; line-height: 1; }
.icon-sm { font-size: 14px !important; }
.icon-md { font-size: 18px !important; }
.icon-lg { font-size: 24px !important; }
.icon-xl { font-size: 32px !important; }
#side-menu .bi { margin-right: 8px; font-size: 18px; }
.topbar-custom .bi { font-size: 20px; }
.stat-icon .bi { font-size: 24px; }
.bi::before { display: inline-block; }


/* Collapsed sidebar */
.app-sidebar-menu.collapsed {
  width: 72px;
}

.app-sidebar-menu.collapsed .logo-lg {
  display: none;
}

.app-sidebar-menu.collapsed .logo-sm {
  display: flex;
  justify-content: center;
  width: 100%;
}

.app-sidebar-menu.collapsed .menu-title,
.app-sidebar-menu.collapsed .menu-arrow,
.app-sidebar-menu.collapsed span:not(.logo-sm):not(.logo-lg) {
  display: none;
}

.app-sidebar-menu.collapsed #side-menu > li > a {
  justify-content: center;
  padding: 0.75rem;
}

.app-sidebar-menu.collapsed .collapse {
  display: none !important;
}

/* Bootstrap collapse animation fix */
#side-menu .collapse {
  transition: height 0.35s ease;
}

#side-menu .collapsing {
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}

#side-menu .collapse.show {
  display: block;
  height: auto;
}

/* Force dropdown to stay open when child is active */
.collapse.show {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

/* Prevent dropdown from closing when child menu is active */
#side-menu .collapse.show {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

/* Force dropdown to stay open when it has active child */
#side-menu .collapse:has(.tp-link.active) {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

/* Alternative for browsers that don't support :has() */
#side-menu .collapse.show,
#side-menu .collapse[style*="height: auto"] {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

/* Hando Menu Styles */
#side-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#side-menu .menu-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1.5rem 1.5rem 0.5rem;
  margin-top: 0.5rem;
}

#side-menu .menu-title:first-child {
  margin-top: 0;
}

#side-menu .menu-title.mt-2 {
  margin-top: 1.5rem;
}

#side-menu > li {
  position: relative;
}

#side-menu > li > a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--sidebar-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border-radius: 0;
  position: relative;
  margin: 2px 12px;
  border-radius: var(--border-radius);
}

#side-menu > li > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
  transition: var(--transition);
}

#side-menu > li > a:hover {

  color: var(--sidebar-active);
  transform: translateX(4px);
}

#side-menu > li > a[aria-expanded="true"] {

  color: var(--sidebar-active) !important;
  font-weight: 500 !important;
  transform: translateX(2px) !important;
}

#side-menu > li:has(.nav-second-level .tp-link.active) > a {

  color: var(--sidebar-active) !important;
  font-weight: 500 !important;
  transform: translateX(2px) !important;
}

#side-menu > li > a i {
  font-size: 16px;
  width: 20px;
  margin-right: 12px;
  text-align: center;
}

#side-menu > li > a .menu-arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
  font-size: 12px;
  color: var(--text-muted);
}

#side-menu > li > a .menu-arrow::before {
  content: '\F285'; /* chevron-right */
  font-family: 'bootstrap-icons';
  font-size: 12px;
}

#side-menu > li > a[aria-expanded="true"] .menu-arrow {
  transform: rotate(90deg);
  color: var(--sidebar-active);
}

/* Parent menu with dropdown active state - subtle */
#side-menu > li > a[aria-expanded="true"] {

  color: var(--sidebar-active) !important;
  font-weight: 500 !important;
  transform: translateX(2px) !important;
}

/* Parent menu with active child - more subtle */
#side-menu > li:has(.nav-second-level .tp-link.active) > a {

  color: var(--sidebar-active) !important;
  font-weight: 500 !important;
  transform: translateX(2px) !important;
}

/* Second Level Menu */
.nav-second-level {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  margin: 0 12px 8px 12px;
}

/* Clean active state for dropdown items */
.nav-second-level .tp-link.active {
  color: var(--sidebar-active) !important;
  background: rgba(16, 141, 255, 0.08) !important;
  font-weight: 600 !important;
  transform: translateX(2px) !important;
  position: relative !important;
}

.nav-second-level .tp-link.active::before {
  height: 16px !important;
  background: var(--sidebar-active) !important;
}

.nav-second-level li {
  position: relative;
}

.nav-second-level .tp-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 32px;

  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--border-radius);

  position: relative;
  line-height: 1.4;
  min-height: 36px;
}

.nav-second-level .tp-link i {
  font-size: 16px;
  width: 20px;
  height: 20px;
  text-align: center;
  color: #6c757d;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-second-level .tp-link:hover i,
.nav-second-level .tp-link.active i {
  color: var(--sidebar-active);
  opacity: 1;
}

/* Ensure Bootstrap Icons are visible in submenu */
.nav-second-level .tp-link i.bi {
  display: inline-flex !important;
  visibility: visible !important;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.nav-second-level .tp-link::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
  transition: var(--transition);
}

.nav-second-level .tp-link:hover:not(.active) {
  color: var(--sidebar-active);
  transform: translateX(4px);
}

.nav-second-level .tp-link:hover:not(.active)::before {
  height: 16px;
}

.nav-second-level .tp-link.active:hover {
  color: var(--sidebar-active) !important;
  font-weight: 600 !important;
  transform: translateX(2px) !important;
}

.sidebar-nav {
  padding: 0 16px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--sidebar-color);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
}

.nav-link.active {

  color: var(--sidebar-active);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .08);
}

.nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Active left indicator like mockup */
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--primary-color);
}

.nav-section {
  margin-top: 32px;
}

.nav-section-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px 12px;
}

/* Compact spacing between items to match mockup */
.sidebar-nav .nav-list .nav-item + .nav-item { margin-top: 2px; }
.sidebar-header { margin-top: 4px; }

/* Sidebar Dropdown */
.nav-item.has-dropdown {
  position: relative;
}

.nav-link.dropdown-toggle::after {
  content: '';
  border: none;
  font-family: 'bootstrap-icons';
  content: '\F285'; /* chevron-right */
  font-size: 12px;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.nav-link.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

.nav-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(59, 130, 246, 0.05);
  margin: 4px 0;
  border-radius: var(--border-radius);
  padding-left: 4px;
}

.nav-dropdown.show {
  max-height: 200px;
}

.nav-dropdown .nav-link {
  padding: 8px 12px 8px 44px;
  font-size: 13px;
  color: var(--text-muted);
}

.nav-dropdown .nav-link:hover {

  color: var(--sidebar-active);
}

/* Topbar app and fullscreen icons */
.top-navbar .nav-icon-btn .bi {
  font-size: 18px;
}

/* Search input rounded like mockup */
.search-input {
  border-radius: 9999px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  background: var(--content-bg);
  min-height: calc(100vh - var(--topbar-height));
}

/* When collapsed on desktop */
@media (min-width: 768px) {
  .app-sidebar.collapsed + .main-content,
  .app-sidebar.collapsed ~ .main-content {
    margin-left: 72px;
  }
}

.content-wrapper {
  padding: 24px;
  min-height: calc(100vh - var(--topbar-height));
}

/* User Dropdown Menu */
.user-dropdown-menu {
  min-width: 200px !important;
  border: none !important;
  box-shadow: var(--card-shadow-lg) !important;
  border-radius: var(--border-radius-lg) !important;
  padding: 8px !important;
  margin-top: 8px !important;
  z-index: 1055 !important;
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
}

.dropdown-menu {
  z-index: 1055 !important;
}

.dropdown-menu.show {
  display: block !important;
}

.user-dropdown-menu .dropdown-header {
  padding: 12px 16px !important;
  background: none !important;
  border: none !important;
}

.user-info-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.user-info-role {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.user-dropdown-menu .dropdown-item {
  padding: 8px 16px !important;
  border-radius: var(--border-radius) !important;
  font-size: 14px !important;
  color: var(--text-secondary) !important;
  transition: var(--transition) !important;
}

.user-dropdown-menu .dropdown-item:hover {

  color: var(--sidebar-active) !important;
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--danger-color) !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .search-box {
    width: 200px;
  }
}

@media (max-width: 991.98px) {
  .app-sidebar-menu {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1041;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  
  .app-sidebar-menu.open {
    transform: translateX(0);
  }
  
  .topbar-custom {
    left: 0;
    right: 0;
  }
  
  .main-content {
    margin-left: 0;
    margin-top: var(--topbar-height);
    width: 100%;
  }
  
  .topbar-custom h5 {
    display: none;
  }
  
  .app-search {
    display: none;
  }
  
  .pro-user-name {
    display: none;
  }
  
  .content-wrapper {
    padding: 16px;
  }
  
  /* Sidebar overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}
}

@media (max-width: 767.98px) {
  .app-sidebar-menu {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1041;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  
  .app-sidebar-menu.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 576px) {
  .content-wrapper {
    padding: 12px;
  }
  
  .app-sidebar-menu {
    width: 260px;
  }
  
  .topbar-custom .container-fluid {
    padding: 0 12px;
  }
  
  .topbar-custom h5 {
    display: none;
  }
  
  .app-search {
    display: none;
  }
  
  .pro-user-name {
    display: none;
  }
  
  /* Keep notification list accessible — adjust dropdown instead of hiding */
  .notification-list .dropdown-menu { right: 0; left: auto; min-width: 280px; }
}

/* Clean up duplicate styles */

/* Modern Cards - Enhanced */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

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

.card:hover::before {
  opacity: 1;
}

.card-header {
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 20px 24px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-weight: 600;
  color: #374151;
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

.card-header {
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
  padding: 20px 24px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-weight: 600;
  color: #374151;
}

.card-body {
  padding: 24px;
}

/* Enhanced Stat Cards */
.stat-card { 
  display: flex; 
  gap: 16px; 
  align-items: center; 
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(16, 141, 255, 0.1);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-lg);
  border-color: rgba(16, 141, 255, 0.2);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon { 
  width: 60px; 
  height: 60px; 
  border-radius: var(--border-radius-lg); 
  display: grid; 
  place-items: center; 
  color: #fff; 
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: rotate(45deg);
  transition: var(--transition);
}

.stat-card:hover .stat-icon::before {
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-icon.bg-primary { background: var(--gradient-primary); }
.stat-icon.bg-success { background: var(--gradient-success); }
.stat-icon.bg-info { background: var(--gradient-primary); }
.stat-icon.bg-warning { background: var(--gradient-warning); }
.stat-icon.bg-danger { background: var(--gradient-danger); }

.stat-up { color: var(--success-color); font-weight: 600; }
.stat-down { color: var(--danger-color); font-weight: 600; }

/* Modern Buttons - Enhanced */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  padding: 10px 20px;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 141, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 141, 255, 0.4);
  color: white;
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 2px 8px rgba(40, 127, 113, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 127, 113, 0.4);
  color: white;
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
  box-shadow: 0 2px 8px rgba(231, 118, 54, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231, 118, 54, 0.4);
  color: white;
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 2px 8px rgba(231, 54, 107, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231, 54, 107, 0.4);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 141, 255, 0.3);
}

/* Modern Form Controls - Enhanced */
.form-control, .form-select {
  border-radius: var(--border-radius);
  border: 2px solid #e5e7eb;
  padding: 12px 16px;
  transition: var(--transition);
  background: #ffffff;
  font-size: 14px;
  line-height: 1.5;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(16, 141, 255, 0.1);
  background: #ffffff;
  outline: none;
}

.form-control:hover, .form-select:hover {
  border-color: rgba(16, 141, 255, 0.3);
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.input-group {
  position: relative;
}

.input-group-text {
  background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%);
  border: 2px solid #e5e7eb;
  border-right: none;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-group .form-control {
  border-left: none;
}

.input-group .form-control:focus {
  border-left: none;
}

/* Modern Tables - Enhanced */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: #ffffff;
}

.table thead th {
  background: #ffffff !important;
  border-bottom: 2px solid var(--primary-color);
  font-weight: 600;
  color: var(--text-primary);
  padding: 20px 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Override Bootstrap table-light and ensure clean white background */
.table thead.bg-white th,
.table thead th {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: var(--text-primary) !important;
}

.table tbody td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  font-size: 14px;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 20%);
  transform: scale(1.01);
}

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

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(16, 141, 255, 0.02);
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background: linear-gradient(135deg, rgba(16, 141, 255, 0.05) 0%, rgba(16, 141, 255, 0.1) 100%);
}

/* Modern Badges - Enhanced */
.badge {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 6px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.badge.bg-success {
  background: var(--gradient-success) !important;
  color: white;
}

.badge.bg-warning {
  background: var(--gradient-warning) !important;
  color: white;
}

.badge.bg-danger {
  background: var(--gradient-danger) !important;
  color: white;
}

.badge.bg-info {
  background: var(--gradient-primary) !important;
  color: white;
}

/* Utility Classes - Enhanced */
.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-lg);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Slide In Animation */
@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
  40%, 43% { transform: translate3d(0, -8px, 0); }
  70% { transform: translate3d(0, -4px, 0); }
  90% { transform: translate3d(0, -2px, 0); }
}

.bounce {
  animation: bounce 1s;
}

/* Enhanced Dropdowns */
.dropdown-menu {
  border: none !important;
  box-shadow: var(--card-shadow-lg) !important;
  border-radius: var(--border-radius) !important;
  padding: 8px !important;
  z-index: 1055 !important;
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  min-width: 200px !important;
}

.dropdown-item {
  border-radius: 6px !important;
  padding: 8px 12px !important;
  transition: var(--transition) !important;
  display: flex !important;
  align-items: center !important;
  color: #374151 !important;
  text-decoration: none !important;
}

.dropdown-item:hover {
  background: var(--primary-color) !important;
  color: white !important;
}

.dropdown-item:focus {
  background: var(--primary-color) !important;
  color: white !important;
}

.dropdown-divider {
  margin: 4px 0 !important;
  border-color: #e5e7eb !important;
}

/* Bootstrap Dropdown Fix */
.dropdown-menu[data-bs-popper] {
  top: 100% !important;
  left: auto !important;
  right: 0 !important;
  margin-top: 4px !important;
}

.dropdown-menu:not(.show) {
  display: none !important;
}

.dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Ensure dropdown toggle works */
.dropdown-toggle::after {
  display: inline-block !important;
  margin-left: 0.255em !important;
  vertical-align: 0.255em !important;
  content: "" !important;
  border-top: 0.3em solid !important;
  border-right: 0.3em solid transparent !important;
  border-bottom: 0 !important;
  border-left: 0.3em solid transparent !important;
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Modern Alerts */
.alert {
  border: none;
  border-radius: var(--border-radius);
  border-left: 4px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: var(--success-color);
  color: #065f46;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--danger-color);
  color: #991b1b;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: var(--warning-color);
  color: #92400e;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--info-color);
  color: #1e40af;
}

/* Minimalist Sidebar Toggle Button (match mockup) */
#sidebarToggle {
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  padding: 8px !important;
  border-radius: 6px !important;
  transition: var(--transition) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px;
  height: 36px;
  cursor: pointer;
  margin-right: 0;
  z-index: 1000;
  position: relative;
}

#sidebarToggle:hover,
#sidebarToggle:focus {

  color: var(--sidebar-active) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ensure toggle button is always visible */
#sidebarToggle {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Even more specific rules to ensure visibility */
#sidebarToggle {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1000 !important;
  transform: none !important;
}

/* Template sidebar visibility rules */
body[data-sidebar="hidden"] {
  .app-sidebar-menu {
    width: 0px;
    overflow: hidden;
  }

  .topbar-custom {
    left: 0px;
  }

  .main-content {
    margin-left: 0px;
  }
}

body[data-sidebar="default"] {
  .app-sidebar-menu {
    width: var(--sidebar-width);
  }
  
  .topbar-custom {
    left: var(--sidebar-width);
  }
  
  .main-content {
    margin-left: var(--sidebar-width);
  }
}

/* Additional media query for screens smaller than 768px */
@media (max-width: 767.98px) {
  /* Sidebar always fixed and hidden by default on mobile */
  .app-sidebar-menu {
    position: fixed !important;
    top: 60px;
    left: 0;
    width: 280px !important;
    height: calc(100vh - 60px);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1041;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  
  /* Show sidebar when .open class is added */
  .app-sidebar-menu.open {
    transform: translateX(0) !important;
  }
  
  /* Topbar always full width on mobile */
  .topbar-custom {
    left: 0 !important;
    width: 100% !important;
    height: 60px;
    z-index: 1042 !important;
  }
  
  .topbar-custom .container-fluid {
    padding: 0 0.75rem;
  }
  
  /* Hide greeting text on very small screens */
  .topbar-custom h5 {
    font-size: 0.9rem;
  }
  
  /* Make topbar items more compact on mobile */
  .topbar-custom .topnav-menu {
    gap: 0.25rem;
  }
  
  .topbar-custom .nav-link {
    padding: 0.5rem;
  }
  
  /* Topbar right section spacing */
  .topbar-right {
    gap: 0.25rem !important;
  }
  
  /* Icon buttons smaller on mobile */
  .topbar-icon-btn {
    width: 36px;
    height: 36px;
  }
  
  .topbar-icon-btn i {
    font-size: 16px;
  }
  
  /* Hide user name on mobile, show only avatar */
  .user-profile-btn span:not(.avatar-sm) {
    display: none !important;
  }
  
  .user-profile-btn i.bi-chevron-down {
    display: none !important;
  }
  
  .user-profile-btn {
    padding: 4px;
  }
  
  /* Ensure toggle button is always clickable */
  .button-toggle-menu {
    z-index: 1043 !important;
    position: relative !important;
  }
  
  /* Hide logo box in sidebar on mobile (already in topbar) */
  .app-sidebar-menu .logo-box {
    display: none;
  }
  
  /* Main content always full width on mobile */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* Override data-sidebar states on mobile */
  body[data-sidebar="hidden"] .app-sidebar-menu,
  body[data-sidebar="default"] .app-sidebar-menu {
    transform: translateX(-100%);
  }
  
  body[data-sidebar="hidden"] .app-sidebar-menu.open,
  body[data-sidebar="default"] .app-sidebar-menu.open {
    transform: translateX(0);
  }
  
  /* Topbar and main content don't move on mobile */
  body[data-sidebar="hidden"] .topbar-custom,
  body[data-sidebar="default"] .topbar-custom {
    left: 0 !important;
  }
  
  body[data-sidebar="hidden"] .main-content,
  body[data-sidebar="default"] .main-content {
    margin-left: 0 !important;
  }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Ensure sidebar is above everything on mobile */
@media (max-width: 991.98px) {
  .app-sidebar-menu {
    z-index: 1041 !important;
  }
  
  .sidebar-overlay {
    z-index: 1040 !important;
  }
}

/* Fullscreen mode styling */
body.fullscreen-enable {
  overflow: hidden;
}

body.fullscreen-enable .topbar-custom {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 1002;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

body.fullscreen-enable .app-sidebar-menu {
  z-index: 1003;
}

body.fullscreen-enable .main-content {
  margin-top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
}

/* Fullscreen button styling */
[data-toggle="fullscreen"] {
  transition: var(--transition);
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

[data-toggle="fullscreen"]:hover {
  color: var(--sidebar-active) !important;
  background: rgba(16, 141, 255, 0.1) !important;
}

[data-toggle="fullscreen"]:focus {

  color: var(--sidebar-active) !important;
  box-shadow: 0 0 0 3px rgba(16, 141, 255, 0.2) !important;
  outline: none !important;
}

[data-toggle="fullscreen"]:active {
  background: rgba(16, 141, 255, 0.2) !important;
}

/* Ensure fullscreen button is visible */
[data-toggle="fullscreen"] i {
  font-size: 16px !important;
  pointer-events: none !important;
}
