/* ============================================================
   VHP HELPLINE PWA — PREMIUM DESIGN SYSTEM (ULTIMATE)
   Dark Theme · Saffron/Maroon Palette · Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary: #FF6B00;
  --primary-dark: #CC5500;
  --primary-gradient: linear-gradient(135deg, #FF6B00, #FF3D00);
  --bg-main: #0B0A0F;
  --bg-card: rgba(25, 24, 31, 0.6);
  --bg-input: rgba(0, 0, 0, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-main: #FFFFFF;
  --text-muted: #A09FA6;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  
  /* Layout & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 99px;
  --shadow-glow: 0 4px 20px rgba(255, 107, 0, 0.3);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed;
  top: -20%; left: -10%; width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(255,107,0,0.15) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}
body::after {
  content: ''; position: fixed;
  bottom: -20%; right: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(128,0,32,0.15) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}

/* Typography & Utils */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin-bottom: 0.5rem; }
a { color: var(--primary); text-decoration: none; }
.text-primary { color: var(--primary); }
.hidden { display: none !important; }

/* Layout */
.app-container {
  max-width: 480px; margin: 0 auto;
  min-height: 100vh; position: relative;
  background: rgba(11, 10, 15, 0.8);
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
}
.content {
  padding: 80px 20px 100px 20px;
  min-height: 100vh;
}

/* Header */
.header {
  position: fixed; top: 0; width: 100%; max-width: 480px; height: 60px;
  background: rgba(11, 10, 15, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; border-bottom: 1px solid var(--glass-border); z-index: 100;
}
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.header-text { display: flex; flex-direction: column; }
.header-title { font-weight: 700; font-size: 1rem; }
.header-subtitle { font-size: 0.75rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px;}
.profile-badge { font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.profile-badge:hover { color: var(--text-main); }

/* Splash Screen */
.splash-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100vh; text-align: center; animation: fadeIn 0.8s ease;
}
.splash-logo-wrapper { position: relative; margin-bottom: 2rem; }
.splash-logo { width: 120px; height: 120px; z-index: 2; position: relative; border-radius: 50%; box-shadow: var(--shadow-glow); }
.splash-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 140px; height: 140px; background: var(--primary);
  filter: blur(40px); opacity: 0.5; z-index: 1; animation: pulse 2s infinite;
}
.splash-title { font-size: 2rem; margin-bottom: 0.25rem; }
.splash-subtitle { font-size: 1.25rem; color: var(--text-muted); font-weight: 400; margin-bottom: 1rem; }
.splash-tagline { color: var(--primary); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; }
.splash-loader { margin-top: 2rem; width: 60px; height: 4px; background: var(--bg-card); border-radius: 2px; overflow: hidden; }
.splash-loader-bar { width: 30%; height: 100%; background: var(--primary); border-radius: 2px; animation: slide 1.5s infinite ease-in-out; }

@keyframes slide { 0% { transform: translateX(-100%); } 50% { transform: translateX(200%); } 100% { transform: translateX(-100%); } }
@keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; } }

/* Forms & Inputs */
.form-group { margin-bottom: 1.25rem; text-align: left; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.form-label i { margin-right: 6px; color: var(--primary); }
.form-control {
  width: 100%; padding: 14px 16px; background: var(--bg-input); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); color: var(--text-main); font-family: inherit; font-size: 1rem; transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2); }
.form-control::placeholder { color: rgba(255,255,255,0.2); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 1rem top 50%; background-size: 0.65rem auto; }

.phone-input-group { display: flex; align-items: stretch; }
.phone-prefix { background: rgba(255,255,255,0.05); padding: 0 16px; display: flex; align-items: center; border: 1px solid var(--glass-border); border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); font-weight: 600; color: var(--text-muted); }
.phone-input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.otp-input { text-align: center; font-size: 1.5rem; letter-spacing: 0.5rem; padding: 12px; font-weight: 700; }

.helper-text { display: block; margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }
.helper-text i { color: var(--warning); margin-right: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; font-family: inherit; font-size: 1rem; font-weight: 600;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  transition: var(--transition); text-transform: capitalize;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary-gradient); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 6px 25px rgba(255, 107, 0, 0.4); transform: translateY(-2px); }
.btn-primary:disabled { background: #444; box-shadow: none; cursor: not-allowed; opacity: 0.7; transform: none; }
.btn-full { width: 100%; margin-bottom: 1rem; }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
.btn-ghost { background: transparent; color: var(--text-main); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }
.btn-back { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
.btn-back:hover { background: rgba(255,255,255,0.1); }

/* Checkbox */
.consent-label { display: flex; align-items: flex-start; cursor: pointer; position: relative; font-size: 0.8rem; color: var(--text-muted); gap: 12px; }
.consent-label input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { height: 20px; width: 20px; background-color: var(--bg-input); border: 1px solid var(--glass-border); border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.consent-label input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }
.checkmark:after { content: ""; display: none; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }
.consent-label input:checked ~ .checkmark:after { display: block; }
.link { color: var(--primary); text-decoration: underline; }

/* Cards & Containers */
.card {
  background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}
.welcome-card { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; border: 1px solid var(--glass-border); }
.welcome-greeting { font-size: 0.85rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.welcome-text h2 { margin-bottom: 4px; font-size: 1.5rem; }
.welcome-area { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.welcome-decoration { font-size: 3rem; color: rgba(255, 107, 0, 0.1); }

/* SOS Button (Raise Issue) */
.sos-container { display: flex; justify-content: center; margin: 40px 0; position: relative; }
.btn-raise-issue {
  width: 160px; height: 160px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #EF4444, #B91C1C); color: white; cursor: pointer; position: relative;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4); transition: transform 0.2s;
}
.btn-raise-issue:active { transform: scale(0.95); }
.sos-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sos-content i { font-size: 2.5rem; }
.sos-content span { font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.sos-ripple { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50%; border: 2px solid rgba(239, 68, 68, 0.5); animation: ripple 2s infinite ease-out; z-index: 1; }
.sos-ripple-2 { animation-delay: 1s; }
@keyframes ripple { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

/* Info Cards & Banners */
.info-card { display: flex; gap: 16px; background: rgba(255,255,255,0.03); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; border: 1px solid var(--glass-border); }
.info-icon { font-size: 1.5rem; color: var(--primary); }
.info-text h4 { font-size: 1rem; margin-bottom: 2px; }
.info-text p { font-size: 0.85rem; margin: 0; }
.info-card-warning { background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.2); }
.info-card-warning .info-icon { color: var(--danger); }
.disclaimer-banner { background: rgba(255, 107, 0, 0.1); border-left: 4px solid var(--primary); padding: 16px; border-radius: 4px; margin-bottom: 24px; font-size: 0.85rem; color: #ddd; }
.disclaimer-banner i { color: var(--primary); margin-right: 8px; }

/* Photo Upload */
.photo-upload-area { border: 2px dashed var(--glass-border); border-radius: var(--radius-md); padding: 30px; text-align: center; transition: var(--transition); cursor: pointer; background: rgba(0,0,0,0.2); }
.photo-upload-area:hover { border-color: var(--primary); background: rgba(255,107,0,0.05); }
.upload-icon i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }
.upload-text { font-weight: 500; margin-bottom: 4px; }
.upload-hint { font-size: 0.75rem; color: var(--text-muted); }
.photo-preview-container, .photo-preview-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.photo-preview-item { width: 80px; height: 80px; border-radius: var(--radius-sm); position: relative; overflow: hidden; border: 1px solid var(--glass-border); }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.7); color: white; border: none; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }

/* Status Badges */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.status-new { background: rgba(245, 158, 11, 0.15); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-assigned { background: rgba(59, 130, 246, 0.15); color: #93C5FD; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-verified { background: rgba(139, 92, 246, 0.15); color: #C4B5FD; border: 1px solid rgba(139, 92, 246, 0.3); }
.status-resolved { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Report Item (My Reports) */
.report-item { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; cursor: pointer; transition: var(--transition); }
.report-item:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.report-id { font-family: monospace; color: var(--text-muted); font-size: 0.85rem; }
.report-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; display: block; }
.report-desc { font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Empty States */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state i { font-size: 3rem; color: rgba(255,255,255,0.1); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-main); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }
.loading-state { text-align: center; padding: 40px; color: var(--text-muted); }
.loading-state i { font-size: 2rem; color: var(--primary); margin-bottom: 16px; }

/* Emergency Grid */
.emergency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.emergency-card { background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: var(--radius-md); padding: 20px; text-align: center; transition: var(--transition); display: block; color: var(--text-main); }
.emergency-card:hover { background: rgba(239, 68, 68, 0.1); transform: translateY(-2px); }
.emergency-icon i { font-size: 2rem; color: var(--danger); margin-bottom: 12px; }
.emergency-label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.emergency-number { font-size: 1.5rem; font-weight: 700; color: var(--danger); }

/* Settings View */
.settings-profile { display: flex; align-items: center; gap: 16px; }
.settings-avatar i { font-size: 3rem; color: var(--primary); }
.settings-user-info h3 { margin: 0; font-size: 1.25rem; }
.settings-user-info p { margin: 0 0 4px 0; color: var(--text-muted); font-size: 0.85rem; }
.badge-verified { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.3); padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; display: inline-block; }
.settings-links { display: flex; flex-direction: column; }
.settings-link { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--glass-border); color: var(--text-main); font-weight: 500; transition: var(--transition); }
.settings-link:last-child { border-bottom: none; padding-bottom: 0; }
.settings-link:hover { color: var(--primary); }
.settings-link i:first-child { color: var(--primary); margin-right: 12px; width: 20px; text-align: center; }
.settings-link i:last-child { color: var(--text-muted); font-size: 0.8rem; }
.settings-info { display: flex; flex-direction: column; gap: 12px; }
.info-row { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row span:first-child { color: var(--text-muted); }
.info-row span:last-child { font-weight: 500; }

/* Success Screen */
.success-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 70vh; text-align: center; }
.success-checkmark { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(16, 185, 129, 0.1); margin-bottom: 24px; position: relative; }
.success-checkmark::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 2.5rem; color: var(--success); }
.tracking-id-display { font-family: monospace; font-size: 1.5rem; letter-spacing: 2px; color: var(--primary); background: rgba(255,107,0,0.1); padding: 16px; border-radius: var(--radius-md); border: 1px dashed var(--primary); text-align: center; margin: 16px 0; font-weight: 700; width: 100%; }
.success-info { color: var(--text-muted); margin-bottom: 24px; }

/* Timeline (Report Details) */
.timeline { border-left: 2px solid rgba(255,255,255,0.1); padding-left: 20px; margin-left: 10px; margin-top: 1rem; }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-dot { position: absolute; left: -27px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg-main); }
.timeline-content { background: rgba(255,255,255,0.03); padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--glass-border); }
.timeline-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; display: block; }
#detail-photos img { border-radius: var(--radius-md); max-width: 100%; margin-bottom: 12px; }

/* Bottom Nav */
.bottom-nav {
  position: fixed; bottom: 0; width: 100%; max-width: 480px; height: 70px;
  background: rgba(11, 10, 15, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border); display: flex; justify-content: space-around; align-items: center;
  z-index: 100; padding-bottom: env(safe-area-inset-bottom);
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); width: 60px; height: 100%; cursor: pointer; transition: var(--transition); text-decoration: none; position: relative;}
.nav-item i { font-size: 1.25rem; margin-bottom: 4px; transition: transform 0.2s; }
.nav-item span { font-size: 0.7rem; font-weight: 500; }
.nav-item:hover { color: rgba(255,255,255,0.8); }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: translateY(-2px); }

/* Toast */
.toast-container { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: 90%; max-width: 400px; pointer-events: none; }
.toast { padding: 14px 20px; border-radius: var(--radius-md); background: rgba(30,30,40,0.95); backdrop-filter: blur(10px); color: white; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--glass-border); animation: toastEnter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; pointer-events: auto; }
.toast.toast-success i { color: var(--success); }
.toast.toast-error i { color: var(--danger); }
.toast.toast-warning i { color: var(--warning); }
.toast.toast-info i { color: var(--primary); }

@keyframes toastEnter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Section Header */
.section-header, .section-header-simple { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-header-simple { display: block; }
.section-header-simple h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.section-header-simple p { color: var(--text-muted); font-size: 0.9rem; }
.section-header h2 { margin: 0; font-size: 1.25rem; }

/* Auth Container */
.auth-container { display: flex; flex-direction: column; justify-content: center; min-height: 80vh; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-icon-wrapper { width: 64px; height: 64px; background: rgba(255,107,0,0.1); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 16px auto; }
.auth-header h2 { font-size: 1.8rem; }
.auth-header p { color: var(--text-muted); }
.otp-sent-info { display: flex; align-items: center; gap: 12px; background: rgba(16, 185, 129, 0.1); padding: 12px; border-radius: var(--radius-sm); border: 1px solid rgba(16, 185, 129, 0.2); margin-bottom: 20px; color: var(--success); }
.otp-sent-info p { margin: 0; font-size: 0.9rem; }

/* View Switching */
.view { display: none; opacity: 0; }
.view.active { display: block; animation: fadeInView 0.4s ease forwards; }
@keyframes fadeInView { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Fixes */
.app-container { box-shadow: 0 0 100px rgba(0,0,0,0.8); }
