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

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

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Visit Details — View</title>
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css" rel="stylesheet" />
    <script src="https://cdn.tailwindcss.com"></script>
    <style>:root{--ink:#0f0e17;--muted:#6b6b80;--line:#e8e8f0;--accent:#5b4fcf;--accent-light:#ede9ff;--accent-mid:#8b7ee8;--surface:#fafafa;--white:#ffffff;--green:#16a34a;--green-light:#dcfce7;--amber:#d97706;--amber-light:#fef3c7;}*{box-sizing:border-box;margin:0;padding:0;}html,body{width:100%;overflow-x:hidden;}body{font-family:'DM Sans',sans-serif;background:var(--surface);color:var(--ink);min-height:100vh;-webkit-font-smoothing:antialiased;line-height:1.5;font-size:14px;}.page{max-width:1360px;width:100%;margin:0 auto;padding:clamp(12px,2vw,28px);}.hero{background:var(--white);border:1px solid var(--line);border-radius:22px;padding:clamp(20px,3vw,32px);margin-bottom:20px;position:relative;overflow:hidden;}.hero::before{content:'';position:absolute;top:0;left:0;right:0;height:5px;background:linear-gradient(90deg,var(--accent) 0%,var(--accent-mid) 60%,#c4b5fd 100%);}.hero-inner{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap;}.avatar-wrap{position:relative;flex-shrink:0;}.avatar{width:clamp(80px,11vw,110px);height:clamp(80px,11vw,110px);border-radius:20px;border:3px solid var(--line);background:var(--accent-light);display:flex;align-items:center;justify-content:center;font-family:'Playfair Display',serif;font-size:clamp(28px,4vw,40px);font-weight:700;color:var(--accent);object-fit:cover;}.avatar-status{position:absolute;bottom:5px;right:5px;width:14px;height:14px;border-radius:50%;background:var(--green);border:2px solid var(--white);}.hero-info{flex:1;min-width:240px;}.hero-name{font-family:'Playfair Display',serif;font-size:clamp(22px,4vw,30px);font-weight:700;color:var(--ink);line-height:1.2;margin-bottom:4px;}.hero-designation{font-size:14px;color:var(--muted);margin-bottom:14px;}.hero-pills{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:16px;}.pill{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 11px;border-radius:18px;font-size:11px;font-weight:600;white-space:nowrap;}.pill-accent{background:var(--accent-light);color:var(--accent);}.pill-green{background:var(--green-light);color:var(--green);}.pill-amber{background:var(--amber-light);color:var(--amber);}.pill-gray{background:#f3f4f6;color:#374151;}.pill-red{background:#fef2f2;color:#dc2626;}.hero-meta{display:flex;flex-wrap:wrap;gap:16px;}.hero-meta-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);}.hero-meta-item i{font-size:14px;color:var(--accent-mid);}.hero-actions{display:flex;flex-direction:column;gap:8px;flex-shrink:0;}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 15px;border-radius:10px;font-size:12px;font-weight:600;cursor:pointer;transition:all .18s ease;border:none;text-decoration:none;white-space:nowrap;}.btn-ghost{background:transparent;border:1px solid var(--line);color:var(--muted);}.btn-ghost:hover{border-color:var(--accent-mid);background:var(--accent-light);color:var(--accent);}.btn-primary{background:var(--accent);color:#fff;box-shadow:0 4px 14px rgba(91,79,207,.22);}.btn-primary:hover{background:#4b40c5;}.btn-danger{background:#fff5f5;border:1px solid #fecaca;color:#dc2626;}.btn-danger:hover{background:#dc2626;color:#fff;}.tabs-wrap{background:var(--white);border:1px solid var(--line);border-radius:16px;margin-bottom:18px;overflow:hidden;}.tabs{display:flex;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:5px;gap:4px;}.tabs::-webkit-scrollbar{display:none;}.tab{display:inline-flex;align-items:center;gap:6px;padding:9px 16px;border-radius:10px;font-size:12px;font-weight:500;border:none;background:transparent;color:var(--muted);cursor:pointer;white-space:nowrap;transition:all .18s ease;flex-shrink:0;}.tab i{font-size:14px;}.tab.active{background:var(--accent-light);color:var(--accent);font-weight:600;}.tab:not(.active):hover{background:#f4f4f6;color:var(--ink);}.tab-content{display:none;}.tab-content.active{display:block;}.section-card{background:var(--white);border:1px solid var(--line);border-radius:18px;margin-bottom:18px;overflow:hidden;}.section-head{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;}.section-head-icon{width:32px;height:32px;border-radius:9px;background:var(--accent-light);display:flex;align-items:center;justify-content:center;flex-shrink:0;}.section-head-icon i{font-size:16px;color:var(--accent);}.section-head-title{font-family:'Playfair Display',serif;font-size:15px;font-weight:600;color:var(--ink);}.section-body{padding:20px;}.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px 24px;}.field-grid.two-col{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));}.field-group{min-width:0;}.field-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;display:flex;align-items:center;gap:4px;}.field-label i{font-size:11px;}.field-value{font-size:14px;font-weight:500;color:var(--ink);line-height:1.5;word-break:break-word;}.field-value.empty{color:#c7c9d1;font-style:italic;font-weight:400;}.field-value.full{grid-column:1/-1;}.divider{border:none;border-top:1px solid var(--line);margin:18px 0;}.sub-head{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);margin-bottom:14px;display:flex;align-items:center;gap:6px;}.sub-head::after{content:'';flex:1;height:1px;background:var(--accent-light);}.star-display{display:flex;gap:3px;align-items:center;}.star-display i{font-size:18px;}.star-display i.filled{color:#f59e0b;}.star-display i.empty-star{color:#d1d5db;}.tag-list{display:flex;flex-wrap:wrap;gap:6px;}.tag-badge{display:inline-flex;align-items:center;background:#ede9fe;color:#7c3aed;font-size:12px;font-weight:600;border-radius:8px;padding:3px 10px;}.attach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;}.attach-card{border:1px solid var(--line);border-radius:12px;padding:12px;background:#fafafa;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;cursor:pointer;transition:all .18s;}.attach-card:hover{border-color:var(--accent-mid);background:var(--accent-light);}.attach-card i{font-size:28px;color:var(--accent);}.attach-card span{font-size:11px;color:var(--muted);font-weight:500;}.doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:14px;}.doc-card{border:1px solid var(--line);border-radius:14px;padding:15px 12px;background:#fafafa;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;transition:all .18s ease;cursor:pointer;}.doc-card:hover{border-color:var(--accent-mid);background:var(--accent-light);}.doc-card-icon{width:42px;height:42px;border-radius:11px;background:var(--accent-light);display:flex;align-items:center;justify-content:center;}.doc-card-icon i{font-size:20px;color:var(--accent);}.doc-card.uploaded .doc-card-icon{background:var(--green-light);}.doc-card.uploaded .doc-card-icon i{color:var(--green);}.doc-card.missing .doc-card-icon{background:#fef2f2;}.doc-card.missing .doc-card-icon i{color:#ef4444;}.doc-card-name{font-size:11px;font-weight:600;color:var(--ink);line-height:1.4;}.doc-card-status{font-size:10px;font-weight:500;}.doc-card.uploaded .doc-card-status{color:var(--green);}.doc-card.missing .doc-card-status{color:#ef4444;}@media(max-width:768px){.page{padding:12px;}.hero{padding:18px;border-radius:18px;}.hero-inner{flex-direction:column;gap:18px;}.hero-actions{width:100%;flex-direction:row;flex-wrap:wrap;}.hero-actions .btn{flex:1;min-width:130px;}.field-grid{grid-template-columns:1fr 1fr;gap:14px 16px;}.section-body{padding:16px;}}@media(max-width:520px){.page{padding:10px;}.hero{padding:16px;border-radius:16px;}.hero-name{font-size:20px;}.hero-meta{flex-direction:column;gap:8px;}.field-grid{grid-template-columns:1fr;}.hero-actions{flex-direction:column;width:100%;}.hero-actions .btn{width:100%;}.tab{padding:8px 13px;font-size:11px;}}</style>
</head>

<body>

    <div class="max-w-[1800px] mx-auto mt-6 mb-5 flex items-center justify-between gap-3 px-4">
        <h1 class="text-[18px] sm:text-2xl font-bold text-black leading-tight">View Visit Details</h1>
    </div>

    <div class="page">

        <!-- HERO CARD -->
        <div class="hero">
            <div class="hero-inner">
                <!-- Visit Icon -->
                <div class="avatar-wrap">
                    <div class="avatar"><i class="ri-map-pin-2-line" style="font-size:clamp(28px,4vw,40px);"></i></div>
                    <div class="avatar-status"></div>
                </div>

                <div class="hero-info">
                    <div class="hero-name">Innovate Tech Solutions</div>
                    <div class="hero-designation">Rohit Sharma &nbsp;·&nbsp; Senior Sales Executive</div>
                    <div class="hero-pills">
                        <span class="pill pill-green"><i class="ri-checkbox-circle-fill" style="font-size:9px;"></i> Interested</span>
                        <span class="pill pill-accent"><i class="ri-briefcase-line"></i> Follow Up</span>
                        <span class="pill pill-gray"><i class="ri-map-pin-line"></i> Mumbai, Maharashtra</span>
                        <span class="pill pill-amber"><i class="ri-star-fill" style="font-size:9px;"></i> 4 / 5</span>
                    </div>
                    <div class="hero-meta">
                        <div class="hero-meta-item"><i class="ri-calendar-line"></i> 24 May 2025</div>
                        <div class="hero-meta-item"><i class="ri-time-line"></i> 10:30 AM</div>
                        <div class="hero-meta-item"><i class="ri-user-line"></i> Karan Patel — CEO</div>
                        <div class="hero-meta-item"><i class="ri-phone-line"></i> +91 98001 23456</div>
                    </div>
                </div>

                <div class="hero-actions">
                    <a href="daily_visit_list.php">
                        <button class="btn btn-ghost" style="font-size:12px;">
                            <i class="ri-arrow-left-line"></i> Back
                        </button>
                    </a>
                    <button class="btn btn-ghost" style="font-size:12px;">
                        <i class="ri-download-line"></i> Export
                    </button>
                    <button class="btn btn-danger" style="font-size:12px;">
                        <i class="ri-delete-bin-line"></i> Delete
                    </button>
                </div>
            </div>
        </div>

        <!-- TABS -->
        <div class="tabs-wrap">
            <div class="tabs">
                <button class="tab active" onclick="switchTab('visit',this)"><i class="ri-map-pin-2-line"></i> Visit Details</button>
                <button class="tab" onclick="switchTab('contact',this)"><i class="ri-user-3-line"></i> Contact / Company</button>
                <button class="tab" onclick="switchTab('purpose',this)"><i class="ri-lightbulb-line"></i> Visit Purpose</button>
                <button class="tab" onclick="switchTab('outcome',this)"><i class="ri-flag-line"></i> Outcome</button>
                <button class="tab" onclick="switchTab('nextaction',this)"><i class="ri-calendar-check-line"></i> Next Action</button>
            </div>
        </div>

        <!-- ========================
       TAB 1 — VISIT DETAILS
  ========================= -->
        <div id="tab-visit" class="tab-content active">
            <div class="section-card">
                <div class="section-head">
                    <div class="section-head-icon"><i class="ri-map-pin-2-line"></i></div>
                    <div class="section-head-title">Visit Details</div>
                </div>
                <div class="section-body">
                    <div class="sub-head"><i class="ri-calendar-line"></i> Date & Time</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-calendar-line"></i> Visit Date</div>
                            <div class="field-value">24 May 2025</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-time-line"></i> Visit Time</div>
                            <div class="field-value">10:30 AM</div>
                        </div>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-user-settings-line"></i> Assignment</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-user-line"></i> Sales Person</div>
                            <div class="field-value">Rohit Sharma</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-briefcase-2-line"></i> Visit Type</div>
                            <div class="field-value"><span class="pill pill-accent" style="font-size:13px;">Follow Up</span></div>
                        </div>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-map-pin-line"></i> Location & Travel</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-map-pin-2-line"></i> Place / Location</div>
                            <div class="field-value">Mumbai, Maharashtra</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-roadster-line"></i> Travel Mode</div>
                            <div class="field-value">Car</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-speed-line"></i> Distance Travelled</div>
                            <div class="field-value">42 kms</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-timer-line"></i> Duration</div>
                            <div class="field-value">75 mins</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- ========================
       TAB 2 — CONTACT / COMPANY
  ========================= -->
        <div id="tab-contact" class="tab-content">
            <div class="section-card">
                <div class="section-head">
                    <div class="section-head-icon"><i class="ri-user-3-line"></i></div>
                    <div class="section-head-title">Contact / Company</div>
                </div>
                <div class="section-body">
                    <div class="sub-head"><i class="ri-user-line"></i> Contact Person</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-user-line"></i> Contact Person</div>
                            <div class="field-value">Karan Patel</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-briefcase-line"></i> Designation</div>
                            <div class="field-value">CEO</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-phone-line"></i> Mobile Number</div>
                            <div class="field-value">+91 98001 23456</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-mail-line"></i> Email</div>
                            <div class="field-value">karan.patel@innovatetech.com</div>
                        </div>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-building-line"></i> Company Details</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-building-2-line"></i> Company Name</div>
                            <div class="field-value">Innovate Tech Solutions</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-team-line"></i> Company Size</div>
                            <div class="field-value">101–500</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-pie-chart-line"></i> Industry</div>
                            <div class="field-value">IT Services</div>
                        </div>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-home-line"></i> Address</div>
                    <div style="border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:#fafafa;">
                        <div style="font-size:13px;color:var(--ink);line-height:1.7;">
                            302, Lotus Business Park,<br>
                            Andheri East, Mumbai,<br>
                            Maharashtra — 400069
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- ========================
       TAB 3 — VISIT PURPOSE
  ========================= -->
        <div id="tab-purpose" class="tab-content">
            <div class="section-card">
                <div class="section-head">
                    <div class="section-head-icon"><i class="ri-lightbulb-line"></i></div>
                    <div class="section-head-title">Visit Purpose</div>
                </div>
                <div class="section-body">
                    <div class="sub-head"><i class="ri-focus-3-line"></i> Purpose</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-flag-2-line"></i> Purpose of Visit</div>
                            <div class="field-value"><span class="pill pill-accent" style="font-size:13px;">Follow Up</span></div>
                        </div>
                    </div>

                    <div style="margin-top:16px;">
                        <div class="field-label" style="margin-bottom:8px;"><i class="ri-file-text-line"></i> Purpose Details</div>
                        <div style="border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:#fafafa;font-size:13px;color:var(--ink);line-height:1.7;">
                            Followed up on the ERP software proposal shared last month. Discussed pricing concerns raised by their finance team and presented a revised cost structure. Also provided a live demo of the updated dashboard module.
                        </div>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-price-tag-3-line"></i> Products / Services Discussed</div>
                    <div class="tag-list">
                        <span class="tag-badge">ERP Software</span>
                        <span class="tag-badge">Dashboard Module</span>
                        <span class="tag-badge">AMC Support</span>
                        <span class="tag-badge">Cloud Hosting</span>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-sword-line"></i> Competitors Discussed</div>
                    <div style="border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:#fafafa;font-size:13px;color:var(--ink);line-height:1.7;">
                        Client mentioned Tally ERP and SAP as alternatives they were evaluating. We highlighted our local support and competitive pricing as key differentiators.
                    </div>
                </div>
            </div>
        </div>

        <!-- ========================
       TAB 4 — OUTCOME
  ========================= -->
        <div id="tab-outcome" class="tab-content">
            <div class="section-card">
                <div class="section-head">
                    <div class="section-head-icon"><i class="ri-flag-line"></i></div>
                    <div class="section-head-title">Outcome</div>
                </div>
                <div class="section-body">
                    <div class="sub-head"><i class="ri-check-double-line"></i> Result</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-flag-2-line"></i> Outcome</div>
                            <div class="field-value"><span class="pill pill-green" style="font-size:13px;"><i class="ri-checkbox-circle-fill" style="font-size:9px;"></i> Interested</span></div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-star-line"></i> Interest Level</div>
                            <div class="field-value">
                                <div class="star-display">
                                    <i class="ri-star-fill filled"></i>
                                    <i class="ri-star-fill filled"></i>
                                    <i class="ri-star-fill filled"></i>
                                    <i class="ri-star-fill filled"></i>
                                    <i class="ri-star-line empty-star"></i>
                                    <span style="margin-left:6px;font-size:13px;color:var(--muted);">4 / 5</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div style="margin-top:16px;">
                        <div class="field-label" style="margin-bottom:8px;"><i class="ri-chat-3-line"></i> Comments</div>
                        <div style="border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:#fafafa;font-size:13px;color:var(--ink);line-height:1.7;">
                            Client showed strong interest after the revised pricing was presented. Decision likely to be made after internal board meeting next week. Requested a formal proposal on letterhead.
                        </div>
                    </div>

                    <hr class="divider" />
                    <div class="sub-head"><i class="ri-attachment-line"></i> Attachments</div>
                    <div class="attach-grid">
                        <div class="attach-card">
                            <i class="ri-file-pdf-2-line"></i>
                            <span>Proposal_v2.pdf</span>
                        </div>
                        <div class="attach-card">
                            <i class="ri-file-ppt-2-line"></i>
                            <span>Product_Deck.pptx</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- ========================
       TAB 5 — NEXT ACTION
  ========================= -->
        <div id="tab-nextaction" class="tab-content">
            <div class="section-card">
                <div class="section-head">
                    <div class="section-head-icon"><i class="ri-calendar-check-line"></i></div>
                    <div class="section-head-title">Next Action</div>
                </div>
                <div class="section-body">
                    <div class="sub-head"><i class="ri-arrow-right-circle-line"></i> Planned Follow-Up</div>
                    <div class="field-grid">
                        <div class="field-group">
                            <div class="field-label"><i class="ri-task-line"></i> Next Action</div>
                            <div class="field-value"><span class="pill pill-accent" style="font-size:13px;">Send Proposal</span></div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-calendar-event-line"></i> Next Action Date</div>
                            <div class="field-value">28 May 2025</div>
                        </div>
                        <div class="field-group">
                            <div class="field-label"><i class="ri-user-follow-line"></i> Follow Up By</div>
                            <div class="field-value">Rohit Sharma</div>
                        </div>
                    </div>

                    <div style="margin-top:16px;">
                        <div class="field-label" style="margin-bottom:8px;"><i class="ri-sticky-note-line"></i> Remarks</div>
                        <div style="border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:#fafafa;font-size:13px;color:var(--ink);line-height:1.7;">
                            Send revised proposal with detailed breakdown by 28 May. Follow up with a call on 29 May to confirm receipt and schedule a final meeting with their board.
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div><!-- /page -->

    <script>
        function switchTab(name, el) {
            document.querySelectorAll('.tab-content').forEach(t => t.classList.remove('active'));
            document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
            document.getElementById('tab-' + name).classList.add('active');
            el.classList.add('active');
        }
    </script>

</body>

</html>

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