:root {
  --bg-dark: #0f0a1e;
  /* Deep purple background */
  --sidebar-bg: #1a142e;
  /* Sidebar background color */
  --accent-color: #8b5cf6;
  /* Main accent */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

a {
  text-decoration: none;
  color: white;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
}

/* --- Sidebar Container --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 80px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 1000;
}

/* Hover Effect Expansion */
.sidebar:hover {
  width: 260px;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

/* --- Header / Logo Section --- */
.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 80px;
}

.logo {
  width: 32px;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: 0.2s ease;
}

.sidebar:hover .logo-text {
  opacity: 1;
}

/* --- Nav Links --- */
.sidebar-nav {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  padding: 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-item:hover {
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--accent-color);
}

.nav-item.active {
  background-color: var(--accent-color);
  color: white;
}

.nav-icon {
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  margin-left: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar:hover .nav-label {
  opacity: 1;
}

/* --- Bottom Section (User/Settings) --- */
.sidebar-footer {
  padding: 20px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  transition: 0.3s;
}

.user-profile:hover {
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--accent-color);
  width: 100%;
  border-radius: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #334155;
  flex-shrink: 0;
  border: 1px solid var(--accent-color);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.sidebar:hover .user-info {
  opacity: 1;
  transition: 0.3s;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: 65px;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 10px;
  }

  .sidebar-header,
  .sidebar-footer,
  .user-info,
  .nav-label {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    padding: 0;
  }

  .nav-item {
    flex-direction: column;
    justify-content: center;
    border-radius: 22px;
  }
}
