/* Sidebar: nav scrolls, user footer always visible, moderate spacing */
.mf-sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  /* 高级蓝紫渐变（对比比特浏览器），替代平铺底色，更靓丽 */
  background: linear-gradient(180deg, #3f6fd9 0%, #2b51ad 36%, #1d3f8f 68%, #13306f 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.mf-sidebar-brand {
  flex: 0 0 auto !important;
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: 26px 16px 0;
  margin-bottom: 6px;
}

/* macOS 原生红绿灯在左上角：品牌区再往下让出更多空间 */
body.mf-platform-mac .mf-sidebar-brand {
  padding-top: 46px;
  min-height: 98px;
}

.mf-sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important; /* critical: allow shrink so footer stays on screen */
  overflow-x: hidden !important;
  overflow-y: auto !important;
  gap: 4px !important;
  padding: 16px 0 10px !important;
}

.mf-sidebar-nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 36px !important;
  margin: 0 8px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 500;
  line-height: 1.2;
  color: var(--shell-sidebar-muted-fg, #c5d8f0);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.mf-sidebar-nav-item:hover {
  background: var(--shell-sidebar-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--shell-sidebar-fg, #ffffff);
}

.mf-sidebar-nav-item.is-active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12));
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #ffffff;
}

.mf-sidebar-nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke-width: 1.8;
}

.mf-sidebar-user {
  flex: 0 0 auto !important;
  margin: 8px 10px 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

/* Feedback FAB — force bottom-right (arbitrary Tailwind classes missing from bundle) */
.mf-feedback-fab {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: 24px !important;
  bottom: 12px !important;
  z-index: 60 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22) !important;
  cursor: pointer !important;
  -webkit-app-region: no-drag !important;
}

.mf-feedback-fab svg {
  width: 21px !important;
  height: 21px !important;
}

/* 深色模式：左侧蓝色渐变切换为深黑面板 */
html.dark .mf-sidebar {
  background: linear-gradient(180deg, #111827 0%, #0d1420 55%, #090e17 100%) !important;
  border-right-color: rgba(255, 255, 255, 0.07) !important;
}

html.dark .mf-sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
}

html.dark .mf-sidebar-nav-item.is-active {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.24), rgba(96, 165, 250, 0.08)) !important;
  box-shadow: inset 3px 0 0 #60a5fa;
}


/* ===== 2026-10-02：侧边栏宽度固定（不再随账号长度变宽）+ 账号可复制 ===== */
.mf-sidebar {
  width: 170px !important;
  min-width: 170px !important;
  max-width: 170px !important;
  flex: 0 0 170px !important;
}
.mf-sidebar-user {
  min-width: 0 !important;
}
.mf-sidebar-user > div,
.mf-sidebar-user p {
  min-width: 0 !important;
  max-width: 100% !important;
}
.mf-sidebar-user p {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.mf-sidebar-user p:hover {
  color: #fff !important;
  text-decoration: underline dotted rgba(255, 255, 255, 0.5);
}
.mf-sidebar-toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 12px);
  z-index: 2147483600;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}
.mf-sidebar-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
