:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #8b95a1;
  --line: #ebeef3;
  --blue: #1677ff;
  --green: #52c41a;
  --orange: #faad14;
  --red: #ff4d4f;
  --purple: #9254de;
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, .actions a { border: 1px solid #d9dfe8; background: #fff; color: #4b5563; padding: 7px 12px; border-radius: 6px; cursor: pointer; }
button:hover, .actions a:hover { color: var(--blue); border-color: var(--blue); }
button:disabled { cursor: not-allowed; color: #aeb6c2; background: #f5f7fa; border-color: #e5e7eb; }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
#app { display: grid; grid-template-columns: 148px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; height: 100vh; padding: 14px 10px; overflow: auto; border-right: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.brand .logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; background: #3975ff; font-weight: 700; }
.brand b { display: block; font-size: 14px; line-height: 18px; }
.brand small { display: block; color: var(--muted); font-size: 10px; transform: scale(0.9); transform-origin: left center; }
nav { display: grid; gap: 3px; }
.sidebar nav { flex: 0 0 auto; }
.sidebar-runtime { margin-top: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.sidebar-runtime-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sidebar-runtime-head b { font-size: 12px; }
.sidebar-runtime-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sidebar-runtime-grid div { min-width: 0; padding: 6px; border-radius: 5px; background: #fff; }
.sidebar-runtime-grid span, .sidebar-runtime-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-runtime-grid span { color: var(--muted); font-size: 9px; }
.sidebar-runtime-grid strong { margin-top: 3px; color: #344054; font-size: 10px; font-weight: 600; }
.sidebar-runtime > small { display: block; margin-top: 8px; overflow: hidden; color: var(--muted); font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #aeb6c2; box-shadow: 0 0 0 3px #eef0f3; }
.sidebar-runtime.success .status-dot { background: var(--green); box-shadow: 0 0 0 3px #e8f7df; }
.sidebar-runtime.warning .status-dot { background: var(--orange); box-shadow: 0 0 0 3px #fff2cf; }
.sidebar-runtime.danger .status-dot { background: var(--red); box-shadow: 0 0 0 3px #ffe5e5; }
nav h3 { margin: 12px 8px 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.nav-link { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 6px; color: #3f4a58; font-size: 13px; }
.nav-link span { width: 15px; color: #6b7280; text-align: center; }
.nav-link.active, .nav-link:hover { background: #eaf3ff; color: var(--blue); }
.nav-link.active span, .nav-link:hover span { color: var(--blue); }
.shell { display: grid; grid-template-rows: 56px minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar b { font-size: 13px; }
.topbar div { display: flex; align-items: center; gap: 12px; color: #8b95a1; font-size: 12px; white-space: nowrap; }
.topbar label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar button { height: 26px; padding: 0 10px; font-size: 12px; }
.topbar .field.compact { width: 260px; height: 38px; }
.content { min-height: 0; padding: 28px 22px; overflow: auto; }
.page-title, .page-head { margin-bottom: 18px; }
.page-title-with-action { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-title h1, .page-head h1 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: 0; }
.page-title p, .page-head p, small { margin: 0; color: var(--muted); }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 14px; margin-bottom: 14px; }
.summary-card, .panel, .metric, .module-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.summary-card { height: 72px; padding: 16px 18px; }
.summary-card span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.summary-card strong { font-size: 20px; font-weight: 500; }
.blue { color: var(--blue); } .green { color: var(--green); } .orange { color: var(--orange); } .red { color: var(--red); } .purple { color: var(--purple); }
.status-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.overview-metrics { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.overview-primary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.overview-primary > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.overview-primary span, .overview-secondary span { display: block; color: var(--muted); font-size: 12px; }
.overview-primary strong { display: block; margin-top: 8px; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.overview-secondary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); }
.overview-secondary b { display: block; margin-top: 5px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trend-panel { min-width: 0; padding: 16px 20px; }
.trend-list { display: grid; gap: 4px; }
.trend-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 46px; align-items: center; gap: 12px; min-height: 39px; font-size: 12px; }
.trend-row span { color: var(--muted); }
.trend-row b { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.trend-row svg { display: block; width: 100%; height: 34px; overflow: visible; }
.trend-baseline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.trend-stroke { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@media (max-width: 920px) { .dashboard-overview { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .dashboard-overview .overview-metrics { padding: 18px; } .overview-primary strong { font-size: 29px; } .overview-primary > div + div { padding-left: 12px; } }
.panel { padding: 16px; }
.panel h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.badge-line { display: flex; gap: 8px; flex-wrap: wrap; }
.badge, .pill, .tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; }
.badge.success, .pill.green, .tag { color: #389e0d; background: #f6ffed; border: 1px solid #d9f7be; }
.badge.default { color: #606b79; background: #f5f5f5; border: 1px solid #e5e7eb; }
.badge.warning { color: #d48806; background: #fff7e6; border: 1px solid #ffe7ba; }
.badge.danger { color: #cf1322; background: #fff1f0; border: 1px solid #ffa39e; }
.badge.purple, .pill.purple { color: #722ed1; background: #f9f0ff; border: 1px solid #efdbff; }
.pill.red { color: #cf1322; background: #fff1f0; border: 1px solid #ffa39e; }
.pill.orange { color: #d48806; background: #fff7e6; border: 1px solid #ffe7ba; }
.pill.blue { color: var(--blue); background: #e6f4ff; border: 1px solid #bae0ff; }
.pill.default { color: #606b79; background: #f5f5f5; border: 1px solid #e5e7eb; }
.badge.blue { color: var(--blue); background: #e6f4ff; border: 1px solid #bae0ff; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-head { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: #6b7280; background: #fafafa; font-weight: 500; }
td { color: #4b5563; }
.robot { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eef4ff; color: var(--blue); font-weight: 700; }
.robot b { display: block; color: var(--text); }
.robot small { display: block; font-size: 12px; }
.card-grid, .module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.metric, .module-card { padding: 16px; }
.metric span { color: var(--muted); }
.metric strong { display: block; margin-top: 10px; font-size: 24px; font-weight: 500; }
.module-card b { display: block; margin-bottom: 8px; }
.status-card .panel-head { padding: 0; border: 0; }
.kv-list { display: grid; gap: 10px; }
.kv-list div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv-list span { color: var(--muted); }
.kv-list b { overflow-wrap: anywhere; font-weight: 500; }
.stack { display: grid; gap: 14px; }
.table { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.row b, .row small { display: block; }
.group-row { grid-template-columns: minmax(280px, 1fr) auto auto; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 600; }
.link-button:hover { text-decoration: underline; border-color: transparent; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.field { width: 100%; border: 1px solid #d9dfe8; border-radius: 6px; color: var(--text); background: #fff; padding: 9px 10px; outline: none; }
.field:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12); }
.field.compact { max-width: 260px; }
.select-wrap { min-width: 260px; }
.group-picker { align-items: center; }
.group-scope { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.group-scope b { margin: 0; }
.group-scope span { color: var(--blue); }
.plugin-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.plugin-section-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.plugin-section-tabs button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.plugin-workspace { display: grid; grid-template-columns: 280px minmax(420px, 1fr); height: calc(100vh - 142px); min-height: 620px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.plugin-workspace-list, .plugin-workspace-detail { min-height: 0; overflow: auto; }
.plugin-workspace-list { padding: 14px; border-right: 1px solid var(--line); }
.plugin-list-item { width: 100%; border: 0; text-align: left; background: transparent; }
.plugin-list-item.active { color: var(--blue); background: #eaf3ff; }
.plugin-workspace-list { display: grid; align-content: start; gap: 6px; }
.plugin-workspace-list h3 { margin: 10px 8px 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.plugin-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; }
.plugin-list-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-workspace-detail { padding: 20px; }
.plugin-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.plugin-detail-head h2 { margin: 0 0 5px; }
.plugin-detail-body { display: grid; gap: 12px; margin-top: 16px; }
.plugin-detail-section { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; }
.plugin-detail-section h3 { margin: 0; font-size: 15px; }
.plugin-runtime-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.plugin-runtime-grid div { min-width: 0; padding: 10px 12px; border-radius: 7px; background: #fafbfc; }
.plugin-runtime-grid span, .plugin-runtime-grid b { display: block; overflow-wrap: anywhere; }
.plugin-runtime-grid span { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.plugin-runtime-grid b { color: #344054; font-weight: 500; }
.plugin-state-details { border-color: #ffe7ba; background: #fffdf7; }
.plugin-issue-list { display: grid; gap: 8px; }
.plugin-issue-list div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 9px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.72); }
.plugin-issue-list b { color: #8a5a00; font-weight: 500; }
.plugin-issue-list span { color: #5f4b23; overflow-wrap: anywhere; white-space: pre-wrap; }
.runtime-config-editor { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px; }
.runtime-config-editor label { display: grid; gap: 6px; color: #526071; }
.config-object, .config-list { grid-column: 1 / -1; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.config-object legend { padding: 0 5px; color: #526071; }
.config-list-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.command-detail-list { display: grid; gap: 8px; }
.command-detail-list article { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; }
.command-detail-list b, .command-detail-list small { display: block; }
.command-detail-list span { color: var(--muted); font-size: 12px; }
.group-access-list { display: grid; gap: 8px; }
.group-access-list .plugin-setting-row { grid-template-columns: minmax(220px, 1fr) 150px auto; }
.plugin-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-bottom: 14px; }
.plugin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.plugin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.plugin-card-head b, .plugin-setting-row b, .setting-form b { display: block; }
.plugin-card-head small, .plugin-setting-row small, .setting-form small { display: block; margin-top: 4px; }
.plugin-meta { display: flex; gap: 10px; padding: 10px 16px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; }
.plugin-setting-list { display: grid; gap: 0; }
.plugin-setting-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.plugin-setting-row:last-child { border-bottom: 0; }
.plugin-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 16px; }
.command-line { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 14px; }
.modal-mask { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, 0.36); }
.modal-mask[hidden] { display: none; }
.modal-card { width: min(980px, 100%); max-height: 86vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18); }
.modal-card .panel-head { position: sticky; top: 0; z-index: 1; padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); background: #fff; }
.modal-body { display: grid; gap: 12px; padding: 16px; }
.event-log-row { cursor: pointer; }
.event-log-row:hover, .event-log-row:focus-visible { background: #f3f8ff; outline: 2px solid var(--blue); outline-offset: -2px; }
.event-log-modal { width: min(760px, 100%); }
.event-log-json { margin: 0; padding: 14px; overflow: auto; max-height: calc(86vh - 110px); border-radius: 6px; background: #f7f9fc; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.modal-body table { table-layout: fixed; }
.keyword-modal { width: min(720px, 100%); }
.keyword-modal .modal-head { padding: 20px 24px; background: linear-gradient(135deg, #f7fbff, #fff); }
.keyword-modal .modal-head h2 { margin: 4px 0 0; font-size: 20px; }
.keyword-modal .modal-body { padding: 24px; }
.keyword-modal-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.keyword-modal-intro p { margin: 0; color: var(--muted); }
.keyword-rule-list { display: grid; gap: 10px; }
.keyword-rule-item { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.keyword-rule-item b { color: #1f2937; }
.keyword-rule-item span { color: #526071; white-space: pre-wrap; overflow-wrap: anywhere; }
.keyword-empty { display: grid; gap: 6px; padding: 36px 20px; border: 1px dashed #cbd5e1; border-radius: 9px; color: var(--muted); text-align: center; }
.keyword-empty b { color: #344054; }
.keyword-status-pill { min-width: 110px; justify-content: center; }
.compact-table th, .compact-table td { padding: 10px 12px; }
.wrap-cell { overflow-wrap: anywhere; word-break: break-all; }
.setting-form { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.access-global { display: grid; gap: 12px; margin-bottom: 14px; }
.access-global-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 14px; }
.access-global label { display: grid; gap: 7px; color: #606b79; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-top: 14px; }
.access-card label { display: grid; gap: 7px; color: #606b79; }
.form-panel { display: grid; gap: 14px; max-width: 900px; }
.form-panel label { display: grid; gap: 7px; color: #606b79; }
.menu-item-card .panel-head h2 { font-size: 14px; }
.menu-item-card .actions { display: flex; gap: 6px; }
.menu-sub-card { padding: 12px; background: #fafbfc; }
.menu-sub-card .panel-head { margin-bottom: 10px; }
.menu-sub-card .panel-head h3 { margin: 0; font-size: 13px; }
.menu-subs { display: grid; gap: 10px; margin-bottom: 10px; }
.empty-line { margin: 0; color: var(--muted); font-size: 13px; }
.tab-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-bar button { border-radius: 6px; }
.tab-bar button.active { color: #ffffff; background: var(--blue, #2563eb); border-color: var(--blue, #2563eb); }
#robot-workspace-tabs a { display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid #d9dfe8; border-radius: 6px; background: #fff; color: #4b5563; }
#robot-workspace-tabs a:hover, #robot-workspace-tabs a:focus-visible { color: var(--blue); border-color: var(--blue); }
#robot-workspace-tabs a.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.manage-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.inline-form label { display: grid; gap: 7px; color: #606b79; }
.inline-form .full { grid-column: 1 / -1; }
.robot-picker-panel { display: flex; align-items: end; margin-bottom: 14px; }
.robot-picker-panel label { display: grid; gap: 7px; color: #606b79; }
.runtime-summary { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.runtime-summary div { min-width: 0; padding: 10px 12px; border-radius: 7px; background: #fafbfc; }
.runtime-summary span, .runtime-summary b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runtime-summary span { margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.robot-admin-grid { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.8fr); gap: 14px; align-items: start; }
.intent-group { display: grid; gap: 8px; }
.intent-group small { color: var(--muted); }
.intent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; }
.intent-grid label.switch { font-size: 13px; gap: 6px; }
.qr-panel { display: grid; gap: 14px; }
.qr-stage { display: grid; place-items: center; min-height: 260px; padding: 16px; border: 1px dashed #cfd7e4; border-radius: 8px; background: #fafbfc; }
.qr-stage img { display: block; width: min(240px, 100%); height: auto; border-radius: 6px; }
.qr-placeholder { color: var(--muted); text-align: center; }
.qr-placeholder[hidden], .qr-stage img[hidden] { display: none; }
.permission-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.permission-summary article { display: grid; gap: 5px; }
.permission-summary b { font-size: 24px; color: #2563eb; }
.permission-summary small, .permission-summary span, .permission-editor small, .table-panel .panel-head small { color: var(--muted); }
.permission-editor { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.permission-editor > div:first-child, .permission-editor .notice { grid-column: 1 / -1; }
.permission-editor label { display: grid; gap: 7px; color: #606b79; }
.permission-warning { display: block; margin-top: 5px; color: #d97706; }
.config-hero { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.config-hero div { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid #d9e8ff; border-radius: 10px; background: linear-gradient(135deg, #f8fbff, #eef6ff); }
.config-hero b { color: #123a6f; }
.config-hero span { color: #607086; font-size: 13px; line-height: 1.7; }
.config-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 14px; }
.config-nav { position: sticky; top: 0; display: grid; gap: 6px; padding: 10px; }
.config-nav button { border: 0; padding: 10px 12px; border-radius: 8px; color: #4b5563; background: transparent; text-align: left; cursor: pointer; transition: 0.16s ease; }
.config-nav button:hover { color: var(--blue); background: #eaf3ff; transform: translateX(2px); }
.config-stack { display: grid; gap: 16px; }
.config-stack:has(.compact-half) { grid-template-columns: repeat(2, minmax(360px, 1fr)); align-items: start; }
.config-stack > :not(.compact-half) { grid-column: 1 / -1; }
.config-section { scroll-margin-top: 10px; border-radius: 12px; box-shadow: 0 8px 22px rgba(21, 35, 61, 0.04); }
.config-section[hidden] { display: none; }
.config-section .panel-head { align-items: start; padding-bottom: 10px; border-bottom: 1px solid #edf1f7; }
.config-section .panel-head small { max-width: 720px; color: #7a8798; line-height: 1.6; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.config-grid.wide { grid-template-columns: 1fr; }
.config-grid label, .field-title { display: grid; gap: 7px; color: #526071; }
.config-grid small, .field-title small { color: #8a96a8; font-size: 12px; line-height: 1.5; }
.config-field-wide { grid-column: 1 / -1; }
.event-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.event-check { display: grid !important; grid-template-columns: auto 1fr; gap: 8px !important; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; cursor: pointer; }
.event-check:hover { border-color: #9cc7ff; background: #f3f8ff; }
.event-check input { margin: 0; }
.event-check b { display: block; color: #22324a; font-size: 13px; }
.category-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.category-check { display: grid !important; grid-template-columns: auto 1fr; gap: 10px !important; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; cursor: pointer; }
.category-check:hover { border-color: #9cc7ff; background: #f3f8ff; }
.category-check b { display: block; color: #22324a; font-size: 13px; }
.category-check small { display: block; color: #8a96a8; font-size: 12px; }
.permission-group-list { display: grid; gap: 10px; margin-bottom: 10px; }
.permission-group-row { display: grid; grid-template-columns: minmax(180px, 1fr) 140px; gap: 10px; }
.audio-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.audio-split section { display: grid; gap: 12px; padding: 16px; border: 1px solid #dfe8f5; border-radius: 12px; background: linear-gradient(180deg, #ffffff, #f8fbff); }
.audio-split h3 { margin: 0 0 2px; color: #1d2b43; font-size: 16px; }
.audio-split label { display: grid; gap: 7px; color: #526071; }
.automation-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.switch { display: flex !important; grid-template-columns: auto 1fr; align-items: center; flex-direction: row; color: var(--text) !important; }
.preview { border: 1px solid var(--line); border-radius: 6px; padding: 14px; color: #4b5563; background: #fafafa; white-space: pre-wrap; }
.notice { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; color: #4b5563; background: #fafafa; }
.success-box { color: #237804; background: #f6ffed; border-color: #b7eb8f; }
.error-box { color: #a8071a; background: #fff1f0; border-color: #ffa39e; }
.loading-box { color: #0958d9; background: #e6f4ff; border-color: #91caff; }
.chat-shell { display: grid; grid-template-columns: 300px minmax(520px, 1fr) 360px; gap: 14px; align-items: stretch; height: calc(100vh - 130px); min-height: 720px; margin-bottom: 14px; }
.chat-shell.no-user-panel { grid-template-columns: 300px minmax(520px, 1fr); }
[hidden] { display: none !important; }
.chat-session-panel, .chat-user-panel, .chat-window { min-height: 0; overflow: hidden; }
.chat-session-panel, .chat-user-panel { display: flex; flex-direction: column; padding: 14px; }
.target-list, .user-list { display: grid; gap: 8px; overflow: auto; }
.target-list { align-content: start; flex: 1; min-height: 0; }
.user-list { align-content: start; flex: 1; }
.target-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.target-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.target-section { display: flex; flex: 1; flex-direction: column; gap: 8px; min-height: 0; margin-bottom: 0; }
.target-section h3 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.target-card { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; width: 100%; padding: 10px; text-align: left; }
.user-card { grid-template-columns: 1fr; }
.target-card.active { border-color: var(--blue); background: #eaf3ff; }
.target-card b { display: block; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.target-card small { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.target-card .pill { margin-top: 4px; font-style: normal; }
.target-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #51a8ff, #1677ff); font-weight: 700; }
.chat-window { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 0; background: #f4f6fa; }
.chat-window-head { display: grid; grid-template-columns: 1fr 120px minmax(220px, 320px); gap: 12px; align-items: end; padding: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-window-head h2 { margin: 0 0 6px; font-size: 18px; }
.chat-window-head span { color: var(--muted); font-size: 12px; }
.chat-window-head label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.chat-message-list { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 18px; overflow: auto; background: linear-gradient(180deg, #f7f9fc, #eef2f7); }
.chat-load-tip { align-self: center; padding: 4px 10px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.72); font-size: 12px; }
.chat-load-tip[hidden] { display: none; }
.chat-empty { margin: auto; }
.chat-bubble { align-self: flex-end; max-width: 86%; }
.chat-bubble.failed, .chat-bubble.incoming { align-self: flex-start; }
.bubble-name { margin: 0 4px 5px; color: #6b7280; font-size: 12px; text-align: right; }
.chat-bubble.failed .bubble-name, .chat-bubble.incoming .bubble-name { text-align: left; }
.bubble-body { padding: 10px 14px; border-radius: 16px 16px 4px 16px; color: #102033; background: #c8f3a4; box-shadow: 0 4px 14px rgba(31, 41, 55, 0.08); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble.failed .bubble-body, .chat-bubble.incoming .bubble-body { border-radius: 16px 16px 16px 4px; background: #fff; }
.bubble-media { display: block; max-width: min(320px, 62vw); max-height: 360px; border-radius: 10px; object-fit: contain; }
.bubble-audio { display: block; width: min(320px, 62vw); }
.bubble-file { color: var(--blue); word-break: break-all; }
.bubble-meta { margin-top: 5px; color: var(--muted); font-size: 12px; text-align: right; }
.chat-bubble.failed .bubble-meta, .chat-bubble.incoming .bubble-meta { text-align: left; }
.bubble-recall { height: 22px; margin: 0 6px 5px; padding: 0 8px; border-radius: 999px; color: #9ca3af; background: transparent; border: 1px solid var(--line); font-size: 11px; }
.bubble-recall:hover { color: #ef4444; border-color: #ef4444; }
.bubble-recall:disabled { opacity: 0.5; }
.chat-bubble.recalled .bubble-body { background: #f3f4f6; color: #9ca3af; font-style: italic; }
.bubble-recalled-tip { font-size: 12px; }
.chat-composer { display: grid; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.composer-toolbar, .composer-footer { display: flex; align-items: center; gap: 8px; }
.composer-toolbar { flex-wrap: wrap; }
.composer-tool { width: 44px; height: 36px; padding: 0; color: var(--blue); font-size: 20px; font-weight: 500; }
.composer-chip { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12px; }
.composer-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 320px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fb; font-size: 12px; }
.attach-chip b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip small { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.attach-chip button { width: 20px; height: 20px; padding: 0; line-height: 1; border-radius: 50%; color: var(--muted); }
.attach-chip button:hover { color: var(--red, #d64545); }
.composer-input { min-height: 92px; resize: vertical; }
.composer-footer { justify-content: space-between; color: var(--muted); font-size: 12px; }
.chat-editor { max-width: none; }
.chat-tools { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.user-layout { display: grid; grid-template-columns: minmax(520px, 1.2fr) minmax(360px, 0.8fr); gap: 14px; align-items: start; }
.user-detail { position: sticky; top: 56px; max-height: calc(100vh - 88px); overflow: auto; }
.user-detail-body { display: grid; gap: 14px; }
.detail-hero { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail-hero h3 { margin: 0 0 4px; font-size: 20px; }
.detail-hero p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.avatar.large { width: 46px; height: 46px; font-size: 18px; }
.summary-grid.compact { grid-template-columns: repeat(4, 1fr); margin-bottom: 0; }
.summary-grid.compact .summary-card { height: auto; padding: 12px; }
.mini-list { display: grid; gap: 8px; }
.mini-row { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.mini-row b { overflow-wrap: anywhere; font-weight: 500; }
.mini-row span { color: var(--muted); overflow-wrap: anywhere; font-size: 12px; }
.member-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.member-row small { white-space: nowrap; }
.message-row { grid-template-columns: 1fr auto; align-items: center; }
.message-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.chart { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 70px; gap: 12px; align-items: center; }
.bar-row i { display: block; width: var(--w); height: 12px; min-width: 8px; border-radius: 999px; background: var(--blue); }
.bar-row span, .bar-row b { color: var(--muted); }
.empty, .loading, .error { color: var(--muted); }
@media (max-width: 920px) { html, body { height: auto; overflow: auto; } #app { display: block; height: auto; overflow: visible; } .sidebar { position: static; height: auto; overflow: visible; } .shell { display: block; overflow: visible; } .content { overflow: visible; } .summary-grid, .status-grid, .dashboard-grid, .chat-layout, .chat-shell, .chat-window-head, .plugin-card-grid, .automation-grid, .user-layout, .member-row, .message-row, .config-layout, .plugin-workspace, .robot-admin-grid, .runtime-summary { grid-template-columns: 1fr; } .plugin-workspace { height: auto; overflow: visible; } .plugin-workspace-nav, .plugin-workspace-list, .plugin-workspace-detail { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); } .row, .group-row, .plugin-setting-row { grid-template-columns: 1fr; } .chat-session-panel, .chat-user-panel, .chat-window { min-height: auto; } .user-detail, .config-nav { position: static; max-height: none; } }
