<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Verified Identity | OneQRScan</title>

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link
        href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap"
        rel="stylesheet">

    <style>
        :root {
            --bg-app: #FFFFFF;
            --bg-page: #F1F5F9;
            --surface: #FFFFFF;
            --surface-alt: #F8FAFC;
            --primary: #2563EB;
            --primary-light: #EFF6FF;
            --success: #059669;
            --success-light: #ECFDF5;
            --warning: #D97706;
            --warning-light: #FFFBEB;
            --danger: #DC2626;
            --danger-light: #FEE2E2;
            --text-main: #0F172A;
            --text-muted: #475569;
            --text-light: #94A3B8;
            --border: rgba(0, 0, 0, 0.06);
            --border-strong: rgba(0, 0, 0, 0.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-page);
            color: var(--text-main);
            line-height: 1.5;
            display: flex;
            justify-content: center;
            min-height: 100vh;
        }

        h1,
        h2,
        h3,
        h4,
        .brand-text {
            font-family: 'Outfit', sans-serif;
        }

        /* ─── APP CONTAINER ─── */
        .app-container {
            width: 100%;
            max-width: 480px;
            background: var(--bg-app);
            min-height: 100vh;
            position: relative;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
            overflow-x: hidden;
            padding-bottom: 90px;
        }

        /* ─── HEADER & COVER ─── */
        .header-cover {
            height: 140px;
            background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
            position: relative;
            border-bottom-left-radius: 24px;
            border-bottom-right-radius: 24px;
        }

        .header-cover::after {
            content: '';
            position: absolute;
            inset: 0;
            background-image: radial-gradient(circle at 20% 150%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        }

        .scan-time-badge {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(8px);
            color: #fff;
            font-size: 0.75rem;
            font-weight: 500;
            padding: 6px 12px;
            border-radius: 100px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* ─── PROFILE SECTION ─── */
        .profile-section {
            padding: 0 24px;
            margin-top: -50px;
            position: relative;
            z-index: 10;
            text-align: center;
        }

        .avatar-wrap {
            width: 100px;
            height: 100px;
            margin: 0 auto 16px;
            border-radius: 50%;
            padding: 4px;
            background: var(--bg-app);
            position: relative;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        }

        .avatar {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: var(--surface-alt);
            object-fit: cover;
        }

        .verified-badge {
            position: absolute;
            bottom: 4px;
            right: 4px;
            width: 28px;
            height: 28px;
            background: var(--success);
            border: 2px solid var(--bg-app);
            border-radius: 50%;
            display: grid;
            place-items: center;
        }

        .verified-badge svg {
            width: 14px;
            height: 14px;
            stroke: #fff;
            fill: none;
            stroke-width: 3;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .profile-name {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 4px;
        }

        .profile-title {
            font-size: 0.9rem;
            color: var(--text-muted);
            font-weight: 500;
            margin-bottom: 16px;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: var(--success-light);
            border-radius: 100px;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--success);
        }

        .status-pill .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--success);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
            }

            70% {
                box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
            }
        }

        /* ─── QUICK ACTIONS (Updated for 4 items) ─── */
        .quick-actions {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin: 28px 24px 32px;
        }

        .action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            background: none;
            border: none;
            cursor: pointer;
            text-decoration: none;
            flex: 1;
        }

        .action-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: grid;
            place-items: center;
            transition: transform 0.2s;
        }

        .action-btn:active .action-icon {
            transform: scale(0.92);
        }

        .action-btn span {
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-muted);
            text-align: center;
        }

        .bg-blue {
            background: var(--primary-light);
            color: var(--primary);
        }

        .bg-red {
            background: var(--danger-light);
            color: var(--danger);
        }

        .bg-rose {
            background: #FFE4E6;
            color: #E11D48;
        }

        /* For Blood Bank */
        .bg-green {
            background: var(--success-light);
            color: var(--success);
        }

        /* ─── SECTION STYLES ─── */
        .section-wrap {
            padding: 0 24px;
            margin-bottom: 28px;
        }

        .section-head {
            margin-bottom: 16px;
            border-bottom: 2px solid var(--surface-alt);
            padding-bottom: 8px;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text-main);
        }

        /* ─── DOCUMENT CARDS ─── */
        .doc-card {
            background: var(--surface);
            border: 1px solid var(--border-strong);
            border-radius: 16px;
            padding: 16px;
            margin-bottom: 16px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
        }

        .doc-card.highlight {
            border-color: rgba(37, 99, 235, 0.3);
            background: linear-gradient(180deg, rgba(37, 99, 235, 0.03) 0%, var(--surface) 100%);
        }

        .doc-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .doc-title-wrap {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .doc-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: var(--surface-alt);
            display: grid;
            place-items: center;
            color: var(--text-muted);
        }

        .highlight .doc-icon {
            background: var(--primary);
            color: #fff;
        }

        .doc-name {
            font-family: 'Outfit', sans-serif;
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-main);
        }

        .doc-sub {
            font-size: 0.75rem;
            color: var(--text-light);
            margin-top: 2px;
        }

        .data-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px dashed var(--border-strong);
        }

        .data-grid.full {
            grid-template-columns: 1fr;
        }

        .data-item p {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .data-item h4 {
            font-family: 'Inter', sans-serif;
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
        }

        /* ─── LIST ITEMS & BUTTONS ─── */
        .list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-top: 1px solid var(--border);
        }

        .list-item:first-child {
            border-top: none;
            padding-top: 0;
        }

        .list-info h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .list-info p {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .btn-view {
            background: var(--primary-light);
            color: var(--primary);
            border: none;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* ─── EMERGENCY CONTACTS ─── */
        .contact-card {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--surface);
            border: 1px solid var(--border-strong);
            padding: 12px 16px;
            border-radius: 12px;
            margin-bottom: 10px;
            border-left: 4px solid var(--danger);
        }

        .contact-info h4 {
            font-size: 0.95rem;
            font-weight: 600;
        }

        .contact-info p {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .btn-call-small {
            background: var(--danger-light);
            color: var(--danger);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            display: grid;
            place-items: center;
            cursor: pointer;
            text-decoration: none;
        }

        /* ─── STICKY BOTTOM BAR ─── */
        .bottom-bar {
            position: fixed;
            bottom: 0;
            width: 100%;
            max-width: 480px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(12px);
            border-top: 1px solid var(--border);
            padding: 16px 24px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            z-index: 100;
        }

        .brand-footer {
            display: flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
        }

        .brand-logo {
            width: 24px;
            height: 24px;
            background: var(--primary);
            border-radius: 6px;
            display: grid;
            place-items: center;
        }

        .brand-logo svg {
            width: 14px;
            height: 14px;
            fill: #fff;
        }

        .brand-text {
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--text-main);
            letter-spacing: -0.5px;
        }

        .brand-text span {
            color: var(--primary);
        }

        .footer-note {
            font-size: 0.7rem;
            color: var(--text-light);
            font-weight: 500;
        }

        /* ─── MODAL (IMAGE VIEWER) ─── */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.85);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
            padding: 20px;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .modal-overlay.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background: var(--bg-app);
            width: 100%;
            max-width: 400px;
            border-radius: 16px;
            overflow: hidden;
            transform: translateY(20px);
            transition: transform 0.3s;
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0);
        }

        .modal-header {
            padding: 16px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            font-size: 1.1rem;
        }

        .close-btn {
            background: var(--surface-alt);
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            cursor: pointer;
            color: var(--text-main);
        }

        .modal-body {
            padding: 16px;
            text-align: center;
            background: #E2E8F0;
        }

        .modal-body img {
            width: 100%;
            border-radius: 8px;
            object-fit: contain;
            max-height: 60vh;
            background: #fff;
            padding: 4px;
        }

        /* Animations & Toast */
        .fade-up {
            opacity: 0;
            transform: translateY(20px);
            animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        .delay-1 {
            animation-delay: 0.1s;
        }

        .delay-2 {
            animation-delay: 0.2s;
        }

        .delay-3 {
            animation-delay: 0.3s;
        }

        @keyframes fadeUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        #toast {
            visibility: hidden;
            min-width: 250px;
            background-color: var(--text-main);
            color: #fff;
            text-align: center;
            border-radius: 10px;
            padding: 12px;
            position: fixed;
            z-index: 1000;
            left: 50%;
            bottom: 100px;
            transform: translateX(-50%);
            font-size: 0.85rem;
            font-weight: 500;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }

        #toast.show {
            visibility: visible;
            animation: fadein 0.3s, fadeout 0.3s 2.5s;
        }

        @keyframes fadein {
            from {
                bottom: 80px;
                opacity: 0;
            }

            to {
                bottom: 100px;
                opacity: 1;
            }
        }

        @keyframes fadeout {
            from {
                bottom: 100px;
                opacity: 1;
            }

            to {
                bottom: 80px;
                opacity: 0;
            }
        }
    </style>
</head>

<body>

    <div class="app-container">

        <div class="header-cover">
            <div class="scan-time-badge">
                <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                    stroke-width="2">
                    <circle cx="12" cy="12" r="10" />
                    <polyline points="12 6 12 12 16 14" />
                </svg>
                Scanned Today, 10:42 AM
            </div>
        </div>

        <div class="profile-section fade-up">
            <div class="avatar-wrap">
                <img src="https://ui-avatars.com/api/?name=Kowthamkr&background=F1F5F9&color=2563EB&size=200"
                    alt="Profile Photo" class="avatar">
                <div class="verified-badge">
                    <svg viewBox="0 0 24 24">
                        <polyline points="20 6 9 17 4 12" />
                    </svg>
                </div>
            </div>
            <h1 class="profile-name">Kowthamkr</h1>
            <p class="profile-title">Vehicle Owner • TN 09 AB 1234</p>
            <div class="status-pill">
                <span class="dot"></span> Identity Verified
            </div>
        </div>

        <div class="quick-actions fade-up delay-1">
            <a href="tel:+919876543210" class="action-btn">
                <div class="action-icon bg-blue">
                    <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                        stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <path
                            d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12 19.79 19.79 0 0 1 1.61 3.59a2 2 0 0 1 2-2.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 8.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z" />
                    </svg>
                </div>
                <span>Call Me</span>
            </a>

            <a href="tel:108" class="action-btn">
                <div class="action-icon bg-red">
                    <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                        stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <rect x="1" y="3" width="15" height="13"></rect>
                        <polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon>
                        <circle cx="5.5" cy="18.5" r="2.5"></circle>
                        <circle cx="18.5" cy="18.5" r="2.5"></circle>
                        <line x1="8" y1="9" x2="8" y2="10"></line>
                        <line x1="7" y1="9" x2="9" y2="9"></line>
                    </svg>
                </div>
                <span>Ambulance</span>
            </a>

            <a href="tel:104" class="action-btn">
                <div class="action-icon bg-rose">
                    <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                        stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z" />
                    </svg>
                </div>
                <span>Blood Bank</span>
            </a>

            <button onclick="sendLiveLocation()" class="action-btn">
                <div class="action-icon bg-green">
                    <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                        stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <polygon points="3 11 22 2 13 21 11 13 3 11" />
                    </svg>
                </div>
                <span>SOS Location</span>
            </button>
        </div>

        <div class="section-wrap fade-up delay-2">
            <div class="section-head">
                <h2 class="section-title">Emergency Family Contacts</h2>
            </div>

            <div class="contact-card">
                <div class="contact-info">
                    <h4>Priya (Wife)</h4>
                    <p>Primary Emergency Contact</p>
                </div>
                <div style="display: flex; gap: 8px;">
                    <button onclick="notifyParents()" class="btn-call-small"
                        style="background: var(--success-light); color: var(--success); border: none; cursor: pointer;"
                        title="Send Location">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                            stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
                            <polygon points="3 11 22 2 13 21 11 13 3 11" />
                        </svg>
                    </button>
                    <a href="tel:+919876500001" class="btn-call-small">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                            stroke-width="2">
                            <path
                                d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12 19.79 19.79 0 0 1 1.61 3.59a2 2 0 0 1 2-2.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 8.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z" />
                        </svg>
                    </a>
                </div>
            </div>

            <div class="contact-card">
                <div class="contact-info">
                    <h4>Suresh (Father)</h4>
                    <p>Secondary Contact</p>
                </div>
                <div style="display: flex; gap: 8px;">
                    <button onclick="notifyParents()" class="btn-call-small"
                        style="background: var(--success-light); color: var(--success); border: none; cursor: pointer;"
                        title="Send Location">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                            stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
                            <polygon points="3 11 22 2 13 21 11 13 3 11" />
                        </svg>
                    </button>
                    <a href="tel:+919876500002" class="btn-call-small">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                            stroke-width="2">
                            <path
                                d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12 19.79 19.79 0 0 1 1.61 3.59a2 2 0 0 1 2-2.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 8.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z" />
                        </svg>
                    </a>
                </div>
            </div>
            <div class="doc-card">
                <div class="doc-header">
                    <div class="doc-title-wrap">
                        <div class="doc-icon">
                            <svg width="20" height="20" viewBox="0 0 24 24" fill="none"
                                stroke="currentColor" stroke-width="2">
                                <path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" />
                                <circle cx="12" cy="10" r="3" />
                            </svg>
                        </div>
                        <div>
                            <h3 class="doc-name">Verified Address</h3>
                            <p class="doc-sub">Primary Residence</p>
                        </div>
                    </div>
                </div>
                <div class="data-grid full" style="padding-top: 0; border-top: none; margin-top: 0;">
                    <div class="data-item">
                        <p>Permanent Address</p>
                        <h4 style="line-height: 1.4;">No. 42, Green Valley Apartments, 2nd Main Road, Anna Nagar,
                            Chennai - 600040, Tamil Nadu, India.</h4>
                    </div>
                </div>
            </div>
        </div>


        <div class="section-wrap fade-up delay-3">
            <div class="section-head">
                <h2 class="section-title">Verified Documents</h2>
            </div>

            <div class="doc-card highlight">
                <div class="doc-header" style="margin-bottom:0;">
                    <div class="doc-title-wrap">
                        <div class="doc-icon">
                            <svg width="20" height="20" viewBox="0 0 24 24" fill="none"
                                stroke="currentColor" stroke-width="2">
                                <rect x="3" y="11" width="18" height="10" rx="2" />
                                <circle cx="7" cy="15" r="2" />
                                <circle cx="17" cy="15" r="2" />
                                <path d="M3 11L5 5h14l2 6" />
                            </svg>
                        </div>
                        <div>
                            <h3 class="doc-name">RC Details</h3>
                            <p class="doc-sub">Hyundai Creta • TN 09 AB 1234</p>
                        </div>
                    </div>
                    <button class="btn-view"
                        onclick="openModal('Registration Certificate', 'https://static.toiimg.com/thumb/resizemode-4,msid-92497864,imgsize-68152,width-364/92497864.jpg')">
                        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                            stroke-width="2">
                            <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" />
                            <circle cx="12" cy="12" r="3" />
                        </svg>
                        View RC
                    </button>
                </div>
            </div>

            <div class="doc-card">
                <div class="doc-header">
                    <div class="doc-title-wrap">
                        <div class="doc-icon">
                            <svg width="20" height="20" viewBox="0 0 24 24" fill="none"
                                stroke="currentColor" stroke-width="2">
                                <rect x="2" y="4" width="20" height="16" rx="2" ry="2" />
                                <path d="M7 15h0M2 9.5h20" />
                            </svg>
                        </div>
                        <div>
                            <h3 class="doc-name">Authorized Drivers</h3>
                            <p class="doc-sub">Uploaded Driving Licenses</p>
                        </div>
                    </div>
                </div>

                <div class="list-item">
                    <div class="list-info">
                        <h4>Rajesh Kumar</h4>
                        <p>Owner • LMV</p>
                    </div>
                    <button class="btn-view"
                        onclick="openModal('Rajesh\'s License', 'https://jakechapmanstudio.com/driving-license/images/INDIA%20MANIPUR%20state%20driving%20license.jpg')">View</button>
                </div>

                <div class="list-item">
                    <div class="list-info">
                        <h4>Ramesh Kumar</h4>
                        <p>Brother • LMV</p>
                    </div>
                    <button class="btn-view"
                        onclick="openModal('Ramesh\'s License', 'https://jakechapmanstudio.com/driving-license/images/INDIA%20MANIPUR%20state%20driving%20license.jpg')">View</button>
                </div>

                <div class="list-item">
                    <div class="list-info">
                        <h4>Suresh Kumar</h4>
                        <p>Father • LMV</p>
                    </div>
                    <button class="btn-view"
                        onclick="openModal('Suresh\'s License', 'https://jakechapmanstudio.com/driving-license/images/INDIA%20MANIPUR%20state%20driving%20license.jpg')">View</button>
                </div>
            </div>

            <div class="doc-card">
                <div class="doc-header">
                    <div class="doc-title-wrap">
                        <div class="doc-icon" style="background: #E0F2FE; color: #0284C7;">
                            <svg width="20" height="20" viewBox="0 0 24 24" fill="none"
                                stroke="currentColor" stroke-width="2">
                                <path d="M22 12h-4l-3 9L9 3l-3 9H2" />
                            </svg>
                        </div>
                        <div>
                            <h3 class="doc-name">Medical Insurance</h3>
                            <p class="doc-sub">Accidental Cover Active</p>
                        </div>
                    </div>
                </div>

                <div class="data-grid full" style="padding-top: 0; border-top: none; margin-top: 0;">
                    <div class="data-item">
                        <p>Insurance Company Name</p>
                        <h4>Star Health & Allied Insurance</h4>
                    </div>
                </div>
                <div class="data-grid">
                    <div class="data-item">
                        <p>Policy Number</p>
                        <h4>MED-987654321</h4>
                    </div>
                    <div class="data-item">
                        <p>Valid Upto</p>
                        <h4>10 Nov 2026</h4>
                    </div>
                    <div class="data-item">
                        <p>Agent Name</p>
                        <h4>Vijay Sharma</h4>
                    </div>
                    <div class="data-item">
                        <p>Agent Number</p>
                        <h4>
                            <a href="tel:+919876511111"
                                style="color: var(--primary); text-decoration: none; font-weight: 700;">+91 98765
                                11111</a>
                        </h4>
                    </div>
                </div>
            </div>

        </div>

        <div class="bottom-bar">
            <div>
                <a href="https://oneqrscan.com" class="brand-footer">
                    <div class="brand-logo">
                        <svg viewBox="0 0 24 24">
                            <path
                                d="M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h3v3h-3zM19 14h2v2h-2zM17 17h2v2h-2zM19 19h2v2h-2zM14 19h2v2h-2z" />
                        </svg>
                    </div>
                    <span class="brand-text">One<span>QR</span>Scan</span>
                </a>
                <p class="footer-note">Verified Digital Infrastructure</p>
            </div>
        </div>

        <div id="toast">Location sent to family</div>

    </div>

    <div class="modal-overlay" id="imageModal" onclick="closeModal(event)">
        <div class="modal-content" onclick="event.stopPropagation()">
            <div class="modal-header">
                <h3 id="modalTitle">Document View</h3>
                <button class="close-btn" onclick="closeModal(null, true)">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor"
                        stroke-width="2">
                        <line x1="18" y1="6" x2="6" y2="18" />
                        <line x1="6" y1="6" x2="18" y2="18" />
                    </svg>
                </button>
            </div>
            <div class="modal-body">
                <img id="modalImage" src="" alt="Document Copy">
            </div>
        </div>
    </div>

    <script>
        // Show Toast message
        function showToast(message) {
            var toast = document.getElementById("toast");
            toast.innerText = message;
            toast.className = "show";
            setTimeout(function() {
                toast.className = toast.className.replace("show", "");
            }, 2800);
        }

        // Open Image Viewer Modal
        function openModal(title, imageUrl) {
            document.getElementById('modalTitle').innerText = title;
            document.getElementById('modalImage').src = imageUrl;
            document.getElementById('imageModal').classList.add('active');
            document.body.style.overflow = 'hidden'; // Prevent scrolling in background
        }

        // Close Image Viewer Modal
        function closeModal(event, forceClose) {
            if (forceClose || event.target.id === 'imageModal') {
                document.getElementById('imageModal').classList.remove('active');
                document.body.style.overflow = 'auto';
                setTimeout(() => {
                    document.getElementById('modalImage').src = '';
                }, 300); // Clear image after animation
            }
        }

        // Mock Function: Send Live Location
        function sendLiveLocation() {
            // In a real app, this would use navigator.geolocation to get lat/long
            // and trigger a WhatsApp intent or an SMS API to family numbers.
            if (navigator.geolocation) {
                showToast("Locating... Sending SOS alert to family.");

                /* Example of what real logic would look like:
                navigator.geolocation.getCurrentPosition(function(position) {
                  let lat = position.coords.latitude;
                  let lon = position.coords.longitude;
                  let mapsLink = `https://maps.google.com/?q=${lat},${lon}`;
                  window.open(`https://wa.me/919876500001?text=EMERGENCY: Rajesh requires immediate assistance. Location: ${mapsLink}`);
                });
                */
            } else {
                showToast("Location not supported by device.");
            }
        }
    </script>

</body>

</html>
<?php /**PATH F:\xampp\htdocs\OneQRscan\resources\views/live/bike.blade.php ENDPATH**/ ?>