/* ============================================================
   云手机 · 手机网页端
   设计规格对齐「领袖云手机」H5（1rem = 16px 基准，数值取参考站实测值）
   浅色主题 + #1877f2 主色 + 深色商城
   ============================================================ */
:root {
  --bg: #f6f5f8;
  --bg-2: #f8f9fa;
  --card: #ffffff;
  --line: #f0f0f0;
  --line-2: #eee;
  --line-3: #f5f5f5;
  --text: #333;
  --muted: #666;
  --muted-2: #999;
  --primary: #1877f2;
  --primary-d: #2b5fda;
  --grad: linear-gradient(135deg, #1877f2, #2b5fda);
  --grad-soft: rgba(24, 119, 242, .1);
  --glass: rgba(255, 255, 255, .15);
  --active-bg: #f0f8ff;
  --gold: #f4d03f;
  --gold-d: #c08026;
  --cream: #fbf1db;
  --cream-d: #f0e4b8;
  --red: #ff4d4f;
  --price: #ff6b6b;
  --green: #52c41a;
  --orange: #ffa940;
  --radius: 12px;
  --radius-s: 8px;
  --radius-xs: 4px;
  --status-bar-height: 0px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(45px + var(--safe-b));
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
#app { position: relative; width: 100%; max-width: 520px; min-height: 100%; margin: 0 auto; overflow: hidden; background: var(--bg); }
.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: #999; }
::-webkit-scrollbar { width: 0; height: 0; }

[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] i { line-height: 1; font-style: normal; }
.splash-logo i { font-size: 44px; }

/* ============ 启动页 ============ */
.splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, #e6f0ff 0%, #f5faff 25%, #fafcff 50%, #ffffff 100%);
}
.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 8px 24px rgba(24, 119, 242, .35); animation: float 2.4s ease-in-out infinite;
}
.splash-name { margin-top: 18px; font-size: 22px; font-weight: 600; letter-spacing: 2px; color: #1a1a1a; }
.splash-sub { margin-top: 6px; color: var(--muted); font-size: 13px; letter-spacing: 3px; }
.spinner {
  margin-top: 34px; width: 22px; height: 22px;
  border: 3px solid rgba(24, 119, 242, .2); 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(-10px); } }

/* ============ 登录页 ============ */
.auth {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: linear-gradient(to bottom, #e6f0ff 0%, #f5faff 25%, #fafcff 50%, #ffffff 100%);
}
.auth-body { max-width: 520px; margin: 0 auto; padding: calc(var(--status-bar-height) + 60px) 20px 20px; }
/* 「关于我们」子页面用的品牌图标底 */
.auth-logo-fallback {
  width: 32px; height: 32px; border-radius: 8px; background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none;
}
.auth-logo-fallback i { font-size: 17px; line-height: 1; }

/* 参考站登录页：无 logo 块、无玻璃卡；页头直接是欢迎标题 + 副标题 */
.page-header { margin-bottom: 50px; }
.welcome-title { display: block; font-size: 24px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; letter-spacing: .5px; }
.welcome-subtitle { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; }

.auth-card { position: relative; }
.form-group { margin-bottom: 20px; }
.form-group .label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.form-label { display: block; font-size: 14px; color: #333; font-weight: 500; line-height: 1; margin-bottom: 8px; }
.label-row .form-label { margin-bottom: 0; }
.switch-btn { font-size: 13px; color: var(--muted-2); padding: 4px 0; line-height: 1; }
.field { position: relative; display: flex; align-items: center; }
.form-input, .field input {
  width: 100%; height: 48px; background: #f0f2f5; border: 1px solid transparent;
  border-radius: 8px; padding: 0 16px; font-size: 15px; color: #333; transition: all .3s ease;
}
.form-input:focus, .field input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24, 119, 242, .1); }
.field input { padding-right: 40px; }
.field-eye {
  position: absolute; right: 16px; font-size: 18px; color: var(--muted-2);
  cursor: pointer; transition: color .3s ease; display: inline-flex;
}
.field-eye:active { color: var(--primary); }
.sms-input-group { display: flex; gap: 10px; align-items: center; }
.sms-input-group .field { flex: 1; }
.sms-btn {
  width: 100px; height: 48px; flex: none; background: var(--primary); color: #fff;
  font-size: 13px; border-radius: 8px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; transition: all .3s ease;
}
.sms-btn:active:not(:disabled) { transform: scale(.96); opacity: .9; }
.sms-btn:disabled { background: #ccc; color: #999; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px; padding: 0 18px; height: 46px;
  font-size: 15px; font-weight: 600; transition: all .2s ease;
}
.btn:active { transform: scale(.98); opacity: .9; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-d); }
.btn-outline { background: transparent; border: 1px solid #d5dbe4; color: var(--text); font-weight: 500; }
.btn-plain { background: #f0f2f5; color: var(--muted); font-weight: 500; }
.btn-mini { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: linear-gradient(135deg, #ff4d4f, #ff7875); color: #fff; }
.btn-gold { background: var(--gold); color: #333; font-weight: 600; }
.login-btn, .auth-card .btn-block {
  width: 100%; height: 48px; font-size: 16px; font-weight: 600; border-radius: 8px;
  background: var(--primary); color: #fff; box-shadow: none; margin-top: 10px;
}
.login-btn:active:not(.loading), .auth-card .btn-block:active:not(.loading) { transform: scale(.98); opacity: .9; }
.login-btn.loading { opacity: .8; background: #999; }
.agreement-section { margin: 24px 0 0; }
.agreement-checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox-circle {
  width: 14px; height: 14px; flex: none; border: 1px solid var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: all .3s ease;
  background: var(--primary);
}
.checkbox-circle i { color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }
.agreement-text { font-size: 13px; color: var(--muted); line-height: 1.6; flex: 1; }
.agreement-text a { color: var(--primary); font-weight: 500; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--muted-2); }
.auth-links a { color: var(--primary); }
.auth-links.center { justify-content: center; gap: 4px; }

/* ============ 主框架 ============ */
.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); }
/* 公告页（tab2）：用订单页语言（白卡 / 直角 / 16px 内距） */
.notice-page { background: #f6f5f8; padding: 0; }
.notice-list { padding: 8px 8px calc(var(--tabbar-h) + 8px); }

/* ============ 公告页（对齐领袖云 .discovery） ============ */
.discovery { min-height: 100%; display: flex; flex-direction: column; background: #f6f5f8; padding-bottom: calc(var(--tabbar-h) + 8px); }
.discovery-header {
  background: #fff; padding: 12px 16px 10px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.discovery-header .dh-title { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 2px; }
.read-all {
  padding: 3px 8px; border-radius: 4px; background: rgba(37, 99, 235, .1);
  color: #2563eb; font-size: 11px; line-height: 1.5; flex: none;
}
.read-all:active { background: rgba(37, 99, 235, .18); }
/* 轮播 160px */
.swiper-container { position: relative; width: 100%; height: 160px; background: #fff; 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: linear-gradient(135deg, #1877f2, #2b5fda);
}
.swiper-slide:nth-child(2) { background: linear-gradient(135deg, #7c4dff, #4a3aff); }
.swiper-slide:nth-child(3) { background: linear-gradient(135deg, #ff7043, #ff4d4f); }
.swiper-slide.active { opacity: 1; }
.swiper-slide .ss-title { font-size: 20px; 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: #fff; padding: 2px 16px; border-bottom: 1px solid rgba(0, 0, 0, .05);
  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: 6px 10px; margin-right: 10px;
  font-size: 13px; color: #666; white-space: nowrap; flex: none;
}
.category-item:last-child { margin-right: 0; }
.category-item.active { color: #2563eb; font-weight: 500; }
.category-item .active-bar {
  position: absolute; bottom: 0; left: 10px; right: 10px; height: 2px;
  background: #2563eb; border-radius: 1px;
}
/* 图文列表 */
.article-list-content { padding: 12px 16px; }
.article-item {
  background: #fff; border-radius: 4px; margin-bottom: 10px; overflow: hidden;
  display: flex; align-items: flex-start;
}
.article-item:active { background: #fafbfc; }
.article-thumb {
  width: 80px; height: 80px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eaf1ff, #dbe8ff); color: #2563eb; font-size: 26px;
}
.article-info { flex: 1; min-width: 0; padding: 8px; display: flex; flex-direction: column; }
.article-title {
  font-size: 14px; color: #1a1a1a; font-weight: 400; margin-bottom: 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-desc {
  font-size: 11px; color: #666; 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: #ff4d4f; margin-left: 5px; vertical-align: middle;
}
.list-status { padding: 12px 16px; text-align: center; font-size: 11px; color: #999; }
.article-body .ab-cat { font-size: 11px; color: #2563eb; margin-bottom: 8px; }
.article-body .ab-line { font-size: 13px; color: #333; 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 10px 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(--bg);
}
.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: 8px; position: relative;
  background: rgba(255, 255, 255, .15); padding: 6px 12px; border-radius: 25px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); max-width: 52vw;
}
.top-header .left:active { background: rgba(255, 255, 255, .3); }
.top-header .left .title {
  font-size: 14px; font-weight: 500; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-header .left .caret { color: #333; font-size: 11px; display: inline-flex; transition: transform .2s ease; }
.top-header .right { display: flex; align-items: center; gap: 10px; }
.batch-renew-btn, .pill-btn.blue {
  height: 20px; padding: 0 10px; background: var(--primary); color: #fff; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500; line-height: 1; transition: all .2s ease; flex: none;
}
.batch-renew-btn:active, .pill-btn.blue:active { transform: scale(.97); background: var(--primary-d); }
.pill-btn {
  height: 20px; padding: 0 10px; border-radius: 999px; font-size: 10px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; font-size: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .15); color: #333;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: all .3s ease; position: relative;
}
.icon-btn:active { transform: scale(.95); background: rgba(255, 255, 255, .25); }
.balance-chip {
  display: inline-flex; align-items: center; gap: 4px; background: none; color: var(--primary);
  border-radius: 999px; padding: 0; font-size: 12px; 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: rgba(255, 255, 255, .98); padding: 12px;
  border-radius: 0 0 12.5px 12.5px; box-shadow: 0 20px 40px rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-sizing: border-box;
  animation: fadein .2s ease;
}
.search-input-wrapper {
  position: relative; display: flex; align-items: center;
  background: #f5f5f5; border-radius: 12.5px; padding: 0 10px; height: 40px;
}
.search-input-wrapper > [data-icon] { color: #999; font-size: 14px; margin-right: 8px; }
.search-input-wrapper input { flex: 1; background: transparent; font-size: 14px; color: #333; height: 100%; }
.clear-btn {
  width: 20px; height: 20px; border-radius: 50%; background: #ddd; color: #666;
  display: flex; align-items: center; justify-content: center; margin-left: 8px; font-size: 10px; flex: none;
}
.clear-btn:active { transform: scale(.95); background: #ccc; }
/* 批量管理底部操作栏（固定贴底，位于底部导航之上） */
.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: #fff; border-radius: 14px 14px 0 0;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .1);
  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: 26px; height: 26px; border-radius: 50%; background: #f2f3f5; color: #666;
  display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none;
}
.batchbar-close:active { background: #e6e8eb; }
.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: 9px 14px; border-radius: 10px; background: #f5f6f8; border: 1px solid #eef0f3;
  font-size: 13px; color: #333; font-weight: 500; transition: all .2s ease;
}
.batchbar-actions button:active { background: #eaf1ff; border-color: #cfe0ff; transform: scale(.97); }
.batchbar-actions button > i { font-size: 15px; color: var(--primary); font-style: normal; display: inline-flex; }
.batch-text { font-size: 13px; font-weight: 500; color: #333; }

/* ============ 下拉菜单 ============ */
.dropdown-mask { position: fixed; inset: 0; z-index: 55; background: transparent; }
.dropdown { position: absolute; top: 35px; z-index: 56; animation: dropin .2s ease; }
@keyframes dropin { from { opacity: 0; transform: translateY(-5px); } 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: 170px; background: #fff; border-radius: 8px; padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15); margin-top: 4px;
}
.dropdown.right > .dropdown-menu::after {
  content: ""; position: absolute; top: -3px; right: 12px; width: 6px; height: 6px;
  background: #fff; transform: rotate(45deg); box-shadow: -1px -1px 2.5px rgba(0, 0, 0, .05);
}
.dropdown-item {
  height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: #333; border-radius: 6px; text-align: left; width: 100%; white-space: nowrap;
  transition: all .2s ease; position: relative; z-index: 5;
}
.dropdown-tag {
  margin-left: auto; flex: none; font-size: 9.5px; line-height: 1; padding: 3px 5px; border-radius: 4px;
  background: rgba(47, 111, 235, .1); color: var(--primary, #2f6feb); white-space: nowrap;
}
/* 三条杠下拉下方的「设备 ID 查找」输入框（尾部放大镜，与菜单右对齐） */
.dropdown-search {
  display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 4px 4px 10px;
  width: 200px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: 9px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.dropdown-search input {
  flex: 1; min-width: 0; height: 34px; border: 0; outline: none; background: transparent;
  font-size: 13px; color: #1a1f27;
}
.dropdown-search input::placeholder { color: #9aa0a8; }
.dropdown-search-btn {
  flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--primary, #2f6feb); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.dropdown-search-btn:active { transform: scale(.95); }
.dropdown-item i { color: #666; font-style: normal; display: inline-flex; font-size: 18px; flex: none; }
.dropdown-item:active { background: #f5f5f5; }
.dropdown-item.active { background: var(--active-bg); color: var(--primary); }
.dropdown-item.active i { color: var(--primary); }
.group-arrow {
  position: absolute; top: -4px; left: 12px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff;
  filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, .06)); z-index: 2;
}
.group-list {
  position: relative; width: 140px; background: #fff; border-radius: 6px; padding: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15); margin-top: 4px; max-height: 240px; overflow-y: auto;
}
.group-item {
  padding: 8px 12px; height: 24px; display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: #333; position: relative; z-index: 5; transition: all .2s; text-align: left; width: 100%;
}
.group-item:first-child { border-radius: 6px 6px 0 0; }
.group-item:last-child { border-radius: 0 0 6px 6px; }
.group-item:only-child { border-radius: 6px; }
.group-item > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.group-item:active { background-color: #f5f5f5; }
.group-item.active { color: var(--primary); background-color: var(--active-bg); }
/* 自定义分组行：名称 + 台数 + 删除叉号 */
.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-color: var(--active-bg); }
.group-del {
  flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: #c2c6cc; font-size: 15px; border-radius: 6px;
}
.group-del:active { background: rgba(255, 77, 79, .12); color: #ff4d4f; }
.group-row.active .group-del { color: #9aa3b0; }
/* 套餐自动分组：只读（锁图标） */
.group-lock {
  flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: #b9bfc9; font-size: 13px;
}
.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: #333; border-top: .5px solid #f0f0f0; }
.group-item.add-group i { color: var(--primary); font-size: 12px; font-style: normal; }
.group-item.add-group:active { background-color: var(--active-bg); }

/* ============ 首页白色纸面容器 ============ */
.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: linear-gradient(to bottom, #ffffff, #f6f5f8);
  border-radius: 22.5px 22.5px 0 0;
  box-shadow: rgba(14, 30, 37, .12) 0 2px 4px, rgba(14, 30, 37, .32) 0 2px 6px;
  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 i { color: #ffa41b; font-size: 12px; line-height: 1; }
.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: #666; 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: #999; 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: #999; 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-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: clamp(8px, 2vmin, 12px); overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .05);
  transition: all .3s cubic-bezier(.4, 0, .2, 1); transform: translateY(0) scale(1);
  background-color: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  width: 100%; padding-top: 177.78%; height: 0; border: 1px solid rgba(255, 255, 255, .1);
}
.device-card:active {
  transform: translateY(2px) scale(.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}
.device-card .device-screen {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center; background-color: #000;
}
.device-card .device-screen::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, .1); pointer-events: 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 { font-size: 44px; color: rgba(255, 255, 255, .25); position: relative; z-index: 1; }
.device-screen-loading {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
}
.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; }
/* 3/4 列宫格下空间不足：隐藏状态徽标（参考站设备卡本身也没有徽标） */
.device-grid.cols-3 .device-badges, .device-grid.cols-4 .device-badges { display: none; }
.badge {
  font-size: 10px; padding: 1px 5px; border-radius: 4px; font-weight: 600; line-height: 1.4;
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff;
}
.badge.online { background: rgba(82, 196, 26, .85); }
.badge.offline { background: rgba(90, 90, 96, .92); }
.badge.shared-out { background: rgba(255, 164, 27, .92); }   /* 我分享出去的 */
.badge.shared-in { background: rgba(124, 77, 255, .92); }    /* 别人分享给我的 */

/* 离线：画面盖一层「设备已离线」，缩略图灰掉 */
.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(0, 0, 0, .55);
  font-size: clamp(10px, 1.8vw, 12.5px); font-weight: 500; letter-spacing: .5px;
}
.device-offline i { font-size: clamp(18px, 3.6vw, 24px); color: rgba(255, 255, 255, .92); }
.device-card:has(.device-offline) .device-screen img { filter: grayscale(1) brightness(.55); }
.badge.granted { background: rgba(24, 119, 242, .85); }
.badge.expiring { background: rgba(255, 164, 27, .9); }

.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);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all .2s ease; color: #fff;
}
.device-act button:active { transform: scale(.9); }
.device-act button i { color: #fff; font-size: clamp(12px, 2.2vw, 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, .6); background: rgba(0, 0, 0, .35);
  display: none; align-items: center; justify-content: center; color: #fff; font-size: 13px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.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(0, 0, 0, .75) 0%, rgba(0, 0, 0, .5) 60%, rgba(0, 0, 0, 0) 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: clamp(6px, 1.8vw, 10px) clamp(6px, 1.5vw, 8px);
  display: flex; flex-direction: column; justify-content: flex-end;
  transform: translateY(0); transition: transform .3s ease;
}
.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;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}
.device-info .rm {
  font-size: clamp(9px, 1.6vw, 11px); color: rgba(255, 255, 255, .92);
  line-height: 1.2; font-weight: 500; text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}

/* 卡片顶部：设备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(0, 0, 0, .42); padding: 2px 6px; border-radius: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); backdrop-filter: blur(3px);
}
.device-gear {
  position: absolute; top: 6px; right: 6px; z-index: 4;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px);
  color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.device-gear:active { transform: scale(.9); background: rgba(0, 0, 0, .68); }
.device-card.selecting .device-gear { display: none; }
/* 3/4 列宫格：齿轮缩小、设备ID隐藏（离线遮罩仍显示） */
.device-grid.cols-3 .device-gear, .device-grid.cols-4 .device-gear { width: 20px; height: 20px; font-size: 11px; }
.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: 10px; overflow: hidden; margin-bottom: 12px; }
.dev-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 12px;
  font-size: 14.5px; color: var(--text); background: #fff; border-bottom: 1px solid var(--line);
}
.dev-menu-item:last-child { border-bottom: none; }
.dev-menu-item:active { background: #f7f8fa; }
.dev-menu-item > i:first-child { font-size: 18px; color: var(--primary); }
.dev-menu-item .ar { margin-left: auto; color: #c8ccd4; font-size: 17px; }
.dev-menu-item .tip { font-size: 11px; color: var(--muted-2); margin-left: auto; margin-right: 2px; }
.dev-cmd-list { background: #fafbfc; 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 #f2f3f5;
}
.dev-cmd:last-child { border-bottom: none; }
.dev-cmd:active { background: #f0f2f5; }
.dev-cmd i { font-size: 14px; color: var(--primary); }
.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: #b9bfc9; }

/* 新增设备卡 */
.add-device-card {
  position: relative; border-radius: 8px; overflow: hidden; background: #fff;
  border: 1px dashed #dee2e6; width: 100%; padding-top: 177.78%; height: 0;
  display: block; transition: all .3s ease;
}
.add-device-card:active { transform: scale(.98); border-color: #adb5bd; }
.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: 35px; height: 35px; border-radius: 50%; background: rgba(255, 255, 255, .9);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 10px;
}
.add-device-card .add-text {
  font-size: 10px; color: #6c757d; font-weight: 500; text-align: center;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 5px;
}

/* ============ 空状态 ============ */
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty p { margin-bottom: 16px; font-size: 14px; }
.empty-icon { font-size: 52px; color: #c3cad6; margin-bottom: 12px; }

/* 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: 290px; background: #fff; border-radius: 12px; position: relative;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.empty-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(160deg, #1b2a4a 0%, #101828 55%, #070c16 100%);
}
.empty-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .5) 100%);
}
.empty-card-content { position: relative; z-index: 1; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; }
.ec-header { text-align: center; margin-bottom: 32px; }
.ec-title { font-size: 22px; font-weight: 600; color: #fff; margin-bottom: 6px; display: block; letter-spacing: 1px; }
.ec-subtitle { font-size: 13px; color: rgba(255, 255, 255, .9); display: block; letter-spacing: 2px; }
.ec-features { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 32px; }
.ec-features span { font-size: 15px; color: rgba(255, 255, 255, .85); letter-spacing: .5px; }
.ec-features span b { font-size: 17px; color: #fff; font-weight: 600; margin-right: 5px; letter-spacing: .5px; }
.ec-btn {
  min-width: 160px; height: 42px; padding: 0 24px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 21px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 1px;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); transition: all .3s ease;
}
.ec-btn:active { transform: scale(.98); background: rgba(255, 255, 255, .2); }

/* 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: 80px; height: 80px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(24, 119, 242, .25);
}
.empty-icon-wrapper i { font-size: 40px; color: #fff; }
.empty-title { font-size: 18px; color: #333; font-weight: 600; margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.empty-actions { display: flex; gap: 12px; }
.empty-actions .action-btn {
  display: flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 12.5px;
  font-size: 14px; font-weight: 500; transition: all .3s ease;
}
.empty-actions .action-btn i { font-size: 12px; font-style: normal; }
.empty-actions .action-btn.primary { background: var(--grad); color: #fff; box-shadow: 0 4px 8px rgba(24, 119, 242, .25); }
.empty-actions .action-btn.primary:active { transform: scale(.98); box-shadow: 0 2px 4px rgba(24, 119, 242, .15); }
.empty-actions .action-btn.secondary { background: rgba(24, 119, 242, .1); color: var(--primary); }
.empty-actions .action-btn.secondary:active { transform: scale(.98); background: rgba(24, 119, 242, .15); }
.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: #242424;
  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: #242424; border-bottom: none; }
.store-page .sub-nav .icon-btn { color: #fff; font-size: 24px; }
.store-page .sub-nav .sub-title { color: #fff; font-size: 15px; font-weight: 500; }
.store-page .sub-nav .balance-chip { color: var(--gold); font-size: 12px; }
.store-page .footer { bottom: 0; }
.store-dark { background: #242424; }
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 16px; background: #242424;
  position: sticky; top: 0; z-index: 10;
}
.navbar .nav-left, .navbar .nav-right { width: 30px; display: flex; align-items: center; justify-content: center; }
.navbar .nav-right { justify-content: flex-end; }
.navbar .nav-title { font-size: 15px; color: #fff; font-weight: 500; }
.navbar .balance-chip { color: var(--gold); font-size: 12px; }
.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: 6px 8px; margin-right: 4px; font-size: 12px;
  color: var(--gold); font-weight: 500; transition: all .3s ease; white-space: nowrap; flex-shrink: 0;
}
.product-tabs .tab-item.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 40px; height: 3px; background: var(--gold); border-radius: 1.5px;
}
.pkg-banner { border-radius: 8px; background: #2a2a2a; 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: #9a9a9a; }
.pkg-desc { padding: 0 16px; margin-bottom: 16px; font-size: 13px; color: #fff; line-height: 1.6; opacity: .8; }
.store-section-title { font-size: 16px; color: #fff; font-weight: 500; 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(--cream); border-radius: 8px;
  border: 1px solid transparent; transition: all .3s ease; overflow: hidden;
}
.pkg-card.active {
  background: var(--cream-d); transform: scale(1.02); border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(244, 208, 63, .3);
}
.pkg-card.active::before {
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  animation: shine 2s infinite;
}
@keyframes shine { 0% { left: -100%; } 100% { left: 100%; } }
.pkg-card:active { background: var(--cream-d); }
.pkg-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pkg-name { font-size: 15px; color: #333; font-weight: 500; }
.pkg-specs { font-size: 11px; color: #8a7f5e; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.pkg-tag {
  display: inline-block; padding: 2px 6px; background: #ffd700; color: #fff;
  font-size: 10px; border-radius: 8px; font-weight: 500; width: max-content;
}
.pkg-right { text-align: right; flex: none; position: relative; z-index: 2; }
.pkg-price { font-size: 18px; color: var(--price); font-weight: 600; }
.pkg-price small { font-size: 12px; }
.pkg-idle { font-size: 10.5px; color: #8a7f5e; margin-top: 2px; }
.pkg-prices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* 适用场景 + 购买须知 */
.games-title { font-size: 14px; color: #fff; font-weight: 600; margin: 16px 0 8px; text-align: left; padding: 0 16px; }
.recommended-games { margin: 0 16px; padding: 16px; background: rgba(255, 255, 255, .1); border-radius: 8px; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.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: 10px; 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 i { font-size: 18px; line-height: 1; }
.game-inner span { font-size: 10px; font-weight: 500; letter-spacing: 1px; line-height: 1; }
.game-item.g1 { background: linear-gradient(135deg, #2b5876, #4e4376); }
.game-item.g2 { background: linear-gradient(135deg, #cc7b19, #8a5a0b); }
.game-item.g3 { background: linear-gradient(135deg, #1d4350, #2f7f8f); }
.game-item.g4 { background: linear-gradient(135deg, #41295a, #6d3b8f); }
.game-item.g5 { background: linear-gradient(135deg, #3b4b2f, #5c7a3d); }
.purchase-notice { margin: 16px 16px 0; }
.notice-title { font-size: 14px; color: #fff; font-weight: 600; margin-bottom: 8px; text-align: left; }
.notice-content { display: flex; flex-direction: column; gap: 4px; }
.notice-item { font-size: 10px; color: rgba(255, 255, 255, .6); line-height: 1.4; }

/* 商城底部结算条（60px #333 + 金色按钮） */
.footer {
  position: fixed; bottom: var(--tabbar-h); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; height: 60px; padding: 0 16px; box-sizing: border-box;
  background: #333333; display: flex; justify-content: space-between; align-items: center;
  border-top: .5px solid #444444; z-index: 46;
}
.footer .left .pay-intro { display: flex; align-items: baseline; font-size: 13px; font-weight: 500; color: #fff; line-height: 1.4; }
.footer .left .price-wrap { display: flex; align-items: flex-end; margin-left: 4px; }
.footer .left .price-wrap .symbol { color: var(--gold-d); font-size: 13px; font-weight: 400; }
.footer .left .price-wrap .price { color: var(--gold-d); font-size: 16px; font-weight: 600; }
.footer .left .price-intro { font-size: 12px; font-weight: 400; color: var(--gold-d); line-height: 1.4; text-align: left; margin-top: 2px; }
.footer .right .btn {
  width: 100px; height: 35px; background: var(--gold-d); border-radius: 4px;
  font-size: 14px; font-weight: 500; color: #fff; line-height: 35px; text-align: center; padding: 0;
}
.footer .right .btn:active { background: #a06d20; }
.footer .right .btn.disabled { background: #666; color: var(--muted-2); pointer-events: none; }

/* 计费类型 / 支付方式标签（浅色场景：续费、快捷指令） */
.price-chip {
  flex: none; min-width: 76px; background: #f0f2f5; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 12px; display: inline-flex; flex-direction: column; align-items: stretch;
  text-align: center; transition: all .3s ease;
}
.price-chip:active { transform: scale(.97); }
.price-chip.selected { background: #f0e4b8; border-color: var(--gold); }
.price-chip .pc-name { font-size: 12.5px; font-weight: 600; color: #333; }
.price-chip .pc-price { margin-top: 3px; font-size: 14px; font-weight: 700; color: var(--price); }
.price-chip .pc-unit { font-size: 10px; color: var(--muted-2); }
.price-chip.disabled { opacity: .4; pointer-events: none; }
/* 深色购买面板内的计费类型（参考站 .payment-tag 规格） */
.sheet.dark .price-chip {
  flex-direction: row; align-items: center; gap: 4px; min-width: 0;
  background: #444444; border-radius: 4px; padding: 7px 14px;
}
.sheet.dark .price-chip:active { opacity: .8; transform: none; }
.sheet.dark .price-chip.selected { background: #555555; border-color: var(--gold-d); }
.sheet.dark .price-chip .pc-name { font-size: 13px; font-weight: 500; color: #fff; }
.sheet.dark .price-chip.selected .pc-name { color: var(--gold-d); }
.sheet.dark .price-chip .pc-price { font-size: 13px; font-weight: 600; color: var(--gold); margin-top: 0; }
.sheet.dark .price-chip .pc-unit { font-size: 10px; color: #ccc; }

/* 数量选择器 */
.quantity-selector { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.quantity-title { font-size: 14px; color: #fff; font-weight: 500; }
.quantity-control { display: inline-flex; align-items: center; background: #444444; border-radius: 4px; overflow: hidden; }
.control-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: #555555; color: #fff; font-size: 16px; font-weight: 600; border-radius: 0;
}
.control-btn:active { background: #666666; }
.control-btn.disabled { opacity: .5; background: #444444; pointer-events: none; }
.quantity-input {
  width: 60px; height: 32px; line-height: 32px; text-align: center;
  font-size: 15px; color: #fff; background: #444444;
}

/* ============ 订单页 ============ */
.order-page {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 70; background: #f7f7f7;
  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: #2563eb; font-weight: 500; }
.seg.active::after {
  content: ""; position: absolute; bottom: 0; left: 10px; right: 10px; height: 2px;
  background: #2563eb; 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: #333; 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: #07c160; background: rgba(7, 193, 96, .1); }
.st-expired { color: var(--muted); background: rgba(0, 0, 0, .05); }
.st-refunded { color: var(--orange); background: rgba(255, 169, 64, .1); }
.st-pending { color: var(--orange); background: rgba(255, 169, 64, .1); }
.st-paid { color: #07c160; background: rgba(7, 193, 96, .1); }
.st-active { color: #07c160; background: rgba(7, 193, 96, .1); }
.st-revoked { color: var(--red); background: rgba(255, 77, 79, .1); }
.st-approved { color: #07c160; background: rgba(7, 193, 96, .1); }
.st-rejected { color: var(--red); background: rgba(255, 77, 79, .1); }
.oc-price { font-size: 18px; color: var(--red); font-weight: 500; margin-bottom: 12px; }
.oc-rows, .order-info { border-top: 1px solid #f0f0f0; 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: #333; }
.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: #07c160; }
.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-2); }
.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: 200px; overflow: hidden; z-index: 1; }
.top-bg i { position: absolute; top: -50px; width: 200px; height: 200px; border-radius: 50%; }
.top-bg .gradient-left { left: -50px; background: radial-gradient(circle, rgba(255, 236, 179, .2) 0%, rgba(255, 255, 255, 0) 70%); transform: rotate(-45deg); }
.top-bg .gradient-right { right: -50px; background: radial-gradient(circle, rgba(179, 229, 255, .2) 0%, rgba(255, 255, 255, 0) 70%); transform: rotate(45deg); }
.user-section { position: relative; z-index: 2; padding: 20px 15px 10px; flex-shrink: 0; }
.user-info {
  display: flex; align-items: center; margin-bottom: 25px; padding: 2.5px;
  border-radius: 8px; cursor: pointer; transition: background-color .2s ease;
}
.user-info:active { background-color: rgba(0, 0, 0, .05); }
.user-info .avatar {
  width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; flex: none;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: #fff;
}
.user-details { flex: 1; min-width: 0; }
.user-details .username { font-size: 18px; font-weight: 500; color: #333; margin-bottom: 6px; display: block; }
.user-details .user-id {
  font-size: 12px; color: var(--muted); display: flex; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.verify-tag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; font-size: 10px; margin-left: 5px; flex: none; }
.verify-tag.verified { background-color: rgba(82, 196, 26, .1); color: var(--green); }
.verify-tag.unverified { background-color: rgba(255, 77, 79, .1); color: var(--red); }
.arrow-right { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; }
.arrow-right i { font-size: 24px; color: var(--muted-2); }

/* 客服横幅（红橙渐变） */
.member-card {
  width: 100%; height: 80px; border-radius: 12px;
  background: linear-gradient(90deg, #ff4d4f 0%, #ffa940 100%);
  position: relative; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); cursor: pointer;
}
.member-card:active { opacity: .9; }
.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: #fff; letter-spacing: .5px; }
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 14px; background-color: #fff; border-radius: 999px; width: 100%; box-sizing: border-box;
}
.contact-btn i, .contact-btn .btn-text {
  background: linear-gradient(90deg, #ff4d4f 0%, #ffa940 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 13px; line-height: 1; font-style: normal;
}
.contact-btn i { font-weight: 700; }
.light-effect {
  position: absolute; top: -100%; right: -20%; width: 100px; height: 300%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .15)); transform: rotate(35deg);
}
.mine-pending {
  margin: 0 15px 10px; font-size: 12.5px; color: var(--orange);
  background: rgba(255, 169, 64, .1); border-radius: 4px; padding: 8px 10px; position: relative; z-index: 2;
}
.scroll-container { flex: 1; overflow-y: auto; padding-bottom: 60px; position: relative; z-index: 2; }
.features-card { margin: 10px 15px 15px; background: #fff; border-radius: 8px; position: relative; z-index: 2; }
.card-title { font-size: 16px; font-weight: 500; color: #333; padding: 10px; }
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 10px; }
.grid-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 0; }
.grid-item i { font-size: 20px; margin-bottom: 8px; color: #333; font-style: normal; display: inline-flex; }
.grid-item span { font-size: 12px; color: #333; }
.grid-item.blue-icon i { color: #1890ff; }

/* 余额 / 充值行（保留自有功能入口） */
.balance-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; }
.balance-left { display: flex; flex-direction: column; gap: 2px; }
.balance-label { font-size: 12px; color: var(--muted-2); }
.balance-value { font-size: 14px; color: #333; }
.balance-value b { font-size: 20px; color: var(--red); font-weight: 600; }
.balance-btn { height: 32px; padding: 0 18px; border-radius: 16px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 500; }
.balance-btn:active { opacity: .9; }

.settings-card { margin: 10px 15px 15px; background: #fff; border-radius: 8px; padding: 10px; position: relative; z-index: 2; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; padding: 15px 10px;
  border-bottom: .5px solid var(--line-3); cursor: pointer; width: 100%;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background-color: var(--bg-2); }
.item-left { display: flex; align-items: center; gap: 10px; }
.item-left i { font-size: 18px; color: var(--muted); font-style: normal; display: inline-flex; }
.item-left .item-text { font-size: 14px; color: #333; }
.item-right { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.item-right i { font-size: 16px; color: #ccc; }
.mine-footer { text-align: center; color: var(--muted-2); font-size: 12px; padding: 10px 0 24px; }

/* ============ 底部标签栏（3 tab / 45px） ============ */
.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: #fff; border-top: .5px solid var(--line-2);
  box-shadow: 0 -1px 5px rgba(0, 0, 0, .05);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3px 0; color: #8a8a8a; font-size: 11px; transition: all .3s ease; position: relative;
}
.tab:active { transform: scale(.95); }
.tab > i { margin-bottom: 5px; display: inline-flex; align-items: center; justify-content: center; transition: all .3s ease; }
.tab i { font-size: 18px; font-style: normal; color: inherit; }
.tabbar-text { font-size: 11px; line-height: 1; transition: all .3s ease; }
.tab.active { color: #007aff; }
.tab.active i { color: #007aff; transform: scale(1.1); }
.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: 44px; flex: none;
  padding: 0 12px; padding-top: var(--status-bar-height); box-sizing: content-box;
  border-bottom: 1px solid var(--line-2); background: #fff;
}
.sub-nav .icon-btn { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; width: 30px; height: 30px; font-size: 22px; color: #333; }
.sub-title { flex: 1; text-align: center; font-size: 14px; font-weight: 400; color: #333; }
.sub-nav-right { flex: none; min-width: 30px; 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-3); 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(--muted); flex: 1; }
.section-title { font-size: 14px; color: #333; margin: 18px 2px 8px; font-weight: 500; }
.device-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.row-card { background: #fff; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .02); }
.row-card.selected { border-color: var(--primary); box-shadow: 0 0 0 1.5px var(--primary); }
.input {
  width: 100%; height: 48px; background: #f0f2f5; border: 1px solid transparent;
  border-radius: 8px; padding: 0 16px; font-size: 14px;
}
.input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24, 119, 242, .1); }
textarea.input { height: auto; padding: 10px 16px; resize: none; }
.btn-row { display: flex; gap: 10px; margin-top: 20px; }
.select-tip { font-size: 12px; color: var(--muted-2); padding: 0 2px 8px; line-height: 1.5; }

/* ============ 控制页（深色投屏，对齐领袖云控制页规格） ============ */
.control-body {
  position: fixed; inset: 0; z-index: 75;
  display: flex; flex-direction: column; height: 100%; background: #000;
  --offsetW: 45px; --offsetH: 80px;
}
.control-header {
  flex: none; height: 40px; padding: 0 10px 0 4px; display: flex; align-items: center;
  justify-content: space-between; background: #000; z-index: 5;
}
.control-header .ch-back {
  flex: none; width: 32px; height: 32px; margin-right: 2px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; 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: 1.2em; height: 1.2em; border-radius: 50%; flex: none; margin-right: .5em;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: rgba(0, 0, 0, .05) 0 0 0 1px;
}
.control-header .ch-name { font-size: .9em; font-weight: 400; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control-header .ch-right { display: flex; align-items: center; flex: none; }
.ch-quality {
  padding: 4px 12px; background: rgba(255, 255, 255, .1); border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #fff;
}
.ch-quality:active { background: rgba(255, 255, 255, .15); transform: scale(.98); }
.ch-quality.ok { background: rgba(82, 196, 26, .18); border-color: rgba(82, 196, 26, .35); }
/* 大屏顶栏：设备 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; opacity: .9;
}
.ch-ping.good { color: #52C41A; }
.ch-ping.mid { color: #FAAD14; }
.ch-ping.bad { color: #FF7875; }

/* 实时帧率：显示在「投屏中」左边 */
.ch-fps {
  margin-right: 6px; font-size: 12px; color: #fff; min-width: 46px; text-align: right;
  font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap;
}
.ch-fps.idle { opacity: .55; }   /* 画面静止时显示的是档位帧率，淡一点区分 */
.ch-latency {
  min-width: 50px; margin-left: 6px; font-size: 12px; background: rgba(0, 0, 0, .4);
  padding: 2px 6px; border-radius: 4px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  text-align: center; color: #fff; 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, #eef0f3); border-radius: 10px; padding: 10px 4px; text-align: center; }
.disk-stat b { display: block; font-size: 14px; font-weight: 600; color: var(--text, #1a1a1a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disk-stat span { display: block; font-size: 11px; color: #8b93a1; margin-top: 2px; }
.disk-progress { height: 6px; border-radius: 3px; background: #eef0f3; overflow: hidden; margin: 10px 0 0; }
.disk-progress i { display: block; height: 100%; width: 0; background: var(--primary, #2f6feb); 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, #e6e9ee); background: #fff; color: #3c4450; font-size: 12.5px; }
.mini-btn.primary { border-color: rgba(47, 111, 235, .45); color: var(--primary, #2f6feb); background: rgba(47, 111, 235, .06); }
.mini-btn.danger { border-color: rgba(229, 77, 77, .35); color: #e04a4a; }
.mini-btn:active { transform: scale(.97); }
/* 卡片小屏实时预览：铺满卡片（不留黑边、不虚化；上下各裁掉一点） */
.dc-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0b0b0c; }
.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: #000;
  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: 11px 0; border-radius: 10px; color: #fff; background: transparent; transition: all .2s ease;
}
.control-side .sd i { font-size: 17px; color: rgba(229, 229, 229, .9); font-style: normal; display: inline-flex; }
.control-side .sd span { font-size: 10.5px; color: rgba(229, 229, 229, .75); white-space: nowrap; }
.control-side .sd:active { transform: scale(.95); border-radius: 5px; background-color: rgba(78, 85, 83, .8); }
.control-side .sd.pri { background: rgba(47, 111, 235, .22); border: 1px solid rgba(47, 111, 235, .45); }
.control-side .sd.pri i { color: #fff; }
.control-side .sd:active i { color: #e5e5e5; }
.control-side .sd:active span { color: rgba(229, 229, 229, .9); }
.control-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; background: #000; 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: #384abf; 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: #fff; font-size: 14px; font-weight: 500; }
.control-error {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: #8a909b; background: #000; 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: #000; color: #fff; text-align: center; padding: 20px;
}
.control-offline i { font-size: 42px; color: rgba(255, 255, 255, .4); }
.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; }
/* 底部按钮行：对齐领袖云 .footer（图标 .8em / opacity .7 / 按下 #4e5553 圆角 50px） */
.control-footer {
  flex: none; width: 100%; min-height: 40px; display: flex; align-items: center;
  background: #000; 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: 2px; padding: 6px 2px; opacity: .7; transition: opacity .2s ease; color: #fff;
}
.control-footer .fw:active { opacity: 1; transform: scale(.95); border-radius: 50px; background-color: #4e5553; }
.control-footer .fw i { font-size: .8em; color: #fff; font-style: normal; display: inline-flex; }
.control-footer .fw span { font-size: 10px; color: rgba(229, 229, 229, .85); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 全屏模式：隐藏我方顶栏/底栏，投屏画面占满整屏 */
.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, #2f6feb); border-color: var(--primary, #2f6feb); color: #fff;
}
.batchbar-actions [data-action="batch-sync"].on i { color: #fff; }
.batchbar-tip { font-size: 11.5px; color: #8b93a1; 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, #2f6feb); border-color: #fff; }
body.sync-mode .device-card.picked { outline: 2px solid var(--primary, #2f6feb); 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, #2f6feb); font-size: 17px; display: inline-flex; }
.sync-text { min-width: 0; flex: 1; }
.sync-text b { display: block; font-size: 13px; color: #1a1f27; }
.sync-text em { display: block; font-style: normal; font-size: 11px; color: #7b8494; margin-top: 1px; }
.sync-num { font-size: 11.5px; color: #4b5563; white-space: nowrap; }
.sync-num b { color: var(--primary, #2f6feb); 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, #2f6feb);
}
.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 i { font-size: 14px; }

/* ============ 设备备注 + 工单 ============ */
/* 设备备注：显示在卡片（设备屏幕）正中间，字号加大，半透明胶囊底更好认 */.device-remark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  max-width: 88%; padding: 4px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #fff; text-align: center;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
/* 备注前不再加 emoji 前缀 */
.modal-remark {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #f7f9fc;
  color: #2c3440; font-size: 13px;
}
.modal-remark .mr-label { color: #8b93a1; 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: #2f6feb; flex: none; }
.modal-remark i:first-child { color: #2f6feb; font-size: 16px; }
.modal-remark:active { background: #eef2f9; }
/* 工单 */
.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: #9aa0a8; font-weight: 400; margin-left: 4px; }
.tk-reply { color: #2f6feb; }
.tk-detail-text { font-size: 13.5px; line-height: 1.7; color: #2c3440; 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: #8b93a1; 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: #2F6FEB; 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: #2F6FEB; border-color: #2F6FEB; 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: #9aa0a8; }

/* 被分享设备卡片底部：显示的是「分享剩余」时间（不是设备租期） */
.device-info .rm.rm-shared { color: #FFD666; }

/* 设备搜索：顶栏下方独立一行，右对齐在 ☰ 按钮正下方 */
.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 i { font-size: 15px; color: #9aa0a8; 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: #2F6FEB;
  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: #2F6FEB; }
.pick-empty { padding: 18px 0; text-align: center; color: #9aa0a8; 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: #9aa0a8; }

/* 被分享设备：禁用态按钮 + 规则提示 */
.btn.disabled, #home-batchbar button.disabled { opacity: .45; pointer-events: auto; }
#home-batchbar button.disabled:active { background: none; }
.modal-note.note-warn { background: #FFF7E6; border: 1px solid #FFE0A3; color: #B3781A; 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: #FFF7E6; border: 1px solid #FFE0A3; border-radius: 10px; color: #B3781A; font-size: 12.5px;
}
.realname-bar.hidden { display: none; }
.realname-bar i { font-size: 16px; flex: none; }
.realname-bar span { flex: 1; min-width: 0; }
.realname-bar button { flex: none; height: 28px; padding: 0 12px; border-radius: 7px; background: #FFA41B; color: #fff; font-size: 12px; }
.tk-warn { padding: 9px 12px; border-radius: 9px; background: #FFF7E6; border: 1px solid #FFE0A3; color: #B3781A; 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: #4b5563; line-height: 1.5; }
.tk-check input { width: 16px; height: 16px; margin-top: 1px; flex: none; accent-color: #2f6feb; }
.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: #f2f4f7; color: #4b5563; font-size: 11.5px;
}
.tk-shot em { font-style: normal; color: #2f6feb; }
.tk-shot button { color: #9aa0a8; font-size: 14px; line-height: 1; }

/* ---------- 居中弹窗（设备设置等） ---------- */
#modal-mask { z-index: 78; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.94);
  width: min(90vw, 360px); max-height: 76vh; z-index: 79;
  background: #fff; border-radius: 18px; box-shadow: 0 20px 56px 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: 15px 16px 10px; }
.modal-title { font-size: 16px; font-weight: 600; color: #1a1f27; }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%; background: #f2f4f7; color: #8b93a1;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 6px; }
.modal-foot { flex: none; padding: 10px 16px 16px; }
.modal-foot.hidden { display: none; }
/* 设备信息条 */
.modal-dev { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f7f9fc; border-radius: 12px; }
.modal-dev-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(47, 111, 235, .1); color: #2f6feb; font-size: 18px;
}
.modal-dev-meta { min-width: 0; }
.modal-dev-meta b { display: block; font-size: 14px; font-weight: 600; color: #1a1f27; }
.modal-dev-meta span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #8b93a1; margin-top: 2px; }
.modal-dev-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: #c8ccd4; }
.modal-dev-meta .dot.on { background: #30c46b; }
.modal-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 164, 27, .1); color: #b3781a; font-size: 11.5px; line-height: 1.5; }
/* 功能宫格 */
.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; gap: 5px; padding: 12px 4px;
  border-radius: 12px; background: #f7f9fc; color: #2c3440; font-size: 12px; line-height: 1.2; text-align: center;
  border: 1px solid transparent;
}
.modal-tile i { font-size: 19px; color: #2f6feb; }
.modal-tile span { font-weight: 500; }
.modal-tile em { font-style: normal; font-size: 10px; color: #98a1b0; }
.modal-tile:active { background: #eef2f9; transform: scale(.97); }
.modal-tile.locked { opacity: .5; color: #98a1b0; }
.modal-tile.locked i { color: #b6bcc6; }
/* 指令区 */
.modal-cmds { margin-top: 14px; }
.modal-cmds-title { font-size: 12px; color: #8b93a1; margin-bottom: 8px; }
.modal-cmd-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-cmd {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 9px;
  background: #f7f9fc; color: #2c3440; font-size: 12.5px;
}
.modal-cmd i { color: #2f6feb; }
.modal-cmd:active { background: #eef2f9; }
/* CDK 兑换 */
.modal-btn-row { display: flex; gap: 8px; }
.modal-btn-row .btn { flex: 1; }
.cdk-info { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; }
.cdk-info.hidden { display: none; }
.cdk-info.ok { background: #eaf7ee; color: #1c7c3c; }
.cdk-info.err { background: #fdecec; color: #c0392b; }
.cdk-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.cdk-row span { color: #7b8494; 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 rgba(0, 0, 0, .08); font-weight: 600; line-height: 1.5; }

.mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 80; animation: fadein .2s ease;
}
.mask.dark { background: rgba(0, 0, 0, .6); z-index: 2000; }
.sheet {
  /* 居中弹窗（原来是底部上滑）：上下都居中，最大 78vh，超出内部滚动
     top 取 46% 是为了给手机键盘留空间（弹窗略偏上，输入框不被键盘挡住） */
  position: fixed; left: 50%; top: 46%; bottom: auto; transform: translate(-50%, -50%); z-index: 81;
  width: min(92vw, 420px); max-width: 92vw; max-height: 78vh; max-height: 76dvh;
  background: #fff; border-radius: 16px; display: flex; flex-direction: column;
  animation: sheetpop .2s ease; padding-bottom: 0;
  box-shadow: 0 20px 56px rgba(16, 24, 40, .28); overflow: hidden;
}
@keyframes sheetpop { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.sheet-handle { display: none; }
.sheet-head { position: relative; text-align: center; padding: 12px 16px; border-bottom: .5px solid var(--line-3); flex: none; }
.sheet-title { font-size: 14px; font-weight: 500; color: #333; display: inline-block; padding: 0 30px; }
.sheet-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-size: 16px;
}
.sheet-body { overflow-y: auto; padding: 12px 16px 16px; }
.sheet-body > .row-card { padding: 0; 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); flex: none; }
.sheet-foot-left { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }

/* 深色购买面板（参考站 .custom-popup）—— 同样居中显示 */
.sheet.dark {
  background: #333333; border-radius: 16px; z-index: 2001; max-height: 78vh;
  animation: sheetpop .2s ease-out; box-shadow: 0 20px 56px rgba(0, 0, 0, .45); padding-bottom: 0;
}
.sheet.dark .sheet-head { padding: 16px 16px 12px; border-bottom: .5px solid #444444; text-align: left; }
.sheet.dark .sheet-title { font-size: 18px; font-weight: 600; color: #fff; padding: 0; }
.sheet.dark .sheet-close {
  width: 24px; height: 24px; right: 16px; background: rgba(255, 255, 255, .1);
  border-radius: 50%; color: #fff; font-size: 16px; font-weight: 300;
}
.sheet.dark .sheet-close:active { background: rgba(255, 255, 255, .2); transform: translateY(-50%) scale(.95); }
.sheet.dark .sheet-body { padding: 0; }
.sheet.dark .order-details { padding: 16px; border-bottom: .5px solid #444444; }
.sheet.dark .detail-title { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 12px; }
.sheet.dark .detail-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: .5px solid #444444; }
.sheet.dark .detail-item:last-child { border-bottom: none; }
.sheet.dark .detail-label { font-size: 14px; color: #ccc; }
.sheet.dark .detail-value { font-size: 14px; color: #fff; }
.sheet.dark .detail-item.total { border-top: 1px solid #444444; border-bottom: none; padding-top: 12px; margin-top: 8px; }
.sheet.dark .detail-item.total .detail-value { font-size: 16px; font-weight: 600; color: var(--gold); }
.sheet.dark .payment-methods { padding: 16px; border-bottom: .5px solid #444444; }
.sheet.dark .method-title { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 12px; }
.sheet.dark .method-list { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 0; }
.sheet.dark .pkg-prices { gap: 6px; margin-top: 0; padding: 0 16px; }
.sheet.dark .quantity-selector { margin: 16px; }
.sheet.dark .form-label { color: #fff; font-weight: 500; margin: 0 16px 8px; font-size: 14px; }
.sheet.dark .select-tip { color: rgba(255, 255, 255, .6); margin: 10px 16px 0; }
.sheet.dark .input, .sheet.dark select.input {
  width: calc(100% - 32px); margin: 0 16px; background: #444444; color: #fff; border-radius: 4px;
}
.sheet.dark .row-card { background: #333333; padding: 0; }
.sheet.dark .kv { border-bottom: .5px solid #444444; }
.sheet.dark .kv .k { color: #ccc; }
.sheet.dark .kv .v { color: #fff; }
.sheet.dark .sheet-foot { margin: 0; padding: 16px; background: #333333; border-top: .5px solid #444444; }
.sheet.dark .sheet-foot-left { color: #fff; font-size: 14px; }
.sheet.dark .sheet-foot-left b { color: var(--gold); font-size: 16px; font-weight: 600; }
.sheet.dark .btn-primary {
  height: 40px; border-radius: 20px; background: var(--gold); color: #333;
  font-size: 16px; font-weight: 600;
}
.sheet.dark .btn-primary:active { background: #e6c236; transform: scale(.98); }
.sheet.dark .pay-qr { border-color: #444444; background: #fff; }

/* 浅色支付方式列表 */
.method-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.method-item {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #eceef2;
  border-radius: 8px; padding: 12px;
}
.method-item.selected { border-color: var(--primary); background: rgba(24, 119, 242, .04); }
.method-item img, .method-item .mi-ico { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
.mi-ico { background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.method-item .mi-name { font-size: 14.5px; font-weight: 600; }
.method-item .mi-sub { font-size: 12px; color: var(--muted); }
.method-item .mi-check { margin-left: auto; color: var(--primary); font-size: 19px; visibility: hidden; }
.method-item.selected .mi-check { visibility: visible; }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tier {
  background: #f7f8fa; border: 1px solid #eceef2; border-radius: 8px;
  padding: 12px 6px; text-align: center; transition: border-color .15s;
}
.tier.selected { border-color: var(--primary); background: rgba(24, 119, 242, .05); }
.tier .t-num { font-size: 17px; font-weight: 700; color: var(--price); }
.tier .t-num::before { content: "¥"; font-size: 12px; margin-right: 1px; }
.tier .t-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.amount-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: #f7f8fa; border: 1px solid #eceef2; border-radius: 8px; padding: 0 14px; height: 50px; }
.amount-row:focus-within { border-color: var(--primary); }
.amount-row .cur { font-size: 18px; font-weight: 700; color: var(--price); }
.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: 4px; background: #fafafa; border: 1px solid var(--line-2);
  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: 2px; }
.pay-amount { font-size: 26px; font-weight: 800; color: var(--price); margin: 14px 0 4px; }
.pay-tip { font-size: 13px; color: var(--muted); 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: #07c160; }
.close-button { width: 100px; height: 35px; line-height: 35px; background: #f5f5f5; border-radius: 4px; font-size: 14px; color: #666; margin: 0 auto; text-align: center; }
.close-button:active { background: #eee; }

/* ============ 对话框（无圆角、橙金确认、贴边平分） ============ */
.dialog {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 82;
  width: 300px; max-width: calc(100% - 40px);
  background: #fff; border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1); animation: modalpop .3s ease;
}
@keyframes modalpop { from { transform: translate(-50%, -50%) scale(.8); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.dialog-icon { display: none; }
.dialog-title { font-size: 16px; font-weight: 600; color: #333; padding: 20px 20px 10px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.dialog-msg {
  font-size: 14px; color: var(--muted); line-height: 1.5; padding: 10px 20px 20px;
  text-align: left; word-break: break-all; white-space: pre-line; max-height: 60vh; overflow-y: auto;
}
.dialog-btns { display: flex; justify-content: space-between; border-top: 1px solid #f0f0f0; margin: 0; }
.dialog-btns .btn {
  flex: 1; height: 44px; font-size: 14px; font-weight: 400; border-radius: 2px;
  margin: 0; padding: 0; transition: all .3s;
}
.dialog-btns .btn-plain { background-color: var(--bg-2); color: var(--muted); }
.dialog-btns .btn-plain:active { background-color: #f0f0f0; }
.dialog-btns .btn-primary { background: linear-gradient(135deg, #ffa41b, #ffbe4c); color: #fff; }
.dialog-btns .btn-primary:active { transform: scale(.98); opacity: .9; }

/* ============ Toast / Loading ============ */
.toast {
  position: fixed; left: 50%; top: 14vh; transform: translateX(-50%); z-index: 99;
  background: rgba(30, 34, 42, .92); color: #fff; border-radius: 4px; padding: 10px 18px;
  font-size: 13.5px; max-width: 82%; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  animation: toastin .2s ease;
}
@keyframes toastin { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.loading {
  position: fixed; inset: 0; z-index: 95; background: rgba(255, 255, 255, .6);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.loading .spinner {
  margin: 0; width: 8px; height: 8px; border: none; border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: dotbounce 1.4s ease-in-out infinite both; position: relative;
}
.loading .spinner::before, .loading .spinner::after {
  content: ""; position: absolute; top: 0; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: dotbounce 1.4s ease-in-out infinite both;
}
.loading .spinner::before { left: -16px; animation-delay: -.32s; }
.loading .spinner::after { left: 16px; animation-delay: -.16s; }
@keyframes dotbounce {
  0%, 100% { transform: scale(.8); opacity: .5; }
  40% { transform: scale(1); opacity: 1; }
}
.loading #loading-text { margin-top: 20px; color: #667eea; font-size: 14px; font-weight: 500; text-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

.skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef0f4 25%, #e2e6ec 50%, #eef0f4 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; }
}

/* ============================================================
   购买界面 · 电脑端极简商务风重写（主色蓝 #2F6FEB，浅色锁定）
   覆盖范围：商城页（.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: #2F6FEB; 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, #2F6FEB, #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: #2F6FEB; }

/* 套餐卡（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: #2F6FEB;
  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: #2F6FEB; }
.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: #2F6FEB; }

/* 计费类型（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: #2F6FEB; }

/* 台数步进器 */
.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: #2F6FEB; 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: #2F6FEB; 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: #2F6FEB; 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: #2F6FEB; }
.store-foot .left .price-wrap .price { color: #2F6FEB; 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, #2F6FEB, #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, #2F6FEB, #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: #2F6FEB; }

/* 计费类型 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: #2F6FEB; 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: #2F6FEB; 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: #2F6FEB; }
.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: #2F6FEB; background: rgba(47, 111, 235, .05); }
.sheet.pc .tier .t-num { color: #1F2430; }
.sheet.pc .tier.selected .t-num { color: #2F6FEB; }
.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: #2F6FEB; }
.sheet.pc .pay-tip { color: #8A909C; }
.sheet.pc .pay-countdown { color: #2F6FEB; }
