/* ============================================
   超域人脉 · 全局共享样式
   超域 · 人脉管理系统
   ============================================ */

/* ===== CSS 变量（亮/暗主题） ===== */
[data-theme="light"] {
  --bg: #f0f5ff;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f5f8ff;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --blue-border: #bfdbfe;
  --blue-deep: #1d4ed8;
  --sky: #0ea5e9;
  --gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --border-h: #93c5fd;
  --shadow: 0 1px 3px rgba(37,99,235,0.08), 0 4px 16px rgba(37,99,235,0.06);
  --shadow-h: 0 4px 20px rgba(37,99,235,0.15);
  --bg-orb: radial-gradient(circle at 20% 20%, rgba(37,99,235,0.05) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(14,165,233,0.05) 0%, transparent 50%);
  --error: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --hot-text: #dc2626;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-white: #161b22;
  --bg-card: #161b22;
  --bg-hover: #1c2128;
  --blue: #58a6ff;
  --blue-light: #79c0ff;
  --blue-pale: rgba(88,166,255,0.1);
  --blue-border: rgba(88,166,255,0.25);
  --blue-deep: #79c0ff;
  --sky: #56d4dd;
  --gradient: linear-gradient(135deg, #58a6ff 0%, #56d4dd 100%);
  --text: #e6edf3;
  --text-2: #8b949e;
  --text-3: #484f58;
  --border: #21262d;
  --border-h: #3b4754;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.25);
  --shadow-h: 0 4px 24px rgba(0,0,0,0.4);
  --bg-orb: radial-gradient(circle at 20% 20%, rgba(88,166,255,0.06) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(86,212,221,0.04) 0%, transparent 50%);
  --error: #f85149;
  --success: #3fb950;
  --warning: #d29922;
  --hot-text: #f85149;
}

/* ===== 重置 & 基础 ===== */
* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}

/* ===== 布局 ===== */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ===== 导航 ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-white);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fadeDown 0.6s ease;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow 0.3s;
}
[data-theme="light"] .nav-logo-icon { box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
[data-theme="dark"] .nav-logo-icon { box-shadow: 0 4px 12px rgba(88,166,255,0.2); }

.nav-logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px; color: var(--text);
  transition: color 0.3s;
}
.nav-logo-text span { color: var(--blue); }

.nav-center { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav-pill {
  padding: 7px 16px; border-radius: 8px; font-size: 13px;
  text-decoration: none; font-weight: 500; color: var(--text-2);
  transition: all 0.2s; white-space: nowrap;
}
.nav-pill:hover { background: var(--bg-hover); color: var(--text); }
.nav-pill.active { background: var(--blue-pale); color: var(--blue); }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.login-btn {
  padding: 7px 16px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--blue); color: #fff; text-decoration: none;
  border: 1px solid var(--blue); transition: all 0.2s; white-space: nowrap;
  cursor: pointer;
}
.login-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

/* 登录后状态 - 头像 + 个人中心 */
.user-avatar-link {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  text-decoration: none; color: var(--text-1);
  font-size: 13px; font-weight: 500;
  transition: all 0.2s; white-space: nowrap;
}
.user-avatar-link:hover { background: var(--bg-3); border-color: var(--blue); }
.user-avatar-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}

/* Tab bar */
.tab-bar {
  display: flex; gap: 6px; background: var(--bg-card);
  padding: 5px; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow); width: fit-content;
}
.tab-item {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none; background: transparent;
  color: var(--text-2);
}
.tab-item:hover { color: var(--blue); }
.tab-item.active { background: var(--gradient); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.2); }

.user-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px;
  border-radius: 100px; background: var(--blue-pale); border: 1px solid var(--blue-border);
  text-decoration: none; transition: all 0.2s;
}
.user-chip:hover { background: var(--blue-pale); border-color: var(--blue); }
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* Heat badge */
.heat-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; border: 1px solid; white-space: nowrap;
}
.heat-badge.hot  { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.heat-badge.warm { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.heat-badge.cool { background: #f8fafc; color: #64748b; border-color: #cbd5e1; }

[data-theme="dark"] .heat-badge.hot  { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
[data-theme="dark"] .heat-badge.warm { background: #451a03; color: #fcd34d; border-color: #78350f; }
[data-theme="dark"] .heat-badge.cool { background: #0f172a; color: #94a3b8; border-color: #1e293b; }
  font-size: 11px; font-weight: 700;
}
.user-name { font-size: 12px; font-weight: 600; color: var(--blue); }

.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  position: relative; color: var(--text-2);
}
.icon-btn:hover { border-color: var(--border-h); background: var(--bg-hover); }
.icon-btn:hover svg { color: var(--blue); }
.icon-btn svg { transition: color 0.2s; }
.badge-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--error); border: 1.5px solid var(--bg-white);
}

/* Theme sun/moon toggle */
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* ===== 页面标题区 ===== */
.page-header { margin-bottom: 24px; animation: fadeUp 0.6s ease 0.05s both; }
.page-title { font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 400; color: var(--text); margin-bottom: 4px; }
.page-subtitle { font-size: 13px; color: var(--text-2); }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
  transition: all 0.25s;
}
.card:hover { box-shadow: var(--shadow-h); border-color: var(--border-h); }
.card-link { text-decoration: none; display: block; color: inherit; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 10px; font-size: 13px;
  font-weight: 500; cursor: pointer; border: none;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
  text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 3px 12px rgba(37,99,235,0.25); }
.btn-primary:hover { background: var(--blue-deep); box-shadow: 0 5px 16px rgba(37,99,235,0.3); }
[data-theme="dark"] .btn-primary { box-shadow: 0 3px 12px rgba(88,166,255,0.2); }
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 5px 16px rgba(88,166,255,0.25); }

.btn-secondary { background: var(--bg-white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-h); color: var(--blue); background: var(--blue-pale); }

.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-h); }

/* ===== 搜索框 ===== */
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: 100px; padding: 8px 16px;
  transition: all 0.2s; box-shadow: var(--shadow);
}
.search-wrap:focus-within { border-color: var(--blue); }
[data-theme="light"] .search-wrap:focus-within { box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
[data-theme="dark"] .search-wrap:focus-within { box-shadow: 0 0 0 3px rgba(88,166,255,0.1); }
.search-wrap input { background: none; border: none; outline: none; color: var(--text); font-size: 13px; width: 100%; font-family: 'Inter', sans-serif; }
.search-wrap input::placeholder { color: var(--text-3); }
.search-wrap svg { color: var(--text-3); flex-shrink: 0; }

/* ===== 下拉选择 ===== */
.tb-select {
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg-white); color: var(--text); font-size: 13px;
  outline: none; font-family: 'Inter', sans-serif; cursor: pointer;
  transition: all 0.2s; box-shadow: var(--shadow);
}
.tb-select:focus { border-color: var(--blue); }
.tb-select option { background: var(--bg-white); }

/* ===== 标签筛选 ===== */
.filter-row { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; animation: fadeUp 0.6s ease 0.15s both; }
.filter-tab {
  padding: 6px 14px; border-radius: 100px; font-size: 12px; cursor: pointer;
  transition: all 0.2s; border: 1px solid var(--border); color: var(--text-2);
  background: var(--bg-white); font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow);
}
.filter-tab:hover { border-color: var(--border-h); color: var(--blue); }
.filter-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 4px 12px rgba(37,99,235,0.2); }
[data-theme="dark"] .filter-tab.active { box-shadow: 0 4px 12px rgba(88,166,255,0.2); }

/* ===== 视图切换 ===== */
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.view-btn {
  padding: 7px 12px; background: var(--bg-white); border: none;
  cursor: pointer; transition: all 0.2s; color: var(--text-3);
  display: flex; align-items: center;
}
.view-btn:hover { background: var(--bg-hover); color: var(--text); }
.view-btn.active { background: var(--blue-pale); color: var(--blue); }
.view-btn + .view-btn { border-left: 1px solid var(--border); }

/* ===== 联系人卡片（网格） ===== */
.c-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
  text-decoration: none; display: block; transition: all 0.25s;
  position: relative; overflow: hidden;
}
.c-card { box-shadow: var(--shadow); }
.c-card:hover { box-shadow: var(--shadow-h); border-color: var(--border-h); transform: translateY(-2px); }
.c-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.c-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-pale); border: 2px solid var(--blue-border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif; font-size: 17px; color: var(--blue);
  font-weight: 700; flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
}
.c-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.c-alias { font-size: 12px; color: var(--blue); font-weight: 500; }
.c-divider { height: 1px; background: var(--border); margin-bottom: 12px; transition: background 0.3s; }
.c-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.c-meta-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.c-meta-label { color: var(--text-3); flex-shrink: 0; width: 28px; }
.c-meta-val { color: var(--text-2); line-height: 1.4; }
.c-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.c-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 100px;
  background: var(--blue-pale); color: var(--blue); border: 1px solid var(--blue-border);
}
.c-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.c-date { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--text-3); }
.c-arrow { color: var(--text-3); font-size: 16px; transition: all 0.25s; }
.c-card:hover .c-arrow { color: var(--blue); transform: translateX(3px); }

/* ===== 联系人卡片·紧凑版（资源地图用） ===== */
.c-card-compact {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; box-shadow: var(--shadow);
  text-decoration: none; display: flex; flex-direction: column; gap: 12px;
  transition: all 0.25s; position: relative; overflow: hidden;
}
.c-card-compact:hover { box-shadow: var(--shadow-h); border-color: var(--border-h); transform: translateY(-2px); }
.c-card-compact:hover .c-arrow { color: var(--blue); transform: translateX(3px); }
.c-card-compact .c-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.c-card-compact .c-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-pale); border: 2px solid var(--blue-border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif; font-size: 15px; color: var(--blue);
  font-weight: 700; flex-shrink: 0; transition: background 0.3s, border-color 0.3s;
}
.c-card-compact .c-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.c-card-compact .c-alias { font-size: 12px; color: var(--blue); font-weight: 500; }
.c-card-compact .c-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }
.c-card-compact .c-meta-row { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; }
.c-card-compact .c-meta-label { color: var(--text-3); flex-shrink: 0; width: 24px; }
.c-card-compact .c-meta-val { color: var(--text-2); line-height: 1.4; }
.c-card-compact .c-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.c-card-compact .c-tag { font-size: 10px; padding: 2px 8px; border-radius: 100px; background: var(--blue-pale); color: var(--blue); border: 1px solid var(--blue-border); }
.c-card-compact .c-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.c-card-compact .c-date { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--text-3); }
.c-card-compact .c-arrow { color: var(--text-3); font-size: 14px; transition: all 0.25s; }

/* ===== 联系人行（列表视图） ===== */
.l-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow);
  text-decoration: none; display: flex; align-items: center; gap: 14px;
  transition: all 0.2s;
}
.l-card:hover { box-shadow: var(--shadow-h); border-color: var(--border-h); transform: translateX(3px); }
.l-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-pale); border: 2px solid var(--blue-border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif; font-size: 15px; color: var(--blue);
  font-weight: 700; flex-shrink: 0;
}
.l-body { flex: 1; min-width: 0; }
.l-name { font-size: 14px; font-weight: 600; color: var(--text); }
.l-role { font-size: 12px; color: var(--blue); margin-top: 1px; }
.l-company { font-size: 12px; color: var(--text-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-tags { display: flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.l-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 100px;
  background: var(--blue-pale); color: var(--blue); border: 1px solid var(--blue-border);
}
.l-arrow { color: var(--text-3); font-size: 16px; flex-shrink: 0; transition: all 0.2s; }
.l-card:hover .l-arrow { color: var(--blue); }

/* ===== 统计卡 ===== */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
  transition: all 0.25s;
}
.stat-card:hover { box-shadow: var(--shadow-h); border-color: var(--border-h); transform: translateY(-2px); }
.stat-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stat-label svg { color: var(--blue); }
.stat-value { font-family: 'Space Mono', monospace; font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stat-sub { font-size: 11px; color: var(--text-3); }

/* ===== 区块标题 ===== */
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-title { font-family: 'Noto Serif SC', serif; font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-title svg { color: var(--blue); }
.section-count { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-3); padding: 3px 10px; border-radius: 100px; background: var(--blue-pale); border: 1px solid var(--blue-border); }
.section-line { flex: 1; height: 1px; background: var(--border); transition: background 0.3s; }
.section-more { font-size: 13px; color: var(--blue); text-decoration: none; margin-left: auto; white-space: nowrap; transition: opacity 0.2s; }
.section-more:hover { opacity: 0.75; }

/* ===== 分页 ===== */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pg-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-white); color: var(--text); font-size: 12px;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.pg-btn:hover { border-color: var(--border-h); color: var(--blue); }
.pg-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 3px 10px rgba(37,99,235,0.2); }
[data-theme="dark"] .pg-btn.active { box-shadow: 0 3px 10px rgba(88,166,255,0.2); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.4; }
.empty-text { font-size: 14px; }

/* ===== 页脚 ===== */
footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; transition: border-color 0.3s; }
footer p { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-3); letter-spacing: 0.08em; }

/* ===== 动画 ===== */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 移动端菜单（默认隐藏） ===== */
.hamburger-btn { display: none; }
.mobile-menu {
  display: none;
}
.mobile-menu-overlay {
  display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  nav { padding: 10px 16px; gap: 8px; }
  .nav-center, .idx-nav-center { display: none; }
  .wrap { padding: 24px 16px; }
  .page-wrap { padding: 20px 16px; }
  
  /* 汉堡菜单按钮 */
  .hamburger-btn {
    display: flex !important;
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
  }
  .hamburger-btn:hover {
    border-color: var(--border-h);
    background: var(--bg-hover);
  }
  .hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
  }
  .hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: all .3s cubic-bezier(0.16,1,0.3,1);
  }
  .hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.5);
  }
  .hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  
  /* 移动端下拉菜单 */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 999;
    max-height: 0;
    opacity: 0;
    transition: all .3s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
  }
  .mobile-menu.open {
    max-height: 500px;
    opacity: 1;
  }
  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 8px;
  }
  .mobile-menu-links a {
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all .2s;
    margin-bottom: 4px;
  }
  .mobile-menu-links a:hover {
    background: var(--bg-hover);
    color: var(--blue);
  }
  .mobile-menu-links a.active {
    background: var(--blue-pale);
    color: var(--blue);
  }
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  .mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 600px) {
  .wrap { padding: 16px 12px; }
  .page-wrap { padding: 16px 12px; }
}

/* ===== 全局通知组件样式（notif.js 共享） ===== */
.notif-toast-incoming {
  position: fixed; top: -80px; right: 20px;
  display: flex; align-items: center; gap: 10px;
  max-width: 380px; padding: 14px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 10000; transition: top 0.4s cubic-bezier(0.16,1,0.3,1);
}
.notif-toast-incoming.show { top: 70px; }
.notif-toast-icon { font-size: 24px; flex-shrink: 0; }
.notif-toast-body { flex: 1; min-width: 0; }
.notif-toast-body strong {
  display: block; font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-toast-body small {
  display: block; font-size: 11px; color: var(--text-3);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-toast-close {
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--text-3);
  font-size: 12px; cursor: pointer; flex-shrink: 0;
  transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.notif-toast-close:hover { background: var(--error); color: #fff; }

/* ===== 通知类型徽章（弹窗内使用） ===== */
.notif-type-badge { font-weight: 600; }

/* ===== 通知中心页面（profile #notifications） ===== */
.notif-center-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.notif-center-title { font-size: 18px; font-weight: 700; }
.notif-center-actions { display: flex; gap: 8px; }

/* 筛选栏 */
.notif-filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.notif-filter-btn {
  padding: 7px 16px; border-radius: 100px;
  border: 1px solid var(--border); background: transparent;
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-2); transition: all 0.2s;
}
.notif-filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.notif-filter-btn.active {
  background: var(--blue); color: #fff; border-color: var(--blue);
}
.notif-filter-btn.active[data-type] { background: var(--btn-color, var(--blue)); }

/* 通知弹窗 */
.notif-popup {
  position: absolute; top: 48px; right: 0;
  width: 340px; max-width: 90vw; max-height: 420px;
  background: var(--card-bg); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12); z-index: 1000;
  overflow-y: auto; border: 1px solid var(--border-1);
}
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border-1);
  font-weight: 700; font-size: 14px;
}
.notif-more { font-size: 12px; color: var(--blue); cursor: pointer; font-weight: 500; }
.notif-overlay { position: fixed; inset: 0; z-index: 999; }

/* 通知列表项（增强版） */
.notif-list-item {
  display: flex; gap: 14px; padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
  position: relative;
}
.notif-list-item:last-child { border-bottom: none; }
.notif-list-item:hover { background: var(--bg); }
.notif-list-item.unread {
  background: rgba(37,99,235,0.04);
  border-left: 3px solid var(--blue);
}
.notif-list-item.unread::before {
  content: '';
  position: absolute; left: 6px; top: 22px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--error);
}

/* 左侧图标区 */
.notif-item-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: var(--item-bg, var(--bg));
}
.notif-item-icon.match    { --item-bg: rgba(37,99,235,0.1); }
.notif-item-icon.benefit  { --item-bg: rgba(249,115,22,0.1); }
.notif-item-icon.activity { --item-bg: rgba(22,163,74,0.1); }
.notif-item-icon.org_post { --item-bg: rgba(124,58,237,0.1); }
.notif-item-icon.system   { --item-bg: rgba(107,114,128,0.1); }
.notif-item-icon.claim_used{--item-bg: rgba(5,150,105,0.1); }

/* 中间内容区 */
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.5; margin-bottom: 4px;
}
.notif-item-desc {
  font-size: 13px; color: var(--text-2);
  line-height: 1.5; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; font-size: 11px; color: var(--text-3);
}
.notif-item-type-tag {
  padding: 1px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
}
.notif-item-type-tag.match     { background: rgba(37,99,235,0.1); color: #2563eb; }
.notif-item-type-tag.benefit   { background: rgba(249,115,22,0.1); color: #f97316; }
.notif-item-type-tag.activity  { background: rgba(22,163,74,0.1); color: #16a34a; }
.notif-item-type-tag.org_post  { background: rgba(124,58,237,0.1); color: #7c3aed; }
.notif-item-type-tag.system    { background: rgba(107,114,128,0.1); color: #6b7280; }
.notif-item-type-tag.claim_used{background: rgba(5,150,105,0.1); color: #059669; }

/* 右侧时间/操作区 */
.notif-item-right {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
  flex-shrink: 0; min-width: 60px;
}
.notif-item-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.notif-item-action {
  font-size: 11px; color: var(--blue);
  cursor: pointer; font-weight: 600;
  opacity: 0; transition: opacity 0.2s;
}
.notif-list-item:hover .notif-item-action { opacity: 1; }
.notif-item-action:hover { text-decoration: underline; }

/* 分页 */
.notif-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.notif-page-btn {
  padding: 7px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-2); transition: all 0.2s;
}
.notif-page-btn:hover:not(:disabled) {
  border-color: var(--blue); color: var(--blue);
}
.notif-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.notif-page-info { font-size: 13px; color: var(--text-3); }

/* 空状态增强 */
.notif-empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-3);
}
.notif-empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.35; }
.notif-empty-state .empty-text { font-size: 15px; margin-bottom: 6px; }
.notif-empty-state .empty-hint { font-size: 13px; color: var(--text-3); }

/* 暗色适配 */
[data-theme="dark"] .notif-toast-incoming {
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.08);
}
