:root{
  --ui-bg:#faf8f5;
  --ui-bg-soft:#f6f1eb;
  --ui-surface:#fffdfb;
  --ui-surface-2:#f7f2ec;
  --ui-text:#333333;
  --ui-muted:#5a5550;
  --ui-soft:#8a847d;
  --ui-border:#ece6df;
  --ui-border-strong:#ddd3c8;
  --ui-accent:#6b625b;
  --ui-accent-hover:#595149;
  --ui-accent-soft:#efe8e0;
  --ui-success-bg:#eef5ef;
  --ui-success:#44624f;
  --ui-danger-bg:#f9efee;
  --ui-danger:#8b5d57;
  --ui-shadow:0 8px 22px rgba(71, 57, 45, 0.06);
  --ui-shadow-soft:0 2px 8px rgba(71, 57, 45, 0.04);
  --ui-radius:14px;
  --ui-radius-sm:10px;
  --ui-wrap:480px;
}

*{ -webkit-tap-highlight-color: transparent; }
html{ -webkit-text-size-adjust:100%; }
body{
  color:var(--ui-text) !important;
  background:linear-gradient(180deg,#fcfbf9 0%, var(--ui-bg) 100%) !important;
}

/* 通用文字与容器 */
.container{
  width:min(100%, var(--ui-wrap)) !important;
  max-width:var(--ui-wrap) !important;
  margin:0 auto !important;
}
.page-header,
.card-header,
.auth-card,
.card,
.quick-panel,
.tpl-config,
#tplLotteryWrap,
#tplPubgWrap,
#tplImageUploadWrap,
#tplClubLogoWrap,
#recharge-modal > div,
#pubgUnlockModal > div,
#data-modal > div{
  background:var(--ui-surface) !important;
  border-color:var(--ui-border) !important;
  box-shadow:var(--ui-shadow) !important;
}
.card,
.auth-card,
.quick-panel,
.tpl-config,
#tplLotteryWrap,
#tplPubgWrap,
#tplImageUploadWrap,
#tplClubLogoWrap,
#recharge-modal > div,
#pubgUnlockModal > div,
#data-modal > div{
  border-radius:var(--ui-radius) !important;
}
.card:hover,
.auth-card:hover,
.tpl-card:hover,
.btn:hover{
  transform:none !important;
}

.card-title,
.page-title,
h1,h2,h3,
.ui-toast-title,
.qs-label,
.tpl-title,
.math-question{
  color:var(--ui-text) !important;
  background:none !important;
  -webkit-background-clip:border-box !important;
  background-clip:border-box !important;
  text-shadow:none !important;
}
.card-subtitle,
.tip,
.help-text,
.small,
.subtitle,
.logout-btn,
.ui-toast-msg,
.text-warning,
.page-header + .alert + .alert,
label,
.aux-links a,
.footer,
body .muted,
body [style*="color:#64748b"],
body [style*="color: #64748b"],
body [style*="color:#475569"],
body [style*="color: #475569"],
body [style*="color:#4a5568"],
body [style*="color: #4a5568"],
body [style*="color:#718096"],
body [style*="color: #718096"]{
  color:var(--ui-muted) !important;
}
body [style*="color:#0f172a"],
body [style*="color: #0f172a"],
body [style*="color:#2d3748"],
body [style*="color: #2d3748"],
body [style*="color:#111827"],
body [style*="color: #111827"]{
  color:var(--ui-text) !important;
}

/* 表面层与边框 */
body::before,
body::after,
.draw-btn::before,
.input-action::before,
.bottom-nav::before,
.top-links::before,
.ui-toast-progress,
.ui-toast-progress > i{
  display:none !important;
}
.top-links,
.tab-nav,
.captcha-group,
.user-info,
.toggle-group,
.invite-link-display,
.empty-state,
.tpl-card,
.math-question,
#ajax-alert,
.ui-toast,
.badge,
body [style*="background:#f8fafc"],
body [style*="background: #f8fafc"],
body [style*="background:#ffffff"],
body [style*="background: #ffffff"],
body [style*="background:#fafafa"],
body [style*="background: #fafafa"],
body [style*="background:#f7fafc"],
body [style*="background: #f7fafc"],
body [style*="background:#edf2f7"],
body [style*="background: #edf2f7"],
body [style*="background:#e6f4ff"],
body [style*="background: #e6f4ff"],
body [style*="background:#fff"],
body [style*="background: #fff"]{
  background:var(--ui-surface-2) !important;
}
.alert,
.alert-success,
.alert-error,
.alert.success,
.alert.error{
  border-radius:12px !important;
  box-shadow:none !important;
}
.alert-success,
.alert.success{
  background:var(--ui-success-bg) !important;
  color:var(--ui-success) !important;
  border:1px solid rgba(68,98,79,.12) !important;
}
.alert-error,
.alert.error{
  background:var(--ui-danger-bg) !important;
  color:var(--ui-danger) !important;
  border:1px solid rgba(139,93,87,.12) !important;
}
.user-page [style*="border:1px solid #e2e8f0"],
.user-page [style*="border: 1px solid #e2e8f0"],
.user-page [style*="border:1px dashed #e2e8f0"],
.user-page [style*="border: 1px dashed #e2e8f0"],
.user-page [style*="border-bottom:1px solid #e2e8f0"],
.user-page [style*="border-bottom: 1px solid #e2e8f0"],
.user-page [style*="border-bottom:1px dashed #e2e8f0"],
.user-page [style*="border-bottom: 1px dashed #e2e8f0"],
.user-page [style*="border-radius:0.75rem"],
.user-page [style*="border-radius: 0.75rem"],
.user-page [style*="border-radius:12px"],
.user-page [style*="border-radius: 12px"],
.user-page [style*="border-radius:16px"],
.user-page [style*="border-radius: 16px"]{
  border-color:var(--ui-border) !important;
}
body [style*="border:1px solid #e2e8f0"],
body [style*="border: 1px solid #e2e8f0"],
body [style*="border:1px solid #e2e8f0;"],
body [style*="border: 1px solid #e2e8f0;"],
body [style*="border:1px solid #d2d2d7"],
body [style*="border: 1px solid #d2d2d7"],
body [style*="border:1px solid #cbd5e0"],
body [style*="border: 1px solid #cbd5e0"],
body [style*="border:1px solid #ffedb3"],
body [style*="border: 1px solid #ffedb3"]{
  border-color:var(--ui-border) !important;
}

/* 输入与表单 */
.form-input,
.form-control,
input,
select,
textarea{
  background:#fffdfa !important;
  color:var(--ui-text) !important;
  border:1px solid var(--ui-border) !important;
  border-radius:10px !important;
  box-shadow:none !important;
}
.form-input::placeholder,
.form-control::placeholder,
input::placeholder,
textarea::placeholder{
  color:var(--ui-soft) !important;
}
.form-input:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus{
  outline:none !important;
  border-color:var(--ui-border-strong) !important;
  box-shadow:0 0 0 3px rgba(107, 98, 91, 0.08) !important;
  background:#fff !important;
}
.input-icon,
.input-action,
.icon-warn,
.fa-solid,
svg{
  color:currentColor;
}
.input-action{
  color:var(--ui-soft) !important;
}
.input-action:hover{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
}

/* 按钮 */
.btn,
.draw-btn,
.bottom-nav .nav-item,
.tab-button,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-light{
  border-radius:10px !important;
  font-weight:600 !important;
  box-shadow:none !important;
}
.btn-primary,
.draw-btn,
.btn-primary:hover,
.draw-btn:hover,
.btn-primary:focus,
.draw-btn:focus{
  background:var(--ui-accent) !important;
  color:#fffdf9 !important;
  border:1px solid var(--ui-accent) !important;
}
.btn-primary:hover,
.draw-btn:hover{
  background:var(--ui-accent-hover) !important;
}
.btn-secondary,
.btn-ghost,
.btn-light{
  background:var(--ui-surface) !important;
  color:var(--ui-text) !important;
  border:1px solid var(--ui-border) !important;
}
.btn-secondary:hover,
.btn-ghost:hover,
.btn-light:hover{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
}
.btn.is-loading::after,
.draw-btn:before,
.btn .ui-ripple{
  display:none !important;
}

/* 登录/注册页 */
.auth-page,
.forgot-page{
  min-height:100vh;
  padding:20px 16px !important;
  align-items:center !important;
  justify-content:center !important;
}
.auth-page .container,
.forgot-page .container{
  max-width:420px !important;
}
.auth-page .auth-card,
.forgot-page .card{
  background:var(--ui-surface) !important;
  border:1px solid var(--ui-border) !important;
  transform:none !important;
  opacity:1 !important;
  animation:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
.auth-page .card-header,
.forgot-page .card{
  padding-top:22px !important;
}
.auth-page .card-title,
.forgot-page h1{
  font-size:1.42rem !important;
  font-weight:700 !important;
  margin-bottom:8px !important;
}
.auth-page .card-subtitle,
.forgot-page .tip{
  font-size:0.93rem !important;
  line-height:1.55 !important;
}
.auth-page .tab-nav{
  gap:0 !important;
  padding:4px !important;
  background:var(--ui-bg-soft) !important;
  border:1px solid var(--ui-border) !important;
}
.auth-page .tab-indicator{
  top:4px !important;
  bottom:4px !important;
  left:4px !important;
  width:calc((100% - 8px) / 2) !important;
  background:#fff !important;
  border:1px solid var(--ui-border) !important;
  box-shadow:none !important;
}
.auth-page .tab-button{
  color:var(--ui-muted) !important;
  font-size:0.98rem !important;
  padding:10px 12px !important;
}
.auth-page .tab-button.active{
  color:var(--ui-text) !important;
}
.auth-page .captcha-group,
.auth-page .math-question{
  background:var(--ui-bg-soft) !important;
}
.auth-page .top-links{
  justify-content:flex-start !important;
  margin-bottom:12px !important;
}
.auth-page .footer,
.forgot-page .small{
  color:var(--ui-soft) !important;
}

/* 用户中心 */
.user-page{
  min-height:100vh;
  padding:16px 14px calc(104px + env(safe-area-inset-bottom)) !important;
}
.user-page .container{
  max-width:480px !important;
}
.user-page .page-header{
  position:sticky;
  top:0;
  z-index:40;
  padding:12px 0 14px !important;
  margin-bottom:14px !important;
  background:linear-gradient(180deg, rgba(250,248,245,.96), rgba(250,248,245,.84)) !important;
  border-bottom:1px solid var(--ui-border) !important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:none !important;
}
.user-page .page-title{
  font-size:1.2rem !important;
  font-weight:700 !important;
}
.user-page .logout-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border:1px solid var(--ui-border);
  border-radius:999px;
  color:var(--ui-text) !important;
  background:var(--ui-surface);
}
.user-page .logout-btn:hover{ background:var(--ui-accent-soft); color:var(--ui-accent) !important; }
.user-page .card{
  padding:16px !important;
  margin-bottom:12px !important;
  border:1px solid var(--ui-border) !important;
  animation:none !important;
}
.user-page .card-title{
  font-size:1.02rem !important;
  font-weight:700 !important;
  margin-bottom:12px !important;
}
.user-page .user-info p,
.user-page .help-text,
.user-page .small,
.user-page .tip{
  line-height:1.65 !important;
}
.user-page .badge,
.user-page [style*="border-radius:999px"]{
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface) !important;
  color:var(--ui-text) !important;
}
.user-page .toggle-slider{
  background:var(--ui-border-strong) !important;
}
.user-page input:checked + .toggle-slider{
  background:var(--ui-accent) !important;
}
.user-page .toggle-slider:before{
  box-shadow:var(--ui-shadow-soft) !important;
}
.user-page .empty-state{
  border:1px dashed var(--ui-border) !important;
  color:var(--ui-muted) !important;
}
.user-page .data-table,
.user-page table{
  border-radius:12px !important;
  overflow:hidden;
}
.user-page .data-table th,
.user-page .data-table td,
.user-page table th,
.user-page table td{
  border-bottom:1px solid var(--ui-border) !important;
}
.user-page .data-table th,
.user-page table th{
  background:var(--ui-bg-soft) !important;
  color:var(--ui-muted) !important;
}
.user-page .data-table tr:hover,
.user-page table tr:hover{
  background:rgba(239, 232, 224, 0.35) !important;
}
.user-page .quick-panel,
.user-page .tpl-config,
.user-page #tplLotteryWrap,
.user-page #tplPubgWrap,
.user-page #tplImageUploadWrap,
.user-page #tplClubLogoWrap{
  background:var(--ui-surface-2) !important;
  border:1px solid var(--ui-border) !important;
}
.user-page .tpl-card{
  background:var(--ui-surface) !important;
  border:1px solid var(--ui-border) !important;
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  min-height:126px;
}
.user-page .tpl-card-actions{
  margin-top:auto;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding-top:6px;
}
.user-page .tpl-copy-btn{
  min-width:88px;
}
.user-page .tpl-card.active{
  border-color:var(--ui-accent) !important;
  box-shadow:0 0 0 3px rgba(107,98,91,0.08) !important;
}
.user-page .tpl-badge{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
  border-color:rgba(107,98,91,0.12) !important;
}
.user-page details summary{
  color:var(--ui-text) !important;
}
.user-page .bottom-nav{
  left:50%;
  transform:translateX(-50%);
  bottom:calc(12px + env(safe-area-inset-bottom));
  width:min(480px, calc(100% - 20px));
  height:56px;
  padding:6px !important;
  background:rgba(255,253,251,0.96) !important;
  border:1px solid var(--ui-border) !important;
  border-radius:16px !important;
  box-shadow:var(--ui-shadow) !important;
  gap:6px !important;
}
.user-page .bottom-nav .nav-item{
  height:42px !important;
  border-radius:10px !important;
  color:var(--ui-muted) !important;
  background:transparent !important;
}
.user-page .bottom-nav .nav-item.active{
  color:var(--ui-text) !important;
  background:var(--ui-accent-soft) !important;
}
.user-page .bottom-nav .nav-item i{
  font-size:15px !important;
}
.user-page .ui-toast{
  background:rgba(255,253,251,0.98) !important;
  border:1px solid var(--ui-border) !important;
}
.user-page #recharge-modal,
.user-page #pubgUnlockModal,
.user-page #data-modal{
  background:rgba(46, 38, 33, 0.28) !important;
}

/* 抽奖/外链页不改，这里不引入这些页面 */

@media (max-width:520px){
  :root{ --ui-wrap:460px; }
  .user-page{ padding-left:12px !important; padding-right:12px !important; }
  .user-page .page-header{ padding-top:8px !important; }
  .auth-page,
  .forgot-page{ padding-left:14px !important; padding-right:14px !important; }
  .page-header{ gap:10px; }
}

/* 用户中心二次优化：导航资源、个人信息、安全区域 */
.user-page .top-resource-strip{
  margin:0 0 12px !important;
}
.user-page .top-resource-strip-inner{
  display:block !important;
  white-space:nowrap;
  overflow-x:auto !important;
  padding:2px 1px 2px !important;
  scrollbar-width:none;
  -ms-overflow-style:none;
  font-size:0;
}
.user-page .top-resource-strip-inner::-webkit-scrollbar{ display:none; }
.user-page .top-resource-link{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  margin:0 8px 8px 0 !important;
  padding:0 14px;
  text-decoration:none !important;
  vertical-align:top;
  white-space:nowrap;
  border:1px solid var(--ui-border) !important;
  border-radius:999px !important;
  background:var(--ui-surface) !important;
  color:var(--ui-text) !important;
  box-shadow:none !important;
  font-size:.92rem !important;
  font-weight:600;
}
.user-page .top-resource-link:last-child{
  margin-right:0 !important;
}
.user-page .top-resource-link i{
  font-size:.86rem;
  opacity:.8;
}
.user-page .top-resource-link-text{
  display:inline-block;
  white-space:nowrap;
}
.user-page .top-resource-link:hover{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
}
.user-page .admin-resource-link{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
  border-color:rgba(107,98,91,.16) !important;
}
.auth-page .top-links{
  display:block !important;
  white-space:nowrap !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  margin:0 0 12px !important;
  padding:2px 1px 2px !important;
  scrollbar-width:none;
  -ms-overflow-style:none;
  font-size:0;
}
.auth-page .top-links::-webkit-scrollbar{ display:none; }
.auth-page .top-links .btn,
.auth-page .top-links a{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-height:38px;
  margin:0 8px 0 0 !important;
  padding:0 14px !important;
  white-space:nowrap !important;
  vertical-align:top;
}
.auth-page .top-links .btn:last-child,
.auth-page .top-links a:last-child{
  margin-right:0 !important;
}
.user-page .profile-panel{
  background:transparent !important;
  padding:0 !important;
}
.user-page .profile-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.user-page .profile-avatar{
  width:54px;
  height:54px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface);
  flex:0 0 auto;
}
.user-page .profile-avatar-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--ui-soft);
}
.user-page .profile-main{
  min-width:0;
  flex:1;
}
.user-page .profile-name-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.user-page .profile-name{
  font-size:1.08rem;
  font-weight:700;
  color:var(--ui-text);
  line-height:1.25;
  word-break:break-all;
}
.user-page .profile-pill{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:var(--ui-accent-soft);
  color:var(--ui-accent);
  font-size:.78rem;
  border:1px solid rgba(107,98,91,.1);
}
.user-page .profile-subline{
  margin-top:4px;
  color:var(--ui-muted);
  font-size:.9rem;
}
.user-page .profile-meta-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.user-page .profile-meta-item,
.user-page .security-subcard,
.user-page .security-mode-box,
.user-page .security-overview{
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface-2) !important;
  border-radius:12px !important;
}
.user-page .profile-meta-item{
  padding:12px 13px;
}
.user-page .meta-label{
  display:block;
  font-size:.82rem;
  color:var(--ui-soft);
  margin-bottom:6px;
}
.user-page .meta-value{
  display:block;
  color:var(--ui-text);
  font-weight:600;
  line-height:1.55;
  word-break:break-word;
}
.user-page .meta-value-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}
.user-page .profile-balance-card .badge{
  margin-left:0 !important;
}
.user-page .security-settings-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.user-page .security-mode-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
}
.user-page .security-mode-copy{
  min-width:0;
  flex:1;
}
.user-page .security-mode-title-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.user-page .security-mode-title{
  font-size:1rem;
  font-weight:700;
  color:var(--ui-text);
}
.user-page .security-state-badge{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--ui-border);
  font-size:.78rem;
  font-weight:600;
}
.user-page .security-state-badge.is-on{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
}
.user-page .security-state-badge.is-off{
  background:var(--ui-surface) !important;
  color:var(--ui-muted) !important;
}
.user-page .security-mode-text{
  margin:0 !important;
}
.user-page .security-toggle-wrap{
  flex:0 0 auto;
}
.user-page .security-inline-note{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.user-page .security-note-chip,
.user-page .security-inline-link{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  font-size:.84rem;
  text-decoration:none !important;
}
.user-page .security-note-chip{
  background:var(--ui-surface-2);
  color:var(--ui-muted);
  border:1px solid var(--ui-border);
}
.user-page .security-inline-link{
  background:var(--ui-surface);
  color:var(--ui-accent);
  border:1px solid rgba(107,98,91,.14);
}
.user-page .security-overview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  margin-bottom:12px;
}
.user-page .security-overview-copy{
  min-width:0;
  flex:1;
}
.user-page .security-email{
  font-size:1rem;
  font-weight:700;
  color:var(--ui-text);
  line-height:1.4;
  word-break:break-all;
}
.user-page .security-email-empty{
  color:var(--ui-muted);
}
.user-page .security-overview .help-text{
  margin:6px 0 0 !important;
}
.user-page .security-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.user-page .security-subcard{
  padding:14px;
}
.user-page .security-subcard-title{
  font-size:1rem;
  font-weight:700;
  color:var(--ui-text);
  margin-bottom:10px;
}
.user-page .compact-form .form-group,
.user-page .inline-form-row{
  margin-bottom:10px;
}
.user-page .inline-form-row{
  display:flex;
  gap:8px;
  align-items:flex-start;
}
.user-page .inline-form-row .form-input{
  margin-bottom:0 !important;
}
.user-page .compact-form .btn.btn-primary{
  width:100%;
}
.user-page .subcard-help{
  margin-top:8px !important;
}
.user-page .account-security-footnote{
  margin-top:12px;
  color:var(--ui-muted);
  font-size:.9rem;
}
@media (max-width: 420px){
  .user-page .security-mode-box,
  .user-page .security-overview{
    flex-direction:column;
    align-items:flex-start;
  }
  .user-page .security-toggle-wrap{
    align-self:flex-end;
  }
  .user-page .inline-form-row{
    flex-direction:column;
  }
  .user-page .inline-form-row .btn{
    width:100%;
  }
}


/* 用户中心三次优化：个人信息排版、快捷入口、代理 API 入口 */
.user-page .profile-hero{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
  border:1px solid var(--ui-border) !important;
  border-radius:16px !important;
  background:linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.94)) !important;
  margin-bottom:12px;
}
.user-page .profile-head{
  align-items:flex-start;
  gap:14px;
  margin-bottom:0;
}
.user-page .profile-avatar{
  width:64px;
  height:64px;
  font-size:1.2rem;
  font-weight:700;
  color:var(--ui-accent);
}
.user-page .profile-avatar-fallback{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
}
.user-page .profile-summary-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}
.user-page .profile-mini-chip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--ui-border) !important;
  background:rgba(255,255,255,0.82) !important;
  color:var(--ui-muted);
  font-size:.82rem;
}
.user-page .profile-quick-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.user-page .profile-action-btn{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--ui-border) !important;
  background:rgba(255,255,255,0.76) !important;
  color:var(--ui-text) !important;
  text-decoration:none !important;
  font-weight:600;
  cursor:pointer;
}
.user-page button.profile-action-btn{
  width:100%;
}
.user-page .profile-action-btn:hover{
  background:var(--ui-accent-soft) !important;
  color:var(--ui-accent) !important;
}
.user-page .profile-action-btn i{
  width:18px;
  text-align:center;
  color:inherit;
}
.user-page .profile-meta-grid-2col{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.user-page .profile-meta-grid-2col .profile-meta-item{
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.user-page .security-mode-box{
  padding:16px;
  background:linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.96)) !important;
}
.user-page .security-inline-note{
  padding:2px 2px 0;
}
.user-page .security-overview{
  padding:16px;
  background:linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.94)) !important;
}
.user-page .account-security-card{
  padding-top:16px !important;
}
@media (max-width: 480px){
  .user-page .profile-quick-actions,
  .user-page .profile-meta-grid-2col{
    grid-template-columns:1fr;
  }
  .user-page .profile-avatar{
    width:58px;
    height:58px;
  }
}


.security-inline-text {
    cursor: default;
    text-decoration: none;
    opacity: 0.88;
}

/* 用户中心 v7：移除快捷入口，重排个人信息 / 安全登录 / 账号安全 */
.user-page .user-card,
.user-page .settings-card,
.user-page .account-security-card{
  padding:16px !important;
}

.user-page .user-card .card-title,
.user-page .settings-card .card-title,
.user-page .account-security-card .card-title{
  margin-bottom:14px !important;
}

.user-page .profile-hero{
  gap:12px;
  padding:16px !important;
  background:var(--ui-surface) !important;
  border-radius:14px !important;
  box-shadow:none !important;
}

.user-page .profile-head{
  align-items:center;
}

.user-page .profile-main{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.user-page .profile-name{
  font-size:1.12rem;
}

.user-page .profile-subline{
  margin-top:0;
  line-height:1.5;
}

.user-page .profile-summary-row{
  gap:8px;
  margin-top:2px;
}

.user-page .profile-mini-chip{
  min-height:30px;
  padding:0 11px;
  background:var(--ui-surface-2) !important;
}

.user-page .profile-meta-grid{
  margin-top:12px;
}

.user-page .profile-meta-grid-2col{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.user-page .profile-meta-grid-2col .profile-meta-item{
  min-height:96px;
  justify-content:space-between;
  padding:14px 14px 13px !important;
  background:var(--ui-surface) !important;
}

.user-page .profile-balance-card{
  background:var(--ui-surface-2) !important;
}

.user-page .meta-label{
  margin-bottom:8px;
}

.user-page .meta-value{
  font-size:.97rem;
  line-height:1.55;
}

.user-page .security-settings-form{
  gap:14px;
}

.user-page .security-mode-box{
  padding:16px !important;
  background:var(--ui-surface) !important;
  border-radius:14px !important;
}

.user-page .security-mode-title{
  font-size:1.02rem;
}

.user-page .security-mode-text{
  line-height:1.6;
}

.user-page .security-inline-note-stack{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:0;
}

.user-page .security-inline-note-stack .security-inline-link{
  justify-content:center;
}

.user-page .security-inline-note-stack > *:last-child{
  grid-column:1 / -1;
}

.user-page .security-note-chip,
.user-page .security-inline-link{
  min-height:36px;
  justify-content:center;
  text-align:center;
  padding:0 12px;
  border-radius:10px !important;
}

.user-page .security-overview{
  align-items:flex-start;
  padding:16px !important;
  border-radius:14px !important;
  background:var(--ui-surface) !important;
}

.user-page .security-overview-copy{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.user-page .security-overview .help-text{
  line-height:1.6;
}

.user-page .security-overview-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:2px;
}

.user-page .security-grid{
  gap:14px;
}

.user-page .security-subcard{
  padding:16px !important;
  border-radius:14px !important;
  background:var(--ui-surface) !important;
}

.user-page .security-subcard-title{
  margin-bottom:6px;
}

.user-page .security-subcard-desc{
  margin:0 0 12px;
  color:var(--ui-muted);
  font-size:.9rem;
  line-height:1.55;
}

.user-page .compact-form .form-group,
.user-page .inline-form-row{
  margin-bottom:12px;
}

.user-page .security-overview-link{
  align-self:center;
  min-width:96px;
}

.user-page .security-inline-text{
  opacity:1;
}

@media (max-width: 480px){
  .user-page .profile-meta-grid-2col{
    grid-template-columns:1fr;
  }
  .user-page .security-inline-note-stack{
    grid-template-columns:1fr;
  }
  .user-page .security-inline-note-stack > *:last-child{
    grid-column:auto;
  }
  .user-page .security-overview-link{
    align-self:stretch;
    width:100%;
  }
}


/* ===== v10 个人中心彻底重排 ===== */
.user-page .dashboard-overview-card,
.user-page .user-card-redesign,
.user-page .settings-card-redesign,
.user-page .account-security-card-redesign{
  padding:0 !important;
  overflow:hidden;
}

.user-page .section-shell{
  padding:18px !important;
}

.user-page .section-shell-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.user-page .section-shell-eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(107,98,91,0.08);
  color:var(--ui-accent);
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.08em;
  margin-bottom:10px;
}

.user-page .section-shell-title{
  font-size:1.14rem;
  line-height:1.25;
  font-weight:800;
  color:var(--ui-text);
  margin:0;
}

.user-page .section-shell-desc{
  margin:6px 0 0;
  color:var(--ui-muted);
  font-size:.91rem;
  line-height:1.62;
}

.user-page .dashboard-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:18px;
  border-bottom:1px solid var(--ui-border);
  background:
    radial-gradient(circle at top right, rgba(107,98,91,0.08), transparent 38%),
    linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.92));
  border-radius:16px 16px 0 0;
}

.user-page .dashboard-status-pill{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--ui-border);
  background:rgba(255,255,255,0.9);
  color:var(--ui-text);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.user-page .dashboard-status-pill.is-safe{
  background:rgba(238,245,239,0.95);
  color:var(--ui-success);
  border-color:rgba(68,98,79,.16);
}

.user-page .dashboard-status-pill.is-basic{
  background:rgba(255,255,255,0.9);
  color:var(--ui-muted);
}

.user-page .dashboard-stat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:16px 18px 18px;
}

.user-page .dashboard-stat-card{
  min-width:0;
  border:1px solid var(--ui-border);
  background:var(--ui-surface);
  border-radius:16px;
  padding:14px;
}

.user-page .dashboard-stat-card-wide{
  grid-column:1 / -1;
}

.user-page .dashboard-stat-label{
  display:block;
  font-size:.82rem;
  color:var(--ui-soft);
  margin-bottom:10px;
}

.user-page .dashboard-stat-value{
  display:block;
  font-size:1.38rem;
  line-height:1.1;
  font-weight:800;
  color:var(--ui-text);
}

.user-page .dashboard-stat-value-sm{
  font-size:.99rem;
  line-height:1.5;
  word-break:break-word;
}

.user-page .dashboard-stat-note{
  display:block;
  margin-top:8px;
  color:var(--ui-muted);
  font-size:.86rem;
  line-height:1.55;
}

.user-page .profile-showcase{
  display:grid;
  gap:14px;
}

.user-page .profile-showcase-main{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  border:1px solid var(--ui-border);
  border-radius:18px;
  background:
    radial-gradient(circle at top right, rgba(107,98,91,0.08), transparent 30%),
    linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.92));
}

.user-page .profile-showcase-avatar-wrap{
  flex:0 0 auto;
  position:relative;
}

.user-page .profile-avatar.profile-avatar-lg{
  width:72px !important;
  height:72px !important;
  border-radius:24px !important;
  border:1px solid rgba(255,255,255,.9) !important;
  box-shadow:0 10px 22px rgba(71,57,45,0.08);
  background:var(--ui-surface) !important;
}

.user-page .profile-avatar-fallback.profile-avatar-lg{
  display:flex !important;
  align-items:center;
  justify-content:center;
  font-size:1.3rem;
  font-weight:800;
}

.user-page .profile-showcase-copy{
  min-width:0;
  flex:1;
}

.user-page .profile-name-stack{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.user-page .profile-subline-strong{
  margin-top:6px !important;
  font-size:.92rem;
  color:var(--ui-muted);
}

.user-page .profile-summary-row-spread{
  margin-top:10px !important;
  gap:8px;
}

.user-page .profile-summary-row-spread .profile-mini-chip{
  background:rgba(255,255,255,0.84) !important;
}

.user-page .profile-highlight-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.user-page .profile-highlight-card{
  min-width:0;
  border:1px solid var(--ui-border);
  background:var(--ui-surface);
  border-radius:16px;
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
}

.user-page .profile-highlight-card-strong{
  background:linear-gradient(180deg, rgba(255,253,251,1), rgba(247,242,236,0.92));
}

.user-page .profile-highlight-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.user-page .profile-highlight-value{
  display:block;
  color:var(--ui-text);
  font-size:1.12rem;
  line-height:1.35;
  font-weight:800;
  word-break:break-word;
}

.user-page .profile-highlight-value-sm{
  font-size:.98rem;
  font-weight:700;
}

.user-page .profile-highlight-note{
  color:var(--ui-muted);
  font-size:.84rem;
  line-height:1.55;
}

.user-page .profile-inline-btn{
  margin-left:0 !important;
  min-width:68px;
}

.user-page .security-settings-form-v2{
  display:grid;
  gap:14px;
}

.user-page .security-command-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px;
  border:1px solid var(--ui-border);
  border-radius:18px;
  background:
    radial-gradient(circle at top right, rgba(107,98,91,0.08), transparent 28%),
    linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.92));
}

.user-page .security-command-copy{
  min-width:0;
  flex:1;
}

.user-page .security-command-action{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:68px;
  min-height:68px;
  border-radius:18px;
  border:1px solid rgba(107,98,91,0.08);
  background:rgba(255,255,255,0.72);
}

.user-page .security-facts-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.user-page .security-fact-card{
  min-width:0;
  border:1px solid var(--ui-border);
  border-radius:16px;
  background:var(--ui-surface);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.user-page .security-fact-label{
  font-size:.82rem;
  color:var(--ui-soft);
}

.user-page .security-fact-value{
  font-size:1rem;
  line-height:1.5;
  font-weight:800;
  color:var(--ui-text);
  word-break:break-word;
}

.user-page .security-fact-value-sm{
  font-size:.95rem;
}

.user-page .security-fact-note{
  color:var(--ui-muted);
  font-size:.84rem;
  line-height:1.55;
}

.user-page .security-overview-v2{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px !important;
  border-radius:18px !important;
  background:
    radial-gradient(circle at top right, rgba(107,98,91,0.08), transparent 28%),
    linear-gradient(180deg, rgba(255,253,251,0.98), rgba(247,242,236,0.92)) !important;
  border:1px solid var(--ui-border) !important;
}

.user-page .security-grid-v2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}

.user-page .security-subcard-v2{
  border-radius:18px !important;
  padding:16px !important;
  background:var(--ui-surface) !important;
}

.user-page .security-subcard-v2 .btn.btn-primary{
  min-height:44px;
}

.user-page .account-security-footnote{
  margin-top:14px;
  padding:12px 14px;
  border:1px dashed var(--ui-border);
  border-radius:14px;
  background:rgba(247,242,236,0.6);
}

@media (max-width: 480px){
  .user-page .section-shell{
    padding:16px !important;
  }

  .user-page .dashboard-hero,
  .user-page .profile-showcase-main,
  .user-page .security-command-card,
  .user-page .security-overview-v2{
    padding:16px;
    flex-direction:column;
    align-items:flex-start;
  }

  .user-page .dashboard-status-pill{
    white-space:normal;
  }

  .user-page .dashboard-stat-grid,
  .user-page .profile-highlight-grid,
  .user-page .security-facts-grid,
  .user-page .security-grid-v2{
    grid-template-columns:1fr;
  }

  .user-page .profile-avatar.profile-avatar-lg{
    width:64px !important;
    height:64px !important;
    border-radius:20px !important;
  }

  .user-page .security-command-action{
    width:100%;
    min-height:56px;
    justify-content:flex-start;
    padding:0 16px;
  }

  .user-page .profile-highlight-main{
    align-items:flex-start;
  }

  .user-page .profile-inline-btn{
    width:100%;
  }
}


/* ===== v11: 个人中心简洁重排 ===== */
.profile-simple-card,
.simple-security-card{
  padding:18px !important;
}
.profile-simple-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.profile-simple-top{
  display:flex;
  align-items:center;
  gap:14px;
}
.profile-simple-avatar-wrap{
  flex:0 0 auto;
}
.profile-simple-avatar{
  width:68px !important;
  height:68px !important;
  border-radius:20px !important;
  object-fit:cover !important;
  box-shadow:var(--ui-shadow-soft) !important;
}
.profile-simple-meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.profile-simple-name{
  font-size:20px;
  font-weight:700;
  line-height:1.2;
  color:var(--ui-text);
  word-break:break-all;
}
.profile-simple-email{
  font-size:13px;
  color:var(--ui-muted);
  word-break:break-all;
}
.profile-balance-card{
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface-2) !important;
  border-radius:18px !important;
  padding:18px 16px !important;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.profile-balance-label{
  font-size:13px;
  color:var(--ui-muted);
}
.profile-balance-value{
  font-size:34px;
  line-height:1;
  font-weight:800;
  color:var(--ui-text);
}
.profile-action-grid{
  display:grid;
  gap:12px;
}
.profile-action-grid-two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.profile-action-grid-three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.profile-action-tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:88px;
  text-decoration:none !important;
  color:var(--ui-text) !important;
  background:var(--ui-surface-2) !important;
  border:1px solid var(--ui-border) !important;
  border-radius:18px !important;
  box-shadow:none !important;
  transition:transform .15s ease, border-color .15s ease;
}
.profile-action-tile:hover,
.profile-action-tile:active{
  transform:translateY(-1px);
  border-color:var(--ui-border-strong) !important;
}
.profile-action-tile i{
  font-size:20px;
}
.profile-action-tile span{
  font-size:14px;
  font-weight:600;
}
.simple-security-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.simple-security-title{
  margin:0;
  font-size:18px;
  color:var(--ui-text);
}
.simple-security-desc{
  margin:6px 0 0;
  font-size:13px;
  line-height:1.6;
  color:var(--ui-muted);
}
.simple-security-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface-2) !important;
  color:var(--ui-text) !important;
}
.simple-security-badge.is-on{
  background:var(--ui-success-bg) !important;
  color:var(--ui-success) !important;
  border-color:rgba(68,98,79,.14) !important;
}
.simple-security-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.simple-security-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface-2) !important;
  border-radius:18px !important;
  padding:16px !important;
}
.simple-security-panel-title{
  font-size:15px;
  font-weight:700;
  color:var(--ui-text);
}
.simple-security-panel-note{
  margin-top:4px;
  font-size:13px;
  color:var(--ui-muted);
}
.simple-security-submit{
  width:100%;
}
.ui-modal-card{
  width:min(420px,92vw);
  background:#fff;
  border-radius:18px;
  padding:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
}
.ui-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.ui-modal-title{
  margin:0;
  font-size:16px;
  color:var(--ui-text);
}
.ui-modal-close{
  border:none;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  color:var(--ui-text);
}
.ui-modal-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ui-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.ui-modal-btn{
  min-height:40px;
  padding:0 14px;
  border-radius:12px;
  cursor:pointer;
  border:1px solid var(--ui-border);
}
.ui-modal-btn-ghost{
  background:#fff;
  color:var(--ui-text);
}
.ui-modal-btn-primary{
  border-color:var(--ui-accent);
  background:var(--ui-accent);
  color:#fff;
}
@media (max-width: 560px){
  .profile-simple-card,
  .simple-security-card{
    padding:16px !important;
  }
  .profile-simple-avatar{
    width:62px !important;
    height:62px !important;
    border-radius:18px !important;
  }
  .profile-balance-value{
    font-size:30px;
  }
  .profile-action-grid-three{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .profile-action-grid-two{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .profile-action-tile{
    min-height:82px;
    gap:8px;
  }
  .profile-action-tile span{
    font-size:13px;
  }
  .simple-security-head,
  .simple-security-panel{
    flex-direction:column;
    align-items:flex-start;
  }
  .simple-security-badge{
    align-self:flex-start;
  }
  .ui-modal-actions{
    flex-direction:column;
  }
  .ui-modal-btn{
    width:100%;
  }
}


/* ===== v12: 用户中心细化 ===== */
.user-page .page-header{
  margin-bottom:6px !important;
}
.user-page .top-resource-strip{
  margin:8px 0 16px !important;
}
.user-page .top-resource-strip-inner{
  padding:4px 1px 2px !important;
}
.user-page .profile-simple-card,
.user-page .simple-security-card,
.user-page .invite-card{
  border-radius:24px !important;
}
.user-page .profile-simple-top{
  align-items:center;
}
.user-page .profile-simple-avatar{
  width:72px !important;
  height:72px !important;
  border-radius:24px !important;
  border:1px solid rgba(107,98,91,.10) !important;
  background:#fff !important;
}
.user-page .profile-simple-meta{
  gap:6px;
}
.user-page .profile-simple-email{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  width:fit-content;
  max-width:100%;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface-2) !important;
  color:var(--ui-soft);
}
.user-page .profile-balance-card{
  padding:20px 18px !important;
  border-radius:22px !important;
}
.user-page .profile-balance-value{
  font-size:36px;
}
.user-page .profile-action-grid{
  gap:10px;
}
.user-page .profile-action-tile{
  min-height:92px;
  border-radius:20px !important;
  background:#fff !important;
}
.user-page .profile-action-tile i{
  font-size:21px;
  color:var(--ui-accent);
}
.user-page .profile-action-tile span{
  font-weight:700;
}
.user-page .simple-security-card{
  margin-top:2px;
}
.user-page .simple-security-panel,
.user-page .simple-security-head{
  gap:14px;
}
.user-page .simple-security-panel{
  border-radius:20px !important;
}
.user-page .ui-modal-tip{
  padding:12px 14px;
  border-radius:14px;
  background:var(--ui-surface-2);
  color:var(--ui-muted);
  font-size:13px;
  line-height:1.6;
  border:1px solid var(--ui-border);
}
.user-page .invite-switcher{
  display:flex !important;
  gap:8px !important;
  padding:6px !important;
  border-radius:18px !important;
  border:1px solid var(--ui-border) !important;
  background:var(--ui-surface-2) !important;
  margin:0 0 14px !important;
}
.user-page .invite-switcher-btn{
  flex:1 1 0;
  min-height:42px;
  border-radius:14px !important;
  background:transparent !important;
  color:var(--ui-soft) !important;
  font-size:14px !important;
  font-weight:700 !important;
  box-shadow:none !important;
}
.user-page .invite-switcher-btn.is-active{
  background:#fff !important;
  color:var(--ui-text) !important;
  box-shadow:0 8px 20px rgba(28,23,20,.06) !important;
}
.user-page .invite-subpanel{
  animation:uiFadeUp .18s ease;
}
.user-page .invite-link-summary,
.user-page .invite-link-display,
.user-page .quick-panel{
  border-radius:20px !important;
}
@media (max-width:560px){
  .user-page .profile-simple-avatar{
    width:68px !important;
    height:68px !important;
    border-radius:22px !important;
  }
  .user-page .profile-balance-value{
    font-size:32px;
  }
  .user-page .profile-action-tile{
    min-height:84px;
  }
}
