/* ============================================================
 * cany_spike 会员中心首页 - 阶段1骨架样式
 * 设计语言：spike admin 卡片化网格 + 主色 var(--spike-primary)
 * 单位：rem (1rem = 屏幕宽度/19.2，1920 设计稿基准)
 * ============================================================ */

/* ===== 主区与栅格 =====
 * .home-main padding 交由全局 spike-layout 控制（原为 24px）
 * .home-grid 使用 12 列网格，同一 row 内卡片 stretch 等高
 */
.home-grid {
  display: block;
}

@media (max-width: 900px) {
  .home-layout-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .home-layout-column {
    width: 100% !important;
    grid-column: 1 / -1 !important;
  }
}

.home-layout {
  width: 100%;
}

.home-layout-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.24rem;
}

.home-layout-row + .home-layout-row {
  margin-top: 0.24rem;
}

.home-layout-column {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  min-width: 0;
}

.home-card-renderer {
  min-width: 0;
}

.home-card-renderer > .card {
  width: 100%;
  height: 100%;
  grid-column: auto;
}

.home-layout-column > .home-card-renderer:only-child {
  flex: 1;
}

.home-layout-column > .home-card-renderer:only-child > .card {
  min-height: 100%;
}

/* ===== 卡片基础（统一容器）=====
 * 阶段3：加 hover 微抬起反馈（除 welcome-card、右列容器外均起作用）
 */
.card {
  background: #fff;
  border-radius: var(--spike-radius);
  box-shadow: 0 0.02rem 0.12rem rgba(0, 0, 0, 0.05);
  padding: 0.24rem;
  box-sizing: border-box;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-0.02rem);
  box-shadow: 0 0.08rem 0.24rem rgba(42, 53, 71, 0.08);
}

/* welcome-card 不抬起（主体卡保持稳重） */
.welcome-card:hover {
  transform: none;
  box-shadow: 0 0.02rem 0.12rem rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 0.18rem;
  font-weight: 600;
  color: #2a3547;
  margin: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.card-more {
  cursor: pointer;
  width: 0.32rem;
  height: 0.24rem;
  line-height: 0.16rem;
  text-align: center;
  border-radius: var(--spike-radius);
  background: #f6f8fb;
  color: #8692b0;
  font-size: 0.18rem;
  letter-spacing: 0.02rem;
  user-select: none;
  transition: background 0.2s;
}

.card-more:hover {
  background: #ebeef5;
}

/* ===== 网格分配 =====
 * Row1: A(8) + B(4)
 * Row2: C1(4) + C2(4) + C3(4)
 * Row3: D(8) + 右列容器(4)内含 E→F→G 垂直堆叠与 D 等高
 */
.welcome-card {
  grid-column: span 8;
}
.balance-card {
  grid-column: span 4;
}
.stat-card,
.cert-card {
  grid-column: span 4;
}
.product-card {
  grid-column: span 8;
}

/* 右列容器：占 4 列，内部垂直 flex 堆叠 E/F/G */
.home-right-column {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  min-width: 0;
}

/* 右列内的卡不再占 grid 网格，变为普通 flex 项 */
.home-right-column .card {
  width: 100%;
}

.referral-card,
.ticket-card,
.notice-card {
  /* 重置：在右列内不再使用 grid-column */
  grid-column: auto;
}

/* ============================================================
 * [A] 欢迎横幅（白底 + 主色软渐变 + 右侧插画）
 * ============================================================ */
.welcome-card {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.24rem;
  min-height: 2.2rem;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      rgba(var(--spike-primary-rgb), 0.1) 0%,
      rgba(var(--spike-primary-rgb), 0.02) 60%,
      #ffffff 100%
    ),
    #ffffff;
}

.welcome-card::before {
  content: "";
  position: absolute;
  top: -1rem;
  right: 1.6rem;
  width: 3rem;
  height: 3rem;
  border-radius: var(--spike-circle);
  background: radial-gradient(
    circle,
    rgba(var(--spike-primary-rgb), 0.18) 0%,
    rgba(var(--spike-primary-rgb), 0) 70%
  );
  pointer-events: none;
}

.welcome-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.24rem;
}

.welcome-head {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  cursor: pointer;
}

.welcome-avatar {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--spike-circle);
  background: var(--color-primary, var(--spike-primary));
  color: var(--spike-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.24rem;
  font-weight: 700;
  flex-shrink: 0;
}

.welcome-info {
  min-width: 0;
}

.welcome-hello {
  margin: 0;
  font-size: 0.22rem;
  font-weight: 500;
  color: #2a3547;
  display: flex;
  align-items: center;
  gap: 0.08rem;
  flex-wrap: wrap;
  line-height: 1.4;
}

.welcome-hello strong {
  font-weight: 600;
}

.welcome-level {
  display: inline-block;
  padding: 0.02rem 0.08rem;
  font-size: 0.12rem;
  font-weight: 500;
  border: 1px solid currentColor;
  border-radius: var(--spike-radius);
  line-height: 1.4;
}

.welcome-id {
  margin: 0.06rem 0 0;
  font-size: 0.14rem;
  color: #8692b0;
}

.welcome-id span {
  color: #2a3547;
  font-weight: 500;
}

.welcome-stats {
  display: flex;
  gap: 0.16rem;
  flex-wrap: wrap;
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  cursor: pointer;
  padding: 0.12rem 0.16rem;
  border-radius: var(--spike-radius);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.mini-stat:hover {
  transform: translateY(-0.02rem);
  box-shadow: 0 0.06rem 0.16rem rgba(var(--spike-primary-rgb), 0.12);
}

.mini-stat-icon {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: var(--spike-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-stat-icon img {
  width: 0.28rem;
  height: 0.28rem;
}

.mini-stat-icon-1 {
  background: rgba(var(--spike-primary-rgb), 0.12);
}
.mini-stat-icon-2 {
  background: rgba(93, 135, 255, 0.12);
}
.mini-stat-icon-3 {
  background: rgba(19, 222, 185, 0.12);
}

.mini-stat-num {
  font-size: 0.28rem;
  font-weight: 700;
  color: #2a3547;
  line-height: 1.1;
}

.mini-stat-label {
  font-size: 0.13rem;
  color: #8692b0;
  margin-top: 0.02rem;
}

.welcome-right {
  position: relative;
  width: 2.8rem;
  flex-shrink: 0;
  background: url("../img/welcome-illustration.png") no-repeat center bottom;
  background-size: contain;
  align-self: stretch;
  margin: -0.24rem -0.24rem -0.24rem 0;
}

/* ============================================================
 * [B] 余额卡（右上角主色光斑）
 * ============================================================ */
.balance-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 2.2rem;
  overflow: hidden;
}

.balance-card::before {
  content: "";
  position: absolute;
  top: -1.2rem;
  right: -1.2rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--spike-circle);
  background: radial-gradient(
    circle,
    rgba(var(--spike-primary-rgb), 0.14) 0%,
    rgba(var(--spike-primary-rgb), 0) 70%
  );
  pointer-events: none;
}

.balance-card > * {
  position: relative;
  z-index: 1;
}

.balance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.12rem;
}

.balance-title {
  font-size: 0.14rem;
  color: #8692b0;
  font-weight: 500;
}

.balance-recharge {
  cursor: pointer;
  background: var(--color-primary, var(--spike-primary));
  color: var(--spike-primary-text);
  font-size: 0.13rem;
  font-weight: 500;
  padding: 0.04rem 0.14rem;
  border-radius: var(--spike-radius);
  line-height: 1.6;
  transition: opacity 0.2s;
}

.balance-recharge:hover {
  opacity: 0.85;
}

.balance-amount {
  font-size: 0.32rem;
  font-weight: 700;
  color: #2a3547;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.1rem;
}

.balance-prefix {
  font-size: 0.18rem;
  font-weight: 500;
  margin-right: 0.04rem;
  color: #8692b0;
}

.balance-recharge-text {
  font-size: 0.13rem;
  font-weight: 400;
  color: var(--color-primary, var(--spike-primary));
  cursor: pointer;
}

.balance-meta {
  margin-top: 0.08rem;
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  font-size: 0.12rem;
  color: #8692b0;
}

.balance-notice {
  display: flex;
  align-items: center;
  gap: 0.06rem;
}

.balance-notice-dot {
  width: 0.06rem;
  height: 0.06rem;
  border-radius: var(--spike-circle);
  background: #c4cad2;
}

.balance-notice-dot.active {
  background: var(--color-success, #13deb9);
}

.balance-notice-btn {
  cursor: pointer;
  color: var(--color-primary, var(--spike-primary));
}

.balance-voucher a {
  color: var(--color-primary, var(--spike-primary));
  margin-left: 0.04rem;
}

.balance-divider {
  height: 1px;
  background: #eef0f3;
  margin: 0.16rem 0;
}

.balance-sub {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.balance-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.08rem;
}

.balance-sub-label {
  display: flex;
  align-items: center;
  gap: 0.06rem;
  font-size: 0.13rem;
  color: #8692b0;
}

.balance-sub-label svg {
  vertical-align: middle;
  cursor: help;
  color: #b6bdc7;
}

.balance-sub-value {
  font-size: 0.16rem;
  font-weight: 600;
  color: #2a3547;
}

.balance-sub-prefix {
  font-size: 0.12rem;
  font-weight: 400;
  color: #8692b0;
  margin-right: 0.04rem;
}

.balance-sub-link {
  font-size: 0.12rem;
  color: var(--color-primary, var(--spike-primary));
  cursor: pointer;
}

.credit-tag {
  display: inline-block;
  margin-left: 0.06rem;
  padding: 0.02rem 0.06rem;
  font-size: 0.11rem;
  color: #8692b0;
  background: #f1f3f6;
  border-radius: var(--spike-radius);
  line-height: 1.4;
}

/* ============================================================
 * [C1/C2] 统计卡（本月消费 / 总消费）带装饰圆环
 * ============================================================ */
.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 1.4rem;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  bottom: -0.8rem;
  right: -0.8rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: var(--spike-circle);
  border: 0.16rem solid rgba(var(--spike-primary-rgb), 0.08);
  pointer-events: none;
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.12rem;
}

.stat-title {
  font-size: 0.14rem;
  color: #8692b0;
  font-weight: 500;
}

.stat-chip {
  display: inline-block;
  padding: 0.02rem 0.08rem;
  font-size: 0.12rem;
  font-weight: 500;
  border-radius: var(--spike-radius);
  line-height: 1.5;
}

.chip-success {
  background: rgba(19, 222, 185, 0.15);
  color: #07a37e;
}

.chip-danger {
  background: rgba(var(--spike-primary-rgb), 0.15);
  color: #d8542d;
}

.stat-value {
  font-size: 0.28rem;
  font-weight: 700;
  color: #2a3547;
  line-height: 1.2;
  margin-top: auto;
}

.stat-prefix {
  font-size: 0.16rem;
  font-weight: 500;
  margin-right: 0.04rem;
  color: #8692b0;
}

/* ============================================================
 * [C3] 认证卡
 * ============================================================ */
.cert-card {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.cert-row {
  display: flex;
  align-items: flex-start;
  gap: 0.12rem;
  padding: 0.08rem 0;
}

.cert-icon {
  width: 0.24rem;
  height: 0.24rem;
  flex-shrink: 0;
  margin-top: 0.02rem;
}

.cert-content {
  flex: 1;
  min-width: 0;
}

.cert-name .company-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.14rem;
  color: #2a3547;
  font-weight: 500;
}

.cert-name .cert-cta {
  cursor: pointer;
  color: var(--color-primary, var(--spike-primary));
  font-size: 0.14rem;
}

.cert-extra {
  font-size: 0.12rem;
  color: #8692b0;
  margin-top: 0.04rem;
  display: flex;
  align-items: center;
  gap: 0.04rem;
}

.cert-extra .cert-id {
  display: inline-block;
  max-width: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2a3547;
}

.cert-copy {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.14rem;
  height: 0.14rem;
  cursor: pointer;
  background: var(--spike-primary);
  -webkit-mask: url("../img/copy.svg") no-repeat center / contain;
  mask: url("../img/copy.svg") no-repeat center / contain;
}

/* ============================================================
 * [D] 我的产品 表格
 * ============================================================ */
.product-card .card-title {
  margin-bottom: 0.16rem;
}

.spike-table.el-table {
  background: transparent;
  border: none;
}

.spike-table.el-table::before {
  display: none;
}

.spike-table.el-table th.el-table__cell {
  background: #f9fafc !important;
  color: #8692b0 !important;
  font-weight: 500 !important;
  font-size: 0.13rem !important;
  border-bottom: none !important;
}

.spike-table.el-table td.el-table__cell {
  border-bottom: 1px solid #f1f3f6 !important;
  font-size: 0.14rem;
  color: #2a3547;
}

.spike-table.el-table .el-table__row:hover td {
  background: rgba(var(--spike-primary-rgb), 0.04) !important;
}

/* 表格行事件点击微验反馈 */
.spike-table.el-table .el-table__row {
  cursor: pointer;
  transition: background 0.18s;
}

.product-name {
  color: var(--color-primary, var(--spike-primary));
  font-size: 0.14rem;
  cursor: pointer;
  text-decoration: none;
}

.product-name:hover {
  text-decoration: underline;
}

.red-time {
  color: var(--color-danger, var(--spike-primary));
}

.empty-state {
  text-align: center;
  padding: 0.6rem 0 0.4rem;
}

.empty-state h2 {
  font-weight: 600;
  color: #2a3547;
  font-size: 0.22rem;
  margin: 0 0 0.08rem;
}

.empty-state p {
  margin: 0 0 0.24rem;
  color: #8692b0;
  font-size: 0.14rem;
}

/* ============================================================
 * [E] 推介计划卡
 * ============================================================ */
.referral-card {
  display: flex;
  flex-direction: column;
}

.referral-empty {
  text-align: center;
  padding: 0.16rem 0;
}

.referral-empty img {
  width: 100%;
  max-width: 2.6rem;
  height: auto;
}

.referral-empty h2 {
  margin: 0.16rem 0 0.08rem;
  color: #2a3547;
  font-size: 0.2rem;
  font-weight: 600;
}

.referral-empty p {
  margin: 0 0 0.2rem;
  color: #8692b0;
  font-size: 0.14rem;
}

.referral-cta {
  display: inline-block;
  padding: 0.08rem 0.28rem;
  background: var(--color-primary, var(--spike-primary));
  color: var(--spike-primary-text);
  font-size: 0.14rem;
  border-radius: var(--spike-radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.referral-cta:hover {
  opacity: 0.85;
}

.referral-text {
  margin-top: 0.16rem;
  padding: 0.08rem 0.16rem;
  background: #f6f8fb;
  color: #8692b0;
  font-size: 0.13rem;
  border-radius: var(--spike-radius);
}

/* 已开启态：顶部主色 banner + 信用卡插画 */
.referral-open {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.referral-open .referral-top {
  position: relative;
  margin: -0.24rem -0.24rem 0;
  padding: 0.24rem 0.24rem 0.32rem;
  background:
    url("../img/credit-card.png") no-repeat right -0.3rem center / 1.6rem auto,
    linear-gradient(
      135deg,
      rgba(var(--spike-primary-rgb), 0.18) 0%,
      rgba(var(--spike-primary-rgb), 0.04) 100%
    );
  border-radius: var(--spike-radius);
}

.referral-row1 {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  margin-bottom: 0.12rem;
}

.referral-reword {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.02rem 0.08rem 0.02rem 0.2rem;
  background: linear-gradient(180deg, var(--spike-primary) 0%, var(--spike-primary) 100%);
  color: var(--spike-primary-text);
  font-size: 0.12rem;
  border-radius: var(--spike-radius);
  cursor: pointer;
  line-height: 1.6;
  box-shadow: 0 0.04rem 0.08rem rgba(var(--spike-primary-rgb), 0.3);
}

.referral-reword img {
  position: absolute;
  left: -0.16rem;
  top: -0.06rem;
  width: 0.32rem;
  height: 0.32rem;
}

.referral-row2 {
  font-size: 0.14rem;
  font-weight: 600;
  color: #2a3547;
  margin-top: 0.16rem;
  margin-bottom: 0.08rem;
}

.referral-row3,
.referral-row4 {
  font-size: 0.13rem;
  color: #8692b0;
  line-height: 1.6;
}

.referral-url {
  display: flex;
  align-items: center;
  height: 0.4rem;
  border: 1px solid #eef0f3;
  border-radius: var(--spike-radius);
  margin-top: 0.16rem;
  overflow: hidden;
}

.referral-url-text {
  flex: 1;
  padding: 0 0.12rem;
  font-size: 0.13rem;
  color: #8692b0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.referral-url-copy {
  flex-shrink: 0;
  padding: 0 0.16rem;
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(var(--spike-primary-rgb), 0.12);
  color: var(--color-primary, var(--spike-primary));
  font-size: 0.13rem;
  cursor: pointer;
  transition: background 0.2s;
}

.referral-url-copy:hover {
  background: rgba(var(--spike-primary-rgb), 0.2);
}

.referral-stat {
  display: flex;
  gap: 0.12rem;
  margin-top: 0.16rem;
}

.referral-stat-item {
  flex: 1;
  padding: 0.16rem;
  background: #f9fafc;
  border-radius: var(--spike-radius);
}

.referral-stat-num {
  font-size: 0.22rem;
  font-weight: 700;
  color: #2a3547;
  line-height: 1.2;
}

.referral-stat-text {
  margin-top: 0.04rem;
  font-size: 0.12rem;
  color: #8692b0;
}

/* ============================================================
 * [F] 工单卡
 * ============================================================ */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.12rem;
  border-radius: var(--spike-radius);
  cursor: pointer;
  transition: background 0.2s;
}

.ticket-item:hover {
  background: rgba(var(--spike-primary-rgb), 0.06);
}

.ticket-item:hover .ticket-id {
  color: var(--color-primary);
}

.ticket-status {
  flex-shrink: 0;
  padding: 0.02rem 0.1rem;
  font-size: 0.12rem;
  font-weight: 500;
  border-radius: var(--spike-radius);
  line-height: 1.6;
}

.ticket-body {
  flex: 1;
  min-width: 0;
}

.ticket-title {
  font-size: 0.14rem;
  color: #2a3547;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ticket-name {
  margin-top: 0.04rem;
  font-size: 0.12rem;
  color: #8692b0;
}

/* ============================================================
 * [G] 公告卡
 * ============================================================ */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  padding: 0.12rem;
  border-radius: var(--spike-radius);
  cursor: pointer;
  transition: background 0.2s;
}

.notice-item:hover {
  background: rgba(var(--spike-primary-rgb), 0.06);
}

.notice-item:hover .notice-title {
  color: var(--color-primary);
}

.notice-item:hover .notice-arrow {
  color: var(--color-primary);
  transform: translateX(0.04rem);
}

.notice-arrow {
  transition:
    transform 0.2s,
    color 0.2s;
}

.notice-date {
  width: 0.6rem;
  flex-shrink: 0;
  font-size: 0.16rem;
  font-weight: 600;
  color: #2a3547;
  text-align: center;
  padding: 0.04rem 0;
  background: rgba(var(--spike-primary-rgb), 0.08);
  border-radius: var(--spike-radius);
  line-height: 1.4;
}

.notice-info {
  flex: 1;
  min-width: 0;
}

.notice-title {
  font-size: 0.14rem;
  color: #2a3547;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.notice-type {
  margin-top: 0.04rem;
  font-size: 0.12rem;
  color: #8692b0;
}

.notice-arrow {
  flex-shrink: 0;
  color: #8692b0;
  font-size: 0.14rem;
}

/* ============================================================
 * 弹窗样式（保留原 dialog 样式）
 * ============================================================ */
.open-dialog {
  font-size: 0.16rem;
}

.open-dialog .dialog-footer {
  font-size: 0.16rem;
}

.open-dialog .dialog-footer .btn-ok {
  width: 1.2rem;
  height: 0.44rem;
  background: var(--color-primary, var(--spike-primary));
  border: none;
  border-radius: var(--spike-radius);
  color: var(--spike-primary-text);
  font-size: 0.14rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0.04rem 0.12rem rgba(var(--spike-primary-rgb), 0.25);
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}

.open-dialog .dialog-footer .btn-ok:hover {
  background: var(--spike-primary);
  transform: translateY(-0.01rem);
  box-shadow: 0 0.06rem 0.16rem rgba(var(--spike-primary-rgb), 0.35);
}

.open-dialog .dialog-footer .btn-no {
  width: 1.2rem;
  height: 0.44rem;
  background: #f1f3f6;
  border: none;
  border-radius: var(--spike-radius);
  color: #2a3547;
  font-size: 0.14rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s;
}

.open-dialog .dialog-footer .btn-no:hover {
  background: #e6eaf0;
}

/* ============================================================
 * 微信公众号悬浮气泡
 * ============================================================ */
.wx-code {
  position: fixed;
  top: 50%;
  right: 0.24rem;
  transform: translateY(-50%);
  width: 0.4rem;
  height: 0.4rem;
  border-radius: var(--spike-circle);
  background: #fff;
  box-shadow: 0 0.02rem 0.12rem rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
}

.wx-code .wx-img {
  width: 0.32rem;
  height: 0.32rem;
  background: url("../img/wx.svg") no-repeat center / contain;
  transition: transform 0.2s;
}

.wx-code:hover .wx-img {
  background: var(--spike-primary);
  -webkit-mask: url("../img/wx_hover.svg") no-repeat center / contain;
  mask: url("../img/wx_hover.svg") no-repeat center / contain;
  transform: scale(1.08);
}

/* 实名插件缺失时，右侧推荐/工单列补到第二行，避免统计卡右侧留空。 */
.home-grid.without-certification .product-card {
  grid-column: 1 / span 8;
  grid-row: 3;
}

.home-grid.without-certification .home-right-column {
  grid-column: 9 / span 4;
  grid-row: 2 / span 2;
  align-self: start;
}

.wx-box {
  text-align: center;
}

.wx-box .img {
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
}

.wx-box .img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================================
 * 响应式：< 1280 紧凑两列；< 1024 单列堆叠
 * ============================================================ */
@media screen and (max-width: 1280px) {
  .home-grid.without-certification .product-card,
  .home-grid.without-certification .home-right-column {
    grid-column: span 12;
    grid-row: auto;
  }
  .welcome-card {
    grid-column: span 12;
  }
  .balance-card {
    grid-column: span 12;
  }
  .stat-card,
  .cert-card {
    grid-column: span 4;
  }
  .product-card {
    grid-column: span 12;
  }
  .home-right-column {
    grid-column: span 12;
  }

  /* 窄屏下右列变为水平三栏，避免过高 */
  .home-right-column {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .home-right-column > .card {
    flex: 1 1 calc(50% - 0.12rem);
    min-width: 3.6rem;
  }
  .home-right-column > .referral-card {
    flex: 1 1 100%;
  }
}

@media screen and (max-width: 1024px) {
  .welcome-card,
  .balance-card,
  .stat-card,
  .cert-card,
  .product-card,
  .home-right-column {
    grid-column: span 12;
  }

  .home-right-column {
    flex-direction: column;
  }
  .home-right-column > .card {
    flex: 1 1 100%;
    min-width: 0;
  }

  .welcome-card {
    flex-direction: column;
  }
  .welcome-right {
    display: none;
  }
  .welcome-stats {
    flex-wrap: wrap;
  }
}

/* ============================================================
 * 响应式：< 768px 手机端优化
 * ============================================================ */
@media screen and (max-width: 767px) {
  /* 整体布局 */
  .home-grid {
    gap: 12px;
    padding: 12px;
  }
  .card {
    border-radius: var(--spike-radius);
    padding: 16px;
  }

  /* 欢迎卡片 */
  .welcome-card {
    flex-direction: column;
    min-height: auto;
    padding: 16px;
  }
  .welcome-head {
    gap: 12px;
  }
  .welcome-avatar {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  .welcome-hello {
    font-size: 16px;
    flex-wrap: wrap;
  }
  .welcome-level {
    font-size: 11px;
    padding: 2px 6px;
  }
  .welcome-id {
    font-size: 12px;
  }
  .welcome-stats {
    gap: 8px;
    margin-top: 16px;
  }
  .mini-stat {
    flex: 1;
    min-width: calc(33.333% - 6px);
    padding: 10px 8px;
    flex-direction: column;
    gap: 6px;
  }
  .mini-stat-icon {
    width: 36px;
    height: 36px;
  }
  .mini-stat-icon img {
    width: 20px;
    height: 20px;
  }
  .mini-stat-num {
    font-size: 18px;
  }
  .mini-stat-label {
    font-size: 11px;
  }
  .welcome-right {
    display: none;
  }

  /* 余额卡片 */
  .balance-card {
    min-height: auto;
    padding: 16px;
  }
  .balance-head {
    margin-bottom: 8px;
  }
  .balance-title {
    font-size: 13px;
  }
  .balance-recharge {
    font-size: 12px;
    padding: 3px 10px;
  }
  .balance-amount {
    font-size: 24px;
    gap: 8px;
  }
  .balance-prefix {
    font-size: 16px;
  }
  .balance-recharge-text {
    font-size: 12px;
  }
  .balance-meta {
    font-size: 11px;
    gap: 4px;
  }
  .balance-sub-row {
    gap: 4px;
  }
  .balance-sub-label {
    font-size: 12px;
    gap: 4px;
  }
  .balance-sub-value {
    font-size: 14px;
  }

  /* 统计卡片（本月消费/总消费） */
  .stat-card {
    min-height: auto;
    padding: 16px;
  }
  .stat-head {
    margin-bottom: 8px;
  }
  .stat-title {
    font-size: 13px;
  }
  .stat-chip {
    font-size: 11px;
    padding: 2px 6px;
  }
  .stat-value {
    font-size: 22px;
  }
  .stat-prefix {
    font-size: 14px;
  }

  /* 认证卡片 */
  .cert-card {
    gap: 8px;
    padding: 16px;
  }
  .cert-row {
    gap: 8px;
    padding: 6px 0;
  }
  .cert-icon {
    width: 20px;
    height: 20px;
  }
  .cert-name .company-name,
  .cert-name .cert-cta {
    font-size: 13px;
  }
  .cert-extra {
    font-size: 11px;
    margin-top: 2px;
  }
  .cert-extra .cert-id {
    max-width: 120px;
  }

  /* 产品列表表格 - 水平滚动 */
  .product-card {
    padding: 16px;
    overflow: hidden;
  }
  .product-card .card-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .spike-table.el-table {
    font-size: 12px;
  }
  .spike-table.el-table th.el-table__cell {
    font-size: 11px !important;
    padding: 8px 4px !important;
  }
  .spike-table.el-table td.el-table__cell {
    font-size: 12px;
    padding: 10px 4px !important;
  }
  .product-name {
    font-size: 13px;
  }

  /* 右列容器 */
  .home-right-column {
    gap: 12px;
  }
  .home-right-column .card {
    padding: 16px;
  }

  /* 推介计划卡 */
  .referral-open .referral-top {
    margin: -16px -16px 0;
    padding: 16px 16px 20px;
  }
  .referral-row1 {
    margin-bottom: 8px;
  }
  .referral-row2 {
    font-size: 13px;
    margin-top: 12px;
    margin-bottom: 4px;
  }
  .referral-row3,
  .referral-row4 {
    font-size: 11px;
  }
  .referral-url {
    height: 36px;
    margin-top: 12px;
  }
  .referral-url-text {
    font-size: 11px;
    padding: 0 8px;
  }
  .referral-url-copy {
    font-size: 12px;
    padding: 0 12px;
  }
  .referral-stat {
    margin-top: 12px;
  }
  .referral-stat-item {
    padding: 10px;
  }
  .referral-stat-num {
    font-size: 16px;
  }
  .referral-stat-text {
    font-size: 11px;
  }

  /* 工单卡 */
  .ticket-item {
    gap: 8px;
    padding: 10px;
  }
  .ticket-status {
    font-size: 10px;
    padding: 2px 6px;
  }
  .ticket-title {
    font-size: 13px;
  }
  .ticket-name {
    font-size: 11px;
  }

  /* 公告卡 */
  .notice-item {
    gap: 10px;
    padding: 10px;
  }
  .notice-date {
    width: 44px;
    font-size: 13px;
  }
  .notice-title {
    font-size: 13px;
  }
  .notice-type {
    font-size: 11px;
  }

  /* 微信公众号悬浮按钮 */
  .wx-code {
    right: 12px;
    width: 36px;
    height: 36px;
  }
  .wx-code .wx-img {
    width: 24px;
    height: 24px;
  }
}
