/* =============================== */
/* 🌐 NurseXplore Admin - Sidebar (Pro Level Animated) */
/* =============================== */

.nx-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 240px;
    height: calc(100vh - 60px);
    background: rgba(44, 47, 90, 0.7);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 20px rgba(0, 242, 254, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1200;
}

/* 🌟 Sidebar Header */
.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.sidebar-logo-container {
  width: 72px;
  height: 72px;
  background: linear-gradient(145deg, #1c1f3a, #2e3155);
  border-radius: 50%;
  padding: 6px;
  margin-bottom: 10px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sidebar-logo:hover {
  transform: scale(1.05) rotate(6deg);
}

.sidebar-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}


/* 🌙 Collapsed Sidebar - Logo Handling */
.nx-sidebar.collapsed .sidebar-header {
  padding: 12px 0;
}

.nx-sidebar.collapsed .sidebar-logo-container {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  padding: 4px;
  box-shadow: none;
}

.nx-sidebar.collapsed .sidebar-title {
  display: none;
}

.nx-sidebar.collapsed .sidebar-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}


/* 🌟 Sidebar Menu */
.sidebar-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.sidebar-item {
    margin: 6px 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 🌈 Pro-Level Hover Animation */
.sidebar-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.15), rgba(0, 242, 254, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
    z-index: 0;
}

.sidebar-item:hover::before {
    opacity: 1;
}

.sidebar-item:hover {
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 242, 254, 0.1);
}

/* ✨ Animate Icon & Text */
.sidebar-item span {
    transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-item:hover span.material-icons-outlined {
    transform: translateX(5px) rotate(10deg);
    color: #00f2fe;
}

.sidebar-item:hover span:last-child {
    transform: translateX(5px);
}

/* Active State */
.sidebar-item.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    box-shadow: 0 6px 15px rgba(0, 242, 254, 0.2);
}

.sidebar-item.active .material-icons-outlined {
    color: #fff;
}

/* 🌟 Sidebar Footer */
.sidebar-footer {
    padding: 20px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

/* 🚪 Logout Button */
.sidebar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(90deg, #ff5f6d 0%, #ffc371 100%);
    color: #fff;
    transition: all 0.3s ease;
}

.sidebar-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 95, 109, 0.3);
    cursor: pointer;
}

/* 🌟 Collapsed Sidebar */
.nx-sidebar.collapsed {
    width: 70px;
}

.nx-sidebar.collapsed .sidebar-title,
.nx-sidebar.collapsed .sidebar-item span:last-child,
.nx-sidebar.collapsed .sidebar-footer span {
    display: none;
}

.nx-sidebar.collapsed .sidebar-item {
    justify-content: center;
    margin: 8px 0;
}

/* Logout Button in Collapsed */
.nx-sidebar.collapsed .sidebar-logout {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fix: Always show icon inside logout in collapsed */
.nx-sidebar.collapsed .sidebar-logout .material-icons-outlined {
    display: inline-block;
    font-size: 22px;
}

/* Hide text label only */
.nx-sidebar.collapsed .sidebar-logout .logout-label {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nx-sidebar {
        left: -240px;
    }
    .nx-sidebar.active {
        left: 0;
    }
}

/* Icon Styling */
.material-icons-outlined {
    font-size: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
}
