#user-profile-v2 {
  box-sizing: border-box;
  min-height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  padding: 3rem 1.5rem;

  @include media-breakpoint-up(lg) {
    padding: 39px 60px;
  }

  h1,
  h2,
  h3 {
    user-select: none;
  }

  & > header {
    display: block;
    width: 100%;
    margin-bottom: 2rem;

    @include media-breakpoint-up(lg) {
      display: inline-grid;
      grid-template-rows: 1fr;
      grid-template-columns: auto 1fr;
      grid-column-gap: 14px;
      margin-bottom: 40px;
    }

    &:not(.edit) {
      @include media-breakpoint-down(lg) {
        position: absolute;
        margin: 0;
        width: calc(100% - 3rem);
      }
    }

    & > h1 {
      @include page-header;

      grid-row: 1;
      grid-column: 1;
      user-select: none;
    }

    & > .controls {
      @include media-breakpoint-down(lg) {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0 0.5rem;

        & > .right {
          display: flex;
          flex-flow: row;
          width: 100%;

          & > .btn {
            margin-left: auto;
          }
        }

        &.edit {
          & > .right {
            display: inline-grid;
            grid-template-columns: 1fr 1fr 40px;
            grid-template-rows: 1fr;
            column-gap: 1rem;

            :nth-child(1) {
              grid-column: 3;
              grid-row: 1;
            }

            :nth-child(2) {
              grid-column: 2;
              grid-row: 1;
            }

            :nth-child(3) {
              grid-column: 1;
              grid-row: 1;
            }

            & > .btn {
              width: 100%;
            }
          }
        }
      }
      @include media-breakpoint-up(lg) {
        grid-row: 1;
        grid-column: 2;
        width: 100%;
        display: flex;
        flex-flow: row nowrap;
        align-items: center;
        align-content: flex-start;
        justify-content: flex-start;

        & > .left,
        & > .right {
          display: flex;
          flex-flow: row nowrap;
          column-gap: 1rem;
        }

        & > .right {
          margin-left: auto;
        }
      }

      .btn {
        height: 40px;
      }
    }
  }

  & > .content {
    display: grid;
    row-gap: 3rem;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, auto);
    grid-template-areas:
      'wide-cards'
      'cards-2'
      'cards-1';

    @include media-breakpoint-up(xl) {
      gap: 35px;
      grid-template-columns: 1fr 440px;
      grid-template-rows: auto;
      grid-template-areas:
        'wide-cards cards-2'
        'wide-cards cards-1';
    }

    @include media-breakpoint-up(xxl) {
      grid-template-columns: 1fr 440px 384px;
      grid-template-areas: 'wide-cards cards-1 cards-2';
    }

    & > div > section > header {
      box-sizing: border-box;
      padding: 0 0.5rem;
      margin-bottom: 1.5rem;

      @include media-breakpoint-up(lg) {
        margin-bottom: 2rem;
      }

      & > h2 {
        @include card-header;

        user-select: none;
      }
    }

    & > .wide-cards,
    & > .cards-1,
    & > .cards-2,
    & > .cards-3 {
      display: flex;
      flex-flow: column;
      justify-content: flex-start;
      row-gap: 3rem;
      @include media-breakpoint-up(lg) {
        row-gap: 3.5rem;
      }
    }

    & > .wide-cards {
      grid-area: wide-cards;
    }

    & > .cards-1 {
      grid-area: cards-1;
    }

    & > .cards-2 {
      grid-area: cards-2;
    }
  }

  & > .content-enterprise-enabled {
    & > .cards-3 {
      grid-area: cards-3;
    }

    grid-template-areas:
      'wide-cards'
      'cards-1'
      'cards-2'
      'cards-3';

    @include media-breakpoint-up(xl) {
      grid-template-areas:
        'wide-cards cards-1'
        'wide-cards cards-2'
        'wide-cards cards-3';
    }

    @include media-breakpoint-up(xxl) {
      grid-template-columns: 1fr 440px 384px;
      grid-template-rows: auto 1fr;
      grid-template-areas:
        'wide-cards cards-1 cards-2'
        'wide-cards cards-1 cards-3';
    }
  }
}
