/* SkyID H5 组件层：按钮 / 输入 / toast / modal / 骨架屏 / 空状态 / 徽标 / 列表行 */

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.06s var(--ease), opacity 0.2s var(--ease);
  user-select: none;
}
.btn:active { transform: scale(0.985); }
.btn.primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.28);
}
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn.danger { background: var(--err); color: #fff; }
.btn:disabled, .btn.loading { opacity: 0.55; pointer-events: none; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 输入 --- */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  outline: none;
  transition: border-color 0.2s var(--ease);
}
.field input:focus { border-color: var(--grad-b); }
.field input::placeholder { color: var(--ink-3); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.field.error input { border-color: var(--err); }
.field .inline-error { font-size: 12px; color: var(--err); min-height: 18px; }

/* 复选（记住我） */
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--grad-b); }

/* OTP 大号验证码输入（inputmode=numeric / autocomplete=one-time-code 在 HTML 上） */
.otp-input {
  letter-spacing: 14px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}

/* --- toast（3 秒消失） --- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(12px);
  max-width: 78vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(28, 35, 51, 0.92);
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 60;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: rgba(220, 38, 38, 0.95); }

/* --- 二次确认弹窗 --- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(18, 22, 34, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fadeIn 0.18s var(--ease);
}
.modal {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px 20px 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}
.modal-title { font-size: 16.5px; font-weight: 700; }
.modal-body { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.modal-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions .btn { min-height: 42px; font-size: 14.5px; }
@keyframes fadeIn { from { opacity: 0; } }

/* --- 骨架屏 --- */
.skeleton-row { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.skeleton-bar {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(100deg, #eceef4 40%, #f7f8fb 50%, #eceef4 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.skeleton-bar.w40 { width: 42%; height: 18px; }
.skeleton-bar.w20 { width: 22%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- 空状态 --- */
.empty { text-align: center; padding: 34px 0 26px; color: var(--ink-3); }
.empty-star { font-size: 26px; color: var(--gold); opacity: 0.75; }
.empty p { margin-top: 8px; font-size: 13px; }

/* --- 徽标 --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* --- 身份卡内部件 --- */
.id-name { font-size: 21px; font-weight: 700; margin-top: 8px; }
.id-stellar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.id-stellar .sid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--gold);
  background: #fbf6ea;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  font-weight: 600;
}
.icon-btn {
  min-width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 15px;
  border: 1px solid var(--line);
  background: var(--card);
}
.icon-btn:active { background: var(--bg); }

/* --- 状态卡（签到/积分/信息行） --- */
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 13px; color: var(--ink-2); }
.stat-value { font-size: 15px; font-weight: 700; }
.stat-value.gold { color: var(--gold); }
.stat-value.big { font-size: 24px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }
.link-arrow { color: var(--ink-3); font-size: 14px; }

/* --- 流水列表 --- */
.ledger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}
.ledger-item:last-child { border-bottom: 0; }
.ledger-main { display: grid; gap: 2px; }
.ledger-reason { font-size: 14.5px; font-weight: 600; }
.ledger-date { font-size: 12px; color: var(--ink-3); }
.ledger-amount { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger-amount.plus { color: var(--ok); }
.ledger-amount.minus { color: var(--err); }

/* 加载更多 */
.load-more { text-align: center; padding: 14px 0 6px; }
.load-more button { color: var(--grad-b); font-size: 13.5px; font-weight: 600; padding: 8px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }

/* 功能入口置灰（meta 开关关闭） */
.gate-disabled { opacity: 0.45; pointer-events: auto; }

/* --- 登录页专属 --- */
.login-hero { padding-top: 12vh; }
.login-card { margin-top: -34px; }
.login-actions { display: grid; gap: 14px; margin-top: 4px; }
.email-shown { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.email-shown b { color: var(--ink); word-break: break-all; }
.resend-row { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.resend-btn { color: var(--grad-b); font-size: 13px; font-weight: 600; }
.resend-btn:disabled { color: var(--ink-3); font-weight: 400; }

/* --- 我的页 --- */
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 700;
}
.me-head { display: flex; align-items: center; gap: 14px; }
.footer-note { text-align: center; padding: 22px 0 10px; font-size: 12px; color: var(--ink-3); }
