@use '@/assets/styles/variables' as *;

.dashboard-view {
  &__loading {
    display: flex;
    justify-content: center;
    padding: $space-2xl;
  }

  &__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: $space-md;
    margin-bottom: $space-lg;

    @media (max-width: $bp-tablet) {
      grid-template-columns: repeat(2, 1fr);
    }
    @media (max-width: $bp-mobile) {
      grid-template-columns: 1fr;
    }
  }

  &__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: $space-md;

    @media (max-width: $bp-tablet) {
      grid-template-columns: 1fr;
    }
  }

  &__chart-wrapper {
    height: 280px;
    position: relative;
  }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: $space-md;

  &__icon {
    width: 48px;
    height: 48px;
    border-radius: $radius-lg;
    background: var(--p-primary-100);
    color: var(--p-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: $font-size-xl;
    flex-shrink: 0;
  }

  &__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  &__value {
    font-size: $font-size-2xl;
    font-weight: 700;
    color: $color-text;
    line-height: 1.2;
  }

  &__label {
    font-size: $font-size-sm;
    color: $color-text-muted;
  }

  &__trend {
    margin-left: auto;
    font-size: $font-size-sm;
    font-weight: 600;
    &--up { color: $color-success; }
    &--down { color: $color-danger; }
  }
}
