/* 基础重置和字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

body.auth-logged-out .container {
    display: none;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部区域 */
.header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
}

.header-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.header-account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.logout-btn {
    flex: 0 0 auto;
    border: 1px solid #d8deeb;
    border-radius: 8px;
    padding: 7px 12px;
    background: #fff;
    color: #5f6b85;
    font-size: 13px;
    cursor: pointer;
}

.logout-btn:hover {
    border-color: #667eea;
    color: #536dce;
    background: #f7f8ff;
}

/* 搜索框 */
.search-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.search-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 24px;
}

.search-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.search-hint {
    font-size: 13px;
    color: #999;
}

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

.search-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-item label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.search-item select,
.search-item input {
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 15px;
    min-width: 200px;
    transition: all 0.3s ease;
    background: white;
}

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

/* 藏品卡片容器 */
.collection-cards-container {
    margin-top: 10px;
}

.loading-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #999;
}

.loading-cards .spinner.small {
    width: 30px;
    height: 30px;
    border-width: 3px;
    border-top-color: #667eea;
}

/* 藏品分组 */
.collection-group {
    margin-bottom: 20px;
}

.group-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.group-title {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.group-hint {
    font-size: 12px;
    color: #999;
}

.no-data {
    color: #999;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

/* 藏品卡片列表 */
.collection-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* 单个藏品卡片 */
.collection-card {
    background: white;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.collection-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.collection-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.collection-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
}

.collection-card-name {
    font-weight: 700;
    color: #333;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.collection-card-benchmark {
    font-size: 12px;
    color: #666;
}

.collection-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

/* 价格颜色（独立于涨跌幅，避免 font-size 被覆盖） */
.collection-card-price-up { color: #ef4444; }
.collection-card-price-down { color: #22c55e; }
.collection-card-price-gray { color: #999; }

.collection-card-no-price {
    font-size: 14px;
    color: #999;
    font-weight: normal;
}

.collection-card-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.collection-card-stat {
    font-size: 12px;
    color: #666;
}

.collection-card-change-up {
    font-size: 12px;
    font-weight: normal;
    color: #ef4444;
}

.collection-card-change-down {
    font-size: 12px;
    font-weight: normal;
    color: #22c55e;
}

.collection-card-change-gray {
    font-size: 12px;
    font-weight: normal;
    color: #999;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
}

.btn-small {
    padding: 8px 16px;
    border: 2px solid #e1e5eb;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-small:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

/* 主内容区域 */
.main-content {
    position: relative;
}

/* 加载提示 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

/* 错误提示 */
.error-msg {
    background: #fee;
    border: 2px solid #f87171;
    color: #dc2626;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
}

/* 藏品指标卡片 */
.collection-metrics {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 20px;
    height: 102.8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.metric-card.highlight .metric-label {
    color: rgba(255, 255, 255, 0.9);
}

.metric-card.highlight .metric-value {
    color: white;
}

.metric-card.highlight.up {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.metric-card.highlight.down {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.publisher-summary-container #companyMarketCapCard.highlight .metric-label,
.publisher-summary-container #companyMarketCapCard.highlight .metric-value,
.publisher-summary-container #companyMarketCapCard.highlight .metric-subvalue {
    color: #2c3e50;
}

.metric-label {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.metric-subvalue {
    margin-top: 4px;
    overflow: hidden;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.table-sort-btn { border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.table-sort-btn:hover { color: #334155; }

.metric-card.has-price-range {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 20px;
}

.metric-card.has-price-range .metric-label {
    margin-bottom: 2px;
}

.metric-card.has-price-range .metric-subvalue {
    margin-top: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
}

/* K线容器 */
.kline-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.kline-header h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.kline-tip {
    color: #999;
    font-size: 13px;
}

.kline-chart {
    width: 100%;
    height: 400px;
}
 
.trend-container {
     background: white;
     border-radius: 16px;
     padding: 24px;
     margin-bottom: 30px;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
 }
 
 .trend-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 20px;
 }
 
 .trend-header h3 {
     color: #2c3e50;
     font-size: 18px;
     font-weight: 600;
 }
 
 .trend-tip {
     color: #999;
     font-size: 13px;
 }
 
.trend-chart {
     width: 100%;
 }

/* 模块标题 */
.modules-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.publisher-summary-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 0 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.publisher-summary-container h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.publisher-summary-container #companyMarketCapCard {
    padding: 10px 20px;
}

.publisher-summary-container #companyMarketCapCard .metric-label {
    margin-bottom: 4px;
}

.publisher-summary-container #companyMarketCapCard .metric-subvalue {
    margin-top: 0;
}

.company-metrics-empty {
    min-height: 282px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    font-size: 15px;
}

#companyMetrics[hidden],
#companyMetricsEmpty[hidden] {
    display: none !important;
}

.platform-trend-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 15px;
}

.modules-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #e0e0e0;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #d0d0d0;
}

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

/* 日期导航按钮 */
#date-nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
}

.date-nav-btn {
    padding: 8px 12px;
    border: none;
    background: #e0e0e0;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s;
}

.date-nav-btn:hover {
    background: #d0d0d0;
}

.date-nav-btn:disabled,
.date-nav-btn.disabled {
    background: #f0f0f0 !important;
    color: #ccc !important;
    cursor: not-allowed !important;
}

#date-nav .tab-btn {
    border-radius: 0;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.modules-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

/* 数据区域 */
.data-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .icon {
    font-size: 28px;
}

.total-collection-select {
    width: min(260px, 32vw);
    min-width: 0;
    max-width: min(260px, 32vw);
    height: 24px;
    margin: 0 4px;
    border: 1px solid #d8dee9;
    border-radius: 6px;
    background-color: #fff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

.total-collection-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.total-collection-select:disabled {
    cursor: wait;
    color: #9ca3af;
    background-color: #f8fafc;
}

/* 总数据标题刷新按钮 */
.refresh-collection-btn {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    white-space: nowrap;
}
.refresh-collection-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

/* 模块标签栏中的今日数据按钮 */
.modules-tabs .today-data-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background: #e0e0e0;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.modules-tabs .today-data-btn:hover:not(:disabled) {
    background: #d0d0d0;
}

.modules-tabs .today-data-btn:disabled {
    color: #666;
    cursor: not-allowed;
}

/* 日期导航按钮 */
.date-nav-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 0;
    background: #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

/* 模块网格布局 - 每个模块独占一行 */
.modules-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px;
    width: 100%;
}

.modules-grid .module-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

.module-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    min-width: 0;
}

.module-pair .module-card {
    min-width: 0;
}

@media (max-width: 900px) {
    .module-pair {
        grid-template-columns: 1fr;
    }
}

/* 模块卡片 */
.module-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 24px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
}

.card-heading-context,
.card-heading-title {
    display: block;
}

.card-heading-context {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.card-heading-context .current-asset-name {
    margin-left: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.card-heading-title {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* 风险账号样式 */
.risk-section {
    margin-bottom: 24px;
}

.risk-section:last-child {
    margin-bottom: 0;
}

.risk-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: help;
    position: relative;
}

/* 即时显示tooltip */
.risk-title[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    padding: 6px 10px;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    animation: none;
    transition: none;
}

.risk-yellow {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.risk-red {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* 风险账号表格行颜色 - 5种风险类型 */
.risk-row-cyan {
    background-color: #e0f7fa !important;
}

.risk-row-cyan:hover {
    background-color: #b2ebf2 !important;
}

.risk-row-red {
    background-color: #ffebee !important;
}

.risk-row-red:hover {
    background-color: #ffcdd2 !important;
}

.risk-row-gray {
    background-color: #fff3e0 !important;
}

.risk-row-gray:hover {
    background-color: #ffe0b2 !important;
}

.risk-row-yellow {
    background-color: #fff8e1 !important;
}

.risk-row-yellow:hover {
    background-color: #ffecb3 !important;
}

.risk-row-pink {
    background-color: #e8eaf6 !important;
}

.risk-row-pink:hover {
    background-color: #c5cae9 !important;
}

/* 风险账号子行（深色） */
.risk-row-dark {
    background-color: #f5f5f5 !important;
}

.risk-row-dark:hover {
    background-color: #e0e0e0 !important;
}

/* 同邀请人高亮 */
.same-invite {
    background-color: #fce4ec !important;
    border-left: 3px solid #e91e63;
}

.same-invite:hover {
    background-color: #f8bbd9 !important;
}

/* 同邀请人标签 */
.invite-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* 展开图标 */
.expand-icon {
    text-align: center;
    color: #888;
    font-size: 12px;
    width: 30px;
}

.expandable-parent:hover .expand-icon {
    color: #667eea;
}

/* 日期数据统计网格 */
.date-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin: -24px -24px 20px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 8px 8px;
}

.date-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.date-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.date-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* 图表容器 */
.chart-container {
    height: 280px;
    margin-bottom: 20px;
    display: none; /* 暂时隐藏空的图表区域 */
}

/* 数据表格 */
.data-table-container {
    max-height: 450px;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid #e1e5eb;
}

#module-trading .data-table-container,
#module-position .data-table-container {
    height: 450px;
}

.total-table-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 38px;
    padding: 10px 2px 0;
    color: #697386;
    font-size: 13px;
}

.total-table-pagination[hidden] {
    display: none;
}

.pagination-btn,
.pagination-size select {
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    color: #465166;
    font-size: 13px;
}

.pagination-btn {
    padding: 5px 10px;
    cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #5368d5;
}

.pagination-btn:disabled {
    color: #b8bec9;
    background: #f5f6f8;
    cursor: not-allowed;
}

.pagination-current {
    min-width: 48px;
    text-align: center;
}

.pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.pagination-page-btn {
    min-width: 28px;
    height: 28px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #697386;
    font-size: 13px;
    cursor: pointer;
}

.pagination-page-btn:hover:not(:disabled) {
    border-color: #d9dee8;
    color: #5368d5;
}

.pagination-page-btn.active {
    padding: 5px 7px;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    color: #465166;
    font-weight: 600;
}

.pagination-ellipsis {
    min-width: 14px;
    text-align: center;
    color: #8993a4;
}

.pagination-size {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.pagination-size select {
    padding: 5px 7px;
    cursor: pointer;
}

.table-loading {
    height: 120px;
    color: #8993a4;
    text-align: center !important;
}

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

.data-table thead {
    background: #f1f3f5;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e1e5eb;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
}

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

/* 数据汇总 */
.data-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.summary-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e1e5eb;
}

.summary-item .label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.summary-item .value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
}

/* K线容器 */
.kline-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

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

.kline-header h3 {
    font-size: 18px;
    color: #2c3e50;
}

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

.kline-chart {
    height: 400px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 14px;
}

/* 提现+余额、充值列 - 默认显示 */
.arbitrage-col {
    display: table-cell;
}

/* 囤积重仓专用列 - 默认隐藏 */
.hoarding-col {
    display: none;
}

/* 囤积重仓筛选时显示列 */
.risk-hoarding .hoarding-col {
    display: table-cell;
}

/* 高价持有专用列 - 默认隐藏 */
.highPrice-col {
    display: none;
}

/* 高价持有筛选时显示列 */
.risk-highPrice .highPrice-col {
    display: table-cell;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-item select,
    .search-item input {
        min-width: 100%;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 22px;
    }

    .section-title {
        font-size: 18px;
    }

    .total-collection-select {
        min-width: 0;
        max-width: min(260px, 100%);
        flex: 0 1 auto;
    }
}

/* 滚动条美化 */
.data-table-container::-webkit-scrollbar {
    width: 8px;
}

.data-table-container::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.data-table-container::-webkit-scrollbar-thumb {
    background: #c1c8d0;
    border-radius: 4px;
}

.data-table-container::-webkit-scrollbar-thumb:hover {
    background: #a0a7b0;
}

/* 隐藏类 - 必须放在最后以覆盖其他display规则 */
.hidden {
    display: none !important;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

.profile-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #007bff;
}

.section-icon {
    font-size: 20px;
}

.subsection {
    margin-bottom: 16px;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #007bff;
}

.current-asset-name {
    margin-left: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.current-asset-name-muted {
    color: #888;
}

.total-profit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.total-profit-item {
    min-width: 0;
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.total-profit-title {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.total-profit-equation {
    min-width: 0;
    overflow: visible;
}

.total-profit-formula-labels,
.total-profit-formula-values {
    display: flex;
    align-items: baseline;
    min-width: 0;
    white-space: nowrap;
}

.total-profit-formula-labels > *,
.total-profit-formula-values > * {
    min-width: 0;
    flex: 0 0 auto;
}

.total-profit-formula-labels {
    color: #6c757d;
    font-size: 12px;
}

.total-profit-formula-values {
    margin-top: 4px;
}

.total-profit-result {
    display: flex;
    align-items: baseline;
    margin-top: 2px;
}

.total-profit-formula-values strong {
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
}

.total-profit-formula-labels .formula-operator,
.total-profit-formula-values .formula-operator,
.total-profit-result .formula-operator {
    color: #2563eb;
    font-size: inherit;
    font-weight: 600;
}

.total-profit-result .total-profit-value {
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .total-profit-grid {
        grid-template-columns: 1fr;
    }
}

.trade-profit-inline {
    margin-left: 14px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
}

.trade-profit-inline span {
    color: #2c3e50;
    font-weight: 600;
}

.collection-selector {
    box-sizing: border-box;
    font: inherit;
    max-width: min(260px, 32vw);
    padding: 0 24px 0 6px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 6px center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    line-height: 1;
    vertical-align: middle;
}

.collection-selector.is-open {
    width: min(260px, 32vw) !important;
}

.current-asset-select {
    width: min(260px, 32vw);
    min-width: 0;
    max-width: min(260px, 32vw);
    height: 24px;
    margin: 0 4px;
    border: 1px solid #d8dee9;
    border-radius: 5px;
    background-color: #fff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

.current-asset-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.current-asset-select:disabled {
    color: #9ca3af;
    background-color: #f8fafc;
}

.mini-section {
    margin-bottom: 12px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.mini-section-title {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.holding-detail-table-wrap {
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.holding-detail-table {
    width: 100%;
    min-width: 0;
    margin: 0;
    table-layout: fixed;
    font-size: 13px;
}

.holding-detail-table th,
.holding-detail-table td {
    padding: 10px 8px;
    white-space: nowrap;
}

.holding-detail-table th:first-child,
.holding-detail-table td:first-child {
    width: 34%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

.holding-detail-table th:nth-child(2),
.holding-detail-table td:nth-child(2) {
    width: 13%;
}

.holding-detail-table th:nth-child(3),
.holding-detail-table td:nth-child(3) {
    width: 18%;
}

.holding-detail-table th:nth-child(4),
.holding-detail-table td:nth-child(4) {
    width: 18%;
}

.holding-detail-table th:nth-child(5),
.holding-detail-table td:nth-child(5) {
    width: 17%;
}

.holding-detail-table th:not(:first-child),
.holding-detail-table td:not(:first-child) {
    padding-right: 10px;
    padding-left: 6px;
    text-align: right;
}

.holding-detail-table .is-current-holding td {
    background: #eff6ff;
}

.holding-detail-table .is-current-holding td:first-child {
    box-shadow: inset 3px 0 0 #2563eb;
}

.current-holding-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 4px;
    border-radius: 3px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.holding-detail-empty {
    padding: 20px !important;
    color: #888;
    text-align: center !important;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.profile-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.profile-value {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5eb;
    display: flex;
    justify-content: flex-end;
}

/* 可点击手机号样式 */
.mobile-profile-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 4px;
    margin: -2px -4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #4f5fbd;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.mobile-profile-link:hover,
.mobile-profile-link:focus-visible {
    background: #eef1ff;
    color: #36469f;
    outline: none;
}

.mobile-profile-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(79, 95, 189, 0.22);
}

.mobile-profile-tooltip {
    position: fixed;
    z-index: 1100;
    padding: 5px 9px;
    border-radius: 4px;
    background: #27324a;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(31, 41, 55, 0.2);
}

.mobile-profile-tooltip[hidden] {
    display: none;
}

/* 邀请关系行内展示 */
.relation-row {
    display: flex;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.relation-row:last-child {
    margin-bottom: 0;
}

.relation-row.header-row {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.relation-item {
    flex: 1;
    font-size: 14px;
    min-width: 0;
}

.relation-row.header-row .relation-item {
    font-weight: 600;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 16px;
}

/* 今日数据按钮 */
.today-data-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.today-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.today-data-btn:active {
    transform: translateY(0);
}

.today-icon {
    font-size: 16px;
}

/* 粒度切换按钮 */
.trend-toggles {
    display: flex;
    gap: 6px;
}
.gran-btn {
    padding: 4px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    color: #667085;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.6;
    transition: all 0.15s;
}
.gran-btn:hover {
    border-color: #5470c6;
    color: #5470c6;
}
.gran-btn.active {
    background: #5470c6;
    border-color: #5470c6;
    color: #fff;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    right: 24px;
    top: 66vh;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(29, 78, 216, 0.5);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(29, 78, 216, 0.7);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

.section-navigation {
    position: fixed;
    right: 12px;
    top: 50%;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-50%);
}

.section-navigation .back-to-top {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 48px;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.section-navigation .back-to-top.show,
.section-navigation .back-to-top:hover,
.section-navigation .back-to-top:active {
    transform: none;
}

.section-nav-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #1d4ed8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 24px rgba(29, 78, 216, 0.5);
    transition: all 0.2s ease;
}

.section-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(29, 78, 216, 0.7);
}

.section-nav-btn:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .back-to-top {
        right: 14px;
    }

    .section-navigation {
        right: 0;
        top: 50%;
    }

    .section-navigation .back-to-top,
    .section-nav-btn {
        width: 42px;
        height: 42px;
    }

    .section-navigation .back-to-top {
        flex-basis: 42px;
    }
}
.channel-login-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.channel-login-overlay[hidden] { display: none; }
.channel-login-form {
	width: min(360px, calc(100vw - 40px));
	padding: 30px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 18px 50px rgba(0,0,0,.25);
}
.channel-login-form h2 { margin: 6px 0 8px; color: #1f2937; }
.channel-login-kicker { color: #64748b; font-size: 13px; }
.channel-login-hint { min-height: 20px; margin: 0 0 18px; color: #64748b; font-size: 13px; }
.channel-login-form label { display: block; margin: 14px 0; color: #475569; font-size: 14px; }
.channel-login-form input { display: block; width: 100%; box-sizing: border-box; margin-top: 7px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; }
.channel-login-form button { width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 6px; background: #334155; color: #fff; cursor: pointer; font-size: 14px; }
.channel-login-note { margin-top: 10px; color: #94a3b8; font-size: 12px; line-height: 1.7; text-align: center; }
.channel-login-error { min-height: 20px; margin-top: 10px; color: #dc2626; font-size: 13px; }
#module-risk,
#userProfileModal {
    display: none !important;
}

.admin-scope-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #4b5563;
    font-size: 13px;
}

.admin-scope-bar select {
    min-width: 190px;
    padding: 7px 28px 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1f2937;
    background: #fff;
    font-size: 13px;
}
