/* VISUAL POLISH Phase 2：滚动条、品牌栏、导航高亮、面板头、统计卡/节点卡/成员卡/通知卡、聊天与聊天室、modal 精修、Stall Alert、动效及主题 overrides */
/* ═══════════════════════════════════════════
   VISUAL POLISH — Phase 2 App Enhancement
   ═══════════════════════════════════════════ */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text2); }

/* ── Sidebar brand/header/nav 视觉已由 03-sidebar-nav.css 全面接管，本处不再重复定义 ── */

/* ── Panel header bar (.ph) ── */
.ph {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 58px;
  border-bottom: 1px solid var(--border); background: var(--surface);
  flex-shrink: 0; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ph-title { font-size: 18px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -0.2px; }
.ph-action-btn {
  background: var(--primary); color: white; border: none; border-radius: 8px;
  padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; letter-spacing: 0.2px;
  transition: opacity 0.15s, transform 0.1s;
}
.ph-action-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.ph-action-btn:active { transform: translateY(0); }
.ph-action-btn-ghost {
  background: transparent; color: var(--text2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ph-action-btn-ghost:hover { border-color: var(--primary); color: var(--text); }

/* ── Stat cards: gradient + hover lift ── */
.stat-card { border: 1px solid var(--border); border-radius: 12px; transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.stat-card .num { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.stat-card.primary { border-color: rgba(99,102,241,0.22); background: linear-gradient(145deg, rgba(99,102,241,0.1) 0%, var(--surface2) 100%); }
.stat-card.green  { border-color: rgba(34,197,94,0.22);  background: linear-gradient(145deg, rgba(34,197,94,0.09) 0%, var(--surface2) 100%); }
.stat-card.yellow { border-color: rgba(234,179,8,0.22);  background: linear-gradient(145deg, rgba(234,179,8,0.09) 0%, var(--surface2) 100%); }
.stat-card.red    { border-color: rgba(239,68,68,0.22);  background: linear-gradient(145deg, rgba(239,68,68,0.09) 0%, var(--surface2) 100%); }

/* ── BL section header ── */
.bl-header h3 { font-size: 15px; font-weight: 700; }
.bl-badge { background: rgba(99,102,241,0.12); color: var(--primary); border: 1px solid rgba(99,102,241,0.22); border-radius: 999px; padding: 2px 10px; font-weight: 600; }

/* ── Node cards ── */
.node-card { border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; transition: box-shadow 0.15s; }
.node-card:hover { box-shadow: 0 2px 14px rgba(0,0,0,0.16); }
.node-card.in_progress { box-shadow: 0 0 0 1px rgba(99,102,241,0.12); }
.node-actions select, .node-actions button { border-radius: 6px; transition: border-color 0.12s, color 0.12s, background 0.12s; }
.node-actions button:hover { background: rgba(99,102,241,0.1); color: var(--primary); border-color: rgba(99,102,241,0.4); }

/* ── Team member cards ── */
.member-card { border: 1px solid var(--border); border-radius: 12px; transition: transform 0.2s, border-color 0.18s, box-shadow 0.2s; }
.member-card.clickable:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.18); }
.member-avatar { box-shadow: 0 0 0 2px rgba(99,102,241,0.25); }
.member-detail-avatar { box-shadow: 0 0 0 2px rgba(99,102,241,0.25); }
.progress-bar { height: 5px; border-radius: 3px; margin-top: 10px; }
.progress-bar .fill { background: linear-gradient(90deg, var(--primary) 0%, var(--green) 100%); border-radius: 3px; }

/* ── Notification cards ── */
.notif-card { border: 1px solid var(--border); border-left-width: 3px; border-radius: 10px; transition: box-shadow 0.15s, transform 0.12s; }
.notif-card:hover { transform: translateX(3px); box-shadow: 0 2px 12px rgba(0,0,0,0.15); }

/* ── Tasks panel ── */
.tasks-section-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.tasks-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.briefing-box { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px; }

/* ── Account cards ── */
.account-card { border-radius: 14px; box-shadow: 0 1px 8px rgba(0,0,0,0.1); }
.account-card-name { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.invite-code-input { border-radius: 10px; }
.account-card-actions { flex-wrap: wrap; }

/* ── Simplified dashboard layout ── */
.dashboard-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.dashboard-primary, .dashboard-secondary { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.dashboard-secondary .account-card { margin-bottom: 0; }
.dashboard-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(34,197,94,0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(99,102,241,0.22), transparent 36%),
    linear-gradient(145deg, rgba(18,23,38,0.92) 0%, rgba(25,34,58,0.82) 50%, rgba(19,23,34,0.96) 100%);
  border: 1px solid rgba(129,140,248,0.24);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 42px rgba(8,15,32,0.34);
}
.dashboard-hero::after {
  content: '';
  position: absolute;
  inset: auto -40px -56px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.11) 0%, transparent 68%);
  pointer-events: none;
}
.dashboard-eyebrow { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #c7d2fe; font-weight: 700; }
.dashboard-headline { font-size: 28px; font-weight: 800; line-height: 1.18; margin-top: 10px; max-width: 20ch; }
.dashboard-subline { font-size: 13px; color: rgba(226,232,240,0.76); line-height: 1.75; margin-top: 10px; max-width: 58ch; }
.dashboard-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: end; position: relative; z-index: 1; }
.dashboard-hero-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.dashboard-score-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(12px);
}
.dashboard-score-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(226,232,240,0.62); }
.dashboard-score-value { font-size: 34px; font-weight: 800; margin-top: 8px; }
.dashboard-score-meta { font-size: 12px; color: rgba(226,232,240,0.74); line-height: 1.7; margin-top: 8px; }
.focus-pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.focus-pill, .panel-chip, .team-focus-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.focus-pill { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(241,245,249,0.92); }
button.focus-pill { cursor: pointer; }
button.focus-pill:hover { border-color: var(--primary); color: #fff; }
[data-theme="light"] .focus-pill { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); color: var(--text); }
.panel-chip { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.22); color: var(--primary-hover); }
.team-focus-chip { background: rgba(15,23,42,0.24); border: 1px solid rgba(255,255,255,0.08); color: var(--text); }
.dashboard-glance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dashboard-glance-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px 14px;
}
.dashboard-glance-label { font-size: 11px; color: rgba(226,232,240,0.64); }
.dashboard-glance-value { font-size: 20px; font-weight: 800; margin-top: 6px; }
.dashboard-card { background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(15,23,42,0.12) 100%); border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: 0 8px 24px rgba(2,6,23,0.16); }
.panel-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-section-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.panel-section-subtitle { font-size: 12px; color: var(--text2); line-height: 1.6; margin-top: 4px; }
.business-line-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.business-line-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 16px; padding: 15px; }
.business-line-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.business-line-title { font-size: 14px; font-weight: 700; }
.business-line-desc { font-size: 12px; color: var(--text2); line-height: 1.6; margin-top: 6px; }
.business-line-meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; margin-top: 12px; }
.business-line-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary) 0%, var(--green) 100%); }
.business-line-meta { font-size: 11px; color: var(--text2); display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.business-line-list { display: flex; flex-direction: column; gap: 7px; }
.business-line-row { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.025); color: var(--text); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.business-line-row:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); background: color-mix(in srgb, var(--primary) 7%, transparent); }
.business-line-row:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.business-line-row-main { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.business-line-row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.business-line-row-main span, .business-line-row-counts span { color: var(--text2); font-size: 12px; white-space: nowrap; }
.business-line-row-counts { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.business-line-row-counts .active { color: var(--primary-hover); }
.business-line-row-counts .risk { color: var(--red); font-weight: 600; }
.business-line-row-counts .business-line-arrow { color: var(--text); font-size: 15px; }
.account-stack { display: flex; flex-direction: column; gap: 12px; }
.account-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(15,23,42,0.16) 100%);
  border: 1px solid rgba(148,163,184,0.14);
  box-shadow: 0 12px 28px rgba(2,6,23,0.18);
}
.account-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent 70%);
  pointer-events: none;
}
.account-card-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; color: rgba(203,213,225,0.62); }
.account-card-company { line-height: 1.6; }
.account-form-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.account-form-row .invite-code-input { font-size: 14px; }
.dashboard-side-rail { display: flex; flex-direction: column; gap: 12px; }
.dashboard-status-card {
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(34,197,94,0.1) 0%, rgba(15,23,42,0.08) 100%);
  border: 1px solid rgba(34,197,94,0.18);
}
.dashboard-status-card.warn {
  background: linear-gradient(180deg, rgba(239,68,68,0.1) 0%, rgba(15,23,42,0.08) 100%);
  border-color: rgba(239,68,68,0.18);
}
.dashboard-status-title { font-size: 13px; font-weight: 700; }
.dashboard-status-copy { font-size: 12px; color: var(--text2); line-height: 1.7; margin-top: 6px; }
.dashboard-task-stats { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
.dashboard-stat-link {
  appearance: none; width: 100%; border: 1px solid var(--border); color: var(--text); font: inherit;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.dashboard-stat-link::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--primary); opacity: .85; }
.dashboard-stat-link.yellow::before { background: var(--yellow); }
.dashboard-stat-link.green::before { background: var(--green); }
.dashboard-stat-link.red::before { background: var(--red); }
.dashboard-stat-link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); background: var(--surface); box-shadow: 0 10px 24px rgba(2,6,23,.16); }
.dashboard-stat-link:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.dashboard-stat-link:active { transform: translateY(0); }
.stat-link-hint { margin-top: 9px; font-size: 11px; font-weight: 600; color: var(--text2); }
.dashboard-stat-link:hover .stat-link-hint { color: var(--primary-hover); }
.dashboard-live-card, .dashboard-discussion-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 26px rgba(2,6,23,.14);
}
.dashboard-live-card { padding: 18px; }
.dashboard-live-head, .dashboard-discussion-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dashboard-live-updated { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--text2); font-size: 11px; }
.dashboard-live-updated > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent); animation: dashboard-live-pulse 1.2s ease-in-out 1; }
@keyframes dashboard-live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .38; } }
.dashboard-team-statuses { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.dashboard-team-status { display: grid; grid-template-columns: 9px auto 1fr; align-items: center; gap: 7px; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.dashboard-team-status-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--text2); }
.dashboard-team-status strong { font-size: 16px; line-height: 1; }
.dashboard-team-status > span:last-child { color: var(--text2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-team-status.pending .dashboard-team-status-dot { background: var(--yellow); }
.dashboard-team-status.in_progress .dashboard-team-status-dot { background: var(--primary); }
.dashboard-team-status.completed .dashboard-team-status-dot { background: var(--green); }
.dashboard-team-status.blocked .dashboard-team-status-dot { background: var(--red); }
.dashboard-team-status.stalled .dashboard-team-status-dot { background: var(--orange); }
.dashboard-live-track { display: flex; gap: 2px; height: 6px; margin: 10px 0 16px; overflow: hidden; border-radius: 3px; background: var(--surface); }
.dashboard-live-segment { min-width: 3px; background: var(--text2); }
.dashboard-live-segment.pending { background: var(--yellow); }
.dashboard-live-segment.in_progress { background: var(--primary); }
.dashboard-live-segment.completed { background: var(--green); }
.dashboard-live-segment.blocked { background: var(--red); }
.dashboard-live-segment.stalled { background: var(--orange); }
.dashboard-live-segment.empty { flex: 1; opacity: .18; }
.dashboard-event-list { max-height: 330px; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.dashboard-event-row { appearance: none; width: 100%; min-height: 62px; display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dashboard-event-row:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.dashboard-event-row:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: -2px; }
.dashboard-event-row.is-new { animation: dashboard-event-new 1.8s ease-out; }
@keyframes dashboard-event-new { 0% { background: color-mix(in srgb, var(--green) 22%, transparent); } 100% { background: transparent; } }
.dashboard-event-time { color: var(--text2); font-size: 11px; white-space: nowrap; }
.dashboard-event-main { min-width: 0; }
.dashboard-event-main strong, .dashboard-event-main > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-event-main strong { font-size: 13px; }
.dashboard-event-main > span { margin-top: 4px; color: var(--text2); font-size: 11px; }
.dashboard-event-transition { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.dashboard-event-status, .dashboard-event-origin { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; border: 1px solid var(--border); background: var(--surface); color: var(--text2); }
.dashboard-event-status.pending { color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 36%, var(--border)); }
.dashboard-event-status.in_progress { color: var(--primary-hover); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.dashboard-event-status.completed { color: var(--green); border-color: color-mix(in srgb, var(--green) 38%, var(--border)); }
.dashboard-event-status.blocked { color: var(--red); border-color: color-mix(in srgb, var(--red) 38%, var(--border)); }
.dashboard-event-status.stalled { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 38%, var(--border)); }
.dashboard-event-row.checklist { background: color-mix(in srgb, var(--green) 3%, transparent); }
.dashboard-event-status.checklist { color: var(--green); border-color: color-mix(in srgb, var(--green) 38%, var(--border)); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.dashboard-event-arrow { color: var(--text2); font-size: 11px; }
.dashboard-discussion-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-discussion-card { min-width: 0; padding: 16px; }
.dashboard-discussion-head { align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.dashboard-discussion-head > span { color: var(--text2); font-size: 11px; }
.dashboard-feed-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.dashboard-feed-scroll:hover, .dashboard-feed-scroll:focus { scrollbar-color: color-mix(in srgb, var(--text2) 45%, transparent) transparent; outline: none; }
.dashboard-feed-scroll::-webkit-scrollbar { width: 7px; }
.dashboard-feed-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.dashboard-feed-scroll:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text2) 38%, transparent); }
.dashboard-feed-scroll.hot { max-height: 280px; }
.dashboard-feed-scroll.latest { max-height: 380px; }
.dashboard-feed-scroll.long { max-height: 380px; }
.dashboard-hot-row, .dashboard-latest-row { appearance: none; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dashboard-hot-row:last-child, .dashboard-latest-row:last-child { border-bottom: 0; }
.dashboard-hot-row:hover, .dashboard-latest-row:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.dashboard-hot-row:focus-visible, .dashboard-latest-row:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: -2px; }
.dashboard-hot-row { height: 56px; display: flex; align-items: center; gap: 10px; padding: 7px 8px; }
.dashboard-hot-rank { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--surface); color: var(--text2); font-size: 11px; font-weight: 700; }
.dashboard-hot-rank.top { background: color-mix(in srgb, var(--orange) 14%, var(--surface)); color: var(--orange); }
.dashboard-hot-copy, .dashboard-latest-copy { min-width: 0; }
.dashboard-hot-copy strong, .dashboard-hot-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-hot-copy strong { font-size: 12px; }
.dashboard-hot-copy span { margin-top: 3px; color: var(--text2); font-size: 10px; }
.dashboard-latest-row { height: 76px; display: flex; align-items: flex-start; gap: 9px; padding: 9px 8px; }
.dashboard-long-add { border: 1px solid var(--primary); border-radius: 6px; padding: 4px 9px; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary-hover); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.dashboard-long-row { appearance: none; width: 100%; min-height: 58px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dashboard-long-row:last-child { border-bottom: 0; }
.dashboard-long-row:hover { background: color-mix(in srgb, var(--green) 7%, transparent); }
.dashboard-long-priority { width: 7px; height: 26px; border-radius: 2px; background: var(--yellow); }
.dashboard-long-priority.p1 { background: var(--red); }
.dashboard-long-priority.p3 { background: var(--green); }
.dashboard-long-copy { min-width: 0; }
.dashboard-long-copy strong, .dashboard-long-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-long-copy strong { font-size: 12px; }
.dashboard-long-copy span { margin-top: 4px; color: var(--text2); font-size: 10.5px; }
.dashboard-long-status { border-radius: 4px; padding: 3px 5px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-hover); font-size: 10px; white-space: nowrap; }
.dashboard-long-status.paused { background: color-mix(in srgb, var(--yellow) 12%, transparent); color: var(--yellow); }
.dashboard-long-status.completed { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.form-label { display: block; margin: 11px 0 5px; color: var(--text2); font-size: 11px; font-weight: 600; }
.btn-danger { border: 1px solid color-mix(in srgb, var(--red) 55%, var(--border)); border-radius: 6px; padding: 8px 14px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); cursor: pointer; }
.dashboard-discussion-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; }
.dashboard-discussion-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-latest-meta, .dashboard-latest-content, .dashboard-latest-task { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-latest-meta { color: var(--text2); font-size: 10px; }
.dashboard-latest-meta strong { color: var(--text); font-size: 11px; }
.dashboard-latest-content { margin-top: 4px; font-size: 12px; }
.dashboard-latest-task { margin-top: 4px; color: var(--primary-hover); font-size: 10px; }
.dashboard-feed-empty { display: flex; min-height: 96px; align-items: center; justify-content: center; color: var(--text2); font-size: 12px; }


.team-focus-board {
  background: linear-gradient(135deg, rgba(99,102,241,0.14) 0%, rgba(15,23,42,0.22) 60%, var(--surface2) 100%);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}
.team-focus-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-empty { font-size: 13px; color: var(--text2); line-height: 1.7; padding: 4px 0; }
.briefing-placeholder { background: rgba(15,23,42,0.2); border: 1px dashed rgba(255,255,255,0.12); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 12px; color: var(--text2); line-height: 1.7; }
.team-section { margin-top: 18px; }



/* ── Chat ── */
.msg.user .bubble { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); box-shadow: 0 2px 10px rgba(99,102,241,0.25); }
.chat-input-area { background: var(--surface); padding: 14px 20px; }
.chat-input-area input { border-radius: 10px; padding: 11px 14px; }
.chat-input-area button { border-radius: 10px; font-weight: 600; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); }
.btn-new-chat { border-radius: 8px; font-weight: 700; }
.session-item.active { color: var(--primary); }

/* ── Chatroom ── */
.chatroom-header { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chatroom-input-area input { border-radius: 10px; }
.chatroom-input-area button { border-radius: 10px; font-weight: 600; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); }
.chatroom-meeting-banner { border-radius: 14px; }
.cr-msg-avatar { box-shadow: 0 1px 4px rgba(0,0,0,0.25); }

/* ── Partner cards ── */
.partner-card { border-radius: 12px; border-left-width: 4px; transition: box-shadow 0.15s; }
.partner-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.shared-client-item { border-radius: 8px; }

/* ── Modals ── */
.modal { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,0.4); }
.modal h3 { font-size: 18px; font-weight: 700; }
.btn-submit { border-radius: 8px; font-weight: 600; transition: opacity 0.15s, transform 0.1s; }
.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-cancel { border-radius: 8px; border: 1px solid var(--border); transition: border-color 0.15s; }
.btn-cancel:hover { border-color: var(--text2); }

/* ── Stall Alert List Panel ── */
.stall-list-panel { max-width: 600px; width: 94vw; display: flex; flex-direction: column; max-height: 80vh; }
.stall-list-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.stall-list-header h3 { margin: 0; }
.stall-list-close { background: none; border: none; font-size: 24px; color: var(--text2); cursor: pointer; padding: 0 4px; line-height: 1; }
.stall-list-close:hover { color: var(--text); }
.stall-list-body { overflow-y: auto; flex: 1; min-height: 0; padding: 8px 0; }
.stall-list-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.stall-list-item:last-child { border-bottom: none; }
.stall-item-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stall-item-msg { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 8px; }
.stall-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stall-item-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font-size: 12px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.stall-item-btn:hover { background: var(--hover); border-color: var(--accent); }
.stall-item-btn .stall-icon { font-size: 14px; }
.stall-list-footer { padding-top: 12px; border-top: 1px solid var(--border); text-align: right; }
.stall-batch-btn { font-size: 13px; padding: 8px 20px; }
.stall-detail-hint { font-size: 13px; color: var(--text2); margin-bottom: 12px; line-height: 1.5; }
.collab-request-task { font-size: 12px; color: var(--text2); margin-bottom: 8px; }

/* ── Panel fade-in ── */
.panel.active { animation: phFadeIn 0.16s ease-out; }
@keyframes phFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ── Light theme (晴空) overrides ── */
[data-theme="light"] .ph { background: rgba(255,255,255,0.94); }
[data-theme="light"] .stat-card.primary { border-color: rgba(91,92,246,0.2); background: linear-gradient(145deg, rgba(91,92,246,0.08) 0%, #f5f7fb 100%); }
[data-theme="light"] .stat-card.green  { border-color: rgba(21,128,61,0.2);  background: linear-gradient(145deg, rgba(21,128,61,0.07) 0%, #f5f7fb 100%); }
[data-theme="light"] .stat-card.yellow { border-color: rgba(154,108,4,0.2); background: linear-gradient(145deg, rgba(154,108,4,0.07) 0%, #f5f7fb 100%); }
[data-theme="light"] .stat-card.red    { border-color: rgba(185,28,28,0.2); background: linear-gradient(145deg, rgba(185,28,28,0.07) 0%, #f5f7fb 100%); }
[data-theme="light"] .member-avatar { box-shadow: 0 0 0 2px rgba(91,92,246,0.22); }
[data-theme="light"] .bl-badge { background: rgba(91,92,246,0.1); border-color: rgba(91,92,246,0.2); }
[data-theme="light"] .msg.user .bubble { box-shadow: 0 2px 10px rgba(91,92,246,0.18); }
[data-theme="light"] .chat-input-area button { background: linear-gradient(135deg, #5b5cf6 0%, #4640dd 100%); }
[data-theme="light"] .chatroom-input-area button { background: linear-gradient(135deg, #5b5cf6 0%, #4640dd 100%); }

/* ── Warm theme (暖岩) overrides ── */
[data-theme="warm"] .stat-card.primary { border-color: rgba(224,154,56,0.25); background: linear-gradient(145deg, rgba(224,154,56,0.1) 0%, var(--surface2) 100%); }
[data-theme="warm"] .bl-badge { background: rgba(224,154,56,0.12); color: var(--primary); border-color: rgba(224,154,56,0.25); }
[data-theme="warm"] .member-avatar { box-shadow: 0 0 0 2px rgba(224,154,56,0.3); }
[data-theme="warm"] .progress-bar .fill { background: linear-gradient(90deg, #e09a38 0%, #5ca86b 100%); }
[data-theme="warm"] .msg.user .bubble { box-shadow: 0 2px 10px rgba(224,154,56,0.28); }
[data-theme="warm"] .chat-input-area button { background: linear-gradient(135deg, #e09a38 0%, #f0b55a 100%); }
[data-theme="warm"] .chatroom-input-area button { background: linear-gradient(135deg, #e09a38 0%, #f0b55a 100%); }
[data-theme="warm"] .node-card.in_progress { box-shadow: 0 0 0 1px rgba(224,154,56,0.15); }
