<!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>Resident Vehicle ID | 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;700&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: #3B82F6;
  --primary-light: #EFF6FF;
  --security: #0F172A; /* Slate for security theme */
  --security-light: #1E293B;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --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 (Security Theme) ─── */
.header-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--security) 0%, var(--security-light) 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 50% 150%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
}
.gate-badge-top {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(8px);
  color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 6px 12px; border-radius: 100px;
  display: flex; align-items: center; gap: 6px; letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ─── PROFILE SECTION (Vehicle Focus) ─── */
.profile-section {
  padding: 0 24px; margin-top: -50px;
  position: relative; z-index: 10; text-align: center;
}
.vehicle-wrap {
  width: 100px; height: 100px; margin: 0 auto 16px;
  border-radius: 20px; padding: 4px; background: var(--bg-app);
  position: relative; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.vehicle-icon {
  width: 100%; height: 100%; border-radius: 16px;
  background: var(--surface-alt); display: grid; place-items: center;
  color: var(--security);
}
.auth-badge {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  background: var(--success); color: #fff;
  padding: 4px 12px; border-radius: 100px; font-size: 0.7rem; font-weight: 700;
  border: 2px solid var(--bg-app); white-space: nowrap; letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(16, 185, 137, 0.3);
}

.plate-number { 
  font-family: 'Outfit'; font-size: 1.8rem; font-weight: 800; color: var(--text-main); 
  margin-top: 12px; margin-bottom: 2px; letter-spacing: 1px;
}
.vehicle-model { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; margin-bottom: 24px;}

/* ─── APARTMENT INFO (High Visibility) ─── */
.flat-card {
  background: var(--primary-light); border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px; padding: 20px; margin: 0 24px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.flat-detail h4 { font-size: 0.8rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.flat-detail h2 { font-size: 1.8rem; color: var(--security); font-weight: 800; }
.parking-detail { text-align: right; border-left: 1px solid rgba(59, 130, 246, 0.2); padding-left: 20px; }
.parking-detail h4 { font-size: 0.8rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.parking-detail h2 { font-size: 1.8rem; color: var(--security); font-weight: 800; }

/* ─── QUICK ACTIONS (Privacy First) ─── */
.privacy-note {
  font-size: 0.7rem; color: var(--text-light); text-align: center;
  margin: 0 24px 8px; font-weight: 500;
}
.privacy-note svg { width: 10px; height: 10px; display: inline-block; margin-right: 4px; }

.quick-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 0 24px 32px;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 16px 8px; border-radius: 16px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02); transition: transform 0.2s, border-color 0.2s;
}
.action-btn:active { transform: scale(0.97); }
.action-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.action-btn span { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.action-btn p { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.ping-owner { border-color: rgba(59, 130, 246, 0.3); background: var(--surface); }
.ping-owner .action-icon { background: var(--primary-light); color: var(--primary); }
.call-intercom { border-color: rgba(15, 23, 42, 0.2); background: var(--surface); }
.call-intercom .action-icon { background: var(--surface-alt); color: var(--security); border: 1px solid var(--border); }

/* ─── SECTION STYLES ─── */
.section-wrap { padding: 0 24px; margin-bottom: 24px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.icon-circle {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-alt); color: var(--text-muted); display: grid; place-items: center; border: 1px solid var(--border);
}
.icon-circle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }

/* ─── INCIDENT REPORTING (For Guards) ─── */
.incident-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.incident-btn {
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 12px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s; text-align: left;
}
.incident-btn:active { background: var(--warning-light); border-color: var(--warning); color: var(--warning); }
.incident-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* ─── INFO CARDS ─── */
.info-card {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.data-item p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.data-item h4 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--text-main); }

/* ─── 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; justify-content: space-between; align-items: center; z-index: 100;
}
.brand-footer { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-logo { width: 24px; height: 24px; background: var(--security); 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; }

.btn-primary {
  background: var(--success); color: #fff; border: none; border-radius: 12px;
  padding: 12px 20px; font-weight: 600; font-size: 0.9rem; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.2s;
}
.btn-primary:active { transform: scale(0.96); }

/* Animation Classes */
.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; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Toast */
#toast {
  visibility: hidden; min-width: 250px; background-color: var(--security); color: #fff;
  text-align: center; border-radius: 10px; padding: 14px; position: fixed; z-index: 1000; left: 50%; bottom: 100px;
  transform: translateX(-50%); font-size: 0.9rem; font-weight: 500; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
#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="gate-badge-top">
      <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
      Prestige Estates Gate
    </div>
  </div>

  <div class="profile-section fade-up">
    <div class="vehicle-wrap">
      <div class="vehicle-icon">
        <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 16H9m10 0h3v-3.15a1 1 0 0 0-.84-.99L16 11l-2.7-3.6a2 2 0 0 0-1.6-.8H9.3a2 2 0 0 0-1.6.8L5 11l-5.16.86a1 1 0 0 0-.84.99V16h3m14 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"/></svg>
      </div>
      <div class="auth-badge">RESIDENT</div>
    </div>
    <h1 class="plate-number">TN 09 AB 1234</h1>
    <p class="vehicle-model">Hyundai Creta • White</p>
  </div>

  <div class="flat-card fade-up delay-1">
    <div class="flat-detail">
      <h4>Tower B</h4>
      <h2>402</h2>
    </div>
    <div class="parking-detail">
      <h4>Designated Slot</h4>
      <h2>P-14A</h2>
    </div>
  </div>

  <p class="privacy-note fade-up delay-1">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
    Resident phone numbers are hidden for privacy.
  </p>
  
  <div class="quick-actions fade-up delay-1">
    <button onclick="pingOwner('General Alert')" class="action-btn ping-owner">
      <div class="action-icon">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
      </div>
      <span>Ping App</span>
      <p>Send Notification</p>
    </button>
    <a href="tel:0413220402" class="action-btn call-intercom">
      <div class="action-icon">
        <svg width="22" height="22" 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>
      </div>
      <span>Call Intercom</span>
      <p>Dial Ext 402</p>
    </a>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="section-head">
      <div class="icon-circle">
        <svg viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
      </div>
      <h2 class="section-title">Quick Incident Alert</h2>
    </div>
    
    <div class="incident-grid">
      <button class="incident-btn" onclick="pingOwner('Wrong Parking')">
        <svg viewBox="0 0 24 24"><path d="M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"/><circle cx="7" cy="17" r="2"/><path d="M9 17h6"/><circle cx="17" cy="17" r="2"/></svg>
        Wrong Parking Slot
      </button>
      <button class="incident-btn" onclick="pingOwner('Headlights On')">
        <svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>
        Headlights Left On
      </button>
      <button class="incident-btn" onclick="pingOwner('Window Open')">
        <svg viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="9" y1="21" x2="9" y2="9"/></svg>
        Window/Door Open
      </button>
      <button class="incident-btn" onclick="pingOwner('Cleaning Alert')">
        <svg viewBox="0 0 24 24"><path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>
        Cleaning Required
      </button>
    </div>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="section-head">
      <div class="icon-circle">
        <svg viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
      </div>
      <h2 class="section-title">Owner Details</h2>
    </div>

    <div class="info-card">
      <div class="data-grid">
        <div class="data-item">
          <p>Registered Name</p>
          <h4>Manivannan R.</h4>
        </div>
        <div class="data-item">
          <p>Secondary Contact</p>
          <h4>Available via Intercom</h4>
        </div>
        <div class="data-item">
          <p>Vehicle Tag Issue Date</p>
          <h4>12 Dec 2025</h4>
        </div>
        <div class="data-item">
          <p>Tag Status</p>
          <h4 style="color: var(--success);">Active</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>
    </div>
    <button class="btn-primary" onclick="logEntry()">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 11 12 14 22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/></svg>
      Log Check-In
    </button>
  </div>

  <div id="toast"></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", ""); }, 3500);
}

// Function to simulate sending a push notification to the resident
function pingOwner(alertType) {
  showToast("🔔 Sending '" + alertType + "' alert to B-402...");
  setTimeout(function() {
    showToast("✅ Alert delivered to Resident's App.");
  }, 1200);
}

// Function to simulate security gate log
function logEntry() {
  showToast("📝 Vehicle logged at Gate 1 at " + new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}));
}
</script>

</body>
</html>