:root {
  /* ===== 客户端页面沿用的基础色（保持原蓝白，不动） ===== */
  --brand: #1B6FD0;
  --brand-2: #4098F8;
  --brand-bright: #4098F8;
  --brand-soft: #E8F2FE;
  --bg: #F5F9FF;
  --panel: #FFFFFF;
  --line: #D8E6F8;
  --line-2: #EAF2FC;
  --text: #0F1E33;
  --text-2: #41536E;
  --muted: #7C8CA6;
  --ok: #0F7B4D;
  --ok-soft: #E6F6EE;
  /* 成功态实心图标：亮绿底 + 白勾（客户按参考图指定的色值 #67D751） */
  --ok-solid: #67D751;
  --ok-on: #FFFFFF;
  --warn: #8A5A12;
  --warn-soft: #FDF3E3;
  --danger: #B4403A;
  --danger-soft: #FBECEB;
  --info: #1B6FD0;
  --info-soft: #E8F2FE;
  --radius: 10px;
  /* 卡片不用阴影，靠边框和底色差分层；阴影只留给弹窗/浮层 */
  --shadow: none;
  --shadow-pop: 0 18px 44px rgba(12, 32, 64, .18), 0 2px 8px rgba(12, 32, 64, .06);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* ===== 新增令牌：原来散在各处的浅底色/描边/语义文字色 =====
     值仍取旧口径，保证客户端页面观感不变；后台主题再整组覆盖。 */
  --brand-strong: #1560B8;
  --brand-ink: #FFFFFF;        /* 主色块上的文字 */
  --brand-line: #CFE4FD;
  --brand-shadow: rgba(27, 111, 208, .22);
  --ring: rgba(64, 152, 248, .18);
  --bg-2: #F5F9FF;
  --sidebar-bg: #FFFFFF;
  --topbar-bg: rgba(255, 255, 255, .85);
  --panel-soft: #FBFDFF;
  --panel-hi: #FAFCFF;
  --thead-bg: #F8FBFF;
  --fill: #EEF3FB;
  --fill-2: #F1F5FC;
  --row-hover: #F9FCFF;
  --nav-hover: #F7FAFF;
  --input-bg: #FFFFFF;
  --line-3: #D5E3F5;
  --muted-2: #A9B8CE;
  --ok-line: #C6E6D5;
  --ok-text: #0F5C3C;
  --ok-ink: #FFFFFF;
  --warn-line: #EFDCBE;
  --warn-text: #8A5A12;
  --warn-accent: #E08A2E;
  --warn-ink: #FFFFFF;
  --danger-line: #EFD1CE;
  --danger-text: #A83B36;
  --danger-ink: #FFFFFF;
  --info-line: #CBE8F7;
  --info-text: #1B5A87;
  --veil: rgba(22, 25, 45, .42);
  --toast-bg: #1f2437;
  --toast-ink: #FFFFFF;
  --panel-grad: none;
  --chart-bar: #C9E0FA;
  --login-grad: linear-gradient(150deg, #0E2B52 0%, #1B6FD0 48%, #4098F8 100%);
  /* 图表/图标用的六个强调色，深浅两套各自定义 */
  --c1: #1B6FD0;
  --c2: #0ea5e9;
  --c3: #0d9488;
  --c4: #0F7B4D;
  --c5: #E08A2E;
  --c6: #C2403A;
}

/* ======================= 主题一：极昼电青（浅色，默认） ======================= */
html[data-app="admin"] {
  --brand: #2278F2;
  --brand-2: #5FB3FF;
  --brand-bright: #3B9EFF;
  --brand-soft: #EAF4FF;
  --brand-line: #C6E0FF;
  --brand-ring: rgba(34, 120, 242, .20);
  --brand-shadow: rgba(34, 120, 242, .26);
  --brand-strong: #1660CC;
  --brand-ink: #FFFFFF;

  --bg: #F2F5FA;
  --bg-2: #FFFFFF;
  --panel: #FFFFFF;
  --panel-soft: #F7FAFD;
  --panel-hi: #FBFDFF;
  --sidebar-bg: #FFFFFF;
  --topbar-bg: rgba(255, 255, 255, .86);
  --input-bg: #FFFFFF;
  --thead-bg: #F7FAFD;
  --fill: #EFF3F9;
  --fill-2: #E9EEF6;
  --row-hover: rgba(16, 24, 40, .022);
  --nav-hover: rgba(16, 24, 40, .035);

  --line: #E4E9F2;
  --line-2: #EDF1F7;
  --line-3: #D6DDEA;

  --text: #0B1220;
  --text-2: #46536B;
  --muted: #6E7B92;
  --muted-2: #9BA5B8;

  --ok: #067647;
  --ok-soft: #E7F6EE;
  --ok-line: #BFE5D1;
  --ok-text: #0A6440;
  --warn: #B54708;
  --warn-soft: #FDF3E6;
  --warn-line: #F0D6B4;
  --warn-text: #8A4A0B;
  --warn-accent: #C2740F;
  --danger: #B42318;
  --danger-soft: #FBEDEB;
  --danger-line: #F0CFCB;
  --danger-text: #8C2F27;
  --info: #175CD3;
  --info-soft: #EAF2FE;
  --info-line: #C7DBFA;
  --info-text: #134E9E;

  --ring: rgba(34, 120, 242, .20);
  --veil: rgba(16, 24, 40, .40);
  --toast-bg: #141B26;
  --panel-grad: none;
  --chart-bar: #C9E2FF;
  --c1: #2278F2;
  --c2: #5FB3FF;
  --c3: #0D9488;
  --c4: #067647;
  --c5: #B54708;
  --c6: #B42318;
  --shadow: none;
  --shadow-pop: 0 20px 50px rgba(16, 24, 40, .16), 0 2px 8px rgba(16, 24, 40, .06);
  --radius: 14px;
  --login-grad: linear-gradient(150deg, #0B2A5E 0%, #2278F2 52%, #5FB3FF 100%);

  /* 显式声明浅色，避免系统级深色偏好把原生下拉/滚动条染成深色 */
  color-scheme: light;
}

/* ======================= 主题二：深空（深色，可切换） ======================= */
html[data-app="admin"][data-mode="dark"] {
  --brand: #4FA5FF;
  --brand-2: #8CCBFF;
  --brand-bright: #6FB8FF;
  --brand-soft: rgba(79, 165, 255, .13);
  --brand-line: rgba(79, 165, 255, .32);
  --brand-ring: rgba(79, 165, 255, .26);
  --brand-shadow: rgba(79, 165, 255, .34);
  --brand-strong: #A8D6FF;
  --brand-ink: #061A33;

  --bg: #05070B;
  --bg-2: #070A10;
  --panel: #0C1118;
  --panel-soft: #090D14;
  --panel-hi: #0E141D;
  --sidebar-bg: #070A10;
  --topbar-bg: rgba(5, 7, 11, .74);
  --input-bg: #0A0E15;
  --thead-bg: #0A0E15;
  --fill: rgba(255, 255, 255, .055);
  --fill-2: rgba(255, 255, 255, .075);
  --row-hover: rgba(255, 255, 255, .026);
  --nav-hover: rgba(255, 255, 255, .045);

  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .052);
  --line-3: rgba(255, 255, 255, .14);

  --text: #E9EFF8;
  --text-2: #A6B3C7;
  --muted: #7C8AA1;
  --muted-2: #5C697C;

  --ok: #3BE39B;
  --ok-soft: rgba(59, 227, 155, .10);
  --ok-line: rgba(59, 227, 155, .24);
  --ok-text: #8CF3C6;
  --ok-ink: #04231A;
  --warn: #FFB454;
  --warn-soft: rgba(255, 180, 84, .10);
  --warn-line: rgba(255, 180, 84, .24);
  --warn-text: #FFD08F;
  --warn-accent: #FFB454;
  --warn-ink: #2A1703;
  --danger: #FF6E7B;
  --danger-soft: rgba(255, 110, 123, .10);
  --danger-line: rgba(255, 110, 123, .24);
  --danger-text: #FFA6AE;
  --danger-ink: #2B0709;
  --info: #5FA8FF;
  --info-soft: rgba(95, 168, 255, .10);
  --info-line: rgba(95, 168, 255, .24);
  --info-text: #A7CDFF;

  --ring: rgba(79, 165, 255, .26);
  --veil: rgba(0, 0, 0, .62);
  --toast-bg: #101823;
  --toast-ink: #E9EFF8;
  --panel-grad: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 46%);
  --chart-bar: rgba(79, 165, 255, .24);
  --c1: #4FA5FF;
  --c2: #8CCBFF;
  --c3: #45F0B0;
  --c4: #3BE39B;
  --c5: #FFB454;
  --c6: #FF6E7B;
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 20px 44px -30px rgba(0, 0, 0, .9);
  --shadow-pop: 0 28px 64px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .05);
  --radius: 14px;
  --login-grad: linear-gradient(150deg, #04070B 0%, #0A2A5E 55%, #2278F2 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .85; }

/* ============ 布局 ============ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 216px;
  flex: 0 0 216px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 16px 12px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  box-shadow: 0 4px 12px var(--brand-shadow);
  display: grid; place-items: center; color: var(--brand-ink); flex: 0 0 32px;
}
.brand-title { font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: .1px; color: var(--text); }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

.nav { flex: 1; overflow-y: auto; padding: 6px 10px 18px; }
.nav-group { font-size: 11px; color: var(--muted); padding: 18px 10px 7px; letter-spacing: .8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 8px; color: var(--text);
  cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; margin-bottom: 3px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--nav-hover); color: var(--text); }
.nav-item.active {
  background: var(--brand-soft); color: var(--brand); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand);
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .9; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; font-size: 11.5px; background: var(--danger); color: var(--danger-ink);
  border-radius: 999px; padding: 0 6px; line-height: 17px; height: 17px; font-weight: 600;
}

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 58px; background: var(--topbar-bg); backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 22px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.page-title { font-size: 16px; font-weight: 650; }
.page-desc { font-size: 12px; color: var(--muted); margin-left: 10px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px;
  cursor: pointer;
}

.view { padding: 20px 22px 48px; }

/* ============ 顶部告警条 ============ */
.alerts { padding: 14px 22px 0; }
.alert-bar {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  border-radius: 10px; margin-bottom: 8px; border: 1px solid;
  font-size: 12.8px; line-height: 1.6;
}
.alert-bar:last-child { margin-bottom: 0; }
.alert-bar.danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text); }
.alert-bar.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.alert-bar.info { background: var(--info-soft); border-color: var(--info-line); color: var(--info-text); }
.alert-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; background: currentColor; }
.alert-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.alert-txt b { font-weight: 700; }
.alert-txt span { opacity: .82; font-size: 12px; }
.alert-go {
  flex: none; margin-top: 1px; border: 1px solid currentColor; background: transparent; color: inherit;
  border-radius: 7px; padding: 3px 11px; font-size: 12px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.alert-go:hover { background: rgba(0, 0, 0, .05); }

/* ============ 通用组件 ============ */
.panel {
  background: var(--panel); background-image: var(--panel-grad);
  border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}
.panel-title { font-weight: 640; font-size: 14px; }
.panel-sub { font-size: 12px; color: var(--muted); }
.panel-head .spacer { margin-left: auto; }
.panel-body { padding: 16px; }
.panel-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); }
@media (max-width: 1280px) { .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1100px) { .g-4, .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) { .g-2, .g-3, .g-4, .g-5 { grid-template-columns: 1fr; } }

.kpi { padding: 16px; position: relative; overflow: hidden; }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; margin-top: 8px; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi-foot { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.kpi-icon {
  position: absolute; right: 14px; top: 14px; width: 30px; height: 30px;
  border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: .15s; white-space: nowrap; font-family: inherit;
}
.btn:hover { border-color: var(--line-3); background: var(--panel-soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); background: var(--panel); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--fill-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { color: var(--brand); cursor: pointer; font-size: 12.5px; background: none; border: 0; padding: 0; font-family: inherit; }
.btn-link:hover { text-decoration: underline; }

.input, .select, .textarea {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 10px; font-size: 13px; color: var(--text); background: var(--input-bg);
  font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 9px 10px; resize: vertical; line-height: 1.6; font-size: 12.5px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
/* 颜色选择器别跟着 .input 的 width:100% 撑成一条色带 */
input[type="color"].input { width: 76px; padding: 3px; cursor: pointer; }
/* 表单两列排布（分组编辑这类字段多的弹窗用 onFormMount 挂 class 打开） */
#mform.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
select.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23868ca0' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 520; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 0 0 auto; }
.grow { flex: 1 1 auto !important; min-width: 120px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { width: 230px; }
.toolbar .select { width: 140px; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12px;
  padding: 10px 12px; background: var(--thead-bg); border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--row-hover); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td.strong, table.tbl .strong { color: var(--text); font-weight: 600; }
table.tbl th:last-child, table.tbl td:last-child { white-space: nowrap; }
table.tbl .mono { font-family: var(--mono); font-size: 12px; letter-spacing: .2px; }
table.tbl .num { font-variant-numeric: tabular-nums; }
/* 卡密列表的勾选列（全选 / 单行） */
table.tbl th.chk-cell, table.tbl td.chk-cell { width: 38px; padding-left: 12px; padding-right: 0; text-align: center; }
table.tbl th.chk-cell input, table.tbl td.chk-cell input {
  width: 15px; height: 15px; margin: 0; vertical-align: middle;
  accent-color: var(--brand); cursor: pointer;
}
.actions { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 560; background: var(--fill); color: var(--text-2);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; background: var(--fill-2); color: var(--text-2); border: 1px solid transparent;
}
.pill.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); font-weight: 600; }
.pill.clickable { cursor: pointer; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--fill-2); border-radius: 10px; }
.tabs .tab { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.tabs .tab.active { background: var(--panel); color: var(--text); font-weight: 600;  }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { opacity: .5; margin-bottom: 10px; }

.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.pager .btn { height: 28px; padding: 0 10px; font-size: 12px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: var(--veil); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 60px 16px 40px;
  overflow-y: auto; animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--panel); border-radius: 16px; width: 520px; max-width: 100%;
  box-shadow: var(--shadow-pop); animation: pop .18s ease; overflow: hidden;
}
.modal.wide { width: 760px; }
.modal.narrow { width: 420px; }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal-title { font-weight: 650; font-size: 15px; }
.modal-close { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px; }
.modal-body { padding: 18px 20px; max-height: 64vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; background: var(--panel-soft); }

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--toast-bg); color: var(--toast-ink); padding: 9px 16px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-pop); animation: pop .18s ease; max-width: 80vw;
}
.toast.ok { background: var(--ok); color: var(--ok-ink); }
.toast.err { background: var(--danger); color: var(--danger-ink); }
.toast.warn { background: var(--warn); color: var(--warn-ink); }

/* 图表 */
.chart { width: 100%; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; }
.bar-row .name { width: 66px; color: var(--text-2); flex: 0 0 66px; }
.bar-track { flex: 1; height: 7px; background: var(--fill-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.bar-row .val { width: 62px; text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.alert-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.alert-item:last-child { border-bottom: 0; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 8px; }
.alert-dot.danger { background: var(--danger); }
.alert-dot.warn { background: var(--warn); }
.alert-dot.info { background: var(--info); }
.alert-title { font-weight: 600; color: var(--text); }
.alert-desc { color: var(--muted); margin-top: 2px; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

.copy-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel-soft);
  border: 1px dashed var(--line-3); border-radius: 7px; padding: 3px 8px; font-family: var(--mono);
  font-size: 12px; cursor: pointer; color: var(--text-2);
}
.copy-chip:hover { border-color: var(--brand-2); color: var(--brand); }

.step-list { counter-reset: s; }
.step-item { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.step-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex: 0 0 20px; margin-top: 1px;
}

/* ============ 登录 ============ */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--panel);
}
.login-left {
  background: var(--login-grad);
  color: #fff; padding: 54px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login-left::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%);
  right: -140px; bottom: -160px;
}
.login-left h1 { font-size: 30px; margin: 0 0 14px; letter-spacing: -.6px; line-height: 1.28; }
.login-left p { opacity: .82; line-height: 1.8; font-size: 13.5px; margin: 0; max-width: 420px; }
.login-feats { margin-top: auto; display: grid; gap: 12px; position: relative; z-index: 2; }
.login-feat { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; opacity: .94; }
.login-feat span.ic { width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: 0 0 22px; }
.login-right { display: grid; place-items: center; padding: 40px; }
.login-form { width: 330px; }
.login-form h2 { margin: 0 0 6px; font-size: 20px; }
.login-form .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }
.login-form .input { height: 40px; }
.login-form .btn.primary { width: 100%; height: 40px; margin-top: 8px; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); background: var(--panel-soft); border-radius: 9px; padding: 10px 12px; line-height: 1.7; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-left { display: none; } }

/* ============ 客户页面（手机优先） ============ */
body.client { background: #EDF3FB; }
.client-wrap { max-width: 460px; margin: 0 auto; padding: 22px 16px 40px; min-height: 100vh; }
.client-top { text-align: center; margin-bottom: 16px; }
.client-logo {
  width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 10px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2)); display: grid; place-items: center;
  color: var(--brand-ink); 
}
.client-title { font-size: 16px; font-weight: 650; }
.client-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 14px; }
.sheet-head { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; font-weight: 640; font-size: 14px; }
.sheet-body { padding: 18px; }
.sheet-foot { padding: 14px 18px; border-top: 1px solid var(--line-2); background: var(--panel-soft); }

.big-num { font-size: 30px; font-weight: 750; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }

.acct-card {
  background: linear-gradient(135deg, #F3F9FF, var(--brand-soft)); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.acct-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.acct-row:last-child { margin-bottom: 0; }
.acct-label { width: 54px; font-size: 12px; color: var(--muted); flex: 0 0 54px; }
.acct-value { font-family: var(--mono); font-size: 14.5px; color: var(--text); letter-spacing: .4px; letter-spacing: .4px; font-weight: 600; }

.plan {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer;
  position: relative; transition: .15s; background: var(--panel);
}
.plan:hover { border-color: var(--brand-line); }
.plan.active { border-color: var(--brand); background: var(--panel-hi);  }
.plan-name { font-size: 12.5px; color: var(--text-2); }
.plan-price { font-size: 19px; font-weight: 700; margin-top: 5px; color: var(--text); }
.plan-price small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.plan-old { font-size: 11.5px; color: var(--muted-2); text-decoration: line-through; margin-left: 4px; }
.plan-tag {
  position: absolute; top: -9px; right: 8px; background: linear-gradient(90deg,var(--warn-accent),var(--danger));
  color: #fff; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; font-weight: 600;
}

.qr-box { display: grid; place-items: center; padding: 10px; }
.qr-box svg { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.pay-channel { display: flex; gap: 10px; }
.pay-channel .ch {
  flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px;
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px;
}
.pay-channel .ch.active { border-color: var(--brand); background: var(--panel-hi); }
.timer { font-family: var(--mono); font-size: 12.5px; color: var(--warn); }

.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 306px; overflow-y: auto; padding-right: 4px; }
.city-btn {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 4px; text-align: center;
  font-size: 12.5px; cursor: pointer; background: var(--panel); position: relative;
}
.city-btn:hover { border-color: var(--brand-line); background: var(--panel-hi); }
.city-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.city-btn .stock { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.city-btn.full { opacity: .55; }
.province-title { font-size: 11.5px; color: var(--muted); margin: 12px 0 6px; grid-column: 1/-1; }

.note-list { font-size: 12px; color: var(--muted); line-height: 1.85; padding-left: 16px; margin: 0; }
.note-list li { margin-bottom: 2px; }

.result-hero { text-align: center; padding: 8px 0 4px; }
.result-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; }
.result-icon.ok { background: var(--ok-soft); color: var(--ok); }
.result-icon.warn { background: var(--warn-soft); color: var(--warn); }
.result-icon.err { background: var(--danger-soft); color: var(--danger); }

.skeleton { background: linear-gradient(90deg,var(--fill) 25%,var(--panel-soft) 37%,var(--fill) 63%); background-size: 400% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.hide { display: none !important; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; } .mb-10 { margin-bottom: 10px; } .mb-14 { margin-bottom: 14px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ================= 客户页：全屏扫一扫 ================= */
.pill.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.pill.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

.steps { display: grid; gap: 10px; }
.step { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.step b {
  flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; display: grid; place-items: center; font-weight: 700;
}

/* 全屏扫码：取景区吃掉整屏，操作区做成底部白底面板 */
.scan-mask {
  position: fixed; inset: 0; z-index: 60; background: #05080F;
  display: flex; animation: fadeIn .18s ease;
}
.scan-panel {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: #05080F;
}
.scan-close {
  border: 0; background: rgba(255, 255, 255, .16); width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-size: 13px; cursor: pointer; line-height: 1; flex: 0 0 auto;
}

.scan-stage {
  position: relative; flex: 1 1 auto; min-height: 0; background: #000;
  display: grid; place-items: center; overflow: hidden;
}
.scan-stage video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* 取景框：贴着屏幕比例放大，最小也比原来 168px 大一倍 */
.scan-frame {
  position: relative; z-index: 1;
  width: min(84vw, 70vh, 360px); height: min(84vw, 70vh, 360px);
  border-radius: 24px; border: 2px solid rgba(129, 140, 248, .95);
  box-shadow: 0 0 0 2000px rgba(5, 8, 15, .45);
}
.scan-frame::after {
  content: ''; position: absolute; left: 12px; right: 12px; height: 2px; top: 12px;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  animation: scanline 2.1s ease-in-out infinite; border-radius: 2px;
}
@keyframes scanline { 0%, 100% { top: 12px; opacity: .3; } 50% { top: calc(100% - 14px); opacity: 1; } }

.scan-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 20px; transform: translateX(-50%);
  color: #fff; font-size: 12.5px; background: rgba(0, 0, 0, .52); padding: 7px 14px;
  border-radius: 14px; text-align: center; line-height: 1.55;
  width: max-content; max-width: min(88%, 360px);
}

.scan-bar {
  flex: 0 0 auto; max-height: 46vh; overflow-y: auto; background: var(--panel);
  border-radius: 18px 18px 0 0; margin-top: -16px; position: relative; z-index: 3;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
}
.scan-nocam { display: none; text-align: center; margin-bottom: 18px; }
.scan-nocam-icon {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
}
.scan-nocam-tip {
  font-size: 12.5px; color: var(--text-2); line-height: 1.75; text-align: center;
  background: var(--panel-soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px;
}
/* 浏览器不给摄像头：取景区收起，整屏让给「拍照 / 选图 / 粘贴」 */
.scan-stage.no-cam { display: none; }
.scan-panel.no-cam .scan-bar {
  flex: 1 1 auto; max-height: none; margin-top: 0; border-radius: 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: center;
}
.scan-panel.no-cam .scan-nocam { display: block; }
.scan-panel.no-cam .scan-head {
  background: var(--panel); color: var(--text); border-bottom: 1px solid var(--line-2);
  padding-top: calc(14px + env(safe-area-inset-top));
}
.scan-panel.no-cam .scan-close { background: var(--fill); color: var(--muted); }

.scan-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  color: #fff; font-size: 15px; font-weight: 650; background: #0B1220;
}

.scan-loading {
  padding: 46px 20px 30px; text-align: center; display: grid; gap: 10px; justify-items: center;
  font-size: 14px; font-weight: 600;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line);
  border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: flex; background: var(--fill); border-radius: 11px; padding: 3px; }
.seg button {
  flex: 1; border: 0; background: transparent; font-size: 12.5px; padding: 9px 0;
  border-radius: 9px; color: var(--muted); font-family: inherit; cursor: pointer;
}
.seg button.on { background: var(--panel); color: var(--text); font-weight: 600; }

.upload-box {
  display: grid; gap: 4px; place-items: center; padding: 18px 12px; text-align: center;
  border: 1px dashed var(--line-3); border-radius: 13px; color: var(--text-2); font-size: 12.5px;
  cursor: pointer; background: var(--panel-soft);
}
.upload-box:hover { border-color: var(--brand-line); background: var(--panel-soft); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .82; } }

label.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
label.chk input { width: 16px; height: 16px; accent-color: var(--brand); }

/* 租赁档位编辑 */
.plan-rows { display: grid; gap: 7px; }
.plan-row { display: grid; grid-template-columns: 1.15fr .72fr .9fr; gap: 8px; align-items: center; }
.plan-row.head span { font-size: 11.5px; color: var(--muted); }
.plan-row .input { width: 100%; }

.card-strip {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line-2);
}

/* ============ 客户端：打开链接即自动识别地区 ============ */
.detect-hero { text-align: center; padding: 10px 0 2px; }
.detect-ring {
  position: relative; width: 88px; height: 88px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, var(--brand-soft), var(--panel-soft) 70%);
  color: var(--brand);
}
.detect-ring::before, .detect-ring::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--brand-line);
  animation: ripple 2.4s ease-out infinite;
}
.detect-ring::after { animation-delay: 1.2s; }
.detect-ring.done::before, .detect-ring.done::after { animation: none; opacity: 0; }
.detect-ring.done { background: radial-gradient(circle at 50% 45%, var(--ok-soft), #F6FCF9 70%); color: var(--ok); }
.detect-ring svg { position: relative; z-index: 1; }
@keyframes ripple {
  0% { transform: scale(.62); opacity: .85; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
.detect-title { font-size: 15.5px; font-weight: 650; letter-spacing: .2px; }
.detect-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 18px; transition: color .2s; }
.detect-city { font-size: 24px; font-weight: 700; letter-spacing: 1px; margin-top: 4px; }
.detect-city small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.detect-track { display: flex; gap: 6px; justify-content: center; margin: 16px 0 4px; }
.detect-track i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line-3); transition: all .25s;
}
.detect-track i.on { background: var(--brand); width: 18px; border-radius: 3px; }
.detect-track i.ok { background: var(--ok-line); }
.city-fix { font-size: 11.5px; color: var(--brand); cursor: pointer; margin-left: 8px; white-space: nowrap; }
.city-fix:hover { text-decoration: underline; }
.detect-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 7px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; vertical-align: 1px; margin-left: 6px;
}
.detect-badge.warn { background: var(--warn-soft); color: var(--warn); }

/* ============ 第一步：账号注册 ============ */
.btn.lg { height: 38px; padding: 0 18px; font-size: 13.5px; border-radius: 10px; }

.reg-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.reg-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.reg-stat-val { font-size: 22px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.reg-stat-val.ok { color: var(--ok); }
.reg-stat-val.warn { color: var(--warn); }
.reg-stat-label { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.reg-stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.reg-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .95fr); gap: 14px; align-items: start; }
@media (max-width: 1180px) { .reg-layout { grid-template-columns: 1fr; } .reg-stats { grid-template-columns: repeat(3, 1fr); } }
.reg-main .panel-body { padding: 18px 18px 16px; }

/* 步骤条 */
.reg-stepbar { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.reg-step {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted);
  padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--panel-soft);
}
.reg-step i {
  width: 18px; height: 18px; border-radius: 50%; background: var(--fill); color: var(--muted);
  display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700;
}
.reg-step.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.reg-step.on i { background: var(--brand); color: var(--brand-ink); }
.reg-step.done { color: var(--ok); }
.reg-step.done i { background: var(--ok-soft); color: var(--ok); }
.reg-step:not(:last-child)::after { content: ''; }

/* 锁定摘要 */
.reg-lock {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); background: var(--panel-hi); border-radius: 12px;
}
.reg-lock-row { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.reg-lock-row > span:first-child { font-size: 11.5px; color: var(--muted); }

.reg-code-tip {
  margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  background: var(--brand-soft); border: 1px dashed var(--brand-line); color: var(--info-text);
  display: flex; align-items: center; gap: 10px;
}
.reg-code-tip b { font-size: 15px; letter-spacing: 2px; }

.code-row { display: flex; gap: 8px; align-items: center; }
.code-row .input { flex: 1; min-width: 0; }
.code-input { letter-spacing: 4px; font-size: 17px; text-align: center; font-weight: 600; max-width: 280px; }

.reg-count { float: right; font-size: 12px; color: var(--muted); font-weight: 500; }
.reg-count.warn { color: var(--warn); }
.reg-count.bad { color: var(--danger); }

/* 代理选择 */
.proxy-list { display: grid; gap: 8px; }
.proxy-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: var(--panel);
  transition: border-color .16s, background .16s;
}
.proxy-item:hover { border-color: var(--brand-line); }
.proxy-item.on { border-color: var(--brand-2); background: var(--panel-hi); box-shadow: 0 0 0 3px var(--ring); }
.proxy-item input { display: none; }
.proxy-dot {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-3); flex: none; position: relative;
}
.proxy-item.on .proxy-dot { border-color: var(--brand); }
.proxy-item.on .proxy-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand);
}
.proxy-main { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.proxy-main b { font-size: 13px; }
.proxy-main small { color: var(--muted); font-size: 11.5px; }

.reg-noproxy { padding: 12px 14px; border: 1px solid var(--warn-line); background: var(--warn-soft); border-radius: 11px; }

.reg-actions {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap;
}

/* 注册成功 */
.reg-result { display: flex; gap: 14px; padding: 16px; border-radius: 12px; background: var(--ok-soft); border: 1px solid var(--ok-line); }
.reg-result-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--panel); color: var(--ok);
  display: grid; place-items: center; flex: none; 
}
.reg-result-title { font-size: 14.5px; font-weight: 650; color: var(--ok-text); }
.reg-result-sub { font-size: 12.5px; color: var(--ok); margin-top: 3px; }

.reg-tbl { table-layout: fixed; }
.reg-tbl td { vertical-align: top; overflow: hidden; }
.reg-tbl td:first-child { width: auto; }
.reg-out { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-warn { font-size: 11px; color: var(--warn); margin-top: 3px; }
.reg-side .table-wrap { border: 0; }
.reg-side .tbl th, .reg-side .tbl td { padding: 9px 8px; }
.reg-side .tbl th:first-child, .reg-side .tbl td:first-child { padding-left: 14px; }

/* ============ 号码池 / 接码渠道 ============ */
.reg-note-box {
  font-size: 12.5px; line-height: 1.85; color: var(--text-2);
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px;
}
.reg-note-box .copy-chip { margin: 0 2px; }

.chk {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.chk input { width: 14px; height: 14px; margin: 0; cursor: pointer; }

.sms-list { display: grid; gap: 8px; }
.sms-item {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--panel);
}
.sms-item.off { background: var(--panel-hi); opacity: .78; }
.sms-item-main { flex: 1; min-width: 0; }
.sms-item-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.sms-item-line {
  font-size: 11.5px; color: var(--muted); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sms-item-ops { display: flex; gap: 6px; flex: none; }

@media (max-width: 720px) {
  .sms-item { flex-direction: column; }
  .sms-item-ops { width: 100%; }
}

/* ============ 批量充值 ============ */
.br-sec { margin-top: 15px; }
.br-sec-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; font-weight: 650; color: var(--text); margin-bottom: 8px;
}
.br-sec-head .text-sm { font-weight: 400; }
.br-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 4px; }
.br-stat { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--panel-soft); }
.br-stat-k { font-size: 11.5px; color: var(--muted); }
.br-stat-v { font-size: 19px; font-weight: 700; letter-spacing: -.3px; margin-top: 3px; }
.br-stat-v.ok { color: var(--ok); }
.br-stat-v.warn { color: var(--warn); }
.br-stat-v.brand { color: var(--brand); }
.br-stat-s { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.br-sum {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 11px 13px; border-radius: 11px; font-size: 12.5px;
  background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ok-text);
}
.br-sum.link { background: var(--brand-soft); border-color: var(--brand-line); color: var(--info-text); }
.br-tbl-wrap { max-height: 330px; overflow: auto; border: 1px solid var(--line-2); border-radius: 11px; margin-top: 10px; }
.br-tbl-wrap .tbl { margin: 0; }
.br-tbl-wrap .tbl thead th { position: sticky; top: 0; background: var(--thead-bg); z-index: 1; }
.br-reason { font-size: 11px; color: var(--warn); margin-top: 3px; line-height: 1.4; }
.br-foot-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
@media (max-width: 760px) { .br-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 批量充值弹窗：比 wide 更宽，配置区压紧给明细表让空间 */
.modal.brw { width: 880px; }
.modal.brw .modal-body { max-height: 74vh; }
.br-note {
  font-size: 12.5px; line-height: 1.8; color: var(--text-2);
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px;
}
.br-sec { margin-top: 12px; }
.br-tbl-wrap { max-height: min(40vh, 360px); }

/* 批量充值：配置区固定、明细表自适应高度（避免双层滚动条） */
.modal.brw .modal-body { max-height: none; height: 78vh; display: flex; flex-direction: column; }
.br-wrap { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.br-cfg { flex: 0 0 auto; max-height: 54%; overflow-y: auto; padding-right: 4px; }
.br-live { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#brStats { flex: none; }
#brCityTip { flex: none; }
#brBody { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; margin-top: 4px; }
#brBody > .br-tbl-wrap { flex: 1 1 auto; min-height: 132px; max-height: none; }
#brBody > .empty { flex: 1 1 auto; }

/* ============ 真实注册（浏览器） ============ */
.xr-result { margin-top: 14px; }
.xr-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; }
.xr-step { font-weight: 650; color: var(--text); }
.xr-bar { height: 6px; border-radius: 99px; background: var(--line-2); margin: 9px 0 12px; overflow: hidden; }
.xr-bar-in { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .45s ease; }
.xr-bar-in.done { background: linear-gradient(90deg, var(--ok), var(--ok)); }
.xr-bar-in.bad { background: linear-gradient(90deg, var(--danger), var(--danger)); }
.xr-human {
  border: 1px solid var(--warn-line); background: var(--warn-soft); border-radius: 11px;
  padding: 11px 13px; margin-bottom: 10px;
}
.xr-human-tip { font-size: 12.5px; color: var(--warn); line-height: 1.6; }
.xr-err {
  border: 1px solid var(--danger-line); background: var(--danger-soft); border-radius: 11px;
  padding: 10px 13px; margin-bottom: 10px; font-size: 12.5px; color: var(--danger-text); line-height: 1.6;
}
.xr-err b { margin-right: 8px; font-family: var(--mono); }
.xr-ok {
  border: 1px solid var(--ok-line); background: var(--ok-soft); border-radius: 11px;
  padding: 10px 13px; margin-bottom: 10px; font-size: 12.5px; color: var(--ok-text);
}
.xr-logs {
  max-height: 210px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 11px;
  padding: 9px 11px; background: var(--panel-soft);
}
.xr-log { font-size: 12px; line-height: 1.75; color: var(--text-2); display: flex; gap: 9px; }
.xr-log-t { color: var(--muted); font-family: var(--mono); font-size: 11px; flex: none; padding-top: 1px; }
.xr-log.ok { color: var(--ok-text); }
.xr-log.warn { color: var(--warn); }
.xr-log.error { color: var(--danger-text); }
.xr-probe { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin-bottom: 12px; background: var(--panel-soft); }
.xr-probe.bad { border-color: var(--danger-line); background: var(--danger-soft); }
.xr-probe-head { font-size: 12.5px; font-weight: 650; margin-bottom: 6px; }
.xr-probe.ok .xr-probe-head { color: var(--ok-text); }
.xr-probe.bad .xr-probe-head { color: var(--danger-text); }
.xr-check { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.9; color: var(--text-2); }
.xr-dot { width: 7px; height: 7px; border-radius: 99px; flex: none; background: var(--line-3); }
.xr-check.ok .xr-dot { background: var(--ok); }
.xr-check.bad .xr-dot { background: var(--danger); }
.xr-check-d { color: var(--muted); font-size: 11px; margin-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-shot { margin-top: 12px; }
.xr-shot-head { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 10px; align-items: center; }
.xr-shot img { width: 100%; border: 1px solid var(--line-2); border-radius: 11px; display: block; }

/* ============ 真实充值 / 会员核对 ============ */
.rc-now {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.rc-scope { font-size: 13px; font-weight: 650; padding-top: 9px; }
.rc-list { margin-top: 10px; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; max-height: 300px; overflow-y: auto; }
.rc-row { display: grid; grid-template-columns: 130px 84px 120px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.rc-row:last-child { border-bottom: 0; }
.rc-row-reason { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-loading { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.sync-spin {
  width: 14px; height: 14px; border-radius: 99px; flex: none;
  border: 2px solid var(--line-3); border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.drift-box { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ok-text); }
.drift-box.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.drift-box.bad { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text); }
.ev-list { margin-top: 5px; max-height: 140px; overflow-y: auto; }
.ev-row { font-size: 11.5px; color: var(--muted); line-height: 1.85; word-break: break-all; }
.xr-ok.bad { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text); }
.xr-ok.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
@media (max-width: 760px) {
  .rc-now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-row { grid-template-columns: 1fr 70px; }
}
.rc-sec-title { font-size: 13px; font-weight: 700; color: var(--text); padding-top: 12px; border-top: 1px dashed var(--line); }
.xr-check.skip .xr-dot { background: var(--line-3); }
.xr-check.skip { color: var(--muted); }

/* ---------------- 一键出码（新用户首月 8.8） ---------------- */
.pq-loading { text-align: center; padding: 44px 16px; color: var(--text); font-size: 14px; }
.pq-spin { width: 26px; height: 26px; margin: 0 auto 12px; border: 3px solid var(--line-2); border-top-color: var(--brand, #2563eb); border-radius: 50%; animation: pqspin 0.9s linear infinite; }
.pq-spin-sm { width: 16px; height: 16px; margin: 6px auto 10px; border-width: 2px; }
@keyframes pqspin { to { transform: rotate(360deg); } }
.pq-qrbox { width: 264px; margin: 4px auto 14px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pq-qrbox img { width: 100%; display: block; image-rendering: pixelated; }
.pq-payline { text-align: center; font-size: 17px; }
.pq-payline b { color: var(--danger); font-size: 22px; }
.pq-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; line-height: 1.5; }
.pq-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.pq-err { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger-text); border-radius: 8px; padding: 14px; font-size: 13px; line-height: 1.6; text-align: center; }
.pq-sync { margin-top: 14px; padding: 12px 14px; border-radius: 8px; text-align: center; font-size: 13.5px; }
.pq-sync-ok { color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-line); padding: 12px; border-radius: 8px; }
.pq-sync-warn { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); padding: 12px; border-radius: 8px; }

/* ---------- 批量出码（逐个付款 / 全部二维码） ---------- */
.qb-top { margin-bottom: 12px; }
.qb-prog { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.qb-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width 0.35s ease; }
.qb-counts { margin-top: 7px; font-size: 13px; color: var(--text-2); }
.qb-tabs { max-width: 320px; margin-bottom: 12px; }
.qb-pane { min-height: 120px; }

.qb-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel); }
.qb-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.qb-phone { font-size: 16px; font-weight: 700; letter-spacing: 0.4px; font-family: var(--mono); }
.qb-qrwrap { min-height: 240px; display: flex; align-items: center; justify-content: center; }
.qb-qrbox { margin: 0 auto 10px; }
.qb-qrph { text-align: center; padding: 40px 0; color: var(--muted); }
.qb-tip { text-align: center; font-size: 13px; color: var(--text-2); min-height: 20px; margin: 6px 0 2px; }
.qb-acts { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.qb-acts .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.qb-empty { text-align: center; padding: 46px 16px; color: var(--text); font-size: 14.5px; line-height: 2; }

.qb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.qb-cell { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.qb-cell-qr { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 8px; }
.qb-cell-qr img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.qb-cell-ph { font-size: 12px; color: var(--muted); }
.qb-cell-meta { padding: 8px 10px 10px; border-top: 1px solid var(--line-2); }

.qb-listbox { margin-top: 16px; }
.qb-list-head { font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 8px; }
table.qb-tbl { font-size: 13px; table-layout: fixed; width: 100%; }
table.qb-tbl th:nth-child(1), table.qb-tbl td:nth-child(1) { width: 112px; }
table.qb-tbl th:nth-child(2), table.qb-tbl td:nth-child(2) { width: 76px; }
table.qb-tbl th:nth-child(3), table.qb-tbl td:nth-child(3) { width: 86px; }
table.qb-tbl th:nth-child(4), table.qb-tbl td:nth-child(4) { width: 170px; }
table.qb-tbl th:nth-child(5), table.qb-tbl td:nth-child(5) { width: 96px; }
table.qb-tbl tr.qb-cur { background: var(--brand-soft); }
/* 说明列是可换行的普通文本，不能被 .tbl 基类的 last-child:nowrap 撑开（这里必须压过它） */
table.qb-tbl th:last-child, table.qb-tbl td:last-child { white-space: normal; }
.qb-why { white-space: normal; word-break: break-word; line-height: 1.5; }
.qb-sub { text-align: right; margin-top: 2px; }
.qb-dl { font-size: 12px; color: var(--brand); text-decoration: none; }
.qb-dl:hover { text-decoration: underline; }
.qb-cell-dl { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--brand); text-decoration: none; }

/* 批量出码弹窗单独一档：普通块级流，不要 brw 的 flex 纵向布局 */
.modal.qbw { width: 880px; }
.modal.qbw .modal-body { max-height: 76vh; overflow-y: auto; }

/* ======================= 批量重登进度 ======================= */
.rl-nums { display: flex; gap: 22px; align-items: baseline; margin-bottom: 12px; }
.rl-nums > div { display: flex; flex-direction: column; gap: 2px; }
.rl-nums b { font-size: 22px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.rl-nums span { font-size: 12px; color: var(--muted); }
.rl-nums .ok b { color: var(--ok); }
.rl-nums .fail b { color: var(--danger); }
.rl-bar { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.rl-bar > i { display: block; height: 100%; background: var(--brand); transition: width .35s ease; }

/* ===== 客户端极简状态页（2026-11 改版）===== */
.ready-hero { text-align: center; padding: 14px 0 0; }
.ready-icon {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.ready-icon.ok { background: var(--ok-solid); color: var(--ok-on); }
.ready-title { font-size: 18px; font-weight: 700; color: var(--text); }
.ready-sub { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; padding: 0 10px; }
.ready-meta { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.ready-meta b { font-size: 16px; color: var(--text); margin: 0 2px; }
.ready-time { text-align: center; background: var(--panel-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 10px; }
/* 已登录页的「别退出」提示。
   用主色蓝而不是红色：红色在中文语境里等于「出错/失败」，
   客户刚扫码成功就看到一片红，会以为没登进去。 */
.stay-tip {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 18px; padding: 13px 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  color: var(--brand-strong);
  text-align: left;
}
.stay-tip svg { flex: none; margin-top: 2px; }
.stay-tip b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.6; }
.stay-tip span { display: block; font-size: 12.5px; line-height: 1.7; opacity: .88; margin-top: 3px; }
.link-mini { font-size: 12.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ===== 安卓端（微博登录）凭据卡 =====
   账号密码要能一眼看清、能一键复制：客户是手抄/粘贴到迅雷 App 里的，
   手机屏幕上字太小会直接抄错，所以这里字号比正文大一档。 */
.cred-box {
  margin-top: 18px; border: 1px solid var(--line-2); border-radius: 14px;
  overflow: hidden; background: var(--panel-soft);
}
.cred-row { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.cred-row:last-of-type { border-bottom: 0; }
.cred-row > span { flex: none; width: 60px; font-size: 12.5px; color: var(--muted); }
.cred-row > b { flex: 1; font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; letter-spacing: .2px; }
.mini {
  flex: none; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--text-2); border-radius: 8px; padding: 5px 9px;
  font-size: 12px; cursor: pointer; line-height: 1.2;
}
.mini:active { transform: scale(.96); }
.cred-tip { padding: 10px 14px; font-size: 12px; color: var(--muted); line-height: 1.7; background: var(--panel); border-top: 1px solid var(--line-2); }
.city-prov { font-size: 12px; color: var(--muted); margin: 14px 0 8px; }
.city-prov:first-child { margin-top: 0; }

/* ---- 每日对账状态条（账号页顶部） ---- */
.recon-bar{display:flex;align-items:center;gap:8px;padding:9px 16px;border-bottom:1px solid var(--line-2);background:var(--panel-soft);font-size:13px}
.recon-bar.alert{background:var(--warn-soft)}
.recon-bar.running{background:var(--brand-soft)}
.recon-dot{width:7px;height:7px;border-radius:50%;background:var(--ok);flex:none}
.recon-bar.alert .recon-dot{background:var(--warn)}
.recon-dot.off{background:var(--line-3)}
.recon-bar.running .recon-dot{background:var(--brand);animation:reconPulse 1.2s ease-in-out infinite}
.recon-label{font-weight:600}
.recon-sched{font-variant-numeric:tabular-nums;color:var(--brand);font-weight:600}
.recon-track{width:150px;height:5px;border-radius:3px;background:var(--line-3);overflow:hidden;flex:none}
.recon-track i{display:block;height:100%;background:var(--brand);transition:width .4s ease}
@keyframes reconPulse{0%,100%{opacity:1}50%{opacity:.35}}

/* 数据面板预警：默认只露前两条，点「查看全部」在原卡片内展开 */
.alerts-box.fold .alert-item:nth-child(n+3) { display: none; }

/* 面板预警：三条类型计数，填掉折叠后卡片下半部的空白 */
.alert-sum{display:flex;gap:8px;padding:0 16px 10px}
.alert-sum > div{
  flex:1;min-width:0;padding:8px 10px;border-radius:8px;
  background:var(--bg-2);border:1px solid var(--line-2);
}
.alert-sum span{display:block;font-size:11px;color:var(--muted);line-height:1.4}
.alert-sum b{
  display:block;font-size:16px;font-weight:600;line-height:1.2;color:var(--text);
  font-variant-numeric:tabular-nums;
}

/* 账号页：按入库日期筛选（配合「全选全部」+「改分组」把某天进的号一次归组） */
.day-filter {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; font-size: 12.5px; color: var(--muted);
}
.day-filter input {
  width: 140px; height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px;
  font-family: inherit; font-size: 13px; color: var(--text); background: var(--input-bg); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.day-filter input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--ring); }
/* 筛选生效时整块变蓝，避免忘了自己在筛某一天就点了全选 */
.day-filter.on { color: var(--brand); font-weight: 600; }
.day-filter.on input { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
/* 筛选时才出现的「入库时间」，用来看这批号是不是真是那天的 */
.day-in { color: var(--brand); margin-top: 2px; }

/* 代理池 · 批量导入：粘贴后先把「进几条 / 重几条 / 哪几行不合法」摆出来再落库 */
.bpv { margin-top: 2px; }
.bpv-empty {
  padding: 11px 12px; border: 1px dashed var(--line); border-radius: 9px;
  background: var(--bg-2); font-size: 12.5px; color: var(--muted);
}
.bpv-sum { display: flex; flex-wrap: wrap; gap: 8px; }
.bpv-k {
  padding: 6px 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-2);
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.bpv-k b { margin-left: 3px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bpv-k.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.bpv-k.dup { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.bpv-k.bad { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.bpv-bad {
  margin: 8px 0 0; padding: 8px 10px 8px 26px; max-height: 132px; overflow: auto;
  border-radius: 8px; border: 1px solid var(--danger-line); background: var(--danger-soft);
  font-size: 12px; line-height: 1.7; color: var(--danger-text);
}
.bpv-bad li::marker { color: var(--danger-line); }
.bpv-bad .mono { color: var(--danger-text); }
.bpv-tip { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 代理池：标称城市 ≠ 实测出口省份 —— 这种出口注册出来的号会落到别的省，必须一眼看见 */
.city-bad {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px;
  font-size: 11px; line-height: 1.55; font-weight: 600; color: var(--danger);
  background: var(--danger-soft); border: 1px solid var(--danger-line);
  vertical-align: 1px; cursor: help;
}

/* 代理池：城市识别中 / 识别失败 */
.city-pending {
  display: inline-block; font-size: 12.5px; color: var(--brand);
  animation: cityPulse 1.3s ease-in-out infinite;
}
@keyframes cityPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.city-fail { color: var(--danger); cursor: help; }

/* 代理去重：合并前把「保留谁 / 删谁 / 账号往哪迁」摊开 */
.dd-head { font-size: 13px; line-height: 1.7; color: var(--text-2); margin-bottom: 2px; }
.dd-row { padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.dd-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.dd-addr { font-size: 12.5px; color: var(--text); }
.dd-keep { font-size: 12px; line-height: 1.7; color: var(--ok); }
.dd-drop { font-size: 12px; line-height: 1.7; color: var(--danger); }
.dd-warn {
  margin-bottom: 10px; padding: 9px 11px; border-radius: 8px;
  background: var(--danger-soft); border: 1px solid var(--danger-line);
  font-size: 12.5px; line-height: 1.7; color: var(--danger-text);
}


/* 批量真实注册：每个号的进度行 */
.xrb-box { margin-top: 14px; }
.xrb-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 280px; overflow: auto; }
.xrb-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--bg); font-size: 12.5px; }
.xrb-row.s-running { background: var(--info-soft); }
.xrb-row.s-done { background: var(--ok-soft); }
.xrb-row.s-failed { background: var(--danger-soft); }
.xrb-row.s-skipped { background: var(--warn-soft); }
.xrb-i { width: 22px; flex: none; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.xrb-ph { flex: none; font-variant-numeric: tabular-nums; }
.xrb-why { flex: 1; min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 注册页标题栏：按钮多了以后挤成一团，改成放不下就整体换行，标题副文案不再被压成竖条 */
#regRoot .reg-main .panel-head { flex-wrap: wrap; row-gap: 10px; }
#regRoot .reg-main .reg-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* =======================================================================
   主题切换（仅后台：html[data-app="admin"]）
   深空 = 深底 + 青紫光谱 + 细发光边；极昼电青 = 纸白底 + 电青
   客户端页不挂 data-app，继续用 :root 的老配色，观感不变
   ======================================================================= */
html[data-app="admin"] .sidebar { background: var(--sidebar-bg); }
html[data-app="admin"][data-mode="dark"] { color-scheme: dark; }
html[data-app="admin"] .layout { position: relative; z-index: 1; }

/* 深空：两团光谱 + 44px 网格，只铺背景，不挡内容 */
html[data-app="admin"][data-mode="dark"] body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(79, 165, 255, .11), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(34, 120, 242, .10), transparent 60%);
}
html[data-app="admin"][data-mode="dark"] body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 18%, transparent 76%);
}

/* 主按钮：左浅右深的横向渐变，对齐设计稿里那颗「一键登录」 */
html[data-app="admin"] .btn.primary {
  background-color: var(--brand);
  background-image: linear-gradient(100deg, var(--brand-2), var(--brand) 72%);
  border-color: transparent;
}
html[data-app="admin"] .btn.primary:hover {
  background-color: var(--brand-strong);
  background-image: linear-gradient(100deg, var(--brand-2), var(--brand-strong) 72%);
}

/* body 的 ::before/::after 是 fixed + z-index:0，会和内容抢绘制层；
   把 .layout 抬一层，保证卡片永远在光晕和网格之上 */
html[data-app="admin"] .layout { position: relative; z-index: 1; }

/* 侧栏右侧那道光，切主题时才出现，是最省的「科技感」信号 */
html[data-app="admin"] .sidebar { position: sticky; }
html[data-app="admin"][data-mode="dark"] .sidebar::after {
  content: ""; position: absolute; right: -1px; top: 10%; width: 1px; height: 46%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--brand), var(--brand-2), transparent);
  opacity: .5;
}

/* 深色下表格表头贴在滚动区顶部时要盖住内容 */
html[data-app="admin"][data-mode="dark"] .br-tbl-wrap .tbl thead th { background: var(--thead-bg); }

/* 深色滚动条 */
html[data-app="admin"][data-mode="dark"] { scrollbar-color: rgba(255, 255, 255, .16) transparent; }
html[data-app="admin"][data-mode="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-app="admin"][data-mode="dark"] ::-webkit-scrollbar-track { background: transparent; }
html[data-app="admin"][data-mode="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .14); border-radius: 9px;
  border: 3px solid transparent; background-clip: content-box;
}
html[data-app="admin"][data-mode="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .24); background-clip: content-box; }

/* 主按钮在深色下加一圈光，别让它糊进背景 */
html[data-app="admin"][data-mode="dark"] .btn.primary {
  box-shadow: 0 8px 22px -12px var(--brand-shadow), 0 1px 0 rgba(255, 255, 255, .35) inset;
}
html[data-app="admin"][data-mode="dark"] .btn.primary:hover { filter: brightness(1.06); }
html[data-app="admin"][data-mode="dark"] .brand-mark {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 8px 22px -10px var(--brand-shadow);
}
html[data-app="admin"][data-mode="dark"] .avatar {
  box-shadow: 0 0 0 1px var(--brand-line), 0 0 18px -8px var(--brand-shadow);
}
html[data-app="admin"][data-mode="dark"] .nav-item.active { box-shadow: inset 2px 0 0 var(--brand), 0 0 20px -14px var(--brand-shadow); }

/* ---- 主题开关（顶栏，一键切换） ---- */
.theme-sw {
  position: relative; width: 58px; height: 28px; flex: 0 0 58px; padding: 0;
  border-radius: 999px; border: 1px solid var(--line); background: var(--fill);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: space-between;
  transition: background .2s var(--ease, ease), border-color .2s var(--ease, ease);
}
.theme-sw:hover { border-color: var(--line-3); }
.theme-sw:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.theme-sw .ts-i { position: relative; z-index: 1; width: 50%; display: grid; place-items: center; color: var(--muted); transition: color .18s; }
.theme-sw .ts-i svg { width: 13px; height: 13px; }
.theme-sw .ts-knob {
  position: absolute; top: 2px; left: 2px; width: 24px; height: 22px; border-radius: 999px;
  background: var(--panel); box-shadow: 0 1px 3px rgba(16, 24, 40, .18);
  transition: transform .22s cubic-bezier(.2, 0, 0, 1);
}
html[data-mode="dark"] .theme-sw .ts-knob { transform: translateX(30px); background: rgba(255, 255, 255, .10); box-shadow: none; }
html[data-mode="dark"] .theme-sw .ts-moon { color: var(--brand); }
html[data-mode="light"] .theme-sw .ts-sun { color: var(--brand); }

/* ---- 后台主题细调：数字与表头更像「仪表」，不是把浅色刷成深色 ---- */
html[data-app="admin"] .kpi-value {
  font-size: 27px; font-weight: 660; letter-spacing: -.7px;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
html[data-app="admin"] table.tbl th {
  font-size: 11.5px; letter-spacing: .03em; font-weight: 600;
}
html[data-app="admin"] .panel { transition: border-color .2s ease, box-shadow .2s ease; }
html[data-app="admin"] .panel:hover { border-color: var(--line-3); }
html[data-app="admin"][data-mode="dark"] .panel:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .045) inset, 0 26px 60px -34px rgba(0, 0, 0, .95);
}
/* 深色下原生勾选框统一走 --brand：浏览器会按 accent 亮度自动选深/浅勾，
   实测亮蓝主色上落的是深勾，对比够（不再另设一档色，避免混用两种蓝） */
html[data-app="admin"][data-mode="dark"] input[type="checkbox"],
html[data-app="admin"][data-mode="dark"] input[type="radio"] { accent-color: var(--brand); }
html[data-app="admin"][data-mode="dark"] .topbar { border-bottom-color: var(--line); }
