/* ==========================================================================
   Eric Agent — 账号中心（登录 / 我的设备）
   沿用官网设计系统（暗色科技 · 翡翠绿→深青渐变），只复用变量与 .btn 组件
   ========================================================================== */
:root {
  --bg: #05070a;      --bg-soft: #0a0e14;   --surface: #0e141c;  --surface-2: #111a24;
  --border: rgba(148,178,196,0.12);         --border-strong: rgba(45,212,191,0.25);
  --text: #e8edf2;    --text-dim: #8a94a6;  --text-faint: #7c8798;   /* 2026-09-18: #5b6675 在深底只有 3.0–3.5:1（不达 AA），提到 4.83–5.55:1 */
  --accent: #2dd4bf;  --accent-2: #03b8df;
  --accent-grad: linear-gradient(120deg, #2dd4bf 0%, #03b8df 100%);
  --accent-soft: rgba(45,212,191,0.10);
  --ok: #2dd4bf;      --warn: #f1b000;      --danger: #ea545d;
  --font-cn: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-en: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  --radius: 16px;     --radius-lg: 24px;
  --container: 1180px; --nav-h: 68px;
  --glow-accent: 0 0 0 1px rgba(45,212,191,0.15), 0 8px 60px rgba(45,212,191,0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-cn);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(45,212,191,0.28); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2632; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2a3849; }
.num, .ver { font-family: var(--font-en); letter-spacing: -0.01em; }

/* 背景装饰（与官网一致） */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(148,178,196,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,178,196,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 35% at 50% -5%, rgba(45,212,191,0.10), transparent 65%),
    radial-gradient(ellipse 40% 30% at 88% 30%, rgba(3,184,223,0.06), transparent 60%);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.acct-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(5,7,10,0.82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.acct-nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand small { color: var(--text-dim); font-weight: 500; font-size: 12px; margin-left: 2px; }
.acct-nav-links { display: flex; align-items: center; gap: 18px; }
.acct-nav-links a { font-size: 13.5px; color: var(--text-dim); transition: color .2s; }
.acct-nav-links a:hover, .acct-nav-links a.active { color: var(--accent); }
.acct-user { display: flex; align-items: center; gap: 10px; }
.acct-nick {
  font-size: 13.5px; color: var(--text-dim); max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ==========================================================================
   按钮（与官网 .btn 同款；账号页自带一份，页面不依赖 style.css 也能看）
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; padding: 12px 22px; border-radius: 12px;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent-grad); color: #03110e; box-shadow: 0 6px 30px rgba(45,212,191,.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(45,212,191,.42); }
.btn-ghost { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { border-color: rgba(45,212,191,.4); background: rgba(45,212,191,.06); }
.btn-danger { background: rgba(234,84,93,.12); color: #ff8a90; border-color: rgba(234,84,93,.35); }
.btn-danger:hover:not(:disabled) { background: rgba(234,84,93,.2); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-wrap {
  max-width: var(--container); margin: 0 auto; padding: 56px 24px 90px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  min-height: calc(100vh - var(--nav-h));
}
.login-copy h1 {
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin: 0 0 18px;
}
.login-copy h1 .grad {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.login-copy p.lead { color: var(--text-dim); font-size: 16.5px; line-height: 1.85; margin: 0 0 30px; max-width: 520px; }
.login-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; max-width: 520px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); font-size: 14.5px; }
.login-points .lp-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}
.login-points .lp-ico svg { width: 17px; height: 17px; color: var(--accent); }
.login-points b { color: var(--text); font-weight: 650; }

.card {
  background: linear-gradient(170deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 34px 32px; box-shadow: var(--glow-accent); position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent-grad);
}
.card h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; }
.card .card-sub { color: var(--text-dim); font-size: 13.5px; margin: 0 0 26px; }

label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 7px; }
.input, .code-input {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: rgba(0,0,0,0.32); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .code-input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(45,212,191,.12); }
.input::placeholder { color: var(--text-faint); }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.code-input { font-family: var(--font-mono); letter-spacing: .42em; font-size: 19px; text-align: center; }
.hint { font-size: 12.5px; color: var(--text-faint); margin-top: 8px; line-height: 1.7; }
/* 短信发送方签名提示（手机号验证弹窗 / 手机号找回的「发送验证码」旁）。
   ⚠️ 这**不是**普通 hint，也不是"比 hint 稍显眼一点"：老板实测反馈用户收到
   「恒创联众」签名的短信会犹豫是不是诈骗，所以它必须是一块"必须被看到"的提示块 ——
   正文色文字（曾用 --text-dim 次要色）+ 品牌色 4px 左边框 + 全边框 + 加权底色 + ⓘ 图标，
   视觉层级明显高于旁边的 .hint 辅助说明。**静态说明：不可点、不弹窗**（cursor: default，
   无 hover/active 态），做成交互元素反而会被忽略或误触。 */
.hint.hint-signature {
  position: relative;
  margin: 10px 0 16px;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(var(--accent-soft), var(--accent-soft)),
              rgba(0, 0, 0, 0.28);
  color: var(--text);                       /* 正文色（原来是 --text-dim） */
  font-size: 14px;                          /* 弹窗里普通 .hint 被 .modal p 提到 13.5px，这里再上一档 */
  font-weight: 500;
  line-height: 1.75;
  cursor: default;
  -webkit-user-select: text; user-select: text;
}
/* 选择器写成 `.hint.hint-signature`（两段类）是有意的：设备页弹窗里的 `.modal p`
   （一段类 + 一个元素）优先级更高，会把 color/font-size/margin 打回 --text-dim 的普通说明 —— 
   实测过：单类选择器在弹窗内失效，看起来仍像次要小字。 */
/* ⓘ 图标（纯装饰，不进无障碍树） */
.hint-signature::before {
  content: "i";
  position: absolute; left: 13px; top: 12px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  color: #04211d;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
}

.alert {
  display: none; margin: 0 0 16px; padding: 11px 14px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.7; border: 1px solid transparent;
}
.alert.show { display: block; }
.alert-err { background: rgba(234,84,93,.1); border-color: rgba(234,84,93,.35); color: #ff9ba0; }
.alert-ok { background: var(--accent-soft); border-color: var(--border-strong); color: #7ce7d6; }
.alert-warn { background: rgba(241,176,0,.1); border-color: rgba(241,176,0,.35); color: #ffd479; }

.agree { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--text-faint); margin: 16px 0 0; line-height: 1.7; }
.agree input { margin-top: 3px; accent-color: var(--accent); }
.agree a { color: var(--accent); border-bottom: 1px dotted currentColor; }

/* --------------------------------------------------------------------------
   登录方式 Tab + 视图（P1.5：验证码登录 / 密码登录 / 注册 / 找回）
   -------------------------------------------------------------------------- */
.auth-tabs {
  display: flex; gap: 6px; padding: 5px; margin: 0 0 22px;
  border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); font-size: 14.5px; font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  background: var(--accent-soft); border-color: var(--border-strong); color: var(--accent);
  box-shadow: 0 4px 20px rgba(45,212,191,.12);
}
.auth-view[hidden] { display: none; }
.view-title { margin: 0 0 6px; font-size: 18.5px; font-weight: 700; }
.auth-switch { margin: 18px 0 0; font-size: 13px; color: var(--text-faint); text-align: center; }
.auth-switch a { color: var(--accent); }
.form-aux { display: flex; justify-content: flex-end; margin: -4px 0 16px; font-size: 13px; }
.form-aux a { color: var(--accent); }
.hint-ok { color: #7ce7d6; }
.hint-err { color: #ff9ba0; }
.card .card-sub + form { margin-top: 0; }

.acct-foot { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 26px 24px 40px; line-height: 1.9; }
.acct-foot a { color: var(--text-dim); }
.acct-foot a:hover { color: var(--accent); }

/* ==========================================================================
   我的设备
   ========================================================================== */
.page-head {
  max-width: var(--container); margin: 0 auto; padding: 42px 24px 8px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap;
}
.page-head h1 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.page-head .who { color: var(--text); font-weight: 650; }

.stats-row {
  max-width: var(--container); margin: 22px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-box {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(45,212,191,.03), transparent);
  padding: 18px 20px;
}
.stat-box .sv { font-size: 26px; font-weight: 800; background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-box .sl { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

.section-block { max-width: var(--container); margin: 0 auto; padding: 34px 24px 0; }
.section-block h2 { font-size: 19px; margin: 0 0 4px; font-weight: 700; }
.section-block .sec-sub { color: var(--text-faint); font-size: 13px; margin: 0 0 20px; }

/* 账号与安全（P1.5：用户名 / 密码 / 邮箱 / 手机号） */
.sec-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(170deg, var(--surface) 0%, rgba(14,20,28,.6) 100%);
  padding: 22px;
}
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.sec-item .si-k { font-size: 12.5px; color: var(--text-faint); }
.sec-item .si-v { font-size: 15px; font-weight: 650; margin-top: 3px; word-break: break-all; }
.sec-item .si-v.mono { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; color: var(--text-dim); }
.sec-item .si-v.si-empty { color: var(--text-faint); font-weight: 500; }
.sec-item .si-v .pill { margin-left: 6px; vertical-align: 1px; }
.sec-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.sec-card .alert { margin: 16px 0 0; }

.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.dev-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(170deg, var(--surface) 0%, rgba(14,20,28,.6) 100%);
  padding: 22px 22px 18px; position: relative; overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.dev-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--glow-accent); }
.dev-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,212,191,.5), transparent); opacity: 0; transition: opacity .3s;
}
.dev-card:hover::before { opacity: 1; }
.dev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.dev-name { font-size: 16.5px; font-weight: 700; margin: 0; word-break: break-all; }
.dev-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin: 2px 0 14px; word-break: break-all; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-faint);
  background: rgba(255,255,255,.03); white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.pill.on { color: #7ce7d6; border-color: var(--border-strong); background: var(--accent-soft); }
.pill.on .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.pill.off { color: var(--text-faint); }
.pill.lic { color: #ffd479; border-color: rgba(241,176,0,.35); background: rgba(241,176,0,.08); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin: 0 0 16px; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; color: var(--text-dim); word-break: break-all; }
.kv dd.mono { font-family: var(--font-mono); font-size: 12.5px; }

.dev-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }

.empty {
  border: 1px dashed var(--border); border-radius: var(--radius); padding: 46px 26px;
  text-align: center; color: var(--text-dim);
}
.empty .e-ico { font-size: 34px; margin-bottom: 10px; }
.empty h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.empty p { margin: 0 0 18px; font-size: 14px; }

.claim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.claim-grid .span2 { grid-column: 1 / -1; }

/* 认领凭据二选一分段控件 */
.field-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 7px; }
.seg { display: inline-flex; gap: 6px; margin-bottom: 16px; }
.seg-btn {
  font-size: 13.5px; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  color: var(--text-dim); transition: all .2s;
}
.seg-btn:hover { border-color: rgba(45,212,191,.4); color: var(--text); }
.seg-btn.active {
  background: var(--accent-soft); border-color: var(--border-strong);
  color: var(--accent); font-weight: 600;
}

/* ── 设备详情：操作记录（时间范围 + 分页 + 限高滚动）─────────────────────────
   背景（用户 2026-10-08 反馈）：「我的设备」点进详情，记录没有分页，20 条一次铺开
   把弹窗拉得很长，也看不出"这是哪段时间的记录"。现在按 时间范围 + 分页 展示。 */
.audit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.audit-head .audit-title { font-size: 13px; color: var(--text-dim); margin-right: auto; }
.audit-range { margin-bottom: 0; flex-wrap: wrap; }
.audit-range .seg-btn { font-size: 12.5px; padding: 5px 12px; }
.audit-custom {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-dim); margin: 0 0 10px;
}
/* 必须显式盖掉 flex：`hidden` 属性的默认 display:none 会被上面的 display:flex 顶掉，
   结果"非自定义"时那行日期也一直显示（真机验收抓到）。 */
.audit-custom[hidden] { display: none; }
.audit-custom input[type="date"] {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 5px 8px; font-size: 12.5px; font-family: inherit;
}
.audit-custom .btn { padding: 5px 12px; font-size: 12.5px; }
.audit-pager {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12.5px; color: var(--text-faint);
  /* 吸底：弹窗内容比视口高时要滚动才看得到分页条 → 固定在视口底部，翻页/页码始终可见 */
  position: sticky; bottom: 0; z-index: 2;
  background: var(--surface); padding: 8px 0 4px;
}
.audit-pager .pg-info { margin-right: auto; }
.audit-pager select {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 8px; padding: 4px 6px; font-size: 12.5px; font-family: inherit;
}
.audit-pager .btn { padding: 4px 10px; font-size: 12.5px; }

.audit-list { max-height: 40vh; overflow-y: auto; padding-right: 2px; }
.audit-row {
  display: grid; grid-template-columns: 150px 190px 1fr; gap: 12px;
  font-size: 12.5px; color: var(--text-dim); padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02);
}
.audit-row .a-act { color: var(--accent); font-family: var(--font-en); }
.audit-row .a-t { color: var(--text-faint); }

.spinner {
  width: 15px; height: 15px; border-radius: 50%; display: inline-block;
  border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent);
  animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { color: var(--text-dim); font-size: 14px; padding: 24px 0; text-align: center; }

.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.72);
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 460px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  /* 2026-10-08：弹窗不再随内容无限长（设备详情曾把页面拉得很长）——超高就在弹窗内滚动 */
  max-height: 88vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 18px; line-height: 1.75; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; gap: 34px; padding-top: 34px; align-items: start; }
  .login-copy { order: 2; }
  .login-card-col { order: 1; }
  .claim-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .audit-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
  .acct-nav-links { display: none; }
  .acct-nick { max-width: 96px; }
  .card { padding: 26px 20px; }
  .dev-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .page-head { padding-top: 28px; }
}
