.icon { max-width: 120px; }
a { text-decoration: none; }

/* Theme tokens */
html {
--card-bg: #ffffff;
--text-color: #1e293b;
--text-heading: #0f172a;
--text-secondary: #475569;
--text-strong: #0f172a;
--border-color: #e2e8f0;
--badge-bg: #f1f5f9;
--badge-text: #1e293b;
--card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
--backdrop-filter: none;
}
/* Dark theme (your swap logic) */
html[data-theme="light"] {
--card-bg: #111827;
--text-color: #e2e8f0;
--text-heading: #ffffff;
--text-secondary: #cbd5e1;
--text-strong: #ffffff;
--border-color: #475569;
--badge-bg: #2563eb;
--badge-text: #ffffff;
--card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
--backdrop-filter: none;
}
/* Smooth transitions */
.profile-container,
.profile-details,
.role-badge {
transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* ===== TOP NAV FIXES - OVERWRITE DEFAULT STYLES ===== */
.main-nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 56px !important; /* Reduced height */
padding: 0 1rem;
position: relative;
}

.main-nav-start {
flex: 1 1 auto;
display: flex;
align-items: center;
}
.main-nav-end {
margin-left: auto;
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}

/* Uniform round icon buttons (theme switch + bell) */
.top-icon-btn,
.theme-switcher.gray-circle-btn {
width: 40px;
height: 40px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--badge-text);
border: 1px solid var(--border-color);
box-shadow: var(--card-shadow);
transition: transform .12s ease, filter .12s ease, background-color .2s ease;
padding: 0;
cursor: pointer;
}

.top-icon-btn:hover,
.theme-switcher.gray-circle-btn:hover {
filter: brightness(0.97);
transform: translateY(-1px);
}

.sun-icon, .moon-icon { color: inherit; }

/* Profile avatar */
.nav-user-btn { padding: 0; background: transparent; border: 0; }
.nav-user-img {
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
display: inline-block;
box-shadow: var(--card-shadow);
}
.nav-user-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* === Main Nav Alignment === */
  .main-nav-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-right: 20px; /* Adjust for desired leftward shift */
  }
  a{
    text-decoration: none;
  }

  /* === Theme Switcher === */
  .theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #eff0f6;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  /* === Notification Dropdown Wrapper === */
  .notification-wrapper {
    position: relative;
    display: inline-block;
  }

  .dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* === Notification Dropdown Styling === */
  .notification-dropdown {
    position: absolute;
    top: 100%; /* Directly below the nav */
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(183, 180, 180, 0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    list-style: none;
    padding: 10px 0;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }

  .notification-dropdown::-webkit-scrollbar {
    width: 6px;
  }

  .notification-dropdown::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
  }

  .notification-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* === Notification Item Styling === */
  .notification-dropdown li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
  }

  .notification-dropdown li a:hover {
    background-color: #f8f9ff;
    border-radius: 6px;
  }

  .notification-dropdown li:last-child a {
    border-bottom: none;
    text-align: center;
    color: #5f2eea;
    font-weight: 500;
    padding: 10px 16px;
  }

  .notification-dropdown li:last-child a:hover {
    background-color: #f5f0ff;
    color: #5f2eea;
  }

  /* === Notification Icon Badge === */
  .notification-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .notification-dropdown-icon.info { background-color: rgba(88, 135, 255, 0.1); color: #5887ff; }
  .notification-dropdown-icon.warning { background-color: rgba(255, 182, 72, 0.1); color: #ffb648; }
  .notification-dropdown-icon.success { background-color: rgba(75, 222, 151, 0.1); color: #4bde97; }

  .notification-dropdown__title {
    font-weight: 500;
    color: #171717;
    margin-bottom: 4px;
  }

  .notification-dropdown__subtitle {
    font-size: 13px;
    color: #767676;
    line-height: 1.3;
    white-space: normal;
  }

  .notification-dropdown small.text-muted {
    font-size: 11px;
    margin-top: 4px;
    color: #b9b9b9;
  }

  /* === Profile Dropdown (unchanged) === */
  .nav-user-wrapper {
    position: relative;
  }

  .nav-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 170px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-user-dropdown.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-user-dropdown li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  .nav-user-dropdown li a:hover {
    background-color: #f5f5f5;
  }

  .nav-user-dropdown li a.danger {
    color: #e74c3c;
  }

  .nav-user-dropdown li a i {
    margin-right: 10px;
    width: 16px;
    height: 16px;
  }

  .layer {
    z-index: 100;
  }
  .sidebar-body-menu a>i{
    margin-right:2px
  }

  /* === Fix Collapsed Sidebar Icons - Centered === */
/* === Fix Collapsed Sidebar Icons - Centered === */
.sidebar.hidden {
  width: 64px;
  padding: 0; 
  display: flex;
  flex-direction: column;
  align-items: left; 
}

.sidebar.hidden .sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: left;
}

.sidebar.hidden .sidebar-body-menu {
  width: 100%;
}

.sidebar.hidden .sidebar-body-menu a {
  display: flex;
  justify-content: left;  /* center horizontally */
  align-items: left;      /* center vertically */
  width: 100%;
  height: 50px;
  padding: 0;
  font-size: 0;
  border-radius: 8px;
}

.sidebar.hidden .sidebar-body-menu a i.fa-solid {
  font-size: 18px !important;
  margin: 0;   /* no margin pushing it */
  color: #fff;
  opacity: 0.9;
}


/* Hide text completely */
.sidebar.hidden .sidebar-body-menu a span,
.sidebar.hidden .sidebar-body-menu a::after {
  display: none;
}

/* Hide logo and category buttons when collapsed */
.sidebar.hidden .logo-wrapper,
.sidebar.hidden .category__btn {
  display: none;
}

/* === Fix Collapsed Sidebar User Profile === */
.sidebar.hidden .sidebar-footer {
  display: flex;
  justify-content: center;
  padding: 15px 0;
}

.sidebar.hidden .sidebar-user {
  flex-direction: column;
  align-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1); /* Optional: subtle background */
}

.sidebar.hidden .sidebar-user-img {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff; /* Optional: border for clarity */
}

.sidebar.hidden .sidebar-user-img picture,
.sidebar.hidden .sidebar-user-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image fills the circle without distortion */
  display: block;
}

/* Hide user text when sidebar is collapsed */
.sidebar.hidden .sidebar-user-info {
  display: none;
}

/* Optional: Add a small margin between icon and text when expanded */
.sidebar .sidebar-user-info {
  transition: opacity 0.3s ease;
}

/* Ensure smooth transition */
.sidebar.hidden .sidebar-user:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
/* === Notification Dropdown Styling === */
.notification-dropdown,
.nav-user-dropdown {
    position: fixed; /* Make it float above everything */
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    border:1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(183, 180, 180, 0.15);
    z-index: 10000 !important; /* Higher than anything else */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    list-style: none;
    padding: 10px 0;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
/* Hide toggle button on big screens */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #fff; /* adjust to match theme */
}

/* Show toggle button + mobile sidebar behavior */
@media (max-width: 992px) {
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
  }

  /* Sidebar becomes off-canvas */
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* hidden by default */
    width: 260px;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 1050;
  }

  .sidebar.open {
    left: 0;
  }

  /* Remove margin on main content */
  .main-wrapper {
    margin-left: 0 !important;
  }
}
