/* ===== BALANCE BOX ===== */
.balance-box {
    text-align: center;
    padding: 24px 20px;
}

.balance-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.balance-icon {
    font-size: 2rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--gold);
    font-family: 'Vinque', serif;
    line-height: 1;
}

.balance-unit {
    font-size: 1.2rem;
    color: #c8a84b;
    font-family: 'Vinque', serif;
}

/* ===== PACKAGES GRID ===== */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.package-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: var(--r-sm);
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.package-card:hover {
    border-color: var(--gold);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2);
}

.package-card.selected {
    border-color: var(--gold);
    background: rgba(245, 158, 11, 0.14);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.pkg-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.pkg-kc {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--gold);
    font-family: 'Vinque', serif;
}

.pkg-unit {
    font-size: 0.9rem;
    color: #c8a84b;
}

.pkg-vnd {
    font-size: 0.85rem;
    color: #ccc;
    margin-top: 4px;
}

.pkg-label {
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== QR SECTION ===== */
.qr-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
    margin: 16px 0;
}

.qr-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qr-info {
    flex: 1;
    min-width: 200px;
}

.qr-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 12px;
}

.qr-info-row:last-of-type {
    border-bottom: none;
}

.qr-label {
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.qr-value {
    color: #eee;
    font-size: 0.95rem;
    text-align: right;
    word-break: break-all;
}

.qr-value.highlight-text {
    color: #ff9f43;
}

.transfer-content {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #7ee8a2;
}

.qr-warning {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #f9ca24;
    line-height: 1.5;
}

/* ===== QR STATUS BOX ===== */
.qr-status-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    margin: 12px 0;
    color: #ccc;
    font-size: 0.95rem;
}

/* ===== BUTTON ROW ===== */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

/* ===== TRANSACTION HISTORY ===== */
.tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    gap: 12px;
    flex-wrap: wrap;
}

.tx-row.completed {
    border-left: 3px solid #2ecc71;
}

.tx-row.pending {
    border-left: 3px solid #f39c12;
}

.tx-row.cancelled {
    border-left: 3px solid #e74c3c;
    opacity: 0.6;
}

.tx-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tx-type {
    font-size: 0.95rem;
    color: #ddd;
    font-weight: 600;
}

.tx-ref {
    font-size: 0.75rem;
    color: #888;
    font-family: monospace;
}

.tx-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.tx-kc {
    font-size: 1rem;
    font-weight: bold;
    color: gold;
}

.tx-vnd {
    font-size: 0.8rem;
    color: #aaa;
}

/* ===== SPINNER (scoped to wallet sections only) ===== */
.qr-wrap .spinner,
.qr-status-box .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: gold;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.qr-status-box .spinner {
    position: relative;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .qr-container {
        flex-direction: column;
        align-items: center;
    }

    .qr-info {
        width: 100%;
    }

    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .balance-amount {
        font-size: 2.2rem;
    }
}