/* =========================================
   MEMBER: Referrals / Income & Bonus / Payout
   ========================================= */

.mx-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.mx-card {
    background: #fff;
    border: 1px solid #e9eaf2;
    border-radius: 16px;
    padding: 22px;
}

    .mx-card p {
        color: #858ba3;
        font-size: 13px;
        margin-bottom: 10px;
    }

    .mx-card h3 {
        color: #20243a;
        font-size: 26px;
    }

    .mx-card small {
        display: block;
        margin-top: 8px;
        color: #16a34a;
        font-size: 12px;
    }

.mx-panel {
    background: #fff;
    border: 1px solid #e9eaf2;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
}

    .mx-panel h2 {
        color: #20243a;
        font-size: 18px;
        margin-bottom: 6px;
    }

    .mx-panel > p {
        color: #858ba3;
        font-size: 13px;
        margin-bottom: 18px;
    }

.mx-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

    .mx-row input,
    .mx-form input,
    .mx-form select {
        padding: 12px 14px;
        border: 1px solid #e1e3ee;
        border-radius: 10px;
        font-size: 14px;
        color: #20243a;
        background: #fff;
        font-family: inherit;
        outline: none;
    }

    .mx-row input {
        flex: 1;
        min-width: 220px;
    }

        .mx-row input:focus,
        .mx-form input:focus,
        .mx-form select:focus {
            border-color: #5b4bdb;
            box-shadow: 0 0 0 3px rgba(91, 75, 219, 0.08);
        }

.mx-btn {
    border: none;
    background: #5b4bdb;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

    .mx-btn:hover {
        background: #4435bd;
    }

    .mx-btn:disabled {
        opacity: 0.6;
        cursor: wait;
    }

    .mx-btn.light {
        background: #f0eefe;
        color: #5b4bdb;
    }

.mx-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

    .mx-form label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #20243a;
        margin-bottom: 7px;
    }

    .mx-form input,
    .mx-form select {
        width: 100%;
    }

    .mx-form .full {
        grid-column: 1 / -1;
    }

.mx-calc {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    background: #f7f7fd;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 13px;
    color: #4b5270;
}

    .mx-calc b {
        color: #20243a;
    }

.mx-msg {
    min-height: 20px;
    font-size: 13px;
    margin-top: 12px;
}

.mx-badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f0eefe;
    color: #5b4bdb;
}

    .mx-badge.green {
        background: #dcfce7;
        color: #15803d;
    }

    .mx-badge.amber {
        background: #fef3c7;
        color: #a16207;
    }

    .mx-badge.red {
        background: #fee2e2;
        color: #b91c1c;
    }

.mx-amount {
    font-weight: 700;
    color: #15803d;
}

.mx-sub {
    color: #858ba3;
    font-size: 12px;
}

.mx-link {
    color: #5b4bdb;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .mx-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .mx-grid,
    .mx-form {
        grid-template-columns: 1fr;
    }
}
