/* VIP30 AI Trading Dashboard - 白色风格 */

:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e0e0e0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent-blue: #1890ff;
    --accent-green: #52c41a;
    --accent-red: #ff4d4f;
    --accent-yellow: #faad14;
    --accent-purple: #722ed1;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
    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-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
}

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

/* ==================== Header ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-blue);
}

.version {
    font-size: 12px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.disclaimer {
    font-size: 13px;
    color: #e6a23c;
    background-color: #fdf6ec;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #faecd8;
}

.current-datetime {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 24px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.status-item .label {
    font-size: 12px;
    color: var(--text-muted);
}

.status-item .value {
    font-size: 13px;
    font-weight: 500;
}

.mode-tag {
    background-color: var(--accent-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.ws-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ws-status.connected {
    background-color: #f6ffed;
    color: var(--accent-green);
    border: 1px solid #b7eb8f;
}

.ws-status.disconnected {
    background-color: #fff2f0;
    color: var(--accent-red);
    border: 1px solid #ffccc7;
}

/* ==================== Card ==================== */
.card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.badge {
    background-color: var(--accent-blue);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: normal;
}

/* ==================== 账户概要（主图上方） ==================== */
.account-summary {
    padding: 12px 20px;
    margin-bottom: 16px;
}

.account-metrics {
    display: flex;
    gap: 50px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-item.primary .metric-value {
    font-size: 26px;
    color: var(--text-primary);
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
}

.metric-value.positive {
    color: var(--accent-red);  /* 中国习惯：红涨 */
}

.metric-value.negative {
    color: var(--accent-green);  /* 中国习惯：绿跌 */
}

.metric-value.neutral {
    color: var(--text-primary);
}

/* ==================== 三栏布局 ==================== */
.main-content {
    display: grid;
    grid-template-columns: 320px 1fr 380px;
    gap: 20px;
    margin-bottom: 20px;
}

/* 左侧：交易决策 */
.left-panel .decisions {
    height: 560px;
    display: flex;
    flex-direction: column;
}

.decisions-list {
    flex: 1;
    overflow-y: auto;
}

.decision-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent-blue);
}

.decision-item .decision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.decision-item .decision-time {
    font-size: 11px;
    color: var(--text-muted);
}

.decision-item .action {
    font-weight: 600;
    font-size: 15px;
}

.decision-item .action.buy {
    color: var(--accent-red);  /* 中国习惯：买入红色 */
}

.decision-item .action.sell {
    color: var(--accent-green);  /* 中国习惯：卖出绿色 */
}

.decision-item .details {
    font-size: 13px;
    color: var(--text-secondary);
}

.decision-item .remark {
    font-size: 12px;
    margin-top: 4px;
    color: var(--accent-blue);
    line-height: 1.4;
}

/* 被跳过的决策样式 */
.decision-item.decision-skipped {
    opacity: 0.6;
    background-color: #f9f9f9;
    border-left: 3px solid #999;
}

.decision-item.decision-skipped .action {
    background-color: #999 !important;
}

.skip-badge {
    display: inline-block;
    padding: 1px 6px;
    background-color: #ff4d4f;
    color: white;
    font-size: 10px;
    border-radius: 3px;
    margin-left: 6px;
}

.skip-reason {
    display: block;
    font-size: 11px;
    color: #ff4d4f;
    margin-top: 4px;
    padding: 2px 6px;
    background-color: #fff2f0;
    border-radius: 3px;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* 中间：权益曲线 */
.center-panel .equity-chart {
    height: 560px;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.chart-header h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
    text-align: center;
}

.chart-title-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.display-toggle {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 2px;
}

.toggle-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    color: var(--accent-blue);
}

.toggle-btn.active {
    background-color: #fff;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.latest-equity-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.latest-equity-label.positive {
    color: var(--accent-red);  /* 中国习惯：红涨 */
}

.latest-equity-label.negative {
    color: var(--accent-green);  /* 中国习惯：绿跌 */
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    justify-content: flex-end;
}

.period-selector {
    display: flex;
    gap: 4px;
}

.reset-btn {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.reset-btn.active {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.period-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

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

.chart-container {
    height: 480px;
    position: relative;
    overflow: hidden;
}

/* Plotly 图表适配 */
.chart-container > div {
    width: 100% !important;
    height: 100% !important;
}

#equityChart {
    width: 100%;
    height: 100%;
}

/* 右侧：AI 分析 */
.right-panel .ai-analysis {
    height: 560px;
    display: flex;
    flex-direction: column;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
}

.ai-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

.ai-message {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent-blue);
}

.ai-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.ai-message-time {
    color: var(--accent-blue);
    font-weight: 500;
}

.ai-message-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-preview,
.ai-full {
    white-space: pre-wrap;
    word-break: break-word;
}

.expand-btn {
    margin-top: 8px;
    padding: 2px 8px;
    border: 1px solid var(--accent-blue);
    background-color: transparent;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent-blue);
    cursor: pointer;
    transition: all 0.2s;
}

.expand-btn:hover {
    background-color: var(--accent-blue);
    color: white;
}

/* AI 交易决策标签 */
.ai-decisions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.decision-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.decision-buy-open {
    background-color: #fff0f0;  /* 中国习惯：买开红色 */
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
}

.decision-sell-open {
    background-color: #f0fff0;  /* 中国习惯：卖开绿色 */
    border: 1px solid #52c41a;
    color: #52c41a;
}

.decision-buy-close {
    background-color: #e6fffb;
    border: 1px solid #13c2c2;
    color: #13c2c2;
}

.decision-sell-close {
    background-color: #fff7e6;
    border: 1px solid #fa8c16;
    color: #fa8c16;
}

.decision-empty {
    background-color: #f5f5f5;
    border: 1px solid #d9d9d9;
    color: #999999;
}

.decision-default {
    background-color: #f0f0f0;
    border: 1px solid #bfbfbf;
    color: #666666;
}

/* ==================== 底部标签页 ==================== */
.bottom-panel {
    margin-top: 0;
    grid-column: 1 / -1;  /* 桌面端跨越所有列 */
}

.bottom-tabs {
    padding: 0;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: #fafafa;
    border-radius: 8px 8px 0 0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--accent-blue);
}

.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    font-weight: 500;
}

.tabs-content {
    max-height: 280px;
    overflow-y: auto;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ==================== Data Table ==================== */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    background-color: #fafafa;
}

.data-table td {
    font-size: 14px;
}

.data-table .empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

.data-table .summary-row {
    background-color: #fafafa;
    font-weight: 500;
}

.data-table .summary-row td {
    border-bottom: none;
}

/* 方向标签 */
.direction-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.direction-tag.buy {
    background-color: #fff2f0;  /* 中国习惯：买入红色 */
    color: var(--accent-red);
}

.direction-tag.sell {
    background-color: #f6ffed;  /* 中国习惯：卖出绿色 */
    color: var(--accent-green);
}

.positive {
    color: var(--accent-red);  /* 中国习惯：红涨 */
}

.negative {
    color: var(--accent-green);  /* 中国习惯：绿跌 */
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ==================== 派大星介绍卡片 ==================== */
.patrick-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0e6 50%, #fffbe6 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 2px solid #ffccc7;
    position: relative;
    overflow: hidden;
}

.patrick-card::before {
    content: '🍺';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    opacity: 0.3;
}

.patrick-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ff7875;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
    background: #ffccc7;
}

.patrick-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;  /* 让派大星的脸部更好地居中显示 */
}

.patrick-info {
    flex: 1;
}

.patrick-name {
    font-size: 18px;
    font-weight: 700;
    color: #cf1322;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(255, 120, 117, 0.3);
}

.patrick-subtitle {
    font-size: 13px;
    color: #fa8c16;
    font-style: italic;
    margin-bottom: 8px;
    padding: 2px 8px;
    background: rgba(250, 140, 22, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.patrick-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    border-left: 3px solid #52c41a;
    line-height: 1.7;
}

.patrick-desc p {
    margin: 0 0 8px 0;
    padding: 0;
}

.patrick-desc p:last-child {
    margin-bottom: 0;
}

.patrick-desc strong {
    color: #333;
}

.patrick-desc em {
    color: var(--accent-blue);
    font-style: normal;
    font-weight: 500;
}

.patrick-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.patrick-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.patrick-details strong {
    color: var(--accent-blue);
    font-weight: 600;
}

.patrick-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.patrick-link:hover {
    background: rgba(24, 144, 255, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.patrick-link:hover strong {
    color: var(--accent-blue);
}

/* ==================== Responsive ==================== */
@media (max-width: 1600px) {
    .main-content {
        grid-template-columns: 280px 1fr 320px;
    }
}

@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 260px 1fr 300px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-panel .decisions,
    .center-panel .equity-chart,
    .right-panel .ai-analysis {
        height: auto;
        min-height: 300px;
    }
    
    .chart-container {
        height: 350px;
    }
}

/* ==================== 平板适配 ==================== */
@media (max-width: 992px) {
    .container {
        padding: 12px;
    }
    
    .header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .disclaimer {
        text-align: center;
        width: 100%;
    }
    
    .patrick-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .patrick-card::before {
        display: none;
    }
    
    .patrick-avatar {
        width: 60px;
        height: 60px;
    }
    
    .patrick-details {
        justify-content: center;
    }
    
    .account-metrics {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: space-between;
    }
    
    .metric-item {
        flex: 0 0 calc(50% - 8px);
    }
    
    .chart-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .chart-title-left {
        justify-content: center;
        min-width: auto;
    }
    
    .chart-header h2 {
        order: -1;
    }
    
    .chart-controls {
        justify-content: center;
        min-width: auto;
        flex-wrap: wrap;
    }
}

/* ==================== 手机端适配 ==================== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    
    .logo {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    .logo h1 {
        font-size: 16px;
        text-align: center;
    }
    
    .version {
        font-size: 11px;
    }
    
    .disclaimer {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .current-datetime {
        font-size: 12px;
    }
    
    /* 派大星卡片 */
    .patrick-card {
        padding: 12px;
        gap: 12px;
        margin-bottom: 10px;
    }
    
    .patrick-avatar {
        width: 50px;
        height: 50px;
    }
    
    .patrick-name {
        font-size: 14px;
    }
    
    .patrick-subtitle {
        font-size: 11px;
    }
    
    .patrick-desc {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .patrick-details {
        gap: 8px;
        font-size: 11px;
    }
    
    .patrick-link {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    /* 账户概要 */
    .account-summary {
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    
    .account-metrics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .metric-item {
        flex: none;
    }
    
    .metric-item.primary {
        grid-column: span 2;
        text-align: center;
    }
    
    .metric-item.primary .metric-value {
        font-size: 22px;
    }
    
    .metric-label {
        font-size: 11px;
    }
    
    .metric-value {
        font-size: 14px;
    }
    
    /* 卡片 */
    .card {
        padding: 12px;
        border-radius: 6px;
    }
    
    .card h2 {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    /* 三栏布局 - 移动端单列 + 重新排序 */
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    /* 移动端顺序：权益曲线 → 持仓成交 → 交易决策 → AI分析 */
    .center-panel { order: 1; }
    .bottom-panel { order: 2; }
    .left-panel { order: 3; }
    .right-panel { order: 4; }
    
    .left-panel .decisions,
    .right-panel .ai-analysis {
        height: auto;
        max-height: 400px;
        min-height: 200px;
    }
    
    .center-panel .equity-chart {
        height: auto;
        min-height: 350px;
    }
    
    .bottom-panel {
        width: 100%;
    }
    
    /* 权益曲线图表 */
    .chart-header {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    
    .chart-title-left {
        flex-direction: column;
        gap: 8px;
        min-width: auto;
    }
    
    .display-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .toggle-btn {
        flex: 1;
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .latest-equity-label {
        font-size: 16px;
        text-align: center;
    }
    
    .chart-header h2 {
        order: -1;
        text-align: center;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .chart-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        min-width: auto;
    }
    
    .period-selector {
        width: 100%;
        justify-content: center;
    }
    
    .period-btn {
        flex: 1;
        padding: 6px 8px;
        font-size: 12px;
        text-align: center;
    }
    
    .reset-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .chart-container {
        height: 280px;
        overflow: hidden;
    }
    
    /* Plotly 图表移动端适配 */
    .chart-container .js-plotly-plot,
    .chart-container .plot-container,
    .chart-container .svg-container {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* 交易决策 */
    .decision-item {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .decision-item .action {
        font-size: 13px;
    }
    
    .decision-item .details {
        font-size: 12px;
    }
    
    .decision-item .remark {
        font-size: 11px;
    }
    
    /* AI 分析 */
    .ai-message {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .ai-message-header {
        font-size: 11px;
    }
    
    .ai-message-content {
        font-size: 13px;
    }
    
    /* 底部标签页 */
    .bottom-panel {
        margin-top: 0;
    }
    
    .tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .tabs-content {
        max-height: 350px;
    }
    
    /* 数据表格 - 移动端滚动 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* 分页控件 */
    .pagination {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }
    
    .page-info {
        font-size: 12px;
    }
    
    .page-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .pagination-wrapper {
        padding: 0 12px 12px;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 20px;
        font-size: 13px;
    }
    
    .ai-empty {
        padding: 30px 15px;
    }
}

/* ==================== 超小屏幕适配 (< 480px) ==================== */
@media (max-width: 480px) {
    .container {
        padding: 6px;
    }
    
    .logo h1 {
        font-size: 14px;
    }
    
    .patrick-name {
        font-size: 13px;
    }
    
    .patrick-details {
        flex-direction: column;
        gap: 6px;
    }
    
    .account-metrics {
        gap: 8px;
    }
    
    .metric-item.primary .metric-value {
        font-size: 20px;
    }
    
    .metric-value {
        font-size: 13px;
    }
    
    .metric-label {
        font-size: 10px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .period-btn {
        font-size: 11px;
        padding: 5px 6px;
    }
    
    .latest-equity-label {
        font-size: 14px;
    }
    
    .page-btn {
        min-width: 26px;
        height: 26px;
        font-size: 11px;
        padding: 0 4px;
    }
    
    .page-ellipsis {
        padding: 0 4px;
    }
}

/* ==================== 分页控件 ==================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
}

.pagination-wrapper {
    padding: 0 16px 16px;
}

.page-info {
    font-size: 13px;
    color: var(--text-muted);
}

.page-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.page-btn.active {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.page-btn.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
}
