/* 实装补充：沿用 设计/tokens.css + base.css + 工作台.css / 控制台.css，这里只补页面级零件。 */

[hidden] { display: none !important; }

/* 可点击的行与卡片复位 */
.row-btn { border: 0; background: transparent; color: inherit; font: inherit; text-align: left; width: 100%; cursor: pointer; }
.row-btn:hover { background: var(--island-2); }
.row-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.card-btn { border: 0; text-align: left; font: inherit; color: inherit; width: 100%; }
.step .st.warn { color: var(--warn); }

/* 导航按钮复位 */
.nav .i { border: 0; background: transparent; padding: 0; }
.nav .i:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.nav .mark { font-size: 12px; letter-spacing: -0.02em; }
.nav button.avatar { border: 0; cursor: pointer; font: inherit; }
.nav button.avatar:hover { color: var(--text); }
.nav .i svg { width: 17px; height: 17px; }

/* 页头与工具条 */
.head { align-items: center; }
.head .title { margin: 0; }
.head .title-row { align-items: center; }
.head .actions { align-items: center; }
.head .meta { white-space: nowrap; }
.toolbar .seg { flex: none; }
.toolbar .s { margin-left: auto; }
.subhead { display: flex; align-items: baseline; gap: var(--s-2); margin: var(--s-5) 0 var(--s-3); font-weight: 600; }
.subhead .n { color: var(--t3); font-weight: 400; font-size: var(--fs-xs); font-family: var(--mono); }
.subhead .right { margin-left: auto; color: var(--t3); font-weight: 400; font-size: var(--fs-s); }

/* 指标条 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.kpis .tile { background: var(--island-2); }

/* 计划步骤（新建任务、任务详情侧栏共用） */
.plan-list { display: flex; flex-direction: column; }
.plan-line { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-line:last-child { border-bottom: 0; }
.plan-line .idx { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--island-2); color: var(--t3); font: 500 10px/1 var(--mono); }
.plan-line.done .idx { background: var(--ok-soft); color: var(--ok); }
.plan-line.waiting .idx { background: var(--warn-soft); color: var(--warn); }
.plan-line.failed .idx { background: var(--bad-soft); color: var(--bad); }
.plan-line.running .idx { background: var(--acc-soft); color: var(--acc); }
.plan-line .tt { font-size: var(--fs-s); line-height: 19px; font-weight: 500; }
.plan-line .ss { color: var(--t3); font-size: var(--fs-xs); line-height: 17px; }
.plan-line .cost { font-family: var(--mono); font-size: var(--fs-mono); color: var(--t3); white-space: nowrap; }
.plan-total-row { display: flex; align-items: baseline; justify-content: space-between; padding-top: var(--s-3); }
.plan-total { font-family: var(--mono); font-size: 18px; font-weight: 600; }

/* 新建任务页 */
.newtask-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s-7); align-items: start; }
.newtask-grid .section { margin-top: 0; }
.composer .bar .hint-inline { color: var(--t3); font-size: var(--fs-xs); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-3); }
.form-row label { display: flex; flex-direction: column; gap: 6px; color: var(--t2); font-size: var(--fs-xs); }
.form-row .input, .form-row .select { width: 100%; }
.checkline { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3); color: var(--t2); font-size: var(--fs-s); line-height: var(--lh-s); cursor: pointer; }
.checkline input { flex: none; margin-top: 3px; accent-color: var(--ink); }
.checkline span { min-width: 0; }
.clarify { margin-top: var(--s-4); }
.clarify .ask { margin-bottom: var(--s-2); }
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); flex-wrap: wrap; }
.plan-foot .acts { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.plan-empty { padding: var(--s-7) var(--s-5); text-align: center; color: var(--t3); }

/* 任务板 */
.task-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.lane { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-4); min-height: 300px; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.lane-h { display: flex; align-items: center; gap: var(--s-2); font-weight: 600; min-width: 0; }
.lane-h .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-h .s { font-weight: 400; color: var(--t3); }
.lane-sub { color: var(--t3); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.lane .progress { margin: var(--s-1) 0; }
.lane .step { margin: 2px 0; }
.lane .step .sum { color: var(--t3); }
.lane-foot { margin-top: auto; color: var(--t3); font-size: var(--fs-xs); font-family: var(--mono); display: flex; align-items: center; gap: var(--s-2); }
.lane .empty-mini { color: var(--t3); font-size: var(--fs-xs); padding: var(--s-3) 0; }
.blackboard { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-4); border-radius: var(--r-panel); background: var(--island-2); margin-top: var(--s-4); }
.blackboard .facts { display: flex; gap: var(--s-4); flex-wrap: wrap; color: var(--t2); font-size: var(--fs-s); }
.blackboard .facts .ok-t { color: var(--ok); }
.blackboard .acts { margin-left: auto; display: flex; gap: var(--s-2); flex-wrap: wrap; }
.task-composer { margin-top: var(--s-4); }
.section.process-sec { margin-top: var(--s-4); }
.process-list .row { padding: 7px 12px; }
.process-list .row .tt { font-size: var(--fs-body); line-height: 20px; font-weight: 500; }
.process-list .row .ss { font-size: var(--fs-xs); line-height: 18px; }
.process-list .row .rr { font-size: var(--fs-xs); }

/* 任务房间 */
.room-stream { display: flex; flex-direction: column; gap: var(--s-3); max-height: calc(100vh - 320px); overflow: auto; padding-right: var(--s-2); }
.room-item { display: flex; gap: var(--s-2); max-width: 88%; }
.room-item.agent { align-self: flex-start; }
.room-item.user { align-self: flex-end; flex-direction: row-reverse; }
.room-item .avatar { width: 24px; height: 24px; font-size: 10px; }
.room-item .name { color: var(--t3); font-size: var(--fs-xs); margin-bottom: 2px; }
.room-item .reply { padding-top: 2px; }
.room-item .msg { margin-bottom: 0; }
.room-item.user .msg { background: var(--acc-soft); }
.room-item.user .name { text-align: right; }

/* 空状态 */
.empty-soft { padding: var(--s-7) var(--s-4); text-align: center; color: var(--t3); font-size: var(--fs-s); }
.empty-soft .h { color: var(--text); margin-bottom: var(--s-2); }
.empty-soft p { max-width: 420px; margin: 0 auto var(--s-4); color: var(--t2); }

/* 技能工坊 */
.package-bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-panel); background: var(--island-2); margin-bottom: var(--s-4); flex-wrap: wrap; }
.package-bar .h { font-size: var(--fs-h); line-height: var(--lh-h); font-weight: 600; }
.package-bar .acts { margin-left: auto; display: flex; gap: var(--s-2); flex-wrap: wrap; }
.pkg-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--ink-fg); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.skill-card { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.skill-card .top { display: flex; align-items: flex-start; gap: var(--s-3); }
.skill-card .tt { font-weight: 600; min-width: 0; }
.skill-card .ss { color: var(--t2); font-size: var(--fs-s); line-height: var(--lh-s); flex: 1; }
.skill-card .meta { display: flex; gap: var(--s-3); color: var(--t3); font-size: var(--fs-xs); font-family: var(--mono); flex-wrap: wrap; }
.skill-card .foot { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }
.skill-card .foot .price { margin-left: auto; color: var(--t3); font-size: var(--fs-xs); font-family: var(--mono); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* 资产库 */
.asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.asset { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-2); cursor: pointer; min-width: 0; transition: box-shadow var(--dur) var(--ease); border: 0; text-align: left; font: inherit; color: inherit; width: 100%; }
.asset:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.asset.sel { outline: 1.5px solid var(--acc); outline-offset: -1.5px; }
.asset .thumb { aspect-ratio: 16 / 9; background: var(--island-3); border-radius: var(--r-xs); display: grid; place-items: center; color: var(--t3); font-size: var(--fs-xs); text-align: center; padding: 0 8px; position: relative; overflow: hidden; }
.asset .thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 0 45%, rgba(255,255,255,0.035) 45% 55%, transparent 55% 100%), linear-gradient(45deg, transparent 0 60%, rgba(255,255,255,0.025) 60% 70%, transparent 70% 100%); }
.asset .thumb .kind { position: relative; z-index: 1; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--t3); }
.asset .thumb .ai-mark { position: absolute; right: 6px; bottom: 6px; z-index: 2; font-size: 9px; line-height: 1; padding: 4px 5px; border-radius: 5px; color: var(--t2); background: rgba(0,0,0,0.55); border: 1px solid var(--line); letter-spacing: 0.04em; }
.asset .thumb.video { color: var(--acc); }
.asset .thumb.image { color: var(--ok); }
.asset .thumb.audio { color: var(--warn); }
.asset .tt { margin-top: var(--s-2); font-size: var(--fs-s); line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .ss { color: var(--t3); font-family: var(--mono); font-size: var(--fs-mono); margin-top: 2px; }
.asset-preview { aspect-ratio: 16 / 9; background: var(--island-3); border-radius: var(--r-panel); display: grid; place-items: center; color: var(--t3); font-size: var(--fs-xs); margin-bottom: var(--s-4); position: relative; overflow: hidden; }
.asset-preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 0 45%, rgba(255,255,255,0.035) 45% 55%, transparent 55% 100%), linear-gradient(45deg, transparent 0 60%, rgba(255,255,255,0.025) 60% 70%, transparent 70% 100%); }
.asset-preview span { position: relative; z-index: 1; }
.asset-preview.has-media::before { display: none; }
.asset-preview img, .asset-preview video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.asset-preview video { position: relative; z-index: 1; }
.asset-preview audio { position: relative; z-index: 1; width: calc(100% - 32px); }
.asset-delete-row { display: flex; gap: var(--s-2); margin-top: var(--s-3); flex-wrap: wrap; }
.asset-delete-row .pill { margin-left: auto; }
.kv { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s-2) var(--s-3); font-size: var(--fs-s); }
.kv dt { color: var(--t3); } .kv dd { margin: 0; color: var(--t2); overflow-wrap: anywhere; }
.versions { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.version-row { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-s); padding: 7px 0; border-bottom: 1px solid var(--line); }
.version-row:last-child { border-bottom: 0; }
.version-row .v { font-family: var(--mono); color: var(--text); }
.version-row .t { color: var(--t3); font-size: var(--fs-xs); margin-left: auto; }

/* 知识库 */
.kb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.kb-list { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 230px); overflow: auto; padding-right: 2px; }
.kb-row { border: 0; background: transparent; color: inherit; font: inherit; text-align: left; padding: 10px 12px; border-radius: var(--r-ctl); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kb-row:hover { background: var(--island-2); }
.kb-row.sel { background: var(--island-2); box-shadow: inset 2px 0 0 var(--acc); }
.kb-row .tt { font-weight: 500; font-size: var(--fs-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-row .ss { color: var(--t3); font-size: var(--fs-xs); }
.kb-row .meta { display: flex; gap: 6px; align-items: center; color: var(--t3); font-size: 10px; min-width: 0; }
.kb-row .meta > span:last-child { margin-left: auto; font-family: var(--mono); white-space: nowrap; }
.kb-main { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-5); min-height: 420px; min-width: 0; }
.kb-detail-head { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; flex-wrap: wrap; }
.kb-detail-head .h { font-size: var(--fs-h); line-height: var(--lh-h); font-weight: 600; }
.kb-detail-head .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-content { color: var(--t2); font-size: var(--fs-body); line-height: 1.75; max-width: 760px; overflow-wrap: anywhere; }
.kb-content h1 { font-size: 22px; line-height: 1.35; color: var(--text); margin: 0 0 var(--s-3); }
.kb-content h2 { font-size: 17px; line-height: 1.4; color: var(--text); margin: var(--s-5) 0 var(--s-2); }
.kb-content h3 { font-size: 14px; color: var(--text); margin: var(--s-4) 0 var(--s-2); }
.kb-content p { margin: 0 0 var(--s-3); }
.kb-content ul, .kb-content ol { margin: 0 0 var(--s-3); padding-left: 22px; }
.kb-content li { margin: 3px 0; }
.kb-content blockquote { margin: 0 0 var(--s-3); padding: 6px 14px; border-left: 2px solid var(--acc); background: var(--island-3); border-radius: 0 var(--r-xs) var(--r-xs) 0; color: var(--t2); }
.kb-content code { font-family: var(--mono); font-size: 12px; background: var(--island-3); padding: 1px 5px; border-radius: 4px; }
.kb-content pre { background: var(--island-3); padding: var(--s-3); border-radius: var(--r-xs); overflow: auto; }
.kb-content pre code { background: transparent; padding: 0; }
.kb-editor-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.kb-editor-head .hint { margin-left: auto; }
.kb-editor .input, .kb-editor .textarea { width: 100%; }
.kb-askbar { display: flex; gap: var(--s-2); margin-bottom: var(--s-3); }
.kb-askbar .input { flex: 1; min-width: 0; }
.kb-sem { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); }
.kb-sem-head { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.kb-sem-head .hint { margin-left: auto; }
.kb-hit { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: inherit; font: inherit; padding: 9px 10px; border-radius: var(--r-ctl); cursor: pointer; border-bottom: 1px solid var(--line); }
.kb-hit:last-child { border-bottom: 0; }
.kb-hit:hover { background: var(--island-3); }
.kb-hit-top { display: flex; gap: var(--s-2); align-items: center; }
.kb-hit-top .tt { font-weight: 500; font-size: var(--fs-s); }
.kb-hit .score, .kb-mini-hit .score { margin-left: auto; font-family: var(--mono); color: var(--t3); font-size: 10px; }
.kb-hit .ss { color: var(--t3); font-size: var(--fs-xs); margin-top: 2px; overflow-wrap: anywhere; }
.kb-hit p { color: var(--t2); font-size: var(--fs-s); line-height: 1.6; margin: 5px 0 0; }
.kb-dir { color: var(--t3); font-size: var(--fs-xs); font-family: var(--mono); overflow-wrap: anywhere; line-height: 1.5; margin-bottom: 6px; }
.kb-cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kb-cfg-field { display: flex; flex-direction: column; gap: 3px; color: var(--t3); font-size: 10px; }
.kb-cfg-field .input { width: 100%; height: 28px; font-size: var(--fs-xs); }
.kb-hit-input, .memory-search { display: flex; gap: 6px; }
.kb-hit-input .input, .memory-search .input { flex: 1; min-width: 0; height: 30px; font-size: var(--fs-xs); }
.kb-hit-test { margin-top: 8px; }
.kb-mini-hit { padding: 7px 0; border-bottom: 1px solid var(--line); }
.kb-mini-hit .tt { font-size: var(--fs-xs); font-weight: 500; }
.kb-mini-hit .ss { color: var(--t3); font-size: 10px; }
.kb-mini-hit p { color: var(--t2); font-size: 10px; line-height: 1.45; margin: 3px 0 0; }
.kb-cite-dialog { width: min(820px, calc(100vw - 32px)); }
.kb-cite-body { margin-top: var(--s-3); max-height: 62vh; overflow: auto; padding-right: 4px; }
.memory-form { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); margin-bottom: var(--s-3); }
.memory-form .input, .memory-form .select, .memory-form .textarea { width: 100%; }
.memory-results { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); margin-top: var(--s-2); }
.memory-result { padding: 7px 0; border-bottom: 1px solid var(--line); }
.memory-result:last-child { border-bottom: 0; }
.memory-result .tt { font-size: var(--fs-s); }
.memory-result .ss { color: var(--t3); font-size: var(--fs-xs); }
.memory-context { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); margin-top: var(--s-2); }
.memory-context pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 10px; color: var(--t2); max-height: 220px; overflow: auto; }
.switch-row { display: flex; flex-wrap: wrap; gap: 14px; }
.switch-row label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--t2); }
.global-search-dialog { width: min(720px, calc(100vw - 32px)); }
.global-search-row { display: flex; gap: 8px; margin: var(--s-3) 0; }
.global-search-row .input { flex: 1; min-width: 0; }
.global-results { max-height: 52vh; overflow: auto; }
.skill-rate { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); margin-bottom: var(--s-3); }
.skill-rate-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.skill-rate-row .wf-check { margin: 0; }
.skill-rate .input { width: 100%; margin-bottom: 8px; }

/* 工作流画布 */
.wf-name-row { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); flex-wrap: wrap; }
.wf-name-row .input { width: 260px; }
.wf-budget { display: inline-flex; align-items: center; gap: 6px; color: var(--t3); font-size: var(--fs-xs); }
.wf-budget .input { width: 90px; }
.wf-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.wf-toolbar .select { width: 130px; }
.wf-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.wf-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-s); color: var(--t2); margin: 8px 0; }
.wf-canvas-wrap { position: relative; }
.wf-board { position: relative; width: 100%; min-width: 860px; height: 560px; background: var(--island-2); border-radius: var(--r-panel); overflow: auto; background-image: radial-gradient(circle, var(--line) 1px, transparent 1px); background-size: 20px 20px; cursor: default; }
.wf-world { position: relative; }
.wf-edges { position: absolute; left: 0; top: 0; pointer-events: none; }
.wf-edges path { fill: none; stroke: var(--t3); stroke-width: 1.4; opacity: 0.8; }
.wf-node { position: absolute; width: 150px; height: 78px; background: var(--island-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; cursor: grab; user-select: none; display: flex; flex-direction: column; gap: 3px; touch-action: none; }
.wf-node:hover { border-color: var(--t3); }
.wf-node.sel { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.wf-node.done, .wf-node.st-done { border-color: var(--ok); }
.wf-node.st-failed { border-color: var(--bad); }
.wf-node.st-running { border-color: var(--acc); }
.wf-node.st-waiting_approval, .wf-node.st-breakpoint { border-color: var(--warn); border-style: dashed; }
.wf-node.st-skipped { opacity: 0.55; }
.wf-node.dragging { cursor: grabbing; z-index: 5; opacity: 0.92; }
.wf-node-stat { color: var(--t3); font-size: 9px; font-family: var(--mono); }
.wf-note-dot { color: var(--warn); margin-left: auto; }
.wf-zoom { position: absolute; right: 12px; top: 10px; z-index: 4; display: flex; align-items: center; gap: 6px; background: var(--island-3); border-radius: var(--r-ctl); padding: 4px 6px; box-shadow: var(--shadow); }
.wf-zoom .mono { min-width: 38px; text-align: center; font-size: 10px; color: var(--t2); }
.wf-minimap { position: absolute; right: 12px; bottom: 12px; z-index: 4; width: 150px; height: 92px; background: color-mix(in srgb, var(--island-3) 86%, transparent); border: 1px solid var(--line-2); border-radius: 8px; pointer-events: none; }
.wf-mini-dot { position: absolute; width: 14px; height: 7px; border-radius: 2px; background: var(--t3); opacity: 0.85; }
.wf-mini-dot.type-approval { background: var(--warn); } .wf-mini-dot.type-output, .wf-mini-dot.type-end { background: var(--ok); } .wf-mini-dot.type-condition { background: var(--acc); }
.wf-run-record { background: var(--island-3); border-radius: var(--r-xs); padding: 8px; margin: 8px 0; }
.wf-run-record pre { margin: 2px 0 8px; max-height: 110px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 9px; color: var(--t2); }
.wf-log-line.lv-error span:last-child { color: var(--bad); }
.wf-log-line.lv-warn span:last-child { color: var(--warn); }
.wf-log-line.lv-muted { opacity: 0.6; }
.wf-template-dialog { width: min(920px, calc(100vw - 32px)); }
.wf-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-3) 0; }
.wf-template-card { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); display: flex; flex-direction: column; gap: 6px; }
.wf-template-card .h { font-weight: 600; }
.wf-template-card .ss { color: var(--t3); font-size: var(--fs-xs); }
.wf-template-card .pill { margin-top: auto; align-self: flex-start; }
@media (max-width: 1000px) { .wf-template-grid { grid-template-columns: 1fr; } }
.wf-node-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wf-node-name { font-size: var(--fs-s); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-node-meta, .wf-node-config { color: var(--t3); font-size: 10px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-port { position: absolute; right: -9px; top: 26px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--ink-fg); border: 0; display: grid; place-items: center; cursor: pointer; opacity: 0.6; padding: 0; }
.wf-port:hover, .wf-port:focus-visible { opacity: 1; outline: 2px solid var(--acc); outline-offset: 1px; }
.wf-inspector { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); }
.wf-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--s-2); color: var(--t3); font-size: var(--fs-xs); }
.wf-field .input, .wf-field .select, .wf-field .textarea { width: 100%; }
.wf-run-log { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-3); max-height: 240px; overflow: auto; }
.wf-log-line { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-2); font-size: var(--fs-xs); line-height: 17px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.wf-log-line:last-child { border-bottom: 0; }
.wf-log-line .mono { color: var(--t3); }

/* 总览 */ display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; gap: var(--s-5); align-items: start; }
.overview-grid .section { margin-top: 0; }
.agent-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center; padding: 9px 12px; margin: 0 -12px; border-radius: var(--r-ctl); }
.agent-row + .agent-row::before { content: ""; position: absolute; }
.agent-row .nm { font-weight: 500; }
.agent-row .ss { color: var(--t3); font-size: var(--fs-xs); }
.agent-row .rr { color: var(--t3); font-family: var(--mono); font-size: var(--fs-mono); text-align: right; white-space: nowrap; }
.agent-row .acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.agent-row .acts .pill { height: 24px; padding: 0 8px; font-size: var(--fs-xs); }
.group .g { display: flex; align-items: center; gap: var(--s-2); }
.group .g .mini-act { margin-left: auto; }
.group.off .g, .group.off .c { opacity: 0.55; }
.role-admin { margin-top: var(--s-5); }
.role-admin .role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.role-admin .role-card .foot { margin-top: auto; }
.role-admin .role-card .foot .pill { margin-left: auto; }
@media (max-width: 1280px) { .role-admin .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 安全中心 */
.secure-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s-5); align-items: start; }
.secure-grid > section { min-width: 0; }
.secure-grid .table-wrap { max-width: 100%; }
.secure-grid .section { margin-top: 0; }
.secure-grid .table th, .secure-grid .table td { white-space: nowrap; }
.danger-zone { background: var(--bad-soft); border-radius: var(--r-panel); padding: var(--s-4); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.danger-zone .acts { margin-left: auto; display: flex; gap: var(--s-2); }

/* 设置 */
.settings-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav button { height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--t2); text-align: left; cursor: pointer; font: inherit; }
.settings-nav button:hover { background: var(--island-2); color: var(--text); }
.settings-nav button.on { background: var(--island-2); color: var(--text); }
.settings-section { margin-bottom: var(--s-6); }
.settings-section .field { grid-template-columns: 140px minmax(180px, 300px) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.settings-section .field:last-child { border-bottom: 0; }
.settings-section .field .input, .settings-section .field .select { width: 100%; }
.settings-section .field .hint { grid-column: 3; }
.settings-actions { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; }

/* 表格里的动作列 */
.tbl-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.table td .badge { vertical-align: middle; }
.table .mono { white-space: nowrap; }
.table .sub { color: var(--t3); font-size: var(--fs-xs); }
.table-wrap { overflow-x: auto; }

/* 控制台补充 */
.console-content .head { margin-bottom: var(--s-5); }
.console-content .section.tight { margin-top: var(--s-5); }
.console-content .section-h .right { white-space: nowrap; }
.console-content .tile .v { font-size: 20px; }
.order-type { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.order-type .dot { width: 6px; height: 6px; }
.login-error { color: var(--bad); font-size: var(--fs-s); min-height: 20px; margin-bottom: var(--s-3); }
.login-card .title { margin-bottom: 6px; }
.login-card .lede { color: var(--t2); margin-bottom: var(--s-5); }
.login-card .pill.lg { width: 100%; }
.login-note { color: var(--t3); font-size: var(--fs-xs); line-height: var(--lh-xs); margin-top: var(--s-3); }
.login-foot { position: fixed; left: 0; right: 0; bottom: 24px; text-align: center; color: var(--t3); font-size: var(--fs-xs); }
.console-aux .badges { gap: 6px; }
.console-aux .status-line { font-size: var(--fs-s); }
.console-content .filter-row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }
.console-content .filter-row .search { margin-left: auto; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.role-card { background: var(--island-2); border-radius: var(--r-panel); padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.role-card .top { display: flex; align-items: center; gap: var(--s-2); }
.role-card .desc { color: var(--t2); font-size: var(--fs-s); line-height: var(--lh-s); }
.role-card .meta { color: var(--t3); font-size: var(--fs-xs); font-family: var(--mono); display: flex; gap: var(--s-3); flex-wrap: wrap; }
.role-card .foot { margin-top: var(--s-2); display: flex; gap: var(--s-2); align-items: center; }

/* 弹窗表单 */
.modal-form .field { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3); }
.modal-form .field .input, .modal-form .field .select { width: 100%; }
.modal-form .field .hint { grid-column: 2; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-5); }

/* 小的演示标记 */
.demo-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--t3); font-size: 11px; }
.demo-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }

/* 让路 */
@media (max-width: 1280px) {
  .newtask-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-grid { grid-template-columns: 1fr; }
  .kb-layout { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .skill-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .secure-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
  .task-board { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .kb-layout { grid-template-columns: 1fr; }
  .kb-list { flex-direction: row; overflow-x: auto; max-height: none; }
  .kb-row { min-width: 200px; }
}
@media (max-width: 720px) {
  .asset-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .head .actions .pill { flex: 0; }
}
/* 登录（桌面和移动共用） */
.aw-login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.aw-login-card { width: min(420px, 100%); background: var(--island-2); border-radius: var(--r-panel); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 80px rgba(0,0,0,0.35); }
.aw-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.aw-login-brand .mark { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--ink-fg); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.aw-login-brand .name { font-weight: 600; }
.aw-login-brand .sub { color: var(--t3); font-size: var(--fs-xs); }
.aw-login-card h1 { font-size: 22px; line-height: 1.3; margin: 0; }
.aw-login-card .lede { color: var(--t2); font-size: var(--fs-s); margin: -6px 0 4px; }
.aw-field { display: flex; flex-direction: column; gap: 6px; color: var(--t2); font-size: var(--fs-xs); }
.aw-field .input { width: 100%; }
.aw-login-error { color: var(--bad); font-size: var(--fs-s); min-height: 20px; }
.aw-login-note { color: var(--t3); font-size: var(--fs-xs); line-height: 1.6; }
.aw-login-card .pill.lg { width: 100%; height: 42px; }
