* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #f6f7fb;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.index-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.tab-btn {
  padding: 8px 12px;
  border: 1px solid #d6dbea;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.tab-btn.active {
  background: #1f6feb;
  color: #fff;
  border-color: #1f6feb;
}

.index-info {
  background: #fff;
  border: 1px solid #e1e5f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #2d3648;
}

.table-section {
  margin-top: 16px;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.table-section h3 {
  margin: 0;
  font-size: 16px;
}

.link-btn {
  background: transparent;
  border: none;
  color: #1f6feb;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch input {
  display: none;
}

.slider {
  width: 42px;
  height: 22px;
  background: #cfd6e6;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.slider::after {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: #1f6feb;
}

.switch input:checked + .slider::after {
  transform: translateX(20px);
}

.switch-label {
  font-size: 13px;
  color: #2d3648;
}

.month-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #2d3648;
}

.month-filter select {
  padding: 6px 10px;
  border: 1px solid #d6dbea;
  border-radius: 8px;
  background: #fff;
}

.table-wrap {
  background: #fff;
  border: 1px solid #e1e5f0;
  border-radius: 12px;
  overflow: hidden;
}

.hidden {
  display: none;
}

.spread-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spread-table thead {
  background: #f2f4fb;
  color: #2d3648;
}

.table-toggle-row td,
.table-toggle-row th {
  background: #fff;
  border-bottom: 1px solid #edf0f7;
  padding: 8px 12px;
}

.table-toggle-inner {
  display: flex;
  justify-content: flex-start;
}

.spread-table th,
.spread-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0f7;
}

.spread-table tbody tr {
  cursor: pointer;
}

.spread-table tbody tr.active {
  background: #eef3ff;
}

.spread-table td.pos {
  color: #1b6f4a;
  font-weight: 600;
}

.spread-table td.neg {
  color: #b33b2e;
  font-weight: 600;
}

.price-main {
  font-weight: 600;
  color: #1d1d1f;
}

.change-text {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  color: #7b8399;
}

.change-text.pos {
  color: #1b6f4a;
  font-weight: 600;
}

.change-text.neg {
  color: #b33b2e;
  font-weight: 600;
}

.empty-cell {
  text-align: center;
  color: #7b8399;
}

.charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

.chart {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e1e5f0;
}

.chart > div {
  height: 320px;
}
