:root { --brand: #c8102e; --bg: #f4f6f8; --border: #e0e0e0; }
body { font-family: "Microsoft YaHei", sans-serif; margin: 0; padding: 0; background: var(--bg); color: #333; }
.header { background: var(--brand); color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; }
.header h1 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.header img { height: 30px; }
.controls { display: flex; align-items: center; gap: 20px; background: #fff; padding: 15px 30px; margin: 20px 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-left: 5px solid var(--brand); }
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: bold; color: var(--brand); font-size: 15px; }
.toggle-switch input { width: 20px; height: 20px; cursor: pointer; }
.btn { padding: 8px 16px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; font-size: 14px; transition: 0.2s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: #fff; border: 1px solid var(--brand); color: var(--brand); }
.btn-outline:hover { background: #fff0f2; }

/* 标签页 */
.tabs { display: flex; margin: 0 30px; border-bottom: 2px solid #ddd; }
.tab-btn { padding: 12px 24px; border: none; background: none; font-size: 16px; cursor: pointer; font-weight: bold; color: #666; border-bottom: 3px solid transparent; }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-content { display: none; padding: 20px 30px; }
.tab-content.active { display: block; }

/* 表格容器 */
#data-table { height: 650px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-top: 15px; }

/* 分析卡片 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: relative; }
.card h3 { margin-top: 0; color: var(--brand); font-size: 16px; border-bottom: 1px solid #eee; padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.card h3 span { font-size: 12px; color: #888; font-weight: normal; }
.card .export-btn { position: absolute; top: 15px; right: 15px; font-size: 12px; padding: 4px 8px; }
.result-box { font-size: 14px; line-height: 1.8; color: #444; }
.result-box table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.result-box th, .result-box td { padding: 8px; border-bottom: 1px solid #eee; text-align: left; }
.result-box th { background: #fafafa; color: #666; }
.sig { color: var(--brand); font-weight: bold; }
.chart-wrapper { position: relative; height: 280px; width: 100%; margin-top: 15px; }

/* 子标签页 */
.sub-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.sub-tab-btn { padding: 8px 16px; border: 1px solid #ddd; background: #fff; border-radius: 20px; cursor: pointer; font-size: 14px; }
.sub-tab-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.sub-tab-content { display: none; }
.sub-tab-content.active { display: block; }