/* =========================================
   APP ANALYTICS
   Стили страницы /app-analytics:
   summary-блок, графики, линии, бары,
   кольцевой прогресс воды, сравнения.
   ========================================= */

.analytics-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.analytics-layout-long {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.analytics-title {
    margin: 18px 0 0;
    font-size: 42px;
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: #221c21;
    font-weight: 800;
}

.analytics-summary-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.analytics-mini-stat {
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: rgba(255, 251, 253, 0.96);
    border: 1px solid rgba(234, 223, 229, 0.86);
}

.analytics-mini-stat.good {
    background: linear-gradient(180deg, rgba(240, 252, 244, 0.98) 0%, #fff 100%);
}

.analytics-mini-stat.blue {
    background: linear-gradient(180deg, rgba(241, 247, 255, 0.98) 0%, #fff 100%);
}

.analytics-mini-stat.gold {
    background: linear-gradient(180deg, rgba(255, 248, 236, 0.98) 0%, #fff 100%);
}

.analytics-mini-stat.green {
    background: linear-gradient(180deg, rgba(242, 251, 246, 0.98) 0%, #fff 100%);
}

.analytics-mini-value {
    font-size: 28px;
    font-weight: 800;
    color: #241f24;
}

.analytics-mini-label {
    margin: 10px 0 0;
    color: #756c76;
    font-size: 14px;
    line-height: 1.5;
}

.analytics-feed-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.analytics-card-long {
    padding: 24px 26px;
}

.analytics-card-head-vertical {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.analytics-period-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 248, 251, 0.96);
    border: 1px solid rgba(219, 39, 119, 0.14);
    color: #7f5c6f;
    font-size: 13px;
    font-weight: 700;
}

.analytics-card-description {
    margin: 12px 0 0;
    color: #756c76;
    font-size: 15px;
    line-height: 1.7;
}

.analytics-footer-note {
    margin-top: 16px;
    color: #8a818b;
    font-size: 13px;
    line-height: 1.6;
}

/* ЛИНЕЙНЫЙ ГРАФИК ВЕСА */

.line-chart-shell {
    position: relative;
    margin-top: 24px;
    height: 260px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 248, 251, 0.8) 0%, rgba(255, 255, 255, 0.98) 100%);
    overflow: hidden;
}

.line-grid-line {
    position: absolute;
    left: 44px;
    right: 16px;
    height: 1px;
    background: rgba(223, 214, 220, 0.9);
}

.grid-1 {
    top: 18%;
}

.grid-2 {
    top: 38%;
}

.grid-3 {
    top: 58%;
}

.grid-4 {
    top: 78%;
}

.line-chart-side-label {
    position: absolute;
    left: 12px;
    color: #8a818b;
    font-size: 12px;
    font-weight: 700;
}

.label-top {
    top: 12%;
}

.label-mid {
    top: 52%;
}

.label-bottom {
    top: 74%;
}

.line-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--pink);
    box-shadow: 0 0 0 6px rgba(219, 39, 119, 0.12);
}

.dot-1 {
    left: 10%;
    top: 68%;
}

.dot-2 {
    left: 22%;
    top: 60%;
}

.dot-3 {
    left: 34%;
    top: 63%;
}

.dot-4 {
    left: 46%;
    top: 50%;
}

.dot-5 {
    left: 58%;
    top: 53%;
}

.dot-6 {
    left: 72%;
    top: 39%;
}

.dot-7 {
    left: 86%;
    top: 44%;
}

.line-segment {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, rgba(219, 39, 119, 0.65) 0%, rgba(239, 76, 151, 0.9) 100%);
    transform-origin: left center;
    border-radius: 999px;
}

.seg-1 {
    left: 12%;
    top: 70%;
    width: 12%;
    transform: rotate(-14deg);
}

.seg-2 {
    left: 24%;
    top: 62%;
    width: 12%;
    transform: rotate(8deg);
}

.seg-3 {
    left: 36%;
    top: 64%;
    width: 12%;
    transform: rotate(-18deg);
}

.seg-4 {
    left: 48%;
    top: 52%;
    width: 12%;
    transform: rotate(10deg);
}

.seg-5 {
    left: 60%;
    top: 54%;
    width: 14%;
    transform: rotate(-18deg);
}

.seg-6 {
    left: 74%;
    top: 42%;
    width: 12%;
    transform: rotate(12deg);
}

.chart-bottom-labels {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    color: #867c86;
    font-size: 13px;
}

/* СТОЛБИКОВЫЕ ГРАФИКИ */

.analytics-bar-chart {
    margin-top: 20px;
    min-height: 240px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 14px;
    align-items: end;
}

.day-bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.day-bar-value {
    color: #5e5660;
    font-size: 12px;
    font-weight: 700;
}

.day-bar-track {
    width: 100%;
    max-width: 44px;
    height: 170px;
    border-radius: 18px;
    background: rgba(239, 234, 238, 0.96);
    display: flex;
    align-items: end;
    overflow: hidden;
}

.day-bar-fill {
    width: 100%;
    border-radius: 18px 18px 8px 8px;
}

.day-bar-fill.blue {
    background: linear-gradient(180deg, rgba(86, 164, 255, 0.72) 0%, rgba(58, 140, 255, 1) 100%);
}

.day-bar-fill.gold {
    background: linear-gradient(180deg, rgba(232, 169, 63, 0.72) 0%, rgba(241, 189, 82, 1) 100%);
}

.day-bar-label {
    color: #867c86;
    font-size: 13px;
    font-weight: 700;
}

.h-54 {
    height: 54%;
}

.h-64 {
    height: 64%;
}

.h-68 {
    height: 68%;
}

.h-69 {
    height: 69%;
}

.h-70 {
    height: 70%;
}

.h-72 {
    height: 72%;
}

.h-74 {
    height: 74%;
}

.h-76 {
    height: 76%;
}

.h-82 {
    height: 82%;
}

.h-86 {
    height: 86%;
}

.h-90 {
    height: 90%;
}

.h-100 {
    height: 100%;
}

/* СРАВНЕНИЕ ОБЪЁМОВ */

.bar-compare-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.compare-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #5f5660;
    font-size: 14px;
    font-weight: 700;
}

.compare-track {
    height: 14px;
    border-radius: 999px;
    background: rgba(232, 237, 243, 0.94);
    overflow: hidden;
}

.compare-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(219, 39, 119, 0.7) 0%, rgba(239, 76, 151, 1) 100%);
}

.compare-fill.w1 {
    width: 64%;
}

.compare-fill.w2 {
    width: 86%;
}

.compare-fill.w3 {
    width: 73%;
}

/* АКТИВНОСТЬ */

.habit-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.habit-grid-large .habit-tile {
    min-height: 82px;
}

.habit-tile {
    min-height: 72px;
    border-radius: 18px;
    background: rgba(245, 241, 244, 0.96);
    border: 1px solid rgba(232, 223, 228, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7079;
    font-size: 14px;
    font-weight: 700;
}

.habit-done {
    background: rgba(255, 241, 247, 0.96);
    border-color: rgba(219, 39, 119, 0.28);
    color: var(--pink);
}

/* КОЛЬЦО ВОДЫ */

.water-ring-card {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.water-ring {
    width: 190px;
    height: 190px;
    border-radius: 999px;
    background: conic-gradient(#58a9ff 0 73%, rgba(225, 234, 245, 1) 73% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-ring-inner {
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: #1f4f87;
}

.water-ring-text {
    margin: 16px 0 0;
    color: #6d6570;
    font-size: 15px;
}

@media (max-width: 1000px) {
    .analytics-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .analytics-bar-chart {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 700px) {
    .analytics-title {
        font-size: 32px;
    }

    .analytics-card-head-vertical {
        flex-direction: column;
        align-items: flex-start;
    }

    .analytics-summary-grid {
        grid-template-columns: 1fr;
    }

    .habit-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .analytics-bar-chart {
        grid-template-columns: repeat(3, 1fr);
    }

    .line-chart-shell {
        height: 230px;
    }
}