body {
  min-height: 100vh;
  margin: 0;
  font-size: 14px;
  color: var(--secondary-color-darkest);
}

:root {
  --secondary-color: hsl(240, 56%, 98%);
  --secondary-color-darker: hsl(240, 56%, 90%);
  --secondary-color-darkest: hsl(243, 24%, 43%);
  --info-color-darker: rgb(51, 42, 124);
  --info-color-lighter: rgb(92, 95, 178);
}

// dashboard

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 48px;
  margin: 12px;
}

// dashboard nav

.dashboard-sidenav {
  display: grid;
  grid-template-rows: repeat(3, auto);
  justify-items: center;
  color: white;
  background: var(--info-color-darker);
  border-radius: 30px;
}

.logo {
  padding: 36px 18px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-icon-list {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style-type: none;

  &__item {
    padding: 36px 18px;

    &:first-child {
      padding-top: 0;
    }
  }
}

.logout {
  padding: 36px 18px;
}

// dashboard content

.welcome-banner {
  padding: 18px 36px;
  color: white;
  background: var(--warning-color-darker);
  border-radius: 20px;
}

.section-titles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0;
}

.section-title {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  font-size: 18px;
}

.nav-btns {
  --btn-group-divider-length: 0;

  margin-left: 24px;

  .btn {
    padding: 9px 0;
    line-height: 1;

    &:first-child {
      padding-left: 15px;
      padding-right: 3px;
    }

    &:last-child {
      padding-left: 3px;
      padding-right: 15px;
    }
  }
}

.month {
  padding: 9px 18px;
  color: var(--secondary-color-darkest);
}

.time-list {
  display: grid;
  grid-template-columns: repeat(7, auto);
  column-gap: 21px;
  padding: 18px 0;
  border: 1px solid var(--secondary-color-lighter);
  border-left: none;
  border-right: none;
  list-style-type: none;

  &__item {
    display: grid;
    grid-template-rows: repeat(3, auto);
    justify-items: center;
    padding: 16px 12px;
    border-radius: 20px;

    &.active {
      color: white;
      background: var(--danger-color);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);

      .day-dot {
        color: white !important;
      }
    }

    .day {
      font-weight: bold;
      margin-bottom: 18px;
    }

    .day-number {
      margin-bottom: 8px;
    }

    .day-dot {
      width: 6px;
      height: 6px;
      color: var(--dot-color);
      background: currentColor;
      border-radius: 50%;
    }
  }
}

.weeks-option {
  display: flex;

  &__item {
    color: var(--secondary-color-darkest);
    text-decoration: none;

    &:not(:last-child) {
      margin-right: 21px;
    }

    &:not(.active) {
      opacity: 0.5;
    }
  }
}

.junk-list {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 30px;
  padding: 0;
  margin: 0;
  list-style-type: none;

  &__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 18px 24px;
    border: 1px solid var(--secondary-color-lighter);
    border-radius: 20px;

    &:not(.active) {
      max-height: 148px;
    }

    .junk-icon {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 40px;
      height: 40px;
      border: 1px solid var(--junk-color);
      border-radius: 10px;
    }

    .junk-name {
      margin-top: 18px;
      white-space: nowrap;
    }

    .junk-size {
      margin-top: 9px;
      font-size: 18px;
      font-weight: bold;
      white-space: nowrap;
    }

    &.active {
      padding: 18px 3px 5px 3px;
      border: none;
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

      .junk-icon {
        background: var(--junk-color);

        svg {
          fill: white;
        }
      }

      .junk-size {
        margin-top: 21px;
        padding: 18px 36px;
        color: white;
        background: var(--junk-color);
        border-radius: 15px;
      }
    }
  }
}

.monitor-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 0;
  margin: 0;
  list-style-type: none;

  &__item {
    display: grid;
    grid-template-columns: repeat(2, auto);
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    border-radius: 20px;

    .monitor-data {
      padding: 18px 0;

      .monitor-type {
        font-weight: bold;
        white-space: nowrap;
        margin: 0 40px 18px 0;
      }
    }

    .monitor-gauge {
      padding: 0 0 0 40px;
      border-left: 1px solid var(--secondary-color-lighter);

      .gauge {
        --gauge-circle-color-lighter: var(--secondary-color);
        --gauge-color: var(--secondary-color-darkest);

        width: 70px;
        height: 70px;

        &::before {
          width: 87%;
          height: 87%;
          content: counter(value) "%";
        }
      }
    }

    &.active {
      color: white;
      background: var(--info-color-darker);

      .monitor-gauge {
        border-left-color: var(--info-color-lighter);
      }

      .gauge {
        --gauge-bg: var(--info-color-darker);
        --gauge-color-lighter: var(--info-color-lighter);

        color: white;
      }
    }
  }
}

// dashboard others

.dashboard-others {
  padding: 18px 48px;
  background: var(--secondary-color);
  border-radius: 30px;
}

.function-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style-type: none;

  &__item {
    padding: 4px;
    background: white;
    border-radius: 15px;
    transition: 0.3s;

    &:hover {
      box-shadow: 0 0 0 1px var(--function-color);
    }

    .function {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px;
      color: white;
      background: var(--function-color);
      border-radius: 15px;
    }

    .function-icon {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 40px;
      height: 40px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 10px;
    }

    .function-data {
      display: flex;
      justify-content: space-between;
      padding: 30px 16px 21px 16px;
    }

    .function-name {
      margin-right: 22px;
      white-space: nowrap;
    }

    .function-switch {
      --switch-ball-bg: var(--function-color);
      --switch-checked-bg: var(--function-color);
      --switch-border-color: var(--function-color);
      --switch-hover-border-color: transparent;
      --switch-disabled-checked-bg: transparent;

      &:checked {
        --switch-border-color: var(--function-color);
      }
    }

    &.update-function {
      &:hover {
        box-shadow: 0 0 0 1px var(--secondary-color-darker);
      }

      .function-icon {
        color: var(--secondary-color-darker);
        background: white;
      }

      .function-menu {
        color: var(--secondary-color-darker);
      }

      .function-switch {
        --switch-ball-bg: var(--secondary-color-darker);
        --switch-checked-bg: var(--secondary-color-darker);
        --switch-border-color: var(--secondary-color-darker);
        --switch-hover-border-color: transparent;
        --switch-disabled-checked-bg: transparent;

        &:checked {
          --switch-border-color: var(--secondary-color-darker);
        }
      }
    }
  }
}

.statistics {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);

  .progress-data {
    display: flex;
    justify-content: space-between;
  }

  .progress-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-weekday {
    margin-bottom: 14px;
  }

  .progress-rate {
    font-size: 18px;
    font-weight: bold;
  }
}

.progress-list {
  display: grid;
  gap: 40px;
  padding: 30px 0 0 0;
  margin: 0;
  list-style-type: none;

  &__item {
    display: flex;
    align-items: center;

    .weekday-abbr {
      box-sizing: border-box;
      padding-right: 36px;
      max-width: 32px;
    }

    .progress-bar {
      --progress-bar-color: var(--secondary-color);

      width: 300px;
    }

    &.active {
      .weekday-abbr {
        color: var(--warning-color);
      }

      .progress-bar {
        --progress-color: var(--warning-color);
      }
    }
  }
}
