/* 业务面板：面板框架、聊天布局/消息区、仪表盘、Mission Control、业务线与节点、团队仪表盘、通知、任务、公告 */
/* Panels */
.panel { display: none; flex: 1; flex-direction: column; overflow: hidden; min-height: 0; }
.panel.active { display: flex; animation: panel-fade-in 150ms ease-out; }
@keyframes panel-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Chat layout: sessions sidebar + message area */
.chat-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.chat-sessions-sidebar { width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.chat-sessions-header { padding: 10px 10px 6px; border-bottom: 1px solid var(--border); }
.btn-new-chat { width: 100%; background: var(--primary); color: white; border: none; border-radius: var(--radius); padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; justify-content: center; }
.btn-new-chat:hover { background: var(--primary-hover); }
.chat-sessions-list { flex: 1; overflow-y: auto; padding: 6px; }
.session-item { position: relative; display: flex; align-items: center; gap: 0; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; color: var(--text2); font-size: 13px; transition: background 0.12s; margin-bottom: 2px; }
.session-item:hover { background: var(--surface2); color: var(--text); }
.session-item.active { background: rgba(99,102,241,0.15); color: var(--text); }
.session-item-body { flex: 1; min-width: 0; }
.session-item-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-item-title-input { width: 100%; background: var(--surface); border: 1px solid var(--primary); border-radius: 4px; color: var(--text); font-size: 13px; padding: 1px 4px; outline: none; }
.session-item-time { font-size: 11px; color: var(--text2); margin-top: 2px; }
.session-item-delete { flex-shrink: 0; background: none; border: none; color: var(--text2); cursor: pointer; padding: 2px 4px; border-radius: 4px; font-size: 13px; opacity: 0; transition: opacity 0.1s; line-height: 1; }
.session-item:hover .session-item-delete { opacity: 1; }
.session-item-delete:hover { color: var(--red); background: rgba(239,68,68,0.1); }
/* Message area */
.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; }
.msg { max-width: 80%; margin-bottom: 16px; }
.msg.user { margin-left: auto; }
.msg .bubble { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.msg.user .bubble { white-space: pre-wrap; background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: var(--surface2); border-bottom-left-radius: 4px; }
.msg.assistant .bubble h2 { font-size: 15px; font-weight: 600; margin: 12px 0 6px; }
.msg.assistant .bubble h3 { font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
.msg.assistant .bubble p { margin: 6px 0; }
.msg.assistant .bubble ul, .msg.assistant .bubble ol { margin: 6px 0 6px 20px; }
.msg.assistant .bubble li { margin: 2px 0; }
.msg.assistant .bubble strong { font-weight: 600; }
.msg.assistant .bubble em { font-style: italic; }
.msg.assistant .bubble code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.msg.assistant .bubble table { border-collapse: collapse; margin: 8px 0; width: 100%; font-size: 13px; }
.msg.assistant .bubble th, .msg.assistant .bubble td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.msg.assistant .bubble th { background: rgba(255,255,255,0.05); font-weight: 600; }
.msg.assistant .bubble hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.msg .time { font-size: 11px; color: var(--text2); margin-top: 4px; padding: 0 4px; }
.msg.user .time { text-align: right; }
.chat-archived-link { text-align: center; padding: 8px; font-size: 12px; color: var(--primary); cursor: pointer; }
.chat-archived-link:hover { text-decoration: underline; }
.chat-input-area { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-end; }
.chat-input-area textarea { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; color: var(--text); font-size: 14px; outline: none; resize: none; overflow-y: hidden; min-height: 40px; max-height: 160px; line-height: 1.5; font-family: inherit; }
.chat-input-area textarea:focus { border-color: var(--primary); }
.chat-input-area button { background: var(--primary); color: white; border: none; border-radius: var(--radius); padding: 10px 20px; cursor: pointer; font-size: 14px; }
.chat-input-area button:hover { background: var(--primary-hover); }
.chat-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-input-stack { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.chat-voice-status { min-height: 18px; font-size: 12px; color: var(--text2); padding-left: 2px; }
.chat-voice-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 20px; flex-wrap: wrap; }
.team-data-sources { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.team-data-sources summary { color: var(--text2); font-size: 12px; cursor: pointer; list-style: none; }
.team-data-sources summary::-webkit-details-marker { display: none; }
.team-data-sources summary::before { content: '▸'; display: inline-block; margin-right: 6px; transition: transform .15s; }
.team-data-sources[open] summary::before { transform: rotate(90deg); }
.team-data-source-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.team-data-source { width: 100%; display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); padding: 7px 8px; text-align: left; font-size: 11px; }
button.team-data-source { cursor: pointer; }
button.team-data-source:hover { border-color: var(--primary); }
.team-data-source-kind { color: var(--primary); font-weight: 600; white-space: nowrap; }
.team-data-source-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-data-source-time { color: var(--text2); white-space: nowrap; }

.chat-voice-status.listening { color: var(--primary); }
.chat-voice-status.error { color: var(--red); }
.chat-voice-draft { display:none; margin: 2px 0 2px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(99,102,241,0.28); background: rgba(99,102,241,0.08); }
.chat-voice-draft.show { display:block; }
.chat-voice-draft-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.chat-voice-draft-title { font-size:11px; font-weight:700; color:#c7d2fe; letter-spacing:.04em; text-transform:uppercase; }
.chat-voice-draft-meta { font-size:11px; color:var(--text2); }
.chat-voice-draft-body { font-size:13px; line-height:1.65; color:var(--text); white-space:pre-wrap; word-break:break-word; }
.chat-voice-draft-body .interim { color:rgba(226,232,240,0.72); }
.chat-voice-btn { min-width: 92px; background: var(--surface2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }
.chat-voice-btn:hover { border-color: var(--primary) !important; color: var(--primary) !important; }
.chat-voice-btn.recording { background: rgba(239,68,68,0.14) !important; color: var(--red) !important; border-color: rgba(239,68,68,0.4) !important; }
.chat-voice-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dashboard */
.dashboard { padding: 24px; overflow-y: auto; flex: 1; }
.dashboard h2 { font-size: 20px; margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 24px; }
.stat-card { background: var(--surface2); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-card .num { font-size: 24px; font-weight: 700; }
.stat-card .label { font-size: 11px; color: var(--text2); margin-top: 2px; }
.stat-card.green .num { color: var(--green); }
.stat-card.yellow .num { color: var(--yellow); }
.stat-card.red .num { color: var(--red); }
.stat-card.primary .num { color: var(--primary); }

/* Mission Control */
.mission-summary { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.mission-pill { display: flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: default; }
.mission-pill.red { background: rgba(239,68,68,0.14); color: #f87171; }
.mission-pill.yellow { background: rgba(234,179,8,0.14); color: #facc15; }
.mission-pill.green { background: rgba(34,197,94,0.14); color: #4ade80; }
.mission-pill.muted { background: var(--surface2); color: var(--text2); }
.mission-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mission-pill.red .mission-dot { background: #ef4444; animation: mc-pulse 2s ease-in-out infinite; }
.mission-pill.yellow .mission-dot { background: #eab308; }
.mission-pill.green .mission-dot { background: #22c55e; }
@keyframes mc-pulse { 0%,100%{ opacity:1; } 50%{ opacity:0.3; } }

.mc-section { margin-bottom: 18px; }
.mc-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text2); }
.mc-section-head .mc-icon { font-size: 15px; }

.mc-card { background: var(--surface2); border-radius: var(--radius); padding: 11px 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; transition: background 0.15s; }
.mc-card:hover { background: var(--surface); }
.mc-card.red { border-left: 3px solid #ef4444; }
.mc-card.yellow { border-left: 3px solid #eab308; }
.mc-card.green { border-left: 3px solid #22c55e; }
.mc-card .mc-info { flex: 1; min-width: 0; }
.mc-card .mc-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-card .mc-meta { font-size: 11px; color: var(--text2); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.mc-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.mc-badge.overdue { background: rgba(239,68,68,0.18); color: #f87171; }
.mc-badge.soon { background: rgba(234,179,8,0.18); color: #facc15; }
.mc-badge.done { background: rgba(34,197,94,0.18); color: #4ade80; }
.mc-badge.key { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.mc-empty { font-size: 12px; color: var(--text2); padding: 8px 0; }
.mc-divider { height: 1px; background: var(--border); margin: 18px 0; opacity: 0.5; }

.account-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.account-card-label { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.account-card-name { font-size: 20px; font-weight: 700; }
.account-card-company { font-size: 12px; color: var(--text2); margin-top: 6px; }
.invite-row-title { font-size: 14px; color: var(--text2); margin-top: 14px; margin-bottom: 8px; }
.invite-row { display: flex; align-items: center; gap: 10px; }
.invite-code-input { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.invite-copy-btn { border: 1px solid rgba(99,102,241,0.45); color: var(--primary-hover); background: rgba(99,102,241,0.12); border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.invite-copy-btn:hover { border-color: var(--primary); color: #c7d2fe; }
.account-card-hint { font-size: 12px; color: var(--text2); margin-top: 10px; line-height: 1.6; }
.account-card-actions { display: flex; gap: 10px; margin-top: 14px; }
.team-leave-btn, .account-danger-btn { flex: 1; border-radius: 999px; padding: 11px 16px; font-size: 15px; font-weight: 600; cursor: pointer; }
.team-leave-btn { border: 1px solid rgba(99,102,241,0.28); background: rgba(99,102,241,0.12); color: #dbe3ff; }
.team-leave-btn:hover { border-color: rgba(129,140,248,0.75); background: rgba(99,102,241,0.2); }
.team-leave-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.account-danger-btn { border: 1px solid rgba(239,68,68,0.62); background: rgba(239,68,68,0.08); color: #f87171; }
.account-danger-btn:hover { border-color: var(--red); background: rgba(239,68,68,0.16); }

/* Business lines & Nodes */
.bl-section { margin-bottom: 24px; }
.bl-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bl-header h3 { font-size: 16px; }
.bl-header .bl-badge { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--surface2); color: var(--text2); }
.node-list { display: flex; flex-direction: column; gap: 8px; }
.node-card { background: var(--surface2); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-left: 3px solid var(--border); }
.node-card.pending { border-left-color: var(--text2); }
.node-card.in_progress { border-left-color: var(--primary); }
.node-card.completed { border-left-color: var(--green); }
.node-card.blocked { border-left-color: var(--red); }
.node-card.stalled { border-left-color: var(--orange); }
.plain-task-summary { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; padding: 8px 10px; border-left: 2px solid var(--primary); background: color-mix(in srgb, var(--primary) 5%, transparent); color: var(--text); }
.plain-task-summary-line { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 7px; }
.plain-task-summary-line > span:first-child { padding-top: 1px; color: var(--primary-hover); font-size: 10.5px; font-weight: 700; }
.plain-task-summary-line p { min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.55; overflow-wrap: anywhere; }
.plain-task-summary.compact { display: block; margin-top: 4px; padding: 0; border: 0; background: transparent; }
.plain-task-summary.compact .plain-task-summary-line { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 5px; }
.plain-task-summary.compact .plain-task-summary-line > span:first-child { color: var(--text2); font-size: 10px; }
.plain-task-summary.compact .plain-task-summary-line p { display: -webkit-box; overflow: hidden; color: var(--text2); font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.plain-task-pending { padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--yellow) 15%, transparent); color: var(--yellow); font-size: 10px; font-weight: 500; white-space: nowrap; }
.node-info .plain-task-summary { max-width: 720px; }
.node-info { flex: 1; min-width: 0; }
.node-title { font-size: 13px; font-weight: 500; }
.node-meta { font-size: 11px; color: var(--text2); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.node-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.node-actions button { font-size: 11px; padding: 3px 6px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.node-actions button:hover { border-color: var(--primary); }
.node-btn-complete { color: var(--green) !important; font-size: 14px !important; font-weight: 700; border-color: rgba(34,197,94,0.3) !important; }
.node-btn-complete:hover { background: rgba(34,197,94,0.12) !important; border-color: var(--green) !important; }
.node-btn-delete { color: var(--red) !important; font-size: 14px !important; font-weight: 700; border-color: rgba(239,68,68,0.3) !important; }
.node-btn-delete:hover { background: rgba(239,68,68,0.12) !important; border-color: var(--red) !important; }

/* Team dashboard */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.member-card { background: var(--surface2); border-radius: var(--radius); padding: 16px; }
.member-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.member-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: white; }
.member-name { font-size: 14px; font-weight: 600; }
.member-role { font-size: 11px; color: var(--text2); }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; text-align: center; }
.member-stats .stat { padding: 4px; border-radius: 4px; background: rgba(255,255,255,0.03); }
.member-stats .stat .val { font-weight: 700; font-size: 16px; }
.member-stats .stat .lbl { color: var(--text2); font-size: 10px; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.3s; }

/* Notifications */
.notif-panel { padding: 24px; overflow-y: auto; flex: 1; }
.notif-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.notif-card { background: var(--surface2); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; cursor: pointer; border-left: 3px solid var(--primary); transition: opacity 0.2s, box-shadow 0.15s; user-select: none; }
.notif-card:hover { box-shadow: 0 0 0 1px rgba(99,102,241,0.25); }
.notif-card.read { opacity: 0.6; border-left-color: var(--border); }
.notif-card .notif-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.notif-card .notif-content { font-size: 12px; color: var(--text2); line-height: 1.5; }
.notif-card .notif-time { font-size: 11px; color: var(--text2); margin-top: 4px; }
.notif-type-icon { display: inline-block; width: 20px; text-align: center; margin-right: 4px; }
.notif-category-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.notif-category-tab { min-width: 72px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; background: var(--surface2); color: var(--text2); cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap; }
.notif-category-tab b { min-width: 19px; border-radius: 4px; padding: 1px 4px; background: var(--surface); color: var(--text); font-size: 10px; }
.notif-category-tab.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface2)); color: var(--primary-hover); }
.notif-module { margin-bottom: 18px; }
.notif-module-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.notif-module-head h3 { margin: 0; font-size: 14px; }
.notif-module-head span { display: block; margin-top: 3px; color: var(--text2); font-size: 10.5px; }
.notif-module-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.notif-module-list .notif-card { margin: 0; border-width: 0 0 1px 3px; border-radius: 0; }
.notif-module-list .notif-card:last-child { border-bottom-width: 0; }
.notif-module-empty { padding: 28px 14px; color: var(--text2); text-align: center; font-size: 12px; }
.api-usage-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.api-usage-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.api-usage-range, .api-usage-scope { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.api-usage-range button, .api-usage-scope button { border: 0; border-right: 1px solid var(--border); padding: 7px 11px; background: var(--surface2); color: var(--text2); cursor: pointer; font-size: 12px; }
.api-usage-range button:last-child, .api-usage-scope button:last-child { border-right: 0; }
.api-usage-range button.active, .api-usage-scope button.active { background: var(--primary); color: #fff; }
.api-usage-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.api-usage-kpi, .api-usage-section { border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); }
.api-usage-kpi { min-width: 0; padding: 15px; }
.api-usage-kpi > span, .api-usage-kpi > strong, .api-usage-kpi > small { display: block; }
.api-usage-kpi > span { color: var(--text2); font-size: 11px; }
.api-usage-kpi > strong { margin-top: 7px; font-size: 25px; }
.api-usage-kpi > small { margin-top: 6px; color: var(--text2); font-size: 10.5px; line-height: 1.45; }
.api-usage-section { min-width: 0; padding: 15px; margin-bottom: 14px; }
.api-usage-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.api-usage-section-head h3 { margin: 0; font-size: 14px; }
.api-usage-section-head span { display: block; margin-top: 3px; color: var(--text2); font-size: 10.5px; }
.api-usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.api-rank-row { padding: 9px 0; border-bottom: 1px solid var(--border); }
.api-rank-row:last-child { border-bottom: 0; }
.api-rank-head { display: flex; justify-content: space-between; gap: 9px; min-width: 0; }
.api-rank-head strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.api-rank-head span, .api-rank-meta { color: var(--text2); font-size: 10px; white-space: nowrap; }
.api-rank-track { height: 4px; margin-top: 7px; overflow: hidden; background: var(--surface); }
.api-rank-track span { display: block; height: 100%; background: var(--primary); }
.api-rank-meta { margin-top: 5px; }
.api-daily-chart { height: 190px; display: flex; align-items: stretch; gap: 5px; overflow-x: auto; padding-top: 18px; }
.api-daily-column { min-width: 34px; flex: 1; display: grid; grid-template-rows: 14px 1fr 16px; gap: 4px; text-align: center; }
.api-daily-value, .api-daily-column b { overflow: hidden; color: var(--text2); font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.api-daily-bar { min-height: 100px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--border); }
.api-daily-bar i { width: min(22px, 72%); display: block; background: var(--green); }
.api-usage-table-wrap { overflow-x: auto; }
.api-usage-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.api-usage-table th, .api-usage-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.api-usage-table th { color: var(--text2); font-weight: 600; }
.api-usage-table td strong, .api-usage-table td small { display: block; }
.api-usage-table td small { margin-top: 2px; color: var(--text2); font-size: 9px; }
.api-usage-table sup { margin-left: 2px; color: var(--yellow); font-size: 8px; }
.api-status { display: inline-flex; border-radius: 4px; padding: 3px 6px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.api-status.success { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.api-status.partial { background: color-mix(in srgb, var(--yellow) 12%, transparent); color: var(--yellow); }
.api-usage-empty { width: 100%; padding: 34px 12px; color: var(--text2); text-align: center; font-size: 12px; }
.api-usage-empty.error { color: var(--red); }


/* Notification detail modal */
.notif-detail-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; margin-bottom: 14px; }
.notif-detail-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; background: rgba(255,255,255,0.03); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; color: var(--text); }
.notif-detail-meta { font-size: 12px; color: var(--text2); margin-bottom: 16px; }
.notif-jump-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: white; border: none; border-radius: var(--radius); padding: 9px 18px; font-size: 14px; cursor: pointer; font-weight: 600; }
.notif-jump-btn:hover { opacity: 0.88; }
.node-card.highlight-pulse { animation: highlightPulse 1.8s ease-out; }
@keyframes highlightPulse { 0%{box-shadow:0 0 0 3px rgba(99,102,241,0.7);} 100%{box-shadow:none;} }
.task-toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 220; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.task-toast { background: var(--surface); border: 1px solid rgba(99,102,241,0.35); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.28); padding: 12px 12px 10px; pointer-events: auto; }
.task-toast.urgent { border-color: color-mix(in srgb, var(--red) 70%, var(--border)); box-shadow: 0 8px 28px color-mix(in srgb, var(--red) 22%, transparent); }
.task-toast.urgent .task-toast-title, .task-toast.urgent .task-toast-link { color: var(--red); }
.task-toast-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
.task-toast-body { font-size: 12px; color: var(--text2); margin-top: 4px; line-height: 1.5; white-space: pre-wrap; }
.task-toast-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.task-toast-link { font-size: 12px; color: var(--primary-hover); cursor: pointer; }
.task-toast-link:hover { color: #c7d2fe; text-decoration: underline; }
.task-toast-close { border: none; background: transparent; color: var(--text2); cursor: pointer; font-size: 12px; }
.task-toast-close:hover { color: var(--text); }
.join-review-list { display: flex; flex-direction: column; gap: 10px; max-height: 48vh; overflow-y: auto; }
.join-review-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface2); }
.join-review-title { font-size: 13px; font-weight: 600; }
.join-review-meta { font-size: 12px; color: var(--text2); margin-top: 4px; line-height: 1.5; }
.join-review-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.join-review-actions button { border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 12px; }
.join-approve-btn { background: rgba(34,197,94,0.14); color: #bbf7d0; border-color: rgba(34,197,94,0.35); }
.join-reject-btn { background: rgba(239,68,68,0.12); color: #fca5a5; border-color: rgba(239,68,68,0.35); }

/* Tasks panel */
.tasks-panel { padding: 24px; overflow-y: auto; flex: 1; }
.briefing-box { background: var(--surface2); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; line-height: 1.7; font-size: 14px; }
.briefing-box h2 { font-size: 16px; margin: 12px 0 6px; }
.briefing-box h3 { font-size: 14px; margin: 10px 0 4px; }
.briefing-box p { margin: 6px 0; }
.briefing-box ul, .briefing-box ol { margin: 6px 0 6px 20px; }
.briefing-box strong { font-weight: 600; }
.briefing-box hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.briefing-audio-bar { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.briefing-speech-btn { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 6px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 600; }
.briefing-speech-btn:hover { border-color: var(--primary); }
.briefing-speech-btn:disabled { opacity: .68; cursor: wait; }
.briefing-speech-status { min-width: 0; color: var(--text2); font-size: 11px; line-height: 1.4; }
.briefing-audio-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: mc-pulse 1.2s ease-in-out infinite; }
.task-discussion-trigger { cursor: pointer; }
.task-discussion-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.node-info.task-discussion-trigger:hover .node-title { color: var(--primary); }
.mc-completed-details > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.mc-completed-details > summary::-webkit-details-marker { display: none; }
.mc-completed-details .mc-fold-label { color: var(--text2); font-size: 11px; font-weight: 500; }
.mc-completed-details[open] .mc-fold-label { font-size: 0; }
.mc-completed-details[open] .mc-fold-label::after { content: '收起'; font-size: 11px; }
.mc-completed-list { display: grid; gap: 8px; padding-top: 8px; }
.team-analytics { margin: 12px 16px 20px; padding: 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.team-analytics-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.team-period-control { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface2); }
.team-period-control button { min-height: 30px; padding: 5px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text2); cursor: pointer; font-size: 11px; white-space: nowrap; }
.team-period-control button:hover { color: var(--text); }
.team-period-control button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.18); font-weight: 600; }
.team-period-control button:disabled { cursor: wait; opacity: .6; }
.team-chart-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 14px; }
.team-chart-panel { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.team-chart-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.team-chart-title strong { color: var(--text2); font-size: 11px; font-weight: 500; }
.team-chart-canvas { position: relative; width: 100%; height: 260px; }

/* Announcements */
.announcements-panel { flex: 1; overflow-y: auto; padding: 20px 24px 36px; }
.announcement-list { width: min(880px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.announcement-state-group { display: inline-flex; align-items: center; gap: 6px; }
.announcement-read-state.archived { color: var(--text2); border-color: var(--border); background: var(--surface2); }
.announcement-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px 22px; }
.announcement-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.announcement-item-head h2 { font-size: 18px; line-height: 1.35; margin-top: 4px; overflow-wrap: anywhere; }
.announcement-item-date { font-size: 12px; color: var(--text2); }
.announcement-read-state { flex: 0 0 auto; font-size: 11px; color: var(--text2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 9px; }
.announcement-read-state.unread { color: var(--primary-hover); border-color: var(--primary); background: rgba(99,102,241,0.1); }
.announcement-item-summary { color: var(--text2); font-size: 14px; line-height: 1.7; margin-top: 14px; }
.announcement-item-content { margin-top: 16px; }
.announcement-section + .announcement-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.announcement-section h3 { font-size: 15px; margin: 0 0 8px; }
.announcement-section p { color: var(--text2); font-size: 13px; line-height: 1.75; }
.announcement-section ul { color: var(--text); font-size: 13px; line-height: 1.75; margin: 9px 0 0 20px; }
.announcement-section li + li { margin-top: 4px; }
.announcement-empty { padding: 60px 20px; text-align: center; color: var(--text2); }
#announcement-modal .announcement-modal { max-width: 680px; max-height: 84vh; overflow-y: auto; padding: 0; }
.announcement-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
#announcement-modal .announcement-modal-head h3 { margin: 0 0 5px; font-size: 20px; }
.announcement-modal-date { font-size: 12px; color: var(--text2); }
.announcement-modal-close { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface2); color: var(--text2); cursor: pointer; font-size: 20px; line-height: 1; }
.announcement-modal-close:hover { color: var(--text); border-color: var(--primary); }
.announcement-modal-body { padding: 18px 24px 4px; }
.announcement-modal-summary { color: var(--text2); font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.announcement-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 22px; }
.announcement-modal-actions button { min-height: 38px; border-radius: 8px; padding: 8px 16px; border: 1px solid var(--border); cursor: pointer; font-size: 14px; }
.announcement-modal-actions .view-board { color: var(--text); background: var(--surface2); }
.announcement-modal-actions .acknowledge { color: white; background: var(--primary); border-color: var(--primary); }
