<?php include 'header.php'; ?>

<style>
    body {
        background: #f5f7fb;
    }

    .page-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
    }

    .page-title {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        margin: 0;
    }

    .back-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: #2563eb;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
        text-decoration: none;
    }

    .back-btn:hover {
        background: #1d4ed8;
        color: #fff;
        transform: translateY(-1px);
    }

    .bill-card {
        background: #fff;
        border-radius: 18px;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.05);
        border: 1px solid #edf2f7;
    }

    .bill-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 14px;
        border-bottom: 1px solid #f1f5f9;
    }

    .bill-heading {
        font-size: 18px;
        font-weight: 700;
        color: #111827;
        margin-bottom: 4px;
    }

    .bill-subtitle {
        font-size: 13px;
        color: #64748b;
    }

    .status-badge {
        background: #dcfce7;
        color: #15803d;
        font-size: 12px;
        font-weight: 600;
        padding: 7px 14px;
        border-radius: 30px;
    }

    .detail-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .detail-item {
        background: #f8fbff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 14px;
    }

    .detail-label {
        font-size: 12px;
        color: #64748b;
        margin-bottom: 5px;
        font-weight: 600;
    }

    .detail-value {
        font-size: 15px;
        font-weight: 700;
        color: #111827;
        word-break: break-word;
    }

    .remark-box {
        margin-top: 16px;
        background: #eff6ff;
        border: 1px solid #dbeafe;
        border-radius: 14px;
        padding: 14px;
    }

    .remark-title {
        font-size: 14px;
        font-weight: 700;
        color: #1e3a8a;
        margin-bottom: 6px;
    }

    .remark-text {
        font-size: 13px;
        color: #475569;
        line-height: 1.6;
    }

    .image-box {
        margin-top: 18px;
    }

    .image-title {
        font-size: 14px;
        font-weight: 700;
        color: #111827;
        margin-bottom: 10px;
    }

    .preview-img {
        width: 130px;
        height: 130px;
        object-fit: cover;
        border-radius: 14px;
        cursor: pointer;
        border: 3px solid #fff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        transition: 0.3s;
    }

    .preview-img:hover {
        transform: scale(1.03);
    }

    .fullscreen-img {
        width: 100%;
        max-height: 100vh;
        object-fit: contain;
    }

    @media(max-width: 768px) {
        .detail-grid {
            grid-template-columns: 1fr;
        }

        .bill-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }
    }
</style>

<div class="dashboard-main-body">

    <!-- Top -->
    <div class="page-top">

        <h5 class="page-title">
            View Maintenance Bill
        </h5>

        <a href="maintenance_bill.php" class="back-btn">
            <iconify-icon icon="ic:baseline-arrow-back"></iconify-icon>
        </a>

    </div>

    <!-- Tabs -->
    <ul class="nav nav-tabs tabs mb-4">
        <li class="nav-item">
            <a class="nav-link active"
               data-bs-toggle="tab"
               href="#maintenanceTab">
                Maintenance Bill
            </a>
        </li>

        <li class="nav-item">
            <a class="nav-link"
               data-bs-toggle="tab"
               href="#paymentTab">
                Payment Info
            </a>
        </li>
    </ul>

    <div class="tab-content">

        <!-- Maintenance Bill -->
        <div class="tab-pane fade show active" id="maintenanceTab">

            <div class="bill-card">

                <div class="bill-header">

                    <div>
                        <div class="bill-heading">
                            Maintenance Bill Details
                        </div>
                    </div>

                </div>

                <div class="detail-grid">

                    <div class="detail-item">
                        <div class="detail-label">Bill Date</div>
                        <div class="detail-value">15-03-2026</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Due Date</div>
                        <div class="detail-value">25-03-2026</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Flat / Unit No</div>
                        <div class="detail-value">A-101</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Resident Name</div>
                        <div class="detail-value">Rahul Sharma</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Bill Amount</div>
                        <div class="detail-value">₹ 3,500</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Bill Type</div>
                        <div class="detail-value">Maintenance</div>
                    </div>

                </div>

                <!-- Remark -->
                <div class="remark-box">

                    <div class="remark-title">
                        Remark
                    </div>

                    <div class="remark-text">
                        Monthly maintenance bill generated for March.
                    </div>

                </div>

                <!-- Bill Image -->
                <div class="image-box">

                    <div class="image-title">
                        Bill Image
                    </div>

                    <img
                        src="https://play-lh.googleusercontent.com/qsuhGTmJKC7YgxcojYgeboy3gXRc-W4YZw8vvlDXIE3uYmK8H_o5Lq7lw9Z7nBnmTsipeAzTfQ4jWA7FLgQekw=w600-h300-pc0xffffff-pd"
                        class="preview-img"
                        data-bs-toggle="modal"
                        data-bs-target="#billImageModal">

                </div>

            </div>

        </div>

        <!-- Payment Tab -->
        <div class="tab-pane fade" id="paymentTab">

            <div class="bill-card">

                <div class="bill-header">

                    <div>
                        <div class="bill-heading">
                            Payment Information
                        </div>
                    </div>

                </div>

                <div class="detail-grid">

                    <div class="detail-item">
                        <div class="detail-label">Previous Due</div>
                        <div class="detail-value">₹ 500</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Late Fee</div>
                        <div class="detail-value">₹ 100</div>
                    </div>

                    <div class="detail-item">
                        <div class="detail-label">Total Amount</div>
                        <div class="detail-value">₹ 4,050</div>
                    </div>

                </div>

            </div>

        </div>

    </div>

</div>

<!-- Image Modal -->
<div class="modal fade" id="billImageModal" tabindex="-1">

    <div class="modal-dialog modal-fullscreen">

        <div class="modal-content bg-dark border-0">

            <div class="modal-header border-0">

                <button type="button"
                        class="btn-close btn-close-white ms-auto"
                        data-bs-dismiss="modal">
                </button>

            </div>

            <div class="modal-body d-flex justify-content-center align-items-center">

                <img src="https://play-lh.googleusercontent.com/qsuhGTmJKC7YgxcojYgeboy3gXRc-W4YZw8vvlDXIE3uYmK8H_o5Lq7lw9Z7nBnmTsipeAzTfQ4jWA7FLgQekw=w600-h300-pc0xffffff-pd"
                     class="fullscreen-img">

            </div>

        </div>

    </div>

</div>



<?php include 'footer.php'; ?>