.dashboard-workspace,
.report-workspace {
  --workspace-font-base: 14px;
  --workspace-font-small: 12px;
  --workspace-control-height: 38px;
  --workspace-icon-button: 38px;
  --workspace-panel-padding: 18px;
  --workspace-card-padding: 14px;
  --workspace-gap: 14px;
  --workspace-radius: 16px;
}

.dashboard-workspace .main,
.report-workspace .main {
  min-width: 0;
  gap: var(--workspace-gap);
}

.dashboard-workspace .layout > *,
.report-workspace .layout > *,
.dashboard-workspace .grid-2 > *,
.report-workspace .grid-2 > *,
.dashboard-workspace .reports-grid > *,
.report-workspace .reports-grid > *,
.dashboard-workspace .dashboard-grid > *,
.report-workspace .dashboard-grid > *,
.dashboard-workspace .panel,
.report-workspace .panel {
  min-width: 0;
}

.dashboard-workspace .hero,
.report-workspace .hero {
  padding: 20px 22px;
  margin-bottom: 14px;
  border-radius: 18px;
}

.dashboard-workspace .hero h2,
.report-workspace .hero h2 {
  max-width: 980px;
  margin: 0 0 8px;
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.16;
  letter-spacing: 0;
}

.dashboard-workspace .hero p,
.report-workspace .hero p {
  max-width: 900px;
  margin: 0 0 11px;
  font-size: 14px;
  line-height: 1.4;
}

.dashboard-workspace .pill,
.dashboard-workspace .chip,
.dashboard-workspace .tag,
.dashboard-workspace .report-chip,
.report-workspace .pill,
.report-workspace .chip,
.report-workspace .tag,
.report-workspace .report-chip {
  min-height: 27px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
}

.dashboard-workspace .stats,
.dashboard-workspace .kpi-strip,
.dashboard-workspace .report-kpi-strip,
.dashboard-workspace .mini-stats,
.report-workspace .stats,
.report-workspace .kpi-strip,
.report-workspace .report-kpi-strip,
.report-workspace .mini-stats,
.portfolio-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 9px;
}

.dashboard-workspace .stat,
.dashboard-workspace .kpi-card,
.dashboard-workspace .mini-stat,
.report-workspace .stat,
.report-workspace .kpi-card,
.report-workspace .mini-stat,
.portfolio-summary-strip .summary-cell {
  min-height: 62px;
  max-height: 76px;
  padding: 10px 12px;
  border-radius: 14px;
}

.dashboard-workspace .stat::before,
.dashboard-workspace .kpi-card::before,
.dashboard-workspace .kpi-card::after,
.report-workspace .stat::before,
.report-workspace .kpi-card::before,
.report-workspace .kpi-card::after {
  display: none;
}

.dashboard-workspace .stat .label,
.dashboard-workspace .kpi-label,
.dashboard-workspace .mini-stat .label,
.report-workspace .stat .label,
.report-workspace .kpi-label,
.report-workspace .mini-stat .label {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: 0;
}

.dashboard-workspace .stat .value,
.dashboard-workspace .kpi-value,
.dashboard-workspace .mini-stat .value,
.report-workspace .stat .value,
.report-workspace .kpi-value,
.report-workspace .mini-stat .value {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1;
}

.dashboard-workspace .stat .delta,
.dashboard-workspace .kpi-sub,
.dashboard-workspace .mini-stat .delta,
.report-workspace .stat .delta,
.report-workspace .kpi-sub,
.report-workspace .mini-stat .delta {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
  line-height: 1.2;
}

.portfolio-distribution {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line, var(--report-border, #dfe8f4));
  border-radius: 14px;
  background: #fff;
}

.portfolio-distribution-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.portfolio-distribution-title {
  font-size: 12px;
  font-weight: 800;
}

.portfolio-distribution-reset,
.portfolio-segment {
  border: 1px solid var(--line, var(--report-border, #dfe8f4));
  border-radius: 999px;
  background: #fff;
  color: inherit;
  min-height: 28px;
  padding: 4px 9px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.portfolio-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2f7;
}

.portfolio-bar button {
  min-width: 10px;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.portfolio-bar button:focus-visible,
.portfolio-segment:focus-visible,
.icon-action:focus-visible {
  outline: 3px solid rgba(36,87,214,.26);
  outline-offset: 2px;
}

.portfolio-segment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.portfolio-segment[aria-pressed="true"] {
  border-color: var(--primary, #2457d6);
  background: #eef4ff;
  color: var(--primary, #2457d6);
}

.portfolio-segment-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 5px;
}

.portfolio-low { background: #c73b3b; }
.portfolio-mid { background: #c78a00; }
.portfolio-high { background: #2457d6; }
.portfolio-complete { background: #0c8f5b; }

.dashboard-workspace .panel,
.report-workspace .panel,
.report-workspace .report-card,
.dashboard-workspace .report-card {
  padding: var(--workspace-panel-padding);
  border-radius: var(--workspace-radius);
}

.dashboard-workspace .chart-card,
.report-workspace .chart-card {
  height: clamp(220px, 28vh, 300px);
  max-width: 100%;
  overflow: hidden;
}

.dashboard-workspace canvas,
.report-workspace canvas,
.dashboard-workspace svg,
.report-workspace svg {
  max-width: 100%;
}

.dashboard-workspace .projects,
.dashboard-workspace .scroll-panel,
.dashboard-workspace .risk-list,
.dashboard-workspace .activity-list,
.dashboard-workspace .portfolio-list,
.report-workspace .projects,
.report-workspace .scroll-panel,
.report-workspace .risk-list,
.report-workspace .activity-list,
.report-workspace .portfolio-list,
.report-workspace .report-grid {
  max-height: min(62vh, 680px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
}

.dashboard-workspace .project-register-card,
.dashboard-workspace .project,
.dashboard-workspace .project-registry-card,
.report-workspace .project-register-card,
.report-workspace .project,
.report-workspace .risk-card,
.report-workspace .watch-card,
.report-workspace .report-item-card {
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 16px;
}

.dashboard-workspace .project-register-title,
.dashboard-workspace .project-title,
.dashboard-workspace .project-registry-card h3,
.report-workspace .project-register-title,
.report-workspace .project-title,
.report-workspace .risk-card h4,
.report-workspace .watch-card h4,
.report-workspace .report-item-title {
  font-size: 17px;
  line-height: 1.25;
}

.dashboard-workspace .project-register-card .project-register-title,
.report-workspace .project-register-card .project-register-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.22;
}

.dashboard-workspace .project-register-card .project-register-actions,
.report-workspace .project-register-card .project-register-actions {
  max-width: 320px;
}

.dashboard-workspace .project-register-card .project-register-actions .btn-primary,
.dashboard-workspace .project-register-card .project-register-actions .btn-light,
.dashboard-workspace .project-register-card .project-register-actions .btn-ghost,
.report-workspace .project-register-card .project-register-actions .btn-primary,
.report-workspace .project-register-card .project-register-actions .btn-light,
.report-workspace .project-register-card .project-register-actions .btn-ghost {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.dashboard-workspace .project-register-card .project-register-body,
.report-workspace .project-register-card .project-register-body {
  grid-template-columns: minmax(200px, 240px) minmax(260px, 1fr);
  gap: 12px;
}

.dashboard-workspace .project-register-card .project-card-stat-grid,
.report-workspace .project-register-card .project-card-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 7px;
}

.dashboard-workspace .project-register-card .project-card-stat,
.report-workspace .project-register-card .project-card-stat {
  min-height: 50px;
  padding: 7px 8px;
  border-radius: 10px;
}

.dashboard-workspace .project-register-card .project-card-stat .label,
.report-workspace .project-register-card .project-card-stat .label {
  font-size: 9px;
  letter-spacing: .04em;
}

.dashboard-workspace .project-register-card .project-card-stat strong,
.report-workspace .project-register-card .project-card-stat strong {
  font-size: 13px;
  line-height: 1.22;
  word-break: normal;
  overflow-wrap: anywhere;
}

.dashboard-workspace .project-desc,
.dashboard-workspace .project-register-desc,
.dashboard-workspace .project-registry-card p,
.report-workspace .project-desc,
.report-workspace .project-register-desc,
.report-workspace .report-item-sub {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.38;
}

.dashboard-workspace .project-progress-band,
.report-workspace .project-progress-band {
  margin: 8px 0 10px;
  gap: 10px;
}

.dashboard-workspace .project-summary-side,
.report-workspace .project-summary-side {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 12px;
}

.dashboard-workspace .project-summary-side .score,
.report-workspace .project-summary-side .score {
  font-size: 22px;
}

.operational-insight-strip,
.dashboard-workspace .insight-list,
.report-workspace .insight-list {
  display: grid;
  gap: 8px;
}

.dashboard-workspace .insight,
.report-workspace .insight,
.operational-insight {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 13px;
}

.dashboard-workspace .insight strong,
.report-workspace .insight strong,
.operational-insight strong {
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-workspace .insight .small,
.report-workspace .insight .small,
.operational-insight-detail {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-workspace .insight.is-expanded .small,
.report-workspace .insight.is-expanded .small,
.operational-insight.is-expanded .operational-insight-detail {
  display: block;
}

.dashboard-workspace .report-commandbar,
.report-workspace .report-commandbar {
  padding: 12px 14px;
  gap: 10px;
  border-radius: 16px;
}

.dashboard-workspace .report-command-actions,
.report-workspace .report-command-actions,
.dashboard-workspace .project-actions,
.report-workspace .project-actions,
.dashboard-workspace .project-register-actions,
.report-workspace .project-register-actions,
.dashboard-workspace .report-actions,
.report-workspace .report-actions {
  gap: 7px;
}

.icon-action,
.dashboard-workspace .btn-icon,
.report-workspace .btn-icon {
  position: relative;
  width: var(--workspace-icon-button);
  min-width: var(--workspace-icon-button);
  height: var(--workspace-icon-button);
  min-height: var(--workspace-icon-button);
  padding: 0;
  border: 1px solid var(--line, var(--report-border, #dfe8f4));
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: var(--primary, var(--report-blue, #2457d6));
  cursor: pointer;
}

.icon-action[disabled],
.dashboard-workspace .btn-icon[disabled],
.report-workspace .btn-icon[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.action-tooltip {
  position: fixed;
  z-index: 9000;
  max-width: min(260px, calc(100vw - 24px));
  padding: 6px 8px;
  border-radius: 8px;
  background: #10213a;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(16,33,58,.2);
}

.dashboard-workspace .btn-primary,
.dashboard-workspace .btn-light,
.dashboard-workspace .btn-ghost,
.report-workspace .btn-primary,
.report-workspace .btn-light,
.report-workspace .btn-ghost {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .dashboard-workspace .stats,
  .dashboard-workspace .kpi-strip,
  .dashboard-workspace .report-kpi-strip,
  .dashboard-workspace .mini-stats,
  .report-workspace .stats,
  .report-workspace .kpi-strip,
  .report-workspace .report-kpi-strip,
  .report-workspace .mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .dashboard-workspace .stats,
  .dashboard-workspace .kpi-strip,
  .dashboard-workspace .report-kpi-strip,
  .dashboard-workspace .mini-stats,
  .report-workspace .stats,
  .report-workspace .kpi-strip,
  .report-workspace .report-kpi-strip,
  .report-workspace .mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-workspace .hero,
  .report-workspace .hero {
    padding: 18px;
  }

  .dashboard-workspace .hero h2,
  .report-workspace .hero h2 {
    font-size: 24px;
  }
}
