pbl_scense_ext/wwwroot/overlay/pbl_overlay.css
2026-09-21 11:53:56 +08:00

123 lines
6.2 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ============================================================================
* pbl_overlay.css —— PBL 覆盖层样式(M9)
* 约定:全部选择器以 .pbl- 前缀隔离,绝不覆盖宿主(scense/scense_game)渲染层样式;
* 覆盖层为「浮层」定位,pointer-events 精确到子元素,避免遮挡世界渲染交互。
* ==========================================================================*/
.pbl-overlay-root { position: relative; }
/* ── 页面壳:数据驱动布局,宿主渲染区由 data-pbl-host 标记 ── */
[data-pbl-page] { min-height: 100%; }
.pbl-topbar { width: 100%; }
.pbl-topbar-in {
display: flex; align-items: center; gap: 10px;
padding: 10px 16px; background: #ffffff; border-bottom: 1px solid #e6e8eb;
}
.pbl-title { font-size: 18px; font-weight: 600; color: #1f2329; }
.pbl-sub { font-size: 12px; color: #8a9099; }
.pbl-spacer { flex: 1; }
.pbl-badge {
font-size: 12px; padding: 2px 8px; border-radius: 10px;
background: #f2f3f5; color: #4e5968; white-space: nowrap;
}
.pbl-badge.is-ok { background: #e8f7ee; color: #17864a; }
.pbl-vbadge { font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.pbl-vbadge.is-ok { background: #e8f7ee; color: #17864a; }
.pbl-vbadge.is-warn { background: #fff7e6; color: #a86b00; }
.pbl-vbadge.is-block { background: #fdecec; color: #b3261e; }
/* ── 导航条(12 页面) ── */
.pbl-navrail { width: 100%; margin: 8px 0; }
.pbl-navrail-in { display: flex; flex-wrap: wrap; gap: 8px; }
.pbl-navitem {
font-size: 13px; padding: 6px 12px; border-radius: 4px;
background: #f7f8fa; color: #4e5968; text-decoration: none; border: 1px solid transparent;
}
.pbl-navitem:hover { border-color: #c9cdd4; }
.pbl-navitem.is-active { background: #1264e0; color: #fff; }
/* ── 主内容区卡片 ── */
.pbl-main { width: 100%; }
.pbl-card {
background: #ffffff; border: 1px solid #e6e8eb; border-radius: 6px;
padding: 14px 16px; margin: 10px 0;
}
.pbl-card h4 { margin: 0 0 8px; font-size: 14px; color: #1f2329; }
.pbl-goal-q { font-size: 15px; color: #1264e0; margin: 4px 0; }
.pbl-goal-m, .pbl-dim { font-size: 12px; color: #8a9099; margin: 4px 0; }
.pbl-steps ol { margin: 0; padding-left: 20px; font-size: 13px; color: #4e5968; }
.pbl-steps li.is-done { color: #17864a; text-decoration: line-through; }
.pbl-rubric table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pbl-rubric th, .pbl-rubric td { border-bottom: 1px solid #f0f1f3; padding: 6px 8px; text-align: left; }
.pbl-empty { font-size: 12px; color: #a3a8b0; padding: 10px 0; }
/* ── 产出物 / 证据网格 ── */
.pbl-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pbl-tile {
display: flex; flex-direction: column; gap: 4px; min-width: 160px;
padding: 10px; border: 1px solid #e6e8eb; border-radius: 4px; font-size: 12px;
}
.pbl-tile strong { font-size: 13px; color: #1f2329; }
.pbl-tile em { color: #8a9099; font-style: normal; }
/* ── Agent 对话面板 ── */
.pbl-chat-log { max-height: 260px; overflow-y: auto; font-size: 13px; }
.pbl-msg { padding: 6px 8px; border-radius: 4px; margin: 4px 0; background: #f7f8fa; }
.pbl-msg.is-user { background: #eaf2ff; }
.pbl-msg.is-agent.is-fallback { background: #fff7e6; }
.pbl-chat-input { display: flex; gap: 8px; margin-top: 8px; }
.pbl-chat-input input { flex: 1; padding: 6px 8px; border: 1px solid #c9cdd4; border-radius: 4px; }
/* ── 审批队列 ── */
.pbl-approvals ul { margin: 0; padding-left: 18px; font-size: 13px; }
.pbl-approvals li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.pbl-approvals em { color: #a86b00; font-style: normal; }
/* ── HUD 浮层:覆盖在世界渲染区之上,但不阻断渲染层交互 ── */
.pbl-hud { position: relative; pointer-events: none; }
.pbl-hud-in { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.pbl-hud-progress {
height: 6px; border-radius: 3px; background: #eceef1; overflow: hidden;
}
.pbl-hud-progress span { display: block; height: 100%; width: 0; background: #1264e0; transition: width .2s linear; }
.pbl-hud-role { font-size: 12px; color: #4e5968; }
.pbl-hud-acts { display: flex; flex-wrap: wrap; gap: 6px; pointer-events: auto; }
.pbl-hud-acts button {
font-size: 12px; padding: 4px 10px; border-radius: 4px; cursor: pointer;
border: 1px solid #c9cdd4; background: #fff; color: #1f2329;
}
.pbl-hud-acts button:hover { border-color: #1264e0; color: #1264e0; }
.pbl-hud-feed { font-size: 12px; color: #4e5968; max-height: 90px; overflow: hidden; }
.pbl-feedline { padding: 2px 0; border-bottom: 1px dashed #f0f1f3; }
/* ── 降级横幅(9 类错误态):只提示不阻断,可关闭 ── */
.pbl-banners {
position: sticky; top: 0; z-index: 9000; display: flex; flex-direction: column; gap: 6px;
}
.pbl-banner {
display: flex; align-items: center; gap: 10px;
padding: 8px 12px; border-radius: 4px; font-size: 13px; border: 1px solid transparent;
}
.pbl-banner .pbl-b-title { font-weight: 600; }
.pbl-banner .pbl-b-desc { color: inherit; opacity: .85; }
.pbl-banner .pbl-b-act { margin-left: auto; cursor: pointer; border: 1px solid currentColor; background: transparent; border-radius: 3px; padding: 2px 8px; font-size: 12px; }
.pbl-banner.is-warn { background: #fff7e6; color: #a86b00; border-color: #ffe0a3; }
.pbl-banner.is-error { background: #fdecec; color: #b3261e; border-color: #f7c7c4; }
.pbl-banner.is-block { background: #f1ecff; color: #4b2fa8; border-color: #ddd2fb; }
.pbl-banner.is-info { background: #eaf2ff; color: #1264e0; border-color: #cfe0fb; }
/* ── 骨架占位(LOAD_FAIL 局部重试) ── */
.pbl-skeleton { height: 60px; border-radius: 4px; background: linear-gradient(90deg, #f2f3f5 25%, #e9eaec 37%, #f2f3f5 63%); background-size: 400% 100%; animation: pbl-sk 1.2s ease infinite; }
@keyframes pbl-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
/* ── 只读态(审批挂起 / 权限不足时禁止编辑控件) ── */
[data-readonly="1"] .pbl-hud-acts button,
[data-readonly="1"] .pbl-chat-input { opacity: .5; pointer-events: none; }
/* ── 小屏适配:HUD 与导航换行,不遮挡渲染区 ── */
@media (max-width: 768px) {
.pbl-topbar-in { flex-wrap: wrap; }
.pbl-navitem { font-size: 12px; padding: 5px 9px; }
}