/* BilzatOS 管理后台侧栏 · 对齐 ai.barbiz.cn「用户运营」红框结构（橙主题） */
:root {
  --side-w: 240px;
  --accent: #ff6a1a;
  --accent-deep: #e85d12;
  --accent-soft: #fff4ec;
  --line: #e8e8e8;
  --text: #4a5568;
  --muted: #5a6578;
}

.admin-sidebar {
  width: var(--side-w);
  min-width: var(--side-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #fafbfc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid #eef0f3;
  background: #fff;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.02em;
}

.bz-side-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: #d0d5dd transparent;
}

.sidebar-menu::-webkit-scrollbar { width: 5px; }
.sidebar-menu::-webkit-scrollbar-thumb {
  background: #d0d5dd;
  border-radius: 4px;
}

.sidebar-menu-item {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  line-height: 1.4;
}

.sidebar-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.sidebar-menu-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.sidebar-menu-group { margin: 1px 0; }

.sidebar-menu-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 18px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-menu-group-title::after {
  content: "▾";
  font-size: 11px;
  color: #9ca3af;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

.sidebar-menu-group:not(.open) .sidebar-menu-group-title::after {
  transform: rotate(-90deg);
}

.sidebar-menu-group-title:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.sidebar-menu-group.open > .sidebar-menu-group-title,
.sidebar-menu-group-title.has-active-child {
  color: var(--accent);
}

.sidebar-submenu {
  display: none;
  padding: 2px 0 6px;
  background: rgba(255, 255, 255, 0.6);
}

.sidebar-menu-group.open .sidebar-submenu { display: block; }

.sidebar-submenu-item {
  padding: 8px 18px 8px 32px;
  font-size: 12.5px;
  color: var(--muted);
}

.sidebar-submenu-item.active { font-weight: 500; }

.admin-sidebar .sidebar-version {
  padding: 12px 18px 8px 44px;
  margin-top: 4px;
  user-select: none;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #94a3b8;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  width: 100%;
  transition: color 0.2s;
}
.admin-sidebar .sidebar-version::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  margin: 0 0 10px 0;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.45), transparent);
}
.admin-sidebar .sidebar-version:hover {
  color: #64748b;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #f0f0f0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb347 0%, #ff6a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 响应式侧栏过渡（细则见 admin-responsive.css） */
.admin-sidebar {
  transition: transform 0.24s ease;
}

body.admin-sidebar-open {
  overflow: hidden;
}
