/* ===== 估值看板统一外壳 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #e5e7eb;
    color: #202124;
    -webkit-font-smoothing: antialiased;
}

/* Tab导航 */
.val-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.val-tab {
    display: inline-block;
    padding: 12px 18px;
    font-size: 15px;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}
.val-tab:hover { color: #1890ff; }
.val-tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 600;
}

/* 页面内容区 */
.val-body {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 12px 40px;
    background: #fff;
    min-height: calc(100vh - 120px);
}

/* 页头 */
.val-page-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.val-page-header h1 {
    font-size: 22px;
    color: #202124;
}
.val-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}
.val-meta-line {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}
.val-meta-line span {
    margin-right: 16px;
}

/* 空状态 */
.val-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* 统计摘要 */
.val-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.val-summary-item {
    flex: 1;
    min-width: 100px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.val-summary-item .val-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}
.val-summary-item strong {
    font-size: 22px;
}
.val-cheap { color: #0DAB67; }
.val-normal { color: #F6C343; }
.val-expensive { color: #E53935; }

/* 分组表格 */
.val-group { margin-bottom: 24px; }
.val-group h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 4px solid #1890ff;
}
.val-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.val-table th {
    background: #f5f5f5;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}
.val-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
}
.val-table tr:hover { background: #fafafa; }
.col-name { min-width: 100px; }
.col-current, .col-rank { text-align: right; }
.col-change { font-size: 13px; }
.val-muted { color: #999; font-size: 11px; }

/* 估值区间badge */
.zone-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.zone-cheap { background: #dff6ec; color: #0DAB67; }
.zone-normal { background: #fff8d9; color: #b8860b; }
.zone-expensive { background: #ffe1df; color: #E53935; }

/* 变化标记 */
.rank-change-up { color: #0DAB67; font-weight: 500; }
.rank-change-down { color: #E53935; font-weight: 500; }
.rank-change-none { color: #ccc; }
.changed-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    background: #e8f4fd;
    color: #1890ff;
}

/* Footer */
.val-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* ===== 星级页面 ===== */
.star-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.star-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid #eee;
}
.star-card-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.star-card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}
.star-card-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}
.star-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 图表区 */
.star-chart-section, .gold-chart-section {
    margin-bottom: 32px;
}
.star-chart-section h3, .gold-chart-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}
.star-chart-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.chart-tab {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}
.chart-tab.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}
.chart-tab:hover { border-color: #1890ff; }
#starChart, #goldChart {
    width: 100%;
    max-width: 900px;
    height: auto;
}

/* 图例 */
.star-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}
.legend-item {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}
.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ===== 黄金页面 ===== */
.gold-hero {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid #eee;
}
.gold-hero-star {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}
.gold-hero-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.gold-hero-conclusion {
    font-size: 14px;
    color: #333;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.gold-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.gold-metric-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid #eee;
}
.gold-metric-card .metric-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}
.gold-metric-card .metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 响应式 */
@media (max-width: 600px) {
    .val-tabs { padding: 0 8px; }
    .val-tab { padding: 10px 12px; font-size: 14px; }
    .val-body { padding: 12px 8px 32px; }
    .star-cards { grid-template-columns: 1fr; }
    .gold-metrics { grid-template-columns: repeat(2, 1fr); }
    .val-table { font-size: 13px; }
    .val-table th, .val-table td { padding: 6px 8px; }
}
