page {
    background: #f3f4f5;
}

// mt0,mr0,mb0,ml0 --> mt100,mr100,mb100,ml100
@for $i from 0 through 100 {
    .mt#{$i} {
        margin-top: #{$i}rpx;
    }

    .mr#{$i} {
        margin-right: #{$i}rpx;
    }

    .mb#{$i} {
        margin-bottom: #{$i}rpx;
    }

    .ml#{$i} {
        margin-left: #{$i}rpx;
    }

    .pt#{$i} {
        padding-top: #{$i}rpx;
    }

    .pr#{$i} {
        padding-right: #{$i}rpx;
    }

    .pb#{$i} {
        padding-bottom: #{$i}rpx;
    }

    .pl#{$i} {
        padding-left: #{$i}rpx;
    }
    .pd#{$i} {
        padding: #{$i}rpx;
    }
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hide-txt {
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    word-break: break-all;
    -webkit-line-clamp: 1;
}

.clamp-txt {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-all;
}

.fixed-btn {
    position: fixed;
    right: 80rpx;
    bottom: 200rpx;
    width: 126rpx;
    height: 126rpx;
    background: $uni-theme-white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);

    image {
        height: 66rpx;
        width: 66rpx;
    }
}

.grid-card {
    border-radius: 12rpx;
    margin-bottom: 20rpx;

    .grid-card-title {
        padding: 0 0 20rpx;
        font-size: 28rpx;
        color: #111;
        font-weight: 700;
    }

    .grid-card-content-4,
    .grid-card-content-2,
    .grid-card-content-1,
    .grid-card-content-3,
    .grid-card-content-5,
    .grid-card-content-6 {
        display: grid;
        border-left: 2rpx solid #ccc;
        border-top: 2rpx solid #ccc;
        font-size: 24rpx;
        grid-template-columns: 1fr 1fr 1fr 1fr;

        .item {
            padding: 0 4rpx;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            border-bottom: 2rpx solid #ccc;
            border-right: 2rpx solid #ccc;
            padding: 4rpx;
            background: $uni-theme-white;
        }

        .item-title {
            background: unset;
            padding: 8rpx 4rpx;
        }
    }

    .grid-card-content-1 {
        grid-template-columns: 1fr;
    }
    .grid-card-content-2 {
        grid-template-columns: 1fr 2fr;
    }

    .grid-card-content-3 {
        grid-template-columns: 1fr 2fr 2fr;
    }

    .grid-card-content-5 {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    }

    .grid-card-content-6 {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    }
}

.index {
    .header {
        margin: 0 20rpx;
        display: grid;
        grid-gap: 20rpx;
        grid-template-columns: 1fr 1fr 1fr;
        .header-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 10rpx 10rpx 20rpx;
            color: #fff;
            font-size: 28rpx;
            background: $uni-theme-color;
            border-radius: 12rpx;
            .header-item-value {
                font-size: 44rpx;
            }
            .header-item-label {
                font-size: 26rpx;
            }
        }
    }
}

.nav {
    position: sticky;
    top: 0;
    left: 0;
    padding: 20rpx 20rpx 0;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    background: rgb(243, 244, 245);
    z-index: 2;

    .nav-menu {
        padding: 6rpx 20rpx;
        margin-left: 20rpx;
        margin-bottom: 20rpx;
        font-size: 24rpx;
        border-radius: 8rpx;
        background: #ebeaec;
        color: #666;
        &-active {
            background: #dfe5f7;
            color: $uni-theme-color;
        }
        &-btn {
            background: $uni-theme-color;
            color: #fff;
        }
    }
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: $uni-theme-color;
    color: #fff;
    height: 80rpx;
    border-radius: 12rpx;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 40rpx;
    background: $uni-theme-color;
    color: #fff;
    height: 60rpx;
    font-size: 24rpx;
    border-radius: 12rpx;
}

.device {
    /deep/ .uni-card:first-of-type {
        margin-top: 0 !important;
    }
}

.content {
    /deep/ .uni-forms-item:last-of-type {
        margin-bottom: 0 !important;
    }
    position: relative;
}

.status-point-success {
    display: inline-block;
    width: 16rpx;
    height: 16rpx;
    border-radius: 50%;
    background: greenyellow;
    overflow: hidden;
}

.status-point-error {
    display: inline-block;
    width: 16rpx;
    height: 16rpx;
    border-radius: 50%;
    background: red;
    overflow: hidden;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20rpx;
    height: 80rpx;
    background: #fff;
    border-radius: 20rpx 20rpx 0 0;
    overflow: hidden;
    border-bottom: 1px solid #eee;
    .popup-header-title {
        font-size: 32rpx;
        color: #333;
    }
    .popup-header-close {
        font-size: 32rpx;
        color: #666;
    }
}

image {
    will-change: transform; //解决加载时瞬间拉伸问题
    width: auto; //解决加载时瞬间拉伸问题
    height: auto; //解决加载时瞬间拉伸问题
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

.canneng-index-title {
    font-size: 30rpx;
}
.boxClick:active {
    // transform: scale(0.94);
    // opacity: 0.8;
    animation: elastic-bounce 0.5s;
}
@keyframes elastic-bounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.96);
    }

    100% {
        transform: scale(1);
    }
}
