﻿/* 仙宫云管理台 — 样式（复用 wechat 页面骨架：卡片化、圆角、轻阴影、绿色主题） */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body { font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif; background: #f5f7fa; color: #2c3038; font-size: 14px; }

/* 顶部栏（呼应 comfyui 的渐变 top-navbar）
   原先这里刻意不写 z-index，交给框架默认值。实测不行：sticky 元素默认 z-index:auto，
   后面的卡片/实例块一旦自己形成层叠上下文（transform、position 等），滚动时就会盖到顶栏上。
   所以这里破例显式给一个，取值卡在弹层之下——弹窗 200、浮动提示 300，顶栏 100，压不住它们。 */
.topbar { height: 58px; background: linear-gradient(135deg, #2f86f7 0%, #1c64d8 100%); color: #fff; display: flex; align-items: center; padding: 0 22px; box-shadow: 0 2px 10px rgba(47, 134, 247, .18); position: sticky; top: 0; z-index: 100; }
.topbar .logo { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin-right: 12px; font-size: 18px; }
.topbar h1 { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.topbar .sub { font-size: 12px; opacity: .85; margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.3); }
.topbar .right { margin-left: auto; font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }

/* 主容器：不做最大宽度限制（限宽会让内容错位换行），整屏铺开 */
.wrap { width: 100%; margin: 0 auto; padding: 20px; }

/* Tab 导航 */
.tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.tab { padding: 10px 22px; border-radius: 22px; cursor: pointer; background: #fff; border: 1px solid #e6e9ef; font-size: 14px; color: #5b6472; transition: all .2s; user-select: none; display: flex; align-items: center; gap: 6px; }
.tab:hover { border-color: #2f86f7; color: #2f86f7; }
.tab.active { background: #2f86f7; color: #fff; border-color: #2f86f7; box-shadow: 0 4px 12px rgba(47,134,247,.25); }

/* 面板 */
.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }

@keyframes fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* 卡片 / 区块 */
.card { background: #fff; border-radius: 12px; padding: 18px 20px; box-shadow: 0 2px 12px rgba(20, 30, 50, .05); margin-bottom: 16px; }
/* flex-wrap：全自动方案这块挂了 5 个文档按钮 + 2 个部署按钮，窄窗口不换行会被挤出右边界 */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .title { font-size: 15px; font-weight: 600; color: #1f2530; flex-shrink: 0; }
.card-head .title i { color: #2f86f7; margin-right: 6px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* 按钮 */
.btn { padding: 9px 18px; border: none; border-radius: 8px; font-size: 13.5px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: #2f86f7; color: #fff; }
.btn.primary:hover { background: #069a52; }
.btn.sec { background: #409eff; color: #fff; }
.btn.sec:hover { background: #3a8ee6; }
.btn.ghost { background: #fff; color: #2f86f7; border: 1px solid #2f86f7; }
.btn.ghost:hover { background: #eef4ff; }
.btn.danger { background: #fff; color: #e64340; border: 1px solid #f3b6b5; }
.btn.danger:hover { background: #fdecec; }
/* 顶栏那个半透明白按钮：跟旁边实心白的「设置令牌」并排时能分开层次 */
.btn.plain { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.btn.plain:hover { background: rgba(255,255,255,.3); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: #6b7280; margin-bottom: 6px; }
.field .inp, .field input, .field select { width: 100%; padding: 9px 12px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 13.5px; font-family: inherit; color: #2c3038; background: #fff; transition: border-color .15s; }
.field .inp:focus, .field input:focus, .field select:focus { outline: none; border-color: #2f86f7; }

/* 授权账号卡片 */
.acct { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #eef0f4; border-radius: 10px; margin-bottom: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.acct:hover { border-color: #c7d9f7; box-shadow: 0 2px 10px rgba(47,134,247,.08); }
.acct .info { flex: 1; min-width: 0; }
.acct .info .name { font-weight: 600; font-size: 14.5px; color: #1f2530; }
.acct .ops { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; }

/* 状态徽标 */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.badge.ok { background: #e8f8ee; color: #1a7f3b; }
.badge.off { background: #f0f1f3; color: #8a93a0; }

/* 文章卡片 */
.article { border: 1px solid #eef0f4; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.article:hover { border-color: #c7d9f7; box-shadow: 0 2px 10px rgba(47,134,247,.08); }
.article .ttl { font-weight: 600; font-size: 15px; color: #1f2530; line-height: 1.4; }
.article .dig { font-size: 13px; color: #6b7280; margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article .meta { font-size: 12px; color: #9aa2ad; margin-top: 8px; display: flex; gap: 14px; align-items: center; }

/* 分页 */
/* 分页容器：内容交给站内通用组件 laypage 渲染（.layui-laypage 样式由 /css/layui.css 提供） */
.pager { display: flex; justify-content: center; align-items: center; margin-top: 16px; }
.pager .layui-laypage { margin: 0; }

/* 空态 */
.empty { text-align: center; padding: 40px 0; color: #aab1bb; font-size: 13.5px; }
.empty i { font-size: 34px; display: block; margin-bottom: 10px; color: #cdd3db; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(20, 28, 40, .45); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; animation: pop .2s ease; }

@keyframes pop {
    from { transform: scale(.95); opacity: .6; }
    to { transform: none; opacity: 1; }
}

/* 确认框比默认宽：关机那条说明要分两段写清「普通关机 vs 释放 GPU」的差别，窄了会挤成竖条。
   620 是照顾令牌那条提示：正文是三条带缩进的说明，窄了会挤成竖条。 */
.modal.cf { max-width: 620px; }
.modal .m-head { padding: 16px 20px; border-bottom: 1px solid #f0f2f5; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.modal .m-head i { color: #2f86f7; }
.modal .m-body { padding: 20px; }
.modal .m-foot { padding: 14px 20px; border-top: 1px solid #f0f2f5; display: flex; gap: 10px; justify-content: flex-end; }
/* 确认框的动作按钮组：取消固定一枚，剩下的（关机那两种）由 JS 动态塞进来，放不下时换行 */
#cfActs { display: flex; gap: 10px; flex-wrap: wrap; }
#cfActs:empty { display: none; }

/* 扫码弹窗 */
.qr-box { text-align: center; }
.qr-box .url-box { margin-top: 14px; background: #f6f8fa; border: 1px dashed #d7dce3; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #5b6472; word-break: break-all; text-align: left; }
.qr-box .steps { text-align: left; font-size: 13px; color: #5b6472; line-height: 1.9; margin-top: 6px; }
.qr-box .steps b { color: #2f86f7; }

/* 文章打开提示：点某篇会由客户端另开一个无界窗口显示原文（articlesection.js） */
.article .open-hint { margin-left: auto; color: #2f86f7; }
.wx-tip {
    position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(8px);
    background: rgba(28, 34, 44, .88); color: #fff; font-size: 13px;
    padding: 9px 16px; border-radius: 999px; z-index: 300;
    opacity: 0; pointer-events: none; transition: all .22s ease;
}
.wx-tip.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 技能包接入配置说明 ---- */
.agent-intro { background: #eef4ff; border: 1px solid #c7d9f7; color: #2a5fbb; padding: 11px 14px; border-radius: 8px; font-size: 13px; line-height: 1.85; }
.agent-intro b { color: #1c64d8; }
.agent-steps { margin: 14px 0 0; padding-left: 20px; font-size: 13px; line-height: 2.05; color: #4b5563; }
.agent-steps li { margin-bottom: 2px; }
.agent-steps code, .agent-intro code { background: #f1f3f6; padding: 1px 6px; border-radius: 4px; font-family: Consolas, monospace; font-size: 12px; color: #2c3038; word-break: break-all; }
/* 页面用法说明（接在接入配置步骤下方，与步骤块视觉区分开） */
.agent-notes { margin-top: 16px; padding: 12px 16px; border-radius: 8px; background: #f8fafc; border: 1px solid #eef0f4; }
.agent-notes .an-title { font-size: 13px; font-weight: 600; color: #1f2530; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.agent-notes .an-title i { color: #2f86f7; }
.agent-notes .an-line { font-size: 12.5px; line-height: 1.95; color: #6b7280; padding-left: 12px; border-left: 2px solid #e6e9ef; margin-top: 4px; }
.agent-notes .an-line b { color: #2c3038; font-weight: 600; margin-right: 6px; }
/* 全屏层（MultiLayer）工具栏上的自定义动作按钮 */
.ml-act { display: inline-block; margin-left: 8px; padding: 2px 12px; border-radius: 12px; font-size: 12.5px; line-height: 22px; cursor: pointer; color: #2f86f7; background: #fff; border: 1px solid #d6e8dd; }
.ml-act:hover { background: #f2fbf6; border-color: #2f86f7; }

/* 配置行 */
.cfg-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cfg-row .field { flex: 1; min-width: 220px; }

/* 复制提示 */
.copied-tip { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: rgba(20,28,40,.9); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .25s; z-index: 300; pointer-events: none; }
.copied-tip.show { opacity: 1; }

/* ---- 仙宫云管理台：实例墙（卡片式，一行两张，塞不下自动折行） ---- */
/* 流式栅格：不写死列数，宽屏两张、窄屏自动掉成一张，行间距靠 gap 撑开 */
/* 服务区块：一个服务一张 card，从上往下排 */
.svc-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; padding: 0 2px; }
.svc-bar .lbl { font-size: 14px; font-weight: 600; color: #1f2530; }
.svc-bar .lbl i { color: #2f86f7; margin-right: 6px; }
.svc-bar .right { margin-left: auto; display: flex; gap: 8px; }
/* 「我的实例」标题旁那行状态字：正常留空，只有拉取失败时挂红字（区块照常显示，不受它影响） */
.svc-tip { font-size: 12.5px; color: #8a93a0; line-height: 1.5; }
.svc-tip i { margin-right: 5px; }
.svc-tip.err { color: #d4380d; }
/* 锚点导航：一个服务一颗胶囊，点一下滚到对应区块。
   名称走类别的 short 字段（全称太长，一排摆不下）；窄屏放不下自动折行。 */
.anchor-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.anchor-nav .anchor { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; font-size: 12.5px; font-family: inherit; border-radius: 13px; border: 1px solid #e6e9ef; background: #fff; color: #5b6472; cursor: pointer; transition: all .15s; }
.anchor-nav .anchor i { font-size: 12px; color: #2f86f7; }
.anchor-nav .anchor:hover { border-color: #2f86f7; color: #2f86f7; background: #f0f6ff; }
/* 顶栏是 sticky 的（58px 高），滚动定位必须给它让出高度，否则区块标题被压在栏底下看不见 */
.card.svc { scroll-margin-top: 72px; }
/* 跳转落点闪一下蓝边，让人知道跳到哪块了 */
.card.svc.flash { animation: svcFlash 1.3s ease-out; }
@keyframes svcFlash {
    0%, 25% { box-shadow: 0 0 0 2px rgba(47, 134, 247, .38); }
    100%    { box-shadow: 0 1px 3px rgba(20, 28, 40, .06); }
}
.card.svc { padding-bottom: 16px; }
.card.svc .svc-desc { font-size: 12.5px; color: #8a93a0; margin: -6px 0 12px; line-height: 1.7; }
.card.svc.is-unassigned { border-left: 3px solid #f0a020; }
/* 区块内的实例网格（原来是 #instList，一个页面只有一份；现在每块各一份） */
.inst-list { display: flex; flex-wrap: wrap; align-items: stretch; gap: 18px; }
/* 未归类卡片上的「归到…」下拉，跟旁边 mini 按钮同高 */
.sel-assign { height: 28px; padding: 0 8px; border: 1px solid #d8dee8; border-radius: 6px; background: #fff; color: #4b5563; font-size: 12.5px; cursor: pointer; }
.sel-assign:hover { border-color: #2f86f7; color: #2f86f7; }
/* 实例卡片：白底 + 描边 + 圆角 + 投影，左侧一条状态色条（绿=运行 / 灰=关机） */
.inst { position: relative; flex: 1 1 320px; max-width: calc(50% - 9px); box-sizing: border-box; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border: 1px solid #e6eaf0; border-left: 3px solid #c9d2dd; border-radius: 12px; padding: 14px 16px 15px 17px; box-shadow: 0 1px 3px rgba(20, 28, 40, .06); transition: box-shadow .18s, border-color .18s, transform .18s; overflow: hidden; }
.inst:hover { box-shadow: 0 8px 22px rgba(20, 28, 40, .1); border-color: #cfdcee; transform: translateY(-2px); }
/* 运行中：左侧色条转绿 + 卡片外描边一起提亮，扫一眼就知道哪台开着 */
.inst.is-on { border-left-color: #43b581; }
.inst.is-busy { border-left-color: #f0a020; }
/* 窄屏放不下两张就掉成一张占满行 */
@media (max-width: 860px) { .inst { max-width: 100%; } .inst-list { gap: 14px; } }
.inst .info { width: 100%; min-width: 0; }
.inst .info .name { font-weight: 600; font-size: 14.5px; color: #1f2530; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inst .info .meta { font-size: 12.5px; color: #8a93a0; margin-top: 8px; }
.inst .info .meta code { background: #eef1f5; padding: 1px 6px; border-radius: 4px; font-family: Consolas, monospace; font-size: 12px; color: #2c3038; }
/* 实例 ID：一长串，卡片窄的时候要能断行，别把 meta 行撑破；鼠标悬停看完整值 */
.inst .info .meta code.iid { max-width: 100%; word-break: break-all; cursor: help; }
/* ID 和它旁边的复制图标打包成一小截，横向居中对齐，图标比 ops 里的按钮再小一号 */
.inst .info .meta .iid-wrap { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; max-width: 100%; }
.inst .info .meta .iid-wrap .mini.icon-btn { width: 20px; height: 20px; padding: 0; background: #fff; flex: 0 0 auto; }
.inst .info .meta .iid-wrap .mini.icon-btn i { font-size: 11px; }
.inst .info .meta .iid-wrap .mini.icon-btn svg.ico { width: 12px; height: 12px; }
/* 服务地址区：上下四行地址（ComfyUI / 语音 / 千问TTS / 转写）；复制按钮在卡片下方操作栏 */
.inst-url { margin-top: 10px; min-width: 0; }
.url-lines { min-width: 0; }
.url-line { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 4px; }
.url-line:first-child { margin-top: 0; }
.url-line .tag { flex: 0 0 auto; font-size: 11px; color: #1c64d8; background: #e8f1ff; border-radius: 4px; padding: 2px 7px; font-weight: 500; }
/* CosyVoice3 标签：紫色区分 ComfyUI 的蓝色 */
.url-line .tag.tts { color: #8b5cf6; background: #f3eefe; }
/* 千问语音标签：橙色，和 CosyVoice3 的紫、Whisper 的青再区分开 */
.url-line .tag.qwen { color: #d97706; background: #fdf3e3; }
.url-line .tag.whisper { color: #0d9488; background: #e6f7f4; }
/* 每行地址按内容长度走（flex 0 1 auto），太长才省略号截断 ——
   这样地址后面的复制图标紧跟着地址，而不是被 1fr 推到行尾 */
.url-line a { flex: 0 1 auto; min-width: 0; font-size: 12.5px; font-family: Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-line a { color: #2f86f7; text-decoration: none; }
.url-line a:hover { text-decoration: underline; }
/* 地址后面那颗复制图标：跟实例ID旁边那颗同尺寸，无边框透明底，不把地址行撑高；hover 才显色。
   margin-left 负一点，抵掉图标四周的空白，视觉上贴着地址尾巴 */
.url-line .mini.icon-btn.url-copy { width: 20px; height: 20px; padding: 0; margin-left: -3px; background: transparent; border-color: transparent; color: #9aa3b0; }
.url-line .mini.icon-btn.url-copy:hover { background: #f0f6ff; border-color: #bcd6f8; color: #2f86f7; }
.url-line .mini.icon-btn.url-copy svg.ico { width: 12px; height: 12px; }
/* 全自动链路提示条：说明地址后面那个复制按钮接下来是干嘛用的 */
.tip-row { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #8a93a0; }
.tip-row i { font-size: 16px; color: #2f86f7; }
.tip-row strong { color: #4b5563; font-weight: 600; }
.doc-row { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #8a93a0; }
.doc-row > i:first-child { font-size: 15px; color: #14b8a6; }
.doc-row .lbl { color: #6b7280; }
/* 列表内的行内小操作：扁平浅底 + 细边框，跟顶栏/卡头的实心主操作（部署、刷新）区分开 */
.mini { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; font-size: 12px; font-family: inherit; border-radius: 6px; border: 1px solid #e6e9ef; background: #f6f8fb; color: #5b6472; cursor: pointer; transition: all .15s; }
.mini:hover { border-color: #bcd6f8; background: #f0f6ff; color: #2f86f7; }
.mini:active { transform: translateY(1px); }
.mini.on { color: #1a7f3b; border-color: #d6ecdf; background: #f4faf6; }
.mini.on:hover { border-color: #a9e0c0; background: #eaf8f0; color: #1a7f3b; }
.mini:disabled { opacity: .5; cursor: not-allowed; }
.mini i { font-size: 12.5px; }
/* 抢卡开机：缺卡自动重试那条路，跟普通「开机」区分开，给个淡蓝强调 */
.mini.act-grab { color: #2f6fd0; border-color: #cfe0f7; background: #f2f7ff; }
.mini.act-grab:hover { border-color: #a8c7ee; background: #e8f1ff; color: #1f5ec0; }
/* 只留图标的方形小按钮（复制口令那种），宽高相等、图标居中 */
.mini.icon-btn { width: 26px; padding: 0; justify-content: center; background: #fff; }
.mini.icon-btn i { font-size: 13.5px; }
/* 按钮里的复制图标是内联 svg，bootstrap-icons 那套 font-size 管不到，尺寸单独给定 */
.mini.icon-btn svg.ico { width: 14px; height: 14px; display: block; }
/* 按钮行贴卡片底部（margin-top:auto），两张卡片高度不一致时底边也能对齐 */
.inst .ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-start; margin-top: auto; padding-top: 14px; }

/* ---- 自动部署弹窗：命令预览 + 一键复制 ---- */
.ad-cmd { font-family: Consolas, Menlo, monospace; font-size: 12.5px; line-height: 1.75; background: #0f172a; color: #d7e1ee; border-radius: 8px; padding: 12px 14px; max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.ad-cmd .c-cmt { color: #7c8ba1; }
.ad-kvline { display: block; }
/* 命令单独一条终端行：不折行（横向滚），避免一条长命令按字符硬断成看不懂的碎片 */
.ad-cmdline { margin: 6px 0 4px; padding: 7px 9px; border-radius: 6px; background: rgba(255, 255, 255, .06); white-space: pre; overflow-x: auto; color: #7ee0a1; font-size: 12.5px; }
.ad-cmdline .c-prompt { color: #6ee7d0; margin-right: 2px; user-select: none; }
.ad-cmdline::-webkit-scrollbar { height: 6px; }
.ad-cmdline::-webkit-scrollbar-thumb { background: #46536b; border-radius: 3px; }
/* 两列（字段名 / 值）：不写外层标题，字段名垂直居中于它的值，行间距靠 row-gap */
.ad-kv { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; row-gap: 9px; font-size: 12.5px; color: #4b5563; }
.ad-kv .k { align-self: center; color: #8a93a0; white-space: nowrap; }
/* min-width:0 让长镜像 ID 能缩下来折行，不把整行顶爆 */
.ad-kv .v { min-width: 0; font-family: Consolas, Menlo, monospace; font-size: 12.5px; color: #2c3038; word-break: break-all; }
.ad-kv .v .inp { font-family: inherit; width: auto; }
.ad-kv .v .inp:focus { border-color: #7fb3ff; outline: none; }
/* 输入框右边的说明小标签：这段文字说明「这个 ID 是谁」，一眼看清，不用去翻技能文档 */
.ad-tag { display: inline-block; margin-left: 8px; vertical-align: middle; font-family: inherit; font-size: 11.5px; line-height: 20px; color: #1c64d8; background: #e8f1ff; border: 1px solid #d3e3ff; border-radius: 5px; padding: 0 8px; white-space: nowrap; }

/* 官方价入口：不给估算数字（采来的单价跟官方对不上），一律点官方页看 */
.ad-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #8a93a0; }
.ad-price .c-cmt { color: #8a93a0; }
.ad-link { display: inline-flex; align-items: center; gap: 4px; color: #1c64d8; text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.ad-link:hover { text-decoration: underline; }

/* 配置只读面板（详情页） */
.cfg-readout { background: #f8fafc; border: 1px solid #eef0f4; border-radius: 10px; padding: 8px 16px; margin-bottom: 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 20px; }
.cfg-readout .row { display: flex; align-items: center; padding: 5px 0; border-bottom: none; min-width: 0; }
.cfg-readout .row:last-child { border-bottom: none; }
/* 长值（用户标识这种 UUID）单独占整行，值超宽就省略号截断，绝不在格子里换行 */
.cfg-readout .row.span { grid-column: 1 / -1; }
.cfg-readout .k { width: 92px; flex: 0 0 auto; font-size: 12.5px; color: #8a93a0; }
.cfg-readout .v { font-size: 13.5px; color: #2c3038; display: flex; align-items: center; gap: 8px; min-width: 0; }
.cfg-readout .v code { background: #eef1f5; padding: 2px 8px; border-radius: 5px; font-family: Consolas, monospace; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cfg-readout .reveal { color: #2f86f7; cursor: pointer; font-size: 12.5px; user-select: none; }
.cfg-readout .reveal:hover { text-decoration: underline; }

/* 字段说明（只读项的成因、必填项的用途） */
.field-tip { font-size: 12px; color: #98a1ad; margin-top: 5px; line-height: 1.6; }
/* 说明文本末尾的「去获取令牌」：行内链接，跟着那句说明走，不另起一行也不做成大按钮 */
.field-tip .tlink { margin-left: 5px; color: #2f86f7; text-decoration: none; white-space: nowrap; font-size: 12px; }
.field-tip .tlink:hover { text-decoration: underline; }
.field-tip .tlink i { font-size: 11.5px; position: relative; top: 1px; }
/* 系统生成、不允许修改的字段一律置灰只读 */
.field input[readonly] { background: #f4f6f8; color: #7b8695; cursor: not-allowed; border-color: #e6e9ef; }
/* 密钥输入：输入框 + 显示/隐藏按钮 */
.pwd-row { display: flex; gap: 8px; align-items: center; }
.pwd-row input { flex: 1; }
.pwd-row .btn { flex: 0 0 auto; }
/* 余额的眼睛按钮（显示 / 隐藏余额），点一下在星号与明文间切换 */
.cfg-readout .reveal-bal { color: #2f86f7; }
.cfg-readout .reveal-bal:hover { color: #1c64d8; border-color: #bcd6f8; background: #f0f6ff; }

/* 令牌框打码：不用 type=password（WebView2 里会弹密码自动填充气泡，窗口一失焦弹窗就没了），
   改 text + 文字安全，「显示/隐藏」由 JS 切 -webkit-text-security */
.pwd-row input.masked { -webkit-text-security: disc; letter-spacing: 1px; }
/* 提示语别跟着打码成一串圆点，只有真输入的内容才该藏 */
.pwd-row input.masked::placeholder { -webkit-text-security: none; letter-spacing: 0; }
/* 弹窗里的危险动作（清除令牌）：白底红字，别做成实心红，和主按钮抢眼 */
.modal .m-foot .btn.danger { background: #fff; color: #e64340; border: 1px solid #f3b6b5; }
.modal .m-foot .btn.danger:hover { background: #fdecec; border-color: #eba3a1; }

/* 顶栏右侧按钮变多（令牌 / 口令 / 官方控制台 / 抢卡神器 / 极简画布 / 画布源码 / 注册）：
   宽度不够时先收副标题、再把「复制访问令牌口令」收成图标、最后压按钮内边距，务必保一行。
   折行会把 58px 顶栏撑高、整排卡片往下坠，窗口小一点就看着像错位。
   🔴 按钮必须 nowrap + 不收缩：默认 inline-flex 会被 flex 压缩，字一折行顶栏照样被撑高。 */
.topbar .right .btn { flex: 0 0 auto; white-space: nowrap; max-width: none; }
@media (max-width: 1440px) { .topbar .sub { display: none; } }
@media (max-width: 1380px) { .topbar #btnCopyTokenCfg .lb { display: none; } }
@media (max-width: 1260px) {
    .topbar h1 { font-size: 15px; }
    .topbar .right .btn { padding: 6px 9px; font-size: 12px; }
    .topbar .right .btn i { margin-right: 3px; }
}
