/* ==========================================================================
   Reach · 账户体系（登录 / 注册 / 个人中心）
   Dark theme aligned with css/style.css（背景 #0B1220，主色 #3B82F6）
   ========================================================================== */

/* ---- 页面骨架 ---- */
.acct-page {
  min-height: 100vh;
  padding: 148px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.acct-page--center { justify-content: center; }

/* ---- 登录 / 注册卡片 ---- */
.acct-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 40px 36px 36px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.4);
}
.acct-card h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #F9FAFB;
  margin: 0 0 6px;
}
.acct-card__sub {
  font-size: 14px;
  color: #94A3B8;
  margin: 0 0 28px;
}

/* ---- 表单 ---- */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #F9FAFB;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input::placeholder { color: #64748B; }
.form-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* ---- 提交按钮（loading 态） ---- */
.acct-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: #3B82F6;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
}
.acct-btn:hover { background: #2F6FE0; transform: translateY(-1px); }
.acct-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.acct-btn .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: acct-spin 0.7s linear infinite;
}
.acct-btn.is-loading .spinner { display: inline-block; }
@keyframes acct-spin { to { transform: rotate(360deg); } }

/* ---- 错误提示 ---- */
.acct-error {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: #F87171;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px;
}
.acct-error.is-visible { display: block; }

/* ---- 底部切换链接 ---- */
.acct-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #94A3B8;
}
.acct-switch a { color: #60A5FA; font-weight: 500; }
.acct-switch a:hover { text-decoration: underline; }

/* ---- 个人中心 ---- */
.acct-shell {
  width: 100%;
  max-width: 960px;
}
.acct-hello { margin-bottom: 4px; }
.acct-hello h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #F9FAFB;
  margin: 0 0 6px;
}
.acct-hello__email {
  font-size: 14px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.acct-plan-badge {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #60A5FA;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  text-transform: uppercase;
}

.acct-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 780px) { .acct-grid { grid-template-columns: 1fr; } }

.acct-info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.acct-info-card h2 {
  font-size: 16px;
  font-weight: 600;
  color: #F9FAFB;
  margin: 0 0 4px;
}
.acct-info-card__desc {
  font-size: 13px;
  color: #94A3B8;
  margin: 0 0 16px;
}

.acct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.acct-row:last-child { border-bottom: none; }
.acct-label {
  width: 64px;
  flex: none;
  font-size: 13px;
  color: #94A3B8;
}
.acct-value {
  flex: 1;
  font-size: 14px;
  color: #F9FAFB;
  word-break: break-all;
}

/* 资料编辑 */
.acct-edit-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  color: #F9FAFB;
  outline: none;
}
.acct-edit-input:focus { border-color: #3B82F6; }
.acct-btn--sm {
  width: auto;
  margin: 0;
  padding: 8px 18px;
  font-size: 13px;
}
.acct-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.acct-saved-hint {
  font-size: 12px;
  color: #34D399;
  margin-right: auto;
  align-self: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.acct-saved-hint.is-visible { opacity: 1; }

/* 用量 */
.acct-usage-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.acct-usage-num {
  font-size: 34px;
  font-weight: 700;
  color: #60A5FA;
  line-height: 1.1;
}
.acct-usage-unit { font-size: 13px; color: #94A3B8; }
.acct-usage-detail { font-size: 13px; color: #94A3B8; }
.acct-usage-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}
.acct-usage-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* 占位 / 离线 */
.acct-placeholder {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.7;
}
.acct-placeholder strong { color: #F9FAFB; font-weight: 600; }
.acct-offline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #F59E0B;
}
.acct-offline::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* 退出登录 */
.acct-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn--danger {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #F87171;
}
.btn--danger:hover {
  background: rgba(248, 113, 113, 0.2);
  transform: translateY(-1px);
}
.acct-actions__note { font-size: 12px; color: #64748B; }

/* 移动端适配 */
@media (max-width: 560px) {
  .acct-page { padding: 130px 16px 48px; }
  .acct-card { padding: 28px 20px 24px; }
  .acct-info-card { padding: 20px 16px; }
}

/* ============ 快捷登录（手机号/微信/邮箱 三入口） ============ */
.acct-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 12px;
}
.acct-quick__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  color: #E2E8F0;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 12px;
  font-family: inherit;
}
.acct-quick__btn:hover {
  background: rgba(110, 231, 183, 0.08);
  border-color: rgba(110, 231, 183, 0.3);
}
.acct-quick__btn--active {
  background: rgba(110, 231, 183, 0.12);
  border-color: rgba(110, 231, 183, 0.5);
  color: #6EE7B7;
}
.acct-quick__icon { font-size: 24px; line-height: 1; }
.acct-quick__label { font-weight: 500; }

.acct-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 14px;
  color: #64748B;
  font-size: 12px;
}
.acct-divider::before,
.acct-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.acct-divider span { padding: 0 12px; }

.form-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.form-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #94A3B8;
  font-size: 14px;
  font-weight: 600;
}
.form-hint {
  font-size: 12px;
  color: #94A3B8;
  margin: 6px 0 0;
  line-height: 1.5;
}
.acct-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
}
.acct-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.acct-btn--sm { padding: 10px 14px; font-size: 13px; white-space: nowrap; }

/* 微信扫码 */
.acct-wechat {
  text-align: center;
  padding: 8px 0 4px;
}
.acct-wechat__qr {
  display: flex;
  justify-content: center;
  margin: 6px 0 14px;
}
.acct-wechat__qr svg {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.acct-wechat__hint {
  font-size: 14px;
  color: #94A3B8;
  margin: 0 0 16px;
  line-height: 1.7;
}
.acct-wechat__mock {
  font-size: 11px;
  color: #64748B;
  margin: 10px 0 0;
}

/* ============ 账户中心导航 + 钱包视图 ============ */
.acct-shell--with-sidebar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
/* 内容区统一定位到第 2 列第 1 行（sidebar 右侧），同一时刻仅一个显示 */
.acct-main { grid-column: 2; grid-row: 1; }
.acct-view { grid-column: 2; grid-row: 1; }
.acct-sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 12px;
  height: fit-content;
  position: sticky;
  top: 100px;
}
.acct-sidebar__group { margin-bottom: 14px; }
.acct-sidebar__title {
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px 6px;
}
.acct-sidebar__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.acct-sidebar__link:hover { background: rgba(255, 255, 255, 0.04); color: #E2E8F0; }
.acct-sidebar__link--active {
  background: rgba(110, 231, 183, 0.12);
  color: #6EE7B7;
  font-weight: 600;
}
.acct-view { display: none; }
.acct-view--active { display: block; }

/* 钱包卡 */
.wallet-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(110,231,183,0.1));
  border: 1px solid rgba(110, 231, 183, 0.3);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}
.wallet-card__title { font-size: 12px; color: #94A3B8; margin: 0 0 4px; }
.wallet-card__balance { font-size: 36px; font-weight: 700; color: #6EE7B7; line-height: 1; margin: 4px 0; }
.wallet-card__balance small { font-size: 14px; color: #94A3B8; font-weight: 400; margin-left: 4px; }
.wallet-card__meta { font-size: 12px; color: #94A3B8; margin-top: 8px; }
.wallet-card__actions { margin-top: 16px; display: flex; gap: 8px; }

.tx-list { list-style: none; padding: 0; margin: 0; }
.tx-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tx-list li:last-child { border-bottom: none; }
.tx-type {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(110, 231, 183, 0.15);
  color: #6EE7B7;
  margin-right: 6px;
}
.tx-type--consume { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.tx-amount { font-family: monospace; font-weight: 600; }
.tx-amount--in { color: #6EE7B7; }
.tx-amount--out { color: #F87171; }

.binding-list { display: grid; gap: 10px; }
.binding-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.binding-item__icon { font-size: 22px; }
.binding-item__name { font-size: 14px; font-weight: 600; flex: 1; }
.binding-item__id { font-size: 12px; color: #64748B; font-family: monospace; }

@media (max-width: 768px) {
  .acct-shell--with-sidebar { grid-template-columns: 1fr; }
  .acct-sidebar { position: static; }
  .acct-main, .acct-view { grid-column: auto; grid-row: auto; }
}
