body {
    font-family: 'Kanit', sans-serif;
    background-color: #1b1d32;
    color: #fff;
    margin: 0;
    padding: 0;
}

.money_box {
    background-color: #ffffff;
    border-radius: 10px;
    margin: 20px;
}

.money_box .btn-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 10px 0px;
}

.money_box .btn-container a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    width: 48%;
    text-decoration: none;
}
.money_box .btn-container a i{
    font-size: 20px;
}

.money_box .btn-container a h5 {
    margin-top: 10px;
}

.money_box .btn-container::after {
    content: "";
    position: absolute;
    top: 25%;
    width: 1px; /* ขนาดเส้นคั่น */
    height: 50%; /* ความสูงของเส้นคั่น */
    background-color: #ccc; /* สีของเส้นคั่น */
    transform: translateY(-50%);
    left: 50%;
    transform: translateX(-50%);
}

.my_money {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top:1.5px solid #dfdfdf;
    padding: 20px;
    width: 90%; /* กำหนดความกว้างเป็น 80% */
    margin: auto; 
}

.my_money .balance h5 {
    font-size: 24px;
    font-weight: 600;
}

.my_money .balance h6 {
    font-size: 16px;
    color: #666;
}

.my_money_icon {
    font-size: 30px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.my_money_icon:hover {
    color: #000;
}


.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.buy-item {
    margin: 20px;
    text-align: center;
}

.buy-item button {
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
}

.box_today {
    border: none!important;
    border-radius: 15px!important;
    padding-bottom: 16px;
}

.box_today .title__name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.commission_rank_card {
    border: none !important;
    border-radius: 15px !important;
    padding: 16px;
    color: #25396f;
    background: #ffffff;
}

.rank_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rank_header h5 {
    margin: 0;
    color: #25396f;
    font-size: 20px;
    font-weight: 700;
}

.rank_header span {
    display: inline-block;
    margin-top: 4px;
    color: #7c879c;
    font-size: 12px;
    font-weight: 700;
}

.rank_header i {
    color: #f4b942;
    font-size: 28px;
}

.rank_list {
    display: grid;
    gap: 8px;
}

.rank_item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #edf1f7;
    border-radius: 10px;
    background-color: #f8fbff;
}

.rank_item.current_user {
    border-color: #f4b942;
    background-color: #fff9e8;
}

.rank_no {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #25396f;
    color: #fff;
    font-weight: 700;
}

.rank_item:nth-child(1) .rank_no {
    background-color: #f4b942;
    color: #25396f;
}

.rank_item:nth-child(2) .rank_no {
    background-color: #9aa6bd;
}

.rank_item:nth-child(3) .rank_no {
    background-color: #c7794a;
}

.rank_user {
    min-width: 0;
}

.rank_username {
    color: #1f2d56;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank_vip {
    color: #7c879c;
    font-size: 12px;
    font-weight: 600;
}

.rank_amount {
    color: #28a745;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.rank_empty {
    padding: 18px 10px;
    text-align: center;
    color: #7c879c;
    border: 1px dashed #cfd7e6;
    border-radius: 10px;
    background-color: #f8fbff;
}

/* Referral summary card */
.referral_card {
    border: none !important;
    border-radius: 15px !important;
    padding: 16px;
    color: #25396f;
    background: #ffffff;
}

.referral_card .rank_header i {
    color: #ff7a00;
}

.referral_counts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.referral_count_box {
    padding: 14px 10px;
    text-align: center;
    background: linear-gradient(135deg, #fff6ed 0%, #fff 100%);
    border: 1px solid #ffd9b6;
    border-radius: 12px;
}

.referral_count_value {
    font-size: 28px;
    font-weight: 800;
    color: #ff7a00;
    line-height: 1.1;
}

.referral_count_label {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #25396f;
}

.referral_count_sub {
    font-size: 11px;
    color: #7c879c;
    margin-top: 2px;
}

.referral_money_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral_money_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #f8fbff;
    border-radius: 10px;
}

.referral_money_label {
    color: #25396f;
    font-size: 14px;
    font-weight: 500;
}

.referral_money_label i {
    margin-right: 6px;
    color: #7c879c;
}

.referral_money_value {
    font-size: 16px;
    font-weight: 700;
}

.referral_money_value--credited {
    color: #28a745;
}

.referral_money_value--pending {
    color: #f4a82a;
}

/* "ข้อมูลการเงินของฉัน" — 3-column daily grid + full-width total */
.fin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 16px 16px;
}

.fin-grid__item {
    text-align: center;
    padding: 12px 6px;
    background-color: #f8fbff;
    border-radius: 10px;
}

.fin-grid__value {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2d56;
    line-height: 1.2;
}

.fin-grid__value--income {
    color: #28a745;
}

.fin-grid__value--ref {
    color: #ff7a00;
}

.fin-grid__label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.fin-total {
    margin: 6px 16px 0;
    padding: 16px 12px;
    text-align: center;
    background: linear-gradient(135deg, #e8f5ee 0%, #f5fbf7 100%);
    border-radius: 12px;
    border: 1px solid #c8e6d3;
}

.fin-total__value {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 800;
    color: #1f7a3c;
    letter-spacing: 0.3px;
}

.fin-total__label {
    font-size: 14px;
    font-weight: 600;
    color: #25396f;
}

.balance_detail {
    display: flex;
    justify-content: space-around;
}

.balance_detail h5 {
    font-size: 24px;
    font-weight: 600;
}

.balance_detail p {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.my_vip {
    border-radius: 10px;
    margin-bottom: 20px;
}

.my_vip .title__name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.po_vip {
    background-color: #0f0f19;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.po_vip b {
    font-size: 24px;
    font-weight: 600;
}

.po_vip div:last-child {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.vip-card {
    border-radius: 15px;
    padding: 20px;
    color: white;
    position: relative;
    transition: transform 0.4s, box-shadow 0.4s;
    overflow: hidden;
}

.vip-content h2 {
    font-size: 35px;
    font-weight: 600;
    color: #fff;
}

.vip-content p {
    font-size: 18px;
    font-weight: 400;
    margin: 10px 0;
}

.commission {
    font-size: 20px;
    font-weight: 500;
    color: #f4c94a;
    margin: 10px 0;
}

.status-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #00ff00;
    transition: opacity 0.3s ease;
}

.status-icon-next-level {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    color: rgb(255, 194, 80);
    transition: opacity 0.3s ease;
}

.progress-barxxx {
    position: relative;
    height: 20px;
    background: rgba(255, 255, 255, 0.2)!important;
    border-radius: 10px;
    margin-top: 15px;
    display: flex !important;
    justify-content:none !important
}

.progress {
    height: 100%!important;
    background: #7cf6d4!important;
    border-radius: 10px!important;
}

.progress-text {
    position: absolute;
    left: 40%;
    font-size: 16px;
    color: rgb(212, 0, 0) !important;
    font-weight: 500;
}


.vip1 {
    background: linear-gradient(135deg, #4b0082, #8b0000);
}

.vip2 {
    background: linear-gradient(135deg, #008080, #2f4f4f);
}

.vip3 {
    background: linear-gradient(135deg, #8b0000, #ff4500);
}

.vip4 {
    background: linear-gradient(135deg, #8b4513, #f4a460);
}

.vip5 {
    background: linear-gradient(135deg, #2e8b57, #66cdaa);
}

.vip6 {
    background: linear-gradient(135deg, #556b2f, #6b8e23);
}

.vip7 {
    background: linear-gradient(135deg, #6a5acd, #7b68ee);
}

.vip8 {
    background: linear-gradient(135deg, #4682b4, #1e90ff);
}

.vip9 {
    background: linear-gradient(135deg, #9400d3, #4b0082);
}

.vip10 {
    background: linear-gradient(135deg, #8b0000, #b22222);
}


@media (max-width: 480px) {
    .balance_detail{
        display: block;
    }
}

.logo_brand {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
