
  /* ========== 页面级 reset（2026-10-15） ========== */
  /* 本文件被 dist/portal 独立加载，不经 style.css 的全局 reset（* { margin:0 }）。
     浏览器默认 body 8px 外边距会把 100vh 高的外壳顶出视口 16px → 右侧冒出页面滚动条
     （管理后台无此问题，因为它引了 style.css）。这里补归零：
     桌面端整页不滚动（侧栏 .side-nav、内容区 .admin-content 各自内部滚）；
     ≤860px 移动端外壳改为 height:auto + min-height:100vh（见下方 media query），页面恢复自然滚动，
     故 overflow:hidden 只在 861px 以上生效，避免把移动端内容裁掉。 */
  html, body { margin: 0; padding: 0; }
  body { min-width: 0; }
  @media (min-width: 861px) {
    html, body { height: 100%; overflow: hidden; }
  }

  /* ========== 控制台外壳 ========== */
  .admin-shell { display: flex; width: 100%; height: 100vh; background: #F5F6F8; overflow: hidden; }
  .admin-side {
    flex: 0 0 208px; display: flex; flex-direction: column;
    background: #FFFFFF; border-right: 1px solid #E5E6EB;
  }
  .side-logo { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
  .side-logo .logo-ico {
    width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; overflow: hidden;
    background: #2E6CEC; color: #fff; font-size: 16px;
  }
  /* 2026-10-15：品牌 LOGO 注入槽位（brand.js [data-brand-logo]）。
     盒定尺 32×32 正圆（border-radius:50% + overflow:hidden），img 100%×100% + object-fit:contain，
     不裁剪、不溢出、不变形；宽图两侧留白居中 */
  .side-logo .logo-ico img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .side-logo .logo-ico.brand-has-img,
  [data-theme='dark'] .side-logo .logo-ico.brand-has-img {
    width: 32px; height: 32px; padding: 0; background: none;
  }
  .side-logo b { font-size: 15px; }
  .side-logo p { font-size: 11px; color: #8F959E; margin-top: 1px; }
  .side-nav { flex: 1; overflow-y: auto; padding: 6px 10px; }
  .side-item {
    display: flex; align-items: center; gap: 9px; padding: 9px 12px; margin: 2px 0;
    border-radius: 8px; font-size: 13px; color: #454851; cursor: pointer; user-select: none;
  }
  .side-item:hover { background: #F2F3F5; }
  .side-item.active { background: #EEF4FF; color: #2E6CEC; font-weight: 600; }
  .side-item .ico { width: 16px; height: 16px; color: inherit; flex: 0 0 auto; }
  .side-foot .ico { width: 14px; height: 14px; color: inherit; flex: 0 0 auto; }
  /* 分站设置：二级域名 + Logo 上传 */
  .subdomain-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .subdomain-box .text-input { min-width: 180px; max-width: 260px; }
  /* 已生效域名锁定态：只读 + 视觉弱化（2026-10-14，防保存时重复提交申请） */
  .subdomain-box .text-input[readonly] { background: #f4f6f9; color: #6b7280; cursor: not-allowed; }
  [data-theme='dark'] .subdomain-box .text-input[readonly] { background: #23262d; color: #8a919c; }
  .subdomain-suffix { color: #8F959E; font-size: 13px; }
  .sub-invite-card { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #e5e7eb; }
  .sub-invite-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
  .sub-invite-card .mt-hint { margin-bottom: 12px; }
  .sub-invite-card .text-input { background: #f8fafc; color: #1f2937; }
  .sub-invite-card .subdomain-box .mini-btn { flex: 0 0 auto; }
  .subdomain-tip { margin-top: 6px; font-size: 12px; min-height: 18px; }
  /* 裸 text-input 默认 width:100% 会整行拉满；分站设置里与专属域名框（max 260）对齐收窄 */
  #sec-branding .form-row > .text-input { width: auto; min-width: 240px; max-width: 260px; }
  .subdomain-tip .st-pending { color: #E37318; }
  .subdomain-tip .st-approved { color: #16845B; }
  .subdomain-tip .st-rejected { color: #C9363E; }
  .subdomain-tip .st-info { color: #8F959E; }
  .logo-uploader { display: flex; flex-direction: column; gap: 10px; }
  .logo-preview-wrap { display: flex; align-items: center; gap: 10px; }
  .logo-preview-wrap img { width: 64px; height: 64px; object-fit: contain; border: 1px solid #E5E6EB; border-radius: 8px; background: #FAFBFC; padding: 6px; }
  .logo-upload-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 120px; height: 36px; border: 1px dashed #B8BCC4; border-radius: 8px; color: #454851; font-size: 13px; cursor: pointer; transition: all .15s; }
  .logo-upload-btn:hover { border-color: #2E6CEC; color: #2E6CEC; }
  .logo-upload-btn input { position: absolute; opacity: 0; width: 0; height: 0; }
  .side-item .soon { margin-left: auto; font-size: 10px; color: #B0B4BC; background: #F2F3F5; padding: 1px 6px; border-radius: 4px; }
  /* 一级分组菜单（用户管理）：可展开/收起，子项缩进 */
  .side-group { margin-bottom: 2px; }
  .side-group-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; color: #454851; font-size: 13.5px; font-weight: 600; border-radius: 8px; user-select: none; }
  .side-group-head:hover { background: #F2F3F5; }
  .side-group-head .ico { width: 17px; height: 17px; flex: none; color: #646A73; }
  .side-group-head .chev { width: 14px; height: 14px; margin-left: auto; color: #B0B4BC; transition: transform .18s ease; }
  .side-group.open .side-group-head .chev { transform: rotate(180deg); }
  .side-group.open .side-group-head, .side-group:has(.side-item.active) .side-group-head { color: #2E6CEC; }
  .side-group:has(.side-item.active) .side-group-head .ico { color: #2E6CEC; }
  .side-sub { display: none; padding: 2px 0 4px; }
  .side-group.open .side-sub { display: block; }
  .side-sub .side-item { padding: 8px 14px 8px 42px; font-size: 13px; }
  .side-sub .sub-dot { width: 5px; height: 5px; border-radius: 50%; background: #C9CDD4; flex: none; margin-right: 8px; transition: background .15s; }
  .side-sub .side-item.active .sub-dot { background: #2E6CEC; }
  /* 点数记录：工具栏 + 类型筛选 pill */
  .cl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
  .cl-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .cl-pill { padding: 5px 14px; border-radius: 15px; border: 1px solid #E5E6EB; background: #fff; color: #646A73; font-size: 12.5px; cursor: pointer; transition: all .15s; }
  .cl-pill:hover { border-color: #B8BCC4; }
  .cl-pill.active { border-color: #2E6CEC; background: #2E6CEC; color: #fff; font-weight: 600; }
  .cl-pill.p-recharge { color: #16845B; }
  .cl-pill.p-consume { color: #C97A12; }
  .cl-pill.p-refund { color: #2E6CEC; }
  .cl-pill.p-adjust { color: #646A73; }
  .cl-pill.p-recharge.active, .cl-pill.p-consume.active, .cl-pill.p-refund.active, .cl-pill.p-adjust.active { color: #fff; }
  .cl-pill.p-recharge.active { border-color: #16845B; background: #16845B; }
  .cl-pill.p-consume.active { border-color: #C97A12; background: #C97A12; }
  .cl-pill.p-refund.active { border-color: #2E6CEC; background: #2E6CEC; }
  .cl-pill.p-adjust.active { border-color: #646A73; background: #646A73; }
  .cl-amt-in { color: #16845B; font-weight: 600; }
  .cl-amt-out { color: #C9363E; font-weight: 600; }
  .cl-type-tag { font-weight: 600; }
  .cl-type-t-recharge { color: #16845B; }
  .cl-type-t-consume { color: #C97A12; }
  .cl-type-t-refund { color: #2E6CEC; }
  .cl-type-t-adjust { color: #646A73; }
  /* 点数记录：用户搜索 */
  .cl-search { display: flex; align-items: center; gap: 6px; }
  .cl-search-input { height: 30px; padding: 0 10px; width: 200px; border: 1px solid #E5E6EB; border-radius: 6px; background: #fff; color: #1D2129; font-size: 13px; outline: none; transition: border-color .15s; }
  .cl-search-input:focus { border-color: #2E6CEC; }
  .cl-search-btn { height: 30px; padding: 0 14px; border: 1px solid #2E6CEC; border-radius: 6px; background: #2E6CEC; color: #fff; font-size: 13px; cursor: pointer; transition: all .15s; }
  .cl-search-btn:hover { background: #2456B8; border-color: #2456B8; }
  .cl-search-clear { height: 30px; min-width: 30px; padding: 0 8px; border: 1px solid #E5E6EB; border-radius: 6px; background: #fff; color: #646A73; font-size: 16px; line-height: 1; cursor: pointer; }
  .cl-search-clear:hover { border-color: #B8BCC4; color: #1D2129; }
  /* 点数记录：分页 */
  .cl-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
  .cl-pager-left { display: flex; align-items: center; gap: 6px; color: #646A73; font-size: 13px; }
  .cl-pagesize { height: 30px; padding: 0 8px; border: 1px solid #E5E6EB; border-radius: 6px; background: #fff; color: #1D2129; font-size: 13px; cursor: pointer; }
  .cl-pagesize:hover { border-color: #B8BCC4; }
  .cl-pager-right { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
  .cl-page-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #E5E6EB; border-radius: 6px; background: #fff; color: #1D2129; font-size: 13px; cursor: pointer; transition: all .15s; }
  .cl-page-btn:hover:not(.active):not(.disabled):not(.dots) { border-color: #2E6CEC; color: #2E6CEC; }
  .cl-page-btn.active { border-color: #2E6CEC; background: #2E6CEC; color: #fff; font-weight: 600; cursor: default; }
  .cl-page-btn.disabled { color: #C9CDD4; cursor: not-allowed; border-color: #F0F1F3; background: #FAFBFC; }
  .cl-page-btn.dots { border-color: transparent; background: transparent; cursor: default; min-width: 18px; padding: 0; }
  /* 左下角导航（2026-10-17 用户要求改版）：第一行 创作中心/用户中心，第二行 分销中心/代理中心，
     退出登录移到底部做横向通栏按钮（.side-logout-wide） */
  .side-foot {
    padding: 14px 12px 16px;
    border-top: 1px solid #F0F1F3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #fff;
  }
  .side-foot a, .side-foot .side-logout {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    padding: 13px 4px;
    border: 1px solid #E5E6EB; border-radius: 12px;
    background: #FAFBFC; color: #454851;
    font-size: 12.5px; font-weight: 500; line-height: 1.15; text-align: center;
    text-decoration: none; cursor: pointer;
    transition: all .16s ease;
  }
  .side-foot a .ico, .side-foot .side-logout .ico { width: 22px; height: 22px; color: inherit; flex: none; }
  .side-foot a:hover, .side-foot .side-logout:hover {
    background: #EEF4FF; border-color: #2E6CEC; color: #2E6CEC;
    transform: translateY(-1px); box-shadow: 0 6px 16px rgba(46,108,236,.14);
  }
  .side-foot a:active, .side-foot .side-logout:active { transform: translateY(0); }
  .side-foot a.current {
    background: #2E6CEC; border-color: #2E6CEC; color: #fff;
    box-shadow: 0 6px 16px rgba(46,108,236,.22); cursor: default;
  }
  /* 退出登录：横向通栏（占满两列），图标与文字横排 */
  .side-foot .side-logout-wide {
    grid-column: 1 / -1;
    flex-direction: row; gap: 8px; padding: 11px 4px;
  }

  .admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .admin-topbar {
    flex: 0 0 auto; min-height: 58px; padding: 10px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: #FFFFFF; border-bottom: 1px solid #E5E6EB;
  }
  .admin-topbar h1 { font-size: 16px; font-weight: 650; }
  .admin-topbar .top-right { display: flex; align-items: center; gap: 16px; }
  .admin-topbar #headUser { font-size: 13px; color: #646A73; }
  .pwd-link { display: inline-flex; align-items: center; gap: 6px; color: #2E6CEC; font-size: 13px; cursor: pointer; }
  .pwd-link:hover { text-decoration: underline; }

  .admin-content { flex: 1; overflow-y: auto; padding: 22px 24px; }
  .admin-sec { display: none; max-width: none; margin: 0; }
  .admin-sec.active { display: block; }
  /* 宽度策略（2026-09-22 修订）：页面一律全宽；内容稀疏的表单只在表单容器本身限宽 */
  .sec-card {
    padding: 22px 24px; border-radius: 10px; background: #fff;
    border: 1px solid #E5E6EB; box-shadow: 0 1px 3px rgba(31,35,41,.04); margin-bottom: 18px;
    box-sizing: border-box;
  }
  .sec-card h2 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
  .sec-card .mt-hint { margin-bottom: 12px; }

  /* ========== 对话模型管理 ========== */
  .chat-model-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px; border: 1px solid #EEF0F3; border-radius: 10px; margin-bottom: 10px; background: #FAFBFC; }
  .chat-model-row .cm-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; min-width: 140px; }
  .chat-model-row .cm-field.cm-wide { flex: 1 1 100%; }
  .chat-model-row label { font-size: 11px; color: #8F959E; }
  .chat-model-row .cm-op { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
  .chat-model-row .cm-op label { font-size: 11px; color: #8F959E; }
  .chat-model-row .cm-del { margin-left: auto; width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 50%; background: #FDECEC; color: #C9363E; font-size: 15px; cursor: pointer; }
  .chat-model-row .cm-del:hover { background: #F9D7D7; }
  .chat-prov-select, .chat-model-col .credit-input, .chat-caps, .chat-desc { width: 100%; }
  .chat-model-col { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
  .chat-model-col .chat-label { font-weight: 600; color: #454851; }
  .chat-model-col .chat-id { color: #9296A0; font-size: 11px; }
  .chat-row-op { text-align: center; white-space: nowrap; }
  .rate-cell { vertical-align: middle; }
  .rate-stack { display: flex; flex-direction: column; gap: 4px; }
  .rate-line { display: flex; align-items: center; gap: 4px; }
  .rate-line .credit-input { width: 100%; box-sizing: border-box; min-width: 50px; }
  .chat-prov-select { padding: 6px 8px; border: 1px solid #E5E6EB; border-radius: 7px; font-size: 12px; }
  .chat-empty-tip { padding: 14px; color: #A8ADB5; font-size: 13px; text-align: center; background: #FAFBFC; border: 1px dashed #E5E6EB; border-radius: 8px; }

  /* ========== 通用 ========== */
  .admin-tip { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; background: #F7F8FA; color: #646A73; font-size: 12px; line-height: 1.6; }
  .admin-tip code { padding: 1px 5px; border-radius: 4px; background: #F2F3F5; font-size: 11px; }
  .admin-actions { display: flex; gap: 10px; margin-top: 18px; }
  .admin-actions .d-btn { flex: 0 0 auto; min-width: 120px; }
  .d-btn.primary { background: #2E6CEC; color: #fff; border: none; padding: 8px 22px; border-radius: 6px; font-size: 13px; cursor: pointer; }
  .d-btn.primary:disabled { opacity: .6; cursor: default; }
  .d-btn.ghost { background: #fff; border: 1px solid #E5E6EB; color: #454851; padding: 8px 22px; border-radius: 6px; font-size: 13px; cursor: pointer; }
  .d-btn.ghost:hover { border-color: #2E6CEC; color: #2E6CEC; }
  .d-btn.danger { background: #FEF6F6; border: 1px solid #F0B4B7; color: #C9363E; padding: 8px 22px; border-radius: 6px; font-size: 13px; cursor: pointer; }
  .d-btn.danger:hover { border-color: #C9363E; color: #fff; background: #C9363E; }
  /* 提现审核：微信/支付宝收款码缩略图 + 右上角角标 + 悬浮放大扫码 */
  .wd-qr-cell { display: inline-flex; gap: 14px; align-items: center; }
  .wd-qr-mini { position: relative; display: inline-block; width: 34px; height: 34px; border-radius: 6px; overflow: visible; border: 1px solid #E5E6EB; background: #fff; cursor: zoom-in; flex: 0 0 auto; }
  .wd-qr-mini > img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 5px; }
  .wd-qr-mini .wd-qr-badge { position: absolute; top: -7px; right: -7px; z-index: 2; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; font-size: 10px; font-style: normal; font-weight: 700; color: #fff; border: 1px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); pointer-events: none; }
  .wd-qr-mini .wd-qr-badge.wechat { background: #07C160; }
  .wd-qr-mini .wd-qr-badge.alipay { background: #1677FF; }
  .wd-qr-big { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 200; padding: 8px; background: #fff; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.28); }
  .wd-qr-big > img { width: 200px; height: 200px; display: block; }
  .wd-qr-mini:hover .wd-qr-big { display: block; }
  .mt-hint { color: #8F959E; font-size: 12px; line-height: 1.6; }
  .sync-note { margin: 10px 0 14px; padding: 9px 12px; border-radius: 8px; background: #EAF2FF; color: #2E6CEC; font-size: 12px; line-height: 1.6; border: 1px solid #CFE0FF; }
  .admin-card .d-info { margin: 16px 0 0; padding: 12px; border-radius: 10px; background: #F8F8FC; font-size: 12px; }
  .admin-card .d-info .row { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: #555962; }
  .admin-card .d-info .row > span:first-child { flex: 0 0 84px; color: #8F959E; }
  .admin-card .d-info .row .v { flex: 1; min-width: 0; display: flex; font-weight: 600; color: var(--text); }
  .text-input { width: 100%; padding: 7px 10px; border: 1px solid #E5E6EB; border-radius: 6px; font-size: 13px; box-sizing: border-box; }
  .text-input:focus { border-color: #2E6CEC; outline: none; }
  textarea.text-input { font-family: inherit; line-height: 1.6; resize: vertical; }

  /* ========== 模型行 ========== */
  .model-row { border: 1px solid #E5E6EB; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
  .mr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .mr-label { font-weight: 650; font-size: 13px; }
  .mr-id { color: #9296A0; font-size: 12px; }
  .mr-del { margin-left: auto; border: none; background: none; color: #C9363E; font-size: 12px; cursor: pointer; }
  .mr-del:hover { text-decoration: underline; }
  .mr-body { display: flex; gap: 12px; flex-wrap: wrap; }
  .mr-field { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8F959E; }
  .mr-field span { flex: 0 0 auto; }
  .add-model-btn {
    display: inline-block; padding: 7px 16px; margin-bottom: 12px;
    border: 1px dashed #2E6CEC; border-radius: 8px; background: #F5F9FF;
    color: #2E6CEC; font-size: 12.5px; cursor: pointer;
  }
  .add-model-btn:hover { background: #EEF4FF; }

  /* ========== 扣点配置表 ========== */
  .credit-tip { margin: 0 0 14px; padding: 10px 12px; border-radius: 6px; background: #F7F8FA; color: #646A73; font-size: 12px; line-height: 1.6; }
  .credit-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; }
  .credit-table th, .credit-table td { padding: 9px 10px; border-bottom: 1px solid #F0F1F3; text-align: left; vertical-align: middle; white-space: nowrap; }
  .credit-table th { color: #8F959E; font-weight: 600; background: #FAFBFC; white-space: nowrap; }
  .credit-table td.model-cell { font-weight: 600; color: #454851; white-space: normal; }
  .credit-table .model-name-line { margin-bottom: 4px; }
  .credit-table .model-name-line:last-child { margin-bottom: 0; }
  .credit-table .model-name-line input { width: 100%; box-sizing: border-box; }
  /* 模型级标签输入框（视频/图片模型共用），浅色小字，hover 浮现边框 */
  .credit-table.video-models-table td.model-cell .vm-caps,
  .credit-table.image-models-table td.model-cell .img-caps {
    font-size: 11px; color: #5E626A; padding: 3px 6px; border: 1px solid transparent; background: transparent; border-radius: 6px;
  }
  .credit-table.video-models-table td.model-cell .vm-caps:hover,
  .credit-table.image-models-table td.model-cell .img-caps:hover { border-color: #E5E6EB; background: #fff; }
  .credit-table .credit-input { width: 100%; box-sizing: border-box; min-width: 60px; padding: 5px 8px; border: 1px solid #E5E6EB; border-radius: 6px; font-size: 12px; }
  .credit-table .credit-input:focus { border-color: #2E6CEC; outline: none; }
  .credit-table .price-input { width: 100%; box-sizing: border-box; min-width: 60px; padding: 5px 8px; border: 1px solid #E5E6EB; border-radius: 6px; font-size: 12px; }
  .credit-table .price-input:focus { border-color: #2E6CEC; outline: none; }
  .credit-table tbody tr.alt td.row-tint { background: #F7F8FA; }
  .credit-table tbody tr:hover td.row-tint { background: #EEF3FC; }
  .credit-table .cost-val { color: #B26A00; font-weight: 600; white-space: nowrap; }
  .credit-table .mode-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: #EEF4FF; color: #2E6CEC; white-space: nowrap; }
  .credit-table .unit-hint { color: #9296A0; font-size: 11px; margin-left: 6px; white-space: nowrap; }
  .credit-table td.prov-cell { color: #646A73; white-space: nowrap; }
  /* 视频模型合并表：计费/扣点/成本列缩小 */
  .credit-table.video-models-table th.sort-col { width: 56px; text-align: center; }
  .credit-table.video-models-table td.sort-cell { text-align: center; }
  .credit-table.video-models-table td.sort-cell input { width: 100%; box-sizing: border-box; padding-left: 4px; padding-right: 4px; text-align: center; }
  .credit-table.video-models-table th.mode-col { width: 52px; text-align: center; }
  .credit-table.video-models-table th.credit-col { width: 96px; }
  .credit-table.video-models-table th.price-col { width: 96px; }
  .credit-table.video-models-table .vm-credit,
  .credit-table.video-models-table .vm-price { width: 100%; box-sizing: border-box; min-width: 60px; }
  .credit-table.video-models-table .vm-prov-select { width: 100%; min-width: 84px; }
  .credit-table.video-models-table .name-cell input { width: 100%; box-sizing: border-box; }
  /* 视频模型显示名：可编辑输入框，默认透明边框+加粗，悬停/聚焦浮现边框 */
  .credit-table.video-models-table td.model-cell .vm-label {
    width: 100%; box-sizing: border-box; font-weight: 700; color: #454851; font-size: 12px;
    border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px;
  }
  .credit-table.video-models-table td.model-cell .vm-label:hover { border-color: #E5E6EB; background: #fff; }
  /* 计费行级删除（每行末尾 ×） */
  .credit-table.video-models-table th.row-op-col { width: 44px; text-align: center; }
  .credit-table.video-models-table td.row-op-cell { text-align: center; }
  .credit-table .row-del {
    border: none; background: transparent; color: #B0B6BE; cursor: pointer;
    font-size: 15px; line-height: 1; padding: 2px 7px; border-radius: 4px;
  }
  .credit-table .row-del:hover { color: #E54545; background: #FEF0F0; }
  .credit-table.video-models-table td.op-cell .vm-addrow { white-space: nowrap; }

  /* 图片模型表：与视频模型表同款列宽（按次计费） */
  .credit-table.image-models-table th.sort-col { width: 56px; text-align: center; }
  .credit-table.image-models-table td.sort-cell { text-align: center; }
  .credit-table.image-models-table td.sort-cell input { width: 100%; box-sizing: border-box; padding-left: 4px; padding-right: 4px; text-align: center; }
  .credit-table.image-models-table th.mode-col { width: 52px; text-align: center; }
  .credit-table.image-models-table th.credit-col { width: 96px; }
  .credit-table.image-models-table th.price-col { width: 96px; }
  .credit-table.image-models-table input.credit-input { width: 100%; box-sizing: border-box; min-width: 90px; }
  .credit-table.image-models-table .chat-row-narrow input { padding-left: 4px; padding-right: 4px; }
  .credit-table.image-models-table .chat-prov-select { width: 100%; min-width: 92px; }
  /* 图片模型：真实模型名 / 扣点 / 成本按分辨率档位分多行输入 */
  .credit-table.image-models-table .chat-row-narrow { width: 104px; }
  .credit-table.image-models-table .rate-stack { gap: 3px; }
  .credit-table.image-models-table .rate-line { white-space: nowrap; gap: 3px; }
  .credit-table.image-models-table .rate-line .credit-input { width: 100%; box-sizing: border-box; min-width: 50px; }
  .credit-table.image-models-table .res-tag {
    font-size: 10px; color: #8F959E; background: #F2F3F5; border-radius: 3px;
    padding: 0 3px; line-height: 15px; flex: 0 0 auto;
  }
  .credit-table.image-models-table .res-tag-hint { display: block; font-size: 10px; color: #B0B6BE; margin-top: 2px; }
  /* 图片模型按分辨率分行：与视频模型同款列宽/样式 */
  .credit-table.image-models-table th.row-op-col { width: 44px; text-align: center; }
  .credit-table.image-models-table td.row-op-cell { text-align: center; }
  .credit-table.image-models-table .img-prov-select { width: 100%; min-width: 84px; }
  .credit-table.image-models-table td.name-cell input { width: 100%; box-sizing: border-box; }
  .credit-table.image-models-table td.model-cell .vm-label {
    width: 100%; box-sizing: border-box; font-weight: 700; color: #454851; font-size: 12px;
    border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px;
  }
  .credit-table.image-models-table td.model-cell .vm-label:hover { border-color: #E5E6EB; background: #fff; }
  .credit-table.image-models-table td.op-cell .img-addres { white-space: nowrap; }
  .credit-table.image-models-table .res-tag-inline { margin-left: 4px; vertical-align: middle; }

  /* 对话模型表：列宽压缩、标签/简介合并、单位上提 */
  .credit-table.chat-models-table th { line-height: 1.4; }
  .credit-table.chat-models-table th small { font-weight: 400; color: #8F959E; }
  .credit-table.chat-models-table td { vertical-align: middle; }
  .credit-table.chat-models-table th.sort-col { width: 56px; text-align: center; }
  .credit-table.chat-models-table td.sort-cell { text-align: center; }
  .credit-table.chat-models-table td.sort-cell input { width: 100%; box-sizing: border-box; padding-left: 4px; padding-right: 4px; text-align: center; }
  .credit-table.chat-models-table .chat-col-narrow { width: 74px; text-align: center; }
  .credit-table.chat-models-table .chat-row-narrow { width: 74px; }
  .credit-table.chat-models-table .chat-row-narrow input { width: 100%; box-sizing: border-box; padding-left: 4px; padding-right: 4px; }
  .credit-table.chat-models-table .chat-model-col { min-width: 156px; }
  .credit-table.chat-models-table .chat-name-line { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
  .credit-table.chat-models-table .chat-name-line:last-child { margin-bottom: 0; }
  .credit-table.chat-models-table .chat-name-line input { width: 100%; box-sizing: border-box; }
  .credit-table.chat-models-table .chat-name-line .chat-id { color: #9296A0; font-size: 11px; }
  .credit-table.chat-models-table .chat-tag-hint { color: #9296A0; font-size: 11px; white-space: nowrap; }
  .credit-table.chat-models-table .chat-info-col { min-width: 150px; white-space: normal !important; }
  .credit-table.chat-models-table .chat-info-col input { display: block; width: 100%; box-sizing: border-box; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .credit-table.chat-models-table .chat-info-col input:last-child { margin-bottom: 0; }
  .credit-table.chat-models-table .rate-stack.narrow { gap: 3px; }
  .credit-table.chat-models-table .rate-stack.narrow .price-input { width: 100%; box-sizing: border-box; min-width: 50px; }
  .credit-table.chat-models-table .rate-line { white-space: nowrap; }
  .credit-table.chat-models-table .chat-prov-cell { min-width: 100px; white-space: nowrap; }
  .credit-table.chat-models-table .chat-prov-select { width: 100%; min-width: 92px; }

  /* 数字人模型表：与视频/图片表同款，所有 input 填满单元格、随列宽拖动 */
  .credit-table.digital-human-models-table th.sort-col { width: 56px; text-align: center; }
  .credit-table.digital-human-models-table td.sort-cell { text-align: center; }
  .credit-table.digital-human-models-table td.sort-cell input { width: 100%; box-sizing: border-box; padding-left: 4px; padding-right: 4px; text-align: center; }
  .credit-table.digital-human-models-table td.model-cell { font-weight: 600; color: #454851; white-space: normal; }
  .credit-table.digital-human-models-table td.model-cell .vm-label {
    width: 100%; box-sizing: border-box; font-weight: 700; color: #454851; font-size: 12px;
    border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px;
  }
  .credit-table.digital-human-models-table td.model-cell .vm-label:hover { border-color: #E5E6EB; background: #fff; }
  .credit-table.digital-human-models-table .name-cell input { width: 100%; box-sizing: border-box; }
  .credit-table.digital-human-models-table .dh-billing-select,
  .credit-table.digital-human-models-table .dh-usage-select { width: 100%; box-sizing: border-box; min-width: 72px; }
  .credit-table.digital-human-models-table .vm-prov-select { width: 100%; min-width: 84px; }
  .credit-table.digital-human-models-table th.mode-col { width: 52px; text-align: center; }
  .credit-table.digital-human-models-table th.credit-col { width: 96px; }
  .credit-table.digital-human-models-table th.price-col { width: 96px; }
  .credit-table.digital-human-models-table th.row-op-col { width: 44px; text-align: center; }
  .credit-table.digital-human-models-table td.row-op-cell { text-align: center; }
  /* ========== 平台 ========== */
  .prov-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .prov-tab { padding: 7px 16px; border-radius: 8px; border: 1px solid #E5E6EB; font-size: 13px; color: #454851; cursor: pointer; background: #fff; }
  .prov-tab.active { background: #2E6CEC; border-color: #2E6CEC; color: #fff; font-weight: 600; }
  /* 模型与扣点：三张表按功能拆分，顶部胶囊切换（复用上款 .prov-tab 胶囊样式） */
  .credit-nav { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
  .credit-nav .prov-tab { display: flex; align-items: center; gap: 6px; user-select: none; }
  .credit-nav .tab-count {
    font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 9px;
    background: #F2F3F5; color: #646A73; font-weight: 400;
  }
  .credit-nav .prov-tab.active .tab-count { background: rgba(255,255,255,.26); color: #fff; }
  .credit-nav-hint { margin-left: auto; }
  .credit-pane[hidden] { display: none; }
  .d-extra { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
  .link-btn { color: #2E6CEC; font-size: 12.5px; cursor: pointer; }
  .link-btn:hover { text-decoration: underline; }
  .muted-hint { color: #9296A0; font-size: 12px; }
  .models-box { margin-top: 12px; padding: 12px; border: 1px solid #E5E6EB; border-radius: 8px; max-height: 220px; overflow: auto; }
  .mb-title { font-size: 12px; color: #8F959E; margin-bottom: 8px; }
  .model-chip { display: inline-block; padding: 4px 10px; margin: 0 6px 6px 0; border-radius: 6px; background: #F2F3F5; font-size: 12px; color: #454851; cursor: pointer; }
  .model-chip:hover { background: #EEF4FF; color: #2E6CEC; }


  /* ========== 用户管理 ========== */
  .user-wrap { overflow-x: auto; }
  .user-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; min-width: 700px; }
  .user-bar .spacer { flex: 1; }
  .user-bar .user-search { flex: 0 0 auto; }
  .user-bar .user-search .text-input { width: 180px; padding: 6px 10px; font-size: 12.5px; }
  .user-table { width: 100%; min-width: 1040px; border-collapse: collapse; background: #fff; font-size: 12px; }
  .user-table th, .user-table td { padding: 9px 10px; border-bottom: 1px solid #F0F1F3; text-align: left; vertical-align: middle; white-space: nowrap; }
  .user-table th { color: #8F959E; font-weight: 600; background: #FAFBFC; white-space: nowrap; }
  .user-table tbody tr:hover { background: #EEF3FC; }
  .user-table tbody tr.disabled-row { background: #F7F8FA; opacity: .72; }
  .user-table tbody tr.disabled-row td.uname { text-decoration: line-through; color: #9296A0; }
  .user-table td.uname { font-weight: 600; color: #454851; }
  .user-table td.dim { color: #9296A0; }
  .user-table .bal { font-weight: 700; color: #B26A00; }
  .user-table .debt-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 11.5px; background: #FDEEEF; color: #C9363E; }
  .user-table .quota-cell { padding: 0; }
  .user-table .link-like {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 0; background: transparent;
    color: #2E6CEC; font-size: 12px; cursor: pointer; border-radius: 6px;
  }
  .user-table .link-like:hover { background: #EEF4FF; }
  .role-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
  .role-tag.admin { background: #EEF4FF; color: #2E6CEC; }
  .role-tag.user { background: #F2F3F5; color: #646A73; }
  .mini-btn { padding: 4px 10px; border-radius: 6px; border: 1px solid #E5E6EB; background: #fff; font-size: 12px; color: #454851; cursor: pointer; }
  .mini-btn:hover { border-color: #2E6CEC; color: #2E6CEC; }
  .mini-btn:disabled { opacity: .45; cursor: default; border-color: #E5E6EB; color: #9296A0; }
  .mini-btn.warn:hover { border-color: #C9363E; color: #C9363E; }
  .mini-btn.danger { border-color: #F0B4B7; color: #C9363E; background: #FEF6F6; }
  .mini-btn.danger:hover { border-color: #C9363E; color: #fff; background: #C9363E; }
  .mini-btn.primary { background: #2E6CEC; border-color: #2E6CEC; color: #fff; }
  .mini-btn.primary:hover { background: #245AD1; border-color: #245AD1; color: #fff; }
  .user-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
  .user-pagination .pg-info { font-size: 12px; color: #8F959E; }
  .user-pagination .pg-btns { display: inline-flex; gap: 6px; }
  .user-pagination .pg-size { font-size: 12px; color: #5A6068; }
  .user-pagination select { padding: 4px 8px; border: 1px solid #E5E6EB; border-radius: 6px; background: #fff; font-size: 12px; color: #454851; outline: none; cursor: pointer; }
  .user-pagination select:focus { border-color: #2E6CEC; }
  .log-scroll { max-height: 340px; overflow: auto; }
  .log-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; margin-top: 10px; }
  .log-table th, .log-table td { padding: 8px 10px; border-bottom: 1px solid #F0F1F3; text-align: left; white-space: nowrap; }
  .log-table th { color: #8F959E; font-weight: 600; background: #FAFBFC; }
  .log-table .in { color: #16845B; font-weight: 600; }
  .log-table .out { color: #C9363E; font-weight: 600; }

  /* ========== 套餐 / 站点设置 ========== */
  .form-grid { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
  .form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #646A73; }
  .switch-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #454851; cursor: pointer; }
  .switch-row input { accent-color: #2E6CEC; width: 16px; height: 16px; cursor: pointer; }
  .plan-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; }
  .plan-table th, .plan-table td { padding: 9px 10px; border-bottom: 1px solid #F0F1F3; text-align: left; vertical-align: middle; white-space: nowrap; }
  .plan-table th { color: #8F959E; font-weight: 600; background: #FAFBFC; }
  .plan-table input { width: 100%; box-sizing: border-box; padding: 5px 8px; border: 1px solid #E5E6EB; border-radius: 6px; font-size: 12px; }
  .plan-table input:focus { border-color: #2E6CEC; outline: none; }
  .plan-table input.wide { width: 100%; box-sizing: border-box; }
  .plan-table tbody tr:hover { background: #EEF3FC; }
  .soon-box { padding: 40px 0; text-align: center; color: #9296A0; }
  .soon-box .ico { font-size: 34px; margin-bottom: 10px; color: #C9CDD4; }

  /* ========== 弹窗 ========== */
  .toast-item { position: relative; }
  #toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
  .toast-item {
    display: flex; align-items: center; gap: 8px; padding: 9px 16px 9px 13px; border-radius: 8px;
    background: #fff; border: 1px solid #E3E6EC;
    box-shadow: inset 3px 0 0 #2E6CEC, 0 6px 24px rgba(31,35,41,.14); font-size: 13px; color: #454851;
  }
  /* warn（2026-10-30 新增）：不处理就会失败 / 已替你截断素材的提醒 */
  .toast-item.warn { background: #FFFBF2; border-color: #F2D391; color: #8A5300; box-shadow: inset 3px 0 0 #E08B0C, 0 6px 24px rgba(31,35,41,.14); }
  .toast-item.success .ico { color: #16845B; }
  .toast-item.warn .ico { color: #D98600; }
  .toast-item.error .ico { color: #C9363E; }
  /* toast 图标必须显式给尺寸：svg 无 width/height 时固有尺寸 300×150，会把文字挤成竖排 */
  .toast-item .ico { width: 16px; height: 16px; flex: 0 0 auto; }
  .toast-item span { white-space: nowrap; }
  .add-mask { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; background: rgba(10,12,20,.5); }
  .dialog { width: 440px; max-width: 92vw; padding: 24px; border-radius: 10px; background: #fff; box-shadow: 0 16px 48px rgba(31,35,41,.2); animation: pop .18s ease; }
  .dialog h3 { font-size: 16px; font-weight: 680; text-align: center; margin-bottom: 6px; }
  .dialog p { font-size: 12px; color: #8F959E; line-height: 1.6; text-align: center; }
  .d-actions { display: flex; gap: 10px; margin-top: 18px; }
  .add-dialog .d-form { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 4px; }
  .add-dialog .d-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #646A73; }
  .add-dialog .d-form .text-input { width: 100%; }
  @keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .voice-admin-bar { background: #F7F8FA; border-radius: 10px; padding: 14px 16px; margin-top: 12px; }
  .voice-tag-pool { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .voice-tag-pool b { font-size: 13px; color: #454851; font-weight: 600; }
  .voice-table td { vertical-align: top; }
  .voice-tags-cell { font-size: 12px; }
  .voice-tag-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
  .vtag { display: inline-flex; align-items: center; gap: 4px; background: #E8F0FE; color: #1A5CE5; border-radius: 12px; padding: 3px 9px; font-size: 12px; line-height: 1.2; }
  .vtag.light { background: #F2F3F5; color: #646A73; }
  .vtag i { cursor: pointer; font-style: normal; color: #8F959E; font-size: 14px; line-height: 1; }
  .vtag i:hover { color: #C9363E; }
  .voice-tag-select, .voice-tag-input { font-size: 12px; }
  .voice-play-cell { white-space: nowrap; }
  .voice-play-btn.playing { background: #FDECEC; color: #C9363E; border-color: #F3C2C2; }
  .voice-play-btn.playing:hover { background: #FBDDDE; color: #C9363E; }
  /* ───── 分销中心（P2） ───── */
  /* 分润设置的分组卡片样式在 admin.html 内联（2026-10-19 重构，原 .dist-cfg-row 两列平铺已废弃） */
  .dist-gen-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 4px; }
  .dist-gen-bar label { font-size: 13px; color: #454851; display: inline-flex; align-items: center; gap: 6px; }
  .dist-gen-bar input, .dist-gen-bar select { font-size: 13px; }
  .dc-secret { font-family: monospace; color: #1A5CE5; }
  .dc-act { margin-left: 6px; }

  /* ── 套餐进货卡片（portal 进货订单）：VIP 卡质感，身份证比例 85.6:54 ── */
  .pkg-grid { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 4px; }
  .pkg-card {
    position: relative; width: 344px; aspect-ratio: 85.6 / 54; box-sizing: border-box; overflow: hidden;
    display: flex; flex-direction: column; padding: 15px 18px 13px;
    border-radius: 14px; color: #F5F7FA;
    border: 1px solid rgba(255,255,255,.16);
    background: linear-gradient(135deg, #23262e 0%, #3a3325 55%, #4a3f28 100%);
    box-shadow: 0 8px 20px rgba(15,23,42,.28), inset 0 1px 0 rgba(255,255,255,.14);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .pkg-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15,23,42,.36), inset 0 1px 0 rgba(255,255,255,.14); }
  /* 卡面高光斜带 + 右上柔光 */
  .pkg-card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,0) 40%),
                radial-gradient(130% 100% at 100% 0%, rgba(255,255,255,.10), transparent 55%);
  }
  /* 右下角类型水印 */
  .pkg-card::after {
    content: attr(data-mark); position: absolute; right: 14px; bottom: 6px;
    font-size: 32px; font-weight: 800; font-style: italic; letter-spacing: 2px;
    line-height: 1; color: rgba(255,255,255,.08); pointer-events: none;
  }
  /* 类型主题：会员卡=黑金 / OEM 卡=藏蓝 / 积分卡=墨绿 */
  .pkg-card[data-type="vip"] { background: linear-gradient(135deg, #211e19 0%, #3b3223 60%, #5a4b2c 100%); }
  .pkg-card[data-type="vip"] .pkg-price { color: #EFCB84; }
  .pkg-card[data-type="vip"] .pkg-chip { background: linear-gradient(135deg, #f0d9a6, #c9a45c); }
  .pkg-card[data-type="vip"] .pkg-buy .d-btn { background: #D9B470; border-color: #D9B470; color: #3B2F14; }
  .pkg-card[data-type="oem"] { background: linear-gradient(135deg, #101d38 0%, #1c3a6e 60%, #2d5bab 100%); }
  .pkg-card[data-type="oem"] .pkg-price { color: #9DC1FF; }
  .pkg-card[data-type="oem"] .pkg-chip { background: linear-gradient(135deg, #b8cff5, #7fa3dd); }
  /* 2026-10-16（用户要求）：OEM 卡按钮不再用白底/通用蓝——按卡面主题出「浅蓝底 + 深蓝字」；
     「进入代理后台」这类 ghost 按钮在卡上用半透明白描边，避免白块贴藏蓝底。 */
  .pkg-card[data-type="oem"] .pkg-buy .d-btn { background: linear-gradient(135deg, #9fc0f7, #7aa3e0); border-color: #9fc0f7; color: #0e2143; font-weight: 600; }
  .pkg-card[data-type="oem"] .pkg-buy .d-btn.ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff; }
  .pkg-card[data-type="credit"] { background: linear-gradient(135deg, #0d2b26 0%, #155748 60%, #20806a 100%); }
  .pkg-card[data-type="credit"] .pkg-price { color: #7FE8C8; }
  .pkg-card[data-type="credit"] .pkg-chip { background: linear-gradient(135deg, #aee8d6, #6cc2a8); }
  .pkg-card .pkg-head, .pkg-card .pkg-name, .pkg-card .pkg-price, .pkg-card .pkg-meta,
  .pkg-card .pkg-desc, .pkg-card .pkg-buy { position: relative; z-index: 1; }
  .pkg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  /* 芯片 */
  .pkg-chip { width: 27px; height: 20px; border-radius: 4px; flex: none; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
  .pkg-chip::after { content: ''; position: absolute; inset: 3px 5px; border: 1px solid rgba(0,0,0,.24); border-radius: 2px; }
  .pkg-name { font-weight: 700; font-size: 14px; color: #fff; letter-spacing: .5px; margin-top: 8px; }
  .pkg-type { font-size: 11px; color: rgba(255,255,255,.92); background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24); border-radius: 999px; padding: 2px 9px; }
  .pkg-price { font-size: 26px; font-weight: 800; margin: 6px 0 2px; font-family: Georgia, 'Times New Roman', serif; letter-spacing: .5px; }
  .pkg-price small { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.55); }
  .pkg-meta { color: rgba(255,255,255,.72); font-size: 11.5px; }
  .pkg-desc { color: rgba(255,255,255,.5); font-size: 11px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pkg-buy { display: flex; align-items: center; gap: 10px; margin-top: auto; }
  .pkg-buy label { font-size: 12px; color: rgba(255,255,255,.78); display: inline-flex; align-items: center; gap: 6px; }
  .pkg-buy input { width: 70px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
  .pkg-buy input::placeholder { color: rgba(255,255,255,.4); }
  .pkg-buy .d-btn { padding: 6px 16px; border-radius: 8px; color: #fff; font-size: 12.5px; }
  .pkg-buy .d-btn:disabled { opacity: .6; }
  .po-cancel { border: 1px solid #C9CDD4; background: #fff; color: #454851; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
  .po-cancel:hover { border-color: #C9363E; color: #C9363E; }
  /* admin 套餐编辑行 */
  .pkg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 9px; margin-bottom: 6px; border: 1px solid #E5E6EB; border-radius: 6px; background: #fff; }
  .pkg-row:hover { border-color: #C9CDD4; }
  .pkg-row .text-input, .pkg-row select { flex: 0 0 auto; }
  .pkg-row .pkg-f-name { width: 130px; }
  .pkg-row .pkg-f-num { width: 84px; }
  .pkg-row .pkg-f-desc { flex: 1 1 160px !important; min-width: 140px; }
  .pkg-row .pkg-del { border: none; background: none; color: #C9363E; font-size: 12px; cursor: pointer; }
  .pkg-row.off { opacity: .55; }


  /* ===== B7 · 后台深色主题块（2026-10-02，仅 data-theme='dark' 时激活；浅色取值完全不变；dist/portal 未设 data-theme 故不受影响） ===== */
  [data-theme='dark'] .admin-shell { color-scheme: dark; }
[data-theme='dark'] .admin-shell {
  background: #0E1014;
}
[data-theme='dark'] .admin-side {
  background: #181B21;
  border-right: 1px solid #2A2E36;
}
[data-theme='dark'] .side-logo .logo-ico {
  background: #4C8DFF;
}
[data-theme='dark'] .side-logo p {
  color: #7B828C;
}
[data-theme='dark'] .side-item {
  color: #E6E8EB;
}
[data-theme='dark'] .side-item:hover {
  background: #20242C;
}
[data-theme='dark'] .side-item.active {
  background: #16243F;
  color: #4C8DFF;
}
[data-theme='dark'] .subdomain-suffix {
  color: #7B828C;
}
[data-theme='dark'] .sub-invite-card {
  border-top: 1px dashed #2A2E36;
}
[data-theme='dark'] .sub-invite-card .text-input {
  background: #20242C;
}
[data-theme='dark'] .subdomain-tip .st-pending {
  color: #E0A23C;
}
[data-theme='dark'] .subdomain-tip .st-approved {
  color: #3FB985;
}
[data-theme='dark'] .subdomain-tip .st-rejected {
  color: #F0616B;
}
[data-theme='dark'] .subdomain-tip .st-info {
  color: #7B828C;
}
[data-theme='dark'] .logo-preview-wrap img {
  border: 1px solid #2A2E36;
  background: #20242C;
}
[data-theme='dark'] .logo-upload-btn {
  border: 1px dashed #353B45;
  color: #E6E8EB;
}
[data-theme='dark'] .logo-upload-btn:hover {
  border-color: #4C8DFF;
  color: #4C8DFF;
}
[data-theme='dark'] .side-item .soon {
  color: #5A606B;
  background: #20242C;
}
[data-theme='dark'] .side-group-head {
  color: #E6E8EB;
}
[data-theme='dark'] .side-group-head:hover {
  background: #20242C;
}
[data-theme='dark'] .side-group-head .ico {
  color: #9AA1AC;
}
[data-theme='dark'] .side-group-head .chev {
  color: #5A606B;
}
[data-theme='dark'] .side-group.open .side-group-head, .side-group:has(.side-item.active) .side-group-head {
  color: #4C8DFF;
}
[data-theme='dark'] .side-group:has(.side-item.active) .side-group-head .ico {
  color: #4C8DFF;
}
[data-theme='dark'] .side-sub .sub-dot {
  background: #5A606B;
}
[data-theme='dark'] .side-sub .side-item.active .sub-dot {
  background: #4C8DFF;
}
[data-theme='dark'] .cl-pill {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #9AA1AC;
}
[data-theme='dark'] .cl-pill:hover {
  border-color: #353B45;
}
[data-theme='dark'] .cl-pill.active {
  border-color: #4C8DFF;
  background: #4C8DFF;
}
[data-theme='dark'] .cl-pill.p-recharge {
  color: #3FB985;
}
[data-theme='dark'] .cl-pill.p-consume {
  color: #E0A23C;
}
[data-theme='dark'] .cl-pill.p-refund {
  color: #4C8DFF;
}
[data-theme='dark'] .cl-pill.p-adjust {
  color: #9AA1AC;
}
[data-theme='dark'] .cl-pill.p-recharge.active {
  border-color: #3FB985;
  background: #3FB985;
}
[data-theme='dark'] .cl-pill.p-consume.active {
  border-color: #E0A23C;
  background: #E0A23C;
}
[data-theme='dark'] .cl-pill.p-refund.active {
  border-color: #4C8DFF;
  background: #4C8DFF;
}
[data-theme='dark'] .cl-pill.p-adjust.active {
  border-color: #9AA1AC;
  background: #9AA1AC;
}
[data-theme='dark'] .cl-amt-in {
  color: #3FB985;
}
[data-theme='dark'] .cl-amt-out {
  color: #F0616B;
}
[data-theme='dark'] .cl-type-t-recharge {
  color: #3FB985;
}
[data-theme='dark'] .cl-type-t-consume {
  color: #E0A23C;
}
[data-theme='dark'] .cl-type-t-refund {
  color: #4C8DFF;
}
[data-theme='dark'] .cl-type-t-adjust {
  color: #9AA1AC;
}
[data-theme='dark'] .cl-search-input {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #E6E8EB;
}
[data-theme='dark'] .cl-search-input:focus {
  border-color: #4C8DFF;
}
[data-theme='dark'] .cl-search-btn {
  border: 1px solid #4C8DFF;
  background: #4C8DFF;
}
[data-theme='dark'] .cl-search-btn:hover {
  background: #2E6CEC;
  border-color: #2E6CEC;
}
[data-theme='dark'] .cl-search-clear {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #9AA1AC;
}
[data-theme='dark'] .cl-search-clear:hover {
  border-color: #353B45;
  color: #E6E8EB;
}
[data-theme='dark'] .cl-pager-left {
  color: #9AA1AC;
}
[data-theme='dark'] .cl-pagesize {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #E6E8EB;
}
[data-theme='dark'] .cl-pagesize:hover {
  border-color: #353B45;
}
[data-theme='dark'] .cl-page-btn {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #E6E8EB;
}
[data-theme='dark'] .cl-page-btn:hover:not(.active):not(.disabled):not(.dots) {
  border-color: #4C8DFF;
  color: #4C8DFF;
}
[data-theme='dark'] .cl-page-btn.active {
  border-color: #4C8DFF;
  background: #4C8DFF;
}
[data-theme='dark'] .cl-page-btn.disabled {
  color: #5A606B;
  border-color: #2A2E36;
  background: #20242C;
}
[data-theme='dark'] .side-foot {
  border-top: 1px solid #2A2E36;
  background: #181B21;
}
[data-theme='dark'] .side-foot a, [data-theme='dark'] .side-foot .side-logout {
  background: #181B21; border-color: #2A2E36; color: #9AA1AC;
}
[data-theme='dark'] .side-foot a:hover, [data-theme='dark'] .side-foot .side-logout:hover {
  background: #23262E; border-color: #4C8DFF; color: #4C8DFF; box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
[data-theme='dark'] .side-foot a.current {
  background: #2E6CEC; border-color: #2E6CEC; color: #fff; box-shadow: 0 6px 16px rgba(46,108,236,.28);
}
[data-theme='dark'] .admin-topbar {
  background: #181B21;
  border-bottom: 1px solid #2A2E36;
}
[data-theme='dark'] .admin-topbar #headUser {
  color: #9AA1AC;
}
[data-theme='dark'] .pwd-link {
  color: #4C8DFF;
}
[data-theme='dark'] .sec-card {
  background: #181B21;
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .chat-model-row {
  border: 1px solid #2A2E36;
  background: #20242C;
}
[data-theme='dark'] .chat-model-row label {
  color: #7B828C;
}
[data-theme='dark'] .chat-model-row .cm-op label {
  color: #7B828C;
}
[data-theme='dark'] .chat-model-row .cm-del {
  background: rgba(240, 97, 107, .14);
  color: #F0616B;
}
[data-theme='dark'] .chat-model-row .cm-del:hover {
  background: rgba(240, 97, 107, .24);
}
[data-theme='dark'] .chat-model-col .chat-label {
  color: #E6E8EB;
}
[data-theme='dark'] .chat-model-col .chat-id {
  color: #7B828C;
}
[data-theme='dark'] .chat-prov-select {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .chat-empty-tip {
  color: #7B828C;
  background: #20242C;
  border: 1px dashed #2A2E36;
}
[data-theme='dark'] .admin-tip {
  background: #20242C;
  color: #9AA1AC;
}
[data-theme='dark'] .admin-tip code {
  background: #20242C;
}
[data-theme='dark'] .d-btn.primary {
  background: #4C8DFF;
}
[data-theme='dark'] .d-btn.ghost {
  background: #181B21;
  border: 1px solid #2A2E36;
  color: #E6E8EB;
}
[data-theme='dark'] .d-btn.ghost:hover {
  border-color: #4C8DFF;
  color: #4C8DFF;
}
[data-theme='dark'] .d-btn.danger {
  background: #2A1A1C;
  border: 1px solid #5A2A2E;
  color: #FF8A90;
}
[data-theme='dark'] .d-btn.danger:hover {
  border-color: #C9363E;
  color: #fff;
  background: #C9363E;
}
[data-theme='dark'] .wd-qr-mini { background: #181B21; border-color: #2A2E36; }
[data-theme='dark'] .mt-hint {
  color: #7B828C;
}
[data-theme='dark'] .sync-note {
  background: #16243F;
  color: #4C8DFF;
}
[data-theme='dark'] .admin-card .d-info {
  background: #20242C;
}
[data-theme='dark'] .admin-card .d-info .row {
  color: #9AA1AC;
}
[data-theme='dark'] .admin-card .d-info .row > span:first-child {
  color: #7B828C;
}
[data-theme='dark'] .text-input {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .text-input:focus {
  border-color: #4C8DFF;
}
[data-theme='dark'] .model-row {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .mr-id {
  color: #7B828C;
}
[data-theme='dark'] .mr-del {
  color: #F0616B;
}
[data-theme='dark'] .mr-field {
  color: #7B828C;
}
[data-theme='dark'] .add-model-btn {
  border: 1px dashed #4C8DFF;
  background: #16243F;
  color: #4C8DFF;
}
[data-theme='dark'] .add-model-btn:hover {
  background: #16243F;
}
[data-theme='dark'] .credit-tip {
  background: #20242C;
  color: #9AA1AC;
}
[data-theme='dark'] .credit-table {
  background: #181B21;
}
[data-theme='dark'] .credit-table th, .credit-table td {
  border-bottom: 1px solid #2A2E36;
}
[data-theme='dark'] .credit-table th {
  color: #7B828C;
  background: #20242C;
}
[data-theme='dark'] .credit-table td.model-cell {
  color: #E6E8EB;
}
[data-theme='dark'] .credit-table.video-models-table td.model-cell .vm-caps, .credit-table.image-models-table td.model-cell .img-caps {
  color: #9AA1AC;
}
[data-theme='dark'] .credit-table.video-models-table td.model-cell .vm-caps:hover, .credit-table.image-models-table td.model-cell .img-caps:hover {
  border-color: #2A2E36;
  background: #181B21;
}
[data-theme='dark'] .credit-table .credit-input {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .credit-table .credit-input:focus {
  border-color: #4C8DFF;
}
[data-theme='dark'] .credit-table .price-input {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .credit-table .price-input:focus {
  border-color: #4C8DFF;
}
[data-theme='dark'] .credit-table tbody tr.alt td.row-tint {
  background: #20242C;
}
[data-theme='dark'] .credit-table tbody tr:hover td.row-tint {
  background: #16243F;
}
[data-theme='dark'] .credit-table .cost-val {
  color: #E0A23C;
}
[data-theme='dark'] .credit-table .mode-tag {
  background: #16243F;
  color: #4C8DFF;
}
[data-theme='dark'] .credit-table .unit-hint {
  color: #7B828C;
}
[data-theme='dark'] .credit-table td.prov-cell {
  color: #9AA1AC;
}
[data-theme='dark'] .credit-table.video-models-table td.model-cell .vm-label {
  color: #E6E8EB;
}
[data-theme='dark'] .credit-table.video-models-table td.model-cell .vm-label:hover {
  border-color: #2A2E36;
  background: #181B21;
}
[data-theme='dark'] .credit-table .row-del {
  color: #5A606B;
}
[data-theme='dark'] .credit-table .row-del:hover {
  color: #F0616B;
  background: rgba(240, 97, 107, .18);
}
[data-theme='dark'] .credit-table.image-models-table .res-tag {
  color: #7B828C;
  background: #20242C;
}
[data-theme='dark'] .credit-table.image-models-table .res-tag-hint {
  color: #5A606B;
}
[data-theme='dark'] .credit-table.image-models-table td.model-cell .vm-label {
  color: #E6E8EB;
}
[data-theme='dark'] .credit-table.image-models-table td.model-cell .vm-label:hover {
  border-color: #2A2E36;
  background: #181B21;
}
[data-theme='dark'] .credit-table.chat-models-table th small {
  color: #7B828C;
}
[data-theme='dark'] .credit-table.chat-models-table .chat-name-line .chat-id {
  color: #7B828C;
}
[data-theme='dark'] .credit-table.chat-models-table .chat-tag-hint {
  color: #7B828C;
}
[data-theme='dark'] .credit-table.digital-human-models-table td.model-cell {
  color: #E6E8EB;
}
[data-theme='dark'] .credit-table.digital-human-models-table td.model-cell .vm-label {
  color: #E6E8EB;
}
[data-theme='dark'] .credit-table.digital-human-models-table td.model-cell .vm-label:hover {
  border-color: #2A2E36;
  background: #181B21;
}
[data-theme='dark'] .prov-tab {
  border: 1px solid #2A2E36;
  color: #E6E8EB;
  background: #181B21;
}
[data-theme='dark'] .prov-tab.active {
  background: #4C8DFF;
  border-color: #4C8DFF;
}
[data-theme='dark'] .credit-nav .tab-count {
  background: #20242C;
  color: #9AA1AC;
}
[data-theme='dark'] .link-btn {
  color: #4C8DFF;
}
[data-theme='dark'] .muted-hint {
  color: #7B828C;
}
[data-theme='dark'] .models-box {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .mb-title {
  color: #7B828C;
}
[data-theme='dark'] .model-chip {
  background: #20242C;
  color: #E6E8EB;
}
[data-theme='dark'] .model-chip:hover {
  background: #16243F;
  color: #4C8DFF;
}
[data-theme='dark'] .user-table {
  background: #181B21;
}
[data-theme='dark'] .user-table th, .user-table td {
  border-bottom: 1px solid #2A2E36;
}
[data-theme='dark'] .user-table th {
  color: #7B828C;
  background: #20242C;
}
[data-theme='dark'] .user-table tbody tr:hover {
  background: #16243F;
}
[data-theme='dark'] .user-table tbody tr.disabled-row {
  background: #20242C;
}
[data-theme='dark'] .user-table tbody tr.disabled-row td.uname {
  color: #7B828C;
}
[data-theme='dark'] .user-table td.uname {
  color: #E6E8EB;
}
[data-theme='dark'] .user-table td.dim {
  color: #7B828C;
}
[data-theme='dark'] .user-table .bal {
  color: #E0A23C;
}
[data-theme='dark'] .user-table .debt-tag {
  background: rgba(240, 97, 107, .14);
  color: #F0616B;
}
[data-theme='dark'] .user-table .link-like {
  color: #4C8DFF;
}
[data-theme='dark'] .user-table .link-like:hover {
  background: #16243F;
}
[data-theme='dark'] .role-tag.admin {
  background: #16243F;
  color: #4C8DFF;
}
[data-theme='dark'] .role-tag.user {
  background: #20242C;
  color: #9AA1AC;
}
[data-theme='dark'] .mini-btn {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #E6E8EB;
}
[data-theme='dark'] .mini-btn:hover {
  border-color: #4C8DFF;
  color: #4C8DFF;
}
[data-theme='dark'] .mini-btn:disabled {
  border-color: #2A2E36;
  color: #7B828C;
}
[data-theme='dark'] .mini-btn.warn:hover {
  border-color: #F0616B;
  color: #F0616B;
}
[data-theme='dark'] .mini-btn.danger {
  border-color: rgba(240, 97, 107, .45);
  color: #F0616B;
  background: rgba(240, 97, 107, .10);
}
[data-theme='dark'] .mini-btn.danger:hover {
  border-color: #F0616B;
  background: #F0616B;
}
[data-theme='dark'] .mini-btn.primary {
  background: #4C8DFF;
  border-color: #4C8DFF;
}
[data-theme='dark'] .user-pagination .pg-info {
  color: #7B828C;
}
[data-theme='dark'] .user-pagination select {
  border: 1px solid #2A2E36;
  background: #181B21;
  color: #E6E8EB;
}
[data-theme='dark'] .user-pagination select:focus {
  border-color: #4C8DFF;
}
[data-theme='dark'] .log-table {
  background: #181B21;
}
[data-theme='dark'] .log-table th, .log-table td {
  border-bottom: 1px solid #2A2E36;
}
[data-theme='dark'] .log-table th {
  color: #7B828C;
  background: #20242C;
}
[data-theme='dark'] .log-table .in {
  color: #3FB985;
}
[data-theme='dark'] .log-table .out {
  color: #F0616B;
}
[data-theme='dark'] .form-grid label {
  color: #9AA1AC;
}
[data-theme='dark'] .switch-row {
  color: #E6E8EB;
}
[data-theme='dark'] .switch-row input {
  accent-color: #4C8DFF;
}
[data-theme='dark'] .plan-table {
  background: #181B21;
}
[data-theme='dark'] .plan-table th, .plan-table td {
  border-bottom: 1px solid #2A2E36;
}
[data-theme='dark'] .plan-table th {
  color: #7B828C;
  background: #20242C;
}
[data-theme='dark'] .plan-table input {
  border: 1px solid #2A2E36;
}
[data-theme='dark'] .plan-table input:focus {
  border-color: #4C8DFF;
}
[data-theme='dark'] .plan-table tbody tr:hover {
  background: #16243F;
}
[data-theme='dark'] .soon-box {
  color: #7B828C;
}
[data-theme='dark'] .soon-box .ico {
  color: #5A606B;
}
[data-theme='dark'] .toast-item {
  background: #181B21;
  color: #E6E8EB;
  border-color: #2A2F39;
  box-shadow: inset 3px 0 0 #4C8DFF, 0 6px 24px rgba(0,0,0,.5);
}
[data-theme='dark'] .toast-item.warn {
  background: #2E2410;
  color: #FFD482;
  border-color: #6E5217;
  box-shadow: inset 3px 0 0 #E0A23C, 0 6px 24px rgba(0,0,0,.5);
}
[data-theme='dark'] .toast-item.warn .ico {
  color: #E0A23C;
}
[data-theme='dark'] .toast-item.success .ico {
  color: #3FB985;
}
[data-theme='dark'] .toast-item.error .ico {
  color: #F0616B;
}
[data-theme='dark'] .dialog {
  background: #181B21;
}
[data-theme='dark'] .dialog p {
  color: #7B828C;
}
[data-theme='dark'] .add-dialog .d-form label {
  color: #9AA1AC;
}
[data-theme='dark'] .voice-admin-bar {
  background: #20242C;
}
[data-theme='dark'] .voice-tag-pool b {
  color: #E6E8EB;
}
[data-theme='dark'] .vtag.light {
  background: #20242C;
  color: #9AA1AC;
}
[data-theme='dark'] .vtag i {
  color: #7B828C;
}
[data-theme='dark'] .vtag i:hover {
  color: #F0616B;
}
[data-theme='dark'] .voice-play-btn.playing {
  background: rgba(240, 97, 107, .14);
  color: #F0616B;
  border-color: rgba(240, 97, 107, .5);
}

/* ===== B8 · 移动端响应式外壳（2026-10-02，仅布局；颜色沿用各主题） ===== */
@media (max-width: 860px) {
  .admin-shell { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .admin-side {
    flex: 0 0 auto; width: 100%;
    flex-direction: row; align-items: center;
    border-right: none; border-bottom: 1px solid #E5E6EB;
    padding: 0; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .side-logo { padding: 10px 12px; flex: 0 0 auto; }
  .side-logo p { display: none; }
  .side-nav { flex: 1; display: flex; flex-direction: row; padding: 6px 8px; gap: 4px; }
  .side-item { margin: 0; white-space: nowrap; }
  .side-foot {
    flex: 0 0 auto; display: flex; flex-direction: row; flex-wrap: wrap;
    padding: 8px 10px; border-top: none; gap: 8px; align-items: stretch;
    background: transparent;
  }
  .side-foot a, .side-foot .side-logout {
    flex: 1 1 0; min-width: 0; flex-direction: row; gap: 5px;
    padding: 8px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 500;
  }
  /* 移动端：退出登录仍独占一行通栏（四个导航按钮挤一行） */
  .side-foot .side-logout-wide { flex: 1 0 100%; }
  .side-foot a .ico, .side-foot .side-logout .ico { width: 16px; height: 16px; }
  .admin-content { padding: 14px 12px; }
  .admin-topbar { padding: 10px 12px; min-height: 50px; }
}
@media (max-width: 860px) {
  [data-theme='dark'] .admin-side { border-bottom-color: #2A2E36; }
}
[data-theme='dark'] .voice-play-btn.playing:hover {
  color: #F0616B;
}
[data-theme='dark'] .dist-gen-bar label {
  color: #E6E8EB;
}
[data-theme='dark'] .po-cancel {
  border: 1px solid #353B45;
  background: #181B21;
  color: #E6E8EB;
}
[data-theme='dark'] .po-cancel:hover {
  border-color: #F0616B;
  color: #F0616B;
}
[data-theme='dark'] .pkg-row {
  border: 1px solid #2A2E36;
  background: #181B21;
}
[data-theme='dark'] .pkg-row:hover {
  border-color: #353B45;
}
[data-theme='dark'] .pkg-row .pkg-del {
  color: #F0616B;
}

/* 我的推广（2026-10-16 新增，仪表盘底部）：与分销中心 dist-promo 同款视觉（portal 不加载 dist.css，此处独立一套） */
.pt-promo { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pt-promo-item { display: flex; align-items: center; gap: 10px; }
.pt-promo-label { width: 78px; flex: 0 0 auto; color: #8F959E; font-size: 14px; }
.pt-promo-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #1F2937; }
.pt-promo-value.link { color: #2E6CEC; }
.pt-promo-item .mini-btn { flex: 0 0 auto; }
[data-theme='dark'] .pt-promo-label { color: #7B828C; }
[data-theme='dark'] .pt-promo-value { color: #E6E8EB; }
[data-theme='dark'] .pt-promo-value.link { color: #4C8DFF; }
