/* ===== 全局重置 & 通用 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fb;
    color: #1a2634;
    padding: 24px 20px 40px;
}
.container { max-width: 1360px; margin: 0 auto; }

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(145deg, #1a5cff, #0d3bb8);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.logo-text span { color: #1a5cff; }
.nav {
    display: flex;
    gap: 28px;
    font-size: 15px;
    font-weight: 500;
    color: #4a5a6e;
}
.nav a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
.nav a:hover { color: #1a5cff; }
.nav a.active {
    color: #1a5cff;
    position: relative;
}
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: #1a5cff;
    border-radius: 4px;
}
.update-badge {
    background: #eef3ff;
    color: #1a5cff;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.update-badge i {
    font-style: normal;
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ===== Banner ===== */
.banner {
    background: linear-gradient(135deg, #0d1b3e, #1a3a7a);
    color: #fff;
    padding: 18px 28px;
    border-radius: 16px;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.banner-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.banner-left .tag {
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
}
.banner-left .msg { font-size: 15px; font-weight: 400; opacity: 0.92; }
.banner-right {
    font-size: 14px;
    background: rgba(255,255,255,0.08);
    padding: 6px 18px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.12);
}

/* ===== 卡片 ===== */
.card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    padding: 24px 24px 28px;
    margin-bottom: 28px;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.06); }
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.card-title { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-title .badge {
    font-size: 12px;
    font-weight: 500;
    background: #eef3ff;
    color: #1a5cff;
    padding: 2px 12px;
    border-radius: 40px;
}
.card-sub { font-size: 14px; color: #6b7a8f; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 680px; }
thead th {
    background: #f8fafc;
    color: #3d4e62;
    font-weight: 600;
    padding: 8px 6px;
    text-align: center;
    border-bottom: 2px solid #e9edf4;
    font-size: 12px;
    white-space: nowrap;
}
tbody td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f2f6;
    font-variant-numeric: tabular-nums;
}
tbody td:first-child { text-align: left; font-weight: 500; white-space: nowrap; }
tbody tr:hover td { background: #fafbff; }
.rate-high { color: #0f7b3a; font-weight: 600; }
.rate-sold {
    color: #b91c1c;
    font-size: 12px;
    background: #fee2e2;
    padding: 2px 10px;
    border-radius: 40px;
    display: inline-block;
    font-weight: 500;
}
.text-muted { color: #9ca3af; }

/* ===== 货币基金 ===== */
.fund-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.fund-item {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid #eef1f6;
}
.fund-item .name { font-weight: 600; font-size: 15px; }
.fund-item .platform { font-size: 13px; color: #6b7a8f; margin: 2px 0 8px; }
.fund-item .yield { font-size: 26px; font-weight: 700; color: #0f3b7a; }
.fund-item .yield small { font-size: 15px; font-weight: 400; color: #6b7a8f; margin-left: 4px; }
.fund-item .date { font-size: 12px; color: #9ca3af; margin-top: 6px; }
.trend-down { color: #b91c1c; font-size: 13px; font-weight: 500; }
.trend-up { color: #0f7b3a; font-size: 13px; font-weight: 500; }

/* ===== 新闻 ===== */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    background: #fafcfe;
    border-radius: 12px;
    border-left: 4px solid #1a5cff;
}
.news-item .dot {
    width: 6px;
    height: 6px;
    background: #1a5cff;
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}
.news-item .content { font-size: 14px; line-height: 1.6; color: #1f2a3a; }
.news-item .content strong { color: #0d3bb8; }
.news-item .time { font-size: 12px; color: #9ca3af; white-space: nowrap; margin-left: auto; flex-shrink: 0; }

/* ===== 省份折叠 ===== */
.province-group {
    border: 1px solid #e9edf4;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
}
.province-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fafcfe;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    user-select: none;
}
.province-toggle:hover { background: #f0f5ff; }
.province-toggle .arrow {
    transition: transform 0.25s;
    font-size: 16px;
    color: #6b7a8f;
}
.province-toggle.open .arrow { transform: rotate(180deg); }
.province-body { padding: 0 16px 16px; display: none; }
.province-body.open { display: block; }
.province-body table { min-width: 560px; font-size: 13px; }
.province-body thead th { background: #f5f7fb; padding: 6px 8px; font-size: 12px; }
.province-body tbody td { padding: 6px 8px; font-size: 13px; }

/* ===== 科普卡片 ===== */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.knowledge-item {
    background: #f8fafc;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #eef1f6;
    transition: border 0.2s;
}
.knowledge-item:hover { border-color: #cbd5e1; background: #f5f8ff; }
.knowledge-item .k-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.knowledge-item .k-desc {
    font-size: 13px;
    color: #4a5a6e;
    margin-top: 6px;
    line-height: 1.5;
}

/* ===== 工具页面特定 ===== */
.tool-group { display: flex; flex-direction: column; gap: 12px; max-width: 500px; margin: 0 auto; }
.tool-group label { font-weight: 500; color: #3d4e62; }
.tool-group input, .tool-group select {
    padding: 8px 12px;
    border: 1px solid #dce1eb;
    border-radius: 8px;
    font-size: 14px;
}
.tool-group .result {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
}
.btn {
    padding: 8px 24px;
    background: #1a5cff;
    color: #fff;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { background: #0d3bb8; }

/* ===== Footer ===== */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9edf4;
    font-size: 13px;
    color: #8a9aaa;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}
.footer a { color: #1a5cff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== 响应式 ===== */
@media (max-width: 820px) {
    body { padding: 16px 12px; }
    .header { flex-direction: column; align-items: stretch; }
    .banner { flex-direction: column; align-items: flex-start; }
    .card { padding: 18px 14px; }
    .fund-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .fund-grid { grid-template-columns: 1fr; }
    .logo-text { font-size: 18px; }
    .update-badge { font-size: 12px; padding: 4px 12px; }
    table { font-size: 12px; min-width: 520px; }
    .province-body table { min-width: 420px; }
}

.loading { text-align: center; padding: 40px 0; color: #6b7a8f; }
.error { text-align: center; padding: 40px 0; color: #b91c1c; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }