/* ============ 设计变量（深色行情盘面） ============ */
 body {
  background: #0b0e14;
  color: #edf1f7;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

view, text, scroll-view, input {
  box-sizing: border-box;
}

/* 涨跌配色：中式习惯 涨红跌绿 */
.up { color: #ff4d4f; }
.down { color: #0fbf7f; }
.flat { color: #8b96a8; }

.bg-up { background: rgba(255, 77, 79, 0.14); }
.bg-down { background: rgba(15, 191, 127, 0.14); }

.sub { color: #8b96a8; }
.muted { color: #5c6675; }
.bold { font-weight: 600; }
.num {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.flex1 { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ============ 卡片 ============ */
.card {
  background: #141a24;
  border-radius: 12px;
  padding: 13px;
  margin: 0 12px 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.04);
}
.card-tight { padding: 9px 11px; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 7px;
}
.sec-title {
  font-size: 14px;
  font-weight: 600;
  color: #edf1f7;
  letter-spacing: 0.5px;
}
.sec-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: #4c8dff;
  margin-right: 6px;
  vertical-align: -1.5px;
}

/* ============ 分段控件 ============ */
.segment {
  display: flex;
  background: #101620;
  border-radius: 9px;
  padding: 3px;
  margin: 0 12px 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.04);
}
.segment-item {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  border-radius: 7px;
  font-size: 12.5px;
  color: #8b96a8;
  transition: all 0.16s;
}
.segment-item.on {
  background: #1f2836;
  color: #ffffff;
  font-weight: 600;
}

/* ============ 列表行 ============ */
.list-row {
  display: flex;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: rgba(255, 255, 255, 0.03); }

.code { font-size: 15px; font-weight: 600; letter-spacing: 0.3px; }
.name { font-size: 11.5px; color: #8b96a8; margin-top: 3px; }
.price { font-size: 16px; font-weight: 600; text-align: right; }

/* 涨跌幅色块 */
.tag {
  min-width: 64px;
  text-align: center;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  font-feature-settings: "tnum";
}
.tag.up { background: rgba(255, 77, 79, 0.16); }
.tag.down { background: rgba(15, 191, 127, 0.16); }
.tag.flat { background: rgba(139, 150, 168, 0.14); }

/* ============ 按钮 ============ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
}
.btn-buy { background: #e5352f; color: #fff; }
.btn-buy:active { background: #c22924; }
.btn-sell { background: #0e9c68; color: #fff; }
.btn-sell:active { background: #0b7f55; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #edf1f7;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
}
.btn-disabled { background: #232b38; color: #5c6675; }
.btn-mini {
  height: 28px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

/* ============ 小件 ============ */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
}
.badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(76, 141, 255, 0.16);
  color: #6ea3ff;
  margin-left: 5px;
}
.badge-t {
  background: rgba(255, 176, 32, 0.16);
  color: #ffb020;
}

.empty {
  padding: 45px 0;
  text-align: center;
  color: #5c6675;
  font-size: 13px;
}

.tab-space { height: calc(60px + 0px); }
.safe-bottom { padding-bottom: 0px; }

.loading-tip {
  text-align: center;
  color: #5c6675;
  font-size: 12px;
  padding: 12px 0;
}

/* 骨架屏 */
.sk {
  background: linear-gradient(90deg, #171e29 25%, #1e2633 37%, #171e29 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
  border-radius: 5px;
}
@keyframes sk {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
