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

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-out-expo);
  z-index: 100;
  box-shadow: var(--glass-shadow);
}

.sidebar__brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-6);
  border-bottom: 1px solid var(--glass-border);
}

.sidebar__brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: transform var(--duration-normal) var(--ease-out-back),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo);
}

.sidebar__brand-icon:has(.sidebar__brand-logo) {
  background: none;
  box-shadow: none;
}

/* hover：边缘提亮 + 轻微放大，做出按钮感（不依赖白底图，配合透明 svg） */
.sidebar__brand-icon:hover {
  transform: scale(1.08);
  border-color: var(--border-color-hover);
  box-shadow: 0 0 14px var(--color-accent-glow);
}

.sidebar__brand-icon svg,
.sidebar__brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar__brand-icon-placeholder {
  font-size: var(--text-2xs);
  font-weight: var(--font-bold);
  color: var(--color-on-accent);
  line-height: 1;
  opacity: 0.55;
  letter-spacing: 0.02em;
}

.sidebar__brand-text {
  font-family: 'Orbitron', var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  letter-spacing: -0.02em;
  color: #ffffff;
}

.sidebar__nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
}

.sidebar__nav-group {
  margin-bottom: var(--space-6);
}

.sidebar__nav-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  padding: 0 var(--space-3);
  margin-bottom: var(--space-2);
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  padding-left: calc(var(--space-3) + 2px);
  border-radius: var(--border-radius-md);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
}

.sidebar__nav-item::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 20px;
  background: var(--color-accent);
  border-radius: 0 2px 2px 0;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.sidebar__nav-item:hover {
  background: var(--glass-bg-hover);
  color: var(--color-text-primary);
  padding-left: calc(var(--space-3) + 6px);
}

.sidebar__nav-item:hover::before {
  transform: translateY(-50%) scaleY(0.6);
}

.sidebar__nav-item--active {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.sidebar__nav-item--active::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar__nav-item--active:hover {
  padding-left: calc(var(--space-3) + 2px);
}

.sidebar__nav-item--active:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar__nav-item--active .sidebar__nav-icon {
  color: var(--color-accent);
}

.sidebar__nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar__nav-badge {
  margin-left: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  padding: 1px var(--space-2);
  border-radius: var(--border-radius-full);
  min-width: 20px;
  text-align: center;
  border: 1px solid var(--glass-border);
}

.sidebar__nav-item--active .sidebar__nav-badge {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: transparent;
}

.sidebar__footer {
  padding: var(--space-3) var(--space-3);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sidebar__links-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  padding: 0 var(--space-3);
}

.sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--border-radius-md);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out-expo);
  cursor: pointer;
}

.sidebar__link:hover {
  background: var(--glass-bg-hover);
  backdrop-filter: blur(4px);
  color: var(--color-text-primary);
}

.sidebar__link-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

.sidebar__link:hover .sidebar__link-icon {
  opacity: 1;
}

.sidebar__footer-logo-box {
  margin-top: var(--space-1);
  padding: var(--space-1) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar__footer-logo-box svg,
.sidebar__footer-logo-box img {
  width: auto;
  height: 28px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.sidebar__footer-logo-placeholder {
  font-size: var(--text-2xs);
  color: var(--color-text-tertiary);
  opacity: 0.4;
  letter-spacing: 0.05em;
}

/* ─── 徽标（Orbitron 自定义品牌文字）──────────────── */
.sidebar__badge {
  padding: var(--space-2) var(--space-3);
  text-align: center;
  user-select: none;
}

.sidebar__badge-title {
  font-family: 'Orbitron', var(--font-sans);
  font-weight: 750;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0.06em;
  /* 固定青蓝赛博渐变：区分度再减半，过渡更柔 */
  background: linear-gradient(135deg, #20aae4 0%, #2b8de0 50%, #209ec2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* 双层青色辉光（再减半） */
  filter: drop-shadow(0 0 10px rgba(0, 212, 200, 0.19))
          drop-shadow(0 0 22px rgba(43, 141, 224, 0.12));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__badge-subtitle {
  font-family: 'Orbitron', var(--font-sans);
  font-weight: 300;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: #62d4e8;
  opacity: 0.85;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
