/* Parity with CRM/Default.aspx inline dashboard styles */

.content-wrapper {
  background-color: #ecf0f5;
}

.content-wrapper > .content-header:empty,
.content-wrapper > .content-header[style*="display: none"] {
  display: none !important;
}

.dashboard-top-switch {
  display: inline-flex;
  align-items: flex-end;
  background: transparent;
  padding: 0;
  margin-bottom: 14px;
}

.dashboard-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-top-bar .dashboard-top-switch {
  margin-bottom: 0;
}

#homeDashboardModuleTabs .btn,
.dashboard-top-switch .btn {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #d9dde3 !important;
  background: transparent !important;
  color: #222 !important;
  padding: 8px 14px 6px !important;
  margin: 0 4px 0 0;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  min-width: 0 !important;
}

#homeDashboardModuleTabs .btn.active,
.dashboard-top-switch .btn.active {
  background: transparent !important;
  color: #2388cf !important;
  border-bottom: 3px solid #2388cf !important;
}

.dashboard-top-switch .btn:hover {
  background: transparent !important;
  color: #222 !important;
}

.dashboard-top-switch .btn.active:hover {
  color: #2388cf !important;
  border-bottom: 3px solid #2388cf !important;
}

#projectsTopFiltersInline {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-top: 0 !important;
}

#projectsTopFiltersInline.dashboard-project-filters {
  margin-top: 0 !important;
}

#projectsTopFiltersInline .btn-group {
  display: inline-flex;
  flex-wrap: nowrap;
}

#projectsScopeSwitcher {
  background: #f7f8fa;
  border: 1px solid #d7dce2;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  isolation: isolate;
}

#projectsScopeSwitcher .btn {
  border: 0 !important;
  background: transparent !important;
  color: #6f7b86 !important;
  border-radius: 999px !important;
  min-width: 54px;
  padding: 4px 10px;
  line-height: 1.2;
  box-shadow: none !important;
  font-weight: 600;
}

#projectsScopeSwitcher .btn:hover {
  background: #eef2f6 !important;
  color: #4f5d6a !important;
}

#projectsTopFiltersInline #projectsPeriodFilter,
#projectsTopFiltersInline #projectsMonthFilter {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  height: 30px;
  border-radius: 0;
  border-color: #d7dce2;
  background: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

#projectsTopFiltersInline #projectsScopeSwitcher + #projectsPeriodFilter {
  margin-inline-start: 4px;
}

#projectsTopFiltersInline #projectsMonthFilter {
  min-width: 130px;
  width: 130px;
}

.dashboard-status-grid .small-box .inner p {
  margin-bottom: 0;
  font-size: 15px;
}

.dashboard-status-grid .small-box.dashboard-status-18 {
  background-color: #dd4b39 !important;
  color: #fff !important;
}

.dashboard-status-grid .small-box .icon {
  font-size: 50px;
  top: 8px;
  left: 8px;
}

.dashboard-status-grid .small-box-footer {
  display: none;
}

.dashboard-status-grid .dashboard-status-item .small-box {
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.dashboard-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-select {
  min-width: 96px;
  max-width: 130px;
}

.dashboard-chart-wrap {
  position: relative;
  height: 320px;
  min-height: 320px;
}

.dashboard-chart-canvas-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.dashboard-chart-canvas-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.dashboard-workload-chart-host {
  min-height: 300px;
}

#homeDashboardRoot,
#homeDashboardRoot > .row,
#leadsDashboardSection,
#projectsDashboardSection {
  width: 100%;
  max-width: none;
}

#projectsDashboardSection .projects-dashboard-widgets-row > .box,
#leadsDashboardSection .leads-dashboard-widgets-row > .box {
  width: 100%;
}

/* Fixed widget heights — legacy: box ≈460px, slimScroll body 385px (dashboard.leads.js / dashboard.home.js) */
#leadsDashboardSection {
  --ld-dashboard-widget-box-height: 460px;
  --ld-dashboard-widget-scroll-height: 385px;
}

#leadsDashboardSection .leads-dashboard-widgets-row > [class*="col-"] > .box {
  height: var(--ld-dashboard-widget-box-height);
  min-height: var(--ld-dashboard-widget-box-height);
  max-height: var(--ld-dashboard-widget-box-height);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#leadsDashboardSection .leads-dashboard-widgets-row .box > .box-header.with-border {
  flex: 0 0 auto;
}

#leadsDashboardSection .leads-dashboard-widgets-row .box > .box-body.slim-scroll {
  flex: 0 0 auto;
  height: var(--ld-dashboard-widget-scroll-height);
  min-height: var(--ld-dashboard-widget-scroll-height);
  max-height: var(--ld-dashboard-widget-scroll-height);
  overflow: hidden;
  box-sizing: border-box;
}

#leadsDashboardSection .leads-dashboard-widgets-row .box > .box-body.slim-scroll .slimScrollDiv {
  overflow: hidden !important;
}

#projectsScopeSwitcher .btn.active {
  background: #2f8fd6 !important;
  color: #fff !important;
  border-color: transparent !important;
}

#projectsTopFiltersInline #projectsMonthFilter:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Projects stat cards — equal-width single row (Default.aspx project-dashboard-status-grid) */
#projectsDashboardSection .project-dashboard-status-grid.row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

#projectsDashboardSection .project-dashboard-status-grid > .dashboard-status-item {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  flex: 1 1 0;
  min-width: 0;
}

@media (min-width: 1200px) {
  #projectsDashboardSection .project-dashboard-status-grid.row {
    flex-wrap: nowrap;
  }

  #projectsDashboardSection .project-dashboard-status-grid .small-box .inner p {
    white-space: nowrap;
  }
}

@media (max-width: 1199px) {
  #projectsDashboardSection .project-dashboard-status-grid > .dashboard-status-item {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    margin-bottom: 20px;
  }

  #projectsDashboardSection .project-dashboard-status-grid > .dashboard-status-item > .small-box {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    margin-bottom: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 767px) {
  #projectsDashboardSection .project-dashboard-status-grid > .dashboard-status-item {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

#projectsDashboardSection .dashboard-status-grid .small-box {
  cursor: pointer;
}

#projectsDashboardSection .project-dashboard-status-grid .small-box .inner h3 {
  font-variant-numeric: tabular-nums;
}

/* Pie / doughnut boxes */
#projectsDashboardSection .projects-dashboard-widgets-row .projects-dashboard-status-pie-box {
  display: flex;
  flex-direction: column;
}

#projectsDashboardSection .projects-dashboard-widgets-row .projects-dashboard-status-pie-box .box-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#projectsDashboardSection .projects-dashboard-widgets-row .projects-dashboard-status-pie-box .dashboard-chart-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  position: relative;
}

#projectsDashboardSection .projects-dashboard-widgets-row .projects-dashboard-status-pie-box .dashboard-chart-wrap canvas {
  height: 100% !important;
  min-height: 260px;
}

#leadsDashboardSection .leads-dashboard-widgets-row .leads-dashboard-status-pie-box {
  display: flex;
  flex-direction: column;
}

#leadsDashboardSection .leads-dashboard-widgets-row .leads-dashboard-status-pie-box .box-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#leadsDashboardSection .leads-dashboard-widgets-row .leads-dashboard-status-pie-box .dashboard-filters {
  flex: 0 0 auto;
}

#leadsDashboardSection .leads-dashboard-widgets-row .leads-dashboard-status-pie-box .dashboard-chart-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  position: relative;
}

#leadsDashboardSection .leads-dashboard-widgets-row .leads-dashboard-status-pie-box .dashboard-chart-wrap .dashboard-chart-canvas-host {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
}

#leadsDashboardSection .leads-dashboard-widgets-row .leads-dashboard-status-pie-box .dashboard-chart-wrap canvas {
  height: 100% !important;
  min-height: 0 !important;
}

#leadsDashboardSection .row.leads-dashboard-widgets-row .dashboard-filters {
  margin-bottom: 10px;
}

#projectsDashboardSection .projects-dashboard-widgets-row > .col-md-8 {
  min-width: 0;
}

#projectsDashboardSection .projects-dashboard-widgets-row .box > .box-header.with-border > .fa,
#leadsDashboardSection .leads-dashboard-widgets-row .box > .box-header.with-border > .fa {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-inline-end: 10px !important;
  vertical-align: middle;
}

.project-dashboard-table th,
.project-dashboard-table td {
  vertical-align: middle !important;
}

#projectsDashboardSection table.project-dashboard-table {
  table-layout: fixed !important;
  width: 100% !important;
}

#projectsDashboardSection table.project-dashboard-table thead th {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#projectsDashboardSection table.project-dashboard-table,
#projectsDashboardSection table.project-dashboard-table thead th,
#projectsDashboardSection table.project-dashboard-table tbody td {
  background-color: #fff !important;
}

#projectsDashboardSection [data-project-dashboard-updates].project-dashboard-latest-updates,
#projectsDashboardSection [data-project-dashboard-updates].project-dashboard-latest-updates li {
  list-style: none;
  margin: 0;
  padding: 0;
}

#projectsDashboardSection [data-project-dashboard-updates].project-dashboard-latest-updates {
  margin: -10px;
}

#projectsDashboardSection [data-project-dashboard-updates].project-dashboard-latest-updates .img-wrap {
  width: 40px;
  height: 40px;
  float: right;
  position: relative;
}

#projectsDashboardSection [data-project-dashboard-updates].project-dashboard-latest-updates img {
  width: 40px;
  height: 40px;
}

#projectsDashboardSection [data-project-dashboard-updates].project-dashboard-latest-updates li:last-child > div {
  border-bottom: none;
}

[data-project-dashboard-updates] li.project-dashboard-update-row {
  cursor: pointer;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-content {
  flex: 1;
  margin-right: 10px;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-date {
  margin-right: 10px;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-list-item {
  padding: 15px;
  display: flex;
  align-items: flex-start;
  color: #444;
  border-bottom: 1px solid #f4f4f4;
  cursor: pointer;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-list-item:hover {
  background-color: #f4f4f4;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-header {
  margin-bottom: 9px;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-list-item .img-wrap > :not(img) {
  display: none;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-details .post-content {
  font-size: 13px;
  line-height: 1.45;
  color: #555;
  margin-top: 4px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-details .post-content p {
  margin: 0 0 6px;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-details .post-content p:last-child {
  margin-bottom: 0;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-details .post-content img {
  max-width: 100%;
  height: auto;
}

#projectsDashboardSection [data-project-dashboard-updates] .update-details .post-content ul,
#projectsDashboardSection [data-project-dashboard-updates] .update-details .post-content ol {
  margin: 0 0 6px;
  padding-inline-start: 1.25em;
}

#projectsDashboardSection .project-dashboard-update-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  unicode-bidi: isolate;
  text-align: right;
  font-size: 12px;
  line-height: 1.35;
  color: #888;
  margin: 2px 0 6px;
  word-break: break-word;
}

#projectsDashboardSection .project-dashboard-update-breadcrumb .project-dashboard-bc-text {
  display: inline-flex;
  align-items: center;
}

#projectsDashboardSection .project-dashboard-update-breadcrumb .project-dashboard-bc-text > bdi {
  unicode-bidi: isolate;
}

#projectsDashboardSection .project-dashboard-update-breadcrumb .project-dashboard-bc-sep {
  color: #bbb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 8px;
  line-height: 1;
}

#projectsDashboardSection .project-dashboard-update-breadcrumb .project-dashboard-bc-sep i {
  font-size: 12px !important;
  line-height: 1;
  position: static;
}

.dashboard-chart-empty-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #999;
  font-size: 14px;
}

#projectsDashboardSection .workload-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0 4px;
  direction: ltr;
}

#projectsDashboardSection .workload-axis-label {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #777;
  max-width: 46%;
}

#projectsDashboardSection .workload-axis-label--tasks {
  text-align: left;
}

#projectsDashboardSection .workload-axis-label--hours {
  text-align: right;
  color: #3498db;
}

#projectsDashboardSection .projects-dashboard-tasks-col .box-success > .box-header.with-border .box-tools.pull-right .btn-group > a {
  color: inherit;
  text-decoration: none;
}

#projectsDashboardSection .projects-dashboard-tasks-col .box-success > .box-header.with-border .box-tools.pull-right .btn-group > a:hover,
#projectsDashboardSection .projects-dashboard-tasks-col .box-success > .box-header.with-border .box-tools.pull-right .btn-group > a:focus {
  color: inherit;
  text-decoration: underline;
  opacity: 0.92;
}

#projectsDashboardSection .project-risk-progress {
  min-width: 72px;
}

#projectsDashboardSection .project-risk-progress .progress {
  margin-bottom: 4px;
  height: 10px;
}

#projectsDashboardSection .project-risk-progress .progress-bar {
  line-height: 10px;
  font-size: 9px;
}

/* Fixed widget heights — legacy: box ≈460px, slimScroll body 385px (dashboard.home.js) */
#projectsDashboardSection {
  --pd-dashboard-widget-box-height: 460px;
  --pd-dashboard-widget-scroll-height: 385px;
}

#projectsDashboardSection .projects-dashboard-widgets-row > [class*="col-"] > .box {
  height: var(--pd-dashboard-widget-box-height);
  min-height: var(--pd-dashboard-widget-box-height);
  max-height: var(--pd-dashboard-widget-box-height);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* עומס עובדים — full-width chart row; natural height by content (not 460px grid widgets) */
#projectsDashboardSection .projects-dashboard-workload-row > [class*="col-"] > .box {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#projectsDashboardSection .projects-dashboard-workload-row {
  margin-top: 0;
}

#projectsDashboardSection .projects-dashboard-widgets-row .box > .box-header.with-border {
  flex: 0 0 auto;
}

#projectsDashboardSection .projects-dashboard-widgets-row .box > .box-body.slim-scroll {
  flex: 0 0 auto;
  height: var(--pd-dashboard-widget-scroll-height);
  min-height: var(--pd-dashboard-widget-scroll-height);
  max-height: var(--pd-dashboard-widget-scroll-height);
  overflow: hidden;
  box-sizing: border-box;
}

/* slimScroll wrapper — no native scrollbar on the body */
#projectsDashboardSection .projects-dashboard-widgets-row .box > .box-body.slim-scroll .slimScrollDiv {
  overflow: hidden !important;
}

/* Chart boxes (pie) — flex body fills remainder inside fixed 460px box */
#projectsDashboardSection .projects-dashboard-widgets-row .projects-dashboard-status-pie-box > .box-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Equal-height widget rows — parity with Default.aspx */
#projectsDashboardSection .projects-dashboard-tasks-col > .box,
#projectDashboardRiskBox > .box {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#projectsDashboardSection .projects-dashboard-tasks-col > .box > .box-body.project-dashboard-box-scroll,
#projectDashboardRiskBox > .box > .box-body.project-dashboard-box-scroll {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: var(--pd-dashboard-widget-scroll-height);
  max-height: var(--pd-dashboard-widget-scroll-height);
  padding-inline: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#projectsDashboardSection #projectDashboardWorkloadBox > .box > .box-body {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#projectsDashboardSection #projectDashboardWorkloadBox .workload-chart-header {
  flex: 0 0 auto;
  margin-top: 12px;
  margin-bottom: 14px;
}

#projectsDashboardSection #projectDashboardWorkloadBox #projectDashboardWorkloadRows {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#projectsDashboardSection #projectDashboardWorkloadBox .workload-widget {
  width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#projectsDashboardSection #projectDashboardWorkloadBox .workload-chart-wrap {
  width: 100%;
  height: 300px;
  max-height: 100%;
  flex: 0 0 auto;
}

#projectsDashboardSection #projectDashboardWorkloadBox .workload-chart-wrap > canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#projectsDashboardSection .projects-dashboard-tasks-col .pd-box-scroll-viewport,
#projectDashboardRiskBox .pd-box-scroll-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#projectsDashboardSection .projects-dashboard-tasks-col .pd-box-scroll-viewport::-webkit-scrollbar,
#projectDashboardRiskBox .pd-box-scroll-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#projectsDashboardSection .projects-dashboard-tasks-col .project-dashboard-box-scroll #projectDashboardTasksTable.project-dashboard-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0;
  box-sizing: border-box;
}

#projectDashboardRiskBox .project-dashboard-box-scroll #projectDashboardRiskTable.project-dashboard-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0;
  box-sizing: border-box;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td {
  min-width: 0;
}

#projectsDashboardSection #projectDashboardRiskTable thead th[data-col="projectName"],
#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  width: clamp(200px, 30vw, 350px) !important;
  min-width: 200px !important;
  max-width: 350px !important;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-name-cell {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-name-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: #000 !important;
  text-decoration: none;
  font-weight: normal;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-name-link > bdi {
  font-weight: inherit;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-name-link:hover,
#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-name-link:focus {
  color: #000 !important;
  text-decoration: underline;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-problem-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: none;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #666;
  box-sizing: border-box;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-problem-block .risk-project-problem-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.5px;
  align-items: start;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-problem-block .risk-project-problem-line .risk-project-problem-icon {
  flex-shrink: 0;
  align-self: center;
  width: 1em;
  margin-right: 0 !important;
  text-align: center;
  font-size: 7px;
  line-height: 1;
  color: #bbb;
}

#projectsDashboardSection #projectDashboardRiskTable tbody td[data-col="projectName"] .risk-project-problem-block .risk-project-problem-line .risk-project-problem-text {
  min-width: 0;
  max-width: none;
  line-height: 1.35;
  overflow: visible;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

#projectsDashboardSection #projectDashboardRiskTable.project-risk-table td.status-cell,
#projectsDashboardSection #projectDashboardRiskTable.project-risk-table td.status-cell .label {
  cursor: auto !important;
}

#projectsDashboardSection .box.box-danger > .box-body.no-padding {
  overflow: hidden !important;
}

/* Status pills in dashboard tasks table — same 70px capsule as projects.css */
#projectsDashboardSection #projectDashboardTasksTable td.task-status-cell .label,
#projectsDashboardSection #projectDashboardTasksTable td[data-col="status"] .label,
#projectsDashboardSection #projectDashboardRiskTable td.task-status-cell .label,
#projectsDashboardSection #projectDashboardRiskTable td.status-cell .label,
#projectsDashboardSection #projectDashboardRiskTable td[data-col="status"] .label {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  display: inline-block !important;
  text-align: center !important;
  border-radius: 999px !important;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1;
  padding: 0.2em 0.6em 0.3em !important;
  box-sizing: border-box;
}

/* Leads dashboard — agent filters (parity with Default.aspx) */
.dashboard-agent-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  position: relative;
}

.dashboard-agent-filters .dashboard-agent {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.dashboard-agent-filters .user-avatar-circle {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.dashboard-agent-filters .agent-more-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #3c8dbc;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
}

.dashboard-agent-picker {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 120;
  min-width: 240px;
  background: #fff;
  border: 1px solid #d7dce2;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dashboard-agent-picker .agent-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
}

.dashboard-agent-picker .agent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
  line-height: 1;
}

.dashboard-agent-picker .agent-check {
  margin: 0;
  flex-shrink: 0;
  align-self: center;
}

.dashboard-agent-picker .agent-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* Default.aspx — empty tasks widget */
.dashboard-empty-state {
  padding: 80px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #7f8c8d;
  border-radius: 6px;
  overflow: hidden;
}

.dashboard-empty-state .empty-icon {
  font-size: 84px;
  color: #95a5a6;
  opacity: 0.12;
  pointer-events: none;
}

.dashboard-empty-state .empty-text {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 600;
  color: #5f6c72;
}

#leadsDashboardSection .latest-updates,
#leadsDashboardSection .latest-updates li,
#leadsDashboardSection .tasks-list,
#leadsDashboardSection .tasks-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

#leadsDashboardSection .latest-updates {
  margin: -10px;
}

#leadsDashboardSection .latest-updates .post-content {
  font-size: 13px;
  line-height: 1.45;
  color: #555;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Default.aspx — 5 cards per row via float:right + legacy DOM order */
#leadsDashboardSection .dashboard-status-grid.row {
  display: block;
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: 0;
}

#leadsDashboardSection .dashboard-status-grid.row::after {
  content: '';
  display: table;
  clear: both;
}

#leadsDashboardSection .dashboard-status-grid .dashboard-status-item {
  width: 20%;
  float: right;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

#leadsDashboardSection .dashboard-status-grid .dashboard-status-item .small-box {
  margin-bottom: 20px;
}

@media (max-width: 991px) {
  #leadsDashboardSection .dashboard-status-grid .dashboard-status-item {
    width: 33.3333%;
  }
}

@media (max-width: 767px) {
  #leadsDashboardSection .dashboard-status-grid .dashboard-status-item {
    width: 50%;
  }
}
