        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #F0F8FF 0%, #FAF0E6 200%);
            min-height: 100vh;
            padding: 20px;
            zoom: 0.77;
        }

        .container {
            max-width: 1920px;
            margin: 0 auto;
        }

        .header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            position: relative;
            z-index: 100;
        }

        h1 {
            color: #333;
            margin-bottom: 20px;
            font-size: 28px;
        }

        /* 云同步状态指示器 */
        .sync-status {
            position: absolute;
            top: 25px;
            right: 160px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.3s;
            cursor: pointer;
        }

        .sync-status.synced {
            background: #e6f7e6;
            color: #52c41a;
        }

        .sync-status.syncing {
            background: #e6f4ff;
            color: #1890ff;
        }

        .sync-status.error {
            background: #fff2f0;
            color: #ff4d4f;
        }

        .sync-status.offline {
            background: #f5f5f5;
            color: #999;
        }

        .sync-status.offline::before {
            content: '';
            width: 8px;
            height: 8px;
            background: #999;
            border-radius: 50%;
            display: inline-block;
        }

        .sync-status.online {
            background: #f6ffed;
            color: #52c41a;
        }

        .sync-status.online::before {
            content: '';
            width: 8px;
            height: 8px;
            background: #52c41a;
            border-radius: 50%;
            display: inline-block;
            box-shadow: 0 0 4px rgba(82, 196, 26, 0.6);
        }

        .sync-status.error {
            background: #fff2f0;
            color: #ff4d4f;
        }

        .sync-status.error::before {
            content: '';
            width: 8px;
            height: 8px;
            background: #ff4d4f;
            border-radius: 50%;
            display: inline-block;
            box-shadow: 0 0 4px rgba(255, 77, 79, 0.6);
        }

        .sync-status.synced {
            background: #e6f7e6;
            color: #52c41a;
        }

        .sync-status.synced::before {
            content: '';
            width: 8px;
            height: 8px;
            background: #52c41a;
            border-radius: 50%;
            display: inline-block;
            box-shadow: 0 0 4px rgba(82, 196, 26, 0.6);
        }

        .sync-status .sync-icon {
            width: 16px;
            height: 16px;
            display: none;
        }

        .sync-status.syncing .sync-icon {
            display: block;
            animation: spin 1s linear infinite;
        }

        .sync-status.syncing::before,
        .sync-status.syncing .sync-icon {
            display: none;
        }

        .sync-status.syncing .sync-icon {
            display: block;
            animation: spin 1s linear infinite;
        }

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

        /* 用户ID输入框样式 */
        .sync-config {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 2000;
        }

        .sync-config.active {
            display: flex;
        }

        .sync-config-content {
            background: white;
            border-radius: 15px;
            padding: 30px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .sync-config-content h3 {
            margin-bottom: 20px;
            color: #333;
            font-size: 20px;
            font-weight: 600;
        }

        .sync-config-content .form-group {
            margin-bottom: 20px;
        }

        .sync-config-content label:not(.toggle-switch) {
            display: block;
            margin-bottom: 8px;
            color: #666;
            font-size: 14px;
        }

        .sync-config-content input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
        }

        .sync-config-content .btn-group {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .sync-config-content .btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
        }

        /* 自定义开关样式 */
        .toggle-switch {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
            cursor: pointer;
        }

        .toggle-switch input {
            display: none;
        }

        .toggle-slider {
            position: relative;
            width: 50px;
            height: 28px;
            background: #ccc;
            border-radius: 28px;
            transition: all 0.3s;
            flex-shrink: 0;
        }

        .toggle-slider::before {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 22px;
            height: 22px;
            background: white;
            border-radius: 50%;
            transition: all 0.3s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .toggle-switch input:checked + .toggle-slider {
            background: #667eea;
        }

        .toggle-switch input:checked + .toggle-slider::before {
            transform: translateX(22px);
        }

        .toggle-label {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }

        /* 比例平衡容器 */
        .balance-container {
            background: white;
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .balance-layout {
            display: grid;
            grid-template-columns: 480px 1fr;
            gap: 40px;
        }

        @media (max-width: 1200px) {
            .balance-layout {
                grid-template-columns: 1fr;
            }
        }

        /* 饼图区域 */
        .balance-chart-section {
            text-align: center;
        }

        .balance-chart-section h3 {
            margin-bottom: 20px;
            color: #333;
            font-size: 18px;
        }

        .balance-chart-section canvas {
            width: 425px !important;
            height: 425px !important;
            margin: 0 auto;
            display: block;
            max-width: 425px;
            max-height: 425px;
        }

        .balance-summary {
            margin-top: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
        }

        .summary-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .summary-item span {
            color: #666;
            font-size: 14px;
        }

        .summary-item strong {
            color: #333;
            font-size: 20px;
        }

        /* 设置区域 */
        .balance-settings-section h3 {
            margin-bottom: 20px;
            color: #333;
            font-size: 18px;
        }

        /* 表格样式 */
        .balance-table-container {
            border: 1px solid #e8e8e8;
            border-radius: 10px;
        }

        .balance-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 15px;
        }

        .balance-table thead {
            position: sticky;
            top: 0;
            background: #667eea;
            color: white;
            z-index: 1;
        }

        .balance-table th {
            padding: 12px 10px;
            text-align: center;
            font-weight: 500;
            font-size: 16px;
        }

        .balance-table th:first-child {
            text-align: left;
            padding-left: 15px;
        }

        .balance-table td {
            padding: 12px 10px;
            text-align: center;
            border-bottom: 1px solid #f0f0f0;
        }

        .balance-table td:first-child {
            text-align: left;
            padding-left: 15px;
        }

        .balance-table tbody tr:hover {
            background: #f8f9fa;
        }

        .balance-table tbody tr:last-child td {
            border-bottom: none;
        }

        .balance-table tfoot {
            background: #f0f5ff;
            font-weight: 500;
        }

        .balance-table tfoot td {
            border-top: 2px solid #667eea;
            padding: 12px 10px;
        }

        /* 基金名称列 */
        .balance-fund-name-cell {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .balance-fund-name {
            font-weight: 500;
            color: #333;
            font-size: 15px;
        }

        .balance-fund-code {
            color: #999;
            font-size: 13px;
        }

        /* 目标比例输入 */
        .balance-ratio-input {
            width: 70px;
            padding: 6px 8px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            text-align: right;
            font-size: 15px;
            transition: border-color 0.3s;
        }

        .balance-ratio-input:focus {
            border-color: #667eea;
            outline: none;
        }

        .balance-ratio-input.error {
            border-color: #ff4d4f;
            background: #fff2f0;
        }

        /* 目标金额样式 */
        .balance-target-amount {
            font-weight: 500;
            font-size: 15px;
            color: #333;
        }

        /* 调整金额样式 */
        .balance-adjust-amount {
            font-weight: 500;
            font-size: 15px;
        }

        .balance-adjust-amount.buy {
            color: #ff4d4f;
        }

        .balance-adjust-amount.sell {
            color: #52c41a;
        }

        .balance-adjust-amount.neutral {
            color: #999;
        }

        /* 操作按钮 */
        .balance-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #e8e8e8;
        }

        .balance-actions .btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
        }

        .balance-actions .btn-secondary {
            background: #f0f0f0;
            color: #666;
        }

        .balance-actions .btn-primary {
            background: #667eea;
            color: white;
        }

        /* 调仓结果 */
        .rebalance-result {
            margin-top: 20px;
            padding: 20px;
            background: #f0f5ff;
            border-radius: 10px;
            border-left: 4px solid #667eea;
        }

        .rebalance-result h4 {
            margin-bottom: 15px;
            color: #333;
        }

        .rebalance-suggestion {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #e0e0e0;
        }

        .rebalance-suggestion:last-child {
            border-bottom: none;
        }

        .rebalance-fund-name {
            font-weight: 500;
            color: #333;
        }

        .rebalance-action {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .rebalance-action-type {
            padding: 4px 12px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 500;
        }

        .rebalance-action-type.buy {
            background: #fff2f0;
            color: #ff4d4f;
        }

        .rebalance-action-type.sell {
            background: #f6ffed;
            color: #52c41a;
        }

        .rebalance-amount {
            font-weight: 600;
            font-size: 16px;
            color: #333;
        }

        /* 比例平衡空状态 */
        .balance-empty {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .balance-empty h3 {
            margin-bottom: 10px;
            color: #666;
        }

        .controls {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            align-items: center;
            position: relative;
            overflow: visible;
        }

        .add-fund {
            display: flex;
            gap: 10px;
            flex: 1;
            min-width: 300px;
        }

        .add-fund input {
            flex: 1;
            min-width: 200px;
            padding: 12px 16px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s;
        }

        .sort-controls {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .sort-controls label {
            color: #666;
            font-size: 14px;
            font-weight: 500;
        }

        .sort-controls select {
            padding: 10px 14px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            background: white;
            cursor: pointer;
            transition: all 0.3s;
        }

        .sort-controls select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .backup-controls {
            display: flex;
            gap: 10px;
        }

        .add-fund input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        /* 自动补全下拉列表样式 */
        .autocomplete-wrapper {
            position: relative;
            flex: 1;
            min-width: 200px;
        }

        .autocomplete-wrapper input {
            width: 100%;
        }

        .autocomplete-list {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            max-height: 300px;
            overflow-y: auto;
            background: white;
            border: 2px solid #667eea;
            border-top: none;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 2000;
            display: none;
        }

        .autocomplete-list.active {
            display: block;
        }

        .autocomplete-item {
            padding: 12px 16px;
            cursor: pointer;
            transition: background 0.2s;
            border-bottom: 1px solid #f0f0f0;
        }

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

        .autocomplete-item:hover {
            background: #f5f7ff;
        }

        .autocomplete-item-name {
            font-size: 14px;
            color: #333;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .autocomplete-item-code {
            font-size: 12px;
            color: #999;
        }

        .autocomplete-item-type {
            display: inline-block;
            font-size: 11px;
            color: #667eea;
            background: rgba(102, 126, 234, 0.1);
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 8px;
        }

        .autocomplete-loading {
            padding: 12px 16px;
            text-align: center;
            color: #999;
            font-size: 13px;
        }

        .autocomplete-empty {
            padding: 12px 16px;
            text-align: center;
            color: #999;
            font-size: 13px;
        }

        /* 选项卡样式 */
        .fund-tabs {
            display: flex;
            border-bottom: 2px solid #e0e0e0;
            margin-bottom: 15px;
            gap: 5px;
            margin-top: 10px;
        }

        .fund-tab {
            flex: 1;
            padding: 10px 20px;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #666;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
            position: relative;
        }

        .fund-tab:hover {
            color: #667eea;
            background: rgba(102, 126, 234, 0.05);
        }

        .fund-tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
            font-weight: 600;
            background: rgba(102, 126, 234, 0.08);
        }

        .fund-tab-content {
            display: none;
            animation: fadeIn 0.3s ease-in-out;
        }

        .fund-tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 基金板块选项卡样式 */
        .fund-section-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            justify-content: flex-start;
        }

        .section-tab {
            padding: 12px 24px;
            border: none;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 8px;
            cursor: pointer;
            font-size: 17px;
            font-weight: 500;
            color: #666;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-tab:hover {
            background: rgba(255, 255, 255, 0.9);
        }

        .section-tab.active {
            background: #667eea;
            color: white;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        /* 数量气泡样式 */
        .count-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            background: #ff4d4f;
            color: white;
            font-size: 12px;
            font-weight: 600;
            border-radius: 10px;
            margin-left: 4px;
        }

        /* 买入模式切换选项卡 */
        .buy-mode-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid #e8e8e8;
        }

        .mode-tab {
            flex: 1;
            padding: 10px 20px;
            border: 2px solid #e8e8e8;
            background: white;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            color: #666;
            transition: all 0.3s;
        }

        .mode-tab:hover {
            border-color: #667eea;
            color: #667eea;
        }

        .mode-tab.active {
            background: #667eea;
            border-color: #667eea;
            color: white;
        }

        /* 自动计算字段的样式 */
        #buyAmount[readonly], #buyShares[readonly] {
            background: #f5f5f5;
            color: #666;
        }

        /* 基金详细信息样式 */
        .fund-details {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .fund-details-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .fund-details-header h4 {
            font-size: 14px;
            color: #555;
            margin: 0;
        }

        .fund-details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

        .fund-detail-item {
            display: flex;
            flex-direction: column;
        }

        .fund-detail-label {
            font-size: 11px;
            color: #666;
            margin-bottom: 3px;
        }

        .fund-detail-value {
            font-size: 15px;
            font-weight: 600;
            color: #333;
        }

        .fund-detail-value.positive {
            color: #ff4d4f;
        }

        .fund-detail-value.negative {
            color: #00b96b;
        }

        .fund-manager-info {
            font-size: 12px;
            color: #666;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #dee2e6;
        }

        .fund-manager-name {
            font-weight: 600;
            color: #333;
        }

        .net-worth-chart-container {
            margin-top: 15px;
            min-height: 300px;
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-danger {
            background: #ff6b6b;
            color: white;
            padding: 6px 12px;
            font-size: 14px;
        }

        .btn-danger:hover {
            background: #ff5252;
            transform: scale(1.05);
        }

        .btn-secondary {
            background: #95a5a6;
            color: white;
            padding: 6px 12px;
            font-size: 13px;
        }

        .btn-secondary:hover {
            background: #7f8c8d;
        }

        .backup-controls .btn-secondary {
            padding: 10px 16px;
            font-size: 14px;
            background: #52c41a;
        }

        .backup-controls .btn-secondary:hover {
            background: #389e0d;
            transform: translateY(-1px);
        }

        .backup-controls .btn-secondary:first-child {
            background: #1890ff;
        }

        .backup-controls .btn-secondary:first-child:hover {
            background: #096dd9;
        }

        .btn-warning {
            background: #f39c12;
            color: white;
            padding: 6px 12px;
            font-size: 13px;
        }

        .btn-warning:hover {
            background: #e67e22;
        }

        /* 总览看板样式 */
        .overview-panel {
            margin-bottom: 30px;
            position: relative;
            z-index: 10;
        }

        .overview-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .overview-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e0e0e0;
        }

        .overview-header h2 {
            font-size: 24px;
            color: #333;
            margin: 0;
        }

        .overview-date {
            font-size: 13px;
            color: #999;
        }

        .overview-stats {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 20px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            border-radius: 10px;
            background: #f8f9fa;
            transition: transform 0.2s;
        }

        .stat-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .stat-item.stat-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .stat-item.stat-primary .stat-label,
        .stat-item.stat-primary .stat-value {
            color: white;
        }

        .stat-item.stat-highlight {
            background: linear-gradient(135deg, #f0f2f5 0%, #ffffff 100%);
            border: 2px solid #e8e8e8;
        }

        .stat-item.stat-highlight .stat-label {
            color: #666;
        }
        
        .stat-item.stat-highlight .stat-value {
            color: #333;
        }

        .stat-label {
            font-size: 17px;
            color: #666;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .stat-value {
            font-size: 26px;
            font-weight: 700;
            color: #333;
        }

        .stat-value.positive {
            color: #ff4d4f; /* 盈利：鲜艳红色 */
        }

        .stat-value.negative {
            color: #00b96b; /* 亏损：鲜艳绿色 */
        }

        /* 今日盈亏使用涨跌颜色，不覆盖为白色 */
        .stat-item.stat-highlight .stat-value.positive {
            color: #ff4d4f !important; /* 涨：红色 */
            font-weight: 800;
        }
        
        .stat-item.stat-highlight .stat-value.negative {
            color: #00b96b !important; /* 跌：绿色 */
            font-weight: 800;
        }
        
        /* 其他主要统计卡片保持白色 */
        .stat-item.stat-primary .stat-value.positive,
        .stat-item.stat-primary .stat-value.negative {
            color: white;
        }

        .funds-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
            gap: 20px;
        }

        .fund-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s, box-shadow 0.3s;
            position: relative;
        }

        .fund-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
        }

        .fund-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 15px;
        }

        .fund-title {
            flex: 1;
        }

        .fund-name {
            font-size: 18px;
            font-weight: 600;
            color: #333;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .fund-badge {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
        }

        .fund-badge.holding {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
            color: white;
        }

        .fund-badge.watching {
            background: linear-gradient(135deg, #ffd93d 0%, #f5c842 100%);
            color: #7a6400;
        }

        .fund-code {
            font-size: 14px;
            color: #999;
        }

        .fund-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }

        .info-item {
            display: flex;
            flex-direction: column;
        }

        .info-label {
            font-size: 12px;
            color: #999;
            margin-bottom: 4px;
        }

        .info-value {
            font-size: 20px;
            font-weight: 600;
            color: #333;
        }

        .info-value.positive {
            color: #ff4d4f; /* 涨：鲜艳红色 */
        }

        .info-value.negative {
            color: #00b96b; /* 跌：鲜艳绿色 */
        }

        .percentage-container {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: center;
            margin-bottom: 15px;
        }

        .percentage {
            font-size: 22px;
            font-weight: 700;
            padding: 10px 18px;
            border-radius: 8px;
            flex-shrink: 0;
        }

        .percentage.positive {
            color: #ff4d4f; /* 涨：鲜艳红色 */
            background: rgba(255, 77, 79, 0.15);
        }

        .percentage.negative {
            color: #00b96b; /* 跌：鲜艳绿色 */
            background: rgba(0, 185, 107, 0.15);
        }

        .daily-profit {
            font-size: 22px;
            font-weight: 700;
            padding: 10px 18px;
            border-radius: 8px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .daily-profit.positive {
            color: #ff4d4f; /* 涨：鲜艳红色 */
            background: rgba(255, 77, 79, 0.15);
        }

        .daily-profit.negative {
            color: #00b96b; /* 跌：鲜艳绿色 */
            background: rgba(0, 185, 107, 0.15);
        }

        .chart-container {
            position: relative;
            height: 150px;
            margin-bottom: 10px;
        }

        .update-time {
            font-size: 12px;
            color: #999;
            text-align: center;
        }

        /* 持仓信息样式 */
        .position-info {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
        }

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

        .position-header h4 {
            font-size: 14px;
            color: #555;
            margin: 0;
        }

        .position-actions {
            display: flex;
            gap: 5px;
        }

        .position-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .position-item {
            display: flex;
            flex-direction: column;
        }

        .position-label {
            font-size: 11px;
            color: #666;
            margin-bottom: 3px;
        }

        .position-value {
            font-size: 16px;
            font-weight: 600;
            color: #333;
        }

        .position-value.profit {
            color: #ff4d4f; /* 盈利：鲜艳红色 */
        }

        .position-value.loss {
            color: #00b96b; /* 亏损：鲜艳绿色 */
        }

        .no-position {
            text-align: center;
            color: #999;
            font-size: 13px;
            padding: 10px;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: white;
            font-size: 18px;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            color: #666;
        }

        .empty-state h2 {
            margin-bottom: 10px;
            color: #333;
        }

        /* 模态框样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 15px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
        }

        .modal-confirm {
            max-width: 600px;
            max-height: 85vh;
        }

        .confirm-message {
            padding: 0;
            background: transparent;
            border-radius: 0;
            margin-bottom: 25px;
            font-size: 14px;
            line-height: 1.8;
            color: #333;
            max-height: 60vh;
            overflow-y: auto;
        }

        .confirm-message::-webkit-scrollbar {
            width: 8px;
        }

        .confirm-message::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        .confirm-message::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }

        .confirm-message::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

        .confirm-fund-info {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .confirm-fund-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .confirm-fund-code {
            font-size: 14px;
            opacity: 0.9;
            font-family: 'Courier New', monospace;
        }

        .confirm-section {
            background: white;
            border: 1px solid #e9ecef;
            border-radius: 10px;
            padding: 16px;
            margin-bottom: 15px;
        }

        .confirm-section-title {
            font-size: 15px;
            font-weight: bold;
            color: #495057;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .confirm-detail-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

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

        .confirm-detail-item.full-width {
            grid-column: 1 / -1;
        }

        .confirm-detail-label {
            font-size: 12px;
            color: #6c757d;
        }

        .confirm-detail-value {
            font-size: 15px;
            font-weight: 600;
            color: #212529;
        }

        .confirm-detail-value.highlight {
            color: #dc3545;
            font-size: 16px;
        }

        .confirm-warning {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
            color: white;
            padding: 18px;
            border-radius: 10px;
            margin-top: 20px;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
        }

        .confirm-warning-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .confirm-warning-text {
            font-size: 13px;
            line-height: 1.6;
            opacity: 0.95;
        }

        .confirm-final-warning {
            background: linear-gradient(135deg, #ff4757 0%, #c0392b 100%);
            color: white;
            padding: 20px;
            border-radius: 12px;
            text-align: center;
            box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
        }

        .confirm-final-icon {
            font-size: 48px;
            margin-bottom: 15px;
        }

        .confirm-final-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 15px;
        }

        .confirm-final-content {
            font-size: 15px;
            line-height: 1.8;
            margin-bottom: 12px;
        }

        .confirm-final-note {
            font-size: 13px;
            opacity: 0.9;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.3);
        }

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

        .modal-header h2 {
            font-size: 22px;
            color: #333;
            margin: 0;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 28px;
            color: #999;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-btn:hover {
            color: #333;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label:not(.toggle-switch) {
            display: block;
            font-size: 14px;
            color: #555;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-group small {
            display: block;
            margin-top: 5px;
            color: #999;
            font-size: 14px;
        }

        .form-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 25px;
        }

        .form-actions button {
            padding: 10px 20px;
        }

        /* 交易历史样式 */
        .transaction-item {
            padding: 15px;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

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

        .transaction-info {
            flex: 1;
        }

        .transaction-type {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 600;
            margin-right: 8px;
        }

        .transaction-type.buy {
            background: #fff1f0;
            color: #f5222d;
        }

        .transaction-type.sell {
            background: #f6ffed;
            color: #52c41a;
        }

        .transaction-details {
            font-size: 14px;
            color: #666;
            margin-top: 5px;
        }

        .transaction-date {
            font-size: 14px;
            color: #999;
            margin-top: 3px;
        }

        /* 快速卖出按钮样式 */
        .quick-sell-buttons {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            margin-bottom: 8px;
        }

        .quick-sell-btn {
            flex: 1;
            padding: 8px 12px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            background: white;
            color: #666;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .quick-sell-btn:hover {
            border-color: #667eea;
            color: #667eea;
            background: rgba(102, 126, 234, 0.05);
            transform: translateY(-1px);
        }

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

        @media (max-width: 1200px) {
            .overview-stats {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 900px) {
            .overview-stats {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .funds-grid {
                grid-template-columns: 1fr;
            }
            
            .modal-content {
                padding: 20px;
            }

            .modal-confirm {
                max-width: 95%;
            }

            .confirm-detail-grid {
                grid-template-columns: 1fr;
            }

            .confirm-fund-name {
                font-size: 14px;
            }

            .confirm-section-title {
                font-size: 14px;
            }

            .confirm-final-icon {
                font-size: 36px;
            }

            .confirm-final-title {
                font-size: 14px;
            }

            .percentage-container {
                flex-wrap: wrap;
            }

            .percentage {
                font-size: 14px;
                padding: 8px 14px;
            }

            .daily-profit {
                font-size: 14px;
                padding: 8px 14px;
            }

            .quick-sell-btn {
                font-size: 14px;
                padding: 6px 10px;
            }

            .overview-stats {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .stat-item {
                padding: 15px;
            }

            .stat-value {
                font-size: 20px;
            }

            .overview-header h2 {
                font-size: 20px;
            }

            .overview-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }


        /* ========== v7.0 用户认证样式 ========== */
        .user-status {
            position: absolute;
            top: 25px;
            right: 25px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.3s;
            cursor: pointer;
            background: #e6f4ff;
            color: #1890ff;
        }

        .user-status:hover {
            background: #bae0ff;
        }

        

        
