/* ================================================================= */
/* KODE FINAL & LENGKAP UNTUK upgrade-akun.css (ANTI-KONFLIK)         */
/* ================================================================= */

:root {
    --primary-color: #007bff;
    --dark-text: #1e2a3a;
    --light-text: #5b6a82;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --border-color: #e9ecef;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--light-text);
    padding: 20px 20px 85px 20px; /* Ruang untuk nav bawah */
}

/* KONTENER UTAMA */
.main-container { width: 100%; max-width: 1200px; margin: 0 auto; }
.back-button-container { margin-bottom: 20px; }
.back-button { text-decoration: none; color: var(--light-text); font-weight: 500; }
.back-button:hover { color: var(--primary-color); }

/* PENGATURAN "VIEW" (HALAMAN) */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* KARTU INFO REFERRAL */
.user-info-card { background: var(--card-background); border-radius: 20px; padding: 25px; box-shadow: 0 8px 25px rgba(0,0,0,0.06); margin-bottom: 40px; }
.profile-header { display: flex; align-items: center; margin-bottom: 25px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background-color: var(--primary-color); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 600; margin-right: 20px; flex-shrink: 0; }
.user-details h2 { font-size: 1.5rem; font-weight: 600; color: var(--dark-text); margin: 0; }
.user-details p { font-size: 1rem; color: var(--light-text); margin: 0; }
.stats-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 20px 0; margin-bottom: 25px; }
.stat-item { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--dark-text); display: block; }
.stat-label { font-size: 0.9rem; color: var(--light-text); }
.referral-section p, .apply-referral-section p { font-weight: 500; color: var(--dark-text); margin-bottom: 10px; text-align: center; }
.referral-code-box { display: flex; justify-content: center; align-items: center; background-color: #f8f9fa; border: 2px dashed #dee2e6; border-radius: 12px; padding: 10px; margin-bottom: 15px; }
.referral-code-box span { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); letter-spacing: 2px; margin-right: 15px; }
.referral-code-box button { background: none; border: none; font-size: 1.5rem; color: var(--light-text); cursor: pointer; }
.share-buttons { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; }
.share-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; text-decoration: none; font-size: 1.2rem; transition: transform 0.2s; }
.share-btn:hover { transform: scale(1.1); }
.share-btn.whatsapp { background-color: #25D366; } .share-btn.facebook { background-color: #1877F2; } .share-btn.twitter { background-color: #1DA1F2; } .share-btn.native { background-color: #6c757d; border: none; cursor: pointer; }
.apply-referral-section { border-top: 1px solid var(--border-color); padding-top: 20px; }
.apply-code-box { display: flex; max-width: 400px; margin: 0 auto; }
.apply-code-box input { flex-grow: 1; padding: 12px 15px; font-size: 1rem; border: 2px solid #dee2e6; border-radius: 8px 0 0 8px; }
.apply-code-box input:focus { outline: none; border-color: var(--primary-color); }
.apply-code-box button { padding: 0 20px; border: none; background-color: var(--primary-color); color: white; font-weight: 600; border-radius: 0 8px 8px 0; cursor: pointer; }

/* KARTU TOKO */
.pricing-header { text-align: center; margin-bottom: 30px; }
.pricing-header h1 { font-size: 1.8rem; font-weight: 700; color: var(--dark-text); }
.pricing-header p { font-size: 1rem; color: var(--light-text); }
.pricing-cards { display: grid; grid-template-columns: 1fr; gap: 25px; }
.card { background-color: var(--card-background); border-radius: 20px; padding: 30px; text-align: center; box-shadow: 0 8px 25px rgba(0,0,0,0.06); border: 2px solid transparent; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.card-header h3 { font-size: 1.5rem; font-weight: 600; color: var(--dark-text); }
.card-header p { color: var(--light-text); margin-top: 5px; min-height: 40px; }
.features { list-style: none; text-align: left; margin: 25px 0; flex-grow: 1; }
.features li { margin-bottom: 12px; color: #4f4f4f; display: flex; align-items: center; }
.features i { margin-right: 12px; font-size: 1.1rem; }
.features .fa-check { color: #28a745; } .features .fa-times { color: #dc3545; }
.card-price { margin: 15px 0; }
.card-price .price { font-size: 2.5rem; font-weight: 700; color: var(--dark-text); }
.card-price .period { font-size: 1rem; color: var(--light-text); margin-left: 5px; }
/* Gantikan blok .popular-badge yang lama dengan ini */
.popular-badge {
    position: absolute;
    top: 18px; /* Sesuaikan jarak dari atas */
    right: -30px; /* Sesuaikan jarak dari kanan */
    background-color: var(--primary-color);
    color: white;
    padding: 6px 30px; /* Sedikit sesuaikan padding */
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Tambahkan bayangan agar lebih hidup */
    z-index: 1; /* Pastikan selalu di atas konten lain */
}
.separator { display: flex; align-items: center; text-align: center; color: #adb5bd; margin: 15px 0; }
.separator::before, .separator::after { content: ''; flex: 1; border-bottom: 1px solid #dee2e6; }
.separator:not(:empty)::before { margin-right: .25em; } .separator:not(:empty)::after { margin-left: .25em; }
.btn-redeem, .btn-buy, .btn-current { display: block; width: 100%; padding: 15px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-redeem { background: linear-gradient(45deg, #28a745, #218838); color: white; }
.btn-buy { background: linear-gradient(45deg, #007bff, #0056b3); color: white; }
.btn-current { background-color: #e9ecef; color: #495057; cursor: not-allowed; margin-top: auto; }
.btn-redeem:disabled, .btn-buy:disabled { background: #e9ecef; cursor: not-allowed; color: #6c757d; }

/* [PERBAIKAN KRUSIAL] BILAH NAVIGASI BAWAH */
body > .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: var(--card-background);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}
.nav-button { background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif; color: #888; cursor: pointer; transition: color 0.2s; flex-grow: 1; height: 100%; }
.nav-button i { font-size: 1.5rem; margin-bottom: 4px; }
.nav-button span { font-size: 0.75rem; font-weight: 500; }
.nav-button.active { color: var(--primary-color); }

/* [PERBAIKAN KRUSIAL] ATURAN RESPONSIVE */
@media (min-width: 992px) {
    body { padding: 20px; }
    body > .bottom-nav { display: none; } /* Sembunyikan di desktop */
    .view { display: block !important; animation: none; }
    .views-wrapper { display: flex; gap: 40px; align-items: flex-start; }
    #referral-view { flex: 0 0 420px; position: sticky; top: 20px; }
    #toko-view { flex: 1; }
    .pricing-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .pricing-header h1 { font-size: 2.2rem; }
}
/* =================================================================
   GAYA UNTUK PROMO DISKON OKTOBER
   ================================================================= */
.cash-price-section {
    text-align: center;
    margin-bottom: 0.5rem;
}

.promo-badge {
    display: none; /* Defaultnya disembunyikan */
    background: #e44d26;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.original-price {
    display: none; /* Defaultnya disembunyikan */
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.cash-price-section .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary, #333);
}
/* ======================================================= */
/* == GAYA BARU: KARTU PEMBELIAN POIN                   == */
/* ======================================================= */

.point-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.point-package-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    background-color: var(--card-background);
}

.point-package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.point-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.point-amount i {
    font-size: 1.2rem;
    color: #ffc107; /* Warna bintang kuning */
}

.point-price {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.point-bonus {
    font-size: 0.9rem;
    font-weight: 600;
    color: #20c997;
    margin-bottom: 1.5rem;
}

.btn-buy-points {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #f8aa00, #d503ff);
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.3s ease;
}

.btn-buy-points:hover {
    filter: brightness(1.1);
}

.point-package-card.popular {
    border-color: var(--primary-color);
}

.point-package-card.popular .btn-buy-points {
    background: linear-gradient(30deg, #007bff, #0056b3);
}

@media (min-width: 992px) {
    #point-view, #upgrade-view {
        flex: 1;
    }
}
/* Penyesuaian untuk Grid Paket Poin yang Lebih Banyak */
@media (min-width: 992px) {
    .point-packages-grid {
        /* Membuat 3 kolom di desktop agar tidak terlalu lebar */
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Penyesuaian kecil untuk bonus placeholder */
.point-package-card .point-bonus {
    min-height: 21px; /* Beri tinggi minimum agar layout tidak anjlok */
}
/* ======================================================= */
/* == PERBAIKAN: POSISI BADGE POPULER DI TOKO POIN      == */
/* ======================================================= */

.point-package-card .popular-badge {
    position: absolute;
    top: -15px; /* Mengatur posisi agar sedikit di atas kartu */
    left: 50%; /* Memposisikan di tengah secara horizontal */
    transform: translateX(-50%); /* Menyesuaikan agar benar-benar di tengah */
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}