<?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);
    }

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

    .owner-header {
        margin-bottom: 20px;
        padding-bottom: 14px;
        border-bottom: 1px solid #f1f5f9;
    }

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

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

    .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;
    }

    .document-link {
        color: #2563eb;
        text-decoration: none;
        font-weight: 600;
    }

    .document-link:hover {
        text-decoration: underline;
    }

    .status-badge {
        display: inline-block;
        background: #dcfce7;
        color: #15803d;
        font-size: 12px;
        font-weight: 700;
        padding: 6px 12px;
        border-radius: 30px;
    }

    @media(max-width: 768px) {

        .detail-grid {
            grid-template-columns: 1fr;
        }

        .owner-card {
            padding: 16px;
        }
    }
</style>

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

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

        <h5 class="page-title">View Track Owner</h5>

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

    </div>

    <!-- Card -->
    <div class="owner-card">

        <!-- Header -->
        <div class="owner-header">

            <div class="owner-heading">
                Rajesh Patel
            </div>

            <div class="owner-subtitle">
                Flat Owner Details
            </div>

        </div>

        <!-- Details -->
        <div class="detail-grid">

            <div class="detail-item">
                <div class="detail-label">Mobile Number</div>
                <div class="detail-value">9876543210</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Email</div>
                <div class="detail-value">rajesh@gmail.com</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Address</div>
                <div class="detail-value">Ahmedabad, Gujarat</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Block / Wing</div>
                <div class="detail-value">A</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Flat Number</div>
                <div class="detail-value">101</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Floor</div>
                <div class="detail-value">1</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Flat Type</div>
                <div class="detail-value">2 BHK</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Ownership Type</div>
                <div class="detail-value">Single Owner</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Purchase Date</div>
                <div class="detail-value">12-05-2022</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Parking Slot Number</div>
                <div class="detail-value">P-12</div>
            </div>

            <div class="detail-item">
                <div class="detail-label">Vehicle Number</div>
                <div class="detail-value">GJ05AB1234</div>
            </div>

<div class="detail-item">
    <div class="detail-label">Ownership Document</div>

    <div class="detail-value">
        <a href="javascript:void(0);" 
           class="document-link"
           data-bs-toggle="modal"
           data-bs-target="#documentModal">
            View Document
        </a>
    </div>
</div>

            <div class="detail-item">
                <div class="detail-label">Occupancy Status</div>
                <div class="detail-value">
                    <span class="status-badge">Occupied</span>
                </div>
            </div>

        </div>

    </div>

</div>
<!-- Document Modal -->
<div class="modal fade" id="documentModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content border-0 radius-16 overflow-hidden">

            <div class="modal-header border-0 pb-0">
                <h5 class="modal-title fw-bold">
                    Ownership Document
                </h5>

                <button type="button"
                    class="btn-close shadow-none"
                    data-bs-dismiss="modal"
                    aria-label="Close">
                </button>
            </div>

            <div class="modal-body text-center p-3">

                <img src="https://img.freepik.com/free-vector/real-estate-contract-signature-key_603843-644.jpg?semt=ais_hybrid&w=740&q=80"
                    alt="Document"
                    class="img-fluid rounded-3 border">

            </div>

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