/* Charts and dashboard orientation */

.dolo-chart {
  position: relative;
  width: 100%;
  height: 18rem;
}

.dolo-chart[data-size="compact"] {
  height: 13rem;
}

.dolo-chart[data-size="tall"] {
  height: 21rem;
}

.dolo-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.dolo-dashboard {
  min-width: 0;
  color: var(--dolo-text);
}

.dolo-dashboard__header {
  display: grid;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.375rem;
}

.dolo-dashboard__header .dolo-type-page-title {
  margin-top: 0.25rem;
}

.dolo-dashboard__header .dolo-type-body {
  max-width: 42rem;
  margin-top: 0.5rem;
}

.dolo-dashboard__create-action {
  display: none;
}

.dolo-segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-surface-sunken);
  padding: 0.1875rem;
}

.dolo-segmented-control[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.dolo-segmented-control[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dolo-segmented-control.dolo-segmented-control--icon-only {
  grid-template-columns: repeat(var(--dolo-segment-count), 2.75rem);
  width: max-content;
}

.dolo-segmented-control__item {
  display: inline-flex;
  min-width: 0;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--dolo-radius-control) - 0.1875rem);
  padding: 0.5rem 0.625rem;
  color: var(--dolo-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
  white-space: nowrap;
}

.dolo-segmented-control[aria-busy="true"] {
  cursor: progress;
}

.dolo-segmented-control__item:hover {
  color: var(--dolo-text);
}

.dolo-segmented-control__item:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--dolo-focus);
  outline-offset: -3px;
}

.dolo-segmented-control__item[aria-current="page"] {
  background: var(--dolo-surface-raised);
  box-shadow: var(--dolo-shadow-low);
  color: var(--dolo-text);
}

.dolo-segmented-control--icon-only .dolo-segmented-control__item {
  padding: 0.5rem;
}

.dolo-segmented-control--icon-only .dolo-segmented-control__item > span[aria-hidden="true"] {
  display: flex;
  width: 1rem;
  height: 1rem;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.dolo-segmented-control--icon-only .dolo-icon {
  display: flex;
  width: 1rem;
  height: 1rem;
  flex: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  vertical-align: 0;
}

.dolo-segmented-control--icon-only .dolo-icon::before {
  display: block;
  line-height: 1;
}

.dolo-dashboard__alerts {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
}

.dolo-dashboard__alerts:not(:has(.dolo-attention-banner:not([hidden]))) {
  display: none;
}

.dolo-dashboard__section + .dolo-dashboard__section {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.dolo-dashboard__section {
  container: dashboard-section / inline-size;
}

.dolo-dashboard__section-heading {
  display: grid;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.dolo-dashboard__section-heading .dolo-type-section-title {
  margin-top: 0.25rem;
}

.dolo-dashboard__section-heading .dolo-type-body-small {
  max-width: 44rem;
  margin-top: 0.375rem;
}

.dolo-dashboard__section-context {
  display: grid;
  width: 100%;
  gap: 0.625rem;
}

.dolo-dashboard__period-context {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 0.125rem;
  border: 1px solid var(--dolo-border);
  border-radius: 0.75rem;
  background: var(--dolo-surface-subtle);
  padding: 0.625rem 0.75rem;
  color: var(--dolo-text-muted);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.dolo-dashboard__period-context strong {
  color: var(--dolo-text-soft);
  font-weight: 800;
}

.dolo-dashboard__metric-grid,
.dolo-dashboard__insight-grid,
.dolo-dashboard__operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.875rem;
}

.dolo-dashboard__insight-grid,
.dolo-dashboard__operations-grid {
  margin-top: 0.875rem;
}

.dolo-dashboard__panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  border-bottom: 1px solid var(--dolo-border);
  padding: 1rem;
}

.dolo-dashboard__panel-heading .dolo-type-body-small {
  margin-top: 0.25rem;
}

.dolo-dashboard__panel-link {
  border-radius: 0.4rem;
  color: var(--dolo-action-primary);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.dolo-dashboard__panel-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.dolo-dashboard__chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--dolo-text-muted);
  font-size: 0.6875rem;
  font-weight: 750;
}

.dolo-dashboard__chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.dolo-dashboard__chart-legend i {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0.2rem;
  background: var(--dolo-chart-2);
}

.dolo-dashboard__chart-legend [data-series="expenses"] i {
  background: var(--dolo-chart-5);
}

.dolo-dashboard__chart-panel > .dolo-chart {
  margin-block: 1rem;
  padding-inline: 0.75rem;
}

.dolo-dashboard__category-panel {
  min-width: 0;
}

.dolo-dashboard__category-total {
  margin: 0;
  padding: 1.25rem 1rem 0.5rem;
  color: var(--dolo-text);
  font-family: var(--dolo-font-display);
  font-size: clamp(1.5rem, 7vw, 2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.dolo-dashboard__category-total span {
  display: block;
  margin-top: 0.1875rem;
  color: var(--dolo-text-muted);
  font-family: var(--dolo-font-body);
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: normal;
}

.dolo-dashboard__category-list,
.dolo-dashboard__record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dolo-dashboard__category-list {
  display: grid;
  gap: 0.875rem;
  padding: 0.75rem 1rem 1.25rem;
}

.dolo-dashboard__category-list li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.375rem;
  color: var(--dolo-text-soft);
  font-size: 0.75rem;
}

.dolo-dashboard__category-list strong {
  color: var(--dolo-text);
  font-variant-numeric: tabular-nums;
}

.dolo-dashboard__category-track {
  display: block;
  height: 0.4375rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--dolo-surface-sunken);
}

.dolo-dashboard__category-track i {
  display: block;
  width: var(--dolo-category-share);
  min-width: 0.25rem;
  height: 100%;
  border-radius: inherit;
  background: var(--dolo-chart-1);
}

.dolo-dashboard__category-list li:nth-child(6n + 2) .dolo-dashboard__category-track i {
  background: var(--dolo-chart-2);
}

.dolo-dashboard__category-list li:nth-child(6n + 3) .dolo-dashboard__category-track i {
  background: var(--dolo-chart-3);
}

.dolo-dashboard__category-list li:nth-child(6n + 4) .dolo-dashboard__category-track i {
  background: var(--dolo-chart-4);
}

.dolo-dashboard__category-list li:nth-child(6n + 5) .dolo-dashboard__category-track i {
  background: var(--dolo-chart-5);
}

.dolo-dashboard__category-list li:nth-child(6n) .dolo-dashboard__category-track i {
  background: var(--dolo-chart-6);
}

.dolo-dashboard__record-panel {
  min-width: 0;
  overflow: hidden;
}

.dolo-dashboard__record-list li + li {
  border-top: 1px solid var(--dolo-border);
}

.dolo-dashboard__record-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 3.5rem;
  gap: 0.625rem;
  align-items: center;
  padding: 0.625rem 0.75rem;
  color: inherit;
  text-decoration: none;
}

.dolo-dashboard__record-entry[href]:hover {
  background: var(--dolo-surface-subtle);
}

.dolo-dashboard__record-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.6875rem;
  background: var(--dolo-info-soft);
  color: var(--dolo-info);
}

.dolo-dashboard__record-icon[data-tone="danger"] {
  background: var(--dolo-danger-soft);
  color: var(--dolo-danger);
}

.dolo-dashboard__record-copy,
.dolo-dashboard__record-value {
  display: grid;
  min-width: 0;
  gap: 0.125rem;
}

.dolo-dashboard__record-copy strong,
.dolo-dashboard__record-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dolo-dashboard__record-copy strong,
.dolo-dashboard__record-value strong {
  color: var(--dolo-text);
  font-size: 0.75rem;
}

.dolo-dashboard__record-copy span {
  color: var(--dolo-text-muted);
  font-size: 0.6875rem;
}

.dolo-dashboard__record-value {
  justify-items: end;
}

.dolo-dashboard__record-value strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dolo-dashboard__empty-list {
  margin: 0;
  padding: 1.5rem 1rem;
  color: var(--dolo-text-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.dolo-pos-home__header {
  min-width: 0;
  margin-bottom: 1.375rem;
}

.dolo-pos-home__header > div {
  max-width: 48rem;
}

.dolo-pos-home__header .dolo-type-label,
.dolo-pos-home__header .dolo-type-page-title,
.dolo-pos-home__header .dolo-type-body {
  margin: 0;
}

.dolo-pos-home__header .dolo-type-body {
  margin-top: 0.35rem;
  color: var(--dolo-text-muted);
}

.dolo-pos-home__guidance {
  overflow: hidden;
}

.dolo-pos-home__header + .dolo-dashboard__section {
  margin-top: 0;
}

.dolo-pos-home__guidance + .dolo-dashboard__section {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.dolo-pos-home__record-panel {
  min-width: 0;
  overflow: hidden;
}

.dolo-pos-home__record-panel .dolo-dashboard__panel-heading {
  border-bottom: 0;
}

.dolo-pos-home__record-panel .dolo-index-records__cards {
  border-top: 1px solid var(--dolo-divider);
}

.dolo-pos-home__records,
.dolo-pos-home__destinations {
  align-items: start;
}

@container dashboard-section (min-width: 35rem) {
  .dolo-dashboard__section-context {
    grid-template-columns: 18.375rem minmax(0, max-content);
    align-items: center;
    justify-content: space-between;
    column-gap: 0.75rem;
  }

  .dolo-dashboard__period-context {
    width: fit-content;
    justify-self: end;
  }
}

@container dashboard-section (min-width: 68rem) {
  .dolo-dashboard__section-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dolo-dashboard__section-context {
    width: auto;
  }
}

@media (min-width: 42rem) {
  .dolo-segmented-control {
    grid-template-columns: repeat(var(--dolo-segment-count), minmax(0, 1fr));
  }

  .dolo-dashboard__metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dolo-dashboard__metric-grid .dolo-comparison-metric[data-emphasis="featured"] {
    grid-column: 1 / -1;
  }

  .dolo-dashboard__record-entry {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
  }

  .dolo-dashboard__record-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .dolo-dashboard__record-value {
    justify-items: end;
  }
}

@media (min-width: 64rem) {
  .dolo-dashboard__header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dolo-dashboard__create-action {
    display: block;
  }

  .dolo-dashboard__metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dolo-dashboard__metric-grid .dolo-comparison-metric[data-emphasis="featured"] {
    grid-column: auto;
  }

  .dolo-dashboard__insight-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
  }

  .dolo-dashboard__operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dolo-dashboard__record-panel--wide {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dolo-application-rail,
  .dolo-segmented-control__item,
  .dolo-switch span::after {
    transition: none;
  }
}

@media (forced-colors: active) {
  .dolo-application-rail,
  .dolo-mobile-navigation,
  .dolo-preset-card,
  .dolo-more-list {
    border: 1px solid CanvasText;
  }
}
