/* ==========================================================================
   1. VARIABLES & THEMING
   ========================================================================== */
:root {
  --bg-app: #f4f7fb; 
  --bg-surface: #ffffff;
  --text-primary: #1e293b; 
  --text-secondary: #64748b; 
  --border: #e2e8f0;
  --primary: #2563eb; 
  --primary-hover: #1d4ed8; 
  --primary-light: #eff6ff;
  --danger: #ef4444; 
  --danger-bg: #fee2e2;
  --warning: #f59e0b; 
  --warning-bg: #fef3c7;
  --success: #10b981; 
  --success-bg: #d1fae5;
  --purple: #8b5cf6; 
  --purple-bg: #ede9fe;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-sm: 6px; 
  --radius-md: 8px; 
  --radius-lg: 12px;
}

/* TRUE DARK MODE SYNC */
body.dark-theme {
  --bg-app: #0b1120; 
  --bg-surface: #1e293b;
  --text-primary: #f8fafc; 
  --text-secondary: #94a3b8; 
  --border: #334155;
  --primary: #3b82f6; 
  --primary-light: rgba(59, 130, 246, 0.15);
  --danger-bg: rgba(239, 68, 68, 0.15); 
  --warning-bg: rgba(245, 158, 11, 0.15);
  --success-bg: rgba(16, 185, 129, 0.15); 
  --purple-bg: rgba(139, 92, 246, 0.15);
}

/* Smart Dark Mode Map Inversion Filter */
body.dark-theme .leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}
body.dark-theme .leaflet-container {
  background: var(--bg-surface) !important;
}

/* ==========================================================================
   2. GLOBAL RESETS & TYPOGRAPHY
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-app); color: var(--text-primary); transition: all 0.3s; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: 'Inter', sans-serif; border: none; }
ul { list-style: none; }
.hidden { display: none !important; }

h1, h2, h3, h4 { font-weight: 600; color: var(--text-primary); }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* ==========================================================================
   3. CYBERNETIC LOADER ANIMATION
   ========================================================================== */
.loader-overlay { position: fixed; inset: 0; background: radial-gradient(circle at center, #1e3a8a 0%, #0b1120 100%); z-index: 99999; display: flex; align-items: center; justify-content: center; flex-direction: column; transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); pointer-events: none; }

.cyber-loader-container { position: relative; width: 140px; height: 140px; display: flex; justify-content: center; align-items: center; margin-bottom: 2rem; }

.cyber-ring { position: absolute; border-radius: 50%; border: 3px solid transparent; }
.ring1 { width: 100%; height: 100%; border-top-color: var(--primary); border-bottom-color: var(--purple); animation: spin-ring 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; }
.ring2 { width: 75%; height: 75%; border-left-color: var(--success); border-right-color: var(--primary-light); animation: spin-ring 1.5s linear infinite reverse; }
.ring3 { width: 50%; height: 50%; border-top-color: var(--warning); border-bottom-color: var(--danger); animation: spin-ring 3s ease-in-out infinite; }

.loader-logo-inner { width: 35px; height: 35px; filter: brightness(0) invert(1); animation: pulse-glow 1.5s ease-in-out infinite alternate; z-index: 10; }

.cyber-text { color: var(--primary-light); font-family: monospace; letter-spacing: 4px; font-weight: 700; font-size: 0.9rem; margin-bottom: 1rem; animation: text-glitch 2s infinite; text-shadow: 0 0 10px rgba(59, 130, 246, 0.8); }

.loading-bar-container { width: 220px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); }
.loading-bar-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--purple)); animation: fill-bar 1.5s ease-out forwards; box-shadow: 0 0 10px var(--primary); }

@keyframes spin-ring { to { transform: rotate(360deg); } }
@keyframes pulse-glow { 0% { transform: scale(0.9); opacity: 0.8; filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)); } 100% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 15px rgba(255,255,255,0.9)); } }
@keyframes text-glitch { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; letter-spacing: 5px; } }
@keyframes fill-bar { 0% { width: 0%; } 100% { width: 100%; } }

/* ==========================================================================
   4. SCROLL-TRIGGERED ANIMATIONS
   ========================================================================== */
.scroll-anim { opacity: 0; transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); will-change: opacity, transform; }
.scroll-fade-up { transform: translateY(50px); }
.scroll-fade-in { transform: scale(0.95); }
.scroll-scale-up { transform: scale(0.8); }
.scroll-slide-right { transform: translateX(-50px); }

.scroll-anim.is-visible { opacity: 1; transform: translate(0) scale(1); }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ==========================================================================
   5. LAYOUT & GRIDS
   ========================================================================== */
.container { max-width: 1280px; margin: 0 auto; padding: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } .container { padding: 1rem; } }

/* ==========================================================================
   6. UI COMPONENTS (Cards, Buttons, Badges)
   ========================================================================== */
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } }
.animated-icon { animation: float 3s ease-in-out infinite; display: inline-block; }

.reveal-text { opacity: 0; transform: translateY(40px) scale(0.95); transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.reveal-text.visible { opacity: 1; transform: translateY(0) scale(1); }
.delay-1 { transition-delay: 0.2s; } 
.delay-2 { transition-delay: 0.4s; }

.ripple-element { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: ripple-anim 0.6s linear; background-color: rgba(255, 255, 255, 0.3); pointer-events: none; }
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

.cursor-blink { display: inline-block; width: 4px; background-color: var(--primary); animation: blink 0.75s step-end infinite; margin-left: 4px; vertical-align: bottom; height: 1em; }
@keyframes blink { 50% { opacity: 0; } }

.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.card-title { font-size: 1.125rem; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-md); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); border: 1px solid transparent; }
.btn-primary { background: var(--text-primary); color: var(--bg-surface); }
.btn-primary:hover { opacity: 0.9; transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-app); transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.btn-blue { background: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); }
.btn-blue:hover { background: var(--primary-hover); transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3); }

.badge { padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; display: inline-flex; align-items: center; border: 1px solid transparent; white-space: nowrap; }
.badge-high { background: var(--danger-bg); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.badge-medium { background: var(--warning-bg); color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }
.badge-low { background: var(--success-bg); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.badge-pending { background: var(--warning-bg); color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }
.badge-in-progress { background: var(--primary-light); color: var(--primary); border-color: rgba(37, 99, 235, 0.3); }
.badge-resolved { background: var(--success-bg); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.badge-outline { background: transparent; border-color: var(--border); color: var(--text-secondary); }

/* ==========================================================================
   7. NAVBAR & NAVIGATION (UPDATED TO PREVENT OVERLAP & FULL WIDTH)
   ========================================================================== */
.navbar { 
  width: 100%; 
  max-width: none; 
  margin: 0;
  background: var(--bg-surface); 
  border-bottom: 1px solid var(--border); 
  padding: 0 2rem; 
  height: 75px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  position: sticky; 
  top: 0; 
  z-index: 50; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.03); 
}

.nav-brand { display: flex; align-items: center; cursor: pointer; transition: transform 0.2s; flex-shrink: 0; }
.nav-brand:hover { transform: scale(1.02); }
.brand-text { margin-left: 12px; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.5px; color: var(--text-primary); }
.brand-text span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 0.5rem; height: 100%; overflow-x: auto; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }

.nav-link { color: var(--text-primary); opacity: 0.65; font-size: 0.95rem; font-weight: 600; cursor: pointer; height: 100%; display: flex; align-items: center; padding: 0 1rem; position: relative; transition: all 0.3s ease; white-space: nowrap; flex-shrink: 0; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; background: var(--primary); transition: all 0.3s ease; transform: translateX(-50%); border-radius: 3px 3px 0 0; }
.nav-link:hover { color: var(--primary); opacity: 1; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--primary); font-weight: 700; opacity: 1; }
.nav-link.active::after { width: 100%; }

.nav-controls { display: flex; align-items: center; gap: 1rem; border-left: 1px solid var(--border); padding-left: 1.5rem; flex-shrink: 0; }

.points-badge { background: var(--warning-bg); color: var(--warning); padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; gap: 0.4rem; cursor: pointer; transition: all 0.3s; box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);}
.points-badge:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }

/* ==========================================================================
   8. ANIMATED LANGUAGE BUTTON (GOOGLE TRANSLATE OVERRIDE)
   ========================================================================== */
.custom-lang-wrapper { display: flex; align-items: center; background: var(--bg-app); border: 1px solid var(--border); border-radius: 50px; padding: 3px 6px 3px 3px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); cursor: pointer; transition: all 0.3s ease; height: 40px; }
.custom-lang-wrapper:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15); transform: translateY(-2px); background: var(--bg-surface); }

.globe-container { background: linear-gradient(135deg, var(--primary), var(--purple)); color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-right: 5px; box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3); }
.globe-icon { font-size: 1rem; animation: spin-globe 10s linear infinite; display: inline-block; filter: drop-shadow(0 0 2px rgba(255,255,255,0.5)); }
@keyframes spin-globe { to { transform: rotate(360deg); } }

.translate-box { overflow: hidden; display: flex; align-items: center; background: transparent; border: none; padding: 0; margin-right: 5px; }
.goog-te-gadget-simple { background-color: transparent !important; border: none !important; font-size: 13px !important; display: flex !important; align-items: center; padding: 0 4px !important; cursor: pointer; }
.goog-te-gadget-simple .goog-te-menu-value span { color: var(--text-primary) !important; font-family: 'Inter', sans-serif !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.goog-te-gadget-simple .goog-te-menu-value span:hover { color: var(--primary) !important; }
.goog-te-gadget-simple img { display: none !important; }

body { top: 0px !important; }
.skiptranslate iframe { display: none !important; }
#goog-gt-tt { display: none !important; }

.theme-toggle { background: transparent; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-secondary); transition: transform 0.4s; margin-left: 5px; }
.theme-toggle:hover { transform: rotate(45deg) scale(1.2); color: var(--primary); }

/* ==========================================================================
   9. USER DROPDOWN MENU
   ========================================================================== */
.user-menu-container { position: relative; display: inline-block; padding-bottom: 20px; margin-bottom: -20px; }
.user-avatar { width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary), var(--purple)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: bold; cursor: pointer; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3); transition: transform 0.2s; border: 2px solid white; }
.user-avatar:hover { transform: scale(1.05); }

.dropdown-menu { position: absolute; right: 0; top: 60px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); width: 220px; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 100; overflow: hidden; }
.user-menu-container:hover .dropdown-menu, .dropdown-menu.active { opacity: 1; pointer-events: auto; transform: translateY(0); }

.dropdown-header { padding: 1rem; background: var(--bg-app); border-bottom: 1px solid var(--border); }
.dropdown-header h4 { margin: 0; font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown-header p { margin: 0; font-size: 0.75rem; color: var(--text-secondary); }

.dropdown-item { padding: 0.875rem 1rem; color: var(--text-primary); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; gap: 0.75rem; }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0; }

/* ==========================================================================
   10. VIEW MANAGER & LANDING PAGE
   ========================================================================== */
/* .view { display: none; animation: fadeIn 0.4s ease forwards; opacity: 0; }
 */
/* .view { display: none; }
.view.active { display: block; }
.view.active { display: block; } */
/* OPTIMIZED VIEW TRANSITION - Uses Hardware Accelerated Opacity */
.view { 
  display: none; 
  opacity: 0; 
  /* We use will-change to tell the GPU to prep this element for animation */
  will-change: opacity, transform; 
}

.view.active { 
  display: block; 
  animation: lightweightFadeIn 0.3s ease-out forwards; 
}

@keyframes lightweightFadeIn { 
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  } 
  to { 
    opacity: 1; 
    transform: translateY(0); 
  } 
}
@keyframes fadeIn { to { opacity: 1; } }

.hero-section { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); color: white; padding: 6rem 2rem 8rem; text-align: center; position: relative; overflow: hidden; }
.hero-section::after { content: ''; position: absolute; bottom: -50px; left: 0; right: 0; height: 100px; background: var(--bg-app); transform: skewY(-2deg); transition: background-color 0.3s;}
.hero-title { font-size: 4rem; margin-bottom: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.05em; min-height: 120px; }
.hero-subtitle { font-size: 1.25rem; max-width: 700px; margin: 0 auto 3rem; opacity: 0.9; line-height: 1.6; }

.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.25rem; margin-bottom: 1rem; color: var(--text-primary); }
.section-title p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.feature-card { background: var(--bg-surface); border: 1px solid var(--border); padding: 2rem; border-radius: var(--radius-lg); text-align: left; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.feature-card:hover { transform: translateY(-10px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); border-color: var(--primary); }
.feature-icon { width: 50px; height: 50px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2); }

.step-card { text-align: center; padding: 2rem 1rem; position: relative; }
.step-number { width: 45px; height: 45px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; margin: 0 auto 1.5rem; position: relative; z-index: 2; box-shadow: 0 4px 10px rgba(37,99,235,0.4); border: 4px solid var(--bg-surface); }
.step-card::after { content: ''; position: absolute; top: 3.4rem; left: 50%; width: 100%; height: 2px; background: dashed var(--border); z-index: 1; }
.step-card:last-child::after { display: none; }
@media (max-width: 1024px) { .step-card::after { display: none; } }

.stats-section { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4rem 2rem; margin-top: 4rem; }
.stat-block { text-align: center; }
.stat-block h3 { font-size: 3.5rem; color: var(--primary); margin-bottom: 0.5rem; font-weight: 800; letter-spacing: -2px; }

.testimonial-wrapper { overflow: hidden; white-space: nowrap; position: relative; padding: 2rem 0; width: 100vw; margin-left: calc(-50vw + 50%); background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.testimonial-track { display: inline-flex; gap: 2rem; }
.testimonial-card { background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; min-width: 350px; display: inline-flex; flex-direction: column; gap: 1rem; box-shadow: var(--shadow-sm); transition: transform 0.3s; white-space: normal; }
.testimonial-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }

.footer { background: #0f172a; color: #94a3b8; padding: 4rem 2rem 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; max-width: 1280px; margin: 0 auto; padding-bottom: 3rem; border-bottom: 1px solid #1e293b; }
.footer-heading { color: white; font-weight: 600; margin-bottom: 1.5rem; font-size: 1.1rem; }
.footer-links li { margin-bottom: 0.85rem; }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: white; text-decoration: underline; }

@keyframes pulse-shadow { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }

/* ==========================================================================
   11. INTERACTIVE FAQ STYLES
   ========================================================================== */
.faq-item { background: var(--bg-surface); border: 1px solid var(--border); margin-bottom: 1rem; border-radius: var(--radius-md); overflow: hidden; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.faq-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-question { padding: 1.25rem 1.5rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text-primary); transition: color 0.3s; user-select: none; font-size: 1.05rem; }
.faq-question:hover { color: var(--primary); }
.faq-icon { font-size: 0.8rem; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); color: var(--primary); background: var(--primary-light); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 1.5rem; color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); opacity: 0; }

.faq-item.active { border-color: var(--primary); box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1); }
.faq-item.active .faq-question { color: var(--primary); background: rgba(37, 99, 235, 0.02); border-bottom: 1px solid var(--border); }
.faq-item.active .faq-icon { transform: rotate(180deg); background: var(--primary); color: white; }
.faq-item.active .faq-answer { max-height: 500px; padding: 1.5rem; opacity: 1; background: var(--bg-surface); }

/* ==========================================================================
   12. FORMS & AUTHENTICATION
   ========================================================================== */
.form-group { margin-bottom: 1.5rem; position: relative; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-primary); transition: color 0.3s; }
.form-control { width: 100%; padding: 0.875rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-md); background: var(--bg-app); color: var(--text-primary); font-size: 0.95rem; outline: none; transition: all 0.3s; }
.form-control:focus { border-color: var(--primary); background: var(--bg-surface); box-shadow: 0 0 0 4px var(--primary-light); }
.auth-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1); position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }

.social-btn { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.6rem; display: flex; justify-content: center; align-items: center; transition: all 0.2s; box-shadow: var(--shadow-sm); }
.social-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.social-btn img { height: 22px; width: 22px; }

/* ==========================================================================
   13. 3-STEP REPORT ISSUE WIZARD
   ========================================================================== */
.tech-card { background: linear-gradient(145deg, var(--bg-surface), rgba(37, 99, 235, 0.03)); border: 1px solid rgba(37, 99, 235, 0.3); box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.15); }
.tech-input { background: rgba(0,0,0,0.02); border: 1px solid rgba(37, 99, 235, 0.2); transition: all 0.3s ease; }
.tech-input:focus { box-shadow: 0 0 15px rgba(37, 99, 235, 0.2); border-color: var(--primary); background: var(--bg-surface); }
.report-stepper { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.step { font-weight: 600; color: var(--text-secondary); opacity: 0.5; transition: all 0.3s; padding-bottom: 5px; border-bottom: 2px solid transparent; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px;}
.step.active { opacity: 1; color: var(--primary); border-bottom: 2px solid var(--primary); }
.form-step { position: absolute; width: 100%; top:0; left:0; padding: 2rem; }
.form-step:first-child { position: relative; padding: 0; }

.file-upload-box { border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 2.5rem; text-align: center; cursor: pointer; transition: 0.2s; background: var(--bg-app); }
.file-upload-box:hover { border-color: var(--primary); background: var(--primary-light); transform: scale(1.02); }
.tech-upload { border: 2px dashed rgba(37, 99, 235, 0.4); position: relative; overflow: hidden; }
.scanner-line { position: relative; display: inline-block; }
.scanner-line::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--primary); animation: scan 2s linear infinite; box-shadow: 0 0 10px var(--primary); }
@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }

.mic-btn { position: absolute; right: 10px; top: 38px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; color: var(--text-secondary); transition: all 0.3s; box-shadow: var(--shadow-sm); z-index: 5; }
.mic-btn:hover { color: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.mic-btn.recording { color: white; background: var(--danger); border-color: var(--danger); animation: pulse-red 1.5s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.ai-tag { position: absolute; right: 10px; top: -10px; font-size: 0.7rem; color: var(--primary); font-weight: 700; background: var(--primary-light); padding: 4px 8px; border-radius: 4px; display: none; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border: 1px solid rgba(37,99,235,0.2); text-transform: uppercase; letter-spacing: 1px; }
/* ==========================================================================
   14. TRACKING GRID & CARDS
   ========================================================================== */
.filter-bar { background: var(--bg-surface); padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border); display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center; box-shadow: var(--shadow-sm); }
.tabs-pill { display: flex; gap: 0.5rem; background: var(--bg-app); padding: 0.35rem; border-radius: var(--radius-lg); border: 1px solid var(--border); flex-wrap: wrap; }
.tab-pill { padding: 0.6rem 1.5rem; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 600; cursor: pointer; color: var(--text-secondary); transition: all 0.3s; border: 1px solid transparent; }
.tab-pill.active { background: var(--bg-surface); color: var(--primary); box-shadow: var(--shadow-sm); border-color: var(--border); transform: scale(1.02); }

.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }

/* 1. The Base Card (Forced Solid Background) */
.issue-card-clean { 
  background-color: var(--bg-surface) !important; 
  border: 1px solid var(--border); 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); 
  display: flex; 
  flex-direction: column; 
  cursor: pointer; 
  position: relative;
  z-index: 1;
}

/* 2. KILL ANY LINGERING RAINBOW EFFECTS */
.issue-card-clean::before,
.issue-card-clean:hover::before {
  display: none !important;
  background: none !important;
  opacity: 0 !important;
  animation: none !important;
}

/* 3. The Professional 3D Lift & Shadow on Hover */
.issue-card-clean:hover { 
  transform: translateY(-8px); 
  box-shadow: 0 25px 40px -15px rgba(37, 99, 235, 0.15), 0 0 0 1px var(--primary-light); 
  border-color: var(--primary); 
  background-color: var(--bg-surface) !important; /* Keep it solid on hover */
}

/* 4. Cinematic Image Zoom */
.issue-img-wrapper { width: 100%; height: 200px; position: relative; overflow: hidden; background-color: var(--bg-surface); }
.issue-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1); }
.issue-card-clean:hover .issue-img-wrapper img { transform: scale(1.08); }

/* 5. Badges and Content */
.issue-img-wrapper .status-badge { position: absolute; top: 12px; right: 12px; z-index: 2; box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-weight: 700; padding: 0.4rem 0.8rem; background: rgba(255,255,255,0.95); backdrop-filter: blur(4px); color: var(--text-primary); }
.issue-card-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; background-color: var(--bg-surface) !important; }
#leaflet-map, #dedicated-map { height: 500px; width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); z-index: 1; box-shadow: var(--shadow-sm); }/* --- PREMIUM SKELETON LOADING STATES --- */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* The Angled Shimmer Sweep */
.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(37, 99, 235, 0.03) 40%,
    rgba(37, 99, 235, 0.15) 50%,
    rgba(37, 99, 235, 0.03) 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: premium-shimmer 1.8s infinite linear;
  z-index: 10;
  pointer-events: none;
}

/* True Dark Mode Shimmer Optimization */
body.dark-theme .skeleton-card::after {
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.02) 60%,
    transparent 100%
  );
}

@keyframes premium-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Internal Skeleton Shapes & Breathing Pulse */
.skel-img { height: 200px; width: 100%; background: var(--bg-app); animation: pulse-bg 1.5s infinite ease-in-out; }
.skel-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.skel-line { height: 12px; background: var(--bg-app); border-radius: 4px; animation: pulse-bg 1.5s infinite ease-in-out; }
.skel-line.short { width: 35%; }
.skel-line.medium { width: 65%; }
.skel-line.title { height: 20px; width: 85%; }
.skel-badge { height: 24px; width: 60px; background: var(--bg-app); border-radius: 50px; animation: pulse-bg 1.5s infinite ease-in-out; }

@keyframes pulse-bg {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
/* The animated shimmer effect */
.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

/* Brighter shimmer for true dark mode */
body.dark-theme .skeleton-card::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
/* OPTIMIZED RADAR PULSE - Uses GPU-accelerated Transform instead of Box-Shadow */
.pulse-high-priority {
  position: relative;
}

.pulse-high-priority::after {
  content: "";
  position: absolute;
  top: -6px; /* Adjust based on your 16px marker size to center it */
  left: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  animation: radar-pulse-optimized 1.5s infinite cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none; /* Prevents the pulse from blocking map clicks */
}

@keyframes radar-pulse-optimized {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}
/* ==========================================================================
   15. ADMIN, GOVT & INTEGRATIONS PANELS
   ========================================================================== */
.admin-top-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.admin-stat-card { background: var(--bg-surface); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.2s; box-shadow: var(--shadow-sm); }
.admin-stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.hp-issue-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--bg-app); border-radius: var(--radius-md); border-left: 4px solid var(--danger); cursor: pointer; transition: all 0.2s; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.hp-issue-item:hover { background: var(--bg-surface); box-shadow: var(--shadow-md); transform: translateX(5px); border-color: var(--danger); }

.dept-perf-list { display: flex; flex-direction: column; gap: 1.25rem; }
.progress-wrapper { width: 100%; }
.progress-info { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-primary); }
.progress-track { width: 100%; height: 8px; background: var(--bg-app); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 4px; transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1); }

table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.875rem; }
th { padding: 1rem; border-bottom: 2px solid var(--border); color: var(--text-secondary); font-weight: 600; background: var(--bg-app); }
td { padding: 1rem; border-bottom: 1px solid var(--border); transition: background 0.2s; }
tbody tr { transition: transform 0.2s; }
tbody tr:hover { transform: scale(1.01); box-shadow: 0 4px 10px rgba(0,0,0,0.05); z-index: 10; position: relative; background: var(--bg-surface); }
tbody tr:hover td { border-bottom-color: transparent; }
tr:last-child td { border-bottom: none; }
.table-id { border: 1px solid var(--border); padding: 0.2rem 0.5rem; border-radius: 4px; font-family: monospace; font-size: 0.8rem; background: var(--bg-app); font-weight: bold; }

.gov-theme-wrapper { background-color: #0f172a; min-height: 100vh; }
.gov-theme-wrapper .card { background: #1e293b; border-color: #334155; color: white; }
.gov-theme-wrapper .text-muted { color: #94a3b8; }
.gov-issue-card { background: #1e293b; border-left: 4px solid #ea580c; border-radius: var(--radius-lg); padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); border-top: 1px solid #334155; border-right: 1px solid #334155; border-bottom: 1px solid #334155; color: white; transition: all 0.3s; }
.gov-issue-card:hover { transform: translateX(10px); border-color: #ea580c; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); }
@media (max-width: 768px) { .gov-issue-card { flex-direction: column; align-items: flex-start; gap: 1.5rem; } }

.chart-container { height: 250px; position: relative; width: 100%; }

.integration-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--bg-app); border-radius: var(--radius-md); margin-bottom: 1rem; border: 1px solid transparent; transition: all 0.2s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.integration-item:hover { border-color: var(--primary-light); transform: translateX(6px); background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .slider { background-color: var(--success); }
.toggle-switch input:checked + .slider:before { transform: translateX(20px); }

/* ==========================================================================
   16. MODALS, TIMELINE & COMMENTS
   ========================================================================== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(10px); z-index: 100; justify-content: center; align-items: center; padding: 1rem; opacity: 0; transition: opacity 0.3s; }
.modal-overlay.open { display: flex; opacity: 1; }
.modal { background: var(--bg-surface); width: 100%; max-width: 650px; max-height: 90vh; overflow-y: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3); transform: scale(0.95); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg-surface); z-index: 10; box-shadow: 0 4px 6px -4px rgba(0,0,0,0.1); }
.modal-body { padding: 1.5rem; }

.budget-box { background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1.25rem; }
.temp-action-banner { background: var(--warning-bg); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.3); border-radius: var(--radius-md); padding: 0.75rem 1rem; font-weight: 600; font-size: 0.875rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1); }
.volunteer-box { background: var(--purple-bg); border: 1px solid rgba(139, 92, 246, 0.3); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }

.timeline-container { box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.timeline { position: relative; padding-left: 1.5rem; margin-top: 1rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 1rem; font-size: 0.85rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -1.5rem; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-surface); border: 2px solid var(--border); transition: all 0.3s; }
.timeline-item.active::before { background: var(--primary); border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.2); }
.timeline-item.escalated::before { background: var(--danger); border-color: var(--danger-bg); box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }
.timeline-item.live::before { background: var(--success); border-color: var(--success-bg); animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.timeline-date { color: var(--text-secondary); font-size: 0.75rem; display: block; margin-top: 4px; font-weight: 500; }

/* NEW COMMENTS THREAD STYLES */
.comments-list { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding-right: 5px; margin-top: 1rem; }
.comment-bubble { background: var(--bg-app); border: 1px solid var(--border); padding: 0.85rem; border-radius: var(--radius-lg); border-bottom-left-radius: 2px; font-size: 0.85rem; position: relative; animation: msgFadeIn 0.3s forwards; }
.comment-bubble.my-comment { background: var(--primary-light); border-color: rgba(37, 99, 235, 0.2); border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: 2px; align-self: flex-end; }
.comment-bubble strong { color: var(--primary); font-size: 0.8rem; display: block; margin-bottom: 4px; }
.comment-bubble .comment-time { font-size: 0.7rem; color: var(--text-secondary); float: right; margin-top: -2px; }

/* ==========================================================================
   17. CIVIBOT & PWA BANNER
   ========================================================================== */
.chatbot-wrapper { position: fixed; bottom: 20px; right: 20px; z-index: 999; }
.chat-toggle-btn { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; width: 65px; height: 65px; border-radius: 50%; font-size: 1.75rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4); transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); border: 3px solid white; }
.chat-toggle-btn:hover { transform: scale(1.15) rotate(10deg); box-shadow: 0 15px 25px rgba(37, 99, 235, 0.5); }
.chat-window { width: 360px; height: 500px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.15); display: flex; flex-direction: column; position: absolute; bottom: 85px; right: 0; transform-origin: bottom right; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
body.dark-theme .chat-window { background: rgba(30, 41, 59, 0.95); }
.chat-window.hidden { transform: scale(0.5); opacity: 0; pointer-events: none; }
.chat-header { background: linear-gradient(90deg, #1e3a8a, #3b82f6); color: white; padding: 1.25rem 1rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.chat-body { flex: 1; padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.85rem; scroll-behavior: smooth; }
.chat-msg { max-width: 85%; padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: 0.875rem; line-height: 1.5; box-shadow: var(--shadow-sm); opacity: 0; animation: msgFadeIn 0.3s forwards; }
@keyframes msgFadeIn { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(15px); } }
.msg-bot { background: var(--bg-surface); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: linear-gradient(135deg, var(--primary), var(--purple)); color: white; align-self: flex-end; border-bottom-right-radius: 4px; border: none; }
.chat-quick-replies { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.chat-chip { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(59, 130, 246, 0.2); padding: 0.4rem 0.8rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.chat-chip:hover { background: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(37,99,235,0.2); }
.chat-input-area { padding: 1rem; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: 0.5rem; background: var(--bg-surface); align-items: center; }

/* NEW PWA INSTALL BANNER */
.pwa-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 1rem 1.5rem; border-radius: var(--radius-lg); box-shadow: 0 15px 30px rgba(37,99,235,0.4); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; z-index: 10000; width: 90%; max-width: 450px; transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(10px); }
.pwa-banner.hidden { transform: translate(-50%, 150%); opacity: 0; pointer-events: none; }

/* ==========================================================================
   18. TOASTS, MARQUEE & PROFILE ANIMATIONS
   ========================================================================== */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.toast { background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(10px); color: white; padding: 1rem 1.5rem; border-radius: var(--radius-lg); border-left: 5px solid var(--primary); box-shadow: 0 15px 30px -5px rgba(0,0,0,0.4); display: flex; align-items: center; gap: 12px; font-size: 0.95rem; font-weight: 500; min-width: 300px; transform: translateX(120%); opacity: 0; pointer-events: auto; }
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast-icon { font-size: 1.5rem; }

.advisory-marquee { background: var(--danger-bg); color: var(--danger); padding: 0.8rem; font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid rgba(239, 68, 68, 0.2); position: sticky; top:0; z-index:100; box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1); }
.advisory-content { display: flex; gap: 3rem; white-space: nowrap; animation: scroll-left 35s linear infinite; }
.marquee-item { display: inline-flex; align-items: center; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.profile-card-anim { transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); border: 1px solid var(--border); }
.profile-card-anim:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 20px 25px -5px rgba(37,99,235,0.1); }
.truck-icon { font-size: 26px; text-shadow: 2px 2px 6px rgba(0,0,0,0.5); background: none; border: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,0.3)); transition: transform 0.2s; }

/* ==========================================================================
   19. MOBILE NAVIGATION (HAMBURGER MENU)
   ========================================================================== */
.hamburger { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; cursor: pointer; z-index: 2000; margin-left: auto; }
.hamburger .bar { width: 100%; height: 3px; background-color: var(--primary); transition: all 0.3s ease; border-radius: 3px; }

@media screen and (max-width: 1024px) {
  .hamburger { display: flex; }
  .navbar { flex-wrap: wrap; align-items: center; padding: 10px 15px; }
  #desktop-nav, #nav-controls { display: none !important; width: 100%; flex-direction: column; align-items: center; gap: 15px; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(150, 150, 150, 0.2); background-color: transparent; }
  #nav-controls { flex-direction: row; flex-wrap: wrap; justify-content: center; border-left: none; padding-left: 0; }
  #desktop-nav.active, #nav-controls.active { display: flex !important; }
  
  /* Hamburger Icon Animation */
  .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); background-color: #ef4444; }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background-color: #ef4444; }
}
/* ==========================================================================
   20. SUPER PROFILE EXTENSIONS
   ========================================================================== */
.grid-profile-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: start; }
@media (max-width: 1024px) { .grid-profile-layout { grid-template-columns: 1fr; } }

.sos-banner { background: linear-gradient(90deg, #ef4444, #b91c1c); border-radius: var(--radius-lg); padding: 1.5rem 2rem; margin-bottom: 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3); transition: all 0.3s; }
.sos-banner.active { animation: emergency-flash 1s infinite alternate; }
@keyframes emergency-flash { from { box-shadow: 0 0 20px rgba(239,68,68,0.4); } to { box-shadow: 0 0 40px rgba(239,68,68,0.9); } }
@media (max-width: 640px) { .sos-banner { flex-direction: column; gap: 1rem; text-align: center; } .sos-banner .btn { width: 100%; } }

.impact-stat { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-app); border-radius: var(--radius-md); margin-bottom: 0.75rem; border: 1px solid var(--border); }
.impact-stat .icon { font-size: 1.5rem; background: var(--bg-surface); width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 50%; box-shadow: var(--shadow-sm); }

.feed-item { padding: 1rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 1rem; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.feed-item:hover { transform: translateX(5px); border-color: var(--primary-light); }

.profile-tab-content { display: none; animation: fadeIn 0.3s ease forwards; }
.profile-tab-content.active { display: block; }
/* ==========================================================================
   21. PREMIUM ANIMATION ENGINE (PURE CSS)
   ========================================================================== */

/* --- Smooth Page Routing (Slide + Fade) --- */
.view { 
  display: none; 
  opacity: 0; 
  transform: translateX(30px); /* Starts slightly to the right */
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
  will-change: opacity, transform;
}
.view.active { 
  display: block; 
  opacity: 1; 
  transform: translateX(0); /* Slides into place */
}

/* --- High-End Card Microinteractions --- */
.premium-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform, box-shadow;
}
.premium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.15);
  border-color: var(--primary-light);
}

/* --- Glowing Button Hover --- */
.btn-glow {
  transition: all 0.3s ease;
}
.btn-glow:hover {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  transform: scale(1.02);
}
.btn-glow:active {
  transform: scale(0.97); /* Press effect */
}

/* --- AI Typing Dots Animation --- */
.ai-typing-dots::after {
  content: ' .';
  animation: typing-dots 1.5s steps(4, end) infinite;
}
@keyframes typing-dots {
  0%, 20% { color: transparent; text-shadow: .25em 0 0 transparent, .5em 0 0 transparent; }
  40% { color: var(--primary); text-shadow: .25em 0 0 transparent, .5em 0 0 transparent; }
  60% { text-shadow: .25em 0 0 var(--primary), .5em 0 0 transparent; }
  80%, 100% { text-shadow: .25em 0 0 var(--primary), .5em 0 0 var(--primary); }
}

/* --- Notification Bell Shake --- */
@keyframes bell-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-5deg); }
  20%, 80% { transform: translate3d(2px, 0, 0) rotate(5deg); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-10deg); }
  40%, 60% { transform: translate3d(4px, 0, 0) rotate(10deg); }
}
.anim-shake {
  animation: bell-shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

/* --- Smooth Timeline Progress --- */
.timeline-progress-bg {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 1.5rem 0;
  overflow: hidden;
}
.timeline-progress-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  background: var(--primary);
  width: 0%; /* JS will update this */
  transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
}
/* --- DYNAMIC AMOLED GLOWING BORDERS --- */
.issue-card-clean {
  position: relative;
  z-index: 1;
}

.issue-card-clean::before {
  content: "";
  position: absolute;
  inset: -2px; /* Pulls the gradient slightly outside the card edge */
  border-radius: calc(var(--radius-lg) + 1px); /* Perfectly hugs your existing card curve */
  background: linear-gradient(45deg, var(--primary), var(--purple), var(--danger), var(--primary));
  background-size: 200% 200%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.issue-card-clean:hover::before {
  opacity: 1;
  animation: border-glow-spin 3s linear infinite;
}

/* OPTIMIZED GLOW - Much lighter on the GPU */
@keyframes border-glow-spin {
  0% { 
    background-position: 0% 50%; 
  }
  50% { 
    background-position: 100% 50%; 
  }
  100% { 
    background-position: 0% 50%; 
  }
}
/* ==========================================================================
   LEADERBOARD & GAMIFICATION STYLES
   ========================================================================== */
.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
}

.podium-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
  border: 3px solid var(--bg-surface);
  position: relative;
  z-index: 2;
}

.podium-step {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 1rem;
  color: white;
  font-weight: bold;
  box-shadow: inset 0 4px 10px rgba(255,255,255,0.2);
}

/* Rank Colors */
.rank-1 .podium-step { background: linear-gradient(135deg, #f59e0b, #d97706); height: 180px; }
.rank-1 .podium-avatar { background: #f59e0b; width: 80px; height: 80px; font-size: 2rem; }

.rank-2 .podium-step { background: linear-gradient(135deg, #94a3b8, #64748b); height: 130px; }
.rank-2 .podium-avatar { background: #94a3b8; }

.rank-3 .podium-step { background: linear-gradient(135deg, #b45309, #78350f); height: 90px; }
.rank-3 .podium-avatar { background: #b45309; }

.lb-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.lb-list-item:hover { background: var(--bg-app); }
.lb-list-item:last-child { border-bottom: none; }

.lb-rank-badge {
  width: 30px;
  height: 30px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
/* ==========================================================================
   17. GLOBAL 3D CANVAS & CRYSTAL GLASSMORPHISM
   ========================================================================== */
#city-3d-canvas {
  position: fixed;
  inset: 0;
  z-index: -1; 
  pointer-events: none;
  background: var(--bg-app);
  opacity: 0;
  transition: opacity 1s ease;
}

#city-3d-canvas.active { opacity: 1; }

/* The "Crystal Glass" Fix: Minimal blur to keep 3D elements sharp */
.view.container {
  background-color: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(2px) saturate(160%); /* Reduced blur for clarity */
  -webkit-backdrop-filter: blur(2px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  margin-top: 2rem;
  padding: 2.5rem;
  position: relative;
  z-index: 10;
}

body.dark-theme .view.container {
  background-color: rgba(15, 23, 42, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#app-root { background: transparent !important; }
/* ==========================================================================
   VISION AI SCANNER ANIMATIONS
   ========================================================================== */
.ai-laser-scan {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 3px;
   background: var(--primary);
   box-shadow: 0 0 15px 5px rgba(37, 99, 235, 0.6);
   animation: laser-sweep 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
   z-index: 10;
}

@keyframes laser-sweep {
   0% { top: 0%; opacity: 0; }
   10% { opacity: 1; }
   90% { opacity: 1; }
   100% { top: 98%; opacity: 0; }
}

.ai-scan-overlay {
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   background: rgba(11, 17, 32, 0.85);
   padding: 6px;
   text-align: center;
   z-index: 5;
   border-top: 1px solid var(--primary);
}

.vision-box-anim {
   animation: visionFadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes visionFadeIn {
   from { opacity: 0; transform: translateY(10px) scale(0.98); }
   to { opacity: 1; transform: translateY(0) scale(1); }
}
/* --- THREE.JS INJECTION STYLES --- */
.network-label { display: none !important; } /* Hide the broken floating text */
.desktop-only-canvas { display: none !important; } /* Hide the collapsed 3D canvas */
.mobile-only-grid { display: grid !important; } /* FORCE YOUR ORIGINAL CARDS BACK ON */
/* ==========================================================================
   🔥 CIVIC PRESSURE METER STYLES
   ========================================================================== */
.pressure-track {
  width: 100%;
  height: 14px;
  background: var(--bg-app);
  border-radius: 50px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.pressure-fill {
  height: 100%;
  width: 0%; /* Controlled by JS */
  /* Gradient shifts from primary -> warning -> danger as it fills */
  background: linear-gradient(90deg, var(--primary) 0%, var(--warning) 60%, var(--danger) 100%);
  background-size: 200% 100%;
  background-position: left center;
  border-radius: 50px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  position: relative;
}

/* Max Pressure Overload Animation */
.pressure-fill.critical {
  animation: pressure-overload 1.5s infinite alternate, gradient-shift 2s linear infinite;
  box-shadow: 0 0 15px var(--danger), 0 0 5px var(--danger);
}

@keyframes pressure-overload {
  0% { filter: brightness(1) saturate(1); }
  100% { filter: brightness(1.3) saturate(1.5); }
}

@keyframes gradient-shift {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* UI Shake for 100% hit */
.pressure-max-shake {
  animation: pressure-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes pressure-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
/* --- HERO TEXT VISIBILITY OVERRIDES --- */
.hero-title {
  color: #ffffff !important;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 40px rgba(59, 130, 246, 0.5);
  position: relative;
  z-index: 10;
}

.hero-subtitle {
  color: #f8fafc !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-weight: 500;
  position: relative;
  z-index: 10;
}

/* Add a subtle radial vignette to the 3D canvas so the center text stays clear */
#hero-city-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(15, 23, 42, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}
/* ==========================================================================
   🔥 BEFORE/AFTER SLIDER STYLES
   ========================================================================== */
.ba-slider-container {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
  touch-action: none; /* Prevents page scrolling while dragging on mobile */
  background: var(--bg-app);
}

.ba-image {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none; 
}

/* The wrapper crops the After image. The image inside MUST stay full width of the parent container */
.ba-after-wrapper {
  position: absolute;
  top: 0; left: 0; width: 50%; height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #ffffff;
  box-shadow: 5px 0 25px rgba(16, 185, 129, 0.5); /* Glowing green edge */
}

.ba-image-fixed {
  position: absolute;
  top: 0; left: 0; 
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  /* Width is set dynamically by JS to match the container, NOT the wrapper */
}

.ba-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 4px;
  background: #ffffff;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.ba-handle-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  border: 3px solid #ffffff;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ba-slider-container:hover .ba-handle-button {
  transform: translate(-50%, -50%) scale(1.15); /* Pop effect on hover */
}

.ba-label {
  position: absolute; bottom: 12px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 1px; color: white;
  backdrop-filter: blur(8px); z-index: 5; pointer-events: none;
}
.ba-label-before { left: 12px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); }
.ba-label-after { right: 12px; background: rgba(16, 185, 129, 0.85); border: 1px solid rgba(255,255,255,0.4); box-shadow: 0 0 15px rgba(16, 185, 129, 0.6); }
/* ==========================================================================
   🤖 3D CIVIBOT & MEMORY UI STYLES
   ========================================================================== */
.bot-avatar-canvas {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9) 0%, rgba(11, 17, 32, 0.95) 100%);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 0 2px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  z-index: 1000;
}

.bot-avatar-canvas:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4), 0 0 0 2px var(--primary);
}

.bot-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2px solid var(--bg-surface);
  z-index: 1001;
  animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse-dot-anim 2s infinite;
}

@keyframes pulse-dot-anim {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Typing indicator dots */
.bot-typing {
  display: flex;
  gap: 4px;
  padding: 5px;
}
.bot-typing span {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}
.bot-typing span:nth-child(1) { animation-delay: -0.32s; }
.bot-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}
/* ==========================================================================
   🔔 NOTIFICATION COMMAND CENTER STYLES
   ========================================================================== */
.notification-wrapper {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.notification-wrapper:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.notif-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  border: 2px solid var(--bg-app);
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.5);
}

.notification-panel {
  position: fixed;
  top: 75px; right: 20px;
  width: 360px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(59, 130, 246, 0.3);
  z-index: 9999;
  display: flex; flex-direction: column;
  max-height: 80vh;
  transform-origin: top right;
}

.notif-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.8));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  position: relative;
  overflow: hidden;
}

.notif-body {
  padding: 1rem;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.75rem;
  flex: 1;
}

.notif-body::-webkit-scrollbar { width: 6px; }
.notif-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.notif-item {
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  color: white;
  transition: background 0.3s, transform 0.2s;
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(3px);
}

.notif-item.unread {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--success);
}

.notif-footer {
  padding: 0.75rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: background 0.2s;
}

.notif-footer:hover { background: rgba(0,0,0,0.4); }

@media (max-width: 768px) {
  .notification-panel { top: 0; right: 0; width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; }
  .notif-header, .notif-footer { border-radius: 0; }
}
/* ==========================================================================
   🌐 HOLOGRAPHIC LANGUAGE TRANSLATOR STYLES (THEME-ADAPTIVE)
   ========================================================================== */
.custom-lang-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface); /* Dynamically matches light/dark mode */
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 12px 4px 6px; 
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

.custom-lang-wrapper:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.translate-box {
  position: relative;
  z-index: 2;
  margin-top: 1px; 
}

/* Hides the "Powered by Google" text */
.goog-te-gadget {
  font-family: 'Inter', sans-serif !important;
  color: transparent !important; 
  font-size: 0 !important;
}

/* Styles the actual dropdown menu */
.goog-te-gadget .goog-te-combo {
  margin: 0 !important;
  padding: 4px 6px !important;
  border-radius: 20px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-primary) !important; /* Text color adapts to light/dark mode */
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  outline: none;
  transition: color 0.2s;
}

.goog-te-gadget .goog-te-combo:hover {
  color: var(--primary) !important;
}

/* Hide the top translation banner */
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0px !important; }
/* ==========================================================================
   📄 HIGH-RES PDF EXPORT STYLES (A4 FORMAT)

/* ==========================================================================
   📄 HIGH-RES PDF EXPORT STYLES (A4 FORMAT)
   ========================================================================== */
.pdf-a4-format {
  width: 800px; 
  background: white;
  color: #0f172a;
  padding: 50px;
  box-sizing: border-box;
  display: none; /* 🔥 FIX: Hide natively instead of throwing it off-screen */
}

/* Specific styling for the Legal/Govt Documents */
.legal-doc {
  font-family: 'Times New Roman', Times, serif; 
  line-height: 1.6;
}
.legal-doc h1, .legal-doc h2, .legal-doc h3 { font-weight: bold; text-align: center; }
.legal-doc .ref-line { display: flex; justify-content: space-between; margin-bottom: 20px; font-weight: bold; }
.legal-doc p { margin-bottom: 15px; text-align: justify; }
.legal-signature { margin-top: 50px; text-align: right; font-weight: bold; }
/* ==========================================================================
   🔥 PREMIUM MOBILE MENU OVERLAY & THREE.JS BG
   ========================================================================== */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.90); /* Deep cyber-slate */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1999; /* Just below the hamburger icon */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu-3d-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 5rem 2rem 2rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.mobile-menu-content::-webkit-scrollbar { display: none; }

.nav-link-mobile {
  color: white;
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0;
  transform: translateY(40px);
  transition: color 0.3s, transform 0.2s;
  cursor: pointer;
  text-align: center;
}

.nav-link-mobile:hover, .nav-link-mobile:active {
  color: var(--primary);
  transform: scale(1.05);
}

/* Staggered Animation for Links */
.mobile-menu-overlay.active .nav-link-mobile {
  animation: slideUpFade 0.6s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Create the stagger effect dynamically */
.mobile-menu-overlay.active .nav-link-mobile:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(5) { animation-delay: 0.3s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(6) { animation-delay: 0.35s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(7) { animation-delay: 0.4s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(8) { animation-delay: 0.45s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(9) { animation-delay: 0.5s; }
.mobile-menu-overlay.active .nav-link-mobile:nth-child(10) { animation-delay: 0.55s; }

@keyframes slideUpFade {
  to { opacity: 1; transform: translateY(0); }
}

/* 🔥 FIX: Completely Hide Desktop Links on Mobile to stop the horizontal scrolling */
@media screen and (max-width: 1024px) {
  #desktop-nav { display: none !important; }
  #nav-controls { display: none !important; } /* Hide desktop controls, we moved them to the overlay */
  
  /* Ensure the hamburger icon turns white when the dark menu opens so it's visible */
  .hamburger.active .bar { background-color: white; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); background-color: var(--danger); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background-color: var(--danger); }
}
/* ==========================================================================
   🔥 3D WELCOME POPUP STYLES
   ========================================================================== */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.80);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 99990; /* Just below the global loader */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.welcome-card {
  width: 90%;
  max-width: 480px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-overlay.active .welcome-card {
  transform: scale(1) translateY(0);
}

#welcome-3d-canvas {
  width: 100%;
  height: 260px;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  position: relative;
  cursor: grab;
}

#welcome-3d-canvas:active {
  cursor: grabbing;
}

/* Subtle glowing line separating 3D from text */
#welcome-3d-canvas::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.welcome-content {
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.welcome-title {
  font-size: 2.2rem;
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.welcome-title span {
  color: var(--primary);
}

.welcome-desc {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.welcome-btn {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50px;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.5);
  transition: all 0.3s ease;
}

.welcome-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.7);
}
/* ==========================================================================
   TEAM & ARCHITECTS SECTION
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 2;
}

@media (max-width: 1024px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .team-grid { grid-template-columns: 1fr; } }

/* The Lead Developer card spans full width on desktop for prominence */
.lead-card {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.95)) !important;
  border-color: var(--primary) !important;
}

.team-card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1px; /* Border gradient wrapper */
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  z-index: 0;
  pointer-events: none;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(37, 99, 235, 0.2);
}

.team-card-inner {
  background: #0a0f1c; /* Deep AMOLED navy */
  border-radius: 23px;
  padding: 2.5rem 2rem;
  height: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.team-role-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid #3b82f6;
  margin-bottom: 1.5rem;
  align-self: flex-start;
}

.team-name {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.team-summary {
  color: #94a3b8;
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.team-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s;
}
.team-card:hover .skill-tag {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: white;
}

/* Highly Animated Social Buttons for Lead Developer */
.cyber-social-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.cyber-social-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1;
}

.cyber-social-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cyber-social-btn.linkedin::before { background: #0077b5; }
.cyber-social-btn.github::before { background: #333333; }
.cyber-social-btn.portfolio::before { background: linear-gradient(90deg, #8b5cf6, #3b82f6); }

.cyber-social-btn:hover {
  border-color: transparent;
  transform: translateY(-3px);
}
.cyber-social-btn.linkedin:hover { box-shadow: 0 10px 20px rgba(0, 119, 181, 0.4); }
.cyber-social-btn.github:hover { box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2); }
.cyber-social-btn.portfolio:hover { box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4); }

.cyber-social-btn:hover::before { transform: scaleX(1); }
.cyber-social-btn svg { transition: transform 0.3s; }
.cyber-social-btn:hover svg { transform: scale(1.2) rotate(5deg); }
/* --- NEW: Team Profile Image Styling --- */
.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.team-profile-img {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 3px solid transparent;
  /* Creates a gradient border using background clipping */
  background: linear-gradient(#0a0f1c, #0a0f1c) padding-box,
              linear-gradient(135deg, var(--primary), var(--purple)) border-box;
  padding: 3px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lead-card .team-profile-img {
  width: 90px;
  height: 90px;
}

.team-profile-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Image zoom effect when hovering over the team card */
.team-card:hover .team-profile-img img {
  transform: scale(1.15);
}

/* Make sure the role badge resets its margin since it's now in a flex header */
.team-card-header .team-role-badge {
  margin-bottom: 0;
}
/* ==========================================================================
   PREMIUM REPORT PORTAL STYLES
   ========================================================================== */
.report-glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.5);
  transition: all 0.3s;
}

body.dark-theme .report-glass-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
}

.emblem-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60%; height: 60%;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/5/55/Emblem_of_India.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.04;
  z-index: 1;
  pointer-events: none;
}

body.dark-theme .emblem-watermark {
  filter: invert(1);
  opacity: 0.03;
}
/* Container for the whole form */
.report-form-wrapper {
  position: relative; 
  z-index: 2; 
  height: 100%; 
  display: flex; 
  flex-direction: column;
}

/* Base style for every step */
.form-step-premium {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  padding: 2.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column; 
}

/* The first step sets the base height for the whole card */
.form-step-premium:first-child {
  position: relative; 
}

/* THE MAGIC BULLET: Absolute override for hidden steps */
.form-step-premium.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* Pushes the buttons to the bottom cleanly */
.step-bottom-actions {
  margin-top: auto; 
  padding-top: 2rem; 
  display: flex; 
  gap: 1rem;
}
.report-stepper-premium {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.step-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0.5;
  transition: all 0.4s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  transition: all 0.4s ease;
}

.step-premium.active {
  opacity: 1;
  color: var(--primary);
}

.step-premium.active .step-circle {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 15px;
  position: relative;
  top: -10px;
  transition: background 0.4s;
}

/* GSAP overrides the .hidden class, but we need it for initial state */
.form-step-premium.hidden {
  display: none;
}
/* ==========================================================================
   🚨 LIVE SOS RADAR & EMERGENCY UI
   ========================================================================== */
.sos-radar-container {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.4), rgba(69, 10, 10, 0.8));
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.2), inset 0 0 20px rgba(239, 68, 68, 0.2);
  animation: emergency-glow 2s infinite alternate;
}

.sos-radar-container.hidden {
  display: none !important;
}

/* Sweeping Radar Background */
.radar-bg-sweep {
  position: absolute;
  top: 50%; left: 50%;
  width: 200%; height: 200%;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 70%, rgba(239, 68, 68, 0.4) 100%);
  border-radius: 50%;
  animation: radar-spin 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.radar-bg-sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(239,68,68,0.1) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(0deg, rgba(239,68,68,0.1) 1px, transparent 1px) 0 0 / 40px 40px;
  border-radius: 50%;
}

@keyframes radar-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes emergency-glow {
  from { box-shadow: 0 10px 25px rgba(220, 38, 38, 0.1), inset 0 0 10px rgba(239, 68, 68, 0.1); }
  to { box-shadow: 0 15px 35px rgba(220, 38, 38, 0.3), inset 0 0 30px rgba(239, 68, 68, 0.3); }
}

.sos-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.sos-alert-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid #ef4444;
  border-left: 5px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: white;
  transition: transform 0.3s;
}

.sos-alert-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #f87171;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.sos-map-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid #ef4444;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.sos-map-btn:hover {
  background: #ef4444;
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}
/* ==========================================================================
   🚨 LIVE SOS RADAR & EMERGENCY UI
   ========================================================================== */
.sos-radar-container {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.4), rgba(69, 10, 10, 0.8));
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.2), inset 0 0 20px rgba(239, 68, 68, 0.2);
  animation: emergency-glow 2s infinite alternate;
}

/* Hard override to ensure it stays hidden when empty */
.sos-radar-container.hidden {
  display: none !important;
}

/* Sweeping Radar Background */
.radar-bg-sweep {
  position: absolute;
  top: 50%; left: 50%;
  width: 200%; height: 200%;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 70%, rgba(239, 68, 68, 0.4) 100%);
  border-radius: 50%;
  animation: radar-spin 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.radar-bg-sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(239,68,68,0.1) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(0deg, rgba(239,68,68,0.1) 1px, transparent 1px) 0 0 / 40px 40px;
  border-radius: 50%;
}

@keyframes radar-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes emergency-glow {
  from { box-shadow: 0 10px 25px rgba(220, 38, 38, 0.1), inset 0 0 10px rgba(239, 68, 68, 0.1); }
  to { box-shadow: 0 15px 35px rgba(220, 38, 38, 0.3), inset 0 0 30px rgba(239, 68, 68, 0.3); }
}

.sos-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.sos-alert-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid #ef4444;
  border-left: 5px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: white;
  transition: transform 0.3s;
}

.sos-alert-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #f87171;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.sos-map-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid #ef4444;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
  cursor: pointer;
}

.sos-map-btn:hover {
  background: #ef4444;
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}
/* ==========================================================================
   PREMIUM SUPPORT & BUG REPORT STYLES
   ========================================================================== */
.support-premium-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1), 0 0 0 1px rgba(239, 68, 68, 0.05);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Premium Top Accent Line */
.support-premium-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

.support-premium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -15px rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Deep AMOLED Optimization for Dark Mode */
body.dark-theme .support-premium-card {
  background: #0a0f1c; /* Pitch black navy */
  border: 1px solid #1e293b;
}

/* Crisp, Solid Inputs */
.bug-input {
  background: var(--bg-app) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

body.dark-theme .bug-input {
  background: #0f172a !important; /* Solid Slate */
  border: 1px solid #334155 !important;
}

.bug-input:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  background: var(--bg-surface) !important;
}

/* Premium Tactile Selectors */
.severity-box {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.dark-theme .severity-box {
  background: #0f172a;
  border-color: #334155;
}

input[type="radio"]:checked + .severity-box.low {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

input[type="radio"]:checked + .severity-box.high {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.glitch-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 1px;
}

.glitch-btn:hover {
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.5);
  transform: translateY(-3px);
  background: #dc2626 !important; /* Slightly deeper red on hover */
}
/* ==========================================================================
   ADMIN BUG TRACKER ANIMATIONS
   ========================================================================== */
.bug-admin-card {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Unresolved State Animation */
.bug-admin-card.unresolved:hover {
  transform: translateX(8px);
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.25);
  border-left-color: #ef4444;
  background: var(--bg-surface);
}

/* Resolved State Animation */
.bug-admin-card.resolved {
  border-left-color: var(--success);
  opacity: 0.65;
  background: rgba(16, 185, 129, 0.05);
}

.bug-admin-card.resolved:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(16, 185, 129, 0.2);
}

/* Custom scrollbar for the bug list */
#admin-bug-list::-webkit-scrollbar { width: 6px; }
#admin-bug-list::-webkit-scrollbar-thumb { background: rgba(239, 68, 68, 0.3); border-radius: 10px; }
/* ==========================================================================
   LIVE SYSTEM ANOMALIES (BUG REPORTS) FIX
   ========================================================================== */
.bug-admin-card {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(4px);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 1.25rem !important; /* Gives the text room to breathe */
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  
  /* THE NUCLEAR FIX FOR SQUISHED CARDS */
  height: auto !important; 
  min-height: min-content !important;
  overflow: visible !important;
  margin-bottom: 1rem;
}

body.dark-theme .bug-admin-card {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--danger);
}

.bug-admin-card.resolved {
  border-left-color: var(--success) !important;
  opacity: 0.6;
}
/* ==========================================================================
   🗣️ TEXT-TO-SPEECH (TTS) NEURAL UPLINK
   ========================================================================== */
.tts-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--purple), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4), 0 0 0 2px rgba(255,255,255,0.2);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}
.tts-trigger:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6), 0 0 0 2px var(--success);
}

.tts-wrapper {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 320px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--purple);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(139, 92, 246, 0.3);
  z-index: 999;
  overflow: hidden;
  transform-origin: bottom left;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}
body:not(.dark-theme) .tts-wrapper {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.tts-wrapper.hidden {
  transform: scale(0.5) translateY(50px);
  opacity: 0;
  pointer-events: none;
}

.tts-header {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), transparent);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  transition: background 0.2s;
}
.tts-header:hover { background: rgba(139, 92, 246, 0.25); }

.tts-title {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.9rem;
}

.tts-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tts-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.tts-btn {
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--purple);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 0 !important; /* THE FIX: Overrides the default .btn padding */
  line-height: 0;
}
.tts-btn:hover {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}
.tts-btn.active {
  background: var(--success);
  color: white;
  border-color: var(--success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
  animation: pulse-dot-anim 2s infinite;
}

/* Audio Wave Visualizer */
.tts-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.tts-visualizer .bar {
  width: 8px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 10px;
  transition: height 0.2s ease, background 0.2s;
}
.tts-visualizer.speaking .bar {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: audio-wave 1s cubic-bezier(0.25, 0.8, 0.25, 1) infinite alternate;
}
.tts-visualizer.speaking .bar:nth-child(1) { animation-delay: 0.1s; }
.tts-visualizer.speaking .bar:nth-child(2) { animation-delay: 0.3s; }
.tts-visualizer.speaking .bar:nth-child(3) { animation-delay: 0.0s; }
.tts-visualizer.speaking .bar:nth-child(4) { animation-delay: 0.4s; }
.tts-visualizer.speaking .bar:nth-child(5) { animation-delay: 0.2s; }

@keyframes audio-wave {
  0% { height: 8px; }
  100% { height: 28px; }
}
/* ==========================================================================
   🗺️ WARD & AREA DESIGNATION MODULE
   ========================================================================== */
.ward-area-container {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease forwards;
}
body.dark-theme .ward-area-container { background: rgba(15, 23, 42, 0.6); }

.manual-override-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-app);
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.input-glow-bg {
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, var(--purple), var(--primary));
  border-radius: calc(var(--radius-md) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
  filter: blur(4px);
}

.floating-label {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--bg-surface);
  padding: 0 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--purple);
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

/* Activated Manual Mode Styles */
.ward-inputs-manual .tech-input {
  border-color: var(--purple) !important;
  background: var(--bg-surface) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15) !important;
  color: var(--text-primary) !important;
}

.ward-inputs-manual .tech-input:focus ~ .input-glow-bg {
  opacity: 0.6;
}

.ward-inputs-manual .floating-label {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}
/* --- CYBER MODERATION UI --- */
.cyber-warning-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 10px 15px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pulse-danger-border 2s infinite;
}

@keyframes pulse-danger-border {
    0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
    100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.2); }
}

.critical-warning-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(153, 27, 27, 0.95);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.warning-content {
    background: rgba(0, 0, 0, 0.7);
    padding: 3rem;
    border-radius: 12px;
    border: 2px solid #ef4444;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    text-align: center;
}

.warning-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse-danger-border 1s infinite;
}

/* Hard Screen Shake for Violations */
.screen-shake {
    animation: heavy-shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes heavy-shake {
    10%, 90% { transform: translate3d(-4px, 0, 0); }
    20%, 80% { transform: translate3d(6px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-10px, 0, 0); }
    40%, 60% { transform: translate3d(10px, 0, 0); }
}
/* --- COMMENT DELETE BUTTON --- */
.delete-comment-btn {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    padding: 0 5px;
}

.comment-bubble:hover .delete-comment-btn {
    opacity: 0.7;
}

.delete-comment-btn:hover {
    opacity: 1 !important;
    transform: scale(1.3);
}
/* --- BUG MEDIA UPLINK STYLES --- */
.bug-upload-zone {
    border: 2px dashed rgba(239, 68, 68, 0.4);
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bug-upload-zone:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.bug-upload-zone .upload-icon {
    font-size: 2.5rem;
    display: inline-block;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: rgba(239, 68, 68, 0.1);
}

.bug-preview-zone {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.bug-preview-zone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.9);
}

.bug-preview-zone .scan-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
    animation: bug-scan 2s infinite linear;
    pointer-events: none;
}

.change-media-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: var(--danger) !important;
    color: white !important;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.change-media-btn:hover {
    background: var(--danger) !important;
}

@keyframes bug-scan {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
/* ==========================================================================
   🌐 GOOGLE TRANSLATE WIDGET OVERRIDE (NUCLEAR OPTION)
   ========================================================================== */
body > iframe.goog-te-menu-frame {
    max-width: 250px !important;
    max-height: 350px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(96, 165, 250, 0.5) !important;
}

.goog-te-menu2 {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.goog-te-menu2 table, 
.goog-te-menu2 tbody, 
.goog-te-menu2 tr, 
.goog-te-menu2 td {
    display: block !important;
    width: 100% !important;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important; 
}
