/* ============================================================
   云手机 · 手机网页端
   ★ 2026-10-08 UI 整体重做：从买来源码的「深色科技风」换成
     **自家电脑端（纯净版/public/css/tokens.css）的浅色商务风**。
     变量名沿用手机端自己的（--primary/--muted/--radius…），
     但取值与电脑端设计令牌一一对应，保证两端视觉一致：
       电脑端 --accent var(--primary)        → 手机端 --primary
       电脑端 --bg-base #F5F7FA       → 手机端 --bg
       电脑端 --bg-surface #FFFFFF    → 手机端 --card
       电脑端 --border #E3E8EF        → 手机端 --line
       电脑端 --text-primary #1F2430  → 手机端 --text
       电脑端 --radius-sm/…/xl        → 手机端 --radius-s/--radius/--radius-l
     完整对照表见 README「UI 设计变量对照表」。
   ============================================================ */
:root {
  color-scheme: light;

  /* ---- 背景（电脑端 --bg-base / --bg-subtle / --bg-soft / --bg-input） ---- */
  --bg: #F5F7FA;            /* 页面底：内容区 #F5F7FA */
  --bg-2: #FAFBFD;          /* --bg-subtle */
  --card: #FFFFFF;          /* --bg-surface */
  --bg-soft: #F3F5F9;       /* --bg-soft */
  --bg-sunken: #F7F9FC;     /* --bg-sunken */
  --bg-tint: #F0F5FF;       /* 淡蓝强调块 */
  --bg-input: #FFFFFF;      /* --bg-input */
  --bg-subtle: #FAFBFD;     /* --bg-subtle */
  --bg-hover: #F2F6FF;      /* --bg-hover */

  /* ---- 边框（电脑端 --border / --border-soft / --border-strong / --border-accent） ---- */
  --line: #E3E8EF;
  --line-2: #EEF1F6;        /* --border-soft */
  --line-3: #F2F4F8;
  --line-strong: #D8DFEA;   /* --border-strong */
  --line-accent: #C9D8F5;   /* --border-accent（悬停蓝描边） */

  /* ---- 文字层级（电脑端 --text-primary/secondary/tertiary） ---- */
  --text: #1F2430;
  --text-2: #5A6272;
  --muted: #5A6272;         /* --text-secondary */
  --muted-2: #8A909C;       /* --text-tertiary */
  --text-disabled: #A8AEB8;

  /* ---- 主色（电脑端 --accent 系列） ---- */
  --primary: #2F6FEB;
  --primary-d: #1E5BD6;
  --accent-2: #1E5BD6;      /* 电脑端 --accent-2（悬停深一档） */
  --grad: linear-gradient(135deg, #2F6FEB, #1E5BD6);
  --grad-soft: rgba(47, 111, 235, .08);   /* --accent-soft */
  --accent-glow: rgba(47, 111, 235, .18);
  --glass: rgba(255, 255, 255, .6);

  /* ---- 状态色（电脑端 --success/--warning/--danger + 对应浅底） ---- */
  --green: #1A7F4B;         /* --success */
  --green-bg: #E5F7EE;      /* --success-bg */
  --orange: #C2410C;        /* --warning */
  --orange-bg: #FFF7ED;     /* --warning-bg */
  --orange-line: #FED7AA;   /* --warning-border */
  --red: #D64545;           /* --danger */
  --red-bg: #FDECEC;        /* --danger-bg */
  --red-d: #C03A3A;
  --price: #D64545;
  --blue-bg: #EAF1FE;       /* --info-bg */

  /* 兼容旧变量名（源码里在用，改成同一套值即可，不用逐条改样式） */
  --active-bg: #F0F5FF;
  --gold: #C2410C;
  --gold-d: #9A3412;
  --cream: #FFF7ED;
  --cream-d: #FED7AA;

  /* ---- 圆角（电脑端 --radius-xs/sm/…/xl） ---- */
  --radius-xl: 14px;        /* --radius-xl */
  --radius-l: 12px;         /* --radius-lg */
  --radius: 10px;           /* --radius */
  --radius-s: 8px;          /* --radius-sm */
  --radius-xs: 6px;         /* --radius-xs */

  /* ---- 阴影（电脑端 --shadow-xs/sm/card/…） ---- */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px rgba(16, 24, 40, .05);
  --shadow: 0 8px 24px rgba(16, 24, 40, .10);
  --shadow-lg: 0 14px 36px rgba(16, 24, 40, .18);
  --shadow-xl: 0 24px 60px rgba(16, 24, 40, .30);
  --transition: .15s ease;

  --status-bar-height: 0px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(52px + var(--safe-b));
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
#app { position: relative; width: 100%; max-width: 520px; min-height: 100%; margin: 0 auto; overflow: hidden; background: var(--bg); }
/* 细纹底：和电脑端 .page-scroll 同一套画法（很淡，不抢内容） */
.page-scroll, .order-list, .sub-body, .scroll-container {
  background-image: radial-gradient(circle at 1px 1px, rgba(16, 24, 40, .05) 1px, transparent 0);
  background-size: 20px 20px;
}
.hidden { display: none !important; }
.flex1 { flex: 1; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); background: transparent; border: none; outline: none; }
input::placeholder { color: var(--muted-2); }
::-webkit-scrollbar { width: 0; height: 0; }

[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { display: block; }
/* 启动页品牌图标：内联 SVG，跟随白色 */
.splash-logo [data-icon] { color: #fff; }
.splash-logo svg { width: 42px; height: 42px; stroke-width: 1.4; }
/* 触摸友好：所有可点区域至少 44px 的点击高度（PC 端是鼠标，手机端必须放宽） */
.btn, .list-item, .grid-item, .tab, .sd, .modal-tile, .dev-menu-item, .mini-btn { min-height: 44px; }

/* ============ 启动页 ============ */
.splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg);
}
.splash-logo {
  width: 84px; height: 84px; border-radius: 22px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 44px; color: #fff;
  box-shadow: 0 10px 24px rgba(47, 111, 235, .28); animation: float 2.4s ease-in-out infinite;
}
.splash-name { margin-top: 18px; font-size: 21px; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.splash-sub { margin-top: 6px; color: var(--muted-2); font-size: 12.5px; letter-spacing: 3px; }
.spinner {
  margin-top: 34px; width: 22px; height: 22px;
  border: 2.5px solid var(--grad-soft); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ============ 登录页（单卡片版：整页只有「一张卡片 + 卡外页脚」） ============
   ★ 2026-10-08 第三版。客户原话：「要么全都在同一个卡片视图，要么就没有卡片视图改别的样式」。
     前两版的病根被客户一句话点破：品牌区在卡片外面飘着、表单在卡片里面 —— 两个割裂的块。
     这一版照客户给的结构做，**不加任何自己的发挥**：
       · 底：纯色 var(--bg)（#F5F7FA）—— 没有渐变 / 网格 / 纹理 / 光斑；
       · 卡片：纯白 var(--card) + 1px var(--line) 细边 + --shadow-card 轻阴影 + 16px 圆角
               + 26px 内边距；宽 calc(100% - 40px)、max-width 420px、页面正中（纵向也居中）；
       · 卡片里从上到下：LOGO(58) → 品牌名(22 / 700) → slogan(12 灰) →
               视图标题行（只有注册 / 找回显示）→ 字段(48) → 主按钮(50) → 协议行；
       · 页脚版权在卡片**外面**、页面底部（11.5px 极淡灰）；
       · LOGO 不要外发光、卡片不要毛玻璃、页面不要任何"悬空没有归属"的元素。
     · 颜色只用 :root 里的既有变量（主色 #2F6FEB / 底 #F5F7FA / 卡片白 / 边框 #E3E8EF /
       文字 #1F2430 #5A6272 #8A909C），**没有引入任何新色值**；圆角除卡片（本次结构规格
       明确要求 16px）外全部取自 :root 的 6 / 8 / 10 / 12 / 14；
     · 样式都挂在 .auth 作用域里，.form-input / .field input / .btn 等**公共**选择器原样保留，
       子页面（如「重置密码」）的观感不受影响。 */
.auth {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  height: 100%; min-height: 100vh; min-height: 100dvh;   /* 老 WebView 不认 dvh 时退回 100vh */
  -webkit-overflow-scrolling: touch;
  background: var(--bg);   /* 纯色浅灰：不叠渐变、不画图案 */
}
/* 卡片居中：min-height 先撑满一屏再纵向居中；内容比一屏高时（320×568 的注册页）
   容器跟着长高、从顶部往下排，不会把顶部裁掉。 */
.auth-body {
  min-height: 100%;
  max-width: 460px; margin: 0 auto;
  padding: calc(var(--status-bar-height) + var(--safe-t) + 24px) 0 calc(16px + var(--safe-b));
  display: flex; flex-direction: column; justify-content: center;
}
/* 「关于我们」子页面用的品牌图标底 */
.auth-logo-fallback {
  width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .28);
}

/* ---- 品牌区：**在卡片里面**、卡片顶部居中（LOGO → 品牌名 → slogan，间距 12 / 6）
   品牌区原先在卡外飘着，是「两个割裂的块」的根源，本次整段搬进 .auth-card。
   品牌名 22px / 700（阅读顺序上就是这张卡的标题）。 */
.auth-head { text-align: center; margin: 0 0 20px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-logo img { height: 58px; width: auto; max-width: 100%; object-fit: contain; }
/* LOGO：干净的实心主色渐变方块（与主按钮同一支渐变）+ 圆角取 :root 的 --radius-xl(14px)，
   **不加外发光、不加 text-shadow**（客户点名删掉的那种） */
.auth-logo .mark {
  width: 58px; height: 58px; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #2F6FEB 0%, #4A8AF4 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 700;
}
.auth-title {
  margin: 0; font-size: 22px; font-weight: 700; color: var(--text);
  text-align: center; letter-spacing: .5px;
}
/* slogan（CFG.slogan，见 index.html 底部小脚本） */
.auth-slogan {
  margin: 6px 0 0; font-size: 12px; color: var(--muted-2);
  text-align: center; letter-spacing: .5px;
}
/* 视图标题行（注册「注册账号」/ 找回「找回密码」）：也在卡片里面，当卡片内的小标题。
   登录视图 **不显示** —— 卡片顶部已经有品牌名了，不需要再说一遍「登录账号」。
   #auth-subtitle 在 DOM 里排在三个表单之后，所以这里用兄弟选择器判断当前视图
   （纯 CSS，不依赖 :has()，老 WebView 也认）；视觉顺序靠下面的 order：
   品牌区 0 → 标题行 1 → 表单 2（见 .auth-card > form 与 .auth-sub 的 order）。 */
.auth-sub {
  order: 1; display: none; margin: 0 0 16px;
  text-align: center; color: var(--muted-2);
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
}
#form-register:not(.hidden) ~ #auth-subtitle,
#form-forgot:not(.hidden) ~ #auth-subtitle { display: block; }

/* ---- 卡片：整页唯一的容器。白底 + 1px 细边 + 16px 圆角 + 26px 内边距 + --shadow-card 轻阴影
   （不是毛玻璃、不是大光晕；flex 列方向只为给 #auth-subtitle 用 order 定位） ---- */
.auth-card {
  position: relative;
  width: calc(100% - 40px); max-width: 420px; margin: 0 auto;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;                 /* 本次结构规格：卡片圆角 16px */
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  animation: authCardIn .26s cubic-bezier(.22, .8, .3, 1) both;
}
.auth-card > form { order: 2; }
@keyframes authCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* 三个视图切换（app.js 的 switchAuthForm 只切 hidden 类）时轻微淡入 */
.auth-card form { animation: authFormIn .22s ease-out both; }
@keyframes authFormIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- 页脚版权：在卡片**外面**、页面底部（品牌名取 client-config.brandName） ---- */
.auth-foot {
  width: calc(100% - 40px); max-width: 420px; margin: 14px auto 0;
  text-align: center; font-size: 11.5px;
  color: var(--text-disabled); letter-spacing: .3px; line-height: 1.7;
}
.auth-foot b { font-weight: 600; color: var(--muted-2); }
.auth-foot-sep { margin: 0 6px; opacity: .7; }
.form-group { margin-bottom: 16px; }
.form-group .label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.form-label { display: block; font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.3; margin-bottom: 7px; }
.label-row .form-label { margin-bottom: 0; }
.switch-btn { font-size: 12.5px; color: var(--primary); padding: 4px 0; line-height: 1.2; min-height: 0; }
.field { position: relative; display: flex; align-items: center; }
.form-input, .field input {
  width: 100%; height: 46px; background: var(--bg-input); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); padding: 0 14px; font-size: 15px; color: var(--text); transition: var(--transition);
}
.form-input:focus, .field input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--grad-soft); }
.field input { padding-right: 44px; }
.field-eye {
  position: absolute; right: 12px; width: 28px; height: 28px; color: var(--muted-2);
  cursor: pointer; transition: color var(--transition); display: inline-flex; align-items: center; justify-content: center;
}
.field-eye:active { color: var(--primary); }
.sms-input-group { display: flex; gap: 8px; align-items: center; }
.sms-input-group .field { flex: 1; }
.sms-btn {
  width: 112px; height: 46px; flex: none; background: var(--grad); color: #fff;
  font-size: 13px; border-radius: var(--radius-s); font-weight: 500;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.sms-btn:active:not(:disabled) { background: var(--primary-d); }
.sms-btn:disabled { background: var(--bg-soft); color: var(--text-disabled); }

/* ---- 认证页字段（48px 高 / 圆角 12 / 左侧内联 SVG 图标 / 聚焦主色描边 + 柔光）
   ⚠️ 全部是 .auth 作用域下的覆盖：上面那套公共的 .form-input / .field input 规则没动，
      子页面（重置密码等）还是原来的样子。 */
.auth .form-group { margin-bottom: 14px; }
.auth .form-group .label-row { margin-bottom: 8px; }
.auth .form-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: .2px; }
.auth .switch-btn {
  position: relative; display: inline-flex; align-items: center;
  font-size: 12.5px; font-weight: 500; color: var(--primary); line-height: 1.3;
}
/* 文字链接的触摸目标补到 44px 高：只往上/左右扩，避免压住下面的输入框 */
.auth .switch-btn::after {
  content: ''; position: absolute; left: -12px; right: -12px; top: -20px; height: 44px;
}
.auth .field { position: relative; }
.auth .field-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-2); pointer-events: none; transition: color var(--transition);
}
.auth .field-icon svg { width: 18px; height: 18px; stroke-width: 1.7; }
.auth .field:focus-within .field-icon { color: var(--primary); }
.auth .field input, .auth .form-input {
  width: 100%; height: 48px; padding: 0 14px 0 42px;
  background: var(--bg-sunken); border: 1px solid var(--line-strong);
  border-radius: var(--radius-l); font-size: 15px; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
/* placeholder 再淡一档（只作用于认证页） */
.auth .field input::placeholder, .auth .form-input::placeholder { color: var(--text-disabled); }
.auth .field input:hover { border-color: var(--line-accent); }
.auth .field input:focus, .auth .form-input:focus {
  background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 111, 235, .12);
}
/* 带「显示密码」眼睛的输入框：文字别压到图标下面 */
.auth .field input[type="password"] { padding-right: 44px; }
/* 眼睛按钮：视觉 28px，触摸区补到 44px（.field-eye 本身已是 absolute） */
.auth .field-eye { right: 10px; }
.auth .field-eye::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
.auth .sms-input-group { gap: 8px; }
.auth .sms-btn { height: 48px; width: auto; min-width: 100px; padding: 0 12px; border-radius: var(--radius-l); }

/* ---- 按钮体系（对齐电脑端 .btn / .btn.pri / .btn.danger / .btn.block） ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-s); padding: 0 16px; height: 44px;
  border: 1px solid var(--line);
  background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 500; transition: var(--transition); white-space: nowrap;
}
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }
.btn-primary, .btn.pri {
  background: var(--grad); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .28);
}
.btn-primary:active { background: var(--primary-d); }
.btn-outline { background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn-plain { background: var(--bg-soft); border-color: var(--line-2); color: var(--muted); font-weight: 500; }
.btn-mini { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-s); min-height: 34px; }
/* ★ 红色按钮：危险操作 / 二次确认的「确定」 */
.btn-danger {
  background: var(--red); border-color: var(--red); color: #fff; font-weight: 600;
}
.btn-danger:active:not(:disabled) { background: var(--red-d); border-color: var(--red-d); }
/* 倒计时期间：明显是"还不能点"的样子 */
.btn-danger:disabled { background: var(--red); border-color: var(--red); color: #fff; opacity: .45; }
.btn-gold { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-sm { height: 34px; min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: var(--radius-xs); }
/* 主按钮：主色渐变（#2F6FEB → #4A8AF4）+ 圆角 12 + 50px 高 + 一层浅主色投影 + 按下反馈
   （本次结构规格：主按钮高 50；原来 52px，只在认证页生效——.login-btn 只有登录/注册/找回三个表单在用，
     .auth-card 也只存在于认证页，子页面「重置密码」的 .btn-block 不在 .auth-card 里，不受影响） */
.login-btn, .auth-card .btn-block {
  width: 100%; height: 50px; font-size: 16px; font-weight: 600; border-radius: var(--radius-l);
  background: linear-gradient(135deg, #2F6FEB 0%, #4A8AF4 100%);
  color: #fff; letter-spacing: 1px; margin-top: 6px;
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.login-btn:active:not(.loading):not(:disabled), .auth-card .btn-block:active:not(.loading):not(:disabled) {
  transform: scale(.985); filter: brightness(.95);
  box-shadow: 0 1px 4px var(--accent-glow);
}
.login-btn.loading { opacity: .8; background: var(--muted-2); }
/* 禁用态：一眼看出"点不了"（不是只降透明度） */
.login-btn:disabled, .auth-card .btn-block:disabled {
  background: var(--bg-soft); color: var(--text-disabled); border: 1px solid var(--line);
  box-shadow: none; filter: none; transform: none;
}

/* 协议勾选行：主色勾选框 + 12.5px 文字 + 主色链接，整行 44px 可点 */
.agreement-section { margin: 16px 0 0; }
.agreement-checkbox {
  display: flex; align-items: flex-start; gap: 9px;
  min-height: 44px; padding: 4px 0 0; cursor: pointer;
}
/* 真勾选框（默认 checked）：藏起来，用 .checkbox-circle 画，勾选态由 :checked 控制（纯 CSS） */
.agree-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.checkbox-circle {
  width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--line-strong); background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.checkbox-circle [data-icon] { color: #fff; }
.checkbox-circle svg { width: 11px; height: 11px; stroke-width: 3; opacity: 0; transition: opacity var(--transition); }
.agree-input:checked ~ .checkbox-circle {
  background: linear-gradient(135deg, #2F6FEB 0%, #4A8AF4 100%);
  border-color: var(--primary); box-shadow: 0 2px 6px rgba(47, 111, 235, .26);
}
.agree-input:checked ~ .checkbox-circle svg { opacity: 1; }
.agree-input:focus-visible ~ .checkbox-circle { box-shadow: 0 0 0 4px rgba(47, 111, 235, .16); }
.agreement-text { font-size: 12.5px; color: var(--muted-2); line-height: 1.6; flex: 1; }
.agreement-text a { color: var(--primary); font-weight: 500; white-space: nowrap; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12.5px; color: var(--muted-2); }
.auth-links a { color: var(--primary); }
.auth-links.center { justify-content: center; gap: 4px; }

/* 矮屏（≤660px 高：320×568、横屏）：收紧的是**留白**，控件尺寸（字段 48 / 主按钮 50 /
   勾选行 44）一律不动 —— 保证 320×568 的登录、找回两页仍然一屏放得下，触摸目标不缩水 */
@media (max-height: 660px) {
  .auth-body {
    padding-top: calc(var(--status-bar-height) + var(--safe-t) + 16px);
    padding-bottom: calc(12px + var(--safe-b));
  }
  .auth-head { margin-bottom: 12px; }
  .auth-logo { margin-bottom: 8px; }
  .auth-title { font-size: 20px; }
  .auth-slogan { margin-top: 4px; }
  .auth-sub { margin-bottom: 12px; }
  .auth-card { padding: 18px 20px 16px; }
  .auth .form-group { margin-bottom: 12px; }
  .auth .form-group .label-row { margin-bottom: 6px; }
  .agreement-section { margin-top: 12px; }
  .auth-foot { margin-top: 8px; }
}
/* 超窄屏（320px 档）：短信按钮收窄 + 输入框字号小一档、图标左内边距收一点，
   否则「验证码」输入框放不下 6 位数（卡片窄了，字段可用宽只有 152px） */
@media (max-width: 344px) {
  .auth .sms-input-group { gap: 6px; }
  .auth .sms-btn { min-width: 80px; padding: 0 6px; font-size: 12px; }
  .auth .field input, .auth .form-input { font-size: 14.5px; padding-left: 38px; }
  .auth .field-icon { left: 11px; }
  .auth .field-icon svg { width: 17px; height: 17px; }
}
/* 系统开了「减弱动态效果」：入场动画与过渡全部关掉 */
@media (prefers-reduced-motion: reduce) {
  .auth-card, .auth-card form { animation: none !important; }
  .auth .field input, .auth .form-input, .auth .field-icon, .auth .field-eye,
  .auth .sms-btn, .login-btn, .auth-card .btn-block,
  .checkbox-circle, .checkbox-circle svg, .auth-sub, .auth .switch-btn { transition: none !important; }
}

/* ============ 主框架 ============ */
.main { position: relative; min-height: 100%; padding-bottom: var(--tabbar-h); }
.page { display: none; min-height: 100vh; }
.page.active { display: block; }
/* 顶栏 45px + 下方常驻的设备搜索行 42px = 87px，内容从这里往下排 */
#page-home { padding-top: 87px; min-height: 0; background: var(--bg); }
/* 公告页：浅底 + 白卡 */
.notice-page { background: var(--bg); padding: 0; }
.notice-list { padding: 8px 8px calc(var(--tabbar-h) + 8px); }

/* ============ 公告页 ============ */
.discovery { min-height: 100%; display: flex; flex-direction: column; background: var(--bg); padding-bottom: calc(var(--tabbar-h) + 8px); }
.discovery-header {
  background: var(--card); padding: 14px 16px 12px;
  display: flex; align-items: flex-start; justify-content: space-between;
  border-bottom: 1px solid var(--line-2);
}
.discovery-header .dh-title {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
/* 标题前 3px 蓝色渐变竖条（电脑端 .pcard > h3::before 同款） */
.discovery-header .dh-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--grad); flex: none;
}
.read-all {
  padding: 4px 10px; border-radius: var(--radius-xs); background: var(--grad-soft);
  color: var(--primary); font-size: 11.5px; line-height: 1.5; flex: none;
}
.read-all:active { background: rgba(47, 111, 235, .16); }
/* 轮播 160px */
.swiper-container { position: relative; width: 100%; height: 160px; background: var(--card); overflow: hidden; }
.swiper-track { position: absolute; inset: 0; }
.swiper-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  display: flex; flex-direction: column; justify-content: center; padding: 0 20px;
  background: var(--grad);
}
.swiper-slide:nth-child(2) { background: linear-gradient(135deg, #4E7BE8, var(--primary)); }
.swiper-slide:nth-child(3) { background: linear-gradient(135deg, var(--primary), #1E5BD6); }
.swiper-slide.active { opacity: 1; }
.swiper-slide .ss-title { font-size: 19px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.swiper-slide .ss-sub { font-size: 12.5px; color: rgba(255, 255, 255, .88); line-height: 1.6; }
.swiper-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.swiper-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); transition: background .3s; }
.swiper-dots .dot.active { background: #fff; }
/* 分类下划条 */
.category-wrapper {
  background: var(--card); padding: 2px 16px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; overflow-x: auto; scrollbar-width: none;
}
.category-wrapper::-webkit-scrollbar { display: none; }
.category-item {
  position: relative; display: inline-block; padding: 8px 10px; margin-right: 8px;
  font-size: 13px; color: var(--muted); white-space: nowrap; flex: none;
}
.category-item:last-child { margin-right: 0; }
.category-item.active { color: var(--primary); font-weight: 600; }
.category-item .active-bar {
  position: absolute; bottom: 0; left: 10px; right: 10px; height: 2px;
  background: var(--grad); border-radius: 1px;
}
/* 图文列表 */
.article-list-content { padding: 12px 12px 0; }
.article-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow-xs);
  display: flex; align-items: flex-start;
}
.article-item:active { background: var(--bg-hover); }
.article-thumb {
  width: 80px; height: 80px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft); color: var(--primary); font-size: 26px;
}
.article-info { flex: 1; min-width: 0; padding: 10px; display: flex; flex-direction: column; }
.article-title {
  font-size: 14px; color: var(--text); font-weight: 600; margin-bottom: 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-desc {
  font-size: 11.5px; color: var(--muted-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-title .unread {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); margin-left: 5px; vertical-align: middle;
}
.list-status { padding: 12px 16px; text-align: center; font-size: 11.5px; color: var(--muted-2); }
.article-body .ab-cat { font-size: 11.5px; color: var(--primary); margin-bottom: 8px; }
.article-body .ab-line { font-size: 13.5px; color: var(--text); line-height: 1.9; }
.notice-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.notice-lines div { font-size: 13px; color: var(--muted); line-height: 1.6; }
.page-scroll { padding: 0 12px 100px; }

/* ============ 首页顶栏（45px 白底 + 细边，对齐电脑端顶栏） ============ */
.header-container {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 40; box-sizing: border-box;
  background: var(--card); border-bottom: 1px solid var(--line-2);
}
.top-header {
  height: 45px; padding: 0 12px; margin-top: var(--status-bar-height);
  display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 3;
}
.top-header .left {
  display: flex; align-items: center; gap: 6px; position: relative;
  background: var(--card); border: 1px solid var(--line); padding: 6px 12px; border-radius: var(--radius-s);
  max-width: 52vw;
}
.top-header .left:active { background: var(--bg-hover); border-color: var(--line-accent); }
.top-header .left .title {
  font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-header .left .caret { color: var(--muted-2); display: inline-flex; transition: transform .2s ease; }
.top-header .left .caret svg { width: 14px; height: 14px; }
.top-header .right { display: flex; align-items: center; gap: 8px; }
.batch-renew-btn, .pill-btn.blue {
  height: 30px; padding: 0 12px; background: var(--card); color: var(--accent-2, #1E5BD6);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; line-height: 1; transition: var(--transition); flex: none;
}
.batch-renew-btn:active, .pill-btn.blue:active { background: var(--bg-hover); border-color: var(--line-accent); }
.pill-btn {
  height: 30px; padding: 0 12px; border-radius: var(--radius-s); font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-s); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  transition: var(--transition); position: relative;
}
.icon-btn:active { background: var(--bg-hover); border-color: var(--line-accent); color: var(--primary); }
.balance-chip {
  display: inline-flex; align-items: center; gap: 4px; background: none; color: var(--primary);
  border-radius: 999px; padding: 0; font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* 搜索栏（顶栏正下方） */
.search-bar {
  position: absolute; top: calc(45px + var(--status-bar-height)); left: 0; width: 100%;
  z-index: 20; background: var(--card); padding: 12px;
  border-radius: 0 0 var(--radius-l) var(--radius-l); box-shadow: var(--shadow);
  box-sizing: border-box; animation: fadein .2s ease;
}
.search-input-wrapper {
  position: relative; display: flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 0 10px; height: 40px;
}
.search-input-wrapper > [data-icon] { color: var(--muted-2); margin-right: 8px; }
.search-input-wrapper > [data-icon] svg { width: 16px; height: 16px; }
.search-input-wrapper input { flex: 1; background: transparent; font-size: 14px; color: var(--text); height: 100%; }
.clear-btn {
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg-soft); color: var(--muted);
  display: flex; align-items: center; justify-content: center; margin-left: 8px; flex: none;
}
.clear-btn:active { background: var(--line); }
/* 批量管理底部操作栏（固定贴底，位于底部导航之上） */
.batch-bar {
  position: fixed; left: 0; right: 0; top: auto; bottom: var(--tabbar-h); z-index: 60;
  width: 100%; height: auto; box-sizing: border-box;
  background: var(--card); border-radius: var(--radius-xl, 14px) var(--radius-xl, 14px) 0 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(16, 24, 40, .10);
  padding: 10px 12px calc(10px + var(--safe-b));
  display: flex; flex-direction: column; gap: 10px;
  animation: batchup .22s ease;
}
@keyframes batchup { from { transform: translateY(100%); } to { transform: none; } }
.batchbar-head { display: flex; align-items: center; gap: 10px; }
.batchbar-close {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-soft); color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.batchbar-close:active { background: var(--line); }
.batchbar-count { font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; }
.batchbar-count b { color: var(--primary); font-size: 15px; }
.batchbar-tip { font-size: 11.5px; color: var(--muted-2); margin-left: auto; }
.batchbar-actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.batchbar-actions::-webkit-scrollbar { display: none; }
.batchbar-actions button {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: var(--radius-s); background: var(--card); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); font-weight: 500; transition: var(--transition);
}
.batchbar-actions button:active { background: var(--bg-hover); border-color: var(--line-accent); }
.batchbar-actions button.disabled { opacity: .45; }
.batchbar-actions button > [data-icon] { color: var(--primary); display: inline-flex; }
.batchbar-actions button > [data-icon] svg { width: 17px; height: 17px; }
.batch-text { font-size: 13px; font-weight: 500; color: var(--text); }

/* ============ 下拉菜单（白卡 + 细边 + 轻阴影，对齐电脑端 .ctx-menu / .menu-item） ============ */
.dropdown-mask { position: fixed; inset: 0; z-index: 55; background: transparent; }
.dropdown { position: absolute; top: 35px; z-index: 56; animation: dropin .14s ease; }
@keyframes dropin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropdown.right { right: 12px; margin-top: 4px; display: flex; flex-direction: column; align-items: flex-end; }
.dropdown.left { left: 0; margin-top: 4px; }
.dropdown.right > .dropdown-menu {
  position: relative; width: 176px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 5px;
  box-shadow: var(--shadow-lg); margin-top: 4px;
}
.dropdown.right > .dropdown-menu::after {
  content: ""; position: absolute; top: -4px; right: 12px; width: 7px; height: 7px;
  background: var(--card); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.dropdown-item {
  min-height: 42px; padding: 0 11px; display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text); border-radius: var(--radius-s); text-align: left; width: 100%; white-space: nowrap;
  transition: var(--transition); position: relative; z-index: 5;
}
.dropdown-tag {
  margin-left: auto; flex: none; font-size: 10.5px; line-height: 1; padding: 3px 6px; border-radius: 999px;
  background: var(--grad-soft); color: var(--primary); white-space: nowrap;
}
/* 三条杠下拉下方的「设备 ID 查找」输入框（尾部放大镜，与菜单右对齐） */
.dropdown-search {
  display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 4px 4px 10px;
  width: 208px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.dropdown-search input {
  flex: 1; min-width: 0; height: 34px; border: 0; outline: none; background: transparent;
  font-size: 13px; color: var(--text);
}
.dropdown-search input::placeholder { color: var(--muted-2); }
.dropdown-search-btn {
  flex: none; width: 34px; height: 34px; border-radius: var(--radius-xs); background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.dropdown-search-btn:active { background: var(--primary-d); }
.dropdown-item [data-icon] { color: var(--muted); display: inline-flex; flex: none; }
.dropdown-item [data-icon] svg { width: 17px; height: 17px; }
.dropdown-item:active { background: var(--bg-hover); }
.dropdown-item.active { background: var(--grad-soft); color: var(--primary); font-weight: 600; }
.dropdown-item.active [data-icon] { color: var(--primary); }
.group-arrow {
  position: absolute; top: -5px; left: 12px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid var(--card);
  z-index: 2;
}
.group-list {
  position: relative; width: 152px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px; box-shadow: var(--shadow-lg); margin-top: 4px; max-height: 260px; overflow-y: auto;
}
.group-item {
  padding: 10px 12px; min-height: 42px; display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--text); position: relative; z-index: 5; transition: var(--transition); text-align: left; width: 100%;
  border-radius: var(--radius-xs);
}
.group-item > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.group-item:active { background: var(--bg-hover); }
.group-item.active { color: var(--primary); background: var(--grad-soft); font-weight: 600; }
/* 自定义分组行：名称 + 台数 + 删除叉号 */
.group-row { display: flex; align-items: center; position: relative; }
.group-row .group-item { flex: 1; min-width: 0; }
.group-row.active .group-item { color: var(--primary); background: var(--grad-soft); }
.group-del {
  flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--text-disabled); border-radius: var(--radius-xs);
}
.group-del:active { background: var(--red-bg); color: var(--red); }
.group-row.active .group-del { color: var(--muted-2); }
/* 套餐自动分组：只读（锁图标） */
.group-lock {
  flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--text-disabled);
}
.dev-menu-item.locked { opacity: .72; }
.dev-menu-item.locked::after { content: ''; }
/* 批量模式下给底部栏留出空间 */
body.batch-mode .empty-wrapper { padding-bottom: 132px; }
.group-item.add-group { color: var(--primary); border-top: 1px solid var(--line-2); font-weight: 500; border-radius: 0; }
.group-item.add-group [data-icon] { color: var(--primary); }
.group-item.add-group [data-icon] svg { width: 14px; height: 14px; }
.group-item.add-group:active { background: var(--bg-hover); }

/* ============ 首页白色纸面容器（对齐电脑端：白卡 + 细边 + 圆角） ============ */
.empty-wrapper {
  width: 100%; min-height: calc(100vh - var(--status-bar-height) - 90px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  padding: 12px 10px; box-sizing: border-box; position: relative; z-index: 2;
}
.device-list-container { width: 100%; flex: 1; display: flex; flex-direction: column; }

/* ============ 公告条（纸面内、宫格之上） ============ */
.notice-bar {
  display: flex; align-items: center; padding: 6px 12px; margin-top: 10px;
  background: rgba(255, 246, 232, .9); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  transform-origin: top center; animation: showNotice .3s cubic-bezier(.4, 0, .2, 1);
}
@keyframes showNotice { 0% { transform: scale(.95); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.notice-bar .notice-icon { flex-shrink: 0; margin-right: 6px; display: flex; align-items: center; height: 16px; }
.notice-bar .notice-icon [data-icon] { color: var(--orange); display: inline-flex; }
.notice-bar .notice-swiper { flex: 1; height: 16px; overflow: hidden; }
.notice-bar .notice-track {
  display: inline-flex; align-items: center; height: 100%;
  white-space: nowrap; animation: scrollText 10s linear infinite;
}
.notice-bar .notice-item { font-size: 11px; color: var(--muted); line-height: 1; padding-right: 60px; flex-shrink: 0; }
.notice-bar .notice-close {
  flex-shrink: 0; margin-left: 6px; padding: 3px; display: flex; align-items: center;
  height: 16px; color: var(--muted-2); font-size: 11px;
}
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============ 列表底部收尾行「共 N 台设备」 ============ */
.list-status {
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px 10px; font-size: 11px; color: var(--muted-2); line-height: 1.4;
}
.list-status::before, .list-status::after { content: ""; height: .5px; flex: 1; background: rgba(0, 0, 0, .05); }
.list-status::before { margin-right: 12px; }
.list-status::after { margin-left: 12px; }

/* ============ 设备宫格与设备卡（对齐电脑端 .device-card：白卡 + 细边 + 圆角 10 + 轻阴影） ============ */
.device-grid {
  padding: 10px 0 100px; display: grid; gap: 10px; width: 100%;
  grid-template-columns: repeat(2, 1fr); align-items: start; grid-auto-rows: min-content;
}
.device-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
  width: 100%; padding-top: 177.78%; height: 0;
}
.device-card:active { border-color: var(--line-accent); }
.device-card.selected, .device-card.picked {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--grad-soft), var(--shadow-card);
}
.device-card .device-screen {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center; background-color: #0E1420;
}
.device-card .device-screen::after { content: none; }
.device-card .device-screen img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: transform .3s ease, opacity .5s ease;
}
.device-card .device-screen img.loaded { opacity: 1; }
.device-card .device-screen .ph-icon { color: rgba(255, 255, 255, .22); position: relative; z-index: 1; }
.device-card .device-screen .ph-icon svg { width: 40px; height: 40px; }
.device-screen-loading {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center; gap: 5px;
  background: #0E1420;
}
/* 加载动画的 3 个小圆点（原来是字体图标，现在是纯 CSS 圆点） */
.device-screen-loading i {
  width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .4);
  animation: dotpulse 1.4s ease-in-out infinite;
}
.device-screen-loading i:nth-child(2) { animation-delay: .2s; }
.device-screen-loading i:nth-child(3) { animation-delay: .4s; }
@keyframes dotpulse { 0%, 100% { opacity: .4; transform: scale(1); } 50% { opacity: .8; transform: scale(1.2); } }

.device-badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; z-index: 3; }
.device-grid.cols-3 .device-badges, .device-grid.cols-4 .device-badges { display: none; }
/* 徽标：电脑端 .tag / .dc-grant-badge 的取色（浅底 + 深字 + 4px 圆角） */
.badge {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600; line-height: 1.5;
  background: var(--bg-soft); color: var(--muted); white-space: nowrap;
}
.badge.online { background: var(--green-bg); color: var(--green); }
.badge.offline { background: rgba(15, 20, 30, .62); color: #fff; }
/* ★ 我授权出去的（客户要求卡片上标「授权中」）：橙底深字，与电脑端 .dc-grant-badge.out 同色 */
.badge.shared-out { background: #FED7AA; color: #7C2D12; }
/* ★ 别人授权给我的：蓝底深字，与电脑端 .dc-grant-badge.in 同色 */
.badge.shared-in { background: #BFDBFE; color: #1E3A8A; }
.badge.granted { background: #BFDBFE; color: #1E3A8A; }
.badge.expiring { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-line); }

/* 离线：画面盖一层「设备已离线」，缩略图灰掉 */
.device-offline {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #fff; background: rgba(10, 14, 22, .55);
  font-size: clamp(10px, 1.8vw, 12.5px); font-weight: 500; letter-spacing: .5px;
}
.device-offline [data-icon] { color: rgba(255, 255, 255, .92); }
.device-offline svg { width: 22px; height: 22px; }
.device-card:has(.device-offline) .device-screen img { filter: grayscale(1) brightness(.55); }

.device-act {
  position: absolute; top: clamp(6px, 1.5vw, 8px); right: clamp(6px, 1.5vw, 8px);
  display: flex; z-index: 100;
}
.device-act button {
  margin-left: clamp(4px, 1vw, 5px); padding: clamp(5px, 1.2vw, 6px);
  background-color: rgba(0, 0, 0, .5);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); color: #fff;
}
.device-act button:active { transform: scale(.9); }
.device-act button [data-icon] { color: #fff; }
.device-act button svg { width: 14px; height: 14px; }
.device-card.selecting .device-act { display: none; }
.device-check {
  position: absolute; top: clamp(6px, 1.5vw, 8px); right: clamp(6px, 1.5vw, 8px); z-index: 101;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .35);
  display: none; align-items: center; justify-content: center; color: #fff;
}
.device-check svg { width: 12px; height: 12px; stroke-width: 2.6; }
.device-card.selecting .device-check { display: flex; }
.device-card.selected .device-check { background: var(--primary); border-color: var(--primary); }
/* 底部时间条：深色渐变 + 白字（画面内，和图一致） */
.device-info {
  position: absolute; left: 0; bottom: 0; width: 100%; max-height: 35%; overflow: hidden; z-index: 2;
  background: linear-gradient(to top, rgba(10, 14, 22, .82) 0%, rgba(10, 14, 22, .45) 65%, rgba(10, 14, 22, 0) 100%);
  padding: clamp(6px, 1.8vw, 10px) clamp(6px, 1.5vw, 8px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.device-info .nm {
  font-size: clamp(10px, 1.8vw, 12px); color: #fff; font-weight: 600; margin-bottom: 2px;
  line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.device-info .rm {
  font-size: clamp(9px, 1.6vw, 11px); color: rgba(255, 255, 255, .94);
  line-height: 1.2; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.device-info .rm-shared { color: #FED7AA; }
/* 本地备注：贴在画面底部时间上方（蓝底小胶囊，和电脑端 .dc-note 一致） */
.device-remark {
  position: absolute; left: 6px; bottom: 26px; z-index: 3; max-width: calc(100% - 12px);
  padding: 0 6px; height: 16px; line-height: 16px; border-radius: 4px;
  font-size: 10.5px; color: var(--primary); background: rgba(255, 255, 255, .92);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 卡片顶部：设备ID + 角标（左），齿轮（右） */
.device-topline {
  position: absolute; top: 6px; left: 6px; right: 40px; z-index: 3;
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; overflow: hidden;
}
.device-topline .dev-id {
  font-size: clamp(9px, 1.6vw, 11px); font-weight: 600; color: #fff; white-space: nowrap;
  background: rgba(10, 14, 22, .55); padding: 2px 6px; border-radius: 4px;
}
/* 齿轮：电脑端 .dc-gear 同款（深色半透明圆 + 白图标） */
.device-gear {
  position: absolute; top: 6px; right: 6px; z-index: 4;
  width: 28px; height: 28px; min-height: 28px; border-radius: 50%;
  background: rgba(16, 24, 40, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.device-gear svg { width: 15px; height: 15px; }
.device-gear:active { transform: scale(.9); background: var(--primary); }
.device-card.selecting .device-gear { display: none; }
.device-grid.cols-3 .device-gear, .device-grid.cols-4 .device-gear { width: 22px; height: 22px; min-height: 22px; }
.device-grid.cols-3 .device-gear svg, .device-grid.cols-4 .device-gear svg { width: 12px; height: 12px; }
.device-grid.cols-3 .device-topline .dev-id, .device-grid.cols-4 .device-topline .dev-id { display: none; }

/* 设备设置面板（齿轮） */
.dev-menu-id { font-size: 12.5px; color: var(--muted); padding: 2px 2px 10px; }
.dev-menu, .dev-menu-sub { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.dev-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 12px;
  font-size: 14px; color: var(--text); background: var(--card); border-bottom: 1px solid var(--line-2);
}
.dev-menu-item:last-child { border-bottom: none; }
.dev-menu-item:active { background: var(--bg-hover); }
.dev-menu-item > [data-icon]:first-child { color: var(--primary); }
.dev-menu-item > [data-icon]:first-child svg { width: 18px; height: 18px; }
.dev-menu-item .ar { margin-left: auto; color: var(--text-disabled); }
.dev-menu-item .ar svg { width: 16px; height: 16px; }
.dev-menu-item .tip { font-size: 11px; color: var(--muted-2); margin-left: auto; margin-right: 2px; }
.dev-cmd-list { background: var(--bg-subtle, #FAFBFD); border-top: 1px solid var(--line); }
.dev-cmd {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 30px;
  font-size: 13.5px; color: var(--text); border-bottom: 1px solid var(--line-2); min-height: 44px;
}
.dev-cmd:last-child { border-bottom: none; }
.dev-cmd:active { background: var(--bg-hover); }
.dev-cmd [data-icon] { color: var(--primary); }
.dev-cmd svg { width: 15px; height: 15px; }
.dev-cmd-empty { padding: 14px 12px; font-size: 12.5px; color: var(--muted-2); text-align: center; line-height: 1.7; }
.dev-cmd-empty span { font-size: 11.5px; color: var(--text-disabled); }

/* 新增设备卡 */
.add-device-card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--card);
  border: 1px dashed var(--line-strong); width: 100%; padding-top: 177.78%; height: 0;
  display: block; transition: var(--transition);
}
.add-device-card:active { border-color: var(--primary); background: var(--bg-hover); }
.add-device-card .add-content {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.add-device-card .add-icon {
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.add-device-card .add-icon svg { width: 18px; height: 18px; }
.add-device-card .add-text {
  font-size: 11px; color: var(--muted); font-weight: 500; text-align: center;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 5px;
}

/* ============ 空状态（对齐电脑端 .wall-empty / .empty） ============ */
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty p { margin-bottom: 16px; font-size: 13.5px; }
.empty-icon { color: var(--text-disabled); margin-bottom: 12px; display: flex; justify-content: center; }
.empty-icon svg { width: 52px; height: 52px; stroke-width: 1.2; }

/* A：品牌宣传卡（完全无设备）—— 浅色商务风 */
.empty-container {
  width: 100%; flex: 1; display: flex; justify-content: center; align-items: center;
  padding: 16px; box-sizing: border-box;
}
.empty-card {
  width: 100%; max-width: 320px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-xl, 14px); position: relative;
  overflow: hidden; box-shadow: var(--shadow-card);
}
.empty-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad);
}
.empty-card::after { content: none; }
.empty-card-content { position: relative; z-index: 1; padding: 26px 18px; display: flex; flex-direction: column; align-items: center; }
.ec-header { text-align: center; margin-bottom: 22px; }
.ec-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: block; }
.ec-subtitle { font-size: 12.5px; color: var(--muted-2); display: block; letter-spacing: 1px; }
.ec-features { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; }
.ec-features span { font-size: 13.5px; color: var(--muted); letter-spacing: .2px; }
.ec-features span b { font-size: 15px; color: var(--primary); font-weight: 700; margin-right: 5px; }
.ec-btn {
  min-width: 170px; height: 44px; padding: 0 24px;
  background: var(--grad); border: 1px solid transparent;
  border-radius: var(--radius-s); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .28); transition: var(--transition);
}
.ec-btn:active { background: var(--primary-d); }

/* B：当前分组无设备 */
.empty-content {
  width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 16px; box-sizing: border-box; animation: fadein .3s ease;
}
.empty-icon-wrapper {
  width: 72px; height: 72px; border-radius: 20px; background: var(--grad-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  border: 1px solid var(--line-2);
}
.empty-icon-wrapper svg { width: 34px; height: 34px; }
.empty-title { font-size: 17px; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.empty-desc { font-size: 13px; color: var(--muted-2); margin-bottom: 22px; line-height: 1.6; }
.empty-actions { display: flex; gap: 12px; }
.empty-actions .action-btn {
  display: flex; align-items: center; gap: 6px; padding: 0 18px; height: 44px; border-radius: var(--radius-s);
  font-size: 14px; font-weight: 500; transition: var(--transition); border: 1px solid var(--line); background: var(--card); color: var(--text);
}
.empty-actions .action-btn svg { width: 15px; height: 15px; }
.empty-actions .action-btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(47, 111, 235, .28); }
.empty-actions .action-btn.primary:active { background: var(--primary-d); }
.empty-actions .action-btn.secondary { background: var(--grad-soft); border-color: transparent; color: var(--primary); }
.empty-actions .action-btn.secondary:active { background: rgba(47, 111, 235, .16); }
.list-end { text-align: center; color: var(--muted-2); font-size: 12px; padding: 16px 0 4px; }

/* ============ 商城（全屏覆盖页 · 统一浅色商务风） ============ */
#page-store.store-page {
  position: fixed; top: 0; bottom: var(--tabbar-h); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden; animation: slidein .22s ease;
}
.store-page .page-scroll { padding: 0 0 160px; flex: 1; overflow-y: auto; }
.store-page .sub-nav { background: var(--card); border-bottom: 1px solid var(--line); }
.store-page .sub-nav .icon-btn { color: var(--text); }
.store-page .sub-nav .sub-title { color: var(--text); font-size: 15px; font-weight: 600; }
.store-page .sub-nav .balance-chip { color: var(--primary); font-size: 13px; }
.store-page .footer { bottom: 0; }
.store-dark { background: var(--bg); }
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.navbar .nav-left, .navbar .nav-right { width: 34px; display: flex; align-items: center; justify-content: center; }
.navbar .nav-right { justify-content: flex-end; }
.navbar .nav-title { font-size: 15px; color: var(--text); font-weight: 600; }
.navbar .balance-chip { color: var(--primary); font-size: 13px; }
.product-tabs { padding: 0 16px; margin-bottom: 16px; white-space: nowrap; overflow-x: auto; }
.product-tabs .tab-container { display: inline-flex; white-space: nowrap; }
.product-tabs .tab-item {
  position: relative; padding: 8px; margin-right: 4px; font-size: 13px;
  color: var(--muted); font-weight: 500; transition: var(--transition); white-space: nowrap; flex-shrink: 0;
}
.product-tabs .tab-item.active { color: var(--primary); font-weight: 600; }
.product-tabs .tab-item.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 40px; height: 3px; background: var(--grad); border-radius: 1.5px;
}
.pkg-banner { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; margin: 0 16px 16px; position: relative; }
.pkg-banner img { width: 100%; height: 140px; object-fit: cover; display: block; }
.pkg-banner.none { display: none; }
.pkg-empty-tip { padding: 16px; text-align: center; font-size: 13px; color: var(--muted-2); }
.pkg-desc { padding: 0 16px; margin-bottom: 16px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.store-section-title { font-size: 15px; color: var(--text); font-weight: 600; padding: 0 16px 12px; }
.pkg-scroll-inner { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pkg-card {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: var(--transition); overflow: hidden;
}
.pkg-card.active {
  background: var(--card); border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--grad-soft), var(--shadow-card);
}
.pkg-card.active::before { content: none; }
@keyframes shine { 0% { left: -100%; } 100% { left: 100%; } }
.pkg-card:active { background: var(--bg-hover); }
.pkg-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pkg-name { font-size: 14.5px; color: var(--text); font-weight: 600; }
.pkg-specs { font-size: 11.5px; color: var(--muted-2); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.pkg-tag {
  display: inline-block; padding: 2px 8px; background: var(--grad-soft); color: var(--primary);
  font-size: 10.5px; border-radius: 999px; font-weight: 600; width: max-content;
}
.pkg-right { text-align: right; flex: none; position: relative; z-index: 2; }
.pkg-price { font-size: 18px; color: var(--primary); font-weight: 700; }
.pkg-price small { font-size: 12px; }
.pkg-idle { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.pkg-prices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* 适用场景 + 购买须知 */
.games-title { font-size: 14px; color: var(--text); font-weight: 600; margin: 16px 0 8px; text-align: left; padding: 0 16px; }
.recommended-games { margin: 0 16px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.games-grid { display: flex; justify-content: space-between; gap: 10px; }
.game-item {
  width: calc(20% - 8px); height: 0; padding-bottom: calc(20% - 8px); flex-shrink: 0;
  border-radius: var(--radius-s); position: relative; overflow: hidden;
}
.game-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; color: #fff;
}
.game-inner [data-icon] { color: #fff; }
.game-inner svg { width: 18px; height: 18px; }
.game-inner span { font-size: 10px; font-weight: 500; letter-spacing: .5px; line-height: 1; }
.game-item.g1 { background: linear-gradient(135deg, #4E7BE8, var(--primary)); }
.game-item.g2 { background: linear-gradient(135deg, #3F8CE8, #1E5BD6); }
.game-item.g3 { background: linear-gradient(135deg, var(--primary), #1E5BD6); }
.game-item.g4 { background: linear-gradient(135deg, #5A8DF0, #3B6FD8); }
.game-item.g5 { background: linear-gradient(135deg, #6E9BF2, var(--primary)); }
.purchase-notice { margin: 16px 16px 0; }
.notice-title { font-size: 14px; color: var(--text); font-weight: 600; margin-bottom: 8px; text-align: left; }
.notice-content { display: flex; flex-direction: column; gap: 5px; }
.notice-item { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* 商城底部结算条（电脑端：白底 + 细边 + 合计 + 蓝色按钮） */
.footer {
  position: fixed; bottom: var(--tabbar-h); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; height: 66px; padding: 0 16px; box-sizing: border-box;
  background: var(--card); display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); z-index: 46;
  box-shadow: 0 -1px 3px rgba(16, 24, 40, .06);
}
.footer .left .pay-intro { display: flex; align-items: baseline; font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.4; }
.footer .left .price-wrap { display: flex; align-items: flex-end; margin-left: 4px; }
.footer .left .price-wrap .symbol { color: var(--primary); font-size: 13px; font-weight: 600; }
.footer .left .price-wrap .price { color: var(--primary); font-size: 19px; font-weight: 700; }
.footer .left .price-intro { font-size: 11.5px; font-weight: 400; color: var(--muted-2); line-height: 1.4; text-align: left; margin-top: 2px; }
.footer .right .btn {
  width: auto; min-width: 108px; height: 40px; background: var(--grad); border-radius: var(--radius-s);
  font-size: 14px; font-weight: 600; color: #fff; line-height: 1; text-align: center; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .28);
}
.footer .right .btn:active { background: var(--primary-d); }
.footer .right .btn.disabled { background: var(--bg-soft); color: var(--text-disabled); box-shadow: none; pointer-events: none; }

/* 计费类型 / 支付方式标签（浅色商务风） */
.price-chip {
  flex: none; min-width: 76px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; display: inline-flex; flex-direction: column; align-items: stretch;
  text-align: center; transition: var(--transition); min-height: 44px;
}
.price-chip:active { border-color: var(--line-accent); }
.price-chip.selected { background: var(--grad-soft); border-color: var(--primary); box-shadow: 0 0 0 2px var(--grad-soft); }
.price-chip .pc-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.price-chip.selected .pc-name { color: var(--primary); }
.price-chip .pc-price { margin-top: 3px; font-size: 14px; font-weight: 700; color: var(--primary); }
.price-chip .pc-unit { font-size: 10.5px; color: var(--muted-2); }
.price-chip.disabled { opacity: .4; pointer-events: none; }
/* 旧深色面板里的计费类型：统一走浅色（保留选择器以兼容旧结构） */
.sheet.dark .price-chip {
  flex-direction: row; align-items: center; gap: 4px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 14px;
}
.sheet.dark .price-chip.selected { background: var(--grad-soft); border-color: var(--primary); }
.sheet.dark .price-chip .pc-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sheet.dark .price-chip.selected .pc-name { color: var(--primary); }
.sheet.dark .price-chip .pc-price { font-size: 13px; font-weight: 700; color: var(--primary); margin-top: 0; }
.sheet.dark .price-chip .pc-unit { font-size: 10.5px; color: var(--muted-2); }

/* 数量选择器 */
.quantity-selector { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.quantity-title { font-size: 13.5px; color: var(--text); font-weight: 500; }
.quantity-control { display: inline-flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.control-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--primary); font-size: 16px; font-weight: 600; border-radius: 0;
}
.control-btn:active { background: var(--bg-hover); }
.control-btn.disabled { opacity: .4; pointer-events: none; }
.quantity-input {
  width: 64px; height: 40px; line-height: 40px; text-align: center;
  font-size: 15px; color: var(--text); background: var(--card); border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}

/* ============ 订单页 ============ */
.order-page {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 70; background: var(--bg);
  display: flex; flex-direction: column; animation: slidein .22s ease;
}
@keyframes slidein { from { transform: translate(-50%, 0) translateX(100%); } to { transform: translate(-50%, 0); } }
.order-page .order-list { flex: 1; overflow-y: auto; padding: 8px; }
.seg-tabs { display: flex; background: #fff; padding: 2px 16px 0; border-bottom: 1px solid rgba(0, 0, 0, .05); flex: none; }
.seg { padding: 6px 10px; margin-right: 10px; font-size: 13px; color: var(--muted); position: relative; }
.seg:last-child { margin-right: 0; }
.seg.active { color: var(--primary); font-weight: 500; }
.seg.active::after {
  content: ""; position: absolute; bottom: 0; left: 10px; right: 10px; height: 2px;
  background: var(--primary); border-radius: 1px;
}
.card-list { display: flex; flex-direction: column; }
.oc { background: #fff; padding: 16px; margin-bottom: 8px; }
.oc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.oc-name { font-size: 16px; color: var(--text); font-weight: 500; margin-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-sub { font-size: 14px; color: var(--muted); }
.oc-status { font-size: 14px; padding: 2px 8px; border-radius: 2px; font-weight: 400; flex: none; }
.st-billing { color: var(--green); background: rgba(7, 193, 96, .1); }
.st-expired { color: var(--muted); background: rgba(0, 0, 0, .05); }
.st-refunded { color: var(--orange); background: var(--orange-bg); }
.st-pending { color: var(--orange); background: var(--orange-bg); }
.st-paid { color: var(--green); background: rgba(7, 193, 96, .1); }
.st-active { color: var(--green); background: rgba(7, 193, 96, .1); }
.st-revoked { color: var(--red); background: var(--red-bg); }
.st-approved { color: var(--green); background: rgba(7, 193, 96, .1); }
.st-rejected { color: var(--red); background: var(--red-bg); }
.oc-price { font-size: 18px; color: var(--red); font-weight: 500; margin-bottom: 12px; }
.oc-rows, .order-info { border-top: 1px solid var(--line-2); padding-top: 12px; }
.oc-rows div, .info-row { display: flex; font-size: 13px; margin-bottom: 4px; }
.oc-rows div:last-child, .info-row:last-child { margin-bottom: 0; }
.label, .oc-rows .k { color: var(--muted-2); width: 70px; flex: none; }
.value, .oc-rows .v { color: var(--muted); flex: 1; word-break: break-all; }
.value.order-no { color: var(--text); }
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.oc-amount { font-size: 18px; color: var(--red); font-weight: 500; }
.oc-amount.plus { color: var(--green); }
.oc-amount.minus { color: var(--red); }
.oc-btns { display: flex; gap: 8px; }
.oc-btns .btn { height: 32px; font-size: 13px; padding: 0 12px; }
.load-more { text-align: center; color: var(--muted-2); font-size: 13px; padding: 16px 0; }
.empty-state { display: flex; align-items: center; justify-content: center; height: 60vh; }
.empty-state .empty-text { color: var(--muted-2); font-size: 14px; }

/* ============ 我的页（浅色商务风：白卡 + 细边 + 圆角 + 轻阴影） ============ */
.mine-page { background: var(--bg); }
.page-container {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  padding-top: var(--status-bar-height); box-sizing: border-box;
}
.top-bg { position: absolute; top: 0; left: 0; right: 0; height: 160px; overflow: hidden; z-index: 1; }
.top-bg i { position: absolute; top: -60px; width: 200px; height: 200px; border-radius: 50%; }
.top-bg .gradient-left { left: -50px; background: radial-gradient(circle, rgba(47, 111, 235, .07) 0%, rgba(255, 255, 255, 0) 70%); }
.top-bg .gradient-right { right: -50px; background: radial-gradient(circle, rgba(47, 111, 235, .05) 0%, rgba(255, 255, 255, 0) 70%); }
.user-section { position: relative; z-index: 2; padding: 18px 15px 8px; flex-shrink: 0; }
.user-info {
  display: flex; align-items: center; margin-bottom: 14px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow-xs);
  cursor: pointer; transition: var(--transition);
}
.user-info:active { background: var(--bg-hover); border-color: var(--line-accent); }
.user-info .avatar {
  width: 50px; height: 50px; border-radius: 50%; margin-right: 14px; flex: none;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: #fff;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .24);
}
.user-details { flex: 1; min-width: 0; }
.user-details .username { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 5px; display: block; }
.user-details .user-id {
  font-size: 12px; color: var(--muted-2); display: flex; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.verify-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; margin-left: 5px; flex: none; }
.verify-tag.verified { background-color: var(--green-bg); color: var(--green); }
.verify-tag.unverified { background-color: var(--red-bg); color: var(--red); }
.arrow-right { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none; color: var(--text-disabled); }
.arrow-right svg { width: 18px; height: 18px; }

/* 客服横幅 */
.member-card {
  width: 100%; height: 84px; border-radius: var(--radius-l);
  background: linear-gradient(90deg, var(--primary) 0%, #1E5BD6 100%);
  position: relative; overflow: hidden; box-shadow: var(--shadow-card); cursor: pointer;
}
.member-card:active { opacity: .92; }
.member-card-content {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 15px; gap: 8px;
}
.contact-top { display: flex; align-items: center; justify-content: center; width: 100%; }
.fade-line { width: 50px; height: 1px; opacity: .9; }
.fade-line.left { margin-right: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); }
.fade-line.right { margin-left: 8px; background: linear-gradient(270deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); }
.contact-title { font-size: 12px; color: rgba(255, 255, 255, .92); letter-spacing: .5px; }
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 14px; background-color: #fff; border-radius: var(--radius-s); width: 100%; box-sizing: border-box;
}
.contact-btn [data-icon], .contact-btn .btn-text {
  color: var(--primary); font-size: 13px; line-height: 1; font-weight: 600;
}
.contact-btn svg { width: 15px; height: 15px; }
.light-effect { display: none; }
.mine-pending {
  margin: 0 15px 10px; font-size: 12.5px; color: var(--orange);
  background: var(--orange-bg); border: 1px solid var(--orange-line);
  border-radius: var(--radius-s); padding: 8px 10px; position: relative; z-index: 2;
}
.scroll-container { flex: 1; overflow-y: auto; padding-bottom: 60px; position: relative; z-index: 2; }
/* 卡片：电脑端 .card 同款（白底 + 1px 细边 + 圆角 + 轻阴影） */
.features-card {
  margin: 10px 15px 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-xs); position: relative; z-index: 2;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); padding: 12px; }
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px; }
.grid-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 0; border-radius: var(--radius-s); }
.grid-item:active { background: var(--bg-hover); }
.grid-item [data-icon] { margin-bottom: 8px; color: var(--primary); }
.grid-item svg { width: 21px; height: 21px; }
.grid-item span { font-size: 12px; color: var(--text); }

/* 余额 / 充值行 */
.balance-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; }
.balance-left { display: flex; flex-direction: column; gap: 2px; }
.balance-label { font-size: 12px; color: var(--muted-2); }
.balance-value { font-size: 13px; color: var(--muted); }
.balance-value b { font-size: 20px; color: var(--primary); font-weight: 700; }
.balance-btn { height: 38px; min-height: 38px; padding: 0 18px; border-radius: var(--radius-s); background: var(--grad); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(47, 111, 235, .24); }
.balance-btn:active { background: var(--primary-d); }

.settings-card {
  margin: 10px 15px 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-xs); padding: 2px 12px; position: relative; z-index: 2;
}
.list-item {
  display: flex; align-items: center; justify-content: space-between; padding: 0 2px; min-height: 52px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; width: 100%;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--bg-hover); }
.item-left { display: flex; align-items: center; gap: 10px; }
.item-left [data-icon] { color: var(--primary); }
.item-left svg { width: 18px; height: 18px; }
.item-left .item-text { font-size: 14px; color: var(--text); }
.item-right { display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--text-disabled); }
.item-right svg { width: 16px; height: 16px; }
.mine-footer { text-align: center; color: var(--muted-2); font-size: 12px; padding: 10px 0 24px; }

/* ============ 底部标签栏（3 tab / 52px，PC 端导航的高亮蓝） ============ */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 520px; z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  height: var(--tabbar-h); padding: 4px 0 calc(4px + var(--safe-b)); box-sizing: border-box;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -1px 3px rgba(16, 24, 40, .06);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 0; color: var(--muted-2); font-size: 11px; transition: var(--transition); position: relative;
  background: none; border: none;
}
.tab:active { opacity: .8; }
.tab > [data-icon] { margin-bottom: 4px; display: inline-flex; align-items: center; justify-content: center; transition: var(--transition); }
.tab svg { width: 21px; height: 21px; }
.tabbar-text { font-size: 11px; line-height: 1; transition: var(--transition); }
.tab.active { color: var(--primary); }
.tab.active [data-icon] { color: var(--primary); }
.tab.active .tabbar-text { font-weight: 600; }

/* ============ 子页面（白底导航 + 浅底内容） ============ */
.subpage {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 70; background: var(--bg);
  display: flex; flex-direction: column; animation: slidein .22s ease;
}
.sub-nav {
  display: flex; align-items: center; gap: 10px; height: 48px; flex: none;
  padding: 0 12px; padding-top: var(--status-bar-height); box-sizing: content-box;
  border-bottom: 1px solid var(--line); background: var(--card);
}
.sub-nav .icon-btn { background: var(--card); border-color: var(--line); width: 34px; height: 34px; color: var(--muted); }
/* ★ 2026-10-08 页头标题对齐电脑端 .page-head h2（左对齐、16px/700，手机端保持 16 与
   已对齐电脑端的商城店头 .store-title 一致；触摸目标仍 ≥44px，返回键 34px 保留）。
   原来是居中的 15px/600 —— 电脑端所有页面标题都是左对齐，这里统一过来。 */
.sub-title { flex: 1; text-align: left; font-size: 16px; font-weight: 700; color: var(--text); }
.sub-nav-right { flex: none; min-width: 34px; display: flex; align-items: center; justify-content: flex-end; }
.sub-body { flex: 1; overflow-y: auto; padding: 14px; }
.sub-body.no-pad { padding: 0; }

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted-2); flex: none; max-width: 55%; }
.kv .v { text-align: right; word-break: break-all; color: var(--text); flex: 1; font-weight: 500; }
/* 分组标题：带 3px 蓝色渐变竖条（电脑端 .pcard > h3 / .gs-head-title 同款） */
.section-title {
  font-size: 14.5px; color: var(--text); margin: 18px 2px 10px; font-weight: 600;
  display: flex; align-items: center; gap: 9px;
}
.section-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--grad); flex: none;
}
.device-meta { font-size: 12px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.row-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 15px; margin-bottom: 12px; box-shadow: var(--shadow-xs);
}
.row-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--grad-soft); }
.input {
  width: 100%; height: 46px; background: var(--bg-input); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); padding: 0 14px; font-size: 15px; color: var(--text);
}
.input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--grad-soft); }
textarea.input { height: auto; padding: 10px 14px; resize: none; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.select-tip { font-size: 12px; color: var(--muted-2); padding: 0 2px 8px; line-height: 1.6; }
/* 提示块（电脑端 .alert / .hint 同款） */
.hint { font-size: 12.5px; color: var(--muted-2); line-height: 1.7; margin-bottom: 10px; }
.alert { font-size: 13px; line-height: 1.7; border-radius: var(--radius-s); padding: 10px 12px; }
.alert.warn { background: var(--orange-bg); border: 1px solid var(--orange-line); color: var(--orange); }
.alert.err { background: var(--red-bg); border: 1px solid #F0CBC5; color: var(--red); }
.alert b, .hint b { font-weight: 700; }
.dlg-alert { margin: 10px 0 8px; }

/* ============ 控制页（投屏：画面深色，外壳照电脑端浅色） ============ */
.control-body {
  position: fixed; inset: 0; z-index: 75;
  display: flex; flex-direction: column; height: 100%; background: #0E1420;
  --offsetW: 45px; --offsetH: 80px;
}
.control-header {
  flex: none; height: 44px; padding: 0 10px 0 4px; display: flex; align-items: center;
  justify-content: space-between; background: #F6F7F9; border-bottom: 1px solid #E6E8EE; z-index: 5;
}
.control-header .ch-back {
  flex: none; width: 34px; height: 34px; margin-right: 2px; border-radius: var(--radius-s);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); background: transparent;
}
.control-header .ch-back:active { background: rgba(255, 255, 255, .12); }
.control-header .ch-left { display: flex; align-items: center; min-width: 0; flex: 1; }
.control-header .ch-avatar {
  width: 26px; height: 26px; border-radius: var(--radius-xs); flex: none; margin-right: 8px;
  background: var(--grad-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.control-header .ch-avatar svg { width: 15px; height: 15px; }
.control-header .ch-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control-header .ch-right { display: flex; align-items: center; flex: none; }
.ch-quality {
  padding: 5px 12px; background: var(--card); border-radius: var(--radius-xs);
  border: 1px solid var(--line); font-size: 12.5px; color: var(--text); min-height: 32px;
}
.ch-quality:active { background: var(--bg-hover); border-color: var(--line-accent); }
.ch-quality.ok { background: var(--green-bg); border-color: #BFE6D2; color: var(--green); }
/* 大屏顶栏：设备 ID（可点复制，不加图标）+ 延迟 */
.control-header .ch-name { cursor: pointer; }
.control-header .ch-name:active { opacity: .7; }
.ch-ping {
  margin-left: 8px; font-size: 11.5px; white-space: nowrap; flex: none;
  font-variant-numeric: tabular-nums;
}
.ch-ping.good { color: var(--green); }
.ch-ping.mid { color: #B45309; }
.ch-ping.bad { color: var(--red); }

/* 实时帧率：显示在「投屏中」左边 */
.ch-fps {
  margin-right: 6px; font-size: 11.5px; color: var(--muted); min-width: 46px; text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ch-fps.idle { opacity: .7; }   /* 画面静止时显示的是档位帧率，淡一点区分 */
.ch-latency {
  min-width: 50px; margin-left: 6px; font-size: 11.5px; background: var(--bg-soft);
  border: 1px solid var(--line-2);
  padding: 3px 6px; border-radius: var(--radius-xs);
  text-align: center; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 38vw;
}
/* 主区：画面贴左（不留黑边）+ 右侧工具栏吃掉剩余宽度，按钮加大好点 */
.control-main { flex: 1; display: flex; min-height: 0; background: #000; justify-content: flex-start; }
.control-frame-wrap { flex: none; position: relative; overflow: hidden; background: #000; min-width: 0; }
.control-frame-wrap iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: none; background: #000; }
.control-frame-wrap canvas.ctrl-canvas { position: absolute; left: 0; top: 0; background: #000; touch-action: none; display: block; }
/* ---- 云盘（我的云盘页） ---- */
.disk-stats { display: flex; gap: 8px; margin-bottom: 10px; }
.disk-stat { flex: 1; min-width: 0; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; }
.disk-stat b { display: block; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disk-stat span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.disk-progress { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin: 10px 0 0; }
/* 云盘容量进度条（内层 i 是填充条，不是图标） */
.disk-progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s ease; }
.disk-file .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mini-btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12.5px; }
.mini-btn.primary { border-color: rgba(47, 111, 235, .45); color: var(--primary); background: rgba(47, 111, 235, .06); }
.mini-btn.danger { border-color: rgba(229, 77, 77, .35); color: var(--red); }
.mini-btn:active { transform: scale(.97); }
/* 卡片小屏实时预览：铺满卡片（不留黑边、不虚化；上下各裁掉一点） */
/* （旧的深色 .control-side / .control-loading / .control-error / .control-offline 已由下面的浅色版本取代） */
/* 底部按钮行：对齐领袖云 .footer（图标 .8em / opacity .7 / 按下 #4e5553 圆角 50px） */
/* 底部按钮行（对齐电脑端右侧按键条：浅灰底 + 白底方形按钮 + 细边） */
.control-footer {
  flex: none; width: 100%; min-height: 48px; display: flex; align-items: center;
  background: #F6F7F9; border-top: 1px solid #E6E8EE; padding-bottom: var(--safe-b);
}
.control-footer .fw {
  flex-grow: 1; flex-basis: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 7px 2px; transition: var(--transition); color: var(--muted-2);
}
.control-footer .fw:active { background: var(--bg-hover); border-radius: 8px; }
.control-footer .fw [data-icon] { color: #3A4049; display: inline-flex; }
.control-footer .fw svg { width: 17px; height: 17px; }
.control-footer .fw span { font-size: 10px; color: var(--muted-2); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 右侧按键条（对齐电脑端 .ls-side） */
.control-side {
  flex: 1 1 auto; min-width: 45px; height: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 6px; padding: 8px 0; overflow-y: auto; overflow-x: hidden;
  background: #F6F7F9; border-left: 1px solid #E6E8EE;
  scrollbar-width: none;
}
.control-side::-webkit-scrollbar { display: none; }
.control-side .side-group { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 6px; }
.control-side .side-top, .control-side .side-bot { flex: none; }
.control-side .side-mid { flex: 1 1 auto; justify-content: center; overflow-y: auto; scrollbar-width: none; }
.control-side .side-mid::-webkit-scrollbar { display: none; }
.control-side .sd:focus, .control-side .sd:focus-visible { outline: none; }
.control-side .sd {
  flex: none; width: 100%; max-width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 0; border-radius: 8px; color: #3A4049; background: #fff;
  border: 1px solid #D8DBE2; transition: var(--transition);
}
.control-side .sd [data-icon] { color: #3A4049; display: inline-flex; }
.control-side .sd svg { width: 17px; height: 17px; }
.control-side .sd span { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.control-side .sd:active { transform: scale(.96); }
.control-side .sd.pri { background: var(--primary); border-color: var(--primary); }
.control-side .sd.pri [data-icon], .control-side .sd.pri span { color: #fff; }
.control-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #98A2B3; background: #0E1420; z-index: 2;
}
.control-loading .loading-spinner { display: flex; align-items: center; justify-content: center; gap: 8px; }
.control-loading .spinner-dot {
  width: 12px; height: 12px; background-color: var(--primary); border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out; margin: 0;
}
.control-loading .spinner-dot:nth-child(1) { animation-delay: -.32s; }
.control-loading .spinner-dot:nth-child(2) { animation-delay: -.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.control-loading .loading-text { margin-top: 16px; color: #98A2B3; font-size: 13.5px; font-weight: 500; }
.control-error {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: #98A2B3; background: #0E1420; z-index: 3; text-align: center; padding: 20px;
}
/* 设备离线：大屏画面区显示「设备已离线」 */
.control-offline {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: #0E1420; color: #fff; text-align: center; padding: 20px;
}
.control-offline [data-icon] { color: rgba(255, 255, 255, .4); }
.control-offline svg { width: 42px; height: 42px; }
.control-offline span { font-size: 15.5px; font-weight: 500; letter-spacing: .5px; }
.control-offline em { font-style: normal; font-size: 12.5px; color: rgba(255, 255, 255, .42); }
.control-offline .btn { margin-top: 8px; }

/* 全屏模式：隐藏我方顶栏/底栏，投屏画面占满整屏 */
.ctrl-exit { display: none; }
.ctrl-immersive .sub-nav,
.ctrl-immersive .control-header,
.ctrl-immersive .control-footer { display: none !important; }
.ctrl-immersive .control-body { position: fixed; inset: 0; z-index: 90; }
.ctrl-immersive .ctrl-exit {
  display: inline-flex; align-items: center; gap: 6px;
  position: fixed; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 95;
  padding: 8px 14px; border-radius: 999px; font-size: 12.5px; color: #fff;
  background: rgba(0, 0, 0, .62); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}

/* ============ 弹层 ============ */
/* ============ 同步操控（群控） ============ */
.batchbar-actions [data-action="batch-sync"].on {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
/* 死规则已清理（字体图标时代遗留）：.batchbar-actions [data-action="batch-sync"].on  */
.batchbar-tip { font-size: 11.5px; color: var(--muted-2); margin-left: auto; padding-right: 4px; text-align: right; max-width: 62%; line-height: 1.35; }
/* 卡片左上角勾选框（只在同步操控开启时显示） */
.card-pick {
  position: absolute; top: 6px; left: 6px; z-index: 12; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, .45); border: 1.5px solid rgba(255, 255, 255, .85);
  display: none; align-items: center; justify-content: center; color: #fff; font-size: 13px;
}
body.sync-mode .card-pick { display: flex; }
/* 同步操控与批量管理互斥：非批量模式下隐藏批量勾选，避免一张卡片两个勾选框 */
body.sync-mode:not(.batch-mode) .device-check { display: none !important; }
.device-card.picked .card-pick { background: var(--primary); border-color: #fff; }
body.sync-mode .device-card.picked { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 8px; }
/* 同步状态条 */
.sync-bar {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; padding: 9px 12px;
  background: rgba(47, 111, 235, .08); border: 1px solid rgba(47, 111, 235, .25); border-radius: 10px;
}
.sync-bar.hidden { display: none; }
.sync-ico { color: var(--primary); font-size: 17px; display: inline-flex; }
.sync-text { min-width: 0; flex: 1; }
.sync-text b { display: block; font-size: 13px; color: var(--text); }
.sync-text em { display: block; font-style: normal; font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.sync-num { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sync-num b { color: var(--primary); font-size: 13px; }
.sync-exit {
  flex: none; height: 28px; padding: 0 10px; border-radius: 7px; font-size: 12px;
  background: #fff; border: 1px solid rgba(47, 111, 235, .35); color: var(--primary);
}
.ctrl-sync-bar {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 11.5px;
  color: #cfe0ff; background: rgba(47, 111, 235, .28); border-bottom: 1px solid rgba(47, 111, 235, .35);
}
.ctrl-sync-bar svg { width: 14px; height: 14px; }

/* ============ 设备备注 + 工单 ============ */
/* 设备备注：贴在卡片画面底部（时间文案上方）的白色小胶囊 —— 与上面的 .device-remark 同一条规则，
   这里不再重复定义（原来这里又写了一遍居中的深色胶囊，把上面的样式覆盖掉了）。 */
/* 备注前不再加 emoji 前缀 */
.modal-remark {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  margin-top: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-subtle, #FAFBFD);
  border: 1px solid var(--line-2); color: var(--text); font-size: 13px;
}
.modal-remark .mr-label { color: var(--muted-2); flex: none; }
.modal-remark .mr-value { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-remark .mr-edit { color: var(--primary); flex: none; }
.modal-remark [data-icon]:first-child { color: var(--primary); }
.modal-remark svg { width: 16px; height: 16px; }
.modal-remark:active { background: var(--bg-hover); }
/* 工单 */
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: #6b7280; }
.tk-item { cursor: pointer; }
.tk-item:active { background: #f7f9fc; }
.tk-id { font-size: 11px; color: var(--muted-2); font-weight: 400; margin-left: 4px; }
.tk-reply { color: var(--primary); }
.tk-detail-text { font-size: 13.5px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.tk-reply-card { border-left: 3px solid rgba(47, 111, 235, .5); }
.tk-reply-meta { font-size: 11.5px; color: var(--muted-2); margin-bottom: 6px; }

/* 我的页：头像用后台下发的 logo（没有才用首字母） */
#mine-avatar.has-logo { background: #fff; overflow: hidden; padding: 0; }
#mine-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
#mine-avatar:not(.has-logo) img { display: none; }
/* 状态文字不换行（"免认证/未认证"） */
#page-mine .list-item .item-right { white-space: nowrap; flex: none; display: flex; align-items: center; gap: 4px; }

/* ============ 选择设备行（转移/授权/续费 等弹窗里的设备选择） ============ */
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 8px;
  border: 1px solid #E3E8EF; border-radius: 12px; background: #fff; transition: all .18s ease;
}
.pick-row:active { transform: scale(.995); }
.pick-row.selected { border-color: var(--primary); background: #F5F8FF; box-shadow: 0 0 0 2px rgba(47, 111, 235, .08); }
.pick-check {
  width: 20px; height: 20px; flex: none; border: 1.5px solid #C9D2E0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 13px; line-height: 1;
}
.pick-row.selected .pick-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.pick-main { flex: 1; min-width: 0; }
.pick-title { font-size: 14px; font-weight: 600; color: #1F2430; }
.pick-sub {
  margin-top: 2px; font-size: 11.5px; color: #8A909C;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-row .badge { flex: none; }
/* 授权中的设备：锁定不可选 */
.pick-row.locked { opacity: .6; background: #FAFBFC; }
.pick-row.locked .pick-check { border-style: dashed; color: var(--muted-2); }

/* 被分享设备卡片底部：显示的是「分享剩余」时间（不是设备租期） */
.device-info .rm.rm-shared { color: #FED7AA; }

/* 设备搜索：顶栏下方独立一行，右对齐在 ☰ 按钮正下方 */
.home-searchbar {
  position: relative; z-index: 12; display: flex; justify-content: flex-end;
  padding: 0 12px 8px;
}
.home-searchbar .hs-inner {
  display: flex; align-items: center; gap: 6px; width: 200px; max-width: 62vw;
  height: 34px; padding: 0 6px 0 10px; background: #fff; border-radius: 9px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.home-searchbar .hs-inner [data-icon], .home-searchbar .hs-inner svg { color: var(--muted-2); flex: none; }
.home-searchbar input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none;
  font-size: 12.5px; color: #1F2430;
}
.home-searchbar input::placeholder { color: #A8AEB8; }
.home-searchbar .hs-btn {
  flex: none; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--primary);
  color: #fff; font-size: 12px;
}
/* 弹窗里的设备搜索（转移 / 分享设备） */
.pick-search { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.pick-search input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid #E3E8EF;
  border-radius: 10px; background: #fff; font-size: 13px; color: #1F2430; outline: none;
}
.pick-search input:focus { border-color: var(--primary); }
.pick-empty { padding: 18px 0; text-align: center; color: var(--muted-2); font-size: 12.5px; }

/* 子页里的分组小标题（授权列表：我授权出去的 / 别人授权给我的） */
.sub-sec-title { margin: 6px 2px 8px; font-size: 13px; font-weight: 600; color: #1F2430; }
.sub-sec-title:not(:first-child) { margin-top: 18px; }
.sub-sec-title em { display: block; margin-top: 3px; font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--muted-2); }

/* 被分享设备：禁用态按钮 + 规则提示 */
.btn.disabled, #home-batchbar button.disabled { opacity: .45; pointer-events: auto; }
#home-batchbar button.disabled:active { background: none; }
.modal-note.note-warn { background: var(--orange-bg); border: 1px solid var(--orange-line); color: var(--orange); border-radius: 9px; padding: 8px 10px; }
.modal-tile.locked { opacity: .55; }

/* ============ 实名认证 ============ */
.realname-bar {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; padding: 9px 12px;
  background: var(--orange-bg); border: 1px solid var(--orange-line); border-radius: 10px; color: var(--orange); font-size: 12.5px;
}
.realname-bar.hidden { display: none; }
.realname-bar [data-icon] { flex: none; }
.realname-bar span { flex: 1; min-width: 0; }
.realname-bar button { flex: none; height: 28px; padding: 0 12px; border-radius: 7px; background: var(--orange); color: #fff; font-size: 12px; }
.tk-warn { padding: 9px 12px; border-radius: 9px; background: var(--orange-bg); border: 1px solid var(--orange-line); color: var(--orange); font-size: 12.5px; margin-bottom: 12px; }
.tk-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tk-check input { width: 16px; height: 16px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.tk-pkg { margin-bottom: 8px; }
.tk-pkg-title { font-size: 12.5px; color: #1F2430; font-weight: 600; margin: 6px 0; }
.tk-pkg-title em { font-style: normal; font-weight: 400; color: #8A909C; margin-left: 6px; font-size: 11.5px; }
.tk-shots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk-shot {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 7px;
  background: var(--bg-soft); color: var(--muted); font-size: 11.5px;
}
.tk-shot em { font-style: normal; color: var(--primary); }
.tk-shot button { color: var(--muted-2); font-size: 14px; line-height: 1; }

/* ---------- 居中弹窗（设备设置等）—— 对齐电脑端 dialog：白底 + 细边 + 圆角 14 + 大阴影 ---------- */
#modal-mask { z-index: 78; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96);
  width: min(92vw, 380px); max-height: 80vh; z-index: 79;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl, 14px);
  box-shadow: var(--shadow-xl, 0 24px 60px rgba(16, 24, 40, .3));
  display: flex; flex-direction: column; overflow: hidden; opacity: 0;
}
.modal.in { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: transform .18s ease, opacity .18s ease; }
.modal.wide { width: min(94vw, 460px); }
.modal-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-close {
  width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--bg-soft); color: var(--muted-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close svg { width: 15px; height: 15px; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 6px; }
.modal-foot { flex: none; padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line-2); background: var(--bg-subtle, #FAFBFD); }
.modal-foot.hidden { display: none; }
/* 设备信息条 */
.modal-dev { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-subtle, #FAFBFD); border: 1px solid var(--line-2); border-radius: var(--radius); }
.modal-dev-ico {
  width: 34px; height: 34px; border-radius: var(--radius-s); flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-soft); color: var(--primary);
}
.modal-dev-ico svg { width: 18px; height: 18px; }
.modal-dev-meta { min-width: 0; }
.modal-dev-meta b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.modal-dev-meta span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.modal-dev-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-disabled); }
.modal-dev-meta .dot.on { background: var(--green); }
.modal-note { margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-s); background: var(--bg-tint); color: var(--primary); font-size: 11.5px; line-height: 1.6; }
.modal-note b { font-weight: 700; }
/* 功能宫格：对齐电脑端 .ops-grid / .ops-tile */
.modal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.modal-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px 4px;
  min-height: 76px; border-radius: var(--radius); background: var(--card); color: var(--text);
  font-size: 12px; line-height: 1.25; text-align: center;
  border: 1px solid var(--line); transition: var(--transition);
}
.modal-tile [data-icon] { color: var(--primary); }
.modal-tile svg { width: 19px; height: 19px; }
.modal-tile span { font-weight: 500; }
.modal-tile em { font-style: normal; font-size: 10px; color: var(--muted-2); }
.modal-tile:active { background: var(--bg-hover); border-color: var(--line-accent); }
.modal-tile.locked { opacity: .55; color: var(--muted-2); border-style: dashed; background: var(--bg-subtle, #FAFBFD); }
.modal-tile.locked [data-icon] { color: var(--text-disabled); }
/* 指令区 */
.modal-cmds { margin-top: 14px; }
.modal-cmds-title {
  font-size: 12.5px; color: var(--text); font-weight: 600; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.modal-cmds-title::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--grad); flex: none; }
.modal-cmd-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-cmd {
  display: inline-flex; align-items: center; gap: 5px; height: 38px; min-height: 38px; padding: 0 13px;
  border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 12.5px;
}
.modal-cmd [data-icon] { color: var(--primary); }
.modal-cmd svg { width: 14px; height: 14px; }
.modal-cmd:active { background: var(--bg-hover); border-color: var(--line-accent); }
/* CDK 兑换 */
.modal-btn-row { display: flex; gap: 8px; }
.modal-btn-row .btn { flex: 1; }
.cdk-info { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); font-size: 12.5px; }
.cdk-info.hidden { display: none; }
.cdk-info.ok { background: var(--green-bg); color: var(--green); }
.cdk-info.err { background: var(--red-bg); color: var(--red); }
.cdk-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.cdk-row span { color: var(--muted-2); flex: none; }
.cdk-info.ok .cdk-row span, .cdk-info.err .cdk-row span { color: inherit; opacity: .75; }
.cdk-row b { font-weight: 600; text-align: right; word-break: break-all; }
.cdk-verdict { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); font-weight: 600; line-height: 1.5; }

.mask {
  position: fixed; inset: 0; background: rgba(16, 20, 28, .45);
  z-index: 80; animation: fadein .18s ease;
}
.mask.dark { background: rgba(16, 20, 28, .55); z-index: 2000; }
/* 弹层：手机端保留"底部上滑"的移动特性；视觉（白底/圆角/细边/阴影）与电脑端弹窗统一 */
.sheet {
  position: fixed; left: 50%; top: 46%; bottom: auto; transform: translate(-50%, -50%); z-index: 81;
  width: min(94vw, 440px); max-width: 94vw; max-height: 80vh; max-height: 78dvh;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl, 14px);
  display: flex; flex-direction: column;
  animation: sheetpop .2s ease; padding-bottom: 0;
  box-shadow: var(--shadow-xl, 0 24px 60px rgba(16, 24, 40, .3)); overflow: hidden;
}
@keyframes sheetpop { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.sheet-handle { display: none; }
.sheet-head {
  position: relative; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-2); flex: none;
}
.sheet-title { font-size: 15px; font-weight: 600; color: var(--text); display: inline-block; padding: 0 32px 0 12px; position: relative; }
/* 弹层标题前的 3px 蓝色渐变竖条（电脑端 .pcard > h3 同款） */
.sheet-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px; border-radius: 2px; background: var(--grad);
}
.sheet-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); border-radius: var(--radius-xs); background: var(--bg-soft);
}
.sheet-close svg { width: 15px; height: 15px; }
.sheet-close:active { background: var(--line); }
.sheet-body { overflow-y: auto; padding: 14px 16px 16px; }
.sheet-body > .row-card { padding: 0; border: none; box-shadow: none; margin-bottom: 4px; }
.sheet-foot {
  display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line-2); background: var(--bg-subtle, #FAFBFD); flex: none;
}
.sheet-foot-left { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }

/* 深色购买面板：统一改成浅色商务风（保留 .dark 类名以兼容旧调用，视觉不再走深色） */
.sheet.dark {
  background: #fff; border-radius: var(--radius-xl, 14px); z-index: 2001; max-height: 80vh;
  animation: sheetpop .2s ease-out; box-shadow: var(--shadow-xl, 0 24px 60px rgba(16, 24, 40, .3)); padding-bottom: 0;
}
.sheet.dark .sheet-head { padding: 14px 16px; border-bottom: 1px solid var(--line-2); text-align: left; }
.sheet.dark .sheet-title { font-size: 15px; font-weight: 600; color: var(--text); padding: 0 32px 0 12px; }
.sheet.dark .sheet-close {
  width: 28px; height: 28px; right: 12px; background: var(--bg-soft);
  border-radius: var(--radius-xs); color: var(--muted-2);
}
.sheet.dark .sheet-close:active { background: var(--line); transform: translateY(-50%); }
.sheet.dark .sheet-body { padding: 14px 16px; }
.sheet.dark .order-details { padding: 0 0 12px; border-bottom: 1px solid var(--line-2); }
.sheet.dark .detail-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.sheet.dark .detail-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.sheet.dark .detail-item:last-child { border-bottom: none; }
.sheet.dark .detail-label { font-size: 13.5px; color: var(--muted-2); }
.sheet.dark .detail-value { font-size: 13.5px; color: var(--text); font-weight: 500; }
.sheet.dark .detail-item.total { border-top: 1px solid var(--line-2); border-bottom: none; padding-top: 12px; margin-top: 8px; }
.sheet.dark .detail-item.total .detail-value { font-size: 16px; font-weight: 700; color: var(--primary); }
.sheet.dark .payment-methods { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.sheet.dark .method-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.sheet.dark .method-list { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 0; }
.sheet.dark .pkg-prices { gap: 8px; margin-top: 0; padding: 0; }
.sheet.dark .quantity-selector { margin: 14px 0; }
.sheet.dark .form-label { color: var(--text); font-weight: 500; margin: 0 0 8px; font-size: 13px; }
.sheet.dark .select-tip { color: var(--muted-2); margin: 10px 0 0; }
.sheet.dark .input, .sheet.dark select.input {
  width: 100%; margin: 0; background: var(--bg-input); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
}
.sheet.dark .row-card { background: transparent; padding: 0; }
.sheet.dark .kv { border-bottom: 1px solid var(--line-2); }
.sheet.dark .kv .k { color: var(--muted-2); }
.sheet.dark .kv .v { color: var(--text); }
.sheet.dark .sheet-foot { margin: 0; padding: 12px 16px calc(14px + var(--safe-b)); background: var(--bg-subtle, #FAFBFD); border-top: 1px solid var(--line-2); }
.sheet.dark .sheet-foot-left { color: var(--muted); font-size: 13.5px; }
.sheet.dark .sheet-foot-left b { color: var(--primary); font-size: 16px; font-weight: 700; }
.sheet.dark .btn-primary {
  height: 44px; border-radius: var(--radius-s); background: var(--grad); color: #fff;
  font-size: 15px; font-weight: 600; box-shadow: 0 2px 8px rgba(47, 111, 235, .28);
}
.sheet.dark .btn-primary:active { background: var(--primary-d); }
.sheet.dark .pay-qr { border-color: var(--line); background: #fff; }

/* 支付方式列表（浅色商务风） */
.method-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.method-item {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; transition: var(--transition);
}
.method-item.selected { border-color: var(--primary); background: var(--grad-soft); box-shadow: 0 0 0 2px var(--grad-soft); }
.method-item img, .method-item .mi-ico { width: 34px; height: 34px; border-radius: var(--radius-s); object-fit: cover; flex: none; }
.mi-ico { background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; }
.mi-ico svg { width: 18px; height: 18px; }
.method-item .mi-name { font-size: 14px; font-weight: 600; color: var(--text); }
.method-item .mi-sub { font-size: 12px; color: var(--muted-2); }
.method-item .mi-check { margin-left: auto; color: var(--primary); visibility: hidden; }
.method-item .mi-check svg { width: 18px; height: 18px; }
.method-item.selected .mi-check { visibility: visible; }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tier {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 6px; text-align: center; transition: var(--transition);
}
.tier.selected { border-color: var(--primary); background: var(--grad-soft); box-shadow: 0 0 0 2px var(--grad-soft); }
.tier .t-num { font-size: 17px; font-weight: 700; color: var(--primary); }
.tier .t-num::before { content: "¥"; font-size: 12px; margin-right: 1px; }
.tier .t-label { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.amount-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; height: 50px; }
.amount-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--grad-soft); }
.amount-row .cur { font-size: 18px; font-weight: 700; color: var(--primary); }
.amount-row input { flex: 1; height: 100%; font-size: 16px; font-weight: 600; }

.pay-qr-wrap { text-align: center; padding: 6px 0 2px; }
.pay-qr {
  width: 200px; height: 200px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  padding: 10px; display: inline-flex; align-items: center; justify-content: center; margin: 10px auto;
}
.pay-qr img { width: 100%; height: 100%; display: block; border-radius: var(--radius-xs); }
.pay-amount { font-size: 26px; font-weight: 800; color: var(--primary); margin: 14px 0 4px; }
.pay-tip { font-size: 13px; color: var(--muted-2); margin: 10px 0 15px; }
.pay-countdown { margin-top: 10px; font-size: 12.5px; color: var(--primary); }
.pay-channel-badge { display: inline-block; margin-top: 8px; font-size: 12px; color: #fff; padding: 3px 12px; border-radius: 999px; }
.pay-channel-badge.alipay { background: #1677ff; }
.pay-channel-badge.wechat { background: var(--green); }
.close-button {
  width: 120px; height: 40px; line-height: 40px; background: var(--bg-soft);
  border: 1px solid var(--line-2); border-radius: var(--radius-s); font-size: 14px; color: var(--muted);
  margin: 0 auto; text-align: center;
}
.close-button:active { background: var(--line-2); }

/* ============ 对话框（对齐电脑端 dialog：白底 + 细边 + 圆角 14；确定键蓝色/危险时红色） ============ */
.dialog {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 82;
  width: 340px; max-width: calc(100% - 40px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl, 14px); overflow: hidden;
  box-shadow: var(--shadow-xl, 0 24px 60px rgba(16, 24, 40, .3)); animation: modalpop .18s ease;
}
@keyframes modalpop { from { transform: translate(-50%, -50%) scale(.94); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.dialog-icon { display: none; }
.dialog-title {
  font-size: 15px; font-weight: 600; color: var(--text); padding: 16px 18px 10px;
  text-align: left; border-bottom: 1px solid var(--line-2);
}
.dialog-msg {
  font-size: 13.5px; color: var(--muted); line-height: 1.7; padding: 12px 18px 16px;
  text-align: left; word-break: break-word; white-space: pre-line; max-height: 56vh; overflow-y: auto;
}
.dialog-btns { display: flex; gap: 10px; border-top: 1px solid var(--line-2); padding: 12px 18px 16px; background: var(--bg-subtle, #FAFBFD); }
.dialog-btns .btn {
  flex: 1; height: 42px; font-size: 14px; font-weight: 500; border-radius: var(--radius-s);
  margin: 0; padding: 0; transition: var(--transition);
}
.dialog-btns .btn-plain { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.dialog-btns .btn-plain:active { background: var(--bg-soft); }
.dialog-btns .btn-primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.dialog-btns .btn-primary:active { background: var(--primary-d); }
/* ★ 二次确认的「确定」：红色 + 倒计时期间 disabled（电脑端 .btn.danger 同款） */
.dialog-btns .btn-danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.dialog-btns .btn-danger:active:not(:disabled) { background: var(--red-d); border-color: var(--red-d); }
.dialog-btns .btn-danger:disabled { background: var(--red); border-color: var(--red); color: #fff; opacity: .45; cursor: not-allowed; }
.dialog-msg .hint { margin-bottom: 0; }

/* ============ Toast / Loading ============ */
.toast {
  position: fixed; left: 50%; top: 14vh; transform: translateX(-50%); z-index: 99;
  background: rgba(20, 24, 32, .92); color: #fff; border-radius: var(--radius-s); padding: 10px 18px;
  font-size: 13px; max-width: 84%; text-align: center; box-shadow: 0 8px 24px rgba(16, 24, 40, .28);
  animation: toastin .2s ease; white-space: pre-line; line-height: 1.6;
}
@keyframes toastin { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.toast.ok { background: rgba(26, 127, 75, .96); }
.toast.err { background: rgba(214, 69, 69, .96); }
.toast.warn { background: rgba(194, 65, 12, .96); }
.loading {
  position: fixed; inset: 0; z-index: 95; background: rgba(245, 247, 250, .62);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.loading .spinner {
  margin: 0; width: 26px; height: 26px; border: 2.5px solid var(--grad-soft); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite; background: none;
}
.loading .spinner::before, .loading .spinner::after { content: none; }
.loading #loading-text { margin-top: 16px; color: var(--primary); font-size: 13.5px; font-weight: 500; }

.skeleton { border-radius: var(--radius-s); background: linear-gradient(90deg, #EEF1F6 25%, #E3E8EF 50%, #EEF1F6 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (min-width: 521px) {
  .page-scroll { padding-left: 14px; padding-right: 14px; }
  .store-dark .page-scroll { padding-left: 0; padding-right: 0; }
}

/* ============================================================
   购买界面 · 电脑端极简商务风重写（主色蓝 var(--primary)，浅色锁定）
   覆盖范围：商城页（.store-pc）+ 购买/充值/支付弹层（.sheet.pc）
   ============================================================ */

/* ---------- 商城页 ---------- */
#page-store.store-pc { background: #F5F7FA; }
.store-pc .store-head {
  display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 12px;
  background: #EEF2F8; border-bottom: 1px solid #D8DFEA;
  position: sticky; top: 0; z-index: 5; flex: none;
}
.store-pc .store-head .icon-btn { color: #1F2430; font-size: 20px; }
.store-pc .store-title { flex: 1; font-size: 16px; font-weight: 700; color: #1F2430; }
.store-pc .balance-chip {
  background: var(--primary); color: #fff; border: none; border-radius: 999px;
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.store-pc .store-scroll {
  padding: 14px 12px 170px; flex: 1; overflow-y: auto;
  background-image: radial-gradient(circle at 1px 1px, rgba(16, 24, 40, .05) 1px, transparent 0);
  background-size: 20px 20px;
}
.store-pc .pcard {
  background: #fff; border: 1px solid #E3E8EF; border-radius: 14px;
  padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.store-pc .pcard h3 {
  margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: #1F2430;
  display: flex; align-items: center; gap: 9px;
}
.store-pc .pcard h3::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(135deg, var(--primary), #1E5BD6); flex: none;
}
.store-pc .hint { color: #8A909C; font-size: 12.5px; margin-bottom: 12px; line-height: 1.5; }
.store-pc .tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #F3F5F9; color: #5A6272; font-size: 10.5px; margin-left: 6px;
}
.store-pc .tag.accent { background: rgba(47, 111, 235, .08); color: var(--primary); }

/* 套餐卡（2 列） */
.store-pc .pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.store-pc .ptile {
  border: 1px solid #E3E8EF; border-radius: 10px; padding: 12px;
  background: #fff; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.store-pc .ptile:active { transform: scale(.98); }
.store-pc .ptile.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(47, 111, 235, .08), 0 2px 8px rgba(47, 111, 235, .12);
}
.store-pc .ptile-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.store-pc .pt-ico {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #F3F5F9; color: #5A6272; font-size: 16px;
}
.store-pc .ptile.active .pt-ico { background: rgba(47, 111, 235, .08); color: var(--primary); }
.store-pc .ptile-head .nm { font-size: 13.5px; font-weight: 600; color: #1F2430; }
.store-pc .ptile .sub { color: #8A909C; font-size: 11px; margin-top: 3px; line-height: 1.4; }
.store-pc .ptile .stock {
  display: inline-flex; align-items: center; gap: 6px;
  color: #1A7F4B; font-size: 11.5px; margin-top: 6px;
}
.store-pc .ptile .stock::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #1A7F4B; box-shadow: 0 0 0 3px #E5F7EE;
}
.store-pc .ptile .stock.no { color: #D64545; }
.store-pc .ptile .stock.no::before { background: #D64545; box-shadow: 0 0 0 3px #FDECEC; }

/* 规格条（2 列） */
.store-pc .specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.store-pc .specs > div {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: linear-gradient(135deg, #F8FAFD 0%, #F1F5FB 100%);
  border: 1px solid #EEF1F6; border-radius: 8px; font-size: 12px;
}
.store-pc .specs > div .k { color: #8A909C; flex: none; }
.store-pc .specs > div .v {
  margin-left: auto; color: #1F2430; font-weight: 600; text-align: right;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.store-pc .specs > div .v.accent { color: var(--primary); }

/* 计费类型（2 列价格卡） */
/* 计费类型：手机上 3 列一排（1天/7天/30天），与电脑端一致，避免第三档落单 */
.store-pc .price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.store-pc .ptile.center { text-align: center; padding: 12px 6px; }
.store-pc .ptile.center .t { font-size: 12px; color: #8A909C; }
.store-pc .ptile.center .p { font-size: 17px; font-weight: 700; margin-top: 4px; color: #1F2430; }
.store-pc .ptile.center.active .p { color: var(--primary); }

/* 台数步进器 */
.store-pc .qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.store-pc .qty-row .lbl { font-size: 13px; color: #1F2430; font-weight: 600; }
.store-pc .qty-ctl { display: inline-flex; align-items: center; border: 1px solid #E3E8EF; border-radius: 8px; overflow: hidden; background: #fff; }
.store-pc .qty-ctl button { width: 34px; height: 32px; border: 0; background: #fff; color: var(--primary); font-size: 16px; line-height: 1; }
.store-pc .qty-ctl button:active { background: #F0F5FF; }
.store-pc .qty-ctl .qty-num { min-width: 38px; text-align: center; font-size: 14px; font-weight: 600; color: #1F2430; }
/* 套餐预览图（对齐电脑端：居中、contain、描边圆角） */
.store-pc .plan-preview {
  display: block; margin: 12px auto 14px; width: auto; max-width: 100%; max-height: 220px;
  object-fit: contain; border: 1px solid #E3E8EF; border-radius: 10px; background: #fff;
}
/* 付款方式（对齐电脑端 .pay-list）：手机上一行一个，标签左、说明右，不再挤成两列折行 */
.store-pc .pay-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.store-pc .pay {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 50px;
  border: 1px solid #E3E8EF; border-radius: 10px; background: #fff; transition: all .2s ease;
}
.store-pc .pay.active { border-color: var(--primary); background: #F5F8FF; box-shadow: 0 0 0 2px rgba(47, 111, 235, .08); }
.store-pc .pay:active { transform: scale(.99); }
.store-pc .pay .lb {
  font-size: 13.5px; font-weight: 600; color: #1F2430; line-height: 1.35;
  min-width: 0; word-break: break-word;
}
.store-pc .pay .scene { margin-left: auto; flex: none; font-size: 11.5px; color: #8A909C; white-space: nowrap; }
/* 合计 + 立即购买（对齐电脑端同一行） */
.store-pc .buy-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.store-pc .buy-row .total { font-size: 13px; color: #5A6272; }
.store-pc .buy-row .total b { color: var(--primary); font-size: 18px; margin-left: 2px; }
.store-pc .buy-row .btn { margin-left: auto; padding: 10px 22px; border-radius: 10px; }

/* 购买须知 */
.store-pc .purchase-notice .notice-item { font-size: 12.5px; color: #5A6272; line-height: 1.9; }

/* 底部结算条 */
.store-foot {
  background: #fff; border-top: 1px solid #E3E8EF;
  box-shadow: 0 -4px 16px rgba(16, 24, 40, .06);
}
.store-foot .left { min-width: 0; flex: 1; }
.store-foot .left .pay-intro { color: #1F2430; font-weight: 500; }
.store-foot .left .price-wrap .symbol { color: var(--primary); }
.store-foot .left .price-wrap .price { color: var(--primary); font-size: 18px; font-weight: 700; }
.store-foot .left .price-intro { color: #8A909C; }
.store-foot .right { flex: none; }
.store-foot .right .btn {
  width: auto; min-width: 92px; height: 38px; line-height: 38px; padding: 0 16px;
  white-space: nowrap; font-size: 14px;
  background: linear-gradient(135deg, var(--primary), #1E5BD6); color: #fff; border: none;
  border-radius: 10px; font-weight: 600; text-align: center;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .28);
}
.store-foot .right .btn:active { background: linear-gradient(135deg, #1E5BD6, #1749AC); }
.store-foot .right .btn.disabled { background: #C9D3E4; color: #7A8699; box-shadow: none; }

/* ---------- 浅色商务弹层（购买 / 充值 / 支付） ---------- */
.sheet.pc { background: #F5F7FA; }
.sheet.pc .sheet-head { border-bottom: 1px solid #E3E8EF; background: #fff; }
.sheet.pc .sheet-title { color: #1F2430; font-weight: 600; }
.sheet.pc .sheet-foot { background: #fff; border-top: 1px solid #E3E8EF; }
.sheet.pc .btn-primary {
  background: linear-gradient(135deg, var(--primary), #1E5BD6); color: #fff; border: none;
  height: 42px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(47, 111, 235, .28);
}
.sheet.pc .btn-primary:active { background: linear-gradient(135deg, #1E5BD6, #1749AC); }
.sheet.pc .btn-plain { background: #fff; border: 1px solid #E3E8EF; color: #5A6272; }

/* 订单明细 */
.sheet.pc .order-details { padding: 4px 2px 6px; }
.sheet.pc .detail-title { font-size: 14px; font-weight: 600; color: #1F2430; margin-bottom: 10px; }
.sheet.pc .detail-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #EEF1F6;
}
.sheet.pc .detail-item:last-child { border-bottom: none; }
.sheet.pc .detail-label { font-size: 13.5px; color: #8A909C; }
.sheet.pc .detail-value { font-size: 13.5px; color: #1F2430; }
.sheet.pc .detail-item.total { border-top: 1px solid #E3E8EF; border-bottom: none; padding-top: 12px; margin-top: 8px; }
.sheet.pc .detail-item.total .detail-value { font-size: 18px; font-weight: 700; color: var(--primary); }

/* 计费类型 chips（购买弹层） */
.sheet.pc .payment-methods { margin-top: 14px; }
.sheet.pc .method-title { font-size: 14px; font-weight: 600; color: #1F2430; margin-bottom: 10px; }
.sheet.pc .pkg-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet.pc .price-chip {
  background: #fff; border: 1px solid #E3E8EF; border-radius: 10px;
  padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 3px;
}
.sheet.pc .price-chip.selected {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 2px rgba(47, 111, 235, .08);
}
.sheet.pc .price-chip .pc-name { font-size: 12.5px; font-weight: 600; color: #1F2430; }
.sheet.pc .price-chip .pc-price { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 0; }
.sheet.pc .price-chip .pc-unit { font-size: 10px; color: #8A909C; }

/* 台数 / 指定设备 */
.sheet.pc .quantity-selector { margin: 14px 0 6px; display: flex; align-items: center; justify-content: space-between; }
.sheet.pc .quantity-title { font-size: 13.5px; color: #1F2430; font-weight: 600; }
.sheet.pc .quantity-control { background: #fff; border: 1px solid #E3E8EF; border-radius: 8px; }
.sheet.pc .control-btn { background: #fff; color: var(--primary); }
.sheet.pc .control-btn:active { background: #F0F5FF; }
.sheet.pc .quantity-input { color: #1F2430; }
.sheet.pc .form-label { color: #1F2430; font-weight: 600; }
.sheet.pc .input { background: #fff; border-color: #E3E8EF; color: #1F2430; }
.sheet.pc .select-tip { color: #8A909C; }

/* 充值弹层 */
.sheet.pc .section-title { font-size: 14px; font-weight: 600; color: #1F2430; }
.sheet.pc .tier { background: #fff; border: 1px solid #E3E8EF; border-radius: 10px; }
.sheet.pc .tier.selected { border-color: var(--primary); background: rgba(47, 111, 235, .05); }
.sheet.pc .tier .t-num { color: #1F2430; }
.sheet.pc .tier.selected .t-num { color: var(--primary); }
.sheet.pc .tier .t-label { color: #8A909C; }
.sheet.pc .amount-row { background: #fff; border: 1px solid #E3E8EF; border-radius: 10px; }

/* 支付弹窗 */
.sheet.pc .pay-qr-wrap { padding: 4px 0; }
.sheet.pc .pay-qr { border: 1px solid #E3E8EF; background: #fff; }
.sheet.pc .pay-amount { color: var(--primary); }
.sheet.pc .pay-tip { color: #8A909C; }
.sheet.pc .pay-countdown { color: var(--primary); }
