/* =============================================
   Refill Credits — Modern UI Stylesheet
   Brand: #A78871  Dark: #8c6e58  Light: #f7f0eb
   ============================================= */

/* ── Page Wrapper ── */
.rfl-page {
    padding: 40px 0 80px;
    background: linear-gradient(180deg, #fff 0%, #fff 40%);
    min-height: 70vh;
}

/* ── Toast Animation ── */
@keyframes rflToastIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   WALLET BALANCE HERO
   ═══════════════════════════════════════════════ */
.rfl-wallet-hero {
    margin-bottom: 48px;
}
.rfl-wallet-card {
    position: relative;
    background: linear-gradient(135deg, #3d2b1f 0%, #5c3d2e 40%, #2e1f15 100%);
    border-radius: 24px;
    padding: 36px 40px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(167,136,113,.3), 0 4px 16px rgba(0,0,0,.15);
}
.rfl-wallet-bg {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 200'%3E%3Ccircle cx='550' cy='20' r='160' fill='none' stroke='%23A78871' stroke-width='0.8' stroke-opacity='0.15'/%3E%3Ccircle cx='550' cy='20' r='200' fill='none' stroke='%23A78871' stroke-width='0.6' stroke-opacity='0.10'/%3E%3Ccircle cx='550' cy='20' r='240' fill='none' stroke='%23A78871' stroke-width='0.5' stroke-opacity='0.07'/%3E%3Ccircle cx='-20' cy='200' r='150' fill='%23A78871' fill-opacity='0.06'/%3E%3C/svg%3E");
    background-size: cover;
    pointer-events: none;
}
.rfl-wallet-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.rfl-wallet-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.rfl-wallet-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(167,136,113,.25);
    border: 2px solid rgba(167,136,113,.6);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    color: #d4b896; flex-shrink: 0;
    letter-spacing: 1px;
}
.rfl-wallet-name {
    font-size: 18px; font-weight: 700;
    color: #fff; margin-bottom: 2px;
}
.rfl-wallet-email {
    font-size: 13px; color: rgba(255,255,255,.6);
}
.rfl-wallet-right {
    text-align: right;
}
.rfl-wallet-label {
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: #d4b896; margin-bottom: 4px;
}
.rfl-wallet-label i {
    font-size: 14px; margin-right: 4px;
}
.rfl-wallet-balance {
    font-size: 48px; font-weight: 900;
    color: #fff; line-height: 1;
    text-shadow: 0 4px 20px rgba(167,136,113,.4);
    margin-bottom: 4px;
}
.rfl-wallet-sub {
    font-size: 12px; color: rgba(255,255,255,.5);
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════ */
.rfl-section {
    margin-bottom: 48px;
}
.rfl-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}
.rfl-section-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #a78871, #8c6e58);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(167,136,113,.3);
}
.rfl-section-title {
    font-size: 24px; font-weight: 800;
    color: #1e293b; margin: 0 0 2px;
    line-height: 1.2;
}
.rfl-section-subtitle {
    font-size: 14px; color: #94a3b8;
    margin: 0;
}

/* ═══════════════════════════════════════════════
   PLAN CARDS GRID
   ═══════════════════════════════════════════════ */
.rfl-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.rfl-plan-card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #ede9e3;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.rfl-plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(167,136,113,.2);
    border-color: #a78871;
}

/* Popular highlight */
.rfl-plan-popular {
    border-color: #a78871;
    box-shadow: 0 8px 32px rgba(167,136,113,.18);
}
.rfl-plan-popular::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #a78871, #d4b896, #a78871);
}
.rfl-plan-badge {
    position: absolute;
    top: 14px; right: -28px;
    background: linear-gradient(135deg, #a78871, #8c6e58);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 4px 36px;
    letter-spacing: .8px;
    text-transform: uppercase;
    transform: rotate(35deg);
    box-shadow: 0 2px 8px rgba(167,136,113,.3);
}

.rfl-plan-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ede9e3;
}
.rfl-plan-title {
    font-size: 18px; font-weight: 700;
    color: #1e293b; margin-bottom: 12px;
}
.rfl-plan-price {
    font-size: 42px; font-weight: 900;
    color: #a78871; line-height: 1;
    margin-bottom: 6px;
}
.rfl-price-currency {
    font-size: 20px; font-weight: 700;
    vertical-align: top;
    position: relative;
    top: 8px;
    margin-right: 2px;
}
.rfl-plan-gst {
    font-size: 12px; color: #94a3b8;
}

.rfl-plan-tokens {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fffbf0, #fff8e1);
    border: 1.5px solid #fcd34d;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
}
.rfl-plan-tokens i {
    font-size: 20px; color: #d97706;
}
.rfl-plan-tokens span {
    font-size: 18px; font-weight: 800;
    color: #92400e;
}

.rfl-plan-benefits {
    list-style: none;
    padding: 0; margin: 0 0 20px;
    flex: 1;
}
.rfl-plan-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #f5f0eb;
}
.rfl-plan-benefits li:last-child {
    border-bottom: none;
}
.rfl-plan-benefits li i {
    font-size: 16px;
    color: #16a34a;
    flex-shrink: 0;
    margin-top: 1px;
}

.rfl-plan-btn {
    width: 100%;
    background: linear-gradient(135deg, #a78871, #8c6e58);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(167,136,113,.3);
}
.rfl-plan-btn:hover:not(:disabled) {
    opacity: .92;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(167,136,113,.4);
}
.rfl-plan-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.rfl-plan-btn i {
    font-size: 18px;
}

/* ═══════════════════════════════════════════════
   STATS ROW
   ═══════════════════════════════════════════════ */
.rfl-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.rfl-stat-card {
    background: #fff;
    border: 1.5px solid #ede9e3;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: border-color .2s;
}
.rfl-stat-card:hover {
    border-color: #a78871;
}
.rfl-stat-value {
    font-size: 24px; font-weight: 800;
    color: #a78871; margin-bottom: 4px;
}
.rfl-stat-label {
    font-size: 11px; font-weight: 700;
    color: #94a3b8; text-transform: uppercase;
    letter-spacing: .5px;
}

/* ═══════════════════════════════════════════════
   TRANSACTION TABLE (Desktop)
   ═══════════════════════════════════════════════ */
.rfl-txn-table-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #ede9e3;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.rfl-txn-table {
    width: 100%;
    border-collapse: collapse;
}
.rfl-txn-table thead tr {
    background: linear-gradient(135deg, #2e1f15, #3d2b1f);
}
.rfl-txn-table thead th {
    padding: 14px 16px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #d4b896;
    text-align: left;
}
.rfl-txn-table tbody tr {
    border-bottom: 1px solid #f5f0eb;
    transition: background .15s;
}
.rfl-txn-table tbody tr:last-child {
    border-bottom: none;
}
.rfl-txn-table tbody tr:hover {
    background: #fdf8f5;
}
.rfl-txn-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    color: #444;
    vertical-align: middle;
}
.rfl-txn-id {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #94a3b8;
    background: #f8f4f1;
    padding: 3px 8px;
    border-radius: 6px;
}
.rfl-txn-amt {
    font-weight: 700;
    color: #1e293b;
}
.rfl-txn-tokens {
    font-weight: 700;
    color: #16a34a;
}

/* Status badges */
.rfl-status-paid {
    display: inline-flex; align-items: center; gap: 4px;
    background: #e8f5e9; color: #2e7d32;
    border-radius: 20px; padding: 4px 12px;
    font-size: 12px; font-weight: 700;
}
.rfl-status-pending {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fff8e1; color: #f57f17;
    border-radius: 20px; padding: 4px 12px;
    font-size: 12px; font-weight: 700;
}
.rfl-status-failed {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fce4e4; color: #c62828;
    border-radius: 20px; padding: 4px 12px;
    font-size: 12px; font-weight: 700;
}

/* Invoice download button */
.rfl-invoice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #a78871, #8c6e58);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 2px 8px rgba(167,136,113,.25);
}
.rfl-invoice-btn:hover {
    opacity: .88;
    transform: scale(1.05);
    color: #fff;
}

/* ═══════════════════════════════════════════════
   TRANSACTION CARDS (Mobile)
   ═══════════════════════════════════════════════ */
.rfl-txn-card-mobile {
    background: #fff;
    border: 1.5px solid #ede9e3;
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color .2s;
}
.rfl-txn-card-mobile:hover {
    border-color: #a78871;
}
.rfl-txn-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 18px;
    background: #faf7f4;
    border-bottom: 1px solid #ede9e3;
}
.rfl-txn-card-id {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #94a3b8;
    margin-bottom: 2px;
}
.rfl-txn-card-plan {
    font-size: 14px; font-weight: 700;
    color: #1e293b;
}
.rfl-txn-card-body {
    padding: 14px 18px;
}
.rfl-txn-card-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f5f0eb;
}
.rfl-txn-card-row:last-child {
    border-bottom: none;
}
.rfl-txn-card-invoice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: linear-gradient(135deg, #a78871, #8c6e58);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: opacity .2s;
}
.rfl-txn-card-invoice:hover {
    opacity: .88;
    color: #fff;
}

/* ═══════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════ */
.rfl-empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 20px;
    border: 2px dashed #ede9e3;
}
.rfl-empty-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #f7f0eb;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px; color: #a78871;
}
.rfl-empty-title {
    font-size: 20px; font-weight: 700;
    color: #1e293b; margin-bottom: 8px;
}
.rfl-empty-sub {
    font-size: 14px; color: #94a3b8;
    max-width: 400px; margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════ */
.rfl-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.rfl-pagination .pagination {
    gap: 4px;
}
.rfl-pagination .page-link {
    border: 1.5px solid #ede9e3;
    border-radius: 10px;
    color: #a78871;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    transition: all .2s;
}
.rfl-pagination .page-link:hover {
    background: #a78871;
    border-color: #a78871;
    color: #fff;
}
.rfl-pagination .page-item.active .page-link {
    background: #a78871;
    border-color: #a78871;
    color: #fff;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .rfl-wallet-card { padding: 24px 20px; border-radius: 18px; }
    .rfl-wallet-content { flex-direction: column; text-align: center; }
    .rfl-wallet-left { flex-direction: column; }
    .rfl-wallet-right { text-align: center; }
    .rfl-wallet-balance { font-size: 36px; }
    .rfl-plans-grid { grid-template-columns: 1fr; }
    .rfl-stats-row { grid-template-columns: 1fr; }
    .rfl-section-title { font-size: 20px; }
    .rfl-plan-price { font-size: 34px; }
}

@media (max-width: 576px) {
    .rfl-page { padding: 24px 0 60px; }
    .rfl-wallet-card { padding: 20px 16px; }
    .rfl-wallet-balance { font-size: 30px; }
    .rfl-section-head { flex-direction: column; text-align: center; }
    .rfl-stat-value { font-size: 20px; }
}

/* ═══════════════════════════════════════════════
   Tier card styles for membership page
   (reuse for refill plan on membership page)
   ═══════════════════════════════════════════════ */
.mbr-section-head { margin-bottom: 28px; }
.mbr-tier-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}
.mbr-tier-card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #e8e0d8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.mbr-tier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    border-color: var(--tier-color, #1a2340);
}
.mbr-tier-active {
    border-color: var(--tier-color, #1a2340);
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.mbr-tier-header {
    background: var(--tier-color);
    padding: 24px 22px;
    color: #fff;
    text-align: center;
    position: relative;
}
.mbr-tier-active-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.2);
    border-radius: 20px; padding: 4px 14px;
    font-size: 11px; font-weight: 700;
    margin-bottom: 8px;
}
.mbr-tier-badge {
    font-size: 10px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,.75);
    margin-bottom: 6px;
}
.mbr-tier-name {
    font-size: 22px; font-weight: 800;
    margin-bottom: 8px;
}
.mbr-tier-price {
    font-size: 32px; font-weight: 900;
    margin-bottom: 4px;
}
.mbr-price-currency {
    font-size: 16px; font-weight: 700;
    vertical-align: top; position: relative; top: 4px;
}
.mbr-price-note {
    font-size: 12px; color: rgba(255,255,255,.65);
    margin-bottom: 8px;
}
.mbr-credits-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.15);
    border-radius: 20px; padding: 6px 16px;
    font-size: 12px; font-weight: 600;
}
.mbr-tier-features {
    padding: 18px 22px;
    flex: 1;
}
.mbr-feat-row {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3ede8;
    font-size: 13px;
}
.mbr-feat-row:last-child { border-bottom: none; }
.mbr-feat-label { color: #666; }
.mbr-feat-val { font-weight: 700; color: #1e293b; }
.mbr-tier-cta {
    padding: 16px 22px;
    border-top: 1px solid #f3ede8;
    text-align: center;
}
.mbr-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--tier-color, #1a2340), #1a2340);
    color: #fff; border: none;
    border-radius: 30px; padding: 11px 28px;
    font-size: 14px; font-weight: 700;
    text-decoration: none;
    transition: opacity .2s;
}
.mbr-cta-btn:hover { opacity: .88; color: #fff; }
.mbr-cta-active {
    color: #16a34a; font-weight: 700; font-size: 14px;
    margin-bottom: 8px;
}
.mbr-renew-btn {
    display: inline-block;
    background: transparent;
    color: var(--tier-color, #1a2340);
    border: 2px solid var(--tier-color, #1a2340);
    border-radius: 30px; padding: 8px 20px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.mbr-renew-btn:hover {
    background: var(--tier-color, #1a2340);
    color: #fff;
}
.mbr-cta-na {
    font-size: 13px; color: #94a3b8; font-weight: 600;
}
