

<?php $__env->startSection('title', 'EMI Card Details | PG Finsev'); ?>

<?php $__env->startSection('page-title', 'EMI Card Details'); ?>

<?php $__env->startSection(
    'page-description',
    'View client EMI card information and approval details'
); ?>


<?php $__env->startPush('styles'); ?>

<style>

    .page-heading {
        margin-bottom: 22px;
    }

    .page-heading h2 {
        color: #1d3557;
        font-size: 20px;
        font-weight: 800;
    }

    .page-heading p {
        margin-top: 5px;
        color: #8b98aa;
        font-size: 10px;
    }


    .back-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;

        height: 34px;
        padding: 0 12px;

        margin-bottom: 18px;

        border: 1px solid #dce4ef;
        border-radius: 8px;

        background: #ffffff;
        color: #64748b;

        font-size: 8px;
        font-weight: 800;

        text-decoration: none;
    }


    .back-btn:hover {
        background: #f8fafc;
    }


    /* =====================================================
       MAIN GRID
    ====================================================== */

    .card-grid {
        display: grid;
        grid-template-columns: 1.35fr .65fr;
        gap: 18px;
    }


    .panel {
        background: #ffffff;

        border: 1px solid #e3eaf3;
        border-radius: 14px;

        overflow: hidden;
    }


    .panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 17px 19px;

        border-bottom: 1px solid #edf1f6;
    }


    .panel-header h3 {
        color: #273b59;

        font-size: 13px;
        font-weight: 800;
    }


    .panel-body {
        padding: 20px;
    }


    /* =====================================================
       CARD PREVIEW
    ====================================================== */

    .emi-card-preview {

        position: relative;

        min-height: 235px;

        padding: 25px;

        border-radius: 18px;

        background:
            linear-gradient(
                135deg,
                #0f2747,
                #1769e0
            );

        color: #ffffff;

        overflow: hidden;

        box-shadow:
            0 18px 40px
            rgba(23, 105, 224, .20);
    }


    .emi-card-preview::after {

        content: "";

        position: absolute;

        width: 190px;
        height: 190px;

        right: -70px;
        top: -70px;

        border-radius: 50%;

        background:
            rgba(255,255,255,.08);
    }


    .brand {
        position: relative;
        z-index: 2;

        display: flex;
        justify-content: space-between;
        align-items: center;
    }


    .brand-name {
        font-size: 15px;
        font-weight: 900;

        letter-spacing: 1px;
    }


    .card-chip {
        width: 42px;
        height: 30px;

        border-radius: 6px;

        background:
            linear-gradient(
                135deg,
                #f7d794,
                #d6a849
            );

        opacity: .95;
    }


    .card-number-preview {

        position: relative;
        z-index: 2;

        margin-top: 45px;

        font-family:
            Consolas,
            monospace;

        font-size: 16px;

        font-weight: 800;

        letter-spacing: 2px;
    }


    .card-bottom {

        position: relative;
        z-index: 2;

        display: flex;
        justify-content: space-between;

        margin-top: 28px;
    }


    .card-small-label {

        display: block;

        margin-bottom: 4px;

        opacity: .65;

        font-size: 7px;

        text-transform: uppercase;
        letter-spacing: .5px;
    }


    .card-small-value {

        font-size: 10px;

        font-weight: 800;
    }


    /* =====================================================
       STATUS
    ====================================================== */

    .badge {

        display: inline-flex;

        align-items: center;

        gap: 5px;

        padding: 6px 9px;

        border-radius: 20px;

        font-size: 7px;

        font-weight: 800;
    }


    .dot {

        width: 5px;
        height: 5px;

        border-radius: 50%;

        background: currentColor;
    }


    .badge-active {

        color: #287646;

        background: #eaf8ef;
    }


    .badge-pending {

        color: #b7791f;

        background: #fff7e8;
    }


    .badge-blocked {

        color: #be123c;

        background: #fff1f2;
    }


    .badge-expired {

        color: #64748b;

        background: #f1f5f9;
    }


    /* =====================================================
       INFO GRID
    ====================================================== */

    .info-grid {

        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 12px;

        margin-top: 20px;
    }


    .info-item {

        padding: 13px;

        border:
            1px solid #edf1f6;

        border-radius: 9px;

        background: #fbfcfe;
    }


    .info-label {

        display: block;

        margin-bottom: 5px;

        color: #9aa6b6;

        font-size: 7px;

        font-weight: 800;

        text-transform: uppercase;

        letter-spacing: .4px;
    }


    .info-value {

        color: #344966;

        font-size: 10px;

        font-weight: 800;
    }


    .info-value.green {

        color: #287646;
    }


    .info-value.orange {

        color: #b7791f;
    }


    .info-value.red {

        color: #be123c;
    }


    /* =====================================================
       CLIENT
    ====================================================== */

    .client-box {

        display: flex;

        align-items: center;

        gap: 12px;

        margin-bottom: 18px;

        padding-bottom: 18px;

        border-bottom:
            1px solid #edf1f6;
    }


    .client-avatar {

        width: 45px;
        height: 45px;

        display: flex;

        align-items: center;
        justify-content: center;

        border-radius: 11px;

        background: #eaf2ff;

        color: #1769e0;

        font-size: 13px;

        font-weight: 900;
    }


    .client-name {

        color: #273b59;

        font-size: 12px;

        font-weight: 800;
    }


    .client-contact {

        margin-top: 4px;

        color: #9aa6b6;

        font-size: 8px;

        line-height: 1.6;
    }


    /* =====================================================
       ACTIONS
    ====================================================== */

    .actions {

        display: flex;

        flex-direction: column;

        gap: 8px;

        margin-top: 20px;
    }


    .action-btn {

        width: 100%;

        min-height: 38px;

        border: 0;

        border-radius: 8px;

        font-size: 8px;

        font-weight: 800;

        cursor: pointer;
    }


    .approve-btn {

        background: #eaf8ef;

        color: #287646;
    }


    .approve-btn:hover {

        background: #d8f3e1;
    }


    .block-btn {

        background: #fff1f2;

        color: #be123c;
    }


    .limit-btn {

        background: #fff7e8;

        color: #b7791f;
    }

    .activate-btn {

        background: #eaf8ef;

        color: #287646;
    }

    .loan-summary {

        margin-top: 18px;
    }

    .loan-stat-grid {

        display: grid;

        grid-template-columns: repeat(2, 1fr);

        gap: 10px;
    }

    .loan-stat {

        padding: 12px;

        border: 1px solid #edf1f6;

        border-radius: 9px;

        background: #fbfcfe;
    }

    .loan-stat-label {

        display: block;

        margin-bottom: 5px;

        color: #9aa6b6;

        font-size: 7px;

        font-weight: 800;

        text-transform: uppercase;
    }

    .loan-stat-value {

        color: #344966;

        font-size: 10px;

        font-weight: 800;
    }


    /* =====================================================
       PAYMENT
    ====================================================== */

    .payment-row {

        display: flex;

        align-items: center;

        justify-content: space-between;

        padding: 11px 0;

        border-bottom:
            1px solid #edf1f6;
    }


    .payment-row:last-child {

        border-bottom: 0;
    }


    .payment-title {

        color: #344966;

        font-size: 8px;

        font-weight: 800;
    }


    .payment-date {

        margin-top: 3px;

        color: #9aa6b6;

        font-size: 7px;
    }


    .paid {

        color: #287646;

        font-size: 7px;

        font-weight: 800;
    }


    .unpaid {

        color: #b7791f;

        font-size: 7px;

        font-weight: 800;
    }


    /* =====================================================
       RESPONSIVE
    ====================================================== */

    @media (max-width: 900px) {

        .card-grid {

            grid-template-columns: 1fr;

        }

    }


    @media (max-width: 600px) {

        .loan-stat-grid {
            grid-template-columns: 1fr;
        }

        .loan-stat[style*="grid-column"] {
            grid-column: auto !important;
        }

        .info-grid {

            grid-template-columns: 1fr;

        }

        .emi-card-preview {

            min-height: 210px;

        }

        .card-number-preview {

            font-size: 13px;

        }

    }

</style>

<?php $__env->stopPush(); ?>



<?php $__env->startSection('content'); ?>




<a
    href="<?php echo e(route('admin.emi-cards')); ?>"
    class="back-btn"
>

    ← Back to EMI Cards

</a>





<?php if(session('success')): ?>

    <div
        style="
            padding:12px 15px;
            margin-bottom:18px;
            border-radius:9px;
            background:#ecfdf5;
            border:1px solid #bbf7d0;
            color:#166534;
            font-size:10px;
            font-weight:700;
        "
    >

        ✓ <?php echo e(session('success')); ?>


    </div>

<?php endif; ?>


<?php if(session('error')): ?>

    <div
        style="
            padding:12px 15px;
            margin-bottom:18px;
            border-radius:9px;
            background:#fff1f2;
            border:1px solid #fecdd3;
            color:#be123c;
            font-size:10px;
            font-weight:700;
        "
    >

        ✕ <?php echo e(session('error')); ?>


    </div>

<?php endif; ?>





<div class="page-heading">

    <h2>
        EMI Card Details
    </h2>

    <p>
        Complete information for this EMI card and client.
    </p>

</div>



<div class="card-grid">


    

    <div>


        

        <div class="panel">

            <div class="panel-header">

                <h3>
                    Card Preview
                </h3>


                <?php if(
                    $card->expires_at &&
                    $card->expires_at->isPast()
                ): ?>

                    <span class="badge badge-expired">

                        <span class="dot"></span>

                        Expired

                    </span>

                <?php else: ?>

                    <?php switch($card->status):

                        case ('active'): ?>

                            <span
                                class="badge badge-active"
                            >

                                <span class="dot"></span>

                                Active

                            </span>

                            <?php break; ?>


                        <?php case ('pending'): ?>

                            <span
                                class="badge badge-pending"
                            >

                                <span class="dot"></span>

                                Pending

                            </span>

                            <?php break; ?>


                        <?php case ('blocked'): ?>

                            <span
                                class="badge badge-blocked"
                            >

                                <span class="dot"></span>

                                Blocked

                            </span>

                            <?php break; ?>


                        <?php default: ?>

                            <span
                                class="badge badge-expired"
                            >

                                <?php echo e(ucfirst(
                                    $card->status
                                )); ?>


                            </span>

                    <?php endswitch; ?>

                <?php endif; ?>

            </div>


            <div class="panel-body">


                <div class="emi-card-preview">


                    <div class="brand">

                        <div class="brand-name">
                            PG FINSEV
                        </div>


                        <div class="card-chip"></div>

                    </div>


                    <div class="card-number-preview">

                        <?php echo e($card->card_number); ?>


                    </div>


                    <div class="card-bottom">


                        <div>

                            <span
                                class="card-small-label"
                            >
                                Card Holder
                            </span>

                            <span
                                class="card-small-value"
                            >

                                <?php echo e($card->user->name
                                    ?? 'CLIENT'); ?>


                            </span>

                        </div>


                        <div>

                            <span
                                class="card-small-label"
                            >
                                Valid Until
                            </span>

                            <span
                                class="card-small-value"
                            >

                                <?php echo e($card->expires_at
                                        ? $card->expires_at->format(
                                            'm/Y'
                                        )
                                        : '-'); ?>


                            </span>

                        </div>


                    </div>


                </div>


                

                <div class="info-grid">


                    <div class="info-item">

                        <span class="info-label">
                            Card Limit
                        </span>

                        <span class="info-value">

                            ₹<?php echo e(number_format(
                                $card->card_limit ?? 0,
                                2
                            )); ?>


                        </span>

                    </div>


                    <div class="info-item">

                        <span class="info-label">
                            Available Limit
                        </span>

                        <span class="info-value green">

                            ₹<?php echo e(number_format(
                                $card->available_limit ?? 0,
                                2
                            )); ?>


                        </span>

                    </div>


                    <div class="info-item">

                        <span class="info-label">
                            Issued Date
                        </span>

                        <span class="info-value">

                            <?php echo e($card->issued_at
                                    ? $card->issued_at->format(
                                        'd M Y'
                                    )
                                    : '-'); ?>


                        </span>

                    </div>


                    <div class="info-item">

                        <span class="info-label">
                            Expiry Date
                        </span>

                        <span
                            class="
                                info-value
                                <?php echo e($card->expires_at &&
                                    $card->expires_at->isPast()
                                        ? 'red'
                                        : ''); ?>

                            "
                        >

                            <?php echo e($card->expires_at
                                    ? $card->expires_at->format(
                                        'd M Y'
                                    )
                                    : '-'); ?>


                        </span>

                    </div>


                </div>


            </div>

        </div>



        

        <div
            class="panel"
            style="margin-top:18px;"
        >

            <div class="panel-header">

                <h3>
                    Client Information
                </h3>

            </div>


            <div class="panel-body">


                <div class="client-box">


                    <div class="client-avatar">

                        <?php echo e(strtoupper(
                                substr(
                                    $card->user->name
                                    ?? 'C',
                                    0,
                                    1
                                )
                            )); ?>


                    </div>


                    <div>

                        <div class="client-name">

                            <?php echo e($card->user->name
                                ?? 'Unknown Client'); ?>


                        </div>


                        <div class="client-contact">

                            <?php echo e($card->user->email
                                ?? '-'); ?>


                            <br>

                            <?php echo e($card->user->mobile
                                ?? '-'); ?>


                        </div>

                    </div>


                </div>


                <div class="info-grid">


                    <div class="info-item">

                        <span class="info-label">
                            Personal Details
                        </span>

                        <span
                            class="
                                info-value
                                <?php echo e($card->user->clientProfile
                                        ? 'green'
                                        : 'red'); ?>

                            "
                        >

                            <?php echo e($card->user->clientProfile
                                    ? '✓ Completed'
                                    : '✕ Incomplete'); ?>


                        </span>

                    </div>


                    <div class="info-item">

                        <span class="info-label">
                            KYC
                        </span>

                        <span
                            class="
                                info-value
                                <?php echo e($card->user->clientKyc &&
                                    $card->user->clientKyc->status === 'verified'
                                        ? 'green'
                                        : 'red'); ?>

                            "
                        >

                            <?php echo e($card->user->clientKyc &&
                                $card->user->clientKyc->status === 'verified'
                                    ? '✓ Verified'
                                    : '✕ Not Verified'); ?>


                        </span>

                    </div>


                    <div class="info-item">

                        <span class="info-label">
                            Job Details
                        </span>

                        <span
                            class="
                                info-value
                                <?php echo e($card->user->clientEmployment
                                        ? 'green'
                                        : 'red'); ?>

                            "
                        >

                            <?php echo e($card->user->clientEmployment
                                    ? '✓ Completed'
                                    : '✕ Incomplete'); ?>


                        </span>

                    </div>


                    <div class="info-item">

                        <span class="info-label">
                            Card Status
                        </span>

                        <span class="info-value">

                            <?php echo e(ucfirst(
                                $card->status
                            )); ?>


                        </span>

                    </div>


                </div>


            </div>

        </div>


    </div>



    

    <div>


        

        <div class="panel">

            <div class="panel-header">

                <h3>
                    Card Actions
                </h3>

            </div>


            <div class="panel-body">


                <?php

                    $hasPaidPayment =
                        $card->user
                            ? $card->user->payments()
                                ->where(
                                    'status',
                                    'paid'
                                )
                                ->exists()
                            : false;

                    $isExpired =
                        $card->expires_at &&
                        $card->expires_at->isPast();

                ?>


                

                <div class="info-item">

                    <span class="info-label">
                        Payment Status
                    </span>


                    <?php if($hasPaidPayment): ?>

                        <span
                            class="info-value green"
                        >

                            ✓ Payment Completed

                        </span>

                    <?php else: ?>

                        <span
                            class="info-value orange"
                        >

                            ⏳ Payment Pending

                        </span>

                    <?php endif; ?>

                </div>



                

                <div
                    class="info-item"
                    style="margin-top:10px;"
                >

                    <span class="info-label">
                        Approval
                    </span>


                    <?php if($card->approved_at): ?>

                        <span
                            class="info-value green"
                        >

                            ✓ Approved

                        </span>


                        <?php if($card->approver): ?>

                            <div
                                style="
                                    margin-top:5px;
                                    color:#9aa6b6;
                                    font-size:7px;
                                "
                            >

                                By:
                                <?php echo e($card->approver->name); ?>


                                <br>

                                <?php echo e($card->approved_at->format(
                                        'd M Y h:i A'
                                    )); ?>


                            </div>

                        <?php endif; ?>

                    <?php else: ?>

                        <span
                            class="info-value orange"
                        >

                            Pending Approval

                        </span>

                    <?php endif; ?>

                </div>



                

                <?php if(!$isExpired): ?>

                    <form
                        method="POST"
                        action="<?php echo e(route(
                            'admin.emi-cards.limit',
                            $card
                        )); ?>"
                        style="margin-top:10px;"
                    >

                        <?php echo csrf_field(); ?>
                        <?php echo method_field('PUT'); ?>

                        <div
                            style="
                                display:flex;
                                gap:7px;
                                align-items:center;
                            "
                        >

                            <input
                                type="number"
                                name="card_limit"
                                value="<?php echo e($card->card_limit ?? 0); ?>"
                                min="0"
                                step="0.01"
                                required
                                style="
                                    flex:1;
                                    height:38px;
                                    padding:0 10px;
                                    border:1px solid #dce4ef;
                                    border-radius:8px;
                                    color:#344966;
                                    font-size:9px;
                                    outline:none;
                                "
                            >

                            <button
                                type="submit"
                                class="action-btn limit-btn"
                                style="width:auto;padding:0 14px;"
                                onclick="
                                    return confirm(
                                        'Update this EMI Card limit?'
                                    )
                                "
                            >
                                Update Limit
                            </button>

                        </div>

                    </form>

                <?php endif; ?>


                

                <div class="actions">


                    

                    <?php if(
                        $card->status === 'pending'
                    ): ?>

                        <?php if($hasPaidPayment): ?>

                            <?php if(
                                (float)
                                $card->card_limit > 0
                            ): ?>

                                <form
                                    method="POST"
                                    action="<?php echo e(route(
                                        'admin.emi-cards.approve',
                                        $card
                                    )); ?>"
                                >

                                    <?php echo csrf_field(); ?>

                                    <button
                                        type="submit"
                                        class="action-btn approve-btn"
                                        onclick="
                                            return confirm(
                                                'Approve and unlock this EMI Card?'
                                            )
                                        "
                                    >

                                        ✓ Approve & Unlock Card

                                    </button>

                                </form>

                            <?php else: ?>

                                <div
                                    style="
                                        padding:11px;
                                        background:#fff7e8;
                                        color:#92400e;
                                        border-radius:8px;
                                        font-size:8px;
                                        text-align:center;
                                    "
                                >

                                    Please set the loan limit
                                    before approval.

                                </div>

                            <?php endif; ?>

                        <?php else: ?>

                            <div
                                style="
                                    padding:11px;
                                    background:#fff7e8;
                                    color:#92400e;
                                    border-radius:8px;
                                    font-size:8px;
                                    text-align:center;
                                "
                            >

                                Payment must be completed
                                before approval.

                            </div>

                        <?php endif; ?>

                    <?php endif; ?>



                    

                    <?php if(
                        $card->status === 'active'
                    ): ?>

                        <form
                            method="POST"
                            action="<?php echo e(route(
                                'admin.emi-cards.block',
                                $card
                            )); ?>"
                        >

                            <?php echo csrf_field(); ?>

                            <button
                                type="submit"
                                class="action-btn block-btn"
                                onclick="
                                    return confirm(
                                        'Block this EMI Card?'
                                    )
                                "
                            >

                                Block EMI Card

                            </button>

                        </form>

                    <?php endif; ?>


                    

                    <?php if(
                        $card->status === 'blocked' &&
                        !$isExpired
                    ): ?>

                        <form
                            method="POST"
                            action="<?php echo e(route(
                                'admin.emi-cards.activate',
                                $card
                            )); ?>"
                        >

                            <?php echo csrf_field(); ?>

                            <button
                                type="submit"
                                class="action-btn activate-btn"
                                onclick="
                                    return confirm(
                                        'Activate this blocked EMI Card?'
                                    )
                                "
                            >

                                ✓ Activate EMI Card

                            </button>

                        </form>

                    <?php endif; ?>


                </div>


            </div>

        </div>



        

        <?php if(
            $card->user &&
            method_exists($card->user, 'loans')
        ): ?>

            <?php
                $cardLoans = $card->user->loans()
                    ->latest('created_at')
                    ->get();
            ?>

            <div
                class="panel loan-summary"
            >

                <div class="panel-header">

                    <h3>
                        Loan Summary
                    </h3>

                </div>

                <div class="panel-body">

                    <?php if($cardLoans->count()): ?>

                        <?php
                            $activeLoans = $cardLoans->whereIn(
                                'status',
                                ['approved', 'disbursed', 'active', 'overdue']
                            );

                            $totalBorrowed = $cardLoans->sum(
                                fn ($loan) => (float) ($loan->loan_amount ?? 0)
                            );

                            $totalOutstanding = $cardLoans->sum(
                                fn ($loan) => (float) ($loan->outstanding_amount ?? 0)
                            );

                            $monthlyEmi = $activeLoans->sum(
                                fn ($loan) => (float) ($loan->emi_amount ?? 0)
                            );
                        ?>

                        <div class="loan-stat-grid">

                            <div class="loan-stat">
                                <span class="loan-stat-label">Loans</span>
                                <span class="loan-stat-value"><?php echo e($cardLoans->count()); ?></span>
                            </div>

                            <div class="loan-stat">
                                <span class="loan-stat-label">Active</span>
                                <span class="loan-stat-value"><?php echo e($activeLoans->count()); ?></span>
                            </div>

                            <div class="loan-stat">
                                <span class="loan-stat-label">Total Borrowed</span>
                                <span class="loan-stat-value">
                                    ₹<?php echo e(number_format($totalBorrowed, 2)); ?>

                                </span>
                            </div>

                            <div class="loan-stat">
                                <span class="loan-stat-label">Outstanding</span>
                                <span class="loan-stat-value">
                                    ₹<?php echo e(number_format($totalOutstanding, 2)); ?>

                                </span>
                            </div>

                            <div
                                class="loan-stat"
                                style="grid-column:1 / -1;"
                            >
                                <span class="loan-stat-label">Monthly EMI</span>
                                <span class="loan-stat-value">
                                    ₹<?php echo e(number_format($monthlyEmi, 2)); ?>

                                </span>
                            </div>

                        </div>

                        <div style="margin-top:12px;">

                            <?php $__currentLoopData = $cardLoans->take(5); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $loan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                <div class="payment-row">

                                    <div>
                                        <div class="payment-title">
                                            <?php echo e($loan->loan_number ?? 'Loan #'.$loan->id); ?>

                                        </div>

                                        <div class="payment-date">
                                            <?php echo e(ucfirst($loan->status ?? '—')); ?>

                                        </div>
                                    </div>

                                    <div style="text-align:right;">
                                        <div
                                            style="
                                                color:#273b59;
                                                font-size:9px;
                                                font-weight:800;
                                            "
                                        >
                                            ₹<?php echo e(number_format($loan->outstanding_amount ?? 0, 2)); ?>

                                        </div>

                                        <div
                                            style="
                                                margin-top:3px;
                                                color:#9aa6b6;
                                                font-size:7px;
                                            "
                                        >
                                            Outstanding
                                        </div>
                                    </div>

                                </div>

                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        </div>

                    <?php else: ?>

                        <div
                            style="
                                padding:25px 0;
                                text-align:center;
                                color:#9aa6b6;
                                font-size:9px;
                            "
                        >
                            No loan records found.
                        </div>

                    <?php endif; ?>

                </div>

            </div>

        <?php endif; ?>


        

        <div
            class="panel"
            style="margin-top:18px;"
        >

            <div class="panel-header">

                <h3>
                    Payment History
                </h3>

            </div>


            <div class="panel-body">


                <?php if(
                    $card->user &&
                    $card->user->payments->count()
                ): ?>


                    <?php $__currentLoopData = $card->user->payments
                            ->sortByDesc('created_at')
                            ->take(10); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>


                        <div class="payment-row">


                            <div>

                                <div class="payment-title">

                                    Payment

                                </div>


                                <div class="payment-date">

                                    <?php echo e($payment->created_at
                                            ? $payment->created_at->format(
                                                'd M Y h:i A'
                                            )
                                            : '-'); ?>


                                </div>

                            </div>


                            <div>

                                <div
                                    style="
                                        text-align:right;
                                        color:#273b59;
                                        font-size:9px;
                                        font-weight:800;
                                    "
                                >

                                    ₹<?php echo e(number_format(
                                        $payment->amount ?? 0,
                                        2
                                    )); ?>


                                </div>


                                <?php if(
                                    $payment->status === 'paid'
                                ): ?>

                                    <div
                                        class="paid"
                                        style="text-align:right;"
                                    >

                                        ✓ Paid

                                    </div>

                                <?php else: ?>

                                    <div
                                        class="unpaid"
                                        style="text-align:right;"
                                    >

                                        <?php echo e(ucfirst(
                                            $payment->status
                                        )); ?>


                                    </div>

                                <?php endif; ?>

                            </div>


                        </div>


                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                <?php else: ?>


                    <div
                        style="
                            padding:25px 0;
                            text-align:center;
                            color:#9aa6b6;
                            font-size:9px;
                        "
                    >

                        No payment records found.

                    </div>


                <?php endif; ?>


            </div>

        </div>


    </div>


</div>


<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\emi-card\resources\views/admin/emi-cards/show.blade.php ENDPATH**/ ?>