.dashboard1 {
    background-color: #F2F4FF;
    border-radius: 30px;
    padding: 25px;
    gap: 20px;
}

.dashboard1 p {
    margin-bottom: 0;
}

.dashboard1-left-title {
    font-size: 25px;
    line-height: 1.2;
}

.dashboard1-left-title b {
    font-size: 35px;
    padding-bottom: 5px;
}

.dashboard1-left-text,
.dashboard1-right-text {
    background-color: white;
    border-radius: 30px;
    color: black;
    padding: 15px;
}

/* === Фон и карточки === */
.dashboard1-left-window1 {
    position: relative;
    min-height: 650px;
}

.dshb1-lft-w1__back {
    position: absolute;
    top: -30px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    display: flex;
    justify-content: center;
}

.dshb1-lft-w1__back img {
    object-fit: contain;
    opacity: 1;
    height: 100%;
    margin: 0 auto;
}

.dshb1-lft-w1,
.dshb1-lft-w2,
.dshb1-lft-w3 {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: black;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px;
    z-index: 2;
}

.dshb1-lft-w__info1 {
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.icon_r {
    background-color: var(--theme-base-color);
}

.icon_t {
    background-color: #9295B6;
}

.icon_r,
.icon_t {
    border-radius: 30px;
    padding: 0px 12px;
    color: white;
}

.icon_t img,
.icon_r img {
    margin-right: 5px;
}

.dshb1-lft-w1__title,
.dshb1-lft-w2__title,
.dshb1-lft-w3__title,
.dshb1-rght-w2__icon,
.dshb1-rght-w3__icon {
    display: flex;
    gap: 10px;
    align-items: center;
    color: black;
    font-weight: 500;
}

.dshb1-lft-w__info1 {
    margin-top: 10px;
}

.dshb1-rght-w3__icon2 {
    display: flex;
    justify-content: space-around;
    padding-top: 20px;
}

/* === Легенда и прогрессы === */
.dshb1-rght-w1__icon,
.dshb1-rght-w2__info,
.dshb1-rght-w3__info,
.dshb1-rght-w4__info {
    background-color: white;
    border-radius: 20px;
    padding: 25px;
}

.dshb1-rght-w1__icon {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 25px;
    font-weight: 500;
    color: black;
}

.dshb1-rght-w1__icon1,
.dshb1-rght-w1__icon2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dshb1-rght-w2__icon-text {
    display: flex;
    justify-content: space-between;
    color: black;
    font-size: 13px;
    margin-top: 15px;
}

.w2__icon-title,
.w3__icon-title {
    font-size: 16px;
    font-weight: 500;
    color: black;
}

/* Индикаторы */
.dshb1-rght-w2__icon2-indicate,
.dshb1-rght-w4__icon2-indicate {
    position: relative;
    height: 20px;
    border-radius: 20px;
    background: linear-gradient(to right, var(--theme-base-color), var(--theme-base-color)) no-repeat, #e3e5f5;
    background-size: 0% 100%;
}

.dshb1-rght-w2__icon3-indicate,
.dshb1-rght-w4__icon3-indicate {
    position: relative;
    height: 20px;
    border-radius: 20px;
    background: linear-gradient(to right, #9295B6, #9295B6) no-repeat, #e8e8e8;
    background-size: 0% 100%;
}

.dshb1-rght-w2__icon2-indicate::after,
.dshb1-rght-w2__icon3-indicate::after,
.dshb1-rght-w4__icon2-indicate::after,
.dshb1-rght-w4__icon3-indicate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(var(--fill-percent, 0) * 1% - 1px);
    transform: translateY(-50%);
    width: 2px;
    height: 24px;
    background-color: black;
    border-radius: 1px;
}

/* Круговые прогрессы */
.circular-progress,
.circular-progress2 {
    display: inline-block;
}

.circular-progress .progress-svg,
.circular-progress2 .progress-svg {
    width: 150px;
    height: 150px;
    display: block;
}

.circular-progress .progress-bg,
.circular-progress2 .progress-bg {
    fill: none;
    stroke-width: 16;
}

.circular-progress .progress-fill,
.circular-progress2 .progress-fill {
    fill: none;
    stroke-width: 22;
    stroke-linecap: butt;
    transform: rotate(-90deg);
    transform-origin: 65px 65px;
    transition: stroke-dashoffset 0.8s ease;
    stroke-dasharray: 301.59;
}

.circular-progress .progress-center,
.circular-progress2 .progress-center {
    fill: white;
}

.circular-progress .progress-label,
.circular-progress2 .progress-label {
    text-anchor: middle;
    font-size: 10px;
    fill: #333;
    font-family: inherit;
}

.circular-progress .progress-value,
.circular-progress2 .progress-value {
    text-anchor: middle;
    font-size: 16px;
    font-weight: bold;
    fill: black;
    font-family: inherit;
}

.circular-progress .progress-bg {
    stroke: #E3E5F5;
}

.circular-progress .progress-fill {
    stroke: var(--theme-base-color);
}

.circular-progress2 .progress-bg {
    stroke: #e8e8e8;
}

.circular-progress2 .progress-fill {
    stroke: #9295B6;
}

.dshb1-rght-w2__icon3-indicate::after,
.dshb1-rght-w2__icon2-indicate::after {
    content: '';
    position: absolute;
    top: 51%;
    left: calc(var(--fill-percent, 0) * 1% - 10px);
    transform: translateY(-50%);
    width: 2px;
    height: 13px;
    background-color: #ffffff;
    border-radius: 1px;
}

/* === Кнопка === */
.dashboard-right__link a {
    background-color: var(--theme-base-color);
    display: flex;
    gap: 10px;
    justify-content: center;
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.dashboard-right__link a:hover {
    background-color: var(--theme-base-color);
}

.dashboard1 .icon_r,
.dashboard1 .icon_t {
    min-width: 80px;
}

.dashboard1 p {
    line-height: 130%;
}

/* ============= ДЕСКТОП: Grid с двумя колонками ============= */
@media (min-width: 992px) {
    .dashboard1 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "title       link"
            "left-text   right-text"
            "window      legend"
            "window      hormones"
            "window      sleep"
            "window      insulin";
    }

    .dashboard1-left-title {
        grid-area: title;
    }

    .dashboard-right__link {
        grid-area: link;
        justify-self: end;
        align-self: start;
    }

    .dashboard1-left-text {
        grid-area: left-text;
    }

    .dashboard1-right-text {
        grid-area: right-text;
    }

    .dashboard1-left-window1 {
        grid-area: window;
    }

    .dshb1-rght-w1__icon {
        grid-area: legend;
    }

    .dshb1-rght-w2__info:nth-of-type(1) {
        grid-area: hormones;
    }

    .dshb1-rght-w3__info {
        grid-area: sleep;
    }

    .dshb1-rght-w2__info:nth-of-type(2) {
        grid-area: insulin;
    }

    /* Вернуть абсолютное позиционирование */
    .dshb1-lft-w1 {
        position: absolute;
        top: 150px;
        left: 50%;
    }

    .dshb1-lft-w2 {
        position: absolute;
        top: 350px;
        left: 10px;
    }

    .dshb1-lft-w3 {
        position: absolute;
        top: 550px;
        left: 50%;
    }
}

/* ============= МОБИЛЬНАЯ ВЕРСИЯ ============= */
@media (max-width: 991px) {

    .dshb1-rght-w1__icon p {
        line-height: 120%;
    }


    .maxwidth-theme-dashboard {
        padding-left: 0px;
        padding-right: 0px;
        padding-inline: 0px !important;
    }

    .dashboard1 {
        display: flex;
        flex-direction: column;
        padding: 20px;
    }


    .dashboard1-left-title .description {
        font-size: 18px;
        line-height: 110%;
        display: block;
        padding-top: 10px;
    }

    .dshb1-rght-w1__icon2 img,
    .dshb1-rght-w1__icon1 img,
    .dshb1-lft-w1__title img,
    .dshb1-lft-w2__title img,
    .dshb1-lft-w3__title img,
    .dshb1-rght-w2__icon img,
    .dshb1-rght-w3__icon img,
    .dshb1-rght-w4__info img {
        width: 25px;
    }

    .dshb1-lft-w1__title p,
    .dshb1-lft-w2__title p,
    .dshb1-lft-w3__title p,
    .dshb1-rght-w2__icon p {
        font-size: 15px;
    }

    .w2__icon-title,
    .dshb1-rght-w3__icon-text p {
        font-size: 13px;
    }

    .w2__icon-value2,
    .w2__icon-value1 {
        font-size: 10px;
    }

    .w3__section1,
    .w3__section3 {
        display: flex;
        flex-direction: column;
    }

    .dshb1-rght-w3__icon-text {
        order: 2;
        /* будет вторым (внизу) */
    }

    .circular-progress {
        order: 1;
        /* будет первым (сверху) */
    }

    .dshb1-rght-w3__icon2 {
        margin-top: 15px;
    }

    /* Порядок блоков */
    .dashboard1-left-title {
        order: 1;
    }

    .dashboard1-left-text {
        order: 2;
        margin-top: 20px;
    }

    .dashboard1-right-text {
        order: 3;
        margin-top: 20px;
    }

    .dshb1-rght-w1__icon {
        order: 4;
        margin-top: 20px;
    }

    .dashboard1-left-window1 {
        order: 5;
        margin-top: 20px;
        display: flex;
        align-items: end;
    }

    .dshb1-rght-w2__info {
        order: 6;
        margin-top: 20px;
    }

    .dshb1-rght-w3__info {
        order: 7;
        margin-top: 20px;
    }

    .dshb1-rght-w4__info {
        order: 8;
        margin-top: 20px;
    }

    .dashboard-right__link {
        order: 9;
        margin-top: 20px;
        width: 100%;
    }

    /* Сбросить абсолютное позиционирование */
    .dshb1-lft-w1,
    .dshb1-lft-w2,
    .dshb1-lft-w3 {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 260px;
        flex-shrink: 0;
    }

    /* Горизонтальный скролл карточек */
    .dashboard1-left-cards-scroll {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding: 15px 20px 15px 20px;
        position: relative;
        z-index: 2;
        margin-left: -20px;
        margin-right: -20px;
    }

    .dashboard1-left-cards-scroll::-webkit-scrollbar {
        display: none;
    }

    /* Кнопка на всю ширину */
    .dashboard-right__link a {
        width: 100%;
    }

    .dshb1-rght-w1__icon2,
    .dshb1-rght-w1__icon1 {
        font-size: 13px;
    }

    .dshb1-rght-w1__icon {
        gap: 10px;
    }

    .dashboard1 {
        gap: 0;
    }

    .dshb1-lft-w1__back img {
        position: static;
        width: 80%;
        height: 650px;
    }

    .dshb1-lft-w1,
    .dshb1-lft-w2,
    .dshb1-lft-w3 {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    .dshb1-rght-w1__icon,
    .dshb1-rght-w2__info,
    .dshb1-rght-w3__info,
    .dshb1-rght-w4__info {
        padding: 15px 10px;
    }

    .circular-progress .progress-svg,
    .circular-progress2 .progress-svg {
        width: 100px;
        height: 100px;
    }

    .dashboard1 .btn3 {
        width: 100%;
        justify-content: center;
    }
}
