/* ===== 基础变量 ===== */
:root{
  --bg: #eef2fb;
  --card: #ffffff;
  --text: #1b2338;
  --text-2: #6b7690;
  --text-3: #9aa4bb;
  --line: #e4e9f4;
  --brand: #4f6bff;
  --brand-2: #7a5cff;
  --brand-soft: #eef1ff;
  --ok: #17b978;
  --err: #ef4b5c;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(38, 52, 96, .12);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== 背景光斑 ===== */
.page-bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 12% 8%, #e6ecff 0%, transparent 60%),
    radial-gradient(1000px 700px at 88% 92%, #f3e9ff 0%, transparent 60%),
    var(--bg);
}
.orb{
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: float 18s var(--ease) infinite alternate;
}
.orb-1{ width: 420px; height: 420px; left: -80px; top: -60px; background: #b9c6ff; }
.orb-2{ width: 380px; height: 380px; right: -60px; bottom: -80px; background: #e3c9ff; animation-delay: -6s; }
.orb-3{ width: 260px; height: 260px; left: 46%; top: 62%; background: #c9f0e4; animation-delay: -11s; opacity: .4; }
@keyframes float{
  from{ transform: translate3d(0,0,0) scale(1); }
  to  { transform: translate3d(30px, -40px, 0) scale(1.12); }
}

/* ===== 主容器 ===== */
.shell{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise .6s var(--ease) both;
}
@keyframes rise{
  from{ opacity: 0; transform: translateY(22px); }
  to  { opacity: 1; transform: none; }
}

/* ===== 左侧品牌 ===== */
.brand{
  position: relative;
  padding: 46px 44px;
  color: #fff;
  background:
    linear-gradient(150deg, #4f6bff 0%, #6a5cf0 48%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.brand::after{
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.brand::before{
  content: "";
  position: absolute;
  left: -90px; bottom: -140px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.brand-inner{ position: relative; z-index: 1; width: 100%; }

.logo{ display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
.logo-mark{
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.32);
  font-weight: 700; font-size: 18px;
}
.logo-text{ font-size: 17px; font-weight: 600; letter-spacing: .5px; }

.brand-title{
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: .5px;
}
.brand-sub{
  margin: 0 0 30px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,.82);
  max-width: 330px;
}

.brand-points{ list-style: none; margin: 0 0 34px; padding: 0; }
.brand-points li{
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,.92);
  padding: 7px 0;
}
.dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}

.brand-foot{ display: flex; align-items: center; gap: 12px; }
.avatars{ display: flex; }
.avatars span{
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  margin-left: -9px;
  background: #ffd28a; color: #7a4a00;
}
.avatars span:first-child{ margin-left: 0; }
.avatars span:nth-child(2){ background: #a8e6c1; color: #0e5c3a; }
.avatars span:nth-child(3){ background: #bcd4ff; color: #1c3f8f; }
.avatars span:nth-child(4){ background: #f5b8d0; color: #8a1f47; }
.brand-foot p{ margin: 0; font-size: 12.5px; color: rgba(255,255,255,.8); }
.brand-foot strong{ color: #fff; }

/* ===== 右侧表单 ===== */
.forms{ padding: 34px 44px 40px; display: flex; flex-direction: column; }

.tabbar{
  position: relative;
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #f2f4fa;
  border-radius: 12px;
  margin-bottom: 26px;
}
.tab{
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
  border-radius: 9px;
  cursor: pointer;
  transition: color .25s var(--ease);
  font-family: inherit;
  /* 必须置于滑块之上，否则白色 .tab-ink 会盖住当前标签文字 */
  position: relative;
  z-index: 1;
}
.tab.is-active{ color: var(--brand); }
.tab-ink{
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(30,45,90,.10);
  transition: transform .34s var(--ease);
}

.viewport{ position: relative; flex: 1; }

.panel{
  display: none;
  animation: slideIn .42s var(--ease) both;
}
.panel.is-active{ display: block; }
@keyframes slideIn{
  from{ opacity: 0; transform: translateX(18px); }
  to  { opacity: 1; transform: none; }
}

.panel-title{ margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.panel-desc{ margin: 0 0 24px; font-size: 13.5px; color: var(--text-3); }

/* ===== 表单控件 ===== */
.field{ margin-bottom: 15px; }
.field label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}
.control{
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.control:focus-within{
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79,107,255,.12);
}
.control .ico{
  width: 19px; height: 19px;
  margin-left: 13px;
  fill: var(--text-3);
  flex: none;
  transition: fill .2s var(--ease);
}
.control:focus-within .ico{ fill: var(--brand); }
.control input{
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 12px;
  font-size: 14.5px;
  color: var(--text);
  font-family: inherit;
}
.control input::placeholder{ color: #b5bdd2; }

.eye{
  border: 0; background: transparent;
  padding: 0 13px 0 6px;
  cursor: pointer;
  display: grid; place-items: center;
}
.eye svg{ width: 19px; height: 19px; fill: var(--text-3); transition: fill .2s var(--ease); }
.eye:hover svg{ fill: var(--brand); }

/* 校验提示 */
.msg{
  margin: 5px 0 0;
  font-size: 12px;
  min-height: 15px;
  color: var(--err);
  opacity: 0;
  transform: translateY(-3px);
  transition: all .2s var(--ease);
}
.msg.show{ opacity: 1; transform: none; }
.msg.ok{ color: var(--ok); }
.control.invalid{ border-color: var(--err); background: #fff6f7; }
.control.invalid:focus-within{ box-shadow: 0 0 0 4px rgba(239,75,92,.12); }

/* 密码强度 */
.strength{ display: flex; gap: 5px; margin-top: 7px; }
.strength i{
  flex: 1; height: 4px;
  border-radius: 4px;
  background: #e7ebf4;
  transition: background .3s var(--ease);
}
.strength.s1 i:nth-child(1){ background: #ef4b5c; }
.strength.s2 i:nth-child(1),
.strength.s2 i:nth-child(2){ background: #f5a623; }
.strength.s3 i{ background: #17b978; }

/* 行 / 复选 */
.row{
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 20px;
  font-size: 13px;
}
.check{
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; color: var(--text-2);
  user-select: none;
}
.check input{ position: absolute; opacity: 0; width: 0; height: 0; }
.check .box{
  width: 17px; height: 17px;
  border: 1.5px solid #cfd6e6;
  border-radius: 5px;
  background: #fff;
  position: relative;
  transition: all .2s var(--ease);
  flex: none;
}
.check .box::after{
  content: "";
  position: absolute;
  left: 5px; top: 1.5px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .18s var(--ease);
}
.check input:checked + .box{
  background: var(--brand);
  border-color: var(--brand);
}
.check input:checked + .box::after{ transform: rotate(45deg) scale(1); }
.check input:focus-visible + .box{ box-shadow: 0 0 0 3px rgba(79,107,255,.18); }

.agree{
  align-items: flex-start;
  margin: 2px 0 4px;
  font-size: 12.5px;
  line-height: 1.6;
}
.agree .box{ margin-top: 1px; }
.msg[data-msg="rgAgree"]{ margin-bottom: 12px; }

.link{
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.link:hover{ text-decoration: underline; }

/* ===== 按钮 ===== */
.btn{
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: transform .16s var(--ease), box-shadow .25s var(--ease), opacity .2s var(--ease);
}
.btn.primary{
  color: #fff;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 10px 24px rgba(79,107,255,.28);
}
.btn.primary:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(79,107,255,.36); }
.btn.primary:active{ transform: translateY(0); }
.btn.loading{ pointer-events: none; opacity: .85; }
.btn.loading .btn-label{ opacity: 0; }
.btn.loading .spinner{ opacity: 1; }
.spinner{
  position: absolute;
  inset: 0; margin: auto;
  width: 19px; height: 19px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.btn.ghost{
  background: var(--brand-soft);
  color: var(--brand);
  width: auto;
  padding: 10px 26px;
  letter-spacing: 1px;
  margin-top: 6px;
}
.btn.ghost:hover{ background: #e3e9ff; }
.btn.danger{
  color: #fff;
  background: linear-gradient(120deg, #ff5b6a 0%, #f43f5e 100%);
  box-shadow: 0 10px 24px rgba(244,63,94,.28);
}
.btn.danger:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(244,63,94,.36); }
.btn.danger:active{ transform: translateY(0); }

/* ===== 分隔 & 第三方 ===== */
.divider{
  position: relative;
  text-align: center;
  margin: 22px 0 16px;
}
.divider::before{
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line);
}
.divider span{
  position: relative;
  background: #fff;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-3);
}
.sso{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sso-btn{
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 0;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s var(--ease);
}
.sso-btn svg{ width: 18px; height: 18px; fill: currentColor; }
.sso-btn:hover{ border-color: #c8d2ee; color: var(--brand); background: #fafbff; transform: translateY(-1px); }

.switch{
  text-align: center;
  margin: 20px 0 0;
  font-size: 13.5px;
  color: var(--text-2);
}

/* ===== 成功层 ===== */
.welcome{
  position: fixed; inset: 0;
  z-index: 20;
  display: grid; place-items: center;
  background: rgba(24, 32, 56, .38);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: all .3s var(--ease);
}
.welcome.show{ opacity: 1; visibility: visible; }
.welcome-card{
  width: min(92vw, 360px);
  background: #fff;
  border-radius: 20px;
  padding: 38px 30px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  transform: scale(.92);
  transition: transform .34s var(--ease);
}
.welcome.show .welcome-card{ transform: none; }
.tick{
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #e7f9f1;
  animation: pop .45s var(--ease) both;
}
.tick svg{ width: 34px; height: 34px; fill: var(--ok); }
@keyframes pop{ 0%{ transform: scale(.3); opacity: 0; } 60%{ transform: scale(1.12); } 100%{ transform: scale(1); opacity: 1; } }
.welcome-card h3{ margin: 0 0 8px; font-size: 19px; }
.welcome-card p{ margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* ===== Toast ===== */
.toast{
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translate(-50%, 20px);
  /* 全局提示必须压在所有弹窗、抽屉和遮罩层之上 */
  z-index: 99999 !important;
  padding: 11px 20px;
  border-radius: 10px;
  background: #1f2842;
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all .28s var(--ease);
  box-shadow: 0 12px 30px rgba(20,28,52,.28);
}
.toast.show{ opacity: 1; transform: translate(-50%, 0); }
.toast.err{ background: var(--err); }
.toast.ok{ background: var(--ok); }

/* ===== 响应式 ===== */
@media (max-width: 880px){
  .shell{ grid-template-columns: 1fr; max-width: 460px; min-height: 0; }
  .brand{ padding: 34px 30px; }
  .brand-points, .brand-foot{ display: none; }
  .brand-title{ font-size: 25px; margin-bottom: 8px; }
  .brand-sub{ margin-bottom: 0; }
  .forms{ padding: 30px 26px 34px; }
}
@media (max-width: 420px){
  body{ padding: 16px 12px; }
  .sso{ grid-template-columns: 1fr; }
}

/* ===== 登录后仪表盘 ===== */
.dash{
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  background: var(--bg);
  animation: dashIn .38s var(--ease) both;
}
@keyframes dashIn{
  from{ opacity: 0; transform: scale(.985); }
  to  { opacity: 1; transform: none; }
}
.dash[hidden]{ display: none; }

/* 左侧导航 */
.dash-side{
  width: 232px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
}
#dashUserHeader{
  display: flex; align-items: center; gap: 12px;
  padding: 15px 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(130deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 8px 22px rgba(79,107,255,.28);
}
#dashUserHeader .dash-avatar{
  width: 38px; height: 38px;
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5);
  font-size: 16px;
}
#dashUserHeader .dash-username{ color: #fff; font-size: 14px; font-weight: 700; }

/* 心跳成功时头像轻闪一下，便于在任何 TAB 看到心跳在跑 */
@keyframes avatarPulse{
  0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(79,107,255,.45); }
  50%  { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(79,107,255,0); }
  100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(79,107,255,0); }
}
#dashAvatar.pulse{ animation: avatarPulse .9s var(--ease); }

.dash-nav{ display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item{
  display: flex; align-items: center; gap: 11px;
  border: 0; background: transparent;
  padding: 12px;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .18s var(--ease);
  width: 100%;
}
.nav-item svg{ width: 19px; height: 19px; fill: currentColor; flex: none; }
.nav-item:hover{ background: #f2f4fb; color: var(--text); }
.nav-item.is-active{
  background: var(--brand-soft);
  color: var(--brand);
}
.nav-logout{ color: var(--text-3); }
.nav-logout:hover{ background: #fff2f3; color: var(--err); }

.dash-side-foot{
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-avatar{
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
  flex: none;
  text-transform: uppercase;
}
.dash-username{
  font-size: 13.5px; font-weight: 600;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 右侧内容 */
.dash-main{
  flex: 1;
  overflow-y: auto;
  padding: 34px 38px;
}
.dash-title{ margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.dash-desc{ margin: 0 0 26px; font-size: 13.5px; color: var(--text-3); }

.stat-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.stat-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.stat-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(38,52,96,.08);
}
.stat-card.main{ grid-column: span 1; }
.stat-card.accent{
  background: linear-gradient(130deg, var(--brand) 0%, var(--brand-2) 100%);
  border: 0;
}
.stat-card.accent .stat-label{ color: rgba(255,255,255,.8); }
.stat-card.accent .stat-label svg{
  background: rgba(255,255,255,.18);
  fill: #fff;
}
.stat-card.accent .stat-value{ color: #fff; }

.stat-label{
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 12px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-3);
}
.stat-label svg{
  width: 30px; height: 30px;
  padding: 7px;
  border-radius: 9px;
  background: var(--brand-soft);
  fill: var(--brand);
  flex: none;
}
.stat-value{
  margin: 0;
  font-size: 26px; font-weight: 700;
  color: var(--text);
  word-break: break-all;
  line-height: 1.3;
}
.stat-value.sm{ font-size: 17px; }

/* 面板排版：限制内容宽度 + 切换动画 */
.dash-panel{ display: none; max-width: 980px; margin: 0 auto; }
.dash-panel.is-active{ display: block; animation: rise .42s var(--ease) both; }

/* ===== 移动端顶栏 + 抽屉导航 ===== */
.dash-topbar{ display: none; }
.dash-mask{
  position: fixed; inset: 0;
  z-index: 28;
  background: rgba(18,26,48,.45);
  opacity: 0; visibility: hidden;
  transition: all .25s var(--ease);
}
.dash-mask.show{ opacity: 1; visibility: visible; }

@media (max-width: 720px){
  .dash-topbar{
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    z-index: 25;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .menu-btn{
    border: 0; background: transparent;
    width: 40px; height: 40px;
    border-radius: 11px;
    display: grid; place-items: center;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    transition: background .18s var(--ease);
  }
  .menu-btn:active{ background: #eef1fa; }
  .menu-btn svg{ width: 22px; height: 22px; fill: currentColor; }
  .topbar-title{ flex: 1; font-size: 16px; font-weight: 700; }
  .topbar-avatar{ width: 32px; height: 32px; font-size: 13px; }

  /* 侧边栏收起为左侧抽屉 */
  .dash-side{
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 250px;
    z-index: 30;
    padding: 18px 14px;
    border-right: 1px solid var(--line);
    box-shadow: 0 0 46px rgba(20,30,60,.28);
    transform: translateX(-105%);
    transition: transform .3s var(--ease);
  }
  .dash-side.open{ transform: none; }
  .dash-main{ padding: 74px 16px 26px; }

  .stat-grid{ grid-template-columns: 1fr; }
}
@media (min-width: 721px){
  .dash-mask{ display: none; }
}

/* ===== 空页面占位 ===== */
.empty-placeholder{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 72px 20px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--text-3);
}
.empty-placeholder svg{ width: 44px; height: 44px; fill: #c8d0e4; }
.empty-placeholder p{ margin: 0; font-size: 13.5px; }

/* ===== 配置账号 TAB ===== */
.config-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.config-card{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.config-card:hover:not(.is-disabled){
  transform: translateY(-2px);
  border-color: #c8d2ee;
  box-shadow: 0 10px 26px rgba(38,52,96,.10);
}
.config-card.is-disabled{
  cursor: not-allowed;
  opacity: .62;
  background: #fafbfe;
}
.config-card.loading{
  cursor: wait;
  opacity: .72;
  pointer-events: none;
}
.config-ico{
  width: 46px; height: 46px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--brand-soft);
}
.config-ico svg{ width: 22px; height: 22px; fill: var(--brand); }
.config-card.is-disabled .config-ico{ background: #eef1f6; }
.config-card.is-disabled .config-ico svg{ fill: #9aa4bb; }
.config-body{ display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.config-name{
  font-size: 15px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.config-desc{
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
}
.badge{
  font-style: normal;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: #fff2e3;
  color: #c07a1a;
}

/* ===== 已添加账号列表 ===== */
.account-list-card{
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.account-list-head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.account-list-title{
  margin: 0;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.account-count{
  font-size: 12.5px; font-weight: 600;
  color: var(--text-3);
  background: #f2f4fa;
  padding: 3px 12px;
  border-radius: 20px;
}
.account-list{ padding: 8px 10px; }
.account-empty{
  margin: 0;
  padding: 26px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.account-row{
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  transition: background .15s var(--ease);
}
.account-row:hover{ background: #f7f9fd; }
.account-row .avatar-sm{
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase;
}
.account-row .acc-name{
  flex: 1;
  min-width: 0;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-row .acc-time{
  flex: none;
  font-size: 12px;
  color: var(--text-3);
}
.account-row .acc-status{
  flex: none;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.acc-status.ok{ background: #e7f9f1; color: var(--ok); }
.acc-status.used{ background: #fff2e3; color: #c07a1a; }

/* 账号行尾的绑定状态图标（微信 + 手环） */
.account-row .acc-platforms{
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px 0 2px;
}
.pl-ico{
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: #f1f3f7;
  color: #a0a8bc;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.pl-ico:hover{ transform: translateY(-2px); }
.pl-ico svg{ width: 25px; height: 25px; display: block; }
/* 微信图标可点击（绑定/解绑），手环暂为纯展示 */
.pl-ico.pl-wechat{ cursor: pointer; }
.pl-ico.pl-wechat.bound{
  background: #07c160;
  color: #fff;
  box-shadow: 0 4px 10px rgba(7, 193, 96, .28);
}
.pl-ico.pl-wrist.bound{
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(79, 107, 255, .28);
}

/* 删除按钮：仅手动添加的账号行内出现 */
.account-row .acc-del{
  flex: none;
  width: 28px; height: 28px;
  margin-left: 4px;
  display: inline-grid;
  place-items: center;
  border: none;
  background: #f1f3f7;
  color: #a0a8bc;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.account-row .acc-del:hover{
  background: var(--err);
  color: #fff;
  transform: translateY(-1px);
}
.account-row .acc-del:disabled{
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}
.account-row .acc-del.loading svg{
  animation: spin 0.9s linear infinite;
  opacity: .6;
}
.account-row .acc-del svg{ display: block; }

/* 自动分配账号没有删除按钮，但仍保留占位符，让账号状态列右对齐 */
.account-row .acc-del.placeholder{
  visibility: hidden;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 560px){
  .account-row .acc-time{ display: none; }
  .account-list-head{ padding: 14px 16px; }
  .pl-ico{ width: 36px; height: 36px; border-radius: 10px; }
  .pl-ico svg{ width: 21px; height: 21px; }
  .account-row .acc-platforms{ gap: 5px; margin: 0 2px; }
}

/* ===== 通用弹窗 ===== */
.modal{
  position: fixed; inset: 0;
  z-index: 50;
  display: grid; place-items: center;
  background: rgba(24, 32, 56, .42);
  backdrop-filter: blur(4px);
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: all .28s var(--ease);
}
.modal.show{ opacity: 1; visibility: visible; }
.modal-card{
  width: min(92vw, 400px);
  background: #fff;
  border-radius: 20px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  transform: translateY(14px) scale(.97);
  transition: transform .3s var(--ease);
}
.modal.show .modal-card{ transform: none; }
.modal-title{ margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.modal-desc{ margin: 0 0 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.modal-desc strong{ color: var(--text); }

/* 微信扫码弹窗 */
.qr-box{
  display: grid; place-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 4px 0 12px;
}
.qr-box img{
  display: block;
  width: 210px; height: 210px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.qr-hint{
  margin: 0 0 2px;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}
.modal-actions{
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.modal-actions .btn{ padding: 11px 0; font-size: 14px; letter-spacing: 1px; }
.modal-actions .btn.ghost{ flex: none; padding: 11px 26px; margin-top: 0; }
.modal-actions .btn.primary,
.modal-actions .btn.danger{ flex: 1; }

@media (max-width: 560px){
  .modal-card{ padding: 22px 18px 18px; }
  .config-grid{ grid-template-columns: 1fr; }
}

/* ===== 首页兑换卡密 ===== */
.redeem-card{
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}
.redeem-head{ display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.redeem-title{
  margin: 0;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.redeem-title svg{ width: 19px; height: 19px; fill: var(--brand); }
.redeem-desc{ margin: 0; font-size: 12.5px; color: var(--text-3); }

.redeem-row{ display: flex; gap: 12px; align-items: flex-start; }
.redeem-input{ flex: 1; }
.redeem-btn{
  width: auto;
  flex: none;
  padding: 12px 26px;
  letter-spacing: 1px;
  font-size: 14px;
}
.redeem-card .msg{ margin-bottom: 0; }

@media (max-width: 560px){
  .redeem-row{ flex-direction: column; }
  .redeem-btn{ width: 100%; }
}

/* ===== 步数提交 TAB ===== */
.submit-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
}
.submit-head{ display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.submit-title{
  margin: 0; font-size: 15.5px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
}
.submit-title svg{ width: 19px; height: 19px; fill: var(--brand); }
.submit-desc{ margin: 0; font-size: 12.5px; color: var(--text-3); }
.submit-row{ display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.submit-row .control{ flex: 1; min-width: 140px; }
.submit-row .control select,
.submit-row .control input{
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; color: var(--text-1); background: #fff;
  outline: none; transition: border-color .2s;
}
.submit-row .control select:focus,
.submit-row .control input:focus{ border-color: var(--brand); }
.submit-btn{ flex: none; padding: 0 22px; height: 44px; font-size: 14px; }
.task-range{ display: flex; align-items: center; gap: 6px; }
.task-range input{ flex: 1; }
.range-sep{ color: var(--text-3); flex: none; }
.task-time{ max-width: 130px; }
.submit-card .msg{ margin-bottom: 0; margin-top: 10px; }

/* 任务/记录通用行 */
.task-row, .log-row{
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--text-2);
}
.task-row:last-child, .log-row:last-child{ border-bottom: none; }
.task-acc, .log-acc{ font-weight: 600; color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta, .log-meta{ color: var(--text-3); font-size: 12.5px; }
.task-spacer{ flex: 1; }
.task-time-badge{
  flex: none; padding: 3px 10px; border-radius: 999px;
  background: #eef2ff; color: var(--brand); font-size: 12.5px; font-weight: 600;
}
.task-status{ flex: none; font-size: 12.5px; }
.task-status.on{ color: #16a34a; }
.task-status.off{ color: var(--text-3); }
.log-result{ flex: none; font-size: 12.5px; font-weight: 600; }
.log-result.success{ color: #16a34a; }
.log-result.fail{ color: #dc2626; }
.log-steps{ flex: none; font-weight: 700; color: var(--text-1); }
.task-btn{
  flex: none; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; padding: 5px 12px; font-size: 12.5px;
  color: var(--text-2); cursor: pointer; transition: all .2s;
}
.task-btn:hover{ border-color: var(--brand); color: var(--brand); }
.task-btn.danger:hover{ border-color: #dc2626; color: #dc2626; }

@media (max-width: 560px){
  .submit-row{ flex-direction: column; }
  .submit-row .control, .submit-btn{ width: 100%; }
  .task-time{ max-width: none; }
}

/* ===== 内嵌网页 TAB（购买卡密 / 联系客服） ===== */
.dash-panel-frame{ max-width: none; padding: 0; }
.dash-panel-frame.is-active{ display: flex; flex-direction: column; }
.dash-frame{
  width: 100%;
  flex: 1;
  min-height: calc(100vh - 130px);
  border: none;
  border-radius: 16px;
  background: #fff;
  display: block;
}
@media (max-width: 720px){
  .dash-frame{ min-height: calc(100vh - 120px); border-radius: 0; }
}
