/* ===== Sidebar Styles ===== */

.sidebar {
  position: fixed;
  font-family: "Plus Jakarta Sans", sans-serif;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  z-index: 999;
  transition: all 0.3s ease;
}

.sidebar.collapsed { width: 70px; }

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: #f1f1f1; }
.sidebar::-webkit-scrollbar-thumb { background: #667eea; border-radius: 3px; }

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sidebar-header .brand {
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-header .brand a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-header .brand i { font-size: 1.3rem; }

.sidebar.collapsed .sidebar-header .brand span { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 1.25rem 0.5rem; }

.sidebar-collapse-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 28px;
  height: 28px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.sidebar-collapse-btn:hover { background: rgba(255, 255, 255, 0.3); }
.sidebar.collapsed .sidebar-collapse-btn { width: 32px; height: 32px; }

.sidebar-category { padding: 0.75rem; border-bottom: 1px solid #e5e7eb; }

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.6rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.category-header:hover { background: rgba(102, 126, 234, 0.1); }

.category-header > i:first-child {
  min-width: 22px;
  text-align: center;
  color: #667eea;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.category-header > span { flex-grow: 1; }

.sidebar.collapsed .category-header { justify-content: center; padding: 1rem 0; }
.sidebar.collapsed .category-header > i:first-child { font-size: 1.5rem; margin: 0; }
.sidebar.collapsed .category-header > span { display: none; }
.sidebar.collapsed .category-arrow { display: none; }
.sidebar.collapsed .category-links { display: none !important; }

.category-arrow { transition: transform 0.3s ease; color: #667eea; }
.category-header.active .category-arrow { transform: rotate(180deg); }

.category-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 1.75rem;
}

.category-links.open { max-height: 500px; margin-top: 0.5rem; }

.category-links a {
  display: block;
  padding: 0.5rem 0.65rem;
  color: #5a6c7d;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.category-links a:hover { background: rgba(102, 126, 234, 0.1); color: #667eea; transform: translateX(5px); }
.category-links a.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; font-weight: 600; }

.main-content { margin-left: 240px; transition: margin-left 0.3s ease; }
.main-content.expanded { margin-left: 70px; }

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .main-content.expanded { margin-left: 0 !important; }
  .sidebar-toggle { display: block; }
}
