/* 登录 / 注册 / 找回密码专用样式（不含后台、商品、订单等页面规则）
   目标：登录页首屏只需要这一份 CSS，约 8KB，gzip 后 ~2KB。 */

:root{
  color-scheme:light;
  --bg:#f2f8fd;
  --bg-card:#fff;
  --bg-soft:#f0f6fc;
  --text:#0f2233;
  --text-2:#5a7184;
  --text-3:#8ea4b6;
  --line:#e2ecf5;
  --line-strong:#cddeec;
  --blue:#1b76d2;
  --blue-dark:#155fa8;
  --blue-soft:#e7f2fd;
  --blue-line:#bfdcf7;
  --green:#17a673;
  --danger:#e5484d;
  --danger-soft:#fdeced;
  --radius:16px;
  --radius-sm:12px;
  --shadow-xs:0 1px 2px rgba(15,34,51,.05);
  --shadow-sm:0 2px 10px rgba(15,34,51,.05);
  --shadow-lg:0 24px 60px rgba(15,34,51,.12);
}

*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--text);
  font:14px/1.65 system-ui,-apple-system,"PingFang SC","Segoe UI","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
.muted{color:var(--text-2)}
.small{font-size:12px}
.ico{width:18px;height:18px;flex:0 0 18px;stroke:currentColor;fill:none;
  stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.eyebrow{font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--text-3);font-weight:600}

/* 键盘可见焦点：鼠标点击不出现，Tab 导航时清晰 */
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:8px}

/* ---------------- 按钮 ---------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;
  border-radius:var(--radius-sm);padding:11px 20px;font-size:14px;font-weight:600;
  cursor:pointer;background:var(--bg-soft);color:var(--text-2);
  transition:background .15s,transform .05s;font-family:inherit;min-height:44px}
.btn:hover{background:#e6f0fa}
.btn:active{transform:translateY(1px)}
.btn:disabled,.btn[aria-busy="true"]{opacity:.62;cursor:not-allowed;transform:none}
.btn.primary{background:var(--blue);color:#fff;box-shadow:0 8px 20px rgba(27,118,210,.22)}
.btn.primary:hover{background:var(--blue-dark)}
.btn.block{display:flex;width:100%}

/* ---------------- 表单 ---------------- */
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;color:var(--text-2);font-weight:600;margin-bottom:6px}
.field input{width:100%;padding:12px 14px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);
  font:inherit;font-size:15px;background:#fff;color:var(--text);min-height:46px;
  transition:border-color .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}
.field input:focus{outline:0;border-color:var(--blue);box-shadow:0 0 0 3px rgba(27,118,210,.14)}
.field input[aria-invalid="true"]{border-color:var(--danger);background:#fffafa}
.field .hint{font-size:11.5px;color:var(--text-3);margin-top:6px;line-height:1.6}
.field .hint a{color:var(--blue);font-weight:600}

/* ---------------- 登录整页 ---------------- */
.auth-body{min-height:100vh;min-height:100dvh;padding:0;
  background:
    radial-gradient(900px 500px at 85% -5%,#bfe0fb 0%,transparent 60%),
    linear-gradient(180deg,#cbe7fb 0%,#e3f3ff 42%,#f3fbff 100%)}
.auth-shell{max-width:760px;margin:0 auto;padding:22px 18px 60px;
  padding-bottom:calc(60px + env(safe-area-inset-bottom))}
.auth-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}
.auth-brandhead{display:flex;align-items:center;gap:11px}
.auth-brandhead .brand-logo{width:40px;height:40px;border-radius:12px;overflow:hidden;
  background:#fff;box-shadow:var(--shadow-sm);flex:0 0 40px}
.auth-brandhead .brand-logo img{width:100%;height:100%;object-fit:cover}
.auth-brandhead span{display:block}
.auth-brandhead .brand-name{font-weight:700;font-size:15px;color:var(--text)}
.auth-brandhead .brand-sub{font-size:10px;letter-spacing:.14em;color:var(--text-3)}
.auth-status{display:flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;
  background:rgba(255,255,255,.75);border:1px solid rgba(255,255,255,.9);
  font-size:12px;color:var(--text-2);font-weight:600;white-space:nowrap}
.auth-status .dot{width:7px;height:7px;border-radius:50%;background:var(--green);
  box-shadow:0 0 0 3px rgba(23,166,115,.18)}

.auth-headline{margin:10px 0 24px}
.auth-headline .eyebrow{color:#7fa2c4;margin-bottom:10px;display:block}
.auth-headline h1{font-size:30px;line-height:1.25;letter-spacing:-.6px;font-weight:750}
.auth-headline p{font-size:13.5px;color:var(--text-2);margin-top:8px}

.auth-card{background:#fff;border-radius:24px;box-shadow:var(--shadow-lg);
  padding:26px;border:1px solid rgba(255,255,255,.7)}
.auth-card h2{font-size:20px;font-weight:700;letter-spacing:-.3px;margin-bottom:4px}
.auth-card .tip{font-size:12.5px;color:var(--text-3);margin:0 0 14px;line-height:1.7}

/* 顶部步骤条：1 账号登录 / 2 安全验证 */
.auth-steps{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.auth-step{display:flex;align-items:center;gap:9px;font-size:12.5px;color:var(--text-2);line-height:1.35}
.auth-step .sq{width:22px;height:22px;border-radius:7px;background:var(--blue);flex:0 0 22px;
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;font-weight:700}
.auth-step.next .sq{background:var(--bg-soft);color:var(--text-3)}
.auth-step small{display:block;font-size:10.5px;color:var(--text-3);letter-spacing:.04em}

/* 内联反馈：错误 / 成功 / 提示，统一由 role=alert 朗读 */
.auth-msg{display:none;margin:0 0 14px;padding:10px 13px;border-radius:10px;
  font-size:13px;line-height:1.6;border:1px solid transparent}
.auth-msg.show{display:block}
.auth-msg.error{background:var(--danger-soft);border-color:#f3c9c9;color:#a52a2a}
.auth-msg.success{background:#e7f8f1;border-color:#bfe6c8;color:#1d7a2f}
.auth-msg.info{background:var(--blue-soft);border-color:var(--blue-line);color:var(--blue-dark)}
.auth-msg a{color:inherit;text-decoration:underline;font-weight:600}

.auth-divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--text-3);font-size:12px}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:rgba(255,255,255,.65)}

.auth-alt{display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;padding:13px;border-radius:var(--radius-sm);background:#229ed9;color:#fff;
  font-size:14px;font-weight:600;box-shadow:0 8px 20px rgba(34,158,217,.25);min-height:48px}
.auth-alt+a.auth-alt{margin-top:10px}
.auth-links{display:flex;justify-content:center;gap:22px;margin-top:18px;font-size:13px;flex-wrap:wrap}
.auth-links a{color:var(--blue);font-weight:600;padding:6px 2px}
.auth-foot{display:flex;align-items:center;justify-content:center;gap:6px;
  margin-top:14px;font-size:12px;color:var(--text-3);text-align:center}
.auth-foot .ico{width:14px;height:14px;stroke:var(--green)}

.auth-hint{font-size:11.5px;color:var(--text-3);text-align:center;margin-bottom:10px;line-height:1.6}
.tg-login-box{display:none;text-align:center;margin-bottom:10px}
.tg-login-box.show{display:block}
.tg-login-tip{font-size:11.5px;color:var(--text-3);margin-bottom:8px}
.auth-links-inline{margin-top:14px;gap:26px}

/* ---------------- 响应式 ---------------- */
@media (max-width:560px){
  .auth-shell{padding:16px 14px 48px;padding-bottom:calc(48px + env(safe-area-inset-bottom))}
  .auth-top{margin-bottom:18px}
  .auth-headline h1{font-size:24px}
  .auth-headline p{font-size:13px}
  .auth-card{padding:20px;border-radius:20px}
  .auth-status{padding:6px 11px;font-size:11.5px}
}
@media (max-width:380px){
  .auth-shell{padding:12px 12px 40px;padding-bottom:calc(40px + env(safe-area-inset-bottom))}
  .auth-headline h1{font-size:21px}
  .auth-card{padding:16px;border-radius:18px}
  .auth-brandhead .brand-logo{width:34px;height:34px;flex-basis:34px}
  .auth-brandhead .brand-name{font-size:14px}
  .auth-links{gap:14px;font-size:12.5px}
}

/* 输入框在 iOS 上字号 <16px 会触发自动放大，这里统一 16px */
@media (max-width:560px){
  .field input{font-size:16px}
}

@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
