Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can β€” learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company πŸ‘‡

5.4 KB
Raw Blame
// ===================
// AngelaMos | 2026
// dashboard.module.scss
// ===================

@use '@/styles' as *;

.page {
  min-height: calc(100vh - 56px);
  padding: $space-6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.header {
  margin-bottom: $space-6;
}

.title {
  font-size: 1.65rem;
  font-weight: $font-weight-semibold;
  color: $text-default;
  margin-bottom: $space-2;
}

.subtitle {
  font-size: $font-size-base;
  color: $text-lighter;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: $space-4;
  margin-bottom: $space-8;

  @include breakpoint-up('md') {
    grid-template-columns: repeat(4, 1fr);
  }
}

.statCard {
  @include flex-column;
  align-items: center;
  gap: $space-2;
  padding: $space-5;
  background: $bg-surface-100;
  border: 1px solid $border-default;
  border-radius: $radius-lg;
}

.statValue {
  font-size: $font-size-2xl;
  font-weight: $font-weight-semibold;
  color: $accent-orange;
}

.statLabel {
  font-size: $font-size-xs;
  color: $text-lighter;
  text-transform: uppercase;
  letter-spacing: $tracking-wide;
}

.statsLoading {
  grid-column: 1 / -1;
  @include flex-center;
  padding: $space-8;
  color: $text-muted;
  font-size: $font-size-sm;
}

.columns {
  display: grid;
  gap: $space-6;

  @include breakpoint-up('lg') {
    grid-template-columns: 2fr 1fr;
  }
}

.section {
  background: $bg-surface-100;
  border: 1px solid $border-default;
  border-radius: $radius-lg;
  overflow: hidden;
}

.sectionHeader {
  padding: $space-4;
  border-bottom: 1px solid $border-muted;
}

.sectionTitle {
  font-size: $font-size-sm;
  font-weight: $font-weight-medium;
  color: $text-default;
}

.reportsList {
  @include flex-column;
}

.reportItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: $space-3;
  padding: $space-3 $space-4;
  border-bottom: 1px solid $border-muted;
  text-decoration: none;
  @include transition-fast;

  &:last-of-type {
    border-bottom: none;
  }

  @include hover {
    background: $bg-surface-75;
  }

  @include breakpoint-down('sm') {
    flex-direction: column;
    align-items: flex-start;
  }
}

.reportMain {
  @include flex-column;
  gap: $space-1;
  min-width: 0;
  flex: 1;
}

.reportTitle {
  font-size: $font-size-sm;
  color: $text-default;
  @include truncate;
}

.reportDate {
  font-size: $font-size-xs;
  color: $text-muted;
}

.reportMeta {
  display: flex;
  gap: $space-2;
  flex-shrink: 0;
}

.severity {
  display: inline-flex;
  padding: $space-0-5 $space-2;
  border-radius: $radius-sm;
  font-size: $font-size-xs;
  font-weight: $font-weight-medium;

  &[data-severity='critical'] {
    background: hsl(0 72% 51% / 20%);
    color: hsl(0, 72%, 60%);
  }

  &[data-severity='high'] {
    background: hsl(24 95% 53% / 20%);
    color: hsl(24, 95%, 63%);
  }

  &[data-severity='medium'] {
    background: hsl(45 93% 47% / 20%);
    color: hsl(45, 93%, 57%);
  }

  &[data-severity='low'] {
    background: hsl(217 91% 60% / 20%);
    color: hsl(217, 91%, 70%);
  }

  &[data-severity='informational'] {
    background: $bg-surface-200;
    color: $text-lighter;
  }
}

.status {
  display: inline-flex;
  padding: $space-0-5 $space-2;
  border-radius: $radius-full;
  font-size: $font-size-xs;
  font-weight: $font-weight-medium;

  &[data-status='new'] {
    background: hsl(217 91% 60% / 20%);
    color: hsl(217, 91%, 70%);
  }

  &[data-status='triaging'] {
    background: hsl(38 92% 50% / 20%);
    color: hsl(38, 92%, 60%);
  }

  &[data-status='needs_more_info'] {
    background: hsl(263 70% 50% / 20%);
    color: hsl(263, 70%, 70%);
  }

  &[data-status='accepted'],
  &[data-status='resolved'] {
    background: hsl(142 76% 36% / 20%);
    color: hsl(142, 76%, 46%);
  }

  &[data-status='duplicate'],
  &[data-status='not_applicable'] {
    background: $bg-surface-200;
    color: $text-lighter;
  }

  &[data-status='informative'] {
    background: hsl(188 78% 41% / 20%);
    color: hsl(188, 78%, 51%);
  }

  &[data-status='disclosed'] {
    background: hsl(160 84% 39% / 20%);
    color: hsl(160, 84%, 49%);
  }
}

.viewAll {
  display: flex;
  justify-content: center;
  padding: $space-3;
  font-size: $font-size-sm;
  color: $text-light;
  text-decoration: none;
  border-top: 1px solid $border-muted;
  @include transition-fast;

  @include hover {
    background: $bg-surface-75;
    color: $text-default;
  }
}

.reportsLoading {
  @include flex-center;
  padding: $space-8;
  color: $text-muted;
  font-size: $font-size-sm;
}

.emptyReports {
  @include flex-column-center;
  padding: $space-8;
  gap: $space-4;

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

.browseLink {
  display: inline-flex;
  padding: $space-2 $space-4;
  background: $accent-orange;
  border-radius: $radius-md;
  font-size: $font-size-sm;
  font-weight: $font-weight-medium;
  color: $white;
  text-decoration: none;
  @include transition-fast;

  @include hover {
    filter: brightness(1.1);
  }
}

.quickActions {
  @include flex-column;
}

.actionCard {
  display: flex;
  flex-direction: column;
  gap: $space-1;
  padding: $space-4;
  border-bottom: 1px solid $border-muted;
  text-decoration: none;
  @include transition-fast;

  &:last-child {
    border-bottom: none;
  }

  @include hover {
    background: $bg-surface-75;
  }
}

.actionTitle {
  font-size: $font-size-sm;
  font-weight: $font-weight-medium;
  color: $text-default;
}

.actionDesc {
  font-size: $font-size-xs;
  color: $text-muted;
}