Files
codex-market-app/renderer/styles.css
T

894 lines
55 KiB
CSS
Raw Normal View History

2026-07-15 18:01:56 +08:00
/* Codex 插件市场 —— 深色为主,支持浅色。无外部 CDN,系统字体栈。 */
:root {
--grad: linear-gradient(135deg, #5B6CFF 0%, #A855F7 100%);
--accent: #7c85ff;
--bg: #0f1117;
--bg-2: #161923;
--card: #1b1f2b;
--card-2: #212636;
--border: #2a3042;
--text: #e8eaf2;
--muted: #9aa2b8;
--danger: #ff6b6b;
--ok: #4ade80;
--radius: 14px;
--shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: light) {
:root {
--bg: #f5f6fb;
--bg-2: #eceef6;
--card: #ffffff;
--card-2: #f3f4fa;
--border: #e2e5ef;
--text: #1b1e29;
--muted: #6b7186;
--shadow: 0 8px 24px rgba(60, 60, 120, 0.12);
}
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
"Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
display: flex;
flex-direction: column;
overflow: hidden;
font-size: 14px;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
background: var(--card-2); padding: 1px 6px; border-radius: 6px; }
/* 顶栏 */
.topbar {
display: flex; align-items: center; justify-content: space-between;
padding: 12px 20px; background: var(--bg-2);
border-bottom: 1px solid var(--border);
/* 窗口用系统原生标题栏(main.js 未设 frame:false),不需要自绘拖拽区。
-webkit-app-region: drag 会让浏览器进程在 OS 层拦截该区域的鼠标事件用于「拖窗」,
真实鼠标点击到导航(含标签间隙/品牌区,以及 no-drag 命中不稳的边角)会被吞掉,
而 CDP Input.dispatchMouseEvent 直接注入渲染进程、绕过该拦截,所以静态与 CDP 都看不出。
原生边框已提供拖窗,这里移除以杜绝该类「点不动」。 */
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; display: grid; place-items: center;
border-radius: 11px; box-shadow: var(--shadow); }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
/* —— 顶部广告:官方推荐中转 —— */
.promo {
-webkit-app-region: no-drag;
display: flex; align-items: center; gap: 8px;
padding: 6px 12px; border-radius: 10px; text-decoration: none;
color: var(--text); font-size: 12px; white-space: nowrap;
background: linear-gradient(90deg, rgba(91,108,255,.14), rgba(168,85,247,.14));
border: 1px solid rgba(124,108,255,.35);
transition: .15s;
}
.promo:hover { border-color: rgba(124,108,255,.7);
background: linear-gradient(90deg, rgba(91,108,255,.22), rgba(168,85,247,.22)); }
.promo-badge { font-size: 11px; font-weight: 700; color: #fff;
background: var(--grad); padding: 2px 7px; border-radius: 6px; letter-spacing: .2px; }
.promo-text { color: var(--muted); }
.promo-text b { color: var(--text); font-weight: 600; }
.promo-arrow { color: var(--muted); font-weight: 700; }
.tabs { display: flex; gap: 4px; background: var(--card); padding: 4px;
border-radius: 12px; border: 1px solid var(--border); }
.tab { border: 0; background: transparent; color: var(--muted);
padding: 7px 16px; border-radius: 9px; cursor: pointer; font-size: 13px;
font-weight: 600; transition: .15s; }
.tab:hover { color: var(--text); }
.tab.active { color: #fff; background: var(--grad); box-shadow: var(--shadow); }
/* 内容区 */
.content { flex: 1; overflow-y: auto; padding: 22px; }
.panel { display: none; animation: fade .2s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between;
gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
h2 { margin: 0; font-size: 20px; }
h3 { margin: 0; font-size: 16px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.small { font-size: 12px; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { background: var(--card); border: 1px solid var(--border); color: var(--text);
border-radius: 10px; padding: 9px 12px; width: 220px; outline: none; }
.search:focus { border-color: var(--accent); }
.segmented { display: flex; background: var(--card); border: 1px solid var(--border);
border-radius: 10px; padding: 3px; }
.seg { border: 0; background: transparent; color: var(--muted); padding: 6px 12px;
border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; }
.seg.active { background: var(--card-2); color: var(--text); }
/* 按钮 */
.btn { border: 1px solid var(--border); background: var(--card); color: var(--text);
padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px;
font-weight: 600; transition: .15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-group { display: flex; gap: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: .7; word-break: break-all; }
/* 市场网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 14px; }
.plugin-card { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column;
gap: 10px; transition: .15s; }
.plugin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow);
border-color: var(--accent); }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pc-badge.plugin { background: rgba(124,133,255,.16); color: var(--accent); }
.pc-badge.skill { background: rgba(74,222,128,.15); color: var(--ok); }
.pc-badge.plat { background: rgba(245,158,11,.16); color: #f59e0b; }
.pc-badge.warn { background: rgba(245,158,11,.16); color: #f59e0b; }
.cl-warn { margin-top: 6px; font-size: 12px; color: #f59e0b;
background: rgba(245,158,11,.1); border-radius: 8px; padding: 6px 9px; }
2026-07-15 18:01:56 +08:00
.pc-badge.on { background: rgba(74,222,128,.18); color: var(--ok); }
/* 全局代理:两种模式说明块 */
.proxy-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pm-item { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px;
border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); }
.pm-item b { font-size: 14px; }
@media (max-width: 760px) { .proxy-modes { grid-template-columns: 1fr; } }
.pc-name { font-weight: 700; font-size: 15px; word-break: break-all; }
.pc-meta { color: var(--muted); font-size: 12px; display: flex; gap: 10px;
flex-wrap: wrap; }
.pc-desc { color: var(--muted); font-size: 13px; line-height: 1.5;
min-height: 20px; flex: 1; }
.pc-foot { display: flex; align-items: center; justify-content: space-between;
gap: 10px; margin-top: 2px; }
.link { color: var(--accent); cursor: pointer; font-size: 12px; text-decoration: none; }
.link:hover { text-decoration: underline; }
/* 勾选列表(备份/还原) */
.checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cl-group { font-size: 12px; font-weight: 700; color: var(--muted);
text-transform: uppercase; letter-spacing: .5px; margin: 10px 2px 2px; }
.cl-item { display: flex; align-items: center; gap: 12px; background: var(--card);
border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px;
cursor: pointer; transition: .12s; }
.cl-item:hover { border-color: var(--accent); }
.cl-item input { width: 17px; height: 17px; accent-color: var(--accent); }
.cl-item .cl-name { font-weight: 600; }
.cl-item .cl-src { color: var(--muted); font-size: 12px; }
.cl-item .cl-size { margin-left: auto; color: var(--muted); font-size: 12px; }
/* 路由分组:按协议族分两栏,各一个单选,可同时激活 */
#router-groups { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.router-col { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 8px; }
.router-col-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 2px; }
.router-col .empty.small { font-size: 12px; padding: 10px 14px; }
2026-07-15 18:01:56 +08:00
/* 子标签 */
.subtabs { display: flex; gap: 6px; margin-bottom: 18px; }
.subtab { border: 1px solid var(--border); background: var(--card); color: var(--muted);
padding: 8px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.subtab.active { color: var(--text); border-color: var(--accent); background: var(--card-2); }
.subpanel { display: none; }
.subpanel.active { display: block; }
/* 表单卡片 */
.card { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 16px; }
.action-card { margin-top: 8px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { flex: 1; min-width: 200px; }
.field span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
border-radius: 10px; padding: 10px 12px; outline: none; }
.field input:focus { border-color: var(--accent); }
.check-inline { display: flex; align-items: center; gap: 8px; color: var(--muted);
font-size: 13px; cursor: pointer; }
.check-inline input { accent-color: var(--accent); width: 16px; height: 16px; }
/* 空 / 加载态 */
.empty { text-align: center; color: var(--muted); padding: 50px 20px;
border: 1px dashed var(--border); border-radius: var(--radius); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border);
border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite;
margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
/* 日志抽屉 */
.logbar { border-top: 1px solid var(--border); background: var(--bg-2); }
.log-toggle { width: 100%; text-align: left; border: 0; background: transparent;
color: var(--muted); padding: 8px 20px; cursor: pointer; font-size: 12px;
font-weight: 600; display: flex; justify-content: space-between; }
.log-panel { max-height: 190px; overflow-y: auto; padding: 0 20px 12px; }
.log-panel pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px; line-height: 1.6; color: var(--muted); white-space: pre-wrap;
word-break: break-word; }
/* Toast */
.toast { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
background: var(--card); border: 1px solid var(--border); color: var(--text);
padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 50;
max-width: 80%; font-size: 13px; }
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }
.toast.warn { border-color: #f5a623; }
2026-07-15 18:01:56 +08:00
/* 卡片内按钮忙碌态 */
.installing { pointer-events: none; opacity: .7; }
/* 会话记录:同步横幅 */
.sync-banner { display: flex; align-items: center; justify-content: space-between;
gap: 14px; background: linear-gradient(135deg, rgba(124,133,255,.12), rgba(168,85,247,.10));
border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
margin-bottom: 12px; }
.sync-banner .sync-text { display: flex; flex-direction: column; gap: 3px; }
.sync-banner .sync-text strong { font-size: 14px; }
.sync-banner .sync-text b { color: var(--danger); }
.sync-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sync-progress-bar { flex: 1; max-width: 320px; height: 7px; background: var(--card-2);
border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.sync-progress-fill { height: 100%; width: 0%; background: var(--grad);
border-radius: 999px; transition: width .2s ease; }
.sync-progress-label { white-space: nowrap; }
/* 会话记录:左右两栏 */
.sess-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px;
height: calc(100vh - 240px); min-height: 320px; }
.sess-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
padding-right: 4px; }
.sess-item { background: var(--card); border: 1px solid var(--border);
border-radius: 11px; padding: 10px 12px; cursor: pointer; transition: .12s; }
.sess-item:hover { border-color: var(--accent); }
.sess-item.active { border-color: var(--accent); background: var(--card-2); }
.sess-item .si-title { font-weight: 600; font-size: 13px; margin-bottom: 3px;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-item .si-meta { color: var(--muted); font-size: 11px; display: flex;
gap: 8px; flex-wrap: wrap; }
.si-badge { border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px;
color: var(--text); background: var(--card-2); font-weight: 700; }
.sess-reader { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.sess-conv { display: flex; flex-direction: column; height: 100%; }
.sess-conv-head { display: flex; align-items: center; justify-content: space-between;
gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.sess-conv-title { font-weight: 700; font-size: 14px; white-space: nowrap;
overflow: hidden; text-overflow: ellipsis; }
.sess-messages { overflow-y: auto; padding: 16px; display: flex;
flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg .who { font-size: 11px; font-weight: 700; color: var(--muted); }
.msg .bubble { border-radius: 12px; padding: 10px 13px; font-size: 13px;
line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-items: flex-end; }
.msg.user .bubble { background: var(--grad); color: #fff; max-width: 85%; }
.msg.assistant .bubble { background: var(--card-2); color: var(--text);
border: 1px solid var(--border); max-width: 92%; }
.msg.tool .bubble { background: transparent; color: var(--muted); font-size: 12px;
border: 1px dashed var(--border); padding: 5px 10px; }
/* 常驻页脚:版权 / 使用说明 */
.footer-notice { display: flex; align-items: center; justify-content: space-between;
gap: 12px; padding: 7px 20px; background: var(--bg-2);
border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.footer-notice .fn-text { flex: 1; min-width: 0; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap; }
.footer-notice .fn-links { display: flex; gap: 14px; flex-shrink: 0; }
.fn-link { border: 0; background: transparent; color: var(--accent); cursor: pointer;
font-size: 11px; font-weight: 600; padding: 0; }
.fn-link:hover { text-decoration: underline; }
/* 说明弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5);
display: flex; align-items: center; justify-content: center; z-index: 100;
padding: 24px; animation: fade .15s ease; }
.modal { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); box-shadow: var(--shadow); max-width: 640px;
width: 100%; max-height: 82vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between;
padding: 15px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 17px;
cursor: pointer; line-height: 1; padding: 3px 7px; border-radius: 8px; }
.modal-close:hover { color: var(--text); background: var(--card-2); }
.modal-body { padding: 18px 22px; overflow-y: auto; line-height: 1.7;
font-size: 13px; color: var(--text); }
.modal-body h4 { margin: 18px 0 6px; font-size: 14px; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { margin: 6px 0; color: var(--muted); }
.modal-body ul { margin: 6px 0; padding-left: 20px; color: var(--muted); }
.modal-body li { margin: 4px 0; }
.modal-body strong { color: var(--text); }
.modal-body .step { display: flex; gap: 10px; margin: 8px 0; align-items: baseline; }
.modal-body .step .n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px;
background: var(--grad); color: #fff; font-size: 11px; font-weight: 700;
display: grid; place-items: center; }
.cv-media-modal { max-width: min(1120px, 94vw); }
.cv-media-modal .modal-body { padding: 10px; overflow: hidden; }
.cv-modal-media { display: block; width: 100%; max-height: 76vh; object-fit: contain;
background: #000; border-radius: 8px; }
.grp-select { margin-top: 8px; width: 100%; background: var(--bg-2);
border: 1px solid var(--border); color: var(--text); border-radius: 10px;
padding: 9px 12px; outline: none; font-size: 13px; }
.grp-select:focus { border-color: var(--accent); }
.grp-1m-list { margin-top: 8px; display: flex; flex-direction: column; gap: 2px;
max-height: 180px; overflow-y: auto; border: 1px solid var(--border);
border-radius: 10px; padding: 6px; background: var(--bg-2); }
.grp-1m-item { display: flex; align-items: center; gap: 8px; padding: 5px 7px;
border-radius: 7px; cursor: pointer; font-size: 13px; }
.grp-1m-item:hover { background: var(--card); }
.grp-1m-item input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.grp-1m-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claudedesk-block > span:first-child { font-weight: 600; font-size: 13px; }
.claudedesk-block .btn:disabled { opacity: .45; cursor: not-allowed; }
2026-07-15 18:01:56 +08:00
/* —— 会话记忆 —— */
.mem-item { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 13px 16px; margin-bottom: 10px; }
.mem-item:hover { border-color: var(--accent); }
.mem-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mem-topic { font-weight: 600; }
.mem-actions { margin-left: auto; display: flex; gap: 6px; }
.mem-sum { margin-top: 8px; white-space: pre-wrap; font-size: 13px; color: var(--text); opacity: .88; }
.mem-line { margin-top: 6px; font-size: 12px; color: var(--muted); }
.mem-line b { color: var(--text); margin-right: 8px; font-weight: 600; }
/* ===========================================================================
技能商店(cocoloop 镜像)—— 侧栏分类 + 精致卡片
=========================================================================== */
.store { display: grid; grid-template-columns: 236px 1fr; gap: 18px;
height: calc(100vh - 150px); min-height: 420px; }
/* 左侧分类导航 */
.store-nav { display: flex; flex-direction: column; background: var(--bg-2);
border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.store-nav-head { display: flex; align-items: baseline; justify-content: space-between;
padding: 13px 15px 9px; border-bottom: 1px solid var(--border); }
.store-nav-title { font-size: 12px; font-weight: 700; color: var(--muted);
letter-spacing: .5px; }
.store-nav-total { font-size: 11px; color: var(--accent); font-weight: 700; }
.store-nav-list { flex: 1; overflow-y: auto; padding: 8px; display: flex;
flex-direction: column; gap: 2px; }
.store-nav-list::-webkit-scrollbar { width: 8px; }
.store-nav-list::-webkit-scrollbar-thumb { background: var(--border);
border-radius: 8px; }
.store-nav-group { font-size: 10px; font-weight: 700; color: var(--muted);
text-transform: uppercase; letter-spacing: .6px; padding: 10px 10px 4px; opacity: .7; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px;
border-radius: 9px; cursor: pointer; border: 1px solid transparent;
transition: .12s; color: var(--text); }
.nav-item:hover { background: var(--card); }
.nav-item.active { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.nav-item.active .nav-count { background: rgba(255,255,255,.22); color: #fff; }
.nav-ico { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-name { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap;
overflow: hidden; text-overflow: ellipsis; }
.nav-count { font-size: 11px; font-weight: 700; color: var(--muted);
background: var(--card-2); padding: 1px 8px; border-radius: 999px; flex-shrink: 0; }
/* 右侧主区 */
.store-main { display: flex; flex-direction: column; min-width: 0; }
.store-head { display: flex; align-items: center; justify-content: space-between;
gap: 16px; flex-wrap: wrap; }
.store-crumb { display: flex; align-items: baseline; gap: 8px; font-size: 20px;
font-weight: 700; }
.store-crumb .muted { font-size: 13px; font-weight: 600; }
.store-crumb-sep { color: var(--muted); font-weight: 400; }
.store-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.store-sub { margin: 6px 0 14px; font-size: 12.5px; }
.store-grid { overflow-y: auto; align-content: start; padding: 2px 4px 4px 2px;
flex: 1; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.store-grid::-webkit-scrollbar { width: 9px; }
.store-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9px; }
/* 技能卡片 */
.skill-card { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 15px; display: flex; flex-direction: column;
gap: 11px; transition: .15s; position: relative; overflow: hidden; }
.skill-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
background: var(--grad); opacity: 0; transition: .15s; }
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow);
border-color: var(--accent); }
.skill-card:hover::before { opacity: 1; }
.sk-top { display: flex; align-items: flex-start; gap: 11px; }
.sk-ico { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
font-size: 22px; background: var(--card-2); border: 1px solid var(--border);
border-radius: 11px; }
.sk-headings { min-width: 0; flex: 1; }
.sk-name { font-weight: 700; font-size: 15px; line-height: 1.25; word-break: break-word; }
.sk-author { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sk-sec { flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center;
border-radius: 7px; font-size: 11px; font-weight: 800; }
.sk-sec.S { background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff; }
.sk-sec.A { background: rgba(74,222,128,.16); color: var(--ok); }
.sk-sec.B { background: var(--card-2); color: var(--muted); }
.sk-subtitle { font-weight: 600; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.sk-brief { color: var(--muted); font-size: 12.5px; line-height: 1.55; flex: 1;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
overflow: hidden; }
.sk-agents { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sk-agents .lab { font-size: 11px; color: var(--muted); margin-right: 2px; }
.agent-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
display: inline-flex; align-items: center; gap: 5px; background: var(--card-2);
border: 1px solid var(--border); }
.agent-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.agent-badge.claude::before { background: #d97757; }
.agent-badge.codex::before { background: #5b6cff; }
.agent-badge.openclaw::before { background: #a855f7; }
.agent-badge.mm { background: rgba(245,158,11,.14); border-color: transparent; color: #f59e0b; }
.agent-badge.mm::before { display: none; }
.sk-meta { display: flex; align-items: center; gap: 13px; padding-top: 9px;
border-top: 1px solid var(--border); color: var(--muted); font-size: 12px;
flex-wrap: wrap; }
.sk-meta .cred { margin-left: auto; font-size: 10px; font-weight: 700; padding: 1px 7px;
border: 1px solid var(--border); border-radius: 6px; letter-spacing: .3px; }
.sk-foot { display: flex; align-items: center; gap: 9px; }
.sk-foot .btn.primary { flex: 1; }
/* 加载更多 */
.store-more { display: flex; align-items: center; justify-content: center; gap: 12px;
padding: 14px; color: var(--muted); font-size: 13px; }
/* 技能详情弹窗内的排版 */
.sd-hero { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.sd-hero .sk-ico { width: 52px; height: 52px; font-size: 27px; }
.sd-hero h3 { font-size: 18px; }
.sd-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; color: var(--muted);
font-size: 13px; }
.sd-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.sd-tag { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
background: var(--card-2); color: var(--muted); border: 1px solid var(--border); }
.sd-install-row { display: flex; gap: 10px; margin-top: 8px; }
@media (max-width: 820px) {
.store { grid-template-columns: 1fr; height: auto; }
.store-nav { max-height: 200px; }
}
/* 品牌 logo 图片 */
.logo img { width: 100%; height: 100%; border-radius: 10px; display: block; object-fit: cover; }
/* ===========================================================================
更新弹窗
=========================================================================== */
.update-modal { max-width: 480px; padding: 0; }
.update-head { display: flex; align-items: center; gap: 13px; padding: 20px 22px 14px; }
.update-ico { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center;
font-size: 24px; border-radius: 12px; background: var(--grad); }
.update-head h3 { font-size: 17px; margin: 0; }
.update-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 10px;
border-radius: 999px; }
.update-badge.force { background: rgba(255,107,107,.16); color: var(--danger); }
.update-badge.normal { background: rgba(74,222,128,.15); color: var(--ok); }
.update-notes { margin: 0 22px; padding: 14px 16px; background: var(--bg-2);
border: 1px solid var(--border); border-radius: 12px; max-height: 300px; overflow-y: auto;
font-size: 13px; line-height: 1.65; color: var(--text); white-space: pre-wrap;
word-break: break-word; }
.update-notes:empty::before { content: "本次更新暂无详细说明。"; color: var(--muted); }
.update-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px 20px; }
.update-foot .btn { min-width: 96px; }
/* ===========================================================================
插件市场 —— 内置工具卡片 + 分区标题 + 返回按钮
=========================================================================== */
.tools-title { font-size: 13px; font-weight: 700; color: var(--muted);
letter-spacing: .5px; margin: 6px 2px 12px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 14px; margin-bottom: 26px; }
.tool-card { background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column;
gap: 10px; transition: .15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.tool-top { display: flex; align-items: center; gap: 11px; }
.tool-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
font-size: 21px; background: var(--card-2); border: 1px solid var(--border); border-radius: 11px; }
.tool-name { font-weight: 700; font-size: 15px; }
.tool-desc { color: var(--muted); font-size: 13px; line-height: 1.6; flex: 1; }
.tool-foot { display: flex; justify-content: flex-end; }
.back-btn { margin-right: 8px; vertical-align: middle; padding: 4px 10px; }
/* ============================================================
创意画布(Drawflow 节点画布)
复用 :root 设计变量,覆写 Drawflow 默认外观,明/暗色协调。
============================================================ */
/* 画布面板占满内容区高度:工具条固定 + 画布撑满剩余空间 */
/* 画布面板占满内容区高度:抵消 .content 的 22px padding,铺满更大气 */
#tab-canvas.active { display: flex; flex-direction: column; min-height: 0;
margin: -22px; height: calc(100% + 44px); padding: 22px; }
.cv-toolbar { display: flex; align-items: center; justify-content: space-between;
gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cv-toolbar-left { display: flex; align-items: center; gap: 12px; }
.cv-title { font-size: 18px; }
.cv-status { border: 1px solid var(--border); background: var(--card-2); color: var(--muted); }
.cv-status.on { background: rgba(74,222,128,.18); color: var(--ok); border-color: transparent; }
.cv-status.off { background: rgba(255,107,107,.16); color: var(--danger); border-color: transparent; }
.cv-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-add-label { color: var(--muted); font-size: 12px; font-weight: 600; margin-right: 2px; }
/* 画布舞台:明确高度(Drawflow 容器需要),点阵底纹 */
.cv-stage { position: relative; flex: 1; min-height: 560px;
border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
box-shadow: var(--shadow); }
#drawflow { position: absolute; inset: 0; width: 100%; height: 100%;
background-color: var(--bg-2);
background-image: radial-gradient(var(--border) 1px, transparent 1px);
background-size: 22px 22px; }
/* 悬浮缩放控件(右下角,覆盖在画布上) */
.cv-zoom { position: absolute; right: 14px; bottom: 14px; z-index: 15;
display: flex; flex-direction: column; gap: 1px; border-radius: 10px; overflow: hidden;
border: 1px solid var(--border); box-shadow: var(--shadow); }
.cv-zoom-btn { border: 0; background: var(--card); color: var(--text);
width: 38px; height: 34px; cursor: pointer; font-size: 17px; font-weight: 700;
line-height: 1; display: flex; align-items: center; justify-content: center;
transition: .12s; user-select: none; }
.cv-zoom-btn:hover { background: var(--accent); color: #fff; }
.cv-zoom-btn:active { transform: scale(.94); }
.cv-zoom-level { font-size: 11px; font-weight: 600; color: var(--muted);
border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
/* 未就绪遮罩 */
.cv-mask { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center;
background: color-mix(in srgb, var(--bg) 78%, transparent);
backdrop-filter: blur(2px); }
.cv-mask-box { text-align: center; background: var(--card); border: 1px solid var(--border);
border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); max-width: 380px; }
.cv-mask-ico { font-size: 34px; }
.cv-mask-title { font-weight: 700; font-size: 16px; margin: 8px 0 4px; }
.cv-mask-text { color: var(--muted); font-size: 13px; margin: 0 0 14px; line-height: 1.6; }
/* —— 覆写 Drawflow 节点为卡片风 —— */
.drawflow .drawflow-node { background: transparent; border: 0; padding: 0;
border-radius: 16px; box-shadow: none; width: 250px; }
.drawflow .drawflow-node.selected { box-shadow: none; }
.drawflow .drawflow-node .drawflow_content_node { width: 100%; }
.cv-node { background: var(--card); border: 1px solid var(--border);
border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
transition: border-color .15s; }
.drawflow-node:hover .cv-node { border-color: var(--accent); }
.drawflow-node.selected .cv-node { border-color: transparent;
box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.cv-node-head { display: flex; align-items: center; gap: 8px;
padding: 9px 12px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.cv-node-ico { font-size: 15px; }
.cv-node-name { font-weight: 700; font-size: 13px; color: var(--text); }
.cv-node-tag { margin-left: auto; font-size: 10px; font-weight: 700; color: #f59e0b;
background: rgba(245,158,11,.16); padding: 2px 7px; border-radius: 999px; }
.cv-node-body { display: flex; flex-direction: column; gap: 8px; padding: 11px 12px; }
.cv-node-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
/* 节点内表单控件 */
.cv-field { width: 100%; background: var(--bg-2); border: 1px solid var(--border);
color: var(--text); border-radius: 9px; padding: 8px 10px; font-size: 12px;
font-family: inherit; outline: none; resize: vertical; }
.cv-field:focus { border-color: var(--accent); }
select.cv-field { resize: none; cursor: pointer; }
/* 并排两个下拉(比例 + 清晰度 / 音色 + 格式 等) */
.cv-row2 { display: flex; gap: 8px; }
.cv-row2 .cv-field { flex: 1; min-width: 0; }
/* 模型输入框 + 每节点「拉取」小按钮 */
.cv-model-row { display: flex; gap: 6px; align-items: stretch; }
.cv-model-row .cv-field { flex: 1; min-width: 0; }
.cv-fetch-models { flex: none; border: 1px solid var(--border); background: var(--card-2);
color: var(--muted); border-radius: 9px; padding: 0 10px; cursor: pointer;
font-size: 11px; font-weight: 700; transition: .15s; }
.cv-fetch-models:hover { border-color: var(--accent); color: var(--accent); }
.cv-fetch-models:disabled { opacity: .5; cursor: not-allowed; }
/* 素材上传控件(图片节点参考图 / 视频节点首帧·尾帧·多参考图)——走自建图床 */
.cv-refimg-row, .cv-vmat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cv-refimg-pick { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
border: 1px dashed var(--accent); color: var(--accent); background: var(--card-2);
border-radius: 9px; padding: 7px 12px; font-size: 11px; font-weight: 700;
transition: .15s; white-space: nowrap; user-select: none; }
.cv-refimg-pick:hover { background: var(--accent); color: #fff; }
.cv-refimg-thumb, .cv-vmat-thumb { border: 1px solid var(--border); }
.cv-refimg-clear, .cv-vmat-clear { flex: none; border: 1px solid var(--border);
background: var(--card-2); color: var(--muted); border-radius: 7px; cursor: pointer;
width: 24px; height: 24px; font-size: 12px; line-height: 1; padding: 0; transition: .15s; }
.cv-refimg-clear:hover, .cv-vmat-clear:hover { border-color: var(--danger); color: var(--danger); }
/* URL 输入 / 提示 / 多图缩略图 各自独占一行 */
2026-07-15 19:09:45 +08:00
.cv-vmat-url, .cv-vmat-urls { flex: 1 1 100%; }
2026-07-15 18:01:56 +08:00
.cv-refimg-row .cv-node-hint, .cv-vmat .cv-node-hint { flex: 1 1 100%; }
.cv-vmat-refs-thumbs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 100%; }
/* 复选标签(生成音频 / 水印 / 固定镜头)对齐 */
.cv-check { display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
color: var(--muted); cursor: pointer; user-select: none; }
/* 折叠「高级」区(接口地址覆盖),别把节点撑太高 */
.cv-adv { border-top: 1px dashed var(--border); padding-top: 6px; }
.cv-adv > summary { cursor: pointer; color: var(--muted); font-size: 11px;
font-weight: 600; list-style: none; user-select: none; }
.cv-adv > summary::-webkit-details-marker { display: none; }
.cv-adv > summary::before { content: "▸ "; }
.cv-adv[open] > summary::before { content: "▾ "; }
.cv-adv[open] > summary { margin-bottom: 6px; }
/* 运行按钮(沿用主色渐变观感) */
.cv-run { align-self: stretch; border: 0; background: var(--grad); color: #fff;
padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 12px;
font-weight: 700; transition: .15s; }
.cv-run:hover { filter: brightness(1.08); }
.cv-run:disabled { opacity: .6; cursor: not-allowed; }
/* 错误红字 */
.cv-node-err { color: var(--danger); font-size: 11px; line-height: 1.5;
background: rgba(255,107,107,.1); border-radius: 8px; padding: 6px 9px; }
/* 预览区(img/video/audio)圆角、限高、加载骨架 */
.cv-node-preview { border-radius: 10px; overflow: hidden; background: var(--bg-2);
border: 1px solid var(--border); }
.cv-preview-shell { position: relative; background: #000; }
.cv-preview-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 5px;
z-index: 2; opacity: .92; }
.cv-preview-actions button { width: 26px; height: 26px; display: grid; place-items: center;
border: 1px solid rgba(255,255,255,.22); border-radius: 7px; background: rgba(15,17,23,.78);
color: #fff; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.cv-preview-actions button:hover { background: rgba(90,103,216,.92); border-color: rgba(255,255,255,.4); }
.cv-media { display: block; width: 100%; max-height: 220px; object-fit: contain;
background: #000; }
.cv-media-audio { display: block; width: 100%; }
.cv-meta { font-size: 10px; color: var(--muted); padding: 5px 8px;
border-top: 1px solid var(--border); }
.cv-skeleton { display: flex; align-items: center; justify-content: center; gap: 8px;
height: 120px; color: var(--muted); font-size: 12px;
background: linear-gradient(100deg, var(--bg-2) 30%, var(--card-2) 50%, var(--bg-2) 70%);
background-size: 200% 100%; animation: cv-shimmer 1.2s linear infinite; }
@keyframes cv-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.cv-spin { width: 13px; height: 13px; border-radius: 50%;
border: 2px solid var(--border); border-top-color: var(--accent);
animation: cv-rot .7s linear infinite; }
@keyframes cv-rot { to { transform: rotate(360deg); } }
/* —— 端口与连线用主题色 —— */
.drawflow .drawflow-node .input,
.drawflow .drawflow-node .output { background: var(--card);
border: 2px solid var(--accent); width: 13px; height: 13px; }
.drawflow .drawflow-node .output:hover,
.drawflow .drawflow-node .input:hover { background: var(--accent); }
.drawflow .connection .main-path { stroke: var(--accent); stroke-width: 2.4px; }
.drawflow .connection .main-path:hover { stroke: var(--text); }
.drawflow .connection .point { stroke: var(--accent); fill: var(--card); }
/* —— 沉浸式全屏:fixed 覆盖整个应用窗口(含顶部导航) —— */
body.cv-noscroll { overflow: hidden; }
#tab-canvas.cv-fullscreen { position: fixed; inset: 0; z-index: 9999; margin: 0;
height: auto; padding: 14px 16px; background: var(--bg); }
#tab-canvas.cv-fullscreen .cv-stage { min-height: 0; border-radius: 12px; }
/* —— 语音输入面板 —— */
.voice-body { display: grid; gap: 14px; max-width: 760px; }
.voice-card { border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 12px; padding: 14px 16px; background: var(--card, rgba(255,255,255,.02)); }
.voice-card-title { font-weight: 600; margin-bottom: 8px; }
.voice-row { display: flex; gap: 8px; align-items: center; }
.voice-row .search { flex: 1; }
.voice-ol { margin: 6px 0 0 18px; line-height: 1.9; color: var(--muted, #9ca3af); font-size: 13px; }
.voice-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: #6b7280; flex: none; }
.voice-dot[data-state="connected"] { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,.7); }
.voice-dot[data-state="transcribing"], .voice-dot[data-state="recording"] { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.7); }
.voice-dot[data-state="restarting"], .voice-dot[data-state="connecting"], .voice-dot[data-state="injecting"], .voice-dot[data-state="checking"] { background: #60a5fa; }
.voice-dot[data-state="error"] { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,.7); }
.voice-dot[data-state="running_no_port"] { background: #f59e0b; }
.codex-link-status {
display: flex;
align-items: center;
gap: 7px;
min-height: 36px;
padding: 5px 7px 5px 10px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--card);
white-space: nowrap;
}
.codex-link-label { font-weight: 700; font-size: 12px; }
.codex-link-status .btn.small { padding: 5px 10px; }
/* ===== 员工团队 ===== */
#tab-team { padding: 0; }
.tm-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 16px; height: 100%; padding: 16px 20px; box-sizing: border-box; }
.tm-input-col { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px; }
.tm-title { font-size: 18px; margin: 0; }
.tm-sub { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0; }
.tm-req { width: 100%; min-height: 130px; resize: vertical; box-sizing: border-box;
background: var(--card); border: 1px solid var(--border); color: var(--text);
border-radius: 10px; padding: 12px; font-size: 13.5px; line-height: 1.6; font-family: inherit; }
.tm-req:focus { border-color: var(--accent); outline: none; }
.tm-field { display: flex; flex-direction: column; gap: 6px; }
.tm-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.tm-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.tm-row { display: flex; gap: 8px; align-items: center; }
.tm-select, .tm-text { background: var(--card); border: 1px solid var(--border); color: var(--text);
border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: inherit; flex: 1; min-width: 0; }
.tm-select:focus, .tm-text:focus { border-color: var(--accent); outline: none; }
.tm-chips { display: flex; gap: 6px; }
.tm-chip { border: 1px solid var(--border); background: var(--card); color: var(--muted);
padding: 6px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.tm-chip.active { color: #fff; background: var(--grad); border-color: transparent; }
.tm-gen { margin-top: 4px; padding: 11px; font-size: 14px; }
.tm-result-col { display: flex; flex-direction: column; background: var(--bg-2);
border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-height: 0; }
.tm-result-head { display: flex; align-items: center; justify-content: space-between;
padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tm-result-title { font-weight: 600; font-size: 14px; }
.tm-result-body { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.tm-empty, .tm-loading, .tm-error { display: flex; flex-direction: column; align-items: center;
justify-content: center; text-align: center; height: 100%; gap: 8px; color: var(--muted); }
.tm-empty-ico { font-size: 34px; }
.tm-empty-title { font-size: 15px; color: var(--text); margin: 0; }
.tm-empty-sub { font-size: 12.5px; margin: 0; }
.tm-error { color: var(--danger); font-size: 13.5px; padding: 20px; }
.tm-spinner { width: 34px; height: 34px; border: 3px solid var(--border);
border-top-color: var(--accent); border-radius: 50%; animation: tmspin .8s linear infinite; }
@keyframes tmspin { to { transform: rotate(360deg); } }
.tm-loading-text { font-size: 13px; }
.tm-team-head { margin-bottom: 14px; }
.tm-team-name { font-size: 18px; font-weight: 700; }
.tm-team-summary { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.tm-team-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tm-stack-chip { background: var(--card-2); border: 1px solid var(--border); color: var(--text);
padding: 3px 10px; border-radius: 20px; font-size: 11.5px; }
.tm-conv-card, .tm-emp-card { background: var(--card); border: 1px solid var(--border);
border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.tm-emp-card.lead { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(124,133,255,.25); }
.tm-conv-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.tm-conv-owner { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.tm-conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tm-cc-label { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.tm-conv-col ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.tm-emp-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-emp-name { font-weight: 700; font-size: 14.5px; }
.tm-emp-badge { background: var(--grad); color: #fff; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; }
.tm-emp-id { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--muted);
background: var(--card-2); padding: 1px 6px; border-radius: 5px; }
.tm-emp-duty { font-size: 13px; color: var(--text); margin-top: 5px; line-height: 1.5; }
.tm-sec-label { font-size: 11.5px; font-weight: 600; color: var(--accent); margin: 10px 0 4px; }
.tm-resp, .tm-flow { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.tm-collab { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.tm-ec-row { display: flex; gap: 8px; font-size: 12px; color: var(--muted); }
.tm-ec-k { color: var(--accent); font-weight: 600; min-width: 32px; }
.tm-ec-row code, .tm-collab code { font-family: ui-monospace, monospace; font-size: 11px;
background: var(--card-2); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.tm-cons { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-con-chip { font-size: 11px; background: var(--card-2); border: 1px solid var(--border);
color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.tm-file-block { margin-top: 10px; }
.tm-file-toggle { border: 1px dashed var(--border); background: transparent; color: var(--accent);
font-size: 12px; padding: 5px 10px; border-radius: 7px; cursor: pointer; width: 100%; }
.tm-file-toggle:hover { border-color: var(--accent); }
.tm-file-view { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.tm-file-head { display: flex; justify-content: space-between; align-items: center;
padding: 6px 10px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.tm-file-name { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--muted); }
.tm-file-copy { border: 1px solid var(--border); background: var(--card); color: var(--text);
font-size: 11px; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
.tm-file-pre { margin: 0; padding: 12px; font-family: ui-monospace, monospace; font-size: 11.5px;
line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word;
max-height: 340px; overflow-y: auto; background: var(--bg); }
@media (max-width: 820px) { .tm-wrap { grid-template-columns: 1fr; } .tm-conv-grid { grid-template-columns: 1fr; } }
/* —— ②.⑥ 提示词提取 —— */
.pm-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 18px; padding: 14px 18px; height: calc(100vh - 220px); overflow: hidden; }
.pm-input-col { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px; }
.pm-result-col { display: flex; flex-direction: column; overflow: hidden; }
.pm-result-head { display: flex; align-items: center; gap: 10px; padding: 0 0 8px; border-bottom: 1px solid var(--border); }
.pm-result-title { font-weight: 600; font-size: 14px; }
.pm-meta-model { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.pm-meta-conf { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.pm-conf-high { background: #1a3a1a; color: #4ade80; }
.pm-conf-medium { background: #3a2e0a; color: #fbbf24; }
.pm-conf-low { background: #3a1a1a; color: #ff6b6b; }
.pm-result-body { flex: 1; overflow-y: auto; padding-right: 4px; }
.pm-dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 28px 16px;
text-align: center; cursor: pointer; transition: border-color .2s; min-height: 150px; display: flex; align-items: center; justify-content: center; }
.pm-dropzone:hover, .pm-dropzone.drag { border-color: var(--accent); }
.pm-dz-icon { font-size: 36px; margin-bottom: 8px; }
.pm-dz-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.pm-dz-sub { font-size: 12px; color: var(--muted); }
.pm-dz-preview { position: relative; }
.pm-dz-preview img { max-width: 100%; max-height: 200px; border-radius: 10px; object-fit: contain; }
.pm-dz-clear { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.65); color: #fff;
border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 14px; cursor: pointer; line-height: 1; }
.pm-field { display: flex; flex-direction: column; gap: 4px; }
.pm-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pm-row { display: flex; gap: 8px; align-items: center; }
.pm-row .pm-select { flex: 1; min-width: 0; }
.pm-row .btn { flex-shrink: 0; white-space: nowrap; }
.pm-select { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
background: var(--card); color: var(--text); font-size: 13px; }
.pm-hint { font-size: 11px; color: var(--muted); line-height: 1.4; }
.pm-gen { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.pm-empty, .pm-loading, .pm-error { display: flex; flex-direction: column; align-items: center;
justify-content: center; text-align: center; padding: 40px 20px; }
.pm-empty-ico { font-size: 48px; margin-bottom: 12px; }
.pm-empty-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.pm-empty-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.pm-empty-feats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pm-empty-feats span { font-size: 11px; background: var(--card-2); border: 1px solid var(--border);
padding: 3px 10px; border-radius: 14px; color: var(--muted); }
.pm-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent);
border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pm-loading-text { font-size: 13px; color: var(--muted); }
.pm-error { color: var(--danger); font-size: 13px; }
.pm-content { display: flex; flex-direction: column; gap: 12px; }
.pm-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--card); }
.pm-card.primary { border-color: var(--accent); border-width: 1.5px; }
.pm-card.subtle { background: var(--card-2); border-style: dashed; }
.pm-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pm-card-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pm-card-title em { font-style: normal; color: var(--accent); font-size: 10px; margin-left: 4px; }
.pm-prompt-text { font-size: 13.5px; line-height: 1.65; margin: 0; color: var(--text); }
.pm-prompt-text.mono { font-family: ui-monospace, monospace; font-size: 12px; }
.pm-prompt-text.zh-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.pm-copy-btn { border: 1px solid var(--border); background: var(--card-2); color: var(--text);
font-size: 11px; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
.pm-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.pm-tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-tag { font-size: 11px; background: var(--card-2); border: 1px solid var(--border);
padding: 3px 10px; border-radius: 14px; color: var(--text); }
.pm-breakdown { display: flex; flex-direction: column; gap: 6px; }
.pm-bd-row { display: flex; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--border); }
.pm-bd-label { display: flex; flex-direction: column; min-width: 90px; flex-shrink: 0; }
.pm-bd-label-zh { font-size: 12px; font-weight: 600; color: var(--text); }
.pm-bd-label-en { font-size: 10px; color: var(--muted); }
.pm-bd-values { display: flex; flex-direction: column; }
.pm-bd-zh { font-size: 12px; color: var(--text); line-height: 1.5; }
.pm-bd-en { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 1px; }
.pm-notes { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; padding: 10px 12px;
border-left: 3px solid var(--accent); background: var(--card-2); border-radius: 0 8px 8px 0; }
@media (max-width: 820px) { .pm-wrap { grid-template-columns: 1fr; } }
/* —— ②.⑦ Token 用量面板 —— */
.tk-body { padding: 14px 18px; max-width: 600px; display: flex; flex-direction: column; gap: 14px; }
.tk-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--card); }
.tk-card.hero { text-align: center; padding: 28px 16px; border-color: var(--accent); border-width: 1.5px; background: linear-gradient(135deg, var(--card) 0%, var(--card-2) 100%); }
.tk-hero-num { font-size: 42px; font-weight: 700; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.tk-hero-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tk-breakdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.tk-breakdown span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.tk-breakdown b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-hero-date { font-size: 11px; color: var(--muted); margin-top: 2px; opacity: .7; }
.tk-card-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
.tk-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); }
.tk-preview-bar { display: flex; justify-content: center; align-items: center; padding: 12px 14px; min-height: 58px; background: #211a16; border-bottom: 1px solid var(--border); }
.tk-preview-meter { position: relative; width: min(424px, 100%); height: 32px; }
.tk-preview-track { position: absolute; left: 0; right: 0; top: 50%; height: 28px; transform: translateY(-50%); border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,.92) inset, 0 0 0 1px rgba(15,23,42,.10), 0 5px 16px rgba(0,0,0,.28); }
.tk-preview-segments { position: absolute; left: 18px; right: 72px; top: 50%; display: grid; grid-template-columns: repeat(8,1fr); gap: 3px; height: 12px; transform: translateY(-50%); }
.tk-preview-seg { position: relative; overflow: hidden; border-radius: 3px; transform: skewX(-7deg); background: linear-gradient(180deg,rgba(138,217,255,.22),rgba(23,103,204,.22)); box-shadow: 0 0 0 1px rgba(54,157,239,.18) inset; }
.tk-preview-seg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--tk-preview-seg-fill,0%); border-radius: inherit; background: linear-gradient(180deg,#52c8ff 0%,#2673dd 58%,#1554c5 100%); box-shadow: 0 0 9px rgba(42,163,255,.72), 0 1px 0 rgba(255,255,255,.45) inset; transition: width .6s ease; }
.tk-preview-badge { position: absolute; right: 18px; top: 50%; z-index: 2; display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px 0 5px; border-radius: 7px; transform: translateY(-50%); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0; white-space: nowrap; background: linear-gradient(180deg,#63c8ff 0%,#2c77df 64%,#1f60c9 100%); box-shadow: 0 0 12px rgba(53,159,246,.75), 0 1px 0 rgba(255,255,255,.45) inset; }
.tk-preview-check { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; border-radius: 50%; background: #fff; color: #266bd5; font-size: 10px; line-height: 1; }
.tk-preview-cap { position: absolute; right: 7px; bottom: 4px; width: 10px; height: 12px; border-radius: 3px 3px 4px 4px; background: linear-gradient(180deg,#dcffff 0%,#61ddfb 100%); box-shadow: 0 0 8px rgba(82,222,255,.75); opacity: .95; }
.tk-preview-cap::before { content: ""; position: absolute; left: 2px; right: 2px; top: -3px; height: 3px; border-radius: 2px 2px 0 0; background: #cfffff; }
.tk-preview-input { padding: 10px 12px; font-size: 12px; color: var(--muted); }
.tk-row { display: flex; gap: 10px; align-items: center; }
.tk-diag { margin-top: 8px; word-break: break-all; }