/* Staff dashboard only. Keep the existing panel, navigation and filter behavior. */
#workspace .dashboard-home {
  --dash-navy: #173750;
  --dash-blue: #204f79;
  --dash-ink: #203b53;
  --dash-muted: #50667a;
  --dash-border: #d6e0e9;
}

#workspace .dashboard-home .dh-heading {
  align-items: center;
  padding: 17px 20px;
  border: 1px solid var(--dash-navy);
  border-radius: 4px;
  background: var(--dash-navy);
  color: #fff;
}

#workspace .dashboard-home .dh-heading h2 {
  color: inherit;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#workspace .dashboard-home .dh-heading :is(.dh-date, .dh-updated, p.muted, .dh-humour) {
  color: #dce8f1;
}

#workspace .dashboard-home .dh-heading :is(.dh-refresh, .dh-heading-controls button) {
  color: #fff;
  background: #254a67;
  border: 1px solid #7791a6;
  border-radius: 4px;
}

#workspace .dashboard-home .dh-heading :is(.dh-refresh, .dh-heading-controls button):hover {
  background: #345b79;
}

#workspace .dashboard-home .dh-status-item {
  --status-ink: #365268;
  --status-fill: #f1f5f8;
  --status-accent: #7b91a3;
  min-height: 62px;
  border: 1px solid var(--dash-border);
  border-inline-start: 4px solid var(--status-accent);
  border-radius: 4px;
  background: var(--status-fill);
  color: var(--status-ink);
  font-weight: 500;
}

#workspace .dashboard-home .dh-status-item[data-kind="today"][data-active="true"] {
  --status-ink: #19446a;
  --status-fill: #eaf2fb;
  --status-accent: #3675a7;
}

#workspace .dashboard-home .dh-status-item[data-kind="overdue"][data-active="true"] {
  --status-ink: #793c13;
  --status-fill: #fff3e4;
  --status-accent: #a85e25;
}

#workspace .dashboard-home .dh-status-item[data-kind="approvals"][data-active="true"] {
  --status-ink: #744714;
  --status-fill: #f9f1e3;
  --status-accent: #a67837;
}

#workspace .dashboard-home .dh-status-count {
  display: grid;
  min-width: 32px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: #fff;
  color: inherit;
}

#workspace .dashboard-home .dh-status-item[data-active="false"] .dh-status-count {
  display: none;
}

#workspace .dashboard-home .dh-status-item:hover {
  border-color: var(--status-accent);
  background: var(--status-fill);
}

#workspace .dashboard-home .dh-status-item[aria-pressed="true"] {
  border-color: var(--status-accent);
  background: var(--status-fill);
  box-shadow: inset 0 -2px var(--status-accent);
}

#workspace .dashboard-home :is(.eh-main-row, .dh-grid) > .dh-card > .dh-card-head {
  background: #eef3f8;
  border-bottom-color: var(--dash-border);
  box-shadow: inset 0 2px var(--card-accent, transparent);
}

#workspace .dashboard-home .dh-recent-matters { --card-accent: #748d9f; }
#workspace .dashboard-home .dh-task-card { --card-accent: #5080a8; }
#workspace .dashboard-home .eh-today:has(.eh-event) { --card-accent: #50877c; }
#workspace .dashboard-home .dh-approval-card[data-pending="true"] { --card-accent: #b0874f; }

#workspace .dashboard-home .dh-task-card [data-due="overdue"] .badge {
  background: #faeceb;
  color: #90312e;
}

@media (min-width: 901px) {
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row, .dh-grid) > .dh-card {
    height: 352px;
    min-height: 352px;
    max-height: 352px;
    scrollbar-gutter: auto;
  }
}

@media (max-width: 900px) {
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row, .dh-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row, .dh-grid) > .dh-card {
    height: auto;
    min-height: 160px;
    max-height: none;
    scrollbar-gutter: auto;
  }
}

#workspace .dashboard-home .dh-card-head h3 {
  color: var(--dash-ink);
  font-weight: 600;
}

#workspace .dashboard-home .dh-tabs {
  gap: 4px;
  background: #f8fafc;
}

#workspace .dashboard-home .dh-tabs button {
  border-radius: 3px;
  color: var(--dash-muted);
  font-size: 13px;
  font-weight: 500;
}

#workspace .dashboard-home .dh-tabs button[aria-pressed="true"] {
  border-color: var(--dash-blue);
  background: var(--dash-blue);
  color: #fff;
  box-shadow: none;
  font-weight: 650;
}

@media (max-width: 760px) {
  #workspace .dashboard-home .dh-heading {
    flex-direction: row;
    align-items: flex-start;
    padding: 13px 12px;
  }
}

@media (max-width: 480px) {
  #workspace .dashboard-home .dh-heading {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  #workspace .dashboard-home .dh-heading > div:first-child {
    flex-basis: 100%;
  }
}

@media (forced-colors: active) {
  #workspace .dashboard-home :is(.dh-tabs button, .dh-status-item)[aria-pressed="true"] {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }

  #workspace .dashboard-home .dh-status-item[aria-pressed="true"] .dh-status-count {
    background: Highlight;
  }
}
