/* ================================================================
   STATISTICS TAB — Moon Juice style  (2026-09-29)
   Реферальне посилання + QR-код + графік балів (page-statistics.php)
   ================================================================ */

.bm-ref-card {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #E8E0D4;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
}
.bm-ref-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bm-ref-card__label {
    font: 600 12px/1 'Golos Text', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9B9589;
}
.bm-ref-card__link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bm-ref-card__link {
    font: 600 18px/1.3 'Golos Text', sans-serif;
    color: #1A1A1A;
    background: #F5F0E8;
    padding: 8px 14px;
    border-radius: 4px;
    word-break: break-all;
}
.bm-ref-card__copy {
    padding: 9px 18px;
    background: #1A1A1A;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: 600 13px/1 'Golos Text', sans-serif;
    cursor: pointer;
    transition: background 160ms ease;
    flex-shrink: 0;
}
.bm-ref-card__copy:hover { background: #000; }
.bm-ref-card__copy.is-copied { background: #2D7A4F; }
.bm-ref-card__hint {
    margin: 0;
    font: 400 13px/1.6 'Golos Text', sans-serif;
    color: #6B6560;
    max-width: 460px;
}

.bm-ref-card__qr {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
#bm-ref-qr {
    padding: 10px;
    background: #fff;
    border: 1px solid #E8E0D4;
    border-radius: 4px;
    line-height: 0;
}
.bm-ref-card__qr-label {
    font: 500 11px/1 'Golos Text', sans-serif;
    color: #9B9589;
}

/* ── Графік ───────────────────────────────────────────────────── */
.bm-stats-card {
    background: #fff;
    border: 1px solid #E8E0D4;
    border-radius: 4px;
    padding: 24px;
}

.bm-stats-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.bm-stats-range { display: flex; gap: 6px; flex-wrap: wrap; }
.bm-stats-range__btn {
    padding: 8px 16px;
    background: #F5F0E8;
    border: 1px solid transparent;
    border-radius: 999px;
    font: 600 13px/1 'Golos Text', sans-serif;
    color: #6B6560;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}
.bm-stats-range__btn:hover { background: #E8E0D4; }
.bm-stats-range__btn.is-active { background: #1A1A1A; color: #fff; }

.bm-stats-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bm-stats-custom span { color: #9B9589; }
.bm-stats-date {
    padding: 7px 10px;
    border: 1px solid #E8E0D4;
    border-radius: 4px;
    font: 400 13px/1 'Golos Text', sans-serif;
    color: #1A1A1A;
    background: #fff;
}
.bm-stats-custom__apply {
    padding: 8px 16px;
    background: #1A1A1A;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: 600 13px/1 'Golos Text', sans-serif;
    cursor: pointer;
}
.bm-stats-custom__apply:hover { background: #000; }

.bm-stats-summary {
    display: flex;
    gap: 1px;
    background: #E8E0D4;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}
.bm-stats-summary__item {
    flex: 1;
    background: #F5F0E8;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bm-stats-summary__num {
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    font-size: 26px;
    color: #1A1A1A;
}
.bm-stats-summary__label {
    font: 400 12px/1.4 'Golos Text', sans-serif;
    color: #6B6560;
}

.bm-stats-empty {
    text-align: center;
    padding: 40px 0 8px;
    font: 400 14px/1.6 'Golos Text', sans-serif;
    color: #9B9589;
}

/* ── Приведені люди ───────────────────────────────────────────── */
.bm-people-card { margin-top: 20px; }
.bm-people-title {
    margin: 0 0 6px;
    font-family: 'Golos Text', sans-serif;
    font-weight: 600;
    font-size: 19px;
    color: #1A1A1A;
}
.bm-people-sub {
    margin: 0 0 20px;
    font: 400 13px/1.6 'Golos Text', sans-serif;
    color: #9B9589;
    max-width: 560px;
}

.bm-people-table { display: flex; flex-direction: column; }
.bm-people-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #E8E0D4;
    align-items: center;
}
.bm-people-row:last-child { border-bottom: none; }
.bm-people-row--head span {
    font: 600 11px/1 'Golos Text', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9B9589;
}
.bm-people-row:not(.bm-people-row--head) span {
    font: 400 14px/1.4 'Golos Text', sans-serif;
    color: #3A3530;
}
.bm-people-row__name { font-weight: 600 !important; color: #1A1A1A !important; }
.bm-people-row__points { font-weight: 600 !important; color: #1A1A1A !important; }

.bm-people-empty {
    text-align: center;
    padding: 24px 0 4px;
    font: 400 14px/1.6 'Golos Text', sans-serif;
    color: #9B9589;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .bm-ref-card { flex-direction: column; align-items: stretch; }
    .bm-ref-card__qr { align-self: center; }
    .bm-stats-summary { flex-direction: column; }
}

@media (max-width: 480px) {
    .bm-ref-card__link { font-size: 15px; }
    .bm-stats-toolbar { flex-direction: column; align-items: stretch; }
    .bm-stats-range { justify-content: center; }
    .bm-people-row {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: #F5F0E8;
        border-radius: 4px;
        padding: 12px 14px;
        margin-bottom: 8px;
        border-bottom: none;
    }
    .bm-people-row span { display: flex; justify-content: space-between; gap: 10px; }
    .bm-people-row span::before {
        content: attr(data-label);
        font: 600 11px/1.4 'Golos Text', sans-serif;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #9B9589;
        flex-shrink: 0;
    }
    .bm-people-row--head { display: none; }
}
