/* ==========================================
   BONUS SƏHİFƏSİ — ORTA HİSSƏ
   Turnir cədvəli səhifəsi ilə eyni en və boşluqlar.
   Bütün qaydalar .bonus-page daxilindədir, saytın qalan hissəsinə təsir etmir.
   ========================================== */
.bonus-page {
    --bonus-green: #34a853;
    --bonus-green-dark: #1e7a3a;
    --bonus-green-soft: #eef8f1;
    --bonus-green-foot: #e3f3e8;
    --bonus-text: #202124;
    --bonus-muted: #6b7280;
    --bonus-line: #e2ebe5;
    --bonus-white: #ffffff;
    width: min(1060px, calc(100% - 32px));
    min-height: 55vh;
    margin: 0 auto;
    padding: 38px 0 48px;
    box-sizing: border-box;
    color: var(--bonus-text);
}

.bonus-page *,
.bonus-page *::before,
.bonus-page *::after {
    box-sizing: border-box;
}

/* ---------- Klub kartları ---------- */
.bonus-page .bonus-clubs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.bonus-page .bonus-club {
    display: grid;
    gap: 6px;
    padding: 18px 18px 16px;
    border: 1px solid var(--bonus-line);
    border-radius: 12px;
    color: var(--bonus-text);
    background: var(--bonus-white);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bonus-page .bonus-club strong {
    font-size: 16px;
    line-height: 1.3;
}

.bonus-page .bonus-club span {
    color: var(--bonus-muted);
    font-size: 13px;
}

.bonus-page .bonus-club:hover {
    border-color: var(--bonus-green);
}

.bonus-page .bonus-club.is-active {
    border-color: var(--bonus-green);
    box-shadow: 0 0 0 1px var(--bonus-green) inset;
}

/* ---------- Kart və başlıq ---------- */
.bonus-page .bonus-card {
    margin-bottom: 24px;
    padding: 30px;
    border: 1px solid var(--bonus-line);
    border-radius: 22px;
    background: var(--bonus-white);
    box-shadow: 0 10px 30px rgb(52 168 83 / 6%);
}

.bonus-page .bonus-card[hidden] {
    display: none;
}

.bonus-page .bonus-title {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.15;
}

.bonus-page .bonus-back {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 14px;
    border: 1px solid var(--bonus-line);
    border-radius: 8px;
    color: var(--bonus-green-dark);
    background: #f7fcf8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.bonus-page .bonus-back:hover {
    border-color: var(--bonus-green);
}

.bonus-page .bonus-subtitle {
    margin: 0 0 18px;
    color: var(--bonus-muted);
    font-size: 15px;
}

.bonus-page .bonus-updated {
    margin: 14px 0 0;
    color: var(--bonus-muted);
    font-size: 12px;
}

.bonus-page .bonus-error {
    padding: 18px;
    border: 1px solid #f2c6c6;
    border-radius: 12px;
    color: #8e2222;
    background: #fff3f3;
}

/* ---------- Cədvəl ---------- */
.bonus-page .bonus-scroll {
    overflow-x: auto;
    border: 1px solid var(--bonus-line);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.bonus-page .bonus-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.bonus-page .bonus-table th,
.bonus-page .bonus-table td {
    min-width: 60px;
    height: 44px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--bonus-line);
    border-right: 1px solid var(--bonus-line);
    text-align: center;
    white-space: nowrap;
    background: var(--bonus-white);
}

.bonus-page .bonus-table th:last-child,
.bonus-page .bonus-table td:last-child {
    border-right: 0;
}

.bonus-page .bonus-table thead th {
    height: 42px;
    color: var(--bonus-green-dark);
    background: #f7fcf8;
    font-size: 11px;
    font-weight: 700;
}

.bonus-page .bonus-table tbody th {
    font-weight: 700;
}

.bonus-page .bonus-table tbody tr:nth-child(even) th,
.bonus-page .bonus-table tbody tr:nth-child(even) td {
    background: var(--bonus-green-soft);
}

.bonus-page .bonus-table tfoot th,
.bonus-page .bonus-table tfoot td {
    border-top: 2px solid var(--bonus-green-dark);
    border-bottom: 0;
    background: var(--bonus-green-foot);
    font-size: 14px;
    font-weight: 800;
}

.bonus-page .bonus-table .col-bonus,
.bonus-page .bonus-table .col-total {
    min-width: 70px;
    font-weight: 700;
}

.bonus-page .bonus-status {
    display: inline-block;
    min-width: 30px;
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--bonus-white);
    background: var(--bonus-green);
    font-weight: 700;
}

/* Sol sütunlar yerində qalır, turlar sağdan sola sürüşür. */
.bonus-page .bonus-table .col-pos,
.bonus-page .bonus-table .col-club,
.bonus-page .bonus-table .col-name {
    position: sticky;
    z-index: 1;
}

.bonus-page .bonus-table .col-pos {
    left: 0;
    width: 64px;
    min-width: 64px;
}

.bonus-page .bonus-table .col-club {
    left: 64px;
    min-width: 170px;
    text-align: left;
    box-shadow: 1px 0 0 var(--bonus-line);
}

.bonus-page .bonus-table .col-club a {
    color: inherit;
    text-decoration: none;
}

.bonus-page .bonus-table .col-club a:hover {
    color: var(--bonus-green-dark);
}

.bonus-page .bonus-table .col-name {
    left: 0;
    min-width: 200px;
    text-align: left;
    box-shadow: 1px 0 0 var(--bonus-line);
}

.bonus-page .bonus-table .col-status {
    min-width: 70px;
}

/* ---------- Planşet ---------- */
@media (max-width: 900px) {
    .bonus-page .bonus-clubs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
    .bonus-page {
        width: 100%;
        padding: 24px 0 32px;
    }

    .bonus-page .bonus-clubs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 16px 20px;
    }

    .bonus-page .bonus-club {
        padding: 13px 14px 12px;
    }

    .bonus-page .bonus-club strong {
        font-size: 15px;
    }

    .bonus-page .bonus-card {
        padding: 20px 16px;
        border-inline: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .bonus-page .bonus-title {
        font-size: 22px;
    }

    .bonus-page .bonus-subtitle {
        font-size: 13px;
    }

    .bonus-page .bonus-table th,
    .bonus-page .bonus-table td {
        min-width: 52px;
        padding: 7px 8px;
    }

    /* Mobildə yalnız klub/ad sütunu yerində qalır. */
    .bonus-page .bonus-table .col-pos {
        position: static;
        width: 44px;
        min-width: 44px;
    }

    .bonus-page .bonus-table .col-club {
        left: 0;
        min-width: 120px;
    }

    .bonus-page .bonus-table .col-name {
        min-width: 140px;
        white-space: normal;
        line-height: 1.25;
    }
}
