.dashboard-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-page-title {
  margin: 0 0 6px;
  color: var(--crm-brand-navy);
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-page-breadcrumb {
  margin: 0;
  color: #667085;
  font-size: 0.88rem;
}

.dashboard-page-breadcrumb .breadcrumb-link {
  color: var(--crm-brand-blue);
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 140ms ease;
}

.dashboard-page-breadcrumb .breadcrumb-link:hover,
.dashboard-page-breadcrumb .breadcrumb-link:focus-visible {
  color: var(--crm-brand-orange);
  text-decoration: underline;
}

.dashboard-page-breadcrumb .breadcrumb-link:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(13, 76, 143, 0.2);
  outline-offset: 2px;
}

.dashboard-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-page-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 8px;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.dashboard-page-actions .btn .bi {
  margin: 0 !important;
  font-size: .78rem;
  line-height: 1;
}

.dashboard-page-actions .btn-primary {
  border-color: var(--crm-brand-blue);
  background: linear-gradient(115deg, var(--crm-brand-navy) 0%, var(--crm-brand-blue) 100%);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--crm-brand-orange), 0 5px 14px rgba(8, 45, 93, .14);
}

.dashboard-page-actions .btn-primary .bi {
  color: #ffb07a;
}

.dashboard-page-actions .btn-primary:hover,
.dashboard-page-actions .btn-primary:focus-visible {
  border-color: var(--crm-brand-navy);
  background: linear-gradient(115deg, #041f46 0%, #1260ae 100%);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--crm-brand-orange), 0 7px 18px rgba(8, 45, 93, .2);
  transform: translateY(-1px);
}

.dashboard-page-actions .btn-outline-secondary,
.dashboard-page-actions .btn-outline-primary {
  border-color: #ccd6e2;
  background: #fff;
  color: #43526a;
  box-shadow: 0 2px 7px rgba(4, 26, 56, .04);
}

.dashboard-page-actions .btn-outline-secondary:hover,
.dashboard-page-actions .btn-outline-secondary:focus-visible,
.dashboard-page-actions .btn-outline-primary:hover,
.dashboard-page-actions .btn-outline-primary:focus-visible {
  border-color: rgba(13, 76, 143, .4);
  background: var(--crm-brand-blue-soft);
  color: var(--crm-brand-navy);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-page-actions .btn {
    transition: none;
  }
}

.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dashboard-organization-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 18px;
  border: 1px solid var(--crm-border);
  border-left: 3px solid var(--crm-brand-orange);
  border-radius: 8px;
  background: var(--crm-surface);
  box-shadow: 0 6px 18px rgba(4, 26, 56, 0.055);
}

.dashboard-organization-selector-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-organization-selector-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--crm-status-warning-border);
  border-radius: 8px;
  color: var(--crm-status-warning);
  background: var(--crm-status-warning-bg);
  font-size: 1.1rem;
}

.dashboard-organization-selector label {
  display: block;
  margin: 0;
  color: var(--crm-brand-navy);
  font-size: .9rem;
  font-weight: 750;
}

.dashboard-organization-selector small {
  display: block;
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: .75rem;
}

.dashboard-organization-selector-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 420px;
}

.dashboard-organization-selector-control .form-select {
  min-width: 260px;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-stat-card,
.dashboard-section-card,
.dashboard-action-card,
.dashboard-chart-card {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(4, 26, 56, 0.06);
}

.dashboard-stat-card {
  display: flex;
  gap: 14px;
  min-height: 124px;
  padding: 16px 18px;
}

.dashboard-stat-icon,
.dashboard-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
}

.dashboard-stat-icon {
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  font-size: 1.25rem;
}

.dashboard-work-queue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--crm-border);
  border-left: 3px solid var(--crm-brand-blue);
  border-radius: 8px;
  background: var(--crm-surface);
  box-shadow: 0 6px 18px rgba(4, 26, 56, 0.055);
  color: var(--crm-text);
}

.dashboard-work-queue-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.dashboard-work-queue-summary::-webkit-details-marker {
  display: none;
}

.dashboard-work-queue-summary:focus-visible {
  border-radius: 8px;
  outline: 3px solid color-mix(in srgb, var(--crm-brand-blue) 24%, transparent);
  outline-offset: 4px;
}

.dashboard-work-queue-summary .dashboard-work-queue-heading {
  flex: 1 1 auto;
}

.dashboard-work-queue-toggle {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  place-items: center;
  color: var(--crm-brand-blue);
  background: var(--crm-brand-blue-soft);
}

.dashboard-work-queue-toggle .bi {
  transition: transform 160ms ease;
}

.dashboard-work-queue[open] .dashboard-work-queue-toggle .bi {
  transform: rotate(180deg);
}

.dashboard-work-queue:not([open]) > .dashboard-work-metrics {
  display: none;
}

.dashboard-work-queue-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dashboard-work-queue-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--crm-status-info-border);
  border-radius: 8px;
  color: var(--crm-status-info);
  background: var(--crm-status-info-bg);
  font-size: 1.35rem;
}

.dashboard-eyebrow {
  margin: 0 0 3px;
  color: var(--crm-brand-blue);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.dashboard-work-queue h2 {
  margin: 0;
  color: var(--crm-brand-navy);
  font-size: 1.3rem;
  font-weight: 750;
}

.dashboard-work-queue-heading p:last-child {
  margin: 4px 0 0;
  color: var(--crm-muted);
  font-size: 0.84rem;
}

.dashboard-work-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  grid-column: 2;
  gap: 8px;
  flex: 0 0 auto;
}

.dashboard-work-metrics > div {
  display: flex;
  min-width: 78px;
  padding: 10px 12px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: var(--crm-surface-muted, #f7f9fb);
  flex-direction: column;
  text-align: center;
}

.dashboard-work-metrics strong {
  color: var(--crm-brand-navy);
  font-size: 1.2rem;
  line-height: 1.1;
}

.dashboard-work-metrics span {
  margin-top: 3px;
  color: var(--crm-muted);
  font-size: 0.72rem;
}

.dashboard-work-metrics .is-critical {
  border-color: var(--crm-status-critical-border);
  background: var(--crm-status-critical-bg);
}

.dashboard-work-metrics .is-critical strong,
.dashboard-work-metrics .is-critical span {
  color: var(--crm-status-critical);
}

.dashboard-stat-content,
.dashboard-stat-card > div:last-child {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.dashboard-stat-icon.text-bg-primary,
.dashboard-stat-icon.text-bg-info {
  border-color: var(--crm-status-info-border) !important;
  color: var(--crm-status-info) !important;
  background: var(--crm-status-info-bg) !important;
}

.dashboard-stat-icon.text-bg-success {
  border-color: var(--crm-status-positive-border) !important;
  color: var(--crm-status-positive) !important;
  background: var(--crm-status-positive-bg) !important;
}

.dashboard-stat-icon.text-bg-warning {
  border-color: var(--crm-status-warning-border) !important;
  color: var(--crm-status-warning) !important;
  background: var(--crm-status-warning-bg) !important;
}

.dashboard-stat-icon.text-bg-danger {
  border-color: var(--crm-status-critical-border) !important;
  color: var(--crm-status-critical) !important;
  background: var(--crm-status-critical-bg) !important;
}

.dashboard-stat-icon.text-bg-secondary,
.dashboard-stat-icon.text-bg-light {
  border-color: var(--crm-status-neutral-border) !important;
  color: var(--crm-status-neutral) !important;
  background: var(--crm-status-neutral-bg) !important;
}

.dashboard-stat-title,
.dashboard-stat-label {
  margin: 0;
  color: #667085;
  font-size: var(--crm-font-sm);
  font-weight: 600;
  line-height: 1.35;
}

.dashboard-stat-value {
  margin: 5px 0 0;
  color: var(--crm-brand-navy);
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1.15;
}

.dashboard-stat-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: #667085;
  font-size: 0.84rem;
}

@media (min-width: 992px) {
  .dashboard-grid > .dashboard-stat-grid > .dashboard-stat-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 0;
    align-items: center;
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .dashboard-grid > .dashboard-stat-grid > .dashboard-stat-card > .dashboard-stat-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .dashboard-grid > .dashboard-stat-grid > .dashboard-stat-card > .dashboard-stat-content {
    display: contents;
  }

  .dashboard-grid > .dashboard-stat-grid .dashboard-stat-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .dashboard-grid > .dashboard-stat-grid .dashboard-stat-value {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 3px;
  }

  .dashboard-grid > .dashboard-stat-grid .dashboard-stat-subtitle {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid #edf1f6;
  }
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 22px;
}

.dashboard-secondary-grid .dashboard-section-card,
.dashboard-task-grid .dashboard-section-card {
  border-color: color-mix(in srgb, var(--crm-border) 86%, var(--crm-brand-blue) 14%);
  box-shadow: 0 7px 20px rgba(4, 26, 56, 0.05);
}

@media (min-width: 1200px) {
  .dashboard-secondary-grid > .dashboard-side-column,
  .dashboard-task-grid > .dashboard-side-column {
    min-height: 0;
  }

  .dashboard-upcoming-card,
  .dashboard-task-grid .dashboard-assigned-tasks-card {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
  }

  .dashboard-upcoming-card > .dashboard-section-body,
  .dashboard-task-grid .dashboard-assigned-tasks-card > .dashboard-section-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;
  }

  .dashboard-upcoming-card:hover > .dashboard-section-body,
  .dashboard-upcoming-card:focus-within > .dashboard-section-body,
  .dashboard-task-grid .dashboard-assigned-tasks-card:hover > .dashboard-section-body,
  .dashboard-task-grid .dashboard-assigned-tasks-card:focus-within > .dashboard-section-body {
    scrollbar-color: var(--crm-border) transparent;
  }

  .dashboard-upcoming-card > .dashboard-section-body::-webkit-scrollbar,
  .dashboard-task-grid .dashboard-assigned-tasks-card > .dashboard-section-body::-webkit-scrollbar {
    width: 6px;
  }

  .dashboard-upcoming-card > .dashboard-section-body::-webkit-scrollbar-thumb,
  .dashboard-task-grid .dashboard-assigned-tasks-card > .dashboard-section-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
  }

  .dashboard-upcoming-card:hover > .dashboard-section-body::-webkit-scrollbar-thumb,
  .dashboard-upcoming-card:focus-within > .dashboard-section-body::-webkit-scrollbar-thumb,
  .dashboard-task-grid .dashboard-assigned-tasks-card:hover > .dashboard-section-body::-webkit-scrollbar-thumb,
  .dashboard-task-grid .dashboard-assigned-tasks-card:focus-within > .dashboard-section-body::-webkit-scrollbar-thumb {
    background: var(--crm-border);
  }
}

.dashboard-section-card {
  overflow: hidden;
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f4;
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--crm-brand-navy);
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-section-title i {
  color: var(--crm-brand-orange);
}

.dashboard-section-body {
  padding: 18px;
}

.workflow-task-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.workflow-task-list .workflow-task-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(150px, auto);
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e4eaf1;
  border-radius: 8px !important;
  background: #fff;
}

.workflow-task-list .workflow-task-row:hover,
.workflow-task-list .workflow-task-row:focus-visible {
  z-index: auto;
  border-color: var(--crm-status-info-border);
  background: var(--crm-status-info-bg);
  box-shadow: 0 8px 20px rgba(4, 26, 56, 0.08);
}

.workflow-task-row.workflow-task-unread {
  border-left: 4px solid var(--crm-brand-blue);
}

.workflow-task-row.workflow-task-overdue {
  border-left-color: var(--crm-status-critical);
}

.workflow-task-stage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--crm-status-info-border);
  border-radius: 8px;
  color: var(--crm-status-info);
  background: var(--crm-status-info-bg);
}

.workflow-task-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--crm-brand-navy);
}

.dashboard-assigned-tasks-card .dashboard-section-title,
.dashboard-assigned-tasks-card .dashboard-section-header .btn,
#dashboard-assigned-tasks .workflow-task-title-line strong,
#dashboard-assigned-tasks .workflow-task-new,
#dashboard-assigned-tasks .workflow-task-context,
#dashboard-assigned-tasks .workflow-task-description,
#dashboard-assigned-tasks .workflow-task-meta,
#dashboard-assigned-tasks .workflow-task-meta small,
#dashboard-assigned-tasks .status-badge {
  font-size: 9pt !important;
}

#dashboard-assigned-tasks .workflow-task-title-line strong {
  font-weight: 700;
  line-height: 1.35;
}

.workflow-task-new {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--crm-status-info);
  background: var(--crm-status-info-bg);
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: uppercase;
}

.workflow-task-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  color: #667085;
}

#dashboard-assigned-tasks .workflow-task-context { line-height: 1.35; }

.workflow-task-context span:not(:last-child)::after {
  margin-left: 6px;
  content: "·";
}

.workflow-task-description {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-assigned-tasks .workflow-task-description,
#dashboard-assigned-tasks .workflow-task-meta small {
  line-height: 1.35;
}

.workflow-task-meta {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex-direction: column;
  text-align: right;
}

.dashboard-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  border: 1px dashed var(--crm-status-positive-border);
  border-radius: 8px;
  color: var(--crm-status-positive);
  background: var(--crm-status-positive-bg);
  font-size: 0.9rem;
}

.list-filter-form {
  align-items: flex-end;
}

.crm-body .form-label {
  display: block;
  min-height: 1.1rem;
  margin-bottom: 6px;
  color: #475467;
  font-size: var(--crm-font-xs);
  font-weight: 600;
  line-height: 1.25;
}

.crm-body .form-check-label {
  color: #475467;
  font-size: var(--crm-font-sm);
  font-weight: 500;
  line-height: 1.35;
}

.list-filter-form .form-control,
.list-filter-form .form-select,
.list-filter-form .btn {
  min-height: 40px;
}

.list-filter-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.list-filter-form .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 0;
  padding-top: 0 !important;
}

.list-filter-form .form-check-input {
  flex: 0 0 auto;
  margin-top: 0;
}

.dashboard-table {
  margin-bottom: 0;
}

.dashboard-table > :not(caption) > * > * {
  padding: 12px 14px;
}

.dashboard-table--compact > :not(caption) > * > * {
  padding: 9px 10px;
}

.dashboard-table thead th {
  vertical-align: middle;
  border-bottom: 1px solid var(--crm-border);
  color: #475467;
  background: #f8fafc;
  font-size: var(--crm-font-xs);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-table tbody td {
  vertical-align: middle;
  color: #344054;
  font-size: var(--crm-font-body);
  line-height: 1.45;
}

.table-action-heading,
.table-action-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.dashboard-table thead th.table-action-heading {
  text-align: right;
}

.dashboard-table-link {
  color: var(--crm-brand-blue);
  font-weight: 700;
  text-decoration: none;
}

.dashboard-table-link:hover,
.dashboard-table-link:focus-visible {
  color: var(--crm-brand-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lead-list-table {
  width: 100%;
  table-layout: fixed;
}

.lead-list-scroll,
.lead-view-panel,
.lead-workspace-card {
  max-width: 100%;
  min-width: 0;
}

.lead-list-scroll .lead-list-table {
  min-width: 0;
}

.lead-management-table .sortable-grid-header,
.lead-management-table .sortable-grid-header__link,
.lead-management-table .sortable-grid-header__link > span {
  min-width: 0;
}

.lead-management-table .sortable-grid-header__link > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-list-table th:nth-child(1) { width: 8%; }
.lead-list-table th:nth-child(2) { width: 17%; }
.lead-list-table th:nth-child(3) { width: 10%; }
.lead-list-table th:nth-child(4) { width: 10%; }
.lead-list-table th:nth-child(5) { width: 10%; }
.lead-list-table th:nth-child(6) { width: 13%; }
.lead-list-table th:nth-child(7) { width: 19%; }
.lead-list-table .lead-action-column-heading,
.lead-list-table .lead-action-cell { width: 112px; }

.lead-list-table tbody td {
  overflow-wrap: anywhere;
  font-size: var(--crm-font-sm);
}

.lead-list-cell-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lead-list-primary {
  color: #344054;
  font-weight: 600;
}

.lead-list-secondary {
  overflow: hidden;
  color: #667085;
  font-size: var(--crm-font-xs);
  line-height: 1.35;
  text-overflow: ellipsis;
}

.lead-list-assignment-stack .lead-list-secondary,
.lead-list-tertiary {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: normal;
}

.lead-list-tertiary {
  color: #7b8798;
  font-size: 8pt;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.lead-list-assignment-stack .bi {
  flex: 0 0 auto;
  color: #607d9d;
}

.lead-list-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lead-detail-panel .dashboard-section-card {
  max-width: none;
}

@media (max-width: 991.98px) {
  .lead-list-scroll .lead-list-table {
    min-width: 900px;
  }
}

@media (max-width: 767.98px) {
  .lead-list-scroll .lead-list-table {
    min-width: 780px;
    table-layout: auto;
  }
}

.table-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.table-action-group form {
  display: inline-flex;
  margin: 0;
}

.table-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--crm-status-info);
  background: transparent;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.table-action-icon:hover,
.table-action-icon:focus-visible {
  border-color: var(--crm-status-info-border);
  color: var(--crm-status-info);
  background: var(--crm-status-info-bg);
  transform: translateY(-1px);
}

.table-action-icon:focus-visible {
  outline: 2px solid rgba(13, 76, 143, 0.24);
  outline-offset: 1px;
}

.table-action-icon--positive {
  color: var(--crm-status-positive);
}

.table-action-icon--positive:hover,
.table-action-icon--positive:focus-visible {
  border-color: var(--crm-status-positive-border);
  color: var(--crm-status-positive);
  background: var(--crm-status-positive-bg);
}

.table-action-icon--critical {
  color: var(--crm-status-critical);
}

.table-action-icon--critical:hover,
.table-action-icon--critical:focus-visible {
  border-color: var(--crm-status-critical-border);
  color: var(--crm-status-critical);
  background: var(--crm-status-critical-bg);
}

.table-action-icon--neutral {
  color: var(--crm-status-neutral);
}

.table-action-icon--neutral:hover,
.table-action-icon--neutral:focus-visible {
  border-color: var(--crm-status-neutral-border);
  color: var(--crm-status-neutral);
  background: var(--crm-status-neutral-bg);
}

.dashboard-followup-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-followup-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  background: #f9fafb;
}

.dashboard-followup-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-followup-link:hover,
.dashboard-followup-link:focus-visible {
  border-color: var(--crm-status-info-border);
  color: inherit;
  background: var(--crm-status-info-bg);
  box-shadow: 0 8px 18px rgba(13, 76, 143, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-followup-time {
  color: var(--crm-brand-blue);
  font-size: 0.84rem;
  font-weight: 700;
}

.dashboard-followup-title {
  color: #111827;
  font-weight: 700;
}

.dashboard-followup-text {
  margin-top: 2px;
  color: #667085;
  font-size: 0.86rem;
}

.dashboard-followup-empty {
  padding: 16px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  color: #667085;
  background: #f9fafb;
  font-size: 0.9rem;
  text-align: center;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  color: #344054;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-action-card:hover,
.dashboard-action-card:focus {
  border-color: #a9c5e3;
  color: var(--crm-brand-blue);
  box-shadow: 0 16px 36px rgba(13, 76, 143, 0.12);
  transform: translateY(-2px);
}

.dashboard-action-icon {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

.dashboard-action-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.dashboard-action-title {
  color: var(--crm-brand-navy);
  font-weight: 700;
}

.dashboard-action-description {
  margin-top: 3px;
  color: #667085;
  font-size: 0.86rem;
}

.dashboard-action-arrow {
  color: #98a2b3;
  font-size: 1.4rem;
}

.dashboard-chart-wrap {
  min-height: 260px;
}

.table-action-icon--disabled {
  cursor: default;
  border-color: var(--crm-border);
  background: var(--crm-surface-muted, #f3f5f7);
  color: var(--crm-muted);
  box-shadow: none;
  opacity: .78;
}

.table-action-icon--disabled:hover {
  transform: none;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-quick-action {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  color: var(--crm-text);
  background: var(--crm-surface);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-quick-action::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--quick-accent, var(--crm-brand-blue));
  content: "";
}

.dashboard-quick-action:hover,
.dashboard-quick-action:focus-visible {
  border-color: var(--quick-accent, var(--crm-brand-blue));
  color: var(--crm-text);
  box-shadow: 0 9px 20px rgba(4, 26, 56, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-quick-action--primary { --quick-accent: var(--crm-brand-blue); --quick-soft: var(--crm-status-info-bg); }
.dashboard-quick-action--success { --quick-accent: var(--crm-status-positive); --quick-soft: var(--crm-status-positive-bg); }
.dashboard-quick-action--info { --quick-accent: #0f8b8d; --quick-soft: #e8f7f7; }
.dashboard-quick-action--warning { --quick-accent: var(--crm-status-warning); --quick-soft: var(--crm-status-warning-bg); }

.dashboard-quick-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--quick-accent, var(--crm-brand-blue));
  background: var(--quick-soft, var(--crm-status-info-bg));
  font-size: 1rem;
}

.dashboard-quick-action-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.dashboard-quick-action-copy strong {
  color: var(--crm-brand-navy);
  font-size: 0.83rem;
}

.dashboard-quick-action-copy small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: 0.7rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-quick-action-arrow {
  color: var(--quick-accent, var(--crm-brand-blue));
  font-size: 0.85rem;
}

.dashboard-pair-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.dashboard-pair-grid > * {
  min-width: 0;
}

.dashboard-pair-grid > .dashboard-pair-span-4 {
  grid-column: span 4;
}

.dashboard-pair-grid > .dashboard-pair-span-3 {
  grid-column: span 3;
}

.dashboard-pair-grid > .dashboard-pair-span-5 {
  grid-column: span 5;
}

.dashboard-pair-grid > .dashboard-pair-span-8 {
  grid-column: span 8;
}

.dashboard-pair-grid--single > * {
  grid-column: 1 / -1;
}

.dashboard-pair-grid > .dashboard-section-card {
  height: 100%;
}

.dashboard-recent-leads-card {
  display: flex;
  max-height: 420px;
  padding-bottom: 16px;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-recent-leads-card > .dashboard-section-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.dashboard-recent-leads-card .dashboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.dashboard-recent-bookings-card {
  display: flex;
  min-width: 0;
  padding-bottom: 16px;
  flex-direction: column;
  border-top: 3px solid var(--crm-status-warning);
  overflow: hidden;
}

.dashboard-recent-bookings-card > .dashboard-section-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: auto;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.dashboard-recent-leads-card .table-responsive,
.dashboard-recent-bookings-card .table-responsive {
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.dashboard-recent-leads-card:hover > .dashboard-section-body,
.dashboard-recent-leads-card:focus-within > .dashboard-section-body,
.dashboard-recent-bookings-card:hover > .dashboard-section-body,
.dashboard-recent-bookings-card:focus-within > .dashboard-section-body,
.dashboard-recent-leads-card:hover .table-responsive,
.dashboard-recent-leads-card:focus-within .table-responsive,
.dashboard-recent-bookings-card:hover .table-responsive,
.dashboard-recent-bookings-card:focus-within .table-responsive {
  scrollbar-color: var(--crm-border) transparent;
}

.dashboard-recent-leads-card > .dashboard-section-body::-webkit-scrollbar,
.dashboard-recent-bookings-card > .dashboard-section-body::-webkit-scrollbar,
.dashboard-recent-leads-card .table-responsive::-webkit-scrollbar,
.dashboard-recent-bookings-card .table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dashboard-recent-leads-card > .dashboard-section-body::-webkit-scrollbar-thumb,
.dashboard-recent-bookings-card > .dashboard-section-body::-webkit-scrollbar-thumb,
.dashboard-recent-leads-card .table-responsive::-webkit-scrollbar-thumb,
.dashboard-recent-bookings-card .table-responsive::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

.dashboard-recent-leads-card:hover > .dashboard-section-body::-webkit-scrollbar-thumb,
.dashboard-recent-leads-card:focus-within > .dashboard-section-body::-webkit-scrollbar-thumb,
.dashboard-recent-bookings-card:hover > .dashboard-section-body::-webkit-scrollbar-thumb,
.dashboard-recent-bookings-card:focus-within > .dashboard-section-body::-webkit-scrollbar-thumb,
.dashboard-recent-leads-card:hover .table-responsive::-webkit-scrollbar-thumb,
.dashboard-recent-leads-card:focus-within .table-responsive::-webkit-scrollbar-thumb,
.dashboard-recent-bookings-card:hover .table-responsive::-webkit-scrollbar-thumb,
.dashboard-recent-bookings-card:focus-within .table-responsive::-webkit-scrollbar-thumb {
  background: var(--crm-border);
}

.dashboard-recent-bookings-card .dashboard-table {
  min-width: 400px;
}

.dashboard-recent-bookings-card .dashboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.dashboard-recent-bookings-card .lead-list-primary,
.dashboard-recent-bookings-card .lead-list-secondary {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-booking-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 190px;
  color: var(--crm-muted);
  font-size: .61rem;
  white-space: nowrap;
}

.dashboard-booking-meta > span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-booking-performance-grid--complete {
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
}

.dashboard-pair-grid.dashboard-booking-performance-grid--complete > * {
  grid-column: auto;
}

.dashboard-booking-performance-grid--bookings-only > .dashboard-chart-card--bookings {
  grid-column: span 4;
}

.dashboard-booking-performance-grid--bookings-only > .dashboard-recent-bookings-card {
  grid-column: span 8;
}

.dashboard-auto-grid {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-auto-grid > .dashboard-auto-panel {
  flex: 1 1 300px;
  min-width: 0;
}

.dashboard-auto-grid > .dashboard-auto-panel--wide {
  flex-basis: 620px;
  flex-grow: 2;
}

.dashboard-chart-card {
  --dashboard-chart-accent: var(--crm-status-info);
  --dashboard-chart-border: var(--crm-status-info-border);
  --dashboard-chart-soft: var(--crm-status-info-bg);
  display: flex;
  min-height: 230px;
  flex-direction: column;
  grid-column: span 6;
  min-width: 0;
  padding: 16px;
  border-top: 3px solid var(--dashboard-chart-accent);
}

.dashboard-chart-card--conversion,
.dashboard-chart-card--finance {
  --dashboard-chart-accent: var(--crm-status-positive);
  --dashboard-chart-border: var(--crm-status-positive-border);
  --dashboard-chart-soft: var(--crm-status-positive-bg);
}

.dashboard-chart-card--bookings {
  --dashboard-chart-accent: var(--crm-status-warning);
  --dashboard-chart-border: var(--crm-status-warning-border);
  --dashboard-chart-soft: var(--crm-status-warning-bg);
}

.dashboard-chart-card--invoices {
  --dashboard-chart-accent: var(--crm-status-neutral);
  --dashboard-chart-border: var(--crm-status-neutral-border);
  --dashboard-chart-soft: var(--crm-status-neutral-bg);
}

:root[data-crm-theme="dark"] .dashboard-chart-card {
  border-top-color: var(--dashboard-chart-accent) !important;
}

.dashboard-chart-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-chart-card > header span {
  color: var(--crm-muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.dashboard-chart-card > header h2 {
  margin: 2px 0 0;
  color: var(--crm-brand-navy);
  font-size: 0.95rem;
  font-weight: 750;
}

.dashboard-chart-card > header > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--dashboard-chart-border);
  border-radius: 8px;
  color: var(--dashboard-chart-accent);
  background: var(--dashboard-chart-soft);
}

.dashboard-chart-canvas {
  position: relative;
  flex: 1 1 auto;
  height: 180px;
  min-height: 0;
}

.dashboard-chart-card--compact {
  grid-column: span 3;
}

.dashboard-chart-card--compact .dashboard-chart-canvas {
  height: 170px;
}

.dashboard-chart-card--wide {
  grid-column: span 6;
}

.dashboard-chart-canvas--finance {
  height: 180px;
}

@media (max-width: 1199.98px) {
  .dashboard-stat-grid,
  .dashboard-action-grid,
  .dashboard-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-work-queue {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .dashboard-work-metrics {
    grid-column: 1;
    width: 100%;
  }

  .dashboard-chart-card,
  .dashboard-chart-card--compact {
    grid-column: span 6;
  }

  .dashboard-chart-card--wide {
    grid-column: 1 / -1;
  }

  .dashboard-pair-grid > .dashboard-pair-span-4,
  .dashboard-pair-grid > .dashboard-pair-span-3,
  .dashboard-pair-grid > .dashboard-pair-span-5,
  .dashboard-pair-grid > .dashboard-pair-span-8 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .dashboard-page-header {
    flex-direction: column;
  }

  .dashboard-organization-selector {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-organization-selector-control {
    flex-basis: auto;
    width: 100%;
  }

  .dashboard-organization-selector-control .form-select {
    min-width: 0;
    width: 100%;
  }

  .dashboard-stat-grid,
  .dashboard-action-grid,
  .dashboard-quick-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-followup-item {
    grid-template-columns: 1fr;
  }

  .dashboard-work-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-task-list .workflow-task-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .workflow-task-meta {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .dashboard-pair-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-card--wide {
    grid-column: auto;
  }

  .dashboard-chart-card,
  .dashboard-chart-card--compact {
    grid-column: auto;
  }

  .dashboard-auto-grid {
    flex-direction: column;
  }

  .dashboard-auto-grid > .dashboard-auto-panel,
  .dashboard-auto-grid > .dashboard-auto-panel--wide {
    width: 100%;
    flex-basis: auto;
  }
}

/* Sortable grid headers */
.sortable-grid-header {
  padding: 0 !important;
}

.sortable-grid-header__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
  min-height: inherit;
  padding: 9px 12px;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  text-transform: inherit;
  white-space: nowrap;
}

.sortable-grid-header__link .bi {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: .68rem;
}

.sortable-grid-header__link:hover,
.sortable-grid-header__link:focus-visible,
.sortable-grid-header--active .sortable-grid-header__link {
  color: var(--crm-brand-blue);
  background: rgba(13, 76, 143, .045);
}

.sortable-grid-header__link:focus-visible {
  outline: 2px solid rgba(13, 76, 143, .28);
  outline-offset: -2px;
}

.sortable-grid-header--active .sortable-grid-header__link .bi {
  color: var(--crm-brand-orange);
}

/* Compact AJAX dashboard */
.dashboard-ajax-root {
  --dashboard-panel-border: color-mix(in srgb, var(--crm-border) 88%, var(--crm-brand-blue) 12%);
  --dashboard-panel-shadow: 0 3px 12px rgba(4, 26, 56, .045);
  position: relative;
}

.dashboard-ajax-root::before {
  position: absolute;
  top: -2px;
  right: 0;
  left: 0;
  z-index: 8;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--crm-brand-blue), var(--crm-brand-orange), transparent);
  background-size: 220% 100%;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.dashboard-ajax-root[aria-busy="true"]::before {
  animation: dashboard-ajax-progress 1.1s linear infinite;
  opacity: 1;
}

.dashboard-ajax-root [data-dashboard-content] {
  transition: opacity 140ms ease;
}

.dashboard-ajax-root[aria-busy="true"] [data-dashboard-content] {
  opacity: .68;
}

.dashboard-ajax-error {
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: var(--crm-font-xs);
}

.dashboard-ajax-error:not([hidden]) {
  display: flex;
}

.dashboard-ajax-error > span {
  flex: 1 1 auto;
}

.dashboard-ajax-root .dashboard-page-header {
  margin-bottom: 14px;
}

.dashboard-ajax-root .dashboard-page-title {
  margin-bottom: 3px;
  font-size: 1.35rem;
  letter-spacing: -.025em;
}

.dashboard-ajax-root .dashboard-page-breadcrumb {
  font-size: .75rem;
}

.dashboard-ajax-root .dashboard-grid {
  gap: 14px;
}

.dashboard-ajax-root .dashboard-organization-selector {
  gap: 16px;
  padding: 10px 13px;
  border: 1px solid var(--dashboard-panel-border);
  border-radius: 10px;
  box-shadow: var(--dashboard-panel-shadow);
}

.dashboard-ajax-root .dashboard-organization-selector-icon {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: .9rem;
}

.dashboard-ajax-root .dashboard-organization-selector label {
  font-size: .78rem;
}

.dashboard-ajax-root .dashboard-organization-selector small {
  margin-top: 1px;
  font-size: .67rem;
}

.dashboard-ajax-root .dashboard-organization-selector-control {
  flex-basis: 360px;
}

.dashboard-ajax-root .dashboard-organization-selector-control .form-select {
  min-height: 36px;
  font-size: .72rem;
}

.dashboard-ajax-root .dashboard-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.dashboard-ajax-root .dashboard-stat-card,
.dashboard-ajax-root .dashboard-section-card,
.dashboard-ajax-root .dashboard-work-queue {
  border-color: var(--dashboard-panel-border);
  border-radius: 10px;
  background: var(--crm-surface);
  box-shadow: var(--dashboard-panel-shadow);
}

.dashboard-ajax-root .dashboard-stat-card {
  gap: 10px;
  min-height: 92px;
  padding: 11px 12px;
}

.dashboard-ajax-root .dashboard-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1rem;
}

.dashboard-ajax-root .dashboard-stat-title {
  font-size: .68rem;
  line-height: 1.25;
}

.dashboard-ajax-root .dashboard-stat-value {
  margin-top: 2px;
  font-size: 1.35rem;
  line-height: 1.05;
}

.dashboard-ajax-root .dashboard-stat-subtitle {
  gap: 5px;
  padding-top: 5px;
  font-size: .64rem;
}

@media (min-width: 992px) {
  .dashboard-ajax-root .dashboard-grid > .dashboard-stat-grid > .dashboard-stat-card {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 10px;
    padding-top: 11px;
    padding-bottom: 9px;
  }

  .dashboard-ajax-root .dashboard-grid > .dashboard-stat-grid .dashboard-stat-subtitle {
    grid-column: 2;
    grid-row: 3;
    margin-top: 3px;
    padding-top: 0;
    border-top: 0;
  }
}

.dashboard-ajax-root .dashboard-section-header {
  min-height: 46px;
  padding: 10px 13px;
  border-bottom-color: color-mix(in srgb, var(--crm-border) 78%, transparent);
}

.dashboard-ajax-root .dashboard-section-title {
  gap: 7px;
  font-size: .82rem;
}

.dashboard-ajax-root .dashboard-section-title i {
  font-size: .78rem;
}

.dashboard-ajax-root .dashboard-section-header .btn,
.dashboard-ajax-root .dashboard-section-toolbar-label {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: .66rem;
}

.dashboard-ajax-root .dashboard-section-body {
  padding: 12px;
}

.dashboard-ajax-root .dashboard-main-grid {
  grid-template-columns: minmax(0, 2.1fr) minmax(270px, .9fr);
  gap: 14px;
}

.dashboard-ajax-root .dashboard-main-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-ajax-root .dashboard-task-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-ajax-root .dashboard-task-grid > .dashboard-task-panel {
  min-width: 0;
}

.dashboard-ajax-root .dashboard-task-grid--3 > .dashboard-task-panel--assigned {
  grid-column: span 6;
}

.dashboard-ajax-root .dashboard-task-grid--3 > .dashboard-task-panel:not(.dashboard-task-panel--assigned) {
  grid-column: span 3;
}

.dashboard-ajax-root .dashboard-task-grid--2.dashboard-task-grid--has-assigned > .dashboard-task-panel--assigned {
  grid-column: span 8;
}

.dashboard-ajax-root .dashboard-task-grid--2.dashboard-task-grid--has-assigned > .dashboard-task-panel:not(.dashboard-task-panel--assigned) {
  grid-column: span 4;
}

.dashboard-ajax-root .dashboard-task-grid--2:not(.dashboard-task-grid--has-assigned) > .dashboard-task-panel {
  grid-column: span 6;
}

.dashboard-ajax-root .dashboard-task-grid--1 > .dashboard-task-panel {
  grid-column: 1 / -1;
}

.dashboard-ajax-root .dashboard-secondary-grid .dashboard-section-card,
.dashboard-ajax-root .dashboard-task-grid .dashboard-section-card {
  border-color: var(--dashboard-panel-border);
  box-shadow: var(--dashboard-panel-shadow);
}

.dashboard-ajax-root .dashboard-table > :not(caption) > * > * {
  padding: 9px 10px;
}

.dashboard-ajax-root .dashboard-table thead th {
  background: color-mix(in srgb, var(--crm-content-bg) 76%, var(--crm-surface));
  font-size: .62rem;
  letter-spacing: .015em;
}

.dashboard-ajax-root .dashboard-table tbody td {
  font-size: .7rem;
  line-height: 1.35;
}

.dashboard-ajax-root .dashboard-table-link {
  font-size: .7rem;
}

.dashboard-ajax-root .dashboard-work-queue {
  gap: 16px;
  padding: 11px 13px;
  border-left-width: 1px;
}

.dashboard-ajax-root .dashboard-work-queue-heading {
  gap: 10px;
}

.dashboard-ajax-root .dashboard-work-queue-toggle {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 7px;
  font-size: .72rem;
}

.dashboard-ajax-root .dashboard-work-queue-icon {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1rem;
}

.dashboard-ajax-root .dashboard-eyebrow {
  margin-bottom: 1px;
  font-size: .59rem;
  letter-spacing: .08em;
}

.dashboard-ajax-root .dashboard-work-queue h2 {
  font-size: .88rem;
}

.dashboard-ajax-root .dashboard-work-queue-heading p:last-child {
  margin-top: 2px;
  font-size: .66rem;
}

.dashboard-ajax-root .dashboard-work-metrics {
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 6px;
}

.dashboard-ajax-root .dashboard-work-metrics > div {
  min-width: 64px;
  padding: 7px 9px;
  border-radius: 8px;
}

.dashboard-ajax-root .dashboard-work-metrics strong {
  font-size: .95rem;
}

.dashboard-ajax-root .dashboard-work-metrics span {
  margin-top: 1px;
  font-size: .61rem;
}

.dashboard-ajax-root .dashboard-pair-grid,
.dashboard-ajax-root .dashboard-auto-grid {
  gap: 10px;
}

.dashboard-ajax-root .dashboard-chart-card {
  padding: 11px;
  border-color: var(--dashboard-panel-border);
  border-top-color: var(--dashboard-chart-accent);
  border-radius: 9px;
  box-shadow: var(--dashboard-panel-shadow);
}

.dashboard-ajax-root .dashboard-chart-card > header {
  margin-bottom: 8px;
}

.dashboard-ajax-root .dashboard-chart-card > header span {
  font-size: .57rem;
  letter-spacing: .07em;
}

.dashboard-ajax-root .dashboard-chart-card > header h2 {
  margin-top: 1px;
  font-size: .76rem;
}

.dashboard-ajax-root .dashboard-chart-card > header > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: .78rem;
}

.dashboard-ajax-root .dashboard-chart-canvas,
.dashboard-ajax-root .dashboard-chart-canvas--finance {
  height: 158px;
}

.dashboard-ajax-root .dashboard-chart-card--compact .dashboard-chart-canvas {
  height: 150px;
}

.dashboard-ajax-root .workflow-task-list {
  gap: 6px;
}

.dashboard-ajax-root .workflow-task-list .workflow-task-row {
  grid-template-columns: 34px minmax(0, 1fr) minmax(130px, auto);
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px !important;
}

.dashboard-ajax-root .workflow-task-stage-icon {
  width: 34px;
  height: 34px;
}

.dashboard-ajax-root .dashboard-followup-list {
  gap: 0;
}

.dashboard-ajax-root .dashboard-followup-item {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "content badge"
    "time badge";
  gap: 8px;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 0;
  background: transparent;
}

.dashboard-ajax-root .dashboard-followup-item:last-child {
  border-bottom: 0;
}

.dashboard-ajax-root .dashboard-followup-link:hover,
.dashboard-ajax-root .dashboard-followup-link:focus-visible {
  background: color-mix(in srgb, var(--crm-status-info-bg) 54%, transparent);
}

.dashboard-ajax-root .dashboard-followup-content {
  grid-area: content;
}

.dashboard-ajax-root .dashboard-followup-item > status-badge,
.dashboard-ajax-root .dashboard-followup-item > .status-badge {
  grid-area: badge;
  align-self: center;
}

.dashboard-ajax-root .dashboard-followup-time {
  grid-area: time;
  color: var(--crm-muted);
  font-size: .61rem;
}

.dashboard-ajax-root .dashboard-followup-title {
  font-size: .69rem;
}

.dashboard-ajax-root .dashboard-followup-text {
  font-size: .64rem;
}

.dashboard-ajax-root .dashboard-occasion-intro {
  margin-bottom: 8px;
  font-size: .66rem;
}

.dashboard-ajax-root .dashboard-side-column .dashboard-occasion-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.dashboard-ajax-root .dashboard-occasion-item {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
}

.dashboard-ajax-root .dashboard-occasion-date,
.dashboard-ajax-root .dashboard-occasion-person,
.dashboard-ajax-root .dashboard-occasion-actions {
  font-size: .66rem;
}

.dashboard-ajax-root .dashboard-quick-actions {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.dashboard-ajax-root .dashboard-quick-action {
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  gap: 8px;
  min-height: 62px;
  padding: 8px 10px;
  border-radius: 8px;
}

.dashboard-ajax-root .dashboard-quick-action-icon {
  width: 32px;
  height: 32px;
  font-size: .82rem;
}

.dashboard-ajax-root .dashboard-quick-action-copy strong {
  font-size: .7rem;
}

.dashboard-ajax-root .dashboard-quick-action-copy small {
  font-size: .62rem;
}

@keyframes dashboard-ajax-progress {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@media (min-width: 1200px) {
  .dashboard-ajax-root .dashboard-main-grid {
    align-items: start;
  }

  .dashboard-ajax-root .dashboard-secondary-grid .dashboard-upcoming-card {
    height: 306px;
  }

  .dashboard-ajax-root .dashboard-task-grid .dashboard-upcoming-card,
  .dashboard-ajax-root .dashboard-task-grid .dashboard-assigned-tasks-card {
    height: 318px;
  }

  .dashboard-ajax-root .dashboard-upcoming-card > .dashboard-section-body,
  .dashboard-ajax-root .dashboard-task-grid .dashboard-assigned-tasks-card > .dashboard-section-body {
    overflow-y: auto;
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;
  }

  .dashboard-ajax-root .dashboard-upcoming-card:hover > .dashboard-section-body,
  .dashboard-ajax-root .dashboard-upcoming-card:focus-within > .dashboard-section-body,
  .dashboard-ajax-root .dashboard-task-grid .dashboard-assigned-tasks-card:hover > .dashboard-section-body,
  .dashboard-ajax-root .dashboard-task-grid .dashboard-assigned-tasks-card:focus-within > .dashboard-section-body {
    scrollbar-color: var(--crm-border) transparent;
  }
}

@media (max-width: 1199.98px) {
  .dashboard-ajax-root .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-ajax-root .dashboard-task-grid > .dashboard-task-panel {
    grid-column: 1 / -1;
  }

  .dashboard-ajax-root .dashboard-work-queue {
    align-items: stretch;
  }
}

@media (min-width: 1200px) {
  .dashboard-pair-grid--lead > .dashboard-chart-card,
  .dashboard-pair-grid--lead > .dashboard-recent-leads-card {
    height: 360px;
    max-height: 360px;
  }

  .dashboard-booking-performance-grid > .dashboard-chart-card,
  .dashboard-booking-performance-grid > .dashboard-recent-bookings-card {
    height: 318px;
    max-height: 318px;
  }
}

@media (max-width: 767.98px) {
  .dashboard-ajax-root .dashboard-page-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .dashboard-ajax-root .dashboard-grid {
    gap: 11px;
  }

  .dashboard-ajax-root .dashboard-organization-selector {
    padding: 10px;
  }

  .dashboard-ajax-root .dashboard-section-header {
    min-height: 43px;
    padding: 9px 10px;
  }

  .dashboard-ajax-root .dashboard-section-body {
    padding: 10px;
  }

  .dashboard-ajax-root .dashboard-work-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-ajax-root .workflow-task-list .workflow-task-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .dashboard-ajax-root .dashboard-followup-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "time"
      "badge";
  }

  .dashboard-ajax-root .dashboard-followup-item > .status-badge {
    justify-self: start;
  }

  .dashboard-ajax-root .dashboard-occasion-item {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-ajax-root::before {
    animation: none !important;
  }

  .dashboard-ajax-root [data-dashboard-content] {
    transition: none;
  }

  .dashboard-work-queue-toggle .bi {
    transition: none;
  }
}
