.t-main {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  padding: 40px 0;
  color: black;
  line-height: 1.2;
  * {
    box-sizing: border-box;
  }
  .t-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
}

body {
  min-width: 320px;
  margin: 0;
}

.t-container {
  width: 1680px;
  padding: 0 100px;
  max-width: 100%;
  margin: 0 auto;
  @media (width < 1024px) {
    padding: 0 24px;
  }
  @media (width < 767px) {
    padding: 0 16px;
  }
}

.t-header {
  display: grid;
  grid-template-columns: repeat(4, 205px) 1fr;
  gap: 44px;
  position: relative;
  @media (width < 1440px) {
    gap: 24px 16px;
    grid-template-columns: repeat(4, 168px) 1fr;
  }
  @media (width < 1024px) {
    grid-template-columns: 1fr 1fr;
  }
  @media (width < 480px) {
    grid-template-columns: 1fr;
  }
}

.t-header-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: auto;
  @media (width > 1024px) {
    padding: 20px 0;
    &:not(:last-child) {
      padding-right: 44px;
      border-right: solid 1px #e7e7f1;
      @media (width < 1440px) {
        padding-right: 16px;
      }
    }
  }
  @media (width < 1024px) {
    &:last-child {
      grid-column: 1/-1;
    }
  }
}

.t-header-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8f96c8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  svg {
    flex: none;
  }
}

.t-header-item-value {
  font-size: 20px;
  font-weight: 500;
}

.t-header-item-tag {
  min-height: 28px;
  align-items: center;
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  border-radius: 6px;
  background-color: #564fff;
  line-height: 1;
  width: fit-content;
  display: flex;
}

.t-header-item-inputs {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.t-header-checkbox {
  --icon: 20px;
  --radius: 4px;
  display: inline-flex;
  align-items: flex-start;
  width: fit-content;
  gap: 6px;
  position: relative;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #8f96c8;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: -2px;
  input {
    position: absolute;
    left: 0;
    top: 0;
    cursor: pointer;
    opacity: 0;
    border-radius: var(--radius);
    width: var(--icon);
    height: var(--icon);
  }
  & > i {
    flex: none;
    border: solid 1px;
    border-radius: var(--radius);
    width: var(--icon);
    height: var(--icon);
    display: grid;
    place-items: center;
    svg {
      transition:
        opacity 0.4s,
        transform 0.4s;
      opacity: 0;
      transform: scale(0);
    }
  }
  & > span {
    align-self: center;
  }
  &:has(input:checked) {
    & > i {
      svg {
        opacity: 1;
        transform: scale(1);
      }
    }
  }
}

.t-header-select {
  width: 88px;
  height: 36px;
  border-radius: 4px;
  border: solid 1px #8f96c8;
  padding: 0 32px 0 12px;
  cursor: pointer;
  user-select: none;
  appearance: none;
  outline: none;
  background: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.48 1.24445L10.2978 9.0026e-07L5.75556 4.54222L1.21333 1.06073e-07L5.03167e-07 1.24444L5.75556 7L11.48 1.24445Z' fill='%23564FFF'/%3E%3C/svg%3E%0A")
    right 12px center / 12px 8px no-repeat;
  @media (width >= 1024px) {
    position: absolute;
    left: calc(100% + 6px);
    top: calc(100% + 32px);
  }
}

.t-table {
  font-size: 13px;
  color: #8f96c8;
  line-height: 1.24;
  @media (width >= 1024px) {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
  }
  @media (width < 1024px) {
    display: block;
    border: solid 1px #e7e7f1;
    padding: 16px 12px;
    border-radius: 6px;
  }
  thead {
    @media (width < 1024px) {
      display: none;
    }
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #8f96c8;
    td {
      padding: 8px 24px 20px 24px;
      @media (width < 1440px) {
        padding: 16px;
      }
    }
  }
  tbody {
    @media (width >= 1024px) {
      td {
        min-width: 232px;
        border-bottom: solid 1px #e7e7f1;
        padding: 20px 24px;
        @media (width < 1440px) {
          padding: 16px;
          min-width: 168px;
        }
        &:first-child {
          width: 100%;
          border-left: solid 1px #e7e7f1;
        }
        &:last-child {
          min-width: 48px;
          width: 0;
          border-right: solid 1px #e7e7f1;
        }
      }
      tr {
        &:first-child {
          td {
            border-top: solid 1px #e7e7f1;
            &:first-child {
              border-top-left-radius: 6px;
            }
            &:last-child {
              border-top-right-radius: 6px;
            }
          }
        }
        &:last-child {
          td {
            &:first-child {
              border-bottom-left-radius: 6px;
            }
            &:last-child {
              border-bottom-right-radius: 6px;
            }
          }
        }
      }
    }
    @media (width < 1024px) {
      display: flex;
      flex-direction: column;
      gap: 24px;
      tr {
        display: flex;
        flex-direction: column;
        gap: 16px;
        &:not(:last-child) {
          padding-bottom: 24px;
          border-bottom: solid 1px #e7e7f1;
        }
      }
      td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        &:before {
          content: attr(data-title);
          font-size: 12px;
          font-weight: 700;
          text-transform: uppercase;
          color: #8f96c8;
        }
      }
    }
  }
}

.t-table-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.t-table-item-title {
  font-size: 16px;
  color: #564fff;
  font-weight: 500;
}

.t-table-status {
  font-size: 14px;
  font-weight: 500;
}

.t-table-amount {
  text-transform: uppercase;
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  white-space: no;
}

.t-table-date {
  font-size: 14px;
  color: #8f96c8;
  font-weight: 500;
}

.t-table-settings {
  all: unset;
  display: flex;
  cursor: pointer;
  user-select: none;
  color: #dddeea;
  transition: color 0.4s;
  &:hover {
    color: #564fff;
  }
}

.t-pagination {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  align-items: center;
  @media (width < 1024px) {
    justify-content: space-between;
    &:after {
      content: attr(data-pages);
    }
  }
  span,
  a {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    border-radius: 6px;
    aspect-ratio: 1;
    color: #818181;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition:
      color 0.4s,
      border-color 0.4s;
    border: solid 1px #e7e7f1;
    &:hover {
      color: black;
    }
    &.active {
      color: black;
      border-color: black;
      pointer-events: none;
    }
    @media (width < 1024px) {
      &:not(.t-pagination-prev):not(.t-pagination-next) {
        display: none;
      }
      &.t-pagination-next {
        order: 1;
      }
    }
  }
}
