/* ============================================================
   超级通讯平台 · 组件库（统一沉淀，全端共用）
   ============================================================ */

/* —— 头像 —— */
.avatar {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: linear-gradient(135deg, #243049, #161d30);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-weight: 600; font-size: var(--fs-16);
  position: relative; flex: none; overflow: hidden;
  border: 1px solid var(--border);
}
.avatar.round { border-radius: var(--r-pill); }
.avatar.lg { width: 64px; height: 64px; font-size: var(--fs-22); }
.avatar.sm { width: 36px; height: 36px; font-size: var(--fs-14); }
.avatar .dot-online {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-card);
}

/* —— 徽标 Badge —— */
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: var(--fs-12);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 500;
  background: var(--bg-card-2); color: var(--text-sub); border: 1px solid var(--border);
}
.tag.primary { background: var(--primary-weak); color: var(--accent); border-color: transparent; }
.tag.reward  { background: rgba(245,158,11,0.14); color: var(--reward); border-color: transparent; }
.tag.live    { background: rgba(52,211,153,0.14); color: var(--success); border-color: transparent; }

/* —— 卡片 —— */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
}
.card.glow { box-shadow: var(--shadow-md); }

/* —— 列表项 —— */
.list { background: var(--bg-card); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.list-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); cursor: pointer; position: relative;
  transition: background .15s ease;
}
.list-item + .list-item::before {
  content: ""; position: absolute; left: 72px; right: 0; top: 0; height: 1px; background: var(--divider);
}
.list-item:hover { background: var(--bg-card-2); }
.list-item .title { font-size: var(--fs-16); color: var(--text); }
.list-item .sub { font-size: var(--fs-13); color: var(--text-sub); margin-top: 2px; }
.list-item .meta { font-size: var(--fs-12); color: var(--text-faint); text-align: right; flex: none; }
.list-item .chev { color: var(--text-faint); flex: none; }

/* —— 按钮 —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: var(--r-xl);
  font-size: var(--fs-16); font-weight: 600; transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--text-on-primary); box-shadow: var(--glow-primary); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { background: var(--bg-card-2); color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--accent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: var(--fs-13); border-radius: var(--r-pill); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* —— 开关 Switch —— */
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: var(--bg-input); border: 1px solid var(--border-strong);
  border-radius: var(--r-pill); transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 22px; width: 22px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--primary); border-color: transparent; }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* —— 输入框 —— */
.input {
  height: 44px; width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0 14px; color: var(--text); font-size: var(--fs-14);
}
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--primary); background: var(--bg-card-2); }

/* —— 空状态 / 占位 —— */
.empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--text-sub); }
.empty .ico { font-size: 40px; opacity: .6; margin-bottom: var(--sp-3); }
.empty .t { font-size: var(--fs-16); color: var(--text); margin-bottom: 6px; }
.empty .d { font-size: var(--fs-13); color: var(--text-faint); }

/* —— "敬请期待"锁定占位（预留功能统一长这样）—— */
.locked {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-8) var(--sp-4); gap: var(--sp-3); min-height: 60%;
}
.locked .ring {
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,0.25), transparent 70%);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 38px;
  box-shadow: var(--glow-primary);
}
.locked .t { font-size: var(--fs-18); font-weight: 700; color: var(--text); }
.locked .d { font-size: var(--fs-13); color: var(--text-sub); max-width: 300px; }

/* —— 分区标题 —— */
.section-title {
  font-size: var(--fs-13); color: var(--text-sub); font-weight: 600;
  padding: var(--sp-4) var(--sp-2) var(--sp-2); letter-spacing: .5px;
}

/* —— 段落卡 / 设置组 —— */
.group { margin-bottom: var(--sp-4); }

/* —— 数字收益卡 —— */
.stat-card {
  background: linear-gradient(135deg, #18233b, #131a2c);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4);
}
.stat-card .num { font-size: var(--fs-28); font-weight: 700; color: var(--text); }
.stat-card .lbl { font-size: var(--fs-12); color: var(--text-sub); }

/* —— Toast —— */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card-2); color: var(--text); border: 1px solid var(--border-strong);
  padding: 10px 18px; border-radius: var(--r-pill); font-size: var(--fs-14);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
