/* ═══════════════════════════════════════════════════════════════
   layout.css - 侧边栏、顶栏、主内容区、响应式布局
   来源：提取自 admin.html 的布局相关样式
═══════════════════════════════════════════════════════════════ */

/* ── 应用容器 ── */
.app {
  min-height: 100vh;
  position: relative;
  display: flex;
}

/* ═══════════════════════════════════════════════════════════════
   侧边栏
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.3s ease;
}

.sidebar.collapsed {
  width: 60px !important;
}

.sidebar.collapsed .sb-link span,
.sidebar.collapsed .sb-group-title span:not(.sb-arrow),
.sidebar.collapsed .sb-link svg + * {
  display: none;
}

.sidebar.collapsed .sb-link,
.sidebar.collapsed .sb-group-title {
  padding: 0.65rem 0.5rem;
  justify-content: center;
}

.sidebar.collapsed .sb-group-title {
  justify-content: center;
}

.sidebar.mobile-open {
  transform: translateX(0) !important;
}

/* 侧边栏头部 */
.sb-header {
  height: 52px;
  padding: 0 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sb-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 侧边栏导航 */
.sb-nav {
  flex: 1;
  padding: 0.8rem 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 导航链接 */
.sb-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem 0.7rem 1.2rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border-left: 3px solid transparent;
  position: relative;
  z-index: 1010;
  white-space: nowrap;
  overflow: hidden;
}

.sb-link:hover {
  background: var(--surface2);
  color: var(--cream);
}

.sb-link.active {
  background: var(--surface2);
  color: var(--green);
  border-left-color: var(--green);
}

.sb-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.sb-link.active svg {
  opacity: 1;
}

/* 导航折叠组 */
.sb-group {
  margin: 0.3rem 0;
}

.sb-group-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem 0.7rem 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: 6px;
  margin: 0.15rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.sb-group-title:hover {
  background: rgba(62, 207, 106, 0.08);
  color: #22c55e;
}

.sb-group-title svg {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.sb-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.sb-group.collapsed .sb-arrow {
  transform: rotate(-90deg);
  color: var(--muted);
}

.sb-group-items {
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.sb-group.collapsed .sb-group-items {
  max-height: 0;
  padding-left: 0;
}

.sb-group-items .sb-link {
  padding: 0.65rem 1rem 0.65rem 1.8rem;
}

/* 管理员设置折叠组 */
.sb-group.admin-group .sb-group-title {
  color: #c9a84c;
}

.sb-group.admin-group .sb-group-title svg {
  stroke: #c9a84c;
}

.sb-group.admin-group.open .sb-group-title {
  background: rgba(201, 168, 76, 0.1);
}

.sb-group.admin-group .sb-link {
  font-size: 0.88rem;
}

/* 侧边栏底部 */
.sb-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cream);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
}

.btn-home:hover {
  background: var(--surface3);
  border-color: var(--green);
}

/* 侧边栏退出按钮宽度自适应 */
.sb-logout-btn {
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   顶栏
═══════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 0.75rem;
  z-index: 900;
  transition: left 0.3s;
  /* overflow: hidden 改为 visible，允许下拉菜单溢出 */
}

.sidebar.collapsed ~ .main .topbar,
.sidebar.collapsed + .main .topbar,
.main:has(.sidebar.collapsed) .topbar {
  left: 60px;
}

/* 移动端遮罩层 */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* 顶栏用户区 */
.topbar-user {
  position: relative;
  flex-shrink: 0;
}

.topbar-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.55rem 0.25rem 0.3rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--cream);
}

.topbar-avatar-btn:hover {
  background: var(--surface3);
  border-color: var(--green);
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-inverse);
  flex-shrink: 0;
}

.topbar-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.2s;
  opacity: 0.6;
}

.topbar-avatar-btn[aria-expanded="true"] .topbar-chevron {
  transform: rotate(180deg);
}

/* 用户下拉菜单 */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  z-index: 960;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: panelSlideIn 0.18s ease both;
}

.user-dropdown.open {
  display: flex;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.7rem;
  background: var(--surface2);
}

.user-dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-inverse);
  flex-shrink: 0;
}

.user-dropdown-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cream);
}

.user-dropdown-role {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  width: 100%;
}

.user-dropdown-item:hover {
  background: var(--surface2);
}

.user-dropdown-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* 用户下拉图标语义色 */
.udd-icon-green  { background: rgba(var(--primary-rgb), .12); color: var(--primary); }
.udd-icon-purple { background: rgba(168,85,247,.15); color: #a855f7; }
.udd-icon-blue   { background: rgba(80,144,224,.15);  color: var(--info); }

/* ═══════════════════════════════════════════════════════════════
   汉堡菜单按钮
═══════════════════════════════════════════════════════════════ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  margin-right: 0.5rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: var(--surface3);
  border-color: var(--green);
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ═══════════════════════════════════════════════════════════════
   全局搜索触发按钮
═══════════════════════════════════════════════════════════════ */
.gs-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 34px;
  padding: 0 0.75rem 0 0.65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  transition: all 0.2s;
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 320px;
}

.gs-trigger:hover {
  border-color: var(--green);
  color: var(--cream);
}

.gs-trigger svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

.gs-trigger-placeholder {
  flex: 1;
  text-align: left;
}

.gs-trigger-kbd {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.gs-trigger-kbd kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 5px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: inherit;
  color: var(--muted);
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   通知按钮
═══════════════════════════════════════════════════════════════ */
.notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--cream);
  flex-shrink: 0;
  margin-left: auto;
}

.notif-btn:hover {
  background: var(--surface3);
  border-color: var(--green);
}

.notif-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.notif-btn:hover svg {
  transform: rotate(-15deg) scale(1.1);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--danger);
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.notif-badge.hidden {
  display: none;
}

@keyframes badgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   通知面板
═══════════════════════════════════════════════════════════════ */
.notif-panel {
  position: fixed;
  top: 58px;
  right: 1.5rem;
  width: 460px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  z-index: 950;
  display: none;
  flex-direction: column;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  animation: panelSlideIn 0.2s ease both;
}

.notif-panel.open {
  display: flex;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.notif-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem 0.7rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-panel-title .notif-count {
  font-size: 0.72rem;
  background: rgba(224, 80, 80, 0.15);
  color: var(--danger);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-weight: 600;
}

.notif-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-action-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s;
  white-space: nowrap;
}

.notif-action-btn:hover {
  background: var(--surface2);
  color: var(--green);
}

/* 通知标签页 */
.notif-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.notif-tabs::-webkit-scrollbar {
  display: none;
}

.notif-tab {
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.notif-tab:hover {
  color: var(--cream);
}

.notif-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}

/* 通知列表 */
.notif-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.4rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.notif-list::-webkit-scrollbar {
  width: 4px;
}

.notif-list::-webkit-scrollbar-track {
  background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--surface2);
}

.notif-item.unread {
  background: rgba(62, 207, 106, 0.03);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-icon.type-task { background: rgba(224, 160, 64, 0.15); color: var(--warning); }
.notif-icon.type-activity { background: rgba(80, 144, 224, 0.15); color: var(--info); }
.notif-icon.type-assign { background: rgba(144, 96, 208, 0.15); color: var(--purple); }
.notif-icon.type-system { background: rgba(62, 207, 106, 0.12); color: var(--green); }

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.notif-item.unread .notif-title {
  font-weight: 600;
}

.notif-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.3rem;
  opacity: 0.7;
}

.notif-more-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.notif-more-btn:hover {
  background: var(--surface2);
  color: var(--green);
}

/* 通知面板移动端适配 */
@media (max-width: 640px) {
  .notif-panel {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    max-width: none;
    border-radius: 10px 10px 0 0;
    bottom: 0;
    top: auto;
    max-height: 70vh;
  }
}

/* ═══════════════════════════════════════════════════════════════
   主内容区
═══════════════════════════════════════════════════════════════ */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  overflow-x: auto;
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s;
}

.main-content {
  flex: 1;
  padding-top: 52px; /* 顶栏高度 */
  min-height: 100vh;
}

/* 页面加载遮罩 */
.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--cream);
  font-size: 0.9rem;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   全局搜索 Modal
═══════════════════════════════════════════════════════════════ */
.gs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(3px);
}

.gs-overlay.open {
  display: flex;
  animation: gsFadeIn 0.15s ease both;
}

@keyframes gsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gs-modal {
  width: min(680px, 94vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: gsSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
  display: flex;
  flex-direction: row;
  max-height: 520px;
}

.gs-modal.has-preview {
  width: min(900px, 94vw);
}

@keyframes gsSlideDown {
  from { opacity: 0; transform: translateY(-18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gs-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gs-main-inner {
  overflow-y: auto;
  max-height: 420px;
  padding: 0;
}

.gs-main-inner::-webkit-scrollbar {
  width: 5px;
}

.gs-main-inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.gs-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.gs-input-row svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

#gsInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--cream);
  caret-color: var(--green);
}

#gsInput::placeholder {
  color: var(--muted);
}

.gs-esc-hint {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.7;
}

.gs-esc-hint kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: inherit;
}

.gs-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.gs-filter-tabs::-webkit-scrollbar {
  height: 3px;
}

.gs-filter-tabs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.gs-ftab {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.gs-ftab:hover {
  background: var(--surface2);
  color: var(--cream);
}

.gs-ftab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}

.gs-ftab-count {
  min-width: 16px;
  height: 16px;
  padding: 0 0.3rem;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--surface2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gs-ftab.active .gs-ftab-count {
  background: rgba(62, 207, 106, 0.2);
  color: var(--green);
}

.gs-results {
  padding: 0.5rem 0;
}

.gs-hint {
  padding: 0.75rem 1.2rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.gs-hint-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.gs-hint-item kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: inherit;
}

.gs-group-header {
  padding: 0.5rem 1.2rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gs-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.12s;
}

.gs-item:hover,
.gs-item.active {
  background: var(--surface2);
}

.gs-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.gs-item-body {
  flex: 1;
  min-width: 0;
}

.gs-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

.gs-footer {
  padding: 0.55rem 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
  gap: 1rem;
}

.gs-clear-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition: all 0.15s;
}

.gs-clear-btn:hover {
  color: var(--danger);
  background: rgba(224, 80, 80, 0.1);
}

/* 搜索预览面板 */
.gs-preview {
  width: 220px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.gs-preview.open {
  display: flex;
}

.gs-preview::-webkit-scrollbar {
  width: 4px;
}

.gs-preview::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.gs-preview-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.gs-preview-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
}

.gs-preview-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin: 0 auto 0.5rem;
  font-weight: 700;
  color: var(--green);
}

.gs-preview-name {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.4rem;
}

.gs-preview-role {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.gs-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  padding: 0.2rem 0;
  color: var(--muted);
}

.gs-preview-row span:last-child {
  color: var(--cream);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   AI Copilot
═══════════════════════════════════════════════════════════════ */
.ai-copilot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
}

.ai-copilot-fab:hover {
  transform: scale(1.05) translateY(-5px);
}

.ai-copilot-fab.open {
  animation: none;
}

.ai-copilot-fab.dragging {
  animation: none;
  transform: scale(1.05);
  opacity: 0.85;
  cursor: grabbing;
}

.ai-copilot-fab.hiding {
  opacity: 0.25;
  transform: scale(0.8);
}

/* 图标容器 */
.fab-icon-wrap {
  position: relative;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 机器人 SVG */
.fab-robot {
  width: 120px;
  height: 138px;
  animation: robotBob 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  transform-style: preserve-3d;
}

/* 聊天气泡 SVG */
.fab-bubble {
  position: absolute;
  top: -18px;
  right: -30px;
  width: 60px;
  height: 54px;
  animation: bubblePop 2.5s ease-in-out infinite;
  transform-origin: bottom left;
}

/* 天线灯闪烁 */
.robot-antenna-light {
  animation: antennaBlink 2s ease-in-out infinite;
}

/* 眼睛高光闪烁 */
.robot-eye-shine {
  animation: eyeShine 3s ease-in-out infinite;
}

/* 手臂摆动 */
.robot-left-arm {
  animation: armSwingLeft 4s ease-in-out infinite;
  transform-origin: 13px 32px;
}
.robot-right-arm {
  animation: armSwingRight 4s ease-in-out infinite;
  transform-origin: 35px 32px;
}

/* 腿部微动 */
.robot-left-leg {
  animation: legBounceLeft 3.5s ease-in-out infinite;
  transform-origin: 19px 42px;
}
.robot-right-leg {
  animation: legBounceRight 3.5s ease-in-out infinite;
  transform-origin: 29px 42px;
}

/* ── 通话元素默认隐藏 ── */
.robot-mouth-talk,
.robot-mouth-talk-inner,
.robot-right-arm-phone {
  display: none;
}

/* ── 转身动画（等待时触发，3D立体效果） ── */
.ai-copilot-fab.waiting .fab-robot {
  animation: robotTurnAround 5s ease-in-out infinite;
}

.ai-copilot-fab.waiting .robot-left-arm {
  animation: armSwingLeft 4s ease-in-out infinite;
}
.ai-copilot-fab.waiting .robot-right-arm {
  animation: armSwingRight 4s ease-in-out infinite;
}

/* ── 通话状态 ── */
.ai-copilot-fab.talking .fab-robot {
  animation: robotPhoneNod 2.5s ease-in-out infinite;
}
.ai-copilot-fab.talking .robot-mouth-smile {
  display: none;
}
.ai-copilot-fab.talking .robot-mouth-talk {
  display: inline;
  animation: robotTalkMouth 0.35s ease-in-out infinite alternate;
}
.ai-copilot-fab.talking .robot-mouth-talk-inner {
  display: inline;
  animation: robotTalkMouthInner 0.35s ease-in-out infinite alternate;
}
.ai-copilot-fab.talking .robot-right-arm {
  display: none;
}
.ai-copilot-fab.talking .robot-right-arm-phone {
  display: inline;
  animation: robotPhoneHold 2.5s ease-in-out infinite;
}
.ai-copilot-fab.talking .robot-antenna-light {
  animation: antennaTalkBlink 0.6s ease-in-out infinite;
}
.ai-copilot-fab.talking .robot-eye-shine {
  animation: eyeShine 1.5s ease-in-out infinite;
}

/* ── 动画关键帧 ── */

@keyframes aiFabFloat {
  0%, 100% { box-shadow: 0 4px 20px rgba(62, 207, 106, 0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
  50% { box-shadow: 0 6px 30px rgba(62, 207, 106, 0.65), inset 0 1px 0 rgba(255,255,255,0.15); }
}

@keyframes robotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* 3D立体转身：scaleX压缩+阴影偏移模拟纵深 */
@keyframes robotTurnAround {
  0%, 8%    { transform: scaleX(1) translateY(0); filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); }
  15%       { transform: scaleX(0.85) translateY(-1px); filter: drop-shadow(2px 3px 6px rgba(0,0,0,0.25)); }
  22%       { transform: scaleX(0.05) translateY(-2px); filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.3)); }
  28%       { transform: scaleX(-0.05) translateY(-2px); filter: drop-shadow(-4px 4px 8px rgba(0,0,0,0.3)); }
  35%       { transform: scaleX(-1) translateY(-1px); filter: drop-shadow(-2px 3px 6px rgba(0,0,0,0.25)); }
  45%, 55%  { transform: scaleX(-1) translateY(0); filter: drop-shadow(-2px 2px 6px rgba(0,0,0,0.2)); }
  62%       { transform: scaleX(-1) translateY(-1px); filter: drop-shadow(-2px 3px 6px rgba(0,0,0,0.25)); }
  70%       { transform: scaleX(-0.05) translateY(-2px); filter: drop-shadow(-4px 4px 8px rgba(0,0,0,0.3)); }
  78%       { transform: scaleX(0.05) translateY(-2px); filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.3)); }
  85%       { transform: scaleX(0.85) translateY(-1px); filter: drop-shadow(2px 3px 6px rgba(0,0,0,0.25)); }
  92%, 100% { transform: scaleX(1) translateY(0); filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); }
}

/* 通话时头部微晃 */
@keyframes robotPhoneNod {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-1px) rotate(-2deg); }
  40% { transform: translateY(0) rotate(0deg); }
  60% { transform: translateY(-1.5px) rotate(1.5deg); }
  80% { transform: translateY(0) rotate(0deg); }
}

/* 通话嘴巴张合 */
@keyframes robotTalkMouth {
  0% { ry: 2.5; }
  100% { ry: 1.2; }
}

@keyframes robotTalkMouthInner {
  0% { ry: 1.5; opacity: 0.6; }
  100% { ry: 0.5; opacity: 0.4; }
}

/* 举手机微晃 */
@keyframes robotPhoneHold {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(0.5px) rotate(2deg); }
  75% { transform: translateX(-0.5px) rotate(-1deg); }
}

/* 天线通话快闪 */
@keyframes antennaTalkBlink {
  0%, 100% { opacity: 1; fill: #7dffb3; }
  50% { opacity: 0.2; fill: #3ecf6a; }
}

@keyframes bubblePop {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  30% { transform: scale(1.25); opacity: 1; }
  60% { transform: scale(0.9); opacity: 0.8; }
  80% { transform: scale(1.08); opacity: 0.95; }
}

@keyframes antennaBlink {
  0%, 100% { opacity: 1; fill: #7dffb3; }
  50% { opacity: 0.3; fill: #3ecf6a; }
}

@keyframes eyeShine {
  0%, 80%, 100% { opacity: 0.85; }
  85% { opacity: 0; }
  90% { opacity: 0.85; }
}

@keyframes armSwingLeft {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(5deg); }
}

@keyframes armSwingRight {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(8deg); }
  75% { transform: rotate(-5deg); }
}

@keyframes legBounceLeft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1px); }
}

@keyframes legBounceRight {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(0); }
}

.ai-copilot-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 9998;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: aiPanelSlideIn 0.25s ease;
}

.ai-copilot-panel.open {
  display: flex;
}

@keyframes aiPanelSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-panel-header {
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.ai-panel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ai-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
}

.ai-panel-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.ai-panel-close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  transition: all 0.2s;
}

.ai-panel-close:hover {
  background: var(--danger);
  color: var(--text-inverse);
}

.ai-panel-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.ai-conversation-sidebar {
  width: 0;
  overflow: hidden;
  background: var(--surface2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  flex-shrink: 0;
}

.ai-conversation-sidebar.open {
  width: 220px;
}

.conv-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.85rem;
}

.conv-new-btn {
  background: var(--green);
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

.conv-new-btn:hover {
  background: var(--green-dark);
}

.conv-search-wrap {
  padding: 0.5rem;
}

.conv-search-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text);
}

.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.conv-item {
  padding: 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 0.3rem;
  position: relative;
  font-size: 0.8rem;
  transition: background 0.15s;
}

.conv-item:hover {
  background: var(--surface);
}

.conv-item.active {
  background: var(--green);
  color: white;
}

.conv-item-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 20px;
}

.conv-item-time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.2rem;
}

.conv-item-delete {
  position: absolute;
  right: 0.4rem;
  top: 0.4rem;
  background: none;
  border: none;
  color: inherit;
  opacity: 0;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
}

.conv-item:hover .conv-item-delete {
  opacity: 0.5;
}

.conv-item-delete:hover {
  opacity: 1 !important;
  color: var(--danger);
}

.conv-empty {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.conv-item-search-match {
  font-size: 0.7rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
}

.ai-panel-header-actions {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}

.ai-panel-action-btn {
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  transition: background 0.15s;
}

.ai-panel-action-btn:hover {
  background: var(--surface);
}

.ai-panel-info {
  flex: 1;
  min-width: 0;
}

#aiHistoryBtn.active {
  background: var(--green);
  color: white;
}

.ai-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-msg {
  margin-bottom: 0.3rem;
}

.ai-msg-bubble {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  max-width: 85%;
  word-break: break-word;
  line-height: 1.5;
  font-size: 0.85rem;
}

.ai-msg-bot .ai-msg-bubble {
  background: var(--surface2);
  color: var(--cream);
  border-bottom-left-radius: 4px;
}

.ai-msg-user .ai-msg-bubble {
  background: var(--green);
  color: var(--text-inverse);
  border-bottom-right-radius: 4px;
}

.ai-typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.6rem 0.9rem;
  background: var(--surface2);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: aiTyping 0.8s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiTyping {
  0%, 60%, 100% { transform: translateY(0); background: var(--muted); }
  30% { transform: translateY(-6px); background: var(--green); }
}

.ai-panel-input {
  padding: 0.75rem 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-panel-input-row {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.ai-voice-btn {
  width: 46px;
  padding: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-voice-btn:hover {
  background: var(--surface3);
}

.ai-voice-btn.recording {
  background: var(--danger);
  border-color: var(--danger);
  animation: ai-voice-pulse 1.5s infinite;
}

@keyframes ai-voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ai-input-field {
  flex: 1;
  padding: 0.75rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  color: var(--cream);
  font-size: 0.9rem;
  resize: none;
  min-height: 46px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
  font-family: inherit;
}

.ai-input-field:focus {
  border-color: var(--green);
}

.ai-input-field::placeholder {
  color: var(--muted);
}

.ai-send-btn {
  min-width: 56px;
  padding: 0 1rem;
  border-radius: 0 10px 10px 0;
  background: var(--green);
  border: 1px solid var(--green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
}

/* 语音预览区域 */
.ai-voice-preview {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.ai-voice-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.ai-voice-close {
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}

.ai-voice-close:hover {
  background: var(--surface3);
}

.ai-voice-preview-content {
  min-height: 32px;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--cream);
}

/* 语音波形动画 */
.ai-voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 20px;
  margin-top: 0.5rem;
}

.ai-voice-bar {
  width: 3px;
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  animation: ai-voice-wave 0.5s ease-in-out infinite alternate;
}

.ai-voice-bar:nth-child(1) { animation-delay: 0s; height: 40%; }
.ai-voice-bar:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.ai-voice-bar:nth-child(3) { animation-delay: 0.2s; height: 50%; }
.ai-voice-bar:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.ai-voice-bar:nth-child(5) { animation-delay: 0.4s; height: 60%; }

@keyframes ai-voice-wave {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

/* 音频录制面板 */
.ai-audio-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
  overflow: hidden;
  z-index: 100;
}

.ai-audio-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface2);
  font-size: 0.9rem;
  font-weight: 600;
}

.ai-audio-panel-close {
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}

.ai-audio-panel-close:hover {
  background: var(--surface3);
}

.ai-audio-panel-body {
  padding: 0.75rem;
}

.ai-audio-panel-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-bottom: 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
  gap: 4px;
}

.ai-audio-bar {
  width: 6px;
  height: 50%;
  background: var(--primary);
  border-radius: 3px;
  animation: ai-audio-wave 0.4s ease-in-out infinite alternate;
}

@keyframes ai-audio-wave {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(1); }
}

.ai-audio-panel-textarea {
  width: 100%;
  height: 80px;
  padding: 0.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  resize: none;
  box-sizing: border-box;
}

.ai-audio-panel-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.ai-audio-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface2);
}

.ai-audio-panel-footer .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

.ai-audio-panel-footer .btn-primary {
  background: var(--primary);
  color: white;
}

.ai-audio-panel-footer .btn-secondary {
  background: var(--surface3);
  color: var(--text);
}

/* 夸克浏览器语音记录面板 */
.ai-voice-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
  overflow: hidden;
  z-index: 100;
}

.ai-voice-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface2);
  font-size: 0.9rem;
  font-weight: 600;
}

.ai-voice-panel-close {
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}

.ai-voice-panel-close:hover {
  background: var(--surface3);
}

.ai-voice-panel-body {
  padding: 0.75rem;
}

.ai-voice-panel-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-bottom: 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
}

.ai-voice-bar {
  width: 6px;
  height: 50%;
  margin: 0 2px;
  background: var(--primary);
  border-radius: 3px;
  animation: ai-voice-wave 0.3s ease-in-out infinite alternate;
}

.ai-voice-bar:nth-child(2) { animation-delay: 0.1s; }
.ai-voice-bar:nth-child(3) { animation-delay: 0.2s; }
.ai-voice-bar:nth-child(4) { animation-delay: 0.3s; }
.ai-voice-bar:nth-child(5) { animation-delay: 0.4s; }

.ai-voice-panel-textarea {
  width: 100%;
  height: 80px;
  padding: 0.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  resize: none;
  box-sizing: border-box;
}

.ai-voice-panel-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-align: center;
}

.ai-quick-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ai-quick-phrase {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-quick-phrase:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.ai-voice-panel-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.ai-voice-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface2);
}

.ai-voice-panel-footer .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

.ai-voice-panel-footer .btn-primary {
  background: var(--primary);
  color: white;
}

.ai-voice-panel-footer .btn-secondary {
  background: var(--surface3);
  color: var(--text);
}

.ai-send-btn:hover {
  background: var(--green2);
  transform: scale(1.05);
}

.ai-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   登录界面
═══════════════════════════════════════════════════════════════ */
#loginOverlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 50%, var(--surface2) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(20px);
}

.login-wrap {
  width: 100%;
  max-width: 580px;
  padding: 2rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius, 16px);
  padding: 2rem;
  box-shadow: var(--card-shadow, 0 20px 60px rgba(0, 0, 0, 0.4));
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.login-logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}

.login-logo-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.login-form .form-group {
  margin-bottom: 1.2rem;
}

.login-form .form-input {
  height: 48px;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  padding-left: 2.8rem;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap .input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.login-input-wrap .toggle-pwd {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 1rem;
}

.login-input-wrap .toggle-pwd:hover {
  color: var(--cream);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--muted);
}

.login-options label input[type="checkbox"] {
  accent-color: var(--green);
}

.login-options a {
  color: var(--green);
  text-decoration: none;
}

.login-options a:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--btn-radius, 10px);
  cursor: pointer;
  transition: all 0.3s;
  background: var(--green);
  color: var(--text-inverse);
  margin-bottom: 1rem;
}

.login-btn:hover {
  background: var(--green2);
  transform: translateY(-1px);
  box-shadow: var(--card-shadow);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-demo {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.6rem !important;
  width: 100% !important;
  min-width: 100% !important;
}

.demo-btn {
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.demo-btn:hover {
  border-color: var(--green);
  background: var(--surface3);
}

.demo-btn .demo-role {
  font-weight: 600;
  display: block;
  white-space: nowrap;
}

.demo-btn .demo-email {
  font-size: 0.7rem;
  opacity: 0.7;
  white-space: nowrap;
  word-break: keep-all;
}

.login-error {
  background: rgba(224, 80, 80, 0.12);
  border: 1px solid rgba(224, 80, 80, 0.3);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--danger);
  display: none;
}

.login-error.show {
  display: block;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.login-footer a {
  color: var(--green);
  margin-left: 0.3rem;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-loading {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: none;
}

.login-loading.show {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   Modal 通用
═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  overflow-y: auto;
  z-index: 200;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  margin: auto;
  overflow: hidden;
}

.modal-hdr,
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
  position: relative;
}

.modal-title {
  font-size: 1rem;
  margin: 0;
  padding-right: 3rem;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  padding: 0.25rem;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--cream);
  background: var(--surface2);
}

.modal-body {
  padding: 1.2rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   Toast 提示
═══════════════════════════════════════════════════════════════════ */
#toastContainer {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--green);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  animation: slideIn 0.3s;
  pointer-events: auto;
  max-width: 320px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.toast.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.toast.warning {
  border-color: var(--warning);
  color: var(--warning);
}

@keyframes slideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   页面通用结构
═══════════════════════════════════════════════════════════════ */
.page {
  display: none;
  width: 100%;
  flex: 1;
}

.page.active {
  display: flex;
  flex-direction: column;
}

.page-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: var(--page-padding-y) var(--page-padding-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.ai-center-page .page-header {
  align-items: center;
}

.page-header-left,
.page-title-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-header-right,
.page-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.page-title span {
  color: var(--green);
}

.page-subtitle {
  margin-top: var(--space-xs);
  font-size: 0.9rem;
  color: var(--muted);
}

/* 页面内容容器（可选包裹层，统一 padding 控制） */
.page-wrapper {
  padding: var(--content-padding-y, 1.5rem) var(--content-padding-x, 2rem);
}
.page-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg, 1.5rem);
  margin-top: var(--space-lg, 1.5rem);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.page-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-md);
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

.tab-btn.active {
  background: var(--green);
  color: var(--text-inverse);
}

/* ═══════════════════════════════════════════════════════════════
   响应式断点
═══════════════════════════════════════════════════════════════ */

/* 笔记本 */
@media (max-width: 1200px) {
  :root {
    --page-padding-x: 1.5rem;
    --page-padding-y: 1.25rem;
  }
}

/* 平板 */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 200px;
    --page-padding-x: 1rem;
  }
}

/* 移动端 */
@media (max-width: 600px) {
  :root {
    --sidebar-width: 0px;
    --page-padding-x: 0.75rem;
  }

  /* 移动端：侧边栏变抽屉 */
  .sidebar {
    width: 260px !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* 顶栏偏移 */
  .topbar {
    left: 0 !important;
    right: 0;
  }

  /* 隐藏快捷键提示 */
  .gs-trigger-kbd {
    display: none;
  }

  .gs-trigger-placeholder {
    display: inline;
  }

  .gs-trigger {
    min-width: 36px;
    padding: 0 0.45rem;
  }

  .gs-overlay {
    padding-top: 24px;
  }

  .gs-preview {
    display: none !important;
  }

  .gs-modal {
    width: min(100vw, 94vw);
  }

  .gs-filter-tabs {
    gap: 0.2rem;
    padding: 0.4rem 0.8rem;
  }

  /* 通知面板全屏 */
  .notif-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }

  /* AI 面板全屏 */
  #aiCopilotPanel.open {
    position: fixed;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
  }

  .ai-copilot-fab {
    width: 56px;
    height: 56px;
  }
  .ai-copilot-fab .fab-robot {
    width: 35px;
    height: 40px;
  }
  .ai-copilot-fab .fab-bubble {
    width: 16px;
    height: 14px;
    top: -4px;
    right: -7px;
  }

  /* Toast 居中 */
  #toastContainer {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    align-items: center;
  }

  .toast {
    max-width: 100%;
    width: 100%;
  }

  /* 移动端：文档协作页面适配 */
  .doc-layout {
    flex-direction: column;
  }
  .doc-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .doc-main {
    flex: 1;
    min-height: 400px;
  }
  .doc-editor textarea {
    min-height: 200px;
  }

  /* 移动端：通知中心适配 */
  .notif-layout {
    flex-direction: column;
  }
  .notif-sidebar {
    width: 100%;
    max-height: 120px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
  }
  .notif-filters {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .notif-filter-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  /* ── 完成进度主Tab导航 ── */
  .progress-main-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--surface2);
    border-radius: 10px;
  }

  .progress-main-tab {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--muted);
  }

  .progress-main-tab:hover {
    color: var(--cream);
    background: var(--surface);
  }

  .progress-main-tab.active {
    background: var(--green);
    color: #fff;
    font-weight: 600;
  }

  .progress-tab-content {
    min-height: 400px;
  }

  /* ── 数据分析网格 ── */
  .analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .analytics-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }

  .analytics-card-wide {
    grid-column: span 2;
  }

  .analytics-chart {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 任务完成率圆环 */
  .completion-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }

  .completion-circle svg {
    transform: rotate(-90deg);
  }

  .completion-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
  }

  /* 平均工时 */
  .worktime-display {
    text-align: center;
    padding: 1rem;
  }

  .worktime-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--info);
  }

  .worktime-unit {
    font-size: 1rem;
    color: var(--muted);
  }

  /* 团队活跃度柱状图 */
  .activity-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 150px;
    padding: 0 1rem;
  }

  .activity-bar-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
    padding: 0 2px;
  }

  .activity-bar {
    width: 100%;
    max-width: 30px;
    background: linear-gradient(to top, var(--green), var(--green2));
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
  }

  /* 燃尽图 */
  .burndown-chart {
    padding: 1rem;
  }

  .chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--muted);
  }

  .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
  }

  /* ── 项目仪表盘样式 ── */
  .dashboard-overview-row {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .dashboard-overview-card {
    min-height: 180px;
  }

  .dashboard-overview-body {
    padding: 0.75rem 1rem;
  }

  .dashboard-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 1.5rem;
  }

  .dashboard-info-grid .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .dashboard-info-grid .info-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .dashboard-info-grid .info-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
  }

  .dashboard-gauge-card {
    min-height: 180px;
  }

  .dashboard-status-btns {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
  }

  .dashboard-main-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1rem;
  }

  .dashboard-main-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
  }

  .dashboard-main-tab:hover {
    background: var(--surface2);
    color: var(--text);
  }

  .dashboard-main-tab.active {
    background: var(--green);
    color: #fff;
    font-weight: 600;
  }

  .dashboard-tab-content {
    min-height: 400px;
  }

  .dashboard-legend {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
  }

  .dashboard-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .dashboard-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
  }

  .dashboard-legend-label {
    color: var(--text);
  }

  .dashboard-legend-value {
    margin-left: auto;
    font-weight: 600;
    color: var(--text);
  }

  /* 仪表盘阶段样式 */
  .dashboard-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--surface2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }

  .dashboard-stage-name {
    font-weight: 600;
    font-size: 1rem;
  }

  .dashboard-stage-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
  }

  .dashboard-stage-progress {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
  }

  .dashboard-stage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green2));
    border-radius: 4px;
    transition: width 0.3s ease;
  }

  .dashboard-task-list {
    margin-top: 0.5rem;
  }

  .dashboard-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background 0.2s;
  }

  .dashboard-task-item:hover {
    background: var(--surface2);
  }

  .dashboard-task-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .dashboard-task-status.done { background: var(--green); }
  .dashboard-task-status.inprogress { background: var(--warning); }
  .dashboard-task-status.todo { background: var(--border); }

  .dashboard-task-name {
    flex: 1;
    font-size: 0.85rem;
  }

  .dashboard-task-name.done {
    text-decoration: line-through;
    color: var(--muted);
  }

  .dashboard-task-assignee {
    font-size: 0.75rem;
    color: var(--muted);
  }

  /* 阶段卡片样式 */
  .stage-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
  }

  .stage-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
  }

  .stage-card-header:hover {
    background: var(--surface2);
  }

  .stage-expand-icon {
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.2s;
  }

  .stage-card-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
  }

  .stage-card-progress {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green);
  }

  .stage-card-body {
    padding: 0.5rem 1rem 0.75rem 2rem;
    background: var(--surface2);
  }

  /* 阶段详情样式 */
  .stage-detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
  }

  .stage-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .stage-detail-name {
    font-weight: 600;
    font-size: 1rem;
  }

  .stage-detail-progress {
    font-weight: 600;
    color: var(--green);
  }

  .stage-detail-deadline {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
  }

  .stage-detail-tasks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .task-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
  }

  .task-item:hover {
    background: var(--surface2);
  }

  .task-item.done .task-name {
    text-decoration: line-through;
    color: var(--muted);
  }

  .task-status {
    font-size: 0.9rem;
  }

  .task-name {
    flex: 1;
  }

  .task-assignee {
    font-size: 0.75rem;
    color: var(--muted);
  }

  /* 进度统计 */
  .progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .progress-stat-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green);
  }

  .progress-stat-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
  }

  /* 移动端：数据可视化适配 */
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .analytics-card-wide {
    grid-column: 1;
  }

  /* 移动端：AI助手适配 */
  .ai-assistant-container {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
  }
  .ai-input-area {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
  }
  .ai-quick-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  .quick-action {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  /* 移动端：知识库适配 */
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  /* 移动端：成就徽章适配 */
  .achievement-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 移动端：时间线适配 */
  .timeline-container {
    padding: 0.5rem;
  }
  .gantt-chart {
    overflow-x: auto;
  }
  .gantt-row-task {
    padding-left: 1rem;
  }

  /* 移动端：模板库适配 */
  .template-grid {
    grid-template-columns: 1fr;
  }
  .template-preview {
    max-height: 150px;
    overflow-y: auto;
  }
}

/* ── 成就徽章页面样式 ── */
.gamification-member-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(62, 207, 106, 0.1), rgba(24, 144, 255, 0.1));
  border: 1px solid var(--border);
  border-radius: 10px;
}

.member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-icon {
  font-size: 1.75rem;
}

.member-info {
  flex: 1;
}

.member-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 0.25rem 0;
}

.member-position {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.member-stats {
  text-align: right;
}

.member-level {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 0.25rem 0;
}

.member-score {
  font-size: 0.85rem;
  color: var(--blue);
  margin: 0;
}

.gamification-overview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 1.5rem;
}

.gamification-total {
  text-align: center;
}

.overview-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green);
}

.overview-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.gamification-progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.gamification-progress-ring svg {
  transform: rotate(-90deg);
}

.ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
}

.gamification-list {
  padding: 0.5rem 0;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.achievement-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.achievement-card.unlocked {
  border-color: var(--green);
  background: rgba(62, 207, 106, 0.05);
}

.achievement-card.locked {
  opacity: 0.6;
}

.achievement-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 0.25rem 0;
}

.achievement-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
}

.achievement-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.achievement-badge.unlocked {
  background: rgba(62, 207, 106, 0.2);
  color: var(--green);
}

.achievement-badge.locked {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.gamification-leaderboard {
  padding: 0.5rem 0;
}

.gamification-team-leaderboard {
  padding: 0.5rem 0;
}

.card-half {
  flex: 1;
  min-width: 300px;
}

.card-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-row > .card {
  flex: 1;
}

.team-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.team-name {
  font-weight: 500;
  color: var(--cream);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #1a1a1a;
}

.rank-badge.silver {
  background: linear-gradient(135deg, #e8e8e8, #c0c0c0);
  color: #1a1a1a;
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: #fff;
}

.gamification-empty {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 1rem;
}

.help-section {
  margin-bottom: 1.5rem;
}

.help-section h4 {
  font-size: 1rem;
  color: var(--cream);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.help-table th,
.help-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.help-table th {
  width: 120px;
  color: var(--muted);
  font-weight: 500;
}

.help-table td {
  color: var(--cream);
}

.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 成就设置样式 */
.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section h4 {
  font-size: 1rem;
  color: var(--cream);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.achievements-settings-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.achievement-settings-item {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.achievement-settings-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.achievement-settings-header .achievement-icon {
  font-size: 1.5rem;
}

.achievement-settings-header .form-input {
  flex: 1;
}

.form-textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input);
  color: var(--cream);
  font-family: inherit;
  margin-bottom: 0.5rem;
}

.form-input.small {
  width: 100px;
}

.achievement-settings-condition {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.achievement-settings-condition label {
  color: var(--muted);
  font-size: 0.9rem;
}

.help-list li {
  padding: 0.4rem 0;
  color: var(--cream);
  font-size: 0.9rem;
}

/* 成就解锁通知样式 */
.achievement-unlock-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  opacity: 1;
  transition: opacity 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 280px;
}

.notification-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
}

.notification-text h4 {
  margin: 0 0 0.25rem 0;
  color: white;
  font-size: 1.1rem;
}

.notification-text p {
  margin: 0 0 0.25rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.notification-desc {
  font-size: 0.8rem !important;
  opacity: 0.85;
}

.notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* 历史记录样式 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 8px;
}

.history-icon {
  font-size: 1.5rem;
}

.history-info {
  flex: 1;
}

.history-achievement {
  display: block;
  font-weight: 500;
  color: var(--cream);
}

.history-member {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.history-time {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.history-source {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(62, 207, 106, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* 分享面板样式 */
.share-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.share-icon {
  font-size: 2.5rem;
}

.share-content h4 {
  margin: 0 0 0.25rem 0;
  color: var(--cream);
}

.share-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.share-buttons .btn {
  width: 100%;
  justify-content: center;
}

/* 团队成就标识样式 */
.team-achievement {
  border: 2px solid var(--accent) !important;
  background: rgba(62, 207, 106, 0.1) !important;
}

.team-badge {
  font-size: 0.7rem;
  background: rgba(62, 207, 106, 0.2);
  color: var(--accent);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.achievement-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 头部操作区样式 */
.header-actions {
  display: flex;
  gap: 0.5rem;
}

.form-select.small {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  min-width: 120px;
}

.help-list li strong {
  color: var(--green);
}

/* 可拖拽弹窗样式 */
.draggable-modal {
  cursor: default;
}

.modal-drag-handle {
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
}

.modal-drag-handle:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* 成就设置弹窗样式 */
.settings-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cream);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.settings-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.settings-column {
  background: var(--surface);
  border-radius: 8px;
  padding: 1rem;
  min-height: 400px;
}

.settings-column.personal-column {
  border: 1px solid rgba(62, 207, 106, 0.3);
}

.settings-column.team-column {
  border: 1px solid rgba(62, 207, 106, 0.3);
}

.settings-column.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.1);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.column-header h4 {
  margin: 0;
  color: var(--cream);
  font-size: 1rem;
}

.column-badge {
  font-size: 0.75rem;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.achievement-settings-item {
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border-radius: 8px;
  border-left: 4px solid var(--border);
}

.achievement-settings-item.personal {
  border-left-color: var(--green);
}

.achievement-settings-item.team {
  border-left-color: var(--accent);
}

.achievement-settings-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.achievement-settings-header .achievement-icon {
  font-size: 1.5rem;
}

.achievement-settings-header .form-input {
  flex: 1;
}

.achievement-type-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.achievement-type-badge.personal {
  background: rgba(62, 207, 106, 0.2);
  color: var(--green);
}

.achievement-type-badge.team {
  background: rgba(62, 207, 106, 0.2);
  color: var(--accent);
}

.achievement-settings-item .form-textarea {
  width: 100%;
  min-height: 60px;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cream);
  font-size: 0.9rem;
  resize: vertical;
}

.achievement-settings-condition {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.achievement-settings-condition label {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.achievement-settings-condition .form-input.small {
  width: 80px;
}

/* ── AI 面板拖拽 ── */
.ai-panel-header {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.ai-panel-header:active {
  cursor: grabbing;
}
/* 拖拽中：增强阴影，去掉圆角动画 */
.ai-copilot-panel.panel-dragging {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--green);
  transition: none !important;
}
.ai-copilot-panel.panel-dragging .ai-panel-header {
  cursor: grabbing;
}
/* header 内的按钮不需要 grab 光标 */
.ai-panel-header button,
.ai-panel-header a,
.ai-panel-header input {
  cursor: pointer;
}

/* ── AI 机器人图片样式 ── */
.fab-robot-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* 隐藏状态 */

/* ── 知识库编辑器样式 ── */
#knowledge-editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

#knowledge-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 300px;
  background: var(--surface);
}

#knowledge-content .w-e-text-container {
  background: var(--surface);
}

.knowledge-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 300px;
  background: var(--surface);
}

/* ── 模板库编辑器样式 ── */
#template-editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

#template-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 250px;
  background: var(--surface);
}

.template-editor-box {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 250px;
  background: var(--surface);
}

#template-editor-content .w-e-text-container {
  background: var(--surface);
}

/* ── 文档协作编辑器样式 ── */
#doc-create-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

#doc-create-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 300px;
  background: var(--surface);
}

.doc-create-editor {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 300px;
  background: var(--surface);
}

#doc-create-content .w-e-text-container,
.doc-create-editor .w-e-text-container {
  background: var(--surface);
}

/* ── 关于我们编辑器样式 ── */
#about-intro-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

.about-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 300px;
  background: var(--surface);
}

#aboutEditorContainer .w-e-text-container {
  background: var(--surface);
}

/* ── 关于我们卡片编辑器样式 ── */
#about-card-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

.about-card-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 200px;
  background: var(--surface);
}

#aboutCardEditorContainer .w-e-text-container {
  background: var(--surface);
}

/* ── 活动管理编辑器样式 ── */
#news-editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

.news-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 200px;
  background: var(--surface);
}

#news-desc-content .w-e-text-container {
  background: var(--surface);
}

/* ========== 图片管理编辑器样式 ========== */
#image-editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

.image-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 150px;
  background: var(--surface);
}

#image-desc-content .w-e-text-container {
  background: var(--surface);
}

/* ========== 上传图片编辑器样式 ========== */
#upload-desc-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--surface2);
}

.upload-editor-content {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-height: 120px;
  background: var(--surface);
}

#upload-desc-content .w-e-text-container {
  background: var(--surface);
}

/* 使用导航页面样式 */
.usage-guide-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.guide-header {
  text-align: center;
  margin-bottom: 2rem;
}

.guide-header h1 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.guide-subtitle {
  color: var(--muted);
  font-size: 1rem;
}

.phase-overview {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.phase-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phase-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.arrow {
  color: var(--muted);
  font-size: 1.2rem;
}

.phase-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.phase-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.phase-section.collapsed .feature-cards {
  display: none;
}

.phase-header {
  cursor: pointer;
  margin-bottom: 1rem;
}

.phase-header h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phase-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature-card {
  /* 不规则圆角 - 模拟手绘剪纸效果 */
  border-radius: 25px 15px 25px 15px;
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  
  /* 多层阴影营造立体层次感 */
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  
  /* 柔和渐变背景 */
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  
  /* 底部加厚边框增加立体感 */
  border: none;
  border-bottom: 3px solid rgba(62, 207, 106, 0.15);
  
  /* 弹性过渡动画 */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover {
  /* 悬停弹跳 + 放大效果 */
  transform: translateY(-6px) scale(1.02);
  
  /* 增强阴影 */
  box-shadow: 
    0 8px 12px rgba(0, 0, 0, 0.1),
    0 16px 40px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  /* 添加图标投影 */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 阶段专属配色 */
.phase-section.planning .feature-card {
  border-bottom-color: rgba(2, 132, 199, 0.25);
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
}

.phase-section.executing .feature-card {
  border-bottom-color: rgba(217, 119, 6, 0.25);
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
}

.phase-section.monitoring .feature-card {
  border-bottom-color: rgba(5, 150, 105, 0.25);
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
}

.phase-section.closing .feature-card {
  border-bottom-color: rgba(124, 58, 237, 0.25);
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.guide-tips {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 12px;
  border-left: 4px solid var(--green);
}

.guide-tips h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.guide-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-tips li {
  padding: 0.4rem 0;
  color: var(--muted);
  padding-left: 1.5rem;
  position: relative;
}

.guide-tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--green);
}

/* 模板卡片预览样式 */
.template-card-preview {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--surface2);
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}

.template-card-preview h2 {
  font-size: 0.85rem;
  margin: 0.3rem 0 0.2rem;
  color: var(--cream);
}

.template-card-preview h3 {
  font-size: 0.8rem;
  margin: 0.25rem 0 0.15rem;
  color: var(--cream);
}

.template-card-preview strong {
  color: var(--cream);
  font-weight: 600;
}

.template-card-preview em {
  color: var(--muted);
  font-style: italic;
}

/* 表格提示徽章 */
.template-table-badge {
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  background: rgba(62, 207, 106, 0.1);
  color: var(--green);
  border-radius: 4px;
  font-size: 0.65rem;
  display: inline-block;
}

/* 模板卡片底部 */
.template-card-footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.view-detail {
  font-size: 0.65rem;
  color: var(--accent);
}

/* 横向分类标签 */
.templates-filter-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
  align-items: center;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.filter-tab:not(.active) .tab-count {
  background: var(--surface2);
  color: var(--muted);
}

/* 卡片副标题 */
.card-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: normal;
}

/* 模板预览Markdown样式 */
.template-view-markdown {
  line-height: 1.6;
  color: var(--muted);
}

.template-view-markdown h1 {
  font-size: 1.4rem;
  margin: 1rem 0 0.5rem;
  color: var(--cream);
}

.template-view-markdown h2 {
  font-size: 1.2rem;
  margin: 0.8rem 0 0.4rem;
  color: var(--cream);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
}

.template-view-markdown h3 {
  font-size: 1rem;
  margin: 0.6rem 0 0.3rem;
  color: var(--cream);
}

.template-view-markdown ul {
  margin: 0.4rem 0;
  padding-left: 1.5rem;
}

.template-view-markdown li {
  margin: 0.3rem 0;
}

.template-view-markdown strong {
  color: var(--cream);
  font-weight: 600;
}

.template-view-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}

.template-view-markdown th {
  background: var(--surface3);
  padding: 0.5rem 0.7rem;
  text-align: left;
  font-weight: 600;
  color: var(--cream);
  border: 1px solid var(--border);
}

.template-view-markdown td {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.template-view-markdown tr:nth-child(even) {
  background: var(--surface2);
}

.template-view-markdown tr:hover {
  background: rgba(62, 207, 106, 0.05);
}

/* 帮助弹窗样式 */
.help-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.help-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.help-section h4 {
  margin-bottom: 0.75rem;
  color: var(--cream);
  font-size: 1rem;
}

.help-section ol, .help-section ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.help-section li {
  margin: 0.4rem 0;
  line-height: 1.5;
}

.help-section strong {
  color: var(--cream);
  font-weight: 600;
}

/* 站内公告样式 */
.announcement-filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.filter-tab:hover {
  border-color: var(--accent);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.announcements-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.announcement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.announcement-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.announcement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.announcement-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.announcement-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.announcement-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-footer {
  display: flex;
  justify-content: flex-end;
}

.seal-badge {
  font-size: 0.7rem;
  color: #c41e3a;
  padding: 0.2rem 0.5rem;
  border: 1px solid #c41e3a;
  border-radius: 4px;
}

/* 公告详情样式 */
.announcement-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.announcement-view-date {
  font-size: 0.9rem;
  color: var(--muted);
}

.announcement-view-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.announcement-view-content {
  color: var(--muted);
  line-height: 1.8;
}

.announcement-view-content h1,
.announcement-view-content h2,
.announcement-view-content h3 {
  color: var(--cream);
  margin: 1.5rem 0 1rem;
}

.announcement-view-content h1 { font-size: 1.4rem; }
.announcement-view-content h2 { font-size: 1.2rem; }
.announcement-view-content h3 { font-size: 1.1rem; }

.announcement-view-content p {
  margin: 1rem 0;
}

.announcement-view-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.announcement-view-content li {
  margin: 0.5rem 0;
}

.announcement-view-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.announcement-view-content th,
.announcement-view-content td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
}

.announcement-view-content th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--cream);
}

.announcement-view-content strong {
  color: var(--cream);
}

/* 公章效果 */
.announcement-seal {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border);
  text-align: center;
}

.seal-stamp {
  display: inline-flex;
  width: 120px;
  height: 120px;
  border: 3px solid #c41e3a;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #c41e3a;
  font-weight: bold;
  text-align: center;
  position: relative;
  margin-bottom: 0.5rem;
}

.seal-stamp::before {
  content: '';
  position: absolute;
  border: 2px solid #c41e3a;
  border-radius: 50%;
  width: 100px;
  height: 100px;
}

.seal-stamp::after {
  content: '★';
  position: absolute;
  top: 8px;
  font-size: 1.2rem;
  color: #c41e3a;
}

.seal-text {
  font-size: 0.8rem;
  color: #c41e3a;
  font-weight: 600;
}

/* 公章容器（支持拖拽）*/
.seal-container {
  position: relative;
  min-height: 200px;
}

/* 可拖拽公章 */
.seal-draggable {
  position: absolute;
  cursor: grab;
  transition: box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
}

.seal-draggable:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.seal-draggable:active {
  cursor: grabbing;
}

/* 圆形公章 */
.seal-circle {
  border: 3px solid;
  border-radius: 50%;
}

.seal-circle::before {
  content: '';
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 50%;
  width: 85%;
  height: 85%;
}

.seal-circle::after {
  content: '★';
  position: absolute;
  top: 5%;
  font-size: 15%;
}

/* 方形公章 */
.seal-square {
  border: 3px solid;
  border-radius: 8px;
}

.seal-square::before {
  content: '';
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 4px;
  width: 75%;
  height: 75%;
}

/* 公章编辑按钮 */
.seal-edit-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-draggable:hover .seal-edit-btn {
  opacity: 1;
}

/* 公章样式选择器 */
.seal-style-picker {
  display: flex;
  gap: 1rem;
}

.seal-style-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
}

.seal-style-btn.active {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
}

.seal-preview {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* 公章预览容器 */
.seal-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--surface2);
  border-radius: 8px;
  min-height: 180px;
  cursor: grab;
  user-select: none;
}

.seal-preview-container:active {
  cursor: grabbing;
}

.seal-circle-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-range {
  width: 100%;
  margin: 5px 0;
}

/* Markdown表格样式 */
.markdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.markdown-table th,
.markdown-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.markdown-table th {
  background-color: var(--surface2);
  font-weight: 600;
}

.markdown-table tr:nth-child(even) {
  background-color: var(--surface1);
}

.markdown-table tr:hover {
  background-color: var(--hover);
}

/* 分类管理样式 */
.category-list {
  margin-top: 1rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.category-icon {
  font-size: 1.2rem;
  margin-right: 0.75rem;
}

.category-name {
  flex: 1;
  font-weight: 500;
  color: var(--cream);
}

.category-id {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 0.75rem;
  font-family: monospace;
}

/* 输入组样式 */
.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group .form-control {
  flex: 1;
}

/* 图标选择器样式 */
.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--surface2);
  border-radius: 6px;
}

.icon-picker-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-picker-item:hover {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  transform: scale(1.1);
}

.icon-picker-item.selected {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

/* 公告模态框宽度 */
.modal-announcement {
  max-width: 800px;
  max-height: 90vh;
}

.modal-category {
  max-width: 600px;
}

/* 编辑器区域 */
.editor-toolbar {
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 4px;
  background: var(--surface);
}

.editor-content {
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: 0 0 4px 4px;
  background: var(--surface);
}

/* 表单操作区 */
.form-actions {
  margin-top: 1rem;
}

/* 分隔线 */
.hr-divider {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border);
}


.announcement-signature {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  margin-top: 1.5rem;
  padding-right: 2rem;
}

.signature-org {
  font-weight: bold;
  margin-right: 1rem;
}

.signature-date {
  font-size: 0.95rem;
}

/* ── 时间追踪页面样式 ── */

/* 里程碑时间线 */
.timeline-container {
  position: relative;
  padding: 1rem;
}

.timeline-track {
  position: relative;
  height: 60px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: visible;
}

.timeline-progress-bar {
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  background: var(--border);
  transform: translateY(-50%);
  border-radius: 2px;
}

.timeline-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: progress 1s ease-out;
}

@keyframes progress {
  from { width: 0; }
  to { width: var(--progress-width, 50%); }
}

.timeline-milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.timeline-milestone:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.milestone-icon {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s;
}

.timeline-milestone.completed .milestone-icon {
  background: var(--accent);
  border-color: var(--accent);
}

.milestone-info {
  text-align: center;
  min-width: 80px;
}

.milestone-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
}

.milestone-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.milestone-tasks {
  font-size: 0.65rem;
  color: var(--accent);
  margin-top: 0.2rem;
}

.milestone-reward {
  font-size: 0.65rem;
  color: var(--warning);
  margin-top: 0.2rem;
}

.milestone-progress {
  font-size: 0.65rem;
  color: var(--accent);
  margin-top: 0.2rem;
}

.timeline-progress-info {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

/* 甘特图样式 */
.gantt-chart {
  min-width: 600px;
  position: relative;
}

.gantt-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.gantt-milestone-row {
  position: relative;
  height: 30px;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

.gantt-milestone-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  cursor: pointer;
}

.gantt-milestone-icon {
  font-size: 1rem;
}

.gantt-milestone-label {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-label {
  flex-shrink: 0;
  width: 120px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream);
}

.gantt-label-stage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stage-expand {
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s;
}

.stage-expand:hover {
  color: var(--accent);
}

.gantt-label-task {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--muted);
}

.gantt-date {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.gantt-row {
  display: flex;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.gantt-row-task {
  padding-left: 1rem;
  background: rgba(0,0,0,0.02);
}

.gantt-bar-wrap {
  flex: 1;
  position: relative;
  height: 24px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}

.gantt-bar {
  position: absolute;
  top: 2px;
  height: calc(100% - 4px);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  transition: all 0.2s;
}

.gantt-bar-task {
  cursor: pointer;
}

.gantt-bar-task:hover {
  opacity: 0.8;
}

.gantt-stage-tasks {
  display: none;
}

/* 里程碑操作菜单 */
.milestone-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.milestone-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  min-width: 280px;
}

.milestone-menu h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--cream);
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.menu-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--cream);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.menu-btn:hover {
  background: var(--surface2);
}

.menu-btn-cancel {
  color: var(--muted);
}

.menu-btn-cancel:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* 关联任务选择器 */
.related-tasks-container {
  margin-bottom: 0.5rem;
}

.related-tasks-empty {
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.related-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  color: var(--cream);
  font-size: 0.85rem;
}

.related-task-select {
  width: 100%;
  margin-bottom: 0.5rem;
}

/* ── 项目仪表盘增强样式 ── */
.dashboard-global-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-global-stats .stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.dashboard-global-stats .stat-icon {
  font-size: 1.8rem;
}

.dashboard-global-stats .stat-info {
  display: flex;
  flex-direction: column;
}

.dashboard-global-stats .stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}

.dashboard-global-stats .stat-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.dashboard-quick-card {
  flex: 0 0 auto;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.dashboard-quick-actions .btn {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}

.dashboard-projects-card {
  flex: 1;
  min-width: 0;
}

.dg-project-progress-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.dg-project-progress-item:last-child {
  border-bottom: none;
}

.dg-project-progress-item:hover {
  background: var(--surface2);
  margin: 0 -1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.dg-project-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.dg-project-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.dg-project-pct {
  font-size: 0.85rem;
  font-weight: 600;
}

.dg-project-progress-bar {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.dg-project-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

@media (max-width: 1200px) {
  .dashboard-global-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-global-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-overview-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dashboard-global-stats {
    grid-template-columns: 1fr;
  }
}

/* ── 数据概览页面样式 ── */
.do-page-content {
  max-width: 1400px;
}

.do-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.do-stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
  position: relative;
}

.do-stat-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.do-stat-icon {
  font-size: 2rem;
  line-height: 1;
}

.do-stat-info {
  flex: 1;
  min-width: 0;
}

.do-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.do-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.do-stat-arrow {
  font-size: 1.5rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s;
}

.do-stat-card:hover .do-stat-arrow {
  opacity: 1;
}

.do-main-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.do-storage-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.do-storage-visual {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.do-storage-circle {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.do-storage-svg {
  width: 100%;
  height: 100%;
}

.do-storage-svg circle {
  transition: stroke-dashoffset 0.5s ease;
}

.do-storage-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.do-storage-details {
  flex: 1;
}

.do-storage-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.do-storage-row:last-child {
  border-bottom: none;
}

.do-storage-row span:last-child {
  color: var(--text);
  font-weight: 500;
}

.do-storage-bar-wrap {
  margin: 0.5rem 0;
}

.do-storage-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}

.do-storage-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.do-storage-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.do-quick-card .card-body {
  padding: 0.75rem;
}

.do-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.do-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 0.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.do-quick-btn:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.do-quick-icon {
  font-size: 1.4rem;
}

.do-backup-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.do-last-backup {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: normal;
}

.do-backup-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.do-backup-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
  font-size: 0.85rem;
}

.do-backup-index {
  color: var(--muted);
  font-weight: 600;
  min-width: 24px;
}

.do-backup-time {
  flex: 1;
  color: var(--text);
}

.do-backup-size {
  color: var(--muted);
  min-width: 70px;
  text-align: right;
}

.do-backup-empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1200px) {
  .do-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .do-main-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .do-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .do-quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .do-stats-grid {
    grid-template-columns: 1fr;
  }

  .do-quick-grid {
  .do-quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   AI 中心页面样式
═══════════════════════════════════════════════════════════════ */
.ai-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 1.5rem;
}

.ai-center-layout {
  display: flex;
  height: calc(100vh - 130px);
  gap: 1.25rem;
  background: var(--bg);
  padding: 0.5rem;
}

.ai-center-sidebar {
  width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-conversation-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-conversation-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.ai-conv-group-title {
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.5rem 0.5rem 0.25rem;
  text-transform: uppercase;
  font-weight: 600;
}

.ai-conv-item {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  position: relative;
}

.ai-conv-item:hover {
  background: var(--surface2);
}

.ai-conv-item.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.ai-conv-title {
  flex: 1;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-conv-time {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.ai-conv-delete {
  display: none;
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
}

.ai-conv-item:hover .ai-conv-delete {
  display: block;
}

.ai-conv-delete:hover {
  color: var(--danger);
}

.ai-conv-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  font-size: 0.85rem;
}

.ai-conversation-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.ai-center-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem 2rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

.ai-welcome.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ai-avatar {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ai-welcome-text {
  flex: 1;
}

.ai-welcome-text p {
  margin: 0.35rem 0;
  color: var(--text);
  line-height: 1.7;
}

.ai-welcome-text p:first-child {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.message {
  display: flex;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.message-user {
  flex-direction: row-reverse;
}

.message-assistant .message-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.message-user .message-content {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-top-right-radius: 4px;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.message-user .message-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.message-content {
  max-width: 65%;
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.message.typing .message-content {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
}

.quick-action {
  padding: 0.5rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s;
}

.quick-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.ai-input-area {
  display: flex;
  gap: 0.875rem;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.ai-input-area .form-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border-radius: 28px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.ai-input-area .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.ai-input-area .btn {
  padding: 0.875rem 1.5rem;
  border-radius: 28px;
  font-weight: 500;
}

/* 语音按钮 */
.ai-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.voice-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.voice-btn:hover {
  background: var(--surface3);
  border-color: var(--primary);
}

.voice-btn.recording {
  background: var(--danger);
  border-color: var(--danger);
  animation: voice-pulse 1.5s infinite;
}

@keyframes voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voice-icon {
  font-size: 1.1rem;
}

.voice-status {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  display: none;
  border: 2px solid var(--surface);
}

.voice-btn.recording .voice-status {
  display: block;
  animation: voice-blink 1s infinite;
}

@keyframes voice-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 语音预览区域 */
.voice-preview {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.voice-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.voice-close {
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}

.voice-close:hover {
  background: var(--surface3);
}

.voice-preview-content {
  min-height: 40px;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--cream);
}

/* 语音波形动画 */
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
  margin-top: 0.5rem;
}

.voice-bar {
  width: 3px;
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  animation: voice-wave 0.5s ease-in-out infinite alternate;
}

.voice-bar:nth-child(1) { animation-delay: 0s; height: 40%; }
.voice-bar:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.voice-bar:nth-child(3) { animation-delay: 0.2s; height: 50%; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.voice-bar:nth-child(5) { animation-delay: 0.4s; height: 60%; }

@keyframes voice-wave {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

.ai-center-settings-panel {
  width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ai-center-settings-panel.visible {
  width: 380px;
}

.ai-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.ai-settings-header h3 {
  margin: 0;
  font-size: 1rem;
}

.ai-settings-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.ai-settings-close:hover {
  color: var(--text);
}

.ai-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ai-st-tab {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  transition: all 0.2s;
}

.ai-st-tab:hover {
  background: var(--surface2);
  color: var(--text);
}

.ai-st-tab.active {
  background: var(--primary);
  color: white;
}

.ai-settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.ai-mode-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.ai-mode-dot-sm.online {
  background: var(--green);
}

.ai-settings-content .card {
  margin-bottom: 0.75rem;
}

.ai-settings-content .card-header {
  padding: 0.6rem 0.75rem;
}

.ai-settings-content .card-body {
  padding: 0.75rem;
}

.ai-preset-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.ai-preset-item:hover {
  background: var(--surface2);
}

.ai-prompt-item,
.ai-intent-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--surface2);
}

.ai-prompt-item.disabled,
.ai-intent-item.disabled {
  opacity: 0.5;
}

.ai-prompt-name,
.ai-intent-name {
  flex: 1;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-intent-kw {
  flex: 1;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-intent-arrow {
  color: var(--muted);
  font-size: 0.8rem;
}

.ai-stat-item {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.ai-empty-hint {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
  font-size: 0.85rem;
}

@media (max-width: 1024px) {
  .ai-center-sidebar {
    width: 240px;
  }
  .ai-search-input {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .ai-toolbar {
    margin-left: 0;
    margin-top: 0.75rem;
    flex-wrap: wrap;
  }
  .ai-search-input {
    width: 100%;
    max-width: 250px;
  }
  .ai-center-layout {
    flex-direction: column;
  }
  .ai-center-sidebar {
    width: 100%;
    max-height: 300px;
  }
  .ai-center-settings-panel.visible {
    position: fixed;
    right: 0;
    top: 60px;
    bottom: 0;
    width: 100%;
    max-width: 380px;
    border-radius: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   协作文档页面样式
═══════════════════════════════════════════════════════════════ */
.collab-container {
  height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.collab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  height: 50px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h1 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collab-header .btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.collab-header .btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
}

.collab-header .btn-secondary:hover {
  background: rgba(255,255,255,0.3);
}

.collab-header .btn-primary {
  background: rgba(255,255,255,0.95);
  color: #667eea;
}

.collab-header .btn-primary:hover {
  background: white;
}

.collab-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.collab-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid #e4e7ed;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-section {
  padding: 14px;
  border-bottom: 1px solid #e4e7ed;
}

.sidebar-section h3 {
  font-size: 13px;
  color: #606266;
  margin-bottom: 10px;
}

.online-users {
  list-style: none;
  padding: 0;
  margin: 0;
}

.online-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.online-user:hover {
  background: #e4e7ed;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 500;
}

.user-name {
  font-size: 12px;
  color: #303133;
}

.version-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.version-item {
  padding: 6px;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 3px;
  transition: background 0.2s;
}

.version-item:hover {
  background: #e4e7ed;
}

.version-info {
  font-size: 11px;
  color: #909399;
}

.version-time {
  font-size: 10px;
  color: #c0c4cc;
  margin-top: 2px;
}

.collab-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  min-width: 0;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid #e4e7ed;
  background: #fff;
}

.toolbar-left, .toolbar-center, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  background: #e4e7ed;
  margin: 0 4px;
}

.toolbar-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  background: transparent;
  color: #606266;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover {
  background: #f0f0f0;
}

.editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.editor-content textarea {
  width: 100%;
  min-height: calc(100% - 40px);
  padding: 12px;
  border: none;
  font-size: 14px;
  line-height: 1.8;
  resize: none;
  background: transparent;
  font-family: inherit;
  color: #303133;
}

.editor-content textarea:focus {
  outline: none;
}

.editor-content textarea::placeholder {
  color: #c0c4cc;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #e4e7ed;
  background: #f5f7fa;
}

.footer-left, .footer-center, .footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-left span {
  font-size: 12px;
  color: #606266;
}

.footer-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  background: #fff;
  color: #606266;
  border: 1px solid #e4e7ed;
  transition: all 0.2s;
}

.footer-btn:hover {
  background: #e4e7ed;
}

.collab-comments {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border-left: 1px solid #e4e7ed;
  display: flex;
  flex-direction: column;
}

.comments-header {
  padding: 12px 14px;
  border-bottom: 1px solid #e4e7ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comments-header span {
  font-size: 13px;
  color: #606266;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.comments-input {
  padding: 10px;
  border-top: 1px solid #e4e7ed;
}

.comment-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  font-size: 13px;
  resize: none;
  min-height: 40px;
  box-sizing: border-box;
}

.comment-input:focus {
  outline: none;
  border-color: #667eea;
}

/* ════════════ 系统集成页面样式 ════════════ */
.system-integration-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--surface1);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--surface3);
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
}

.page-nav-tabs {
  display: flex;
  gap: 6px;
  flex: 1;
  margin: 0 24px;
  justify-content: flex-start;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  background: var(--surface3);
  color: var(--text-primary);
  border-color: var(--accent);
}

.nav-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.page-actions {
  display: flex;
  gap: 10px;
}

.page-actions .btn {
  padding: 10px 18px;
  font-size: 13px;
}

.integration-content {
  flex: 1;
  background: var(--surface1);
  border-radius: 12px;
  border: 1px solid var(--surface3);
  min-height: 500px;
}

/* 内容区容器 */
.tab-content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

/* 卡片样式 */
.section-card {
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s ease;
}

.section-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface1);
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 8px;
  font-size: 1.25rem;
}

.card-title-area {
  flex: 1;
}

.card-title-area h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-title-area p {
  margin: 0.25rem 0 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.card-body {
  padding: 1.25rem;
}

/* 表单样式 */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.checkbox-group label:hover {
  background: var(--surface3);
  border-color: var(--accent);
}

.checkbox-group input {
  width: auto;
  margin: 0;
}

/* 按钮组 */
.form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.form-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.form-actions .btn-primary {
  background: var(--accent);
  color: white;
}

.form-actions .btn-primary:hover {
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.form-actions .btn-secondary {
  background: var(--surface3);
  color: var(--text);
}

.form-actions .btn-secondary:hover {
  background: var(--border);
}

/* 小日志列表 */
.log-list.small .log-item {
  padding: 8px 12px;
  font-size: 12px;
}

.log-list.small .log-time {
  min-width: 60px;
  font-size: 11px;
}

/* 选项卡面板 - 强制隐藏所有面板 */
.system-integration-page .integration-content > div.tab-panel {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* 活动面板显示 */
.system-integration-page .integration-content > div.tab-panel.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  pointer-events: auto !important;
}

.tab-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--surface3);
}

.tab-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
}

/* 系统集成表格样式 */
.integration-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface1);
  border-radius: 8px;
  overflow: hidden;
}

.integration-table thead {
  background: var(--surface3);
}

.integration-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.integration-table td {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.integration-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.integration-row:hover {
  background: var(--surface2);
}

.integration-row.active {
  background: var(--surface3);
}

/* 状态点 */
.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-dot.status-green {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.status-dot.status-yellow {
  background: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.status-dot.status-gray {
  background: #9ca3af;
}

.status-dot.status-blue {
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

/* 集成图标 */
.integration-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 小按钮 */
.btn-small {
  padding: 4px 12px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface3);
  color: var(--text);
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* 侧边面板 */
.integration-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 480px;
  background: var(--surface1);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.integration-panel.hidden {
  transform: translateX(100%);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.panel-close:hover {
  background: var(--surface3);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 面板内的内容调整 */
.panel-content .section-card {
  background: var(--surface2);
}

.tab-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--surface3);
  color: var(--muted);
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.tab-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  background: var(--surface2);
  padding: 16px;
  border-radius: 8px;
}

.form-section h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--surface3);
}

.integration-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.integration-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: 8px;
}

.integration-item-icon {
  font-size: 24px;
}

.integration-item-info {
  flex: 1;
}

.integration-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
}

.integration-item-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 6px;
}

.log-icon {
  font-size: 14px;
}

.log-time {
  font-size: 12px;
  color: var(--muted);
  min-width: 70px;
}

.log-message {
  font-size: 13px;
  color: var(--cream);
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 14px;
}
