/* 工作台 Dashboard — 1920×1080 版式规格（仅工作台激活时生效） */

/* ── 一、Shell：侧边栏 + Header（仅 #dashboardView 激活时） ── */
body:has(#dashboardView.view.active) {
  --sidebar-width: 190px;
  --sidebar-nav-item-h: 48px;
  --sidebar-nav-gap: 12px;
  --vp-topbar-h: 64px;
}

body:has(#dashboardView.view.active).sidebar-collapsed {
  --app-sidebar-offset: var(--sidebar-rail);
}

body:has(#dashboardView.view.active).sidebar-collapsed .sidebar.is-collapsed {
  width: var(--sidebar-rail);
}

body:has(#dashboardView.view.active) .nav-item,
body:has(#dashboardView.view.active) .quick-link {
  min-height: 48px;
  gap: 12px;
}

body:has(#dashboardView.view.active) .nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 3px 0 0 #1677ff;
}

body:has(#dashboardView.view.active) .nav-item.active:hover {
  background: rgba(255, 255, 255, 0.14);
}

body:has(#dashboardView.view.active) .nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
}

body:has(#dashboardView.view.active) .topbar {
  min-height: 64px;
  max-height: 64px;
  padding: 0 22px;
  gap: 10px;
  border-bottom: 1px solid #eef2f6;
  box-shadow: none;
  background: #fff;
}

body:has(#dashboardView.view.active) .topbar-actions {
  --topbar-ctrl-h: 38px;
  --topbar-icon-size: 22px;
  gap: 9px;
}

body:has(#dashboardView.view.active) .search {
  width: 320px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #f9fbfd;
  box-shadow: none;
}

/* ── 二、主内容区基准 ── */
#dashboardView {
  --dash-bg: #f5f8fb;
  --dash-surface: #fff;
  --dash-border: #e5ecf3;
  --dash-border-soft: #e4eaf1;
  --dash-divider: #eef2f6;
  --dash-text: #172033;
  --dash-text-secondary: #1f2937;
  --dash-text-muted: #667085;
  --dash-text-soft: #7a8796;
  --dash-accent: #1677ff;
  --dash-accent-line: #1677ff;
  --dash-shadow: 0 4px 12px rgba(15, 35, 60, 0.04);
  --dash-gap: 12px;
  --dash-radius: 11px;
  --dash-radius-sm: 10px;
  background: var(--dash-bg) !important;
}

#dashboardView.view {
  padding: 16px 20px !important;
}

#dashboardView .xm-home-main {
  gap: var(--dash-gap) !important;
}

#dashboardView.view.active:has(.xm-role-panel[data-role-panel="employee"].active) {
  overflow-y: hidden;
  overflow-x: hidden;
}

#dashboardView.view.active:has(.xm-role-panel[data-role-panel="employee"].active) .xm-home {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#dashboardView.view.active:has(.xm-role-panel[data-role-panel="employee"].active) .xm-home-main {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* ── 三、顶部信息行 48–56px ── */
#dashboardView .xm-greeting {
  min-height: 48px;
  max-height: 56px;
  padding: 0;
  margin: 0;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#dashboardView .xm-greeting-copy h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--dash-text);
  letter-spacing: -0.01em;
}

#dashboardView .xm-greeting-date {
  margin: 2px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.3;
  color: var(--dash-text-soft) !important;
}

#dashboardView .xm-view-switcher {
  padding: 3px;
  gap: 4px;
  border: 1px solid var(--dash-border-soft);
  border-radius: 9px;
  background: var(--dash-surface);
  box-shadow: var(--dash-shadow);
}

#dashboardView .xm-view-switcher .xm-view-card {
  min-width: 108px;
  min-height: 34px;
  max-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

#dashboardView .xm-view-switcher .xm-view-card.active {
  border-color: #dce6f2;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(22, 119, 255, 0.08);
}

#dashboardView .xm-view-switcher .xm-view-card.active .xm-view-text b {
  color: var(--dash-accent);
  font-weight: 600;
}

#dashboardView .xm-view-switcher .xm-view-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: #f2f4f7;
  background-size: 14px;
  filter: none;
}

#dashboardView .xm-view-switcher .xm-view-icon.role-employee {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2'/%3E%3C/svg%3E");
}

#dashboardView .xm-view-switcher .xm-view-icon.role-manager {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75'/%3E%3C/svg%3E");
}

#dashboardView .xm-view-switcher .xm-view-icon.role-boss {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

#dashboardView .xm-view-switcher .xm-view-card.active .xm-view-icon {
  background-color: #eef5ff;
  filter: none;
}

#dashboardView .xm-view-switcher .xm-view-card.active .xm-view-icon.role-employee {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231677ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M6 21v-2a4 4 0 014-4h4a4 4 0 014 4v2'/%3E%3C/svg%3E");
}

#dashboardView .xm-view-switcher .xm-view-card.active .xm-view-icon.role-manager {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231677ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75'/%3E%3C/svg%3E");
}

#dashboardView .xm-view-switcher .xm-view-card.active .xm-view-icon.role-boss {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231677ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

#dashboardView .xm-view-switcher .xm-view-text b {
  font-size: 12px;
  font-weight: 600;
  color: var(--dash-text-secondary);
}

#dashboardView .xm-view-switcher .xm-view-text small {
  font-size: 10px;
  color: var(--dash-text-soft);
}

/* ── 四、AI 密谋士 96–112px ── */
#dashboardView .xm-command-center {
  position: relative;
  flex-shrink: 0;
  min-height: 96px;
  max-height: 112px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ddeaf3;
  border-radius: var(--dash-radius);
  background: linear-gradient(135deg, #f8fbff 0%, #fff 52%, #f6fffe 100%);
  box-shadow: 0 4px 14px rgba(15, 35, 60, 0.04);
}

#dashboardView .xm-command-center::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--dash-accent-line);
  border-radius: var(--dash-radius) 0 0 var(--dash-radius);
  pointer-events: none;
}

#dashboardView .xm-command-center-head {
  padding: 10px 16px 4px 15px;
  gap: 10px;
  align-items: center;
}

#dashboardView .xm-command-center-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#dashboardView .xm-command-kicker {
  padding: 1px 7px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 4px;
  background: #f0fdf9;
  color: #0f766e;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

#dashboardView .xm-command-center h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dash-text);
}

#dashboardView .xm-command-advisor-open,
#dashboardView .xm-command-toggle {
  min-height: 30px;
  max-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 30px;
}

#dashboardView .xm-command-advisor-open {
  border: 1px solid #dce6f2;
  background: #fff;
  color: var(--dash-accent);
}

#dashboardView .xm-command-collapsed-strip {
  padding: 0 16px 10px 15px;
}

#dashboardView .xm-command-strip-text {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--dash-text-muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dashboardView .xm-command-strip-text::before {
  display: none;
}

#dashboardView .xm-command-center.is-collapsed {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
}

/* ── 五、统计卡片 78–88px（以老板「完成率」为基准统一三角色 KPI） ── */
#dashboardView #bossMetrics article,
#dashboardView #managerMetrics article,
#dashboardView #employeeMetrics article,
#dashboardView .xm-employee-kpi-row > article {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 78px;
  max-height: 88px;
  padding: 12px 16px;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  background: var(--dash-surface);
  box-shadow: var(--dash-shadow);
  transition: border-color 0.14s ease;
}

#dashboardView #bossMetrics article:hover,
#dashboardView #managerMetrics article:hover,
#dashboardView #employeeMetrics article:hover,
#dashboardView .xm-employee-kpi-row > article:hover {
  border-color: #d0dbe8;
  transform: none;
  box-shadow: var(--dash-shadow);
}

#dashboardView #bossMetrics article > span.xm-metric-icon,
#dashboardView #managerMetrics article > span.xm-metric-icon,
#dashboardView #employeeMetrics article > span.xm-metric-icon,
#dashboardView .xm-employee-kpi-row > article > span.xm-metric-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background-color: transparent !important;
  background-size: 18px;
  background-position: center;
  border: none;
  box-shadow: none;
  opacity: 0.88;
}

#dashboardView #bossMetrics article > div,
#dashboardView #managerMetrics article > div,
#dashboardView #employeeMetrics article > div,
#dashboardView .xm-employee-kpi-row > article > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  gap: 3px;
}

#dashboardView #bossMetrics article > div > span.xm-metric-label,
#dashboardView #managerMetrics article > div > span.xm-metric-label,
#dashboardView #employeeMetrics article > div > span.xm-metric-label,
#dashboardView #bossMetrics article > div > span:not(.xm-metric-icon),
#dashboardView #managerMetrics article > div > span:not(.xm-metric-icon),
#dashboardView #employeeMetrics article > div > span:not(.xm-metric-icon),
#dashboardView .xm-employee-kpi-row > article > div > span.xm-metric-label,
#dashboardView .xm-employee-kpi-row > article > div > span:not(.xm-metric-icon) {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--dash-text-secondary, #465871);
}

#dashboardView #bossMetrics article > div > b,
#dashboardView #managerMetrics article > div > b,
#dashboardView #employeeMetrics article > div > b,
#dashboardView .xm-employee-kpi-row > article > div > b {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--dash-text, #0d0d0d);
}

#dashboardView #bossMetrics article > div > small,
#dashboardView #managerMetrics article > div > small,
#dashboardView #employeeMetrics article > div > small,
#dashboardView .xm-employee-kpi-row > article > div > small {
  font-size: 11px;
  line-height: 1.35;
  color: var(--dash-text-muted, #64748b);
}

#dashboardView .xm-employee-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  min-height: 78px;
  max-height: 88px;
  flex-shrink: 0;
}

#dashboardView .xm-employee-kpi-row,
#dashboardView #employeeMetrics {
  align-self: start;
  margin: 0;
}

/* ── 六、中部三列：KPI 固定高度，下方两行均分剩余空间（1080p 填满） ── */
#dashboardView .xm-employee-home {
  display: grid !important;
  grid-template-rows: minmax(78px, 88px) minmax(285px, 1fr) minmax(260px, 1fr) !important;
  gap: var(--dash-gap) !important;
  align-content: stretch;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#dashboardView .xm-employee-action-row {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: 100% !important;
  min-height: 285px !important;
  max-height: none !important;
  flex: unset !important;
  align-items: stretch;
}

#dashboardView .xm-employee-action-row > .priority-panel {
  grid-column: span 4;
}

#dashboardView .xm-employee-action-row > .xm-response-panel {
  grid-column: span 4;
}

#dashboardView .xm-employee-action-row > .xm-follow-projects-panel {
  grid-column: span 4;
}

#dashboardView .xm-employee-action-row > .xm-panel {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  background: var(--dash-surface);
  box-shadow: var(--dash-shadow);
  overflow: hidden;
}

#dashboardView .xm-employee-action-row > .xm-panel .xm-panel-title {
  flex-shrink: 0;
  min-height: 46px;
  max-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--dash-divider);
  background: var(--dash-surface);
}

#dashboardView .xm-employee-action-row > .xm-panel .xm-panel-title h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dash-text);
}

#dashboardView .xm-employee-action-row > .xm-panel .xm-panel-title h3 small {
  font-size: 12px;
  font-weight: 500;
  color: var(--dash-text-soft);
}

#dashboardView .xm-employee-action-row .dash-scroll-host,
#dashboardView .xm-employee-action-row .xm-priority-list,
#dashboardView .xm-employee-action-row .xm-list-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#dashboardView .xm-employee-action-row .dash-scroll-host > .empty-tip:only-child,
#dashboardView .xm-employee-action-row .xm-priority-list > .empty-tip:only-child,
#dashboardView .xm-employee-action-row .xm-list-body > .empty-tip:only-child {
  flex: 0 0 auto;
  min-height: 52px;
  max-height: 68px;
  margin: 10px 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #e4eaf1;
  border-radius: var(--dash-radius-sm);
  background: #f8fafc;
  color: var(--dash-text-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

#dashboardView .xm-priority-row,
#dashboardView .xm-response-row {
  min-height: 42px;
  max-height: 48px;
  padding: 8px 12px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--dash-divider);
  border-radius: 0;
}

#dashboardView .xm-priority-row:last-child,
#dashboardView .xm-response-row:last-child {
  border-bottom: none;
}

#dashboardView .xm-priority-row b,
#dashboardView .xm-response-row b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--dash-text-secondary);
}

#dashboardView .xm-priority-row small,
#dashboardView .xm-response-row small {
  font-size: 12px;
  line-height: 1.4;
  color: var(--dash-text-soft);
}

#dashboardView .xm-follow-projects .xm-project-row {
  min-height: 42px;
  max-height: 48px;
  padding: 7px 12px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--dash-divider);
  border-radius: 0;
}

#dashboardView .xm-follow-projects .xm-project-row:last-child {
  border-bottom: none;
}

#dashboardView .xm-follow-projects .xm-project-icon {
  width: 28px;
  height: 28px;
  font-size: 11px;
  box-shadow: none;
}

#dashboardView .xm-follow-projects .xm-project-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text-secondary);
}

#dashboardView .xm-follow-projects .xm-project-bar {
  height: 5px;
  border-radius: 999px;
  background: #edf1f5;
}

#dashboardView .xm-follow-projects .xm-project-bar i {
  background: #2d8c5e;
  border-radius: 999px;
}

#dashboardView .xm-follow-projects .xm-project-rate {
  font-size: 12px;
  font-weight: 600;
  color: var(--dash-text-muted);
}

#dashboardView .xm-risk-tag {
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 22px;
}

#dashboardView .xm-risk-tag.risk-0 { color: #067647; background: #ecfdf3; }
#dashboardView .xm-risk-tag.risk-1 { color: #b54708; background: #fffaeb; }
#dashboardView .xm-risk-tag.risk-2 { color: #c4320a; background: #fef3f2; }

#dashboardView .xm-link-btn {
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dash-accent);
  border-radius: 6px;
}

#dashboardView .xm-link-btn:hover {
  background: #f0f6ff;
}

/* ── 七、底部三列 260–300px（12 栅格 4+4+4） ── */
#dashboardView .xm-employee-insight-row {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: 100% !important;
  min-height: 260px !important;
  max-height: none !important;
  flex: unset !important;
}

#dashboardView .xm-employee-insight-row > .xm-efficiency-panel,
#dashboardView .xm-employee-insight-row > .xm-notice-panel,
#dashboardView .xm-employee-insight-row > .xm-team-panel {
  grid-column: span 4;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  background: var(--dash-surface);
  box-shadow: var(--dash-shadow);
  overflow: hidden;
}

#dashboardView .xm-employee-insight-row > .xm-panel .xm-panel-title {
  flex-shrink: 0;
  min-height: 46px;
  max-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--dash-divider);
  background: var(--dash-surface);
}

#dashboardView .xm-employee-insight-row > .xm-panel .xm-panel-title h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dash-text);
}

#dashboardView .xm-employee-insight-row > .xm-panel .xm-panel-title h3 small {
  font-size: 12px;
  color: var(--dash-text-soft);
}

/* 效率洞察 */
#dashboardView .xm-efficiency-panel #employeeEfficiency {
  flex-shrink: 0;
  padding: 8px 12px 6px;
}

#dashboardView .xm-efficiency-panel .xm-efficiency.xm-efficiency-insight {
  gap: 8px;
}

#dashboardView .xm-efficiency-panel .xm-efficiency.xm-efficiency-insight article {
  min-height: 42px;
  max-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--dash-divider);
  border-radius: 8px;
  background: #f8fafc;
}

#dashboardView .xm-efficiency-panel .xm-eff-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--dash-text-soft);
}

#dashboardView .xm-efficiency-panel .xm-eff-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-text);
}

#dashboardView .xm-chart-block-employee {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 12px 10px;
  padding: 6px 0 0;
  border-top: 1px solid var(--dash-divider);
  display: flex;
  align-items: stretch;
}

#dashboardView .xm-chart-block-employee .xm-chart-y-axis {
  height: 100%;
  max-height: 178px;
  margin-bottom: 16px;
  font-size: 10px;
  color: #c5cdd8;
}

#dashboardView .xm-chart-block-employee .xm-week-chart,
#dashboardView .xm-chart-block-employee .xm-week-chart svg {
  height: 100%;
  max-height: 178px;
  min-height: 120px;
}

#dashboardView .xm-chart-block-employee .xm-week-chart .line {
  stroke-width: 1.75;
}

#dashboardView .xm-chart-block-employee .xm-week-chart .dot {
  r: 3;
  stroke-width: 1.5;
}

#dashboardView .xm-chart-block-employee .xm-chart-axis {
  padding-top: 4px;
  font-size: 10px;
  color: var(--dash-text-soft);
}

/* 工作动态 */
#dashboardView #employeeNoticeCenter {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 232px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

#dashboardView .xm-activity-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 42px;
  max-height: none;
  padding: 9px 12px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--dash-divider);
  border-radius: 0;
}

#dashboardView .xm-activity-row:last-child {
  border-bottom: none;
}

#dashboardView .xm-activity-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#dashboardView .xm-activity-body b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--dash-text-secondary);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

#dashboardView .xm-activity-body small {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dash-text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#dashboardView .xm-activity-row time {
  align-self: start;
  padding-top: 1px;
  font-size: 12px;
  line-height: 1.35;
  color: #98a2b3;
  white-space: nowrap;
}

#dashboardView .xm-activity-row .xm-avatar {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

/* 团队动态空状态 */
#dashboardView #employeeTeamActivity {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#dashboardView .xm-employee-insight-row .dash-scroll-host > .empty-tip:only-child,
#dashboardView .xm-employee-insight-row .xm-list-body > .empty-tip:only-child {
  flex: 0 0 auto;
  min-height: 52px;
  max-height: 68px;
  margin: 10px 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #e4eaf1;
  border-radius: var(--dash-radius-sm);
  background: #f8fafc;
  color: var(--dash-text-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

#dashboardView .xm-role-panel[data-role-panel="employee"].active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
}

#dashboardView .xm-role-panel[data-role-panel="employee"].active .xm-employee-action-row > .xm-panel,
#dashboardView .xm-role-panel[data-role-panel="employee"].active .xm-employee-insight-row > .xm-panel {
  align-self: stretch;
}

/* ── 老板视图（基础 token，不影响管理视图规格） ── */
#dashboardView:has(.xm-role-panel[data-role-panel="boss"].active) .dash-board .dash-card {
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  box-shadow: var(--dash-shadow);
}

/* ══════════════════════════════════════════════════════════
   管理视图工作台 — 1920×1080 紧凑规格（仅 manager 激活）
   ══════════════════════════════════════════════════════════ */
#dashboardView.view.active:has(.xm-role-panel[data-role-panel="manager"].active) {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: auto;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-home,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-home-main {
  flex: none;
  min-height: auto;
  overflow: visible;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-home-main {
  display: flex;
  flex-direction: column;
  gap: var(--dash-gap);
  min-height: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-role-panel[data-role-panel="manager"].active {
  flex: none;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* AI 密谋士 — 与全局一致 96–112px */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-command-center {
  min-height: 96px;
  max-height: 112px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-command-center-head {
  padding: 10px 16px 4px 15px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-command-collapsed-strip {
  padding: 0 16px 10px 15px;
}

/* 视图切换 — 选中态浅蓝 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-view-switcher .xm-view-card[data-dashboard-role="manager"].active {
  border-color: #c8ddf5;
  background: #eef5ff;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .xm-view-switcher .xm-view-card[data-dashboard-role="manager"].active .xm-view-text b {
  color: var(--dash-accent);
}

/* dash-board — 自然高度 + 行最小高度（主滚动在 #dashboardView） */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board {
  flex: none;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: var(--dash-gap);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row {
  height: auto;
  min-height: 0;
  max-height: none;
  align-items: stretch;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row-split {
  min-height: 120px;
  max-height: 150px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row-split .dash-card {
  max-height: 150px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row-three:nth-child(3) {
  min-height: 260px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row-two {
  min-height: 180px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row-three:nth-child(5) {
  min-height: 240px;
  max-height: 300px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row-three:nth-child(5) .dash-card {
  max-height: 300px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-split {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-split .dash-card-wide {
  grid-column: span 8;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-split .dash-card-actions {
  grid-column: span 4;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-three {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-three > .dash-card {
  grid-column: span 4;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two > .dash-card {
  grid-column: span 6;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card {
  height: auto;
  min-height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dash-border-soft);
  border-radius: var(--dash-radius);
  background: var(--dash-surface);
  box-shadow: var(--dash-shadow);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card .xm-panel-title {
  flex-shrink: 0;
  min-height: 42px;
  max-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--dash-divider);
  background: var(--dash-surface);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card .xm-panel-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dash-text);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card .xm-panel-title .text-button {
  font-size: 12px;
  font-weight: 500;
  color: var(--dash-accent);
}

/* 默认不拦截滚轮；仅 JS 标记 is-scrollable 或下方列表区才内部滚动 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: auto;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card.is-scrollable .dash-card-body {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: #d4dce6 transparent;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card.is-scrollable .dash-card-body::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board .dash-card.is-scrollable .dash-card-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d4dce6;
}

/* 图表 / 空状态 / 风险条 — 永不独立滚动 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayChart {
  overflow: visible !important;
  max-height: none !important;
}

/* 仅审批/动态列表在内容超出时内部滚动 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  max-height: 256px;
  scrollbar-width: thin;
  scrollbar-color: #d4dce6 transparent;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMemberRank {
  overflow: visible;
  max-height: none;
}

/* 核心指标 — 6 列 78–88px（卡片排版见上方统一 KPI 规则） */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMetrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  height: auto;
  min-height: 78px;
  max-height: 88px;
  padding: 0;
  align-self: stretch;
}

/* 风险预警 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px 10px;
  align-content: start;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList .xm-risk-card {
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--dash-divider);
  border-radius: 8px;
  background: #f8fafc;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList .xm-risk-card b {
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList .xm-risk-card small {
  font-size: 12px;
  color: var(--dash-text-muted);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList .xm-risk-card .tag {
  justify-self: start;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerRiskList .empty-tip {
  grid-column: 1 / -1;
  min-height: 56px;
  max-height: none;
  margin: 0;
  padding: 14px 12px;
  border: 1px dashed #dce3ec;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--dash-text-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* 快捷操作 — 2×4 紧凑按钮 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-card-actions .xm-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(40px, 42px);
  gap: 8px;
  padding: 8px 10px 10px;
  align-content: center;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-card-actions .xm-action-grid button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 40px;
  max-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--dash-border-soft);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--dash-text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  place-items: unset;
  transition: border-color 0.14s ease, background 0.14s ease;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-card-actions .xm-action-grid button::before {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-size: 16px 16px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-card-actions .xm-action-grid button:hover {
  border-color: #b8d4f5;
  background: #fff;
}

/* 项目健康度 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .xm-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  max-height: none;
  padding: 8px 12px;
  border-top: 1px solid var(--dash-divider);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .xm-project-row:first-child {
  border-top: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .xm-project-row-head b {
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .xm-project-row-head small {
  font-size: 12px;
  color: var(--dash-text-muted);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .xm-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf2f7;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .xm-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #1677ff;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .tag {
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerProjectHealth .empty-tip {
  padding: 12px;
  font-size: 12px;
  color: var(--dash-text-muted);
  text-align: center;
}

/* 版本延期图表区 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut .stats-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 200px;
  height: auto;
  max-height: none;
  padding: 8px 12px 12px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut .stats-donut {
  width: 120px;
  height: 120px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut .stats-donut div {
  width: 78px;
  height: 78px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut .stats-donut strong {
  font-size: 18px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut .stats-donut small,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayDonut .stats-legend {
  font-size: 11px;
  color: var(--dash-text-muted);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayChart .stats-version-delay-chart {
  min-height: 220px;
  max-height: none;
  height: auto;
  padding: 8px 12px 10px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayChart .stats-version-delay-chart svg,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerVersionDelayChart .stats-version-delay-chart canvas {
  max-height: 240px;
}

/* 团队工作负载表格 — 不在 card 级滚动，仅 tbody 区域可滚 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .dash-card-body.xm-table {
  overflow: visible;
  max-height: none;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table tbody {
  display: block;
  max-height: 186px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  scrollbar-width: thin;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table thead,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table thead {
  width: calc(100% - 5px);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table table {
  width: 100%;
  font-size: 12px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table tbody::-webkit-scrollbar {
  width: 5px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table tbody::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d4dce6;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table thead th {
  padding: 8px 10px;
  height: 36px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dash-text-muted);
  border-bottom: 1px solid var(--dash-divider);
  background: #fafbfc;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table tbody td {
  padding: 6px 10px;
  height: 36px;
  vertical-align: middle;
  border-bottom: 1px solid var(--dash-divider);
  color: var(--dash-text-secondary);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table tbody tr:last-child td {
  border-bottom: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two .xm-table .tag {
  min-height: 20px;
  padding: 2px 8px;
  font-size: 11px;
}

/* 成员效率排行 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMemberRank .rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  max-height: none;
  padding: 8px 12px;
  border-top: 1px solid var(--dash-divider);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMemberRank .rank-row:first-child {
  border-top: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMemberRank .rank-row > span {
  min-width: 28px;
  font-size: 13px;
  font-weight: 700;
  color: #16a34a;
  text-align: right;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMemberRank .rank-row .tag {
  min-height: 20px;
  padding: 2px 8px;
  font-size: 11px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMemberRank .empty-tip {
  padding: 12px;
  font-size: 12px;
  color: var(--dash-text-muted);
  text-align: center;
}

/* 底部三列列表 */
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects .xm-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  max-height: none;
  padding: 10px 12px;
  border-top: 1px solid var(--dash-divider);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects .xm-list-row:first-child {
  border-top: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects .xm-list-row b {
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects .xm-list-row small {
  font-size: 12px;
  color: var(--dash-text-muted);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects .tag {
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList .approval-pending-row {
  min-height: 42px;
  max-height: none;
  padding: 10px 12px;
  margin: 0;
  border-top: 1px solid var(--dash-divider);
  border-radius: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList .approval-pending-row:first-child {
  border-top: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList .approval-pending-main b {
  font-size: 13px;
  font-weight: 600;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList .approval-pending-main small,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList .approval-pending-main time {
  font-size: 12px;
  color: var(--dash-text-muted);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList .command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  max-height: none;
  padding: 10px 12px;
  border-top: 1px solid var(--dash-divider);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList .command-row:first-child {
  border-top: 0;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList .command-row b {
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList .command-row small {
  font-size: 12px;
  color: var(--dash-text-muted);
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList .command-row time {
  font-size: 12px;
  color: #9aa5b5;
}

#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerFocusProjects .empty-tip,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerApprovalList .empty-tip,
#dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerActivityList .empty-tip {
  padding: 12px;
  font-size: 12px;
  color: var(--dash-text-muted);
  text-align: center;
}

@media (max-width: 980px) {
  #dashboardView .xm-employee-action-row,
  #dashboardView .xm-employee-insight-row {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
  }

  #dashboardView .xm-employee-action-row > .xm-panel,
  #dashboardView .xm-employee-insight-row > .xm-panel {
    grid-column: span 12 !important;
    max-height: none !important;
  }

  #dashboardView .xm-employee-home {
    grid-template-rows: auto auto auto !important;
  }

  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board {
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
  }

  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-board > .dash-row {
    height: auto;
    max-height: none;
  }

  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) #managerMetrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: auto;
    max-height: none;
  }

  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-split,
  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-three,
  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two {
    grid-template-columns: 1fr;
  }

  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-split .dash-card-wide,
  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-split .dash-card-actions,
  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-three > .dash-card,
  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-row-two > .dash-card {
    grid-column: span 1;
  }

  #dashboardView:has(.xm-role-panel[data-role-panel="manager"].active) .dash-card-actions .xm-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
