/* ===== 导入字体 ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== 全局变量 ===== */
:root {
    /* 色彩 - 静谧财富 */
    --bg-primary: #F7F6F2;
    --bg-surface: #FFFFFF;
    --bg-hover: #FAFAF8;
    
    --primary: #1A1A2E;
    --primary-hover: #2A2A4E;
    --accent: #B8860B;
    --accent-hover: #9A7209;
    --accent-light: #FDF8E8;
    
    --success: #2D6A4F;
    --success-light: #E8F5E9;
    --danger: #C14953;
    --danger-light: #FDE8E9;
    
    --text-primary: #1A1A2E;
    --text-secondary: #7D7D8A;
    --text-tertiary: #A8A8B2;
    
    --border: #E8E6E1;
    --border-light: #F0EEEA;
    
    /* 阴影 - 微妙、精致 */
    --shadow-sm: 0 1px 2px rgba(26, 26, 46, 0.04);
    --shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.12);
    --shadow-hover: 0 6px 20px rgba(26, 26, 46, 0.1);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    
    /* 导航 */
    --topbar-height: 64px;
}

/* ===== 重置与基础 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, #D4A853 100%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ===== 文字选择颜色 ===== */
::selection {
    background: rgba(184, 134, 11, 0.15);
    color: var(--primary);
}

::-moz-selection {
    background: rgba(184, 134, 11, 0.15);
    color: var(--primary);
}

/* ===== 布局 ===== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 顶部导航栏 ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.logo i {
    font-size: 20px;
    color: var(--accent);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.97); }
}

.topbar-nav {
    display: flex;
    gap: 4px;
}

.nav-item {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.nav-item i {
    font-size: 14px;
    opacity: 0.7;
}

.nav-item:hover {
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-primary) 100%);
}

.nav-item.active {
    color: var(--primary);
    background: var(--bg-primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 12px;
    right: 12px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent), #D4A853);
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(184, 134, 11, 0.3);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 16px;
}

.topbar-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.topbar-btn:active {
    transform: scale(0.95);
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ===== 页面头部 ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

.filters {
    display: flex;
    gap: 10px;
}

.filters select {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filters select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== 视图切换 ===== */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* ===== 资产概览 (签名元素) ===== */
.assets-hero {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.assets-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #D4A853, var(--accent));
    background-size: 200% 100%;
    animation: shimmerBar 4s ease-in-out infinite;
}

@keyframes shimmerBar {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.assets-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.assets-hero-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.assets-hero-value {
    font-family: 'Noto Serif SC', serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assets-hero-accent {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.assets-hero-accent .up {
    color: var(--success);
}

.assets-hero-accent .down {
    color: var(--danger);
}

.assets-hero-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
    margin: 24px 0;
}

.assets-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums;
}

.stat-value.income {
    color: var(--success);
}

.stat-value.expense {
    color: var(--danger);
}

/* ===== 汇总卡片 (备用样式) ===== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.summary-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.summary-card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.summary-card.assets .card-icon { background: var(--success-light); color: var(--success); }
.summary-card.liabilities .card-icon { background: var(--danger-light); color: var(--danger); }
.summary-card.net-worth .card-icon { background: var(--accent-light); color: var(--accent); }
.summary-card.income .card-icon { background: var(--success-light); color: var(--success); }
.summary-card.expense .card-icon { background: var(--danger-light); color: var(--danger); }

.card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    transition: all 0.3s ease;
}

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

.card:hover::before {
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.card-header h3 i {
    color: var(--text-tertiary);
    font-size: 14px;
    transition: color 0.2s ease;
}

.card:hover .card-header h3 i {
    color: var(--accent);
}

.card-body {
    padding: 20px 22px;
}

.view-all {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    color: var(--accent);
}

.view-all i {
    transition: transform 0.2s ease;
    font-size: 12px;
}

.view-all:hover i {
    transform: translateX(3px);
}

/* ===== 图表 ===== */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    height: 320px;
}

.chart-card canvas {
    max-height: 250px;
}

/* ===== 底部行 ===== */
.bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* ===== 账户列表 ===== */
.account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.account-item:hover {
    background: var(--bg-primary);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -4px;
    margin-right: -4px;
}

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

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.account-details {
    flex: 1;
}

.account-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.account-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.account-balance {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums;
}

/* ===== 目标列表 ===== */
.goal-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.goal-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.goal-name i {
    font-size: 13px;
    color: var(--accent);
}

.goal-amount {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, var(--accent), #D4A853, var(--accent));
    background-size: 200% 100%;
    animation: progressShimmer 3s ease-in-out infinite;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes progressGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.goal-progress {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: right;
    font-weight: 500;
}

/* ===== 交易列表 ===== */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background: var(--bg-primary);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -4px;
    margin-right: -4px;
}

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

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.transaction-item:hover .transaction-icon {
    transform: scale(1.05);
}

.transaction-details {
    flex: 1;
}

.transaction-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.transaction-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.transaction-amount {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

.transaction-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.transaction-item:hover .transaction-actions {
    opacity: 1;
}

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.btn-icon:hover {
    transform: scale(1.1);
}

/* ===== 账户网格 ===== */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.account-card {
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.account-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.account-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.account-card:hover::before {
    opacity: 1;
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.account-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
}

.account-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.account-card-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.account-card-balance {
    font-family: 'Noto Serif SC', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 14px;
    letter-spacing: -0.03em;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums;
}

.account-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.account-card-actions .btn {
    flex: 1;
    font-size: 13px;
    padding: 8px;
    transition: all 0.2s ease;
}

.account-card-actions .btn:active {
    transform: scale(0.97);
}

/* ===== 目标网格 ===== */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.goal-card {
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #D4A853);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.goal-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.goal-card:hover::before {
    opacity: 1;
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.goal-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #D4A853);
}

.goal-card-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.goal-card-amounts {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.goal-card-current {
    font-weight: 600;
    color: var(--text-primary);
}

.goal-card-target {
    color: var(--text-secondary);
}

.goal-card .progress-bar {
    height: 6px;
    margin-bottom: 8px;
}

.goal-card-progress {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    color: var(--accent);
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums;
}

.goal-card-deadline {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.goal-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.goal-card-actions .btn {
    flex: 1;
    font-size: 13px;
    padding: 8px;
    transition: all 0.2s ease;
}

.goal-card-actions .btn:active {
    transform: scale(0.97);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(26, 26, 46, 0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(45, 106, 79, 0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-success:hover {
    background: #245A40;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(193, 73, 83, 0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-danger:hover {
    background: #A83D45;
    box-shadow: 0 4px 12px rgba(193, 73, 83, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
    background: var(--bg-primary);
    border-color: var(--text-tertiary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #D4A853);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(184, 134, 11, 0.2), inset 0 1px 0 rgba(255,255,255,0.12);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.modal-header h2 i {
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
    transition: opacity 0.2s ease;
}

.form-group input:focus::placeholder {
    opacity: 0.5;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
    background: var(--bg-surface);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237D7D8A' d='M6 8.825L1.175 4 2.51 2.675 6 6.165 9.49 2.675 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ===== Toast 通知 ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
}

.toast.removing {
    animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast i {
    font-size: 15px;
    flex-shrink: 0;
}

.toast.success {
    background: linear-gradient(135deg, var(--success), #245A40);
    box-shadow: 0 8px 24px rgba(45, 106, 79, 0.3);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger), #A83D45);
    box-shadow: 0 8px 24px rgba(193, 73, 83, 0.3);
}

.toast.info {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.3);
}

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

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

/* ===== 加载状态 ===== */
.loading {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.loading i {
    margin-right: 8px;
    color: var(--accent);
    animation: spin 1s linear infinite;
}

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

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    color: var(--border);
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-state .btn {
    margin-top: 8px;
}

/* ===== 侧边栏按钮 (移动端) ===== */
.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .charts-row,
    .bottom-row {
        grid-template-columns: 1fr;
    }
    
    .assets-hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 20px;
    }
    
    .topbar-nav {
        display: none;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .assets-hero {
        padding: 24px;
    }
    
    .assets-hero-value {
        font-size: 36px;
    }
    
    .assets-hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .accounts-grid,
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .assets-hero-value {
        font-size: 32px;
    }
    
    .stat-value {
        font-size: 18px;
    }
}