#dashboard {
  --dashboard-navy: #102a4f;
  --dashboard-blue: #2f67c8;
  --dashboard-teal: #0f8b83;
  --dashboard-text: #1d304b;
  --dashboard-muted: #718096;
  --dashboard-line: #dce5f0;
  --dashboard-surface: #ffffff;
  --dashboard-soft: #f6f8fc;
  --dashboard-warning: #ad6a12;
  --dashboard-danger: #c0444d;
  --dashboard-success: #177c5b;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    linear-gradient(180deg, #f7f9fc 0, #f3f6fa 210px, #f6f8fb 100%);
}

#dashboard > .dashboard-command-hero {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(560px, 1.55fr) auto;
  align-items: center;
  gap: clamp(14px, 1.5vw, 26px);
  width: auto;
  min-width: 0;
  min-height: 116px;
  margin: 14px 30px 12px;
  padding: 20px 22px 20px 27px;
  overflow: hidden;
  border: 1px solid #cdd9e8;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 16%, rgba(47, 103, 200, .08), transparent 27%),
    linear-gradient(145deg, #ffffff 0%, #fbfcff 70%, #f4f8ff 100%);
  box-shadow: 0 4px 14px rgba(28, 53, 88, .07);
}

#dashboard > .dashboard-command-hero::before {
  width: 5px;
  background: linear-gradient(180deg, var(--dashboard-navy), var(--dashboard-teal));
  box-shadow: none;
}

#dashboard > .dashboard-command-hero::after {
  display: none;
}

.dashboard-hero-intro {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
}

.dashboard-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  color: #62748c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.dashboard-hero-eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dashboard-teal);
  box-shadow: 0 0 0 4px rgba(15, 139, 131, .1);
  content: "";
}

.dashboard-hero-eyebrow b {
  overflow: hidden;
  color: #3c526f;
  font-weight: 800;
  text-overflow: ellipsis;
}

#dashboard .dashboard-hero-intro h1 {
  margin-top: 3px;
  color: var(--dashboard-navy);
  font-size: clamp(22px, 1.55vw, 28px);
  font-weight: 800;
  letter-spacing: -.03em;
}

#dashboard .dashboard-hero-intro p {
  max-width: 290px;
  margin-top: 1px;
  color: var(--dashboard-muted);
  font-size: 12px;
}

.dashboard-core-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  min-width: 0;
  border: 1px solid #dce5f0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.dashboard-core-metric {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 74px;
  padding: 12px 13px;
  text-align: left;
  border: 0;
  border-left: 1px solid #e3e9f2;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--dashboard-text);
  cursor: pointer;
}

.dashboard-core-metric:first-child {
  border-left: 0;
  border-radius: 12px 0 0 12px;
}

.dashboard-core-metric:last-child {
  border-radius: 0 12px 12px 0;
}

.dashboard-core-metric::after {
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.dashboard-core-metric:hover {
  background: #f5f8fe;
  transform: none;
}

.dashboard-core-metric:hover::after {
  background: rgba(47, 103, 200, .28);
}

.dashboard-core-metric:focus-visible,
.dashboard-secondary-metric:focus-visible,
.dashboard-task-item:focus-visible,
.dashboard-risk-item:focus-visible,
.dashboard-activity-item:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(47, 103, 200, .72);
  outline-offset: -2px;
}

.dashboard-metric-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--dashboard-blue);
  border-radius: 10px;
  background: #edf3ff;
}

.dashboard-metric-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-metric-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.dashboard-metric-copy > span {
  overflow: hidden;
  color: #697991;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-copy strong {
  color: var(--dashboard-navy);
  font-size: clamp(21px, 1.55vw, 27px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}

.dashboard-metric-copy strong small {
  margin-left: 4px;
  color: #8a96a7;
  font-size: 10px;
  font-weight: 650;
}

.dashboard-core-metric[data-tone="warning"] .dashboard-metric-icon,
.dashboard-secondary-metric[data-tone="warning"] .dashboard-metric-icon {
  color: var(--dashboard-warning);
  background: #fff4df;
}

.dashboard-core-metric[data-tone="danger"] .dashboard-metric-icon,
.dashboard-secondary-metric[data-tone="danger"] .dashboard-metric-icon {
  color: var(--dashboard-danger);
  background: #fff0f1;
}

.dashboard-core-metric[data-tone="success"] .dashboard-metric-icon,
.dashboard-secondary-metric[data-tone="success"] .dashboard-metric-icon {
  color: var(--dashboard-success);
  background: #e9f8f2;
}

.dashboard-core-metric[data-tone="warning"] .dashboard-metric-copy strong { color: #9e6011; }
.dashboard-core-metric[data-tone="danger"] .dashboard-metric-copy strong { color: #b83f48; }
.dashboard-core-metric[data-tone="success"] .dashboard-metric-copy strong { color: #176f54; }

.dashboard-refresh-zone {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 7px;
  min-width: max-content;
}

.dashboard-updated-at {
  color: #7a899d;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#dashboard .dashboard-refresh-zone > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
  box-shadow: 0 3px 8px rgba(16, 42, 92, .13);
}

#dashboard .dashboard-refresh-zone > button[aria-busy="true"] span {
  animation: dashboard-spin .8s linear infinite;
}

@keyframes dashboard-spin {
  to { transform: rotate(360deg); }
}

.dashboard-secondary-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  margin: 0 30px 12px;
  padding: 6px;
  border: 1px solid var(--dashboard-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
}

.dashboard-secondary-metric {
  display: inline-grid;
  grid-template-columns: 27px minmax(0, auto) auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 32px;
  padding: 2px 10px 2px 4px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f6f8fc;
  box-shadow: none;
  color: #5f6f85;
  cursor: pointer;
}

.dashboard-secondary-metric:hover {
  border-color: #c7d6eb;
  background: #f0f5fd;
  transform: none;
}

.dashboard-secondary-metric .dashboard-metric-icon {
  width: 27px;
  height: 27px;
  border-radius: 7px;
}

.dashboard-secondary-metric .dashboard-metric-icon svg {
  width: 15px;
  height: 15px;
}

.dashboard-secondary-metric > span:not(.dashboard-metric-icon) {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-secondary-metric > strong {
  color: #243954;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dashboard-secondary-metric > small {
  color: #8c98a9;
  font-size: 9px;
}

.dashboard-secondary-empty {
  padding: 4px 10px;
  color: #7d8a9c;
  font-size: 11px;
}

.dashboard-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  margin: 0 30px 24px;
}

#dashboard .dashboard-workbench-grid .panel {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 15px;
  overflow: visible;
  border-color: var(--dashboard-line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(28, 53, 88, .045);
}

.dashboard-task-panel {
  min-width: 0;
}

.dashboard-side-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #e6ebf2;
}

.dashboard-section-head > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-section-head strong {
  color: var(--dashboard-text);
  font-size: 15px;
  font-weight: 780;
}

.dashboard-section-head small,
.dashboard-section-head > span {
  color: #8793a4;
  font-size: 10.5px;
}

.dashboard-section-head > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f5fa;
  color: #63738a;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-task-list,
.dashboard-risk-list,
.dashboard-activity-list {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.dashboard-task-list {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-task-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 10px 12px 10px 14px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  box-shadow: none;
  color: var(--dashboard-text);
  cursor: pointer;
}

.dashboard-task-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #83a5db;
  content: "";
}

.dashboard-task-item:hover {
  border-color: #b9c9df;
  background: #f7faff;
  transform: none;
}

.dashboard-task-item[data-severity="warning"] {
  border-color: #ead9b9;
  background: #fffcf6;
}

.dashboard-task-item[data-severity="warning"]::before { background: #d08a24; }

.dashboard-task-item[data-severity="danger"] {
  border-color: #efc9cc;
  background: #fff9f9;
}

.dashboard-task-item[data-severity="danger"]::before { background: #cc4c55; }

.dashboard-task-kind {
  align-self: center;
  max-width: 92px;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 7px;
  background: #edf3ff;
  color: #315f9f;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-item[data-severity="warning"] .dashboard-task-kind {
  background: #fff1d8;
  color: #9e6217;
}

.dashboard-task-item[data-severity="danger"] .dashboard-task-kind {
  background: #ffebed;
  color: #b93f48;
}

.dashboard-task-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dashboard-task-main strong,
.dashboard-activity-item strong {
  overflow: hidden;
  color: #263851;
  font-size: 12.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-main small,
.dashboard-activity-item small {
  overflow: hidden;
  color: #7b899c;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: max-content;
  padding: 6px 9px;
  border: 1px solid #d6e1f0;
  border-radius: 8px;
  background: #fff;
  color: #2c60b1;
  font-size: 10.5px;
  font-weight: 800;
}

.dashboard-task-action b {
  font-size: 15px;
  font-weight: 500;
  line-height: .8;
}

.dashboard-risk-item,
.dashboard-activity-item {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid #e5eaf1;
  border-radius: 9px;
  background: #fbfcfe;
  box-shadow: none;
  color: var(--dashboard-text);
  cursor: pointer;
}

.dashboard-risk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 11px;
}

.dashboard-risk-item:hover,
.dashboard-activity-item:hover {
  border-color: #c4d1e2;
  background: #f7faff;
  transform: none;
}

.dashboard-risk-item > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-risk-item small {
  color: #8a96a7;
  font-size: 9.5px;
  font-weight: 700;
}

.dashboard-risk-item strong {
  overflow: hidden;
  color: #384a62;
  font-size: 11.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-risk-item b {
  color: var(--dashboard-danger);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.dashboard-risk-item[data-tone="warning"] b { color: var(--dashboard-warning); }
.dashboard-risk-item[data-tone="success"] b { color: var(--dashboard-success); }

.dashboard-activity-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 9px 11px;
}

.dashboard-activity-item > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64a79f;
  box-shadow: 0 0 0 3px rgba(15, 139, 131, .1);
}

.dashboard-activity-item > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-activity-time {
  align-self: start;
  padding-top: 2px;
  color: #8b97a8;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-skeleton {
  grid-column: 1 / -1;
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 12px;
  color: #7e8b9e;
  font-size: 11px;
  text-align: center;
  border: 1px dashed #ced9e7;
  border-radius: 9px;
  background: rgba(255, 255, 255, .7);
}

.dashboard-skeleton.warn {
  color: #a15f18;
  border-color: #e7cfa8;
  background: #fffaf2;
}

#dashboard .empty {
  min-height: 72px;
  padding: 24px 12px;
  color: #8290a2;
  font-size: 11px;
  text-align: center;
  border: 1px dashed #d9e1eb;
  border-radius: 9px;
  background: #fafbfd;
}

@media (max-width: 1500px) {
  #dashboard > .dashboard-command-hero {
    grid-template-columns: minmax(180px, .62fr) minmax(460px, 1.5fr) auto;
    gap: 14px;
    padding-right: 18px;
  }

  .dashboard-core-metric {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 9px;
  }

  .dashboard-core-metric .dashboard-metric-icon {
    width: 31px;
    height: 31px;
  }

  .dashboard-core-metric .dashboard-metric-icon svg {
    width: 17px;
    height: 17px;
  }

  .dashboard-workbench-grid {
    grid-template-columns: minmax(0, 2.05fr) minmax(270px, .95fr);
  }
}

@media (max-width: 1100px) {
  #dashboard > .dashboard-command-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
  }

  .dashboard-core-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .dashboard-refresh-zone {
    grid-column: 2;
    grid-row: 1;
  }

  .dashboard-workbench-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 760px) {
  #dashboard > .dashboard-command-hero {
    margin: 10px 14px 10px;
    padding: 15px 13px 14px 20px;
    border-radius: 13px;
  }

  .dashboard-hero-intro p {
    max-width: 240px;
  }

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

  .dashboard-core-metric {
    min-height: 62px;
    border-top: 1px solid #e3e9f2;
  }

  .dashboard-core-metric:nth-child(-n + 2) { border-top: 0; }
  .dashboard-core-metric:nth-child(odd) { border-left: 0; }
  .dashboard-core-metric:first-child { border-radius: 12px 0 0 0; }
  .dashboard-core-metric:nth-child(2) { border-radius: 0 12px 0 0; }
  .dashboard-core-metric:nth-last-child(2) { border-radius: 0 0 0 12px; }
  .dashboard-core-metric:last-child { border-radius: 0 0 12px 0; }

  .dashboard-secondary-metrics,
  .dashboard-workbench-grid {
    margin-right: 14px;
    margin-left: 14px;
  }

  .dashboard-secondary-metric {
    flex: 1 1 calc(50% - 8px);
    grid-template-columns: 27px minmax(0, 1fr) auto auto;
  }

  .dashboard-side-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-task-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-task-action {
    grid-column: 2;
    justify-self: start;
    padding: 4px 7px;
  }
}

@media (max-width: 520px) {
  #dashboard > .dashboard-command-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-right: 8px;
    margin-left: 8px;
    padding: 13px 10px 12px 16px;
  }

  #dashboard .dashboard-hero-intro h1 {
    font-size: 21px;
  }

  #dashboard .dashboard-hero-intro p {
    display: none;
  }

  .dashboard-hero-eyebrow {
    font-size: 9.5px;
  }

  .dashboard-refresh-zone {
    gap: 4px;
  }

  .dashboard-updated-at {
    max-width: 88px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  #dashboard .dashboard-refresh-zone > button {
    min-width: 66px;
    height: 32px;
    padding: 0 9px;
  }

  .dashboard-core-metric {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 58px;
    padding: 9px 7px;
  }

  .dashboard-core-metric .dashboard-metric-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .dashboard-metric-copy > span {
    font-size: 10px;
  }

  .dashboard-metric-copy strong {
    font-size: 20px;
  }

  .dashboard-secondary-metrics,
  .dashboard-workbench-grid {
    margin-right: 8px;
    margin-left: 8px;
  }

  .dashboard-secondary-metrics {
    gap: 5px;
    padding: 5px;
  }

  .dashboard-secondary-metric {
    flex-basis: 100%;
  }

  #dashboard .dashboard-workbench-grid .panel {
    padding: 12px 10px;
  }

  .dashboard-section-head {
    align-items: flex-start;
  }

  .dashboard-section-head > span {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-task-item {
    gap: 8px;
    padding-right: 9px;
    padding-left: 11px;
  }

  .dashboard-task-kind {
    max-width: 72px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .dashboard-task-action {
    margin-top: 1px;
  }

  .dashboard-activity-item {
    grid-template-columns: 7px minmax(0, 1fr);
  }

  .dashboard-activity-time {
    grid-column: 2;
    justify-self: start;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #dashboard .dashboard-refresh-zone > button[aria-busy="true"] span {
    animation: none;
  }
}
