/* === Desktop Sidebar Styles (≥992px) === */
@media (min-width: 992px) {
  .offcanvas-desktop {
    position: fixed !important;
    top: 56px; /* height of navbar */
    left: 0;
    width: 220px;
    height: calc(100vh - 56px);
    background-color: #ffffff;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;

    /* override Bootstrap hiding behavior */
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;

    z-index: 1030;
  }



  /* Hide the offcanvas close button (not needed for desktop) */
  .offcanvas-desktop .btn-close {
    display: none;
  }
}

/* === Mobile (<992px) === */
@media (max-width: 991.98px) {
  .offcanvas-desktop {
    transform: translateX(-100%);
    visibility: hidden;
    box-shadow: none !important;
  }

  #mainContent,
  footer {
    margin-left: 0;
  }
}

@media (min-width: 992px) {
  #mainContent {
    margin-top: 56px;
    padding: 20px;
    transition: margin-left 0.3s ease;
  }

}
@media (min-width: 992px) {
  :root {
  --desktop-sidebar-width: 220px;
}

  #mainContent {
    margin-left: var(--desktop-sidebar-width) !important;
    margin-top: 56px !important;
    padding: 20px;
    transition: margin-left 0.3s ease;
  }

  #mainContent .container,
  #mainContent .container-fluid {
    max-width: 100%;
  }
}

  
   
   .sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  margin: 4px 0;
}

.nav-item {
  margin: 6px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 9px 14px;
  border-radius: 6px;

  font-size: 13px;
  font-weight: 500;

  color: #374151; /* clean dark gray */
  text-decoration: none;

  transition: all 0.2s ease;
}

.nav-link i {
  font-size: 14px;
  color: #9ca3af; /* muted icon */
}

.nav-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.nav-link:hover i {
  color: #111827;
}

.nav-header {
  margin-top: 20px;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #dee2e6;
}

.nav-divider {
  border-bottom: 1px solid #e9ecef;
  margin: 10px 0;
}

/* WhatsApp icon — force green */
.nav-item .nav-link i.fa-whatsapp {
  color: #25D366;
}

.logout {
  color: #dc3545;
}

.logout:hover i {
  color: #dc3545;
}

/* === Services Dropdown === */
.services-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin: 8px 10px 4px;
  padding: 8px 12px;

  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;

  text-transform: uppercase;
  letter-spacing: 0.5px;

  border-radius: 8px;
  transition: all 0.2s ease;
}

/* hover */
.services-toggle:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Gradient Animation Keyframes */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Hover Effect — brighten blue tones */
.services-toggle:hover {
  background: #f3f4f6;
  color: #111827;
}


.toggle-arrow {
  transition: transform 0.3s ease;
  color: #9ca3af;
}

.toggle-arrow.rotate {
  transform: rotate(90deg);
}

.services-list {
  list-style: none;
  margin: 0 10px;
  padding-left: 10px;

  border-left: 2px solid #e5e7eb;

  max-height: 0;
  overflow: hidden;
  opacity: 0;

  transition: all 0.3s ease;
}

.services-list .nav-link {
  font-size: 12px;
  padding: 6px 10px;
  margin: 2px 0;

  color: #6b7280;
  border-radius: 6px;
}

/* hover */
.services-list .nav-link:hover {
  background: #eef2ff;
  color: #4338ca;
}

/* active */
.services-list .nav-link.active {
  background: #e0e7ff;
  color: #3730a3;
}

.services-list.show {
  max-height: 500px; /* smooth expansion */
  opacity: 1;
  animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SIDEBAR USER HEADER ===== */
/* .sidebar-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    text-align: center;
} */

/* ===== SIDEBAR USER HEADER (ROW) new===== */
.sidebar-user {
    display: flex;
    align-items: center;   /* vertical alignment */
    gap: 10px;             /* space between avatar & text */
    padding: 12px 10px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b6cb0, #1e429f);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 24px rgba(30, 66, 159, 0.35);
    
    flex-shrink: 0; /* 🔥 prevents it from shrinking */
}

/* .user-meta {
    margin-top: 8px;
} */

/* new */
.user-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name {
    font-size: 12px;
    font-weight: 700;
    color: #111827; /* dark gray/black for visibility */
    margin-bottom: 2px; /* small spacing above email */
}


.user-email {
    font-size: 10px;
    font-weight: 600;
    color: #1f2937;
    word-break: break-all;
}

/*  new */
.user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/*  */

.sidebar-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 10px 0 14px;
}

/* Logout icon — force red */
.nav-item .nav-link.logout i {
  color: #dc3545;
}


.logout {
  color: #dc3545;
}

.logout:hover i {
  color: #dc3545;
}

.nav-link.active {
  background: linear-gradient(135deg, #6366f1, #2563eb);
  color: #ffffff;
  font-weight: 500;
}

.nav-link.active i {
  color: #ffffff;
}


@media (max-width: 991px) {
  .offcanvas {
    width: 260px !important;
  }
}

@media (max-width: 991px) {

  .sidebar-user {
    padding: 12px 8px;
  }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 12px;
  margin: 2px 10px;

  border-radius: 10px;

  font-size: 13px;
  font-weight: 500;

  color: #374151;
  text-decoration: none;

  transition: all 0.2s ease;
}

/* ICON COLOR BASE */
.nav-link i {
  color: #94a3b8;
  transition: all 0.2s ease;
}

/* HOVER */
.nav-link:hover {
  background: #eff6ff;
  color: #2563eb;
}

.nav-link:hover i {
  color: #2563eb;
}


  .nav-item {
    margin: 2px 0;
  }

  .offcanvas-body {
    padding-bottom: 20px;
  }

}