/* 遗韵 v1.0.0 - 完整样式 */
/* 保留原有变量和基础样式，新增v1.0.0所需样式 */

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --accent: #00CEC9;
  --accent-light: #81ECEC;
  --danger: #FF6B6B;
  --warning: #FECA57;
  --success: #00B894;
  --dark: #2D3436;
  --dark-2: #636E72;
  --gray: #B2BEC3;
  --gray-light: #DFE6E9;
  --light: #F5F6FA;
  --white: #FFFFFF;
  --bg-2: #E8ECF1;
  --text-2: #636E72;
  --text-3: #9BA4AA;
  --shadow: 0 2px 15px rgba(108,92,231,0.12);
  --shadow-lg: 0 8px 30px rgba(108,92,231,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--light); color: var(--dark); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 3px; }

/* Animations */
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideInRight { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes glow { 0%,100%{box-shadow:0 0 5px rgba(108,92,231,0.3)} 50%{box-shadow:0 0 20px rgba(108,92,231,0.6)} }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
@keyframes slideUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }

/* ===== 引导页（基础布局，主题由login-themes.css控制） ===== */
.onboarding-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 2000;
}
.onboarding-slider {
  width: 100%;
  max-width: 480px;
  position: relative;
}
.onboarding-slide {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease;
}
.onboarding-slide.active { display: block; }
.onboarding-visual {
  font-size: 80px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}
.onboarding-visual:not(:has(img)) {
  width: 80px; height: 80px;
  border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800;
  letter-spacing: -1px;
}
.onboarding-slide h2 { font-size: 24px; margin-bottom: 12px; }
.onboarding-slide p { font-size: 14px; line-height: 1.8; max-width: 360px; margin: 0 auto; }
.onboarding-dots {
  display: flex;
  gap: 8px;
  margin: 32px 0;
}
.onboarding-dots .dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  transition: var(--transition);
}
.onboarding-dots .dot.active {
  width: 24px;
}
.onboarding-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}
.onboarding-actions .btn { flex: 1; padding: 14px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; }

/* ===== Login（基础布局，主题由login-themes.css控制） ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
}
.login-page::after {
  content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
}
/* 粒子容器（默认隐藏，方案一和三通过主题CSS显示） */
.login-leaves {
  display: none;
  position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 0;
  pointer-events: none;
}
.login-container {
  backdrop-filter: blur(20px) saturate(1.2);
  border-radius: 16px; padding: 48px 40px;
  width: 420px; max-width: 90vw;
  position: relative; z-index: 1; animation: fadeIn 0.6s ease;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon {
  width: 72px; height: 72px;
  border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px; overflow: hidden;
}
.login-logo .logo-icon img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 16px;
}
.login-logo h1 {
  font-size: 28px; font-weight: 700;
}
.login-logo p { font-size: 14px; margin-top: 4px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 16px; border: 1px solid;
  border-radius: var(--radius-sm); font-size: 14px; transition: var(--transition);
}
.form-input:focus { box-shadow: 0 0 0 2px; }
.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  cursor: pointer; font-size: 16px; opacity: 0.6;
}
.password-toggle:hover { opacity: 1; }
.password-strength { margin-top: 4px; }
.btn {
  padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  transition: var(--transition); display: inline-flex; align-items: center;
  justify-content: center; gap: 8px;
}
.btn-primary {
  color: #fff; background: var(--primary); width: 100%; padding: 14px; font-size: 16px;
}
.btn-primary:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-secondary { background: var(--light); color: var(--dark); border: 1px solid var(--gray-light); }
.btn-secondary:hover { background: var(--gray-light); }
.btn-accent { color: var(--white); background: var(--primary); }
.btn-accent:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-danger { color: var(--white); background: var(--danger); }
.btn-danger:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-wechat {
  background: #07C160; color: white; width: 100%; padding: 14px; font-size: 16px;
  border-radius: var(--radius-sm); font-weight: 600;
}
.btn-wechat:hover { background: #06AD56; }
.divider-with-text {
  display: flex; align-items: center; margin-bottom: 16px;
}
.divider-with-text::before, .divider-with-text::after {
  content: ''; flex: 1; height: 1px;
}
.divider-with-text span { padding: 0 16px; font-size: 12px; }
.mfa-section {
  border-radius: var(--radius-sm);
  padding: 16px; margin-top: 16px; display: none;
}
.mfa-section.active { display: block; animation: fadeIn 0.3s ease; }
.mfa-input-group { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.mfa-digit {
  width: 44px; height: 52px; text-align: center; font-size: 22px; font-weight: 700;
  border: 1px solid; border-radius: var(--radius-sm); transition: var(--transition);
}
.mfa-digit:focus { box-shadow: 0 0 0 2px; }
.login-toggle { text-align: center; margin-top: 20px; font-size: 13px; }
.login-toggle a { font-weight: 600; cursor: pointer; }
.login-toggle a:hover { text-decoration: underline; }

/* ===== App Layout ===== */
.app-container { display: none; min-height: 100vh; }
.app-container.active { display: flex; }
.sidebar {
  width: 260px; background: var(--white); border-right: 1px solid var(--gray-light);
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 100; transition: var(--transition);
}
.sidebar-header {
  padding: 20px; border-bottom: 1px solid var(--gray-light);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-header .mini-logo {
  width: 40px; height: 40px;
  background: #2C3E2D;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #E8DCC8; flex-shrink: 0;
  letter-spacing: -1px;
}
.sidebar-header h2 {
  font-size: 18px; font-weight: 700;
  color: #2C3E2D;
}
.sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; }
.nav-section { margin-bottom: 8px; }
.nav-section-title { font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: 14px; color: var(--dark-2);
  cursor: pointer; transition: var(--transition); margin-bottom: 2px;
}
.nav-item:hover { background: var(--light); color: var(--dark); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,206,201,0.1));
  color: var(--primary); font-weight: 600;
}
.nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-item .badge {
  margin-left: auto; background: var(--danger); color: var(--white);
  font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: 700;
}
.sidebar-footer { padding: 16px; border-top: 1px solid var(--gray-light); }
.user-card {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.user-card:hover { background: var(--light); }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--white); font-weight: 700;
}
.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 13px; font-weight: 600; }
.user-info .plan { font-size: 11px; color: var(--dark-2); }
.main-content { margin-left: 260px; flex: 1; min-height: 100vh; padding-bottom: 70px; }
.top-bar {
  background: var(--white); border-bottom: 1px solid var(--gray-light);
  padding: 16px 32px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.top-bar h1 { font-size: 20px; font-weight: 700; }
.top-bar-actions { display: flex; align-items: center; gap: 12px; }
.top-bar-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--light); display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: var(--transition); position: relative;
}
.top-bar-btn:hover { background: var(--gray-light); }
.top-bar-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%; border: 2px solid var(--white);
}
.page-content { padding: 32px; }
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

/* ===== Bottom Navigation (Mobile) ===== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white); border-top: 1px solid var(--gray-light);
  padding: 8px 0; padding-bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 100;
}
.bottom-nav.visible { display: flex; justify-content: space-around; }
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; cursor: pointer; transition: var(--transition);
  font-size: 10px; color: var(--dark-2); border-radius: 8px;
}
.bottom-nav-item .bnav-icon { font-size: 20px; }
.bottom-nav-item .bnav-label { font-size: 10px; }
.bottom-nav-item.active { color: var(--primary); font-weight: 600; }

/* ===== Stats Grid ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; }
.stat-card .stat-label { font-size: 13px; color: var(--dark-2); margin-top: 4px; }
.stat-card .stat-change { font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-size: 18px; font-weight: 700; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ===== Timeline ===== */
.timeline { padding: 20px; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 20px; position: relative; }
.timeline-item:not(:last-child)::after { content:''; position:absolute; left:17px; top:36px; bottom:0; width:2px; background:var(--gray-light); }
.timeline-dot { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.timeline-content { flex:1; }
.timeline-content .title { font-size:14px; font-weight:600; }
.timeline-content .desc { font-size:13px; color:var(--dark-2); margin-top:2px; }
.timeline-content .time { font-size:12px; color:var(--gray); margin-top:4px; }

/* ===== Security Score ===== */
.security-score { background:var(--white); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); text-align:center; }
.score-circle {
  width:120px; height:120px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 16px; position:relative;
}
.score-circle::before { content:''; width:90px; height:90px; background:var(--white); border-radius:50%; position:absolute; }
.score-circle .score-value { position:relative; z-index:1; font-size:28px; font-weight:800; color:var(--success); }
.score-label { font-size:14px; font-weight:600; }

/* ===== Shamir ===== */
.shamir-visual { display:flex; align-items:center; justify-content:center; gap:12px; padding:16px; background:var(--light); border-radius:var(--radius); flex-wrap:wrap; }
.shamir-piece { text-align:center; padding:12px; background:var(--white); border-radius:var(--radius-sm); box-shadow:var(--shadow); min-width:80px; }
.shamir-piece .piece-icon { font-size:24px; margin-bottom:4px; }
.shamir-piece .piece-label { font-size:10px; color:var(--dark-2); }
.shamir-plus { font-size:20px; color:var(--gray); font-weight:700; }
.shamir-equals { font-size:20px; color:var(--primary); font-weight:700; }
.shamir-result { text-align:center; padding:12px; background:linear-gradient(135deg,var(--primary),var(--accent)); border-radius:var(--radius-sm); color:var(--white); min-width:80px; }
.shamir-result .result-icon { font-size:24px; margin-bottom:4px; }
.shamir-result .result-label { font-size:10px; }

/* ===== Assets ===== */
.asset-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:24px; flex-wrap:wrap; }
.search-box { flex:1; min-width:200px; position:relative; }
.search-box input { width:100%; padding:10px 16px 10px 40px; border:2px solid var(--gray-light); border-radius:var(--radius-sm); font-size:14px; transition:var(--transition); }
.search-box input:focus { border-color:var(--primary); }
.search-box .search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--gray); }
.filter-btn { padding:10px 16px; border-radius:var(--radius-sm); background:var(--white); border:2px solid var(--gray-light); font-size:13px; display:flex; align-items:center; gap:6px; transition:var(--transition); }
.filter-btn:hover, .filter-btn.active { border-color:var(--primary); color:var(--primary); }
.asset-list { display:flex; flex-direction:column; gap:12px; }
.asset-item { background:var(--white); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow); display:flex; align-items:center; gap:16px; transition:var(--transition); cursor:pointer; }
.asset-item:hover { transform:translateX(4px); box-shadow:var(--shadow-lg); }
.asset-icon { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0; }
.asset-info { flex:1; min-width:0; }
.asset-info .asset-name { font-size:15px; font-weight:600; }
.asset-info .asset-meta { font-size:12px; color:var(--dark-2); margin-top:2px; }
.asset-tags { display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }
.tag { font-size:11px; padding:2px 8px; border-radius:4px; font-weight:600; }
.tag-finance { background:#FFEAA7; color:#D68910; }
.tag-crypto { background:#A29BFE; color:#5A4BD1; }
.tag-social { background:#DFE6E9; color:#636E72; }
.tag-game { background:#81ECEC; color:#00818A; }
.tag-docs { background:#FFEAA7; color:#B7950B; }
.tag-media { background:#FFCCBC; color:#D84315; }
.asset-actions { display:flex; gap:8px; }
.asset-action-btn { width:32px; height:32px; border-radius:8px; background:var(--light); display:flex; align-items:center; justify-content:center; font-size:14px; transition:var(--transition); cursor:pointer; }
.asset-action-btn:hover { background:var(--gray-light); }
.asset-action-btn.delete:hover { background:rgba(255,107,107,0.2); color:var(--danger); }
.encrypt-badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--success); font-weight:600; }

/* ===== Beneficiaries ===== */
.beneficiary-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:20px; }
.beneficiary-card { background:var(--white); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); transition:var(--transition); position:relative; }
.beneficiary-card:hover { box-shadow:var(--shadow-lg); }
.beneficiary-avatar { width:56px; height:56px; border-radius:16px; display:flex; align-items:center; justify-content:center; font-size:24px; margin-bottom:16px; }
.beneficiary-name { font-size:16px; font-weight:700; }
.beneficiary-relation { font-size:12px; color:var(--dark-2); margin-top:2px; }
.beneficiary-permissions { margin-top:12px; display:flex; flex-wrap:wrap; gap:6px; }
.permission-tag { font-size:11px; padding:3px 8px; border-radius:4px; background:rgba(108,92,231,0.1); color:var(--primary); font-weight:500; }
.beneficiary-verify { margin-top:12px; padding-top:12px; border-top:1px solid var(--gray-light); display:flex; align-items:center; gap:6px; font-size:12px; }
.verified { color:var(--success); font-weight:600; }
.unverified { color:var(--warning); font-weight:600; }
.beneficiary-actions { position:absolute; top:16px; right:16px; display:flex; gap:6px; }

/* ===== Tabs ===== */
.tabs { display:flex; gap:0; border-bottom:2px solid var(--gray-light); margin-bottom:24px; }
.tab { padding:12px 20px; font-size:14px; font-weight:600; color:var(--dark-2); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; transition:var(--transition); }
.tab:hover { color:var(--primary); }
.tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.tab-content { display:none; }
.tab-content.active { display:block; animation:fadeIn 0.3s ease; }

/* ===== Triggers ===== */
.trigger-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:24px; margin-bottom:32px; }
.trigger-card { background:var(--white); border-radius:var(--radius); padding:28px; box-shadow:var(--shadow); border:2px solid transparent; transition:var(--transition); }
.trigger-card:hover { border-color:var(--primary-light); }
.trigger-card.active-trigger { border-color:var(--success); }
.trigger-card .trigger-icon { width:52px; height:52px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:26px; margin-bottom:16px; }
.trigger-card h3 { font-size:16px; font-weight:700; margin-bottom:8px; }
.trigger-card p { font-size:13px; color:var(--dark-2); line-height:1.6; }
.trigger-status { margin-top:16px; padding-top:16px; border-top:1px solid var(--gray-light); display:flex; align-items:center; justify-content:space-between; }
.toggle { width:44px; height:24px; background:var(--gray-light); border-radius:12px; position:relative; cursor:pointer; transition:var(--transition); }
.toggle.active { background:var(--success); }
.toggle::after { content:''; position:absolute; width:20px; height:20px; background:var(--white); border-radius:50%; top:2px; left:2px; transition:var(--transition); box-shadow:0 1px 3px rgba(0,0,0,0.2); }
.toggle.active::after { left:22px; }
.inactivity-settings { background:var(--white); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); margin-bottom:24px; }
.setting-row { display:flex; align-items:center; justify-content:space-between; padding:16px 0; border-bottom:1px solid var(--gray-light); }
.setting-row:last-child { border-bottom:none; }
.setting-row.clickable { cursor:pointer; }
.setting-row.clickable:hover { background:var(--gray-light); border-radius:8px; padding-left:8px; padding-right:8px; }
.setting-arrow { font-size:20px; color:var(--gray); padding-left:8px; }

/* ===== 家谱树 SVG ===== */
.ft-container { position:relative; width:100%; height:100%; min-height:420px; overflow:auto; background:#FDFBF7; border-radius:var(--radius); border:1px solid #E8E0D0; }
.ft-container .family-tree-svg { transition:transform 0.2s ease; }
.ft-node rect:first-of-type { transition:all 0.2s ease; }
.ft-node:hover rect:first-of-type { filter:brightness(0.97); stroke-width:2.5; }
.ft-node:hover { filter:url(#fts) brightness(1.02); }

.ft-toolbar { position:sticky; bottom:8px; right:8px; display:flex; gap:4px; justify-content:flex-end; padding:8px; z-index:10; pointer-events:none; }
.ft-tool-btn { pointer-events:auto; width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.9); border:1px solid #E8E0D0; color:#8B7355; font-size:14px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.2s; box-shadow:0 1px 4px rgba(0,0,0,0.08); }
.ft-tool-btn:hover { background:#FFF8F0; border-color:#B43232; color:#B43232; transform:scale(1.1); }

.ft-detail-card { padding:4px; }
.ft-detail-header { display:flex; align-items:baseline; gap:8px; margin-bottom:16px; padding-bottom:12px; border-bottom:2px solid #E8E0D0; }
.ft-detail-name { font-size:20px; font-weight:700; color:#2D3436; font-family:'PingFang SC','Microsoft YaHei',serif; }
.ft-detail-courtesy { font-size:14px; color:#8B7355; font-style:italic; }
.ft-detail-body { display:flex; flex-direction:column; gap:10px; }
.ft-detail-row { display:flex; justify-content:space-between; align-items:center; font-size:14px; }
.ft-detail-label { color:#8B7355; font-size:13px; min-width:48px; }
.ft-detail-actions { display:flex; gap:8px; margin-top:16px; padding-top:12px; border-top:1px solid #E8E0D0; justify-content:flex-end; }

.ft-rel-preview { background:linear-gradient(135deg,#FFF8F0,#F0FFF4); border:1px solid #E8E0D0; border-radius:var(--radius-sm); padding:12px 16px; text-align:center; font-size:14px; animation:fadeIn 0.2s ease; }
.setting-label .title { font-size:14px; font-weight:600; }
.setting-label .desc { font-size:12px; color:var(--dark-2); margin-top:2px; }
.range-slider { width:200px; -webkit-appearance:none; height:6px; border-radius:3px; background:var(--gray-light); outline:none; }
.range-slider::-webkit-slider-thumb { -webkit-appearance:none; width:18px; height:18px; border-radius:50%; background:var(--primary); cursor:pointer; }
.range-value { display:inline-block; width:50px; text-align:center; font-weight:700; color:var(--primary); font-size:14px; }
.upload-zone { border:2px dashed var(--gray-light); border-radius:var(--radius); padding:40px; text-align:center; transition:var(--transition); cursor:pointer; }
.upload-zone:hover { border-color:var(--primary); background:rgba(108,92,231,0.02); }
.upload-zone .upload-icon { font-size:48px; margin-bottom:12px; }
.upload-zone p { color:var(--dark-2); font-size:14px; }
.upload-zone .hint { font-size:12px; color:var(--gray); margin-top:8px; }

/* ===== 家谱树 v6 新增样式 ===== */

/* 蜡烛闪烁动画 */
.candle-glow {
  font-size: 13px;
  display: inline-block;
  animation: flicker 1.5s infinite alternate ease-in-out;
  vertical-align: middle;
}

@keyframes flicker {
  from {
    text-shadow: 0 0 5px #fff, 0 0 10px #ffaa00, 0 0 15px #ff8800;
  }
  to {
    text-shadow: 0 0 15px #fff, 0 0 30px #ffaa00, 0 0 45px #ff8800;
    transform: scale(1.05);
  }
}

/* 搜索框 */
.ft-search-box { position:relative; display:flex; align-items:center; gap:6px; background:#F8F9FA; border:1px solid var(--gray-light); border-radius:20px; padding:4px 12px; min-width:180px; }
.ft-search-box:focus-within { border-color:#4A90D9; background:#FFF; }
.ft-search-icon { font-size:14px; opacity:0.6; }
.ft-search-box input { border:none; background:transparent; outline:none; font-size:13px; width:120px; color:var(--dark); }
.ft-search-clear { width:18px; height:18px; border-radius:50%; border:none; background:var(--gray-light); color:var(--dark-2); font-size:10px; cursor:pointer; display:none; align-items:center; justify-content:center; }
.ft-search-clear:hover { background:#B43232; color:#FFF; }

/* 视图切换 */
.ft-view-toggle { display:flex; gap:4px; background:#F8F9FA; border-radius:20px; padding:3px; }
.ft-view-btn { border:none; background:transparent; border-radius:16px; padding:5px 12px; font-size:12px; color:var(--dark-2); cursor:pointer; transition:all 0.2s; display:flex; align-items:center; gap:4px; }
.ft-view-btn:hover { background:rgba(0,0,0,0.04); }
.ft-view-btn.active { background:#FFF; color:#4A90D9; box-shadow:0 1px 3px rgba(0,0,0,0.08); font-weight:600; }

/* 搜索高亮 */
.ft-search-mark { background:#FFE082; color:#2D3436; border-radius:2px; padding:0 2px; }

/* 列表视图 */
.ft-list-view { display:flex; flex-direction:column; gap:20px; }
.ft-list-generation { animation:fadeIn 0.3s ease; }
.ft-list-gen-title { display:flex; align-items:center; gap:12px; margin-bottom:12px; font-size:15px; font-weight:700; color:#2D3436; font-family:'PingFang SC','Microsoft YaHei',serif; }
.ft-list-gen-title::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,#E8E0D0,transparent); }
.ft-list-gen-count { font-size:12px; color:var(--dark-2); font-weight:400; margin-left:auto; padding-left:12px; }
.ft-list-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; }

.ft-list-card { background:#FFF; border:1px solid #E8E0D0; border-radius:var(--radius); overflow:hidden; cursor:pointer; transition:all 0.2s; }
.ft-list-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.06); border-color:#D4C4A8; }
.ft-list-card.ft-list-self { border-color:#FD7E14; background:#FFFBF5; }
.ft-list-card.ft-list-highlight { animation:ftPulse 2s ease; }
.ft-list-card.ft-list-deceased { opacity:0.9; }

.ft-list-card-header { display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid #F5F0E8; }
.ft-list-avatar { font-size:22px; }
.ft-list-name-wrap { flex:1; min-width:0; }
.ft-list-name { font-size:15px; font-weight:700; color:#2D3436; font-family:'PingFang SC','Microsoft YaHei',serif; }
.ft-list-badge { display:inline-block; margin-left:6px; padding:1px 6px; border-radius:10px; background:#FD7E14; color:#FFF; font-size:10px; font-weight:600; vertical-align:middle; }
.ft-list-courtesy { display:block; font-size:12px; color:#8B7355; margin-top:2px; }
.ft-list-chevron { font-size:10px; color:var(--dark-2); transition:transform 0.2s; }

.ft-list-card-body { padding:12px 14px; display:none; animation:fadeIn 0.2s ease; }
.ft-list-meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; font-size:12px; }
.ft-list-relation { padding:2px 8px; border-radius:10px; background:#EDF2F7; color:#4A90D9; font-weight:500; }
.ft-list-year { color:var(--dark-2); }
.ft-list-death-mark { font-size:12px; }
.ft-list-links { font-size:13px; margin-bottom:6px; color:var(--dark-2); }
.ft-list-link-label { color:#8B7355; }
.ft-list-link { background:none; border:none; color:#4A90D9; cursor:pointer; font-size:13px; padding:0; text-decoration:underline; }
.ft-list-link:hover { color:#B43232; }
.ft-list-bio { font-size:13px; color:var(--dark-2); line-height:1.6; margin-bottom:6px; }
.ft-list-actions { display:flex; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid #F5F0E8; }

/* 树状视图 */
.ft-tree-view { padding:8px 0; }
.ft-tree-node-wrap { animation:fadeIn 0.2s ease; }
.ft-tree-node { display:flex; align-items:center; gap:6px; padding:8px 8px; border-radius:6px; cursor:pointer; transition:all 0.15s; font-size:14px; }
.ft-tree-node:hover { background:#F8F9FA; }
.ft-tree-node.ft-tree-match { background:#FFF8E1; }
.ft-tree-node.ft-tree-highlight { animation:ftPulse 2s ease; }
.ft-tree-node.ft-tree-deceased { opacity:0.85; }
.ft-tree-chevron { font-size:10px; color:#8B7355; width:14px; text-align:center; transition:transform 0.2s; }
.ft-tree-chevron.ft-tree-leaf { visibility:hidden; }
.ft-tree-name { font-weight:600; color:#2D3436; font-family:'PingFang SC','Microsoft YaHei',serif; }
.ft-tree-relation { font-size:11px; color:var(--dark-2); background:#EDF2F7; padding:1px 6px; border-radius:8px; }
.ft-tree-year { font-size:11px; color:var(--dark-2); }
.ft-tree-death { font-size:11px; }
.ft-tree-self { font-size:10px; padding:1px 5px; border-radius:8px; background:#FD7E14; color:#FFF; margin-left:4px; }
.ft-tree-children { border-left:1.5px solid #E8E0D0; margin-left:13px; padding-left:4px; }

@keyframes ftPulse {
  0% { box-shadow:0 0 0 0 rgba(74,144,217,0.4); }
  70% { box-shadow:0 0 0 8px rgba(74,144,217,0); }
  100% { box-shadow:0 0 0 0 rgba(74,144,217,0); }
}

/* ===== Capsules ===== */
.capsule-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:20px; }
.capsule-card { background:var(--white); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); transition:var(--transition); cursor:pointer; }
.capsule-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.capsule-cover { height:140px; display:flex; align-items:center; justify-content:center; font-size:48px; position:relative; }
.capsule-cover .capsule-type-badge { position:absolute; top:12px; right:12px; background:rgba(255,255,255,0.9); padding:4px 10px; border-radius:4px; font-size:11px; font-weight:700; }
.capsule-body { padding:16px; }
.capsule-body h4 { font-size:15px; font-weight:700; }
.capsule-body p { font-size:12px; color:var(--dark-2); margin-top:4px; line-height:1.5; }
.capsule-meta { display:flex; align-items:center; justify-content:space-between; margin-top:12px; font-size:11px; color:var(--gray); }
.capsule-locked { display:flex; align-items:center; gap:4px; color:var(--danger); font-weight:600; }
.capsule-unlocked { display:flex; align-items:center; gap:4px; color:var(--success); font-weight:600; }

/* ===== AI Avatar ===== */
.ai-avatar-section { background:linear-gradient(135deg, #667eea, #764ba2); border-radius:var(--radius); padding:32px; color:var(--white); margin-bottom:24px; }
.ai-avatar-section h3 { font-size:20px; margin-bottom:8px; }
.ai-avatar-section p { opacity:0.9; font-size:14px; line-height:1.6; }
.ai-avatar-preview { display:flex; align-items:center; gap:20px; margin-top:20px; background:rgba(255,255,255,0.15); border-radius:var(--radius); padding:20px; }
.avatar-circle { width:80px; height:80px; border-radius:50%; background:rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center; font-size:40px; flex-shrink:0; animation:glow 3s ease infinite; }
.avatar-info h4 { font-size:16px; }
.avatar-info p { font-size:13px; opacity:0.8; margin-top:4px; }
.avatar-status { margin-top:8px; display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,0.2); padding:4px 12px; border-radius:20px; font-size:12px; }
.status-dot { width:6px; height:6px; border-radius:50%; background:var(--success); animation:pulse 2s ease infinite; }

/* ===== Blockchain ===== */
.chain-visual { display:flex; align-items:center; gap:0; overflow-x:auto; padding:20px 0; }
.chain-block { background:var(--white); border:2px solid var(--primary-light); border-radius:var(--radius); padding:16px; min-width:180px; flex-shrink:0; transition:var(--transition); }
.chain-block:hover { border-color:var(--primary); transform:scale(1.02); }
.chain-block .block-id { font-size:11px; color:var(--gray); }
.chain-block .block-hash { font-size:10px; color:var(--primary); word-break:break-all; margin-top:4px; }
.chain-block .block-data { font-size:13px; font-weight:600; margin-top:8px; }
.chain-block .block-time { font-size:11px; color:var(--dark-2); margin-top:4px; }
.chain-link { font-size:24px; color:var(--primary-light); flex-shrink:0; margin:0 4px; }
.audit-log { margin-top:24px; }
.audit-item { display:flex; align-items:flex-start; gap:12px; padding:14px 0; border-bottom:1px solid var(--gray-light); }
.audit-item:last-child { border-bottom:none; }
.audit-item.unread { background:rgba(108,92,231,0.03); margin:0 -8px; padding-left:8px; padding-right:8px; border-radius:6px; }
.audit-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.audit-content { flex:1; }
.audit-content .audit-action { font-size:13px; font-weight:600; }
.audit-content .audit-detail { font-size:12px; color:var(--dark-2); margin-top:2px; }
.audit-content .audit-time { font-size:11px; color:var(--gray); margin-top:4px; }
.audit-hash { font-size:10px; color:var(--primary); background:rgba(108,92,231,0.05); padding:2px 6px; border-radius:4px; word-break:break-all; margin-top:4px; display:inline-block; }
.encrypt-visual { background:linear-gradient(135deg, #2D3436, #636E72); border-radius:var(--radius); padding:24px; color:var(--accent-light); font-family:'Courier New',monospace; font-size:11px; line-height:1.8; word-break:break-all; max-height:120px; overflow:hidden; position:relative; }
.encrypt-visual::after { content:''; position:absolute; bottom:0; left:0; right:0; height:40px; background:linear-gradient(transparent, #2D3436); }

/* ===== Modal ===== */
.modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); display:none; align-items:center; justify-content:center; z-index:1000; }
.modal-overlay.active { display:flex; }
.modal { background:var(--white); border-radius:16px; padding:32px; width:500px; max-width:90vw; max-height:85vh; overflow-y:auto; animation:fadeIn 0.3s ease; }
.modal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.modal-header h3 { font-size:18px; font-weight:700; }
.modal-close { width:32px; height:32px; border-radius:8px; background:var(--light); display:flex; align-items:center; justify-content:center; font-size:18px; cursor:pointer; transition:var(--transition); }
.modal-close:hover { background:var(--gray-light); }
.modal-footer { margin-top:24px; display:flex; justify-content:flex-end; gap:12px; }

/* ===== Subscription Cards ===== */
.sub-card { background:var(--white); border-radius:var(--radius); padding:28px; box-shadow:var(--shadow); border:2px solid transparent; transition:var(--transition); position:relative; overflow:hidden; }
.sub-card:hover { border-color:var(--primary-light); transform:translateY(-2px); }
.sub-card.recommended { border-color:var(--primary); }
.sub-card.current { border-color:var(--success); background:rgba(0,184,148,0.02); }
.sub-badge { position:absolute; top:0; right:0; background:var(--primary); color:white; padding:4px 16px; font-size:11px; font-weight:700; border-radius:0 0 0 12px; }
.sub-badge.current-badge { background:var(--success); }
.sub-card h3 { font-size:18px; font-weight:700; margin-bottom:12px; }
.sub-price { margin-bottom:16px; }
.price-amount { font-size:32px; font-weight:800; color:var(--primary); }
.price-period { font-size:14px; color:var(--dark-2); }
.sub-features { list-style:none; font-size:13px; }
.sub-features li { padding:6px 0; color:var(--dark-2); }

/* ===== Toast ===== */
.toast-container { position:fixed; top:20px; right:20px; z-index:2000; display:flex; flex-direction:column; gap:8px; }
.toast { background:var(--white); border-radius:var(--radius-sm); padding:14px 20px; box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:10px; font-size:14px; animation:slideInRight 0.3s ease; min-width:280px; }
.toast.success { border-left:4px solid var(--success); }
.toast.error { border-left:4px solid var(--danger); }
.toast.info { border-left:4px solid var(--primary); }
.toast.warning { border-left:4px solid var(--warning); }

/* ===== 同步状态浮标 ===== */
.sync-badge {
  position: fixed; bottom: 24px; right: 24px; z-index: 1500;
  padding: 10px 18px; border-radius: 24px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; user-select: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  backdrop-filter: blur(12px);
}
.sync-badge:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.sync-badge.syncing {
  background: rgba(108,92,231,0.92); color: white;
  animation: sync-pulse 1.5s ease-in-out infinite;
}
.sync-badge.success {
  background: rgba(0,184,148,0.92); color: white;
}
.sync-badge.failed {
  background: rgba(255,107,107,0.92); color: white;
}
@keyframes sync-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.75; }
}
.sync-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: sync-spin 0.8s linear infinite;
}
@keyframes sync-spin { to { transform: rotate(360deg); } }

/* ===== 同步详情面板 ===== */
.sync-panel {
  position: fixed; bottom: 70px; right: 24px; z-index: 1500;
  width: 360px; max-width: calc(100vw - 48px);
  background: var(--white); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  transform: translateY(10px) scale(0.95); opacity: 0;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none; overflow: hidden;
}
.sync-panel.open {
  transform: translateY(0) scale(1); opacity: 1;
  pointer-events: auto;
}
[data-theme="dark"] .sync-panel {
  background: #1e1e2e;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] .sync-badge {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* ===== 文件附件进度条 ===== */
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; position: relative;
  background: var(--light);
  transition: background 0.3s ease;
  overflow: hidden;
}
.file-item-inner {
  display: flex; align-items: center; gap: 10px;
  width: 100%; position: relative; z-index: 1;
}
.file-progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%; border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1), background 0.3s ease;
  z-index: 0;
}
.file-progress-bar.pending   { width: 0%; background: transparent; }
.file-progress-bar.reading   { width: 30%; background: rgba(149,165,166,0.15); }
.file-progress-bar.uploading { background: rgba(0,184,148,0.12); }
.file-progress-bar.success   { width: 100%; background: rgba(0,184,148,0.10); }
.file-progress-bar.failed    { width: 100%; background: rgba(255,107,107,0.10); }

.file-item.pending   { }
.file-item.uploading { }
.file-item.success   { background: rgba(0,184,148,0.05); border: 1px solid rgba(0,184,148,0.15); }
.file-item.failed    { background: rgba(255,107,107,0.05); border: 1px solid rgba(255,107,107,0.15); }

.file-icon { font-size: 18px; flex-shrink: 0; }
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-size { color: var(--gray); font-size: 11px; flex-shrink: 0; }
.file-status { font-size: 11px; flex-shrink: 0; font-weight: 500; }
.file-status.pending  { color: var(--gray); }
.file-status.reading  { color: var(--gray); }
.file-status.uploading { color: var(--primary); }
.file-status.success  { color: var(--success); }
.file-status.failed   { color: var(--danger); }
.file-remove { cursor: pointer; color: var(--danger); font-size: 14px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.2s; }
.file-remove:hover { opacity: 1; }
.file-download { cursor: pointer; color: var(--accent); font-size: 14px; flex-shrink: 0; }

/* 文件读取/上传中的迷你进度动画 */
.file-progress-bar.uploading::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(0,184,148,0.08), transparent);
  animation: file-shimmer 1.5s infinite;
}
@keyframes file-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 暗色主题适配 */
[data-theme="dark"] .file-item.success { background: rgba(0,184,148,0.08); border-color: rgba(0,184,148,0.2); }
[data-theme="dark"] .file-item.failed  { background: rgba(255,107,107,0.08); border-color: rgba(255,107,107,0.2); }
[data-theme="dark"] .file-progress-bar.success { background: rgba(0,184,148,0.12); }
[data-theme="dark"] .file-progress-bar.failed  { background: rgba(255,107,107,0.12); }
.toast-icon { font-size:18px; }

/* ===== Empty State ===== */
.empty-state { text-align:center; padding:60px 20px; color:var(--dark-2); }
.empty-state .empty-icon { font-size:64px; margin-bottom:16px; }
.empty-state h3 { font-size:18px; margin-bottom:8px; }
.empty-state p { font-size:14px; max-width:400px; margin:0 auto; }

/* ===== 受益人视角样式 ===== */
.inherit-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.inherit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.inherit-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.inherit-badge.pending { background: rgba(254,202,87,0.15); color: #D68910; }
.inherit-badge.inherited { background: rgba(0,184,148,0.15); color: var(--success); }
.inherit-badge.blocked { background: rgba(255,107,107,0.15); color: var(--danger); }

.capsule-card-ben {
  position: relative; overflow: hidden; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.capsule-card-ben:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.capsule-card-ben.capsule-locked {
  cursor: default;
}
.capsule-card-ben.capsule-locked:hover {
  transform: none;
  box-shadow: var(--shadow);
}

/* ===== 胶囊倒计时样式 ===== */
.countdown-block {
  text-align: center;
  min-width: 42px;
}
.countdown-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.countdown-label {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
  font-weight: 600;
}
.countdown-sep {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-light);
  line-height: 1;
  align-self: flex-start;
  margin-top: 2px;
  animation: countdown-blink 1s step-end infinite;
}

@keyframes countdown-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 授权码输入框抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* 暗色主题：倒计时 */
[data-theme="dark"] .countdown-num {
  color: var(--accent);
}
[data-theme="dark"] .countdown-sep {
  color: var(--accent-light);
}

.inherit-chain-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-2); color: var(--primary); font-size: 16px;
  animation: chain-pulse 2s ease-in-out infinite;
}

@keyframes chain-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 受益人导航活跃状态增强 */
.nav-item[data-page^="beneficiary"]:active,
.nav-item[data-page^="pending"]:active,
.nav-item[data-page^="inherited"]:active,
.nav-item[data-page="my-assets"]:active,
.nav-item[data-page="my-beneficiaries"]:active {
  background: var(--primary);
  color: white;
}

/* 暗色主题：受益人模式 */
[data-theme="dark"] .inherit-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
[data-theme="dark"] .capsule-card-ben:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

/* 暗色主题：Logo区域 */
[data-theme="dark"] .sidebar-header .mini-logo {
  background: #3A4F3B;
}
[data-theme="dark"] .sidebar-header h2 {
  color: #C8D6C3;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar { transform:translateX(-100%); z-index:200; }
  .sidebar.mobile-open { transform:translateX(0); box-shadow:4px 0 20px rgba(0,0,0,0.15); }
  .main-content { margin-left:0 !important; }
  .page-content { padding:20px 16px; }
  .grid-2 { grid-template-columns:1fr; }
  .stats-grid { grid-template-columns:repeat(2, 1fr); }
  .top-bar { padding:12px 16px; }
  .top-bar h1 { font-size:17px; }
  .mobile-only { display:flex !important; }
  .asset-toolbar { gap:8px; }
  .search-box { min-width:100%; order:-1; }
  .trigger-cards { grid-template-columns:1fr; }
  .shamir-visual { gap:8px; padding:12px; }
  .shamir-piece { min-width:60px; padding:8px; }
  .chain-visual { padding:12px 0; }
  .chain-block { min-width:140px; padding:12px; }
  .modal { padding:24px 20px; }
  .beneficiary-grid { grid-template-columns:1fr; }
  .capsule-grid { grid-template-columns:1fr; }
  .bottom-nav { display:flex; }
  .main-content { padding-bottom:80px; }
}
@media (min-width: 769px) {
  .mobile-only { display:none !important; }
  .bottom-nav { display:none !important; }
}

/* ===== 小程序环境适配 ===== */
body.wx-miniprogram .sidebar { display:none; }
body.wx-miniprogram .top-bar { padding-left:16px; }
body.wx-miniprogram .bottom-nav { display:flex; }
body.wx-miniprogram .main-content { margin-left:0; padding-bottom:80px; }
body.wx-miniprogram .web-only { display:none !important; }
