/* ============================================================
   InvestAI Web App - 深色薄荷绿主题
   还原 Ardot 设计稿配色
   ============================================================ */

:root {
    /* 背景色系 */
    --bg-primary: #1F2A44;
    --bg-card: #253356;
    --bg-hover: #2D3D63;
    --bg-input: #1A2540;

    /* 强调色 */
    --accent: #4AE3B5;
    --accent-dim: rgba(74, 227, 181, 0.15);
    --accent-glow: rgba(74, 227, 181, 0.3);

    /* 辅助色 */
    --gold: #FFD580;

    /* 涨跌色（中国股市惯例：涨红跌绿） */
    --up: #F87171;
    --down: #34D399;

    /* 文字色 */
    --text-primary: #E8EDF5;
    --text-secondary: #8B9DC3;
    --text-muted: #5A6B8A;

    /* 边框 */
    --border: #2E4D62;
    --border-light: #355070;

    /* 字体 */
    --font-sans: 'Geist', 'Sarasa Gothic SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'Geist Mono', 'JetBrains Mono', 'Consolas', monospace;

    /* 圆角 */
    --radius: 12px;
    --radius-sm: 8px;

    /* 阴影 */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   基础重置
   ============================================================ */

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================================
   侧边栏
   ============================================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4AE3B5, #8CF5D1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #1F2A44;
    font-size: 18px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

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

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

.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-muted);
}

.nav-badge.soon {
    background: rgba(255, 213, 128, 0.15);
    color: var(--gold);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F2A44;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

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

/* A股标签 */
.market-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* ============================================================
   主内容区
   ============================================================ */

.main-content {
    margin-left: 240px;
    padding: 28px 32px;
    min-height: 100vh;
}

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

.page-title {
    font-size: 24px;
    font-weight: 700;
}

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

.update-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================================
   卡片
   ============================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: var(--border-light);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* ============================================================
   指数卡片
   ============================================================ */

.indices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.index-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.index-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.index-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.index-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.index-change {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ============================================================
   数据表格
   ============================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(46, 77, 98, 0.3);
    white-space: nowrap;
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

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

.stock-name {
    font-weight: 600;
}

.stock-code {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.price {
    font-family: var(--font-mono);
    font-weight: 600;
}

/* 涨跌色 */
.up { color: var(--up); }
.down { color: var(--down); }
.neutral { color: var(--text-secondary); }

/* ============================================================
   状态徽章
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-normal {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(74, 227, 181, 0.3);
}

.badge-near {
    background: rgba(255, 213, 128, 0.15);
    color: var(--gold);
    border: 1px solid rgba(255, 213, 128, 0.3);
}

.badge-triggered-tp {
    background: rgba(248, 113, 113, 0.15);
    color: var(--up);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-triggered-sl {
    background: rgba(52, 211, 153, 0.15);
    color: var(--down);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-error {
    background: rgba(138, 155, 179, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(138, 155, 179, 0.3);
}

/* ============================================================
   按钮
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #1F2A44;
}

.btn-primary:hover {
    background: #6BEDC4;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

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

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

/* ============================================================
   持仓总览卡片
   ============================================================ */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.summary-change {
    font-size: 13px;
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ============================================================
   推送通知开关
   ============================================================ */

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

.toggle-label {
    font-size: 14px;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--accent);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch.off {
    background: var(--bg-input);
}

.toggle-switch.off::after {
    right: auto;
    left: 2px;
}

/* ============================================================
   操作链接
   ============================================================ */

.action-link {
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    margin-right: 12px;
    transition: opacity 0.2s;
}

.action-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.action-link.danger {
    color: var(--up);
}

/* ============================================================
   加载状态
   ============================================================ */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

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

/* ============================================================
   空状态
   ============================================================ */

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

/* ============================================================
   手机端顶部标题栏 + 底部导航栏
   ============================================================ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    z-index: 200;
    padding: 0 16px;
    align-items: center;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 200;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 8px;
    transition: color 0.2s;
    min-width: 0;
    flex: 1;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
}

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-nav-item:hover {
    color: var(--text-primary);
}

/* ============================================================
   响应式 — 全面适配
   ============================================================ */

/* 平板端 (768px-1024px)：侧边栏收缩为图标模式 */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-logo .logo-text,
    .nav-item span:not(.nav-icon):not(.nav-badge),
    .user-info > div,
    .market-tag {
        display: none;
    }
    .sidebar-logo {
        justify-content: center;
        padding: 20px 10px;
    }
    .nav-item {
        justify-content: center;
        padding: 12px 8px;
    }
    .nav-badge {
        display: none;
    }
    .sidebar-footer {
        padding: 12px 10px;
    }
    .user-info {
        justify-content: center;
    }
    .main-content {
        margin-left: 60px;
        padding: 20px 16px;
    }
    .indices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trend-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-bottom-grid {
        grid-template-columns: 1fr;
    }
    .backtest-layout {
        flex-direction: column;
    }
    .backtest-config {
        width: 100%;
    }
    .kline-bottom-row {
        flex-direction: column;
    }
}

/* 手机端 (<768px)：隐藏侧边栏，显示底部导航 + 顶部标题 */
@media (max-width: 767px) {
    /* 侧边栏隐藏 */
    .sidebar {
        display: none;
    }
    .mobile-header {
        display: flex;
    }
    .mobile-nav {
        display: flex;
    }

    /* 主内容区 */
    .main-content {
        margin-left: 0;
        padding: 64px 12px 72px 12px;
        min-height: 100vh;
    }

    /* 页面标题 */
    .page-title {
        font-size: 18px;
    }
    .page-subtitle {
        font-size: 12px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }
    .header-right {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* 指数卡片 */
    .indices-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }
    .index-card {
        padding: 12px 10px;
    }
    .index-value {
        font-size: 18px;
    }
    .index-name {
        font-size: 12px;
    }
    .index-change {
        font-size: 12px;
    }

    /* 持仓总览卡片 */
    .summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .summary-card {
        padding: 12px 10px;
    }
    .summary-value {
        font-size: 18px;
    }
    .summary-label {
        font-size: 12px;
    }

    /* 卡片 */
    .card {
        padding: 12px 10px;
        margin-bottom: 12px;
        border-radius: var(--radius-sm);
    }
    .card-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
    }
    .card-title {
        font-size: 14px;
    }

    /* 数据表格 — 横向滚动 + 首列冻结 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    .data-table {
        font-size: 12px;
        min-width: 560px; /* 让表格超出屏幕宽度，触发横向滚动 */
    }
    .data-table th {
        padding: 8px 10px;
        font-size: 11px;
    }
    .data-table td {
        padding: 8px 10px;
    }
    /* 首列冻结在手机端生效：给冻结列加最小宽度 */
    .sticky-col {
        min-width: 80px;
        max-width: 100px;
        white-space: nowrap;
    }

    /* 资金流向 */
    .fund-flow-summary {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    .fund-flow-summary-value {
        font-size: 18px;
    }

    /* RSI 股票列表 — 横向滚动 + 首列冻结 */
    .rsi-scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    .rsi-stock-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;
        font-size: 12px;
        gap: 8px;
        padding: 10px 12px;
        min-width: 500px; /* 让列表超出屏幕宽度，触发横向滚动 */
    }
    .rsi-stock-row .hide-mobile {
        display: none;
    }
    .rsi-value {
        font-size: 14px;
    }
    .sticky-col-grid {
        min-width: 80px;
        max-width: 100px;
    }

    /* AI 双栏 */
    .ai-bottom-grid {
        grid-template-columns: 1fr;
    }
    .chat-messages {
        max-height: 250px;
    }
    .chat-input-area {
        flex-direction: row;
    }

    /* 趋势洞察 */
    .trend-metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .trend-metric-value {
        font-size: 22px;
    }
    .trend-metric-card {
        padding: 12px;
    }

    /* 筛选表 */
    .filter-row {
        gap: 12px;
    }
    .filter-group label {
        font-size: 11px;
    }
    .range-input input {
        width: 60px;
    }
    .filter-select {
        width: 120px;
    }

    /* 回测 */
    .backtest-layout {
        flex-direction: column;
    }
    .backtest-config {
        width: 100%;
    }

    /* K线 */
    .kline-stock-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 10px;
    }
    .stock-select {
        min-width: 100%;
    }
    .stock-info {
        gap: 12px;
    }
    .stock-price {
        font-size: 22px;
    }
    .ohlcv-data {
        gap: 10px;
    }
    .kline-toolbar {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }
    .time-range {
        justify-content: center;
        gap: 4px;
    }
    .range-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .indicator-toggles {
        justify-content: center;
    }
    .kline-bottom-row {
        flex-direction: column;
    }
    .indicator-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 模态框 */
    .modal-content {
        width: 94%;
        max-height: 85vh;
    }
    .modal-body {
        padding: 16px;
    }
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    .modal-footer {
        padding: 12px 16px;
    }

    /* 按钮触控友好 */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    .btn-sm {
        padding: 8px 12px;
    }
    .nav-badge {
        font-size: 9px;
        padding: 1px 4px;
    }

    /* 信号设置 */
    .signal-settings {
        flex-direction: column;
        gap: 12px;
    }
}

/* 极小屏 (<380px)：进一步紧凑 */
@media (max-width: 379px) {
    .indices-grid {
        grid-template-columns: 1fr;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .trend-metrics-grid {
        grid-template-columns: 1fr;
    }
    .index-value {
        font-size: 16px;
    }
    .summary-value {
        font-size: 16px;
    }
    .trend-metric-value {
        font-size: 18px;
    }
    .card {
        padding: 10px 8px;
        border-radius: 6px;
    }
    .mobile-nav-item span {
        font-size: 10px;
    }
}

/* ============================================================
   ECharts 图表容器 — 响应式
   ============================================================ */

.chart-container {
    width: 100%;
    height: 320px;
}

@media (max-width: 767px) {
    .chart-container {
        height: 240px;
    }
}

/* ============================================================
   AI 报告卡片
   ============================================================ */

.ai-report-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(46, 77, 98, 0.3);
}

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

.ai-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ai-report-title {
    font-size: 14px;
    font-weight: 600;
}

.ai-report-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.ai-report-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.ai-report-content.expanded {
    max-height: none;
}

/* ============================================================
   距离进度条
   ============================================================ */

.distance-bar {
    width: 60px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.distance-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.distance-fill.tp { background: var(--accent); }
.distance-fill.sl { background: var(--up); }

/* ============================================================
   AI 智能分析页
   ============================================================ */

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

/* AI Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(74, 227, 181, 0.3);
}

.ai-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--accent);
    color: #1F2A44;
    font-size: 11px;
    font-weight: 700;
}

/* Nav live badge */
.nav-badge.live {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(74, 227, 181, 0.3);
}

.live-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 4px;
    animation: pulse 2s ease-in-out infinite;
}

/* RSI 卡片发光边框 */
.rsi-card {
    border: 1px solid rgba(74, 227, 181, 0.2);
    box-shadow: 0 0 24px rgba(74, 227, 181, 0.08);
}

.rsi-methodology {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.methodology-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.methodology-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* RSI 股票列表 */
.rsi-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sticky-col-grid {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    min-width: 100px;
    max-width: 140px;
    white-space: nowrap;
}

.sticky-col-grid::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: -1px;
    width: 6px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.rsi-stock-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(46, 77, 98, 0.3);
    transition: background 0.2s;
}

.rsi-stock-row:hover {
    background: var(--bg-hover);
}

.rsi-stock-row:last-child {
    border-bottom: none;
}

.rsi-stock-row.header {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.rsi-stock-name {
    font-weight: 600;
    font-size: 14px;
}

.rsi-stock-code {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.rsi-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 16px;
}

.rsi-signal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rsi-signal.buy {
    background: rgba(248, 113, 113, 0.15);
    color: var(--up);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.rsi-signal.watch {
    background: rgba(255, 213, 128, 0.15);
    color: var(--gold);
    border: 1px solid rgba(255, 213, 128, 0.3);
}

.rsi-signal.sell {
    background: rgba(52, 211, 153, 0.15);
    color: var(--down);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.rsi-signal.neutral {
    background: rgba(138, 155, 179, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(138, 155, 179, 0.3);
}

/* 底部双栏 */
.ai-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ai-diag-card,
.ai-chat-card {
    display: flex;
    flex-direction: column;
}

/* 大盘诊断 */
#marketDiagnosis {
    flex: 1;
    min-height: 200px;
}

.diag-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.diag-content h3,
.diag-content strong {
    color: var(--accent);
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 4px;
    display: block;
}

.diag-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-top: 12px;
    background: var(--bg-input);
    border-radius: 6px;
    border: 1px solid rgba(74, 227, 181, 0.3);
}

.summary-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.summary-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 个股问答聊天 */
.chat-stock-select {
    margin-bottom: 12px;
}

.chat-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.chat-select:focus {
    border-color: var(--accent);
}

.chat-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    min-height: 200px;
    max-height: 350px;
    overflow-y: auto;
    padding: 8px 0;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-muted);
}

.chat-empty p {
    font-size: 13px;
    margin-bottom: 16px;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.chat-suggestion-btn {
    padding: 6px 12px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.chat-suggestion-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-msg {
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

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

.chat-msg-user {
    display: flex;
    justify-content: flex-end;
}

.chat-msg-user .chat-bubble {
    background: var(--accent);
    color: #1F2A44;
    border-radius: 12px 12px 4px 12px;
}

.chat-msg-ai .chat-bubble {
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: 12px 12px 12px 4px;
    border: 1px solid var(--border);
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.chat-msg-ai .chat-bubble strong {
    color: var(--accent);
}

.chat-msg-ai .chat-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

/* AI 趋势洞察 */
.trend-card {
    border: 1px solid rgba(74, 227, 181, 0.2);
}

.trend-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.trend-metric-card {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trend-metric-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.trend-metric-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.trend-metric-value.gold { color: var(--gold); }
.trend-metric-value.accent { color: var(--accent); }

.trend-metric-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.trend-metric-sub.accent { color: var(--accent); }

/* 仪表条 */
.gauge-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.gauge-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.gauge-fill.gold { background: var(--gold); }

/* 迷你柱状图 */
.mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 24px;
    margin-top: 8px;
}

.mini-bar {
    flex: 1;
    background: var(--accent);
    border-radius: 2px;
    min-height: 3px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.mini-bar:hover {
    opacity: 1;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* 板块标签 */
.sector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.sector-tag {
    padding: 4px 8px;
    background: var(--bg-card);
    border: 1px solid rgba(74, 227, 181, 0.4);
    border-radius: 4px;
    color: var(--accent);
    font-size: 11px;
}

/* 风险提示条 */
.disclaimer-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 213, 128, 0.08);
    border: 1px solid rgba(255, 213, 128, 0.2);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-size: 12px;
    line-height: 1.5;
    margin-top: 8px;
}

/* 移动端已在通用响应式区块中统一处理 */

/* ============================================================
   策略筛选页
   ============================================================ */

.badge-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}
.badge-outline .badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-outline .badge-dot.accent { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.badge-gold {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255, 213, 128, 0.15);
    border: 1px solid rgba(255, 213, 128, 0.4);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
}

.filter-form { padding: 4px 0; }
.filter-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label { font-size: 12px; color: var(--text-secondary); }
.range-input { display: flex; align-items: center; gap: 8px; }
.range-input input, .filter-select {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 13px;
    width: 100px;
    outline: none;
    transition: border-color 0.2s;
}
.range-input input:focus, .filter-select:focus { border-color: var(--accent); }
.range-input input { width: 80px; }
.range-sep { color: var(--text-secondary); font-size: 12px; }
.filter-select { width: 160px; cursor: pointer; }

.filter-actions { display: flex; gap: 12px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--accent);
    color: #1A2338;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover { box-shadow: 0 0 16px rgba(74, 227, 181, 0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
    padding: 8px 18px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.result-count {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-left: 8px;
}

.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 冻结首列：sticky first column */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
}
.data-table thead th.sticky-col {
    background: var(--bg-card);
    z-index: 3; /* th比td层级更高，确保表头不被数据行遮盖 */
}
/* 首列右侧阴影分隔线 — 让冻结列与滚动区域视觉分离 */
.sticky-col::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: -1px;
    width: 6px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(180, 240, 255, 0.05);
    white-space: nowrap;
}
.data-table tbody tr:hover { background: rgba(74, 227, 181, 0.05); }
.data-table .empty-row td { text-align: center; color: var(--text-secondary); padding: 24px; }
.signal-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.signal-tag.buy { background: rgba(249, 113, 113, 0.2); color: var(--up); }
.signal-tag.watch { background: rgba(255, 213, 128, 0.2); color: var(--gold); }
.signal-tag.sell { background: rgba(52, 211, 153, 0.2); color: var(--down); }
.signal-tag.neutral { background: rgba(138, 149, 163, 0.2); color: var(--text-secondary); }
.trend-tag { font-size: 12px; }
.trend-tag.up { color: var(--up); }
.trend-tag.down { color: var(--down); }

/* 回测布局 */
.backtest-layout {
    display: flex;
    gap: 16px;
}
.backtest-config {
    width: 320px;
    flex-shrink: 0;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 20px;
}
.config-title { font-size: 14px; color: var(--text-primary); margin-bottom: 16px; }
.config-form { display: flex; flex-direction: column; gap: 14px; }
.config-group { display: flex; flex-direction: column; gap: 6px; }
.config-group label { font-size: 12px; color: var(--text-secondary); }
.config-form .filter-select { width: 100%; }

.backtest-results {
    flex: 1;
    min-height: 200px;
}
.bt-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-secondary);
    font-size: 14px;
}
.bt-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.bt-stat-item {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 14px;
}
.bt-stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.bt-stat-value { font-size: 22px; font-weight: 700; font-family: 'Geist Mono', monospace; }
.bt-stat-value.up { color: var(--up); }
.bt-stat-value.down { color: var(--down); }
.bt-stat-value.accent { color: var(--accent); }
.bt-trades { font-size: 12px; }
.bt-trades th { color: var(--text-secondary); text-align: left; padding: 6px 8px; }
.bt-trades td { padding: 6px 8px; border-top: 1px solid rgba(180, 240, 255, 0.05); }

/* 信号提醒中心 */
.signal-card { border: 1px solid rgba(255, 213, 128, 0.3); }
.signal-list { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.signal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}
.signal-item.buy { border-left-color: var(--up); }
.signal-item.sell { border-left-color: var(--down); }
.signal-item.watch { border-left-color: var(--gold); }
.signal-info { display: flex; align-items: center; gap: 12px; }
.signal-name { font-size: 14px; font-weight: 600; }
.signal-detail { font-size: 12px; color: var(--text-secondary); }
.signal-empty { text-align: center; color: var(--text-secondary); padding: 24px; font-size: 13px; }

.signal-settings {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.signal-setting-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--border); border-radius: 20px; cursor: pointer; transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 14px; height: 14px;
    left: 3px; bottom: 3px; background: var(--text-secondary); border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: #1A2338; }

/* ============================================================
   K线分析页
   ============================================================ */

.kline-stock-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}
.stock-select-wrap { flex-shrink: 0; }
.stock-select {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 200px;
}
.stock-select:focus { border-color: var(--accent); }
.stock-info { display: flex; align-items: center; gap: 20px; flex: 1; }
.stock-name-block { display: flex; flex-direction: column; gap: 2px; }
.stock-name { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.stock-code { font-size: 12px; color: var(--text-secondary); font-family: 'Geist Mono', monospace; }
.stock-price-block { display: flex; align-items: baseline; gap: 10px; }
.stock-price { font-size: 28px; font-weight: 700; font-family: 'Geist Mono', monospace; }
.stock-change { font-size: 14px; font-weight: 600; }
.ohlcv-data { display: flex; gap: 16px; }
.ohlcv-item { display: flex; flex-direction: column; gap: 2px; }
.ohlcv-label { font-size: 11px; color: var(--text-secondary); }
.ohlcv-val { font-size: 14px; font-family: 'Geist Mono', monospace; font-weight: 600; }
.ohlcv-val.up { color: var(--up); }
.ohlcv-val.down { color: var(--down); }

.kline-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 12px;
}
.time-range { display: flex; gap: 4px; }
.range-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.range-btn:hover { border-color: var(--accent); color: var(--accent); }
.range-btn.active { background: var(--accent); color: #1A2338; border-color: var(--accent); font-weight: 600; }

.indicator-toggles { display: flex; gap: 16px; }
.toggle-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.toggle-label input { accent-color: var(--accent); }

.kline-chart-card, .vol-chart-card, .macd-chart-card { padding: 12px 16px; margin-top: 12px; }
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.chart-title { font-size: 13px; color: var(--text-secondary); font-family: 'Geist Mono', monospace; }
.chart-ma-legend { margin-left: 12px; }
.chart-update-time { font-size: 11px; color: var(--text-secondary); }
.kline-canvas { display: block; width: 100%; }
.vol-canvas, .macd-canvas { display: block; width: 100%; }

.kline-bottom-row {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}
.ai-read-card { flex: 2; border: 1px solid rgba(74, 227, 181, 0.3); }
.indicator-card { flex: 1; }

.ai-read-content { min-height: 120px; }
.ai-read-btn { margin-bottom: 12px; }
.ai-read-placeholder { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.ai-read-text { font-size: 13px; line-height: 1.8; color: #C8D0DC; white-space: pre-wrap; }

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.indicator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
}
.ind-label { font-size: 12px; color: var(--text-secondary); }
.ind-val { font-size: 14px; font-family: 'Geist Mono', monospace; font-weight: 600; }

/* 移动端已在通用响应式区块中统一处理 */

/* ============================================================
   持仓编辑模态框
   ============================================================ */

.action-link {
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    margin-right: 12px;
    transition: opacity 0.2s;
}
.action-link:hover { opacity: 0.7; }
.action-link.danger { color: var(--down); }

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-main); color: var(--text-primary); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-input {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Geist Mono', monospace;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-secondary); opacity: 0.5; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   主力资金流向
   ============================================================ */

.fund-flow-summary {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}
.fund-flow-summary-item { display: flex; flex-direction: column; gap: 4px; }
.fund-flow-summary-label { font-size: 12px; color: var(--text-secondary); }
.fund-flow-summary-value { font-size: 24px; font-weight: 700; font-family: 'Geist Mono', monospace; }
.fund-flow-summary-value.up { color: var(--up); }
.fund-flow-summary-value.down { color: var(--down); }
.fund-flow-pct { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* 移动端已在通用响应式区块中统一处理 */
