/* ------------------------------
   SIDEBAR COMPONENT STYLES
------------------------------ */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, backdrop-filter 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.5);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(12, 5, 25, 0.98), rgba(18, 8, 38, 0.98));
    border-left: 1px solid rgba(124, 61, 255, 0.3);
    box-shadow: -10px 0 50px rgba(124, 61, 255, 0.2);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-overlay.active .sidebar {
    right: 0;
}

/* Sidebar Header */
.sidebar-header {
    padding: 30px;
    border-bottom: 1px solid rgba(124, 61, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(124, 61, 255, 0.1), transparent);
}

.sidebar-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff, #b779ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(124, 61, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(124, 61, 255, 0.3);
    transform: rotate(90deg);
    box-shadow: 0 0 15px rgba(124, 61, 255, 0.5);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 30px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(124, 61, 255, 0.2), transparent);
    transition: width 0.3s;
    z-index: -1;
}

.sidebar-link:hover::before {
    width: 100%;
}

.sidebar-link:hover {
    color: #ffffff;
    border-left-color: #7c3dff;
    padding-left: 35px;
}

.link-icon {
    font-size: 20px;
    filter: grayscale(0.5);
    transition: all 0.3s;
}

.sidebar-link:hover .link-icon {
    filter: grayscale(0);
    transform: scale(1.2);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 30px;
    border-top: 1px solid rgba(124, 61, 255, 0.2);
    background: linear-gradient(0deg, rgba(124, 61, 255, 0.1), transparent);
}

.sidebar-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    padding-right: 75px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(124, 61, 255, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
    cursor: pointer;
}

.social-icon:hover {
    background: rgba(124, 61, 255, 0.3);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(124, 61, 255, 0.4);
}

.sidebar-copyright {
    text-align: center;
    font-size: 12px;
    opacity: 0.5;
    margin-top: 10px;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(124, 61, 255, 0.5);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 61, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 600px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }
    
    .sidebar-header {
        padding: 20px;
    }
    
    .sidebar-link {
        padding: 15px 20px;
    }
    
    .sidebar-link:hover {
        padding-left: 25px;
    }
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff, #7c3dff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #0b0418;
  box-shadow: 0 0 16px rgba(124, 61, 255, 0.9);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
}

.sidebar-user-name {
  font-size: 1rem;
  font-weight: 600;
}

.sidebar-user-role {
  font-size: 0.8rem;
  opacity: 0.7;
}
.sidebar-signout-btn {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 96, 112, 0.7);
  border-radius: 8px;
  background: rgba(255, 96, 112, 0.08);
  color: #ff9aa6;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-signout-btn:hover {
  background: rgba(255, 96, 112, 0.2);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 96, 112, 0.5);
  transform: translateY(-1px);
}
/* Active / current page state */
.sidebar-link.active {
  color: #ffffff;
  border-left-color: #b779ff;
  background: radial-gradient(circle at left, rgba(183, 121, 255, 0.35), transparent);
  padding-left: 35px;
}

.sidebar-link.active .link-icon {
  filter: grayscale(0);
  transform: scale(1.15);
}
