/* ==================================================
   Core Variables & Base Setup 
   ================================================== */
:root {
    --primary-gold: #FFC107; --primary-gold-dark: #FFB300;
    --primary-green: #1B5E20; --primary-green-light: #2E7D32;
    --light-green: #4CAF50; --green-dark: #004d40;
    --danger: #EF4444; --info: #3B82F6; --clean-white: #FFFFFF;
    --bg-base: #F1F5F9; --bg-panel: #FFFFFF; --border-color: #E2E8F0;
    --sidebar-bg: #0F172A; --sidebar-text: #94A3B8; --sidebar-hover: #1E293B;
    --text-primary: #0F172A; --text-muted: #64748B;
    
    --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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg-base); color: var(--text-primary); overflow: hidden; }

/* ==================================================
   Utilities & Typography 
   ================================================== */
.text-gold { color: var(--primary-gold-dark); } .text-green { color: var(--light-green); }
.text-danger { color: var(--danger); } .text-white { color: var(--clean-white); }
.text-info { color: var(--info); } .text-muted { color: var(--text-muted); }
.text-slate-200 { color: #E2E8F0; } .text-slate-300 { color: #CBD5E1; } .text-slate-400 { color: #94A3B8; } .text-slate-500 { color: #64748B; } .text-slate-700 { color: #334155; }
.text-green-100 { color: #D1FAE5; } .text-green-300 { color: #6EE7B7; } .text-green-400 { color: #34D399; }
.bg-gold { background: var(--primary-gold); } .bg-green { background: var(--primary-green-light); }
.bg-slate { background: var(--text-muted); } .bg-black { background-color: #000; }
.bg-slate-50 { background-color: #F8FAFC; } .bg-slate-200 { background-color: #E2E8F0; } .bg-slate-800 { background-color: #1E293B; } .bg-slate-900 { background-color: #0F172A; }
.bg-green-50 { background-color: #ECFDF5; } .bg-green-dark { background-color: var(--green-dark); }
.bg-green-900 { background-color: #064E3B; } .bg-red-50 { background-color: #FEF2F2; }
.bg-gold-light { background: #FEF3C7; color: #D97706; } .bg-green-light { background: #D1FAE5; color: #059669; } .bg-blue-light { background: #DBEAFE; color: #2563EB; }
.bg-black-alpha { background: rgba(0,0,0,0.5); }
.border-slate { border-color: #334155; } .border-slate-200 { border-color: #E2E8F0; } .border-slate-700 { border-color: #334155; }
.border-b { border-bottom: 1px solid; } .border-t { border-top: 1px solid; } .border-l { border-left: 1px solid var(--border-color); }
.border-light { border-color: rgba(255,255,255,0.1); } .border-dashed { border-style: dashed; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } 
.pt-1 { padding-top: 0.25rem; } .pt-4 { padding-top: 1rem; } .pb-2 { padding-bottom: 0.5rem; }
.p-0 { padding: 0 !important; } .p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .pl-3 { padding-left: 0.75rem; } .pr-2 { padding-right: 0.5rem; }
.ml-auto { margin-left: auto; } .mr-2 { margin-right: 0.5rem; } .mr-3 { margin-right: 0.75rem; }
.w-full { width: 100%; } .w-24 { width: 6rem; } .w-80 { width: 20rem; }
.h-full { height: 100%; } .min-h-[400px] { min-height: 400px; }
.text-center { text-align: center; } .text-left { text-align: left; }
.font-bold { font-weight: 700; } .font-black { font-weight: 900; } .font-normal { font-weight: 400; } 
.uppercase { text-transform: uppercase; } .tracking-wide { letter-spacing: 0.05em; } .tracking-wider { letter-spacing: 0.1em; } .tracking-widest { letter-spacing: 0.15em; }
.leading-none { line-height: 1; } .leading-relaxed { line-height: 1.6; }
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; } .text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; } .text-3xl { font-size: 1.875rem; } .text-5xl { font-size: 3rem; }
.flex { display: flex; } .flex-col { display: flex; flex-direction: column; } .flex-1 { flex: 1; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } 
.align-center { align-items: center; } .align-start { align-items: flex-start; } .align-baseline { align-items: baseline; }
.relative { position: relative; } .absolute { position: absolute; } .inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.overflow-hidden { overflow: hidden; } .overflow-y-auto { overflow-y: auto; }
.rounded { border-radius: 0.25rem; } .rounded-full { border-radius: 9999px; } .rounded-xl { border-radius: 1rem; }
.transition-transform { transition: transform 0.5s ease; } .transition-colors { transition: background-color 0.2s, color 0.2s; }
.shadow-sm { box-shadow: var(--shadow-sm); } .shadow-md { box-shadow: var(--shadow-md); } .drop-shadow-sm { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); }
.opacity-10 { opacity: 0.1; } .opacity-50 { opacity: 0.5; } .opacity-80 { opacity: 0.8; }
.transform { transform: translate(0); } .scale-105 { transform: scale(1.05); } .rotate-12 { transform: rotate(12deg); }
.mix-blend-screen { mix-blend-mode: screen; } .duration-1000 { transition-duration: 1000ms; }
.cursor-pointer { cursor: pointer; } 
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Interactive Utilities */
.interactive-element { cursor: pointer; transition: all 0.2s; }
.interactive-element:hover { opacity: 0.8; transform: translateY(-1px); }
.interactive-card { cursor: pointer; transition: all 0.3s; }
.interactive-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(0,0,0,0.1);}
.interactive-card:hover .transition-transform { transform: scale(1.05); } 
.interactive-card:hover .glassmorphism { border-color: rgba(255,255,255,0.4); }

.group:hover .group-hover-white { color: white; }

/* Tooltips */
.tooltip-container { position: relative; display: inline-flex; cursor: help; }
.tooltip { visibility: hidden; width: max-content; max-width: 250px; background-color: #1E293B; color: #fff; text-align: center; border-radius: 6px; padding: 6px 10px; position: absolute; z-index: 1000; bottom: 125%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; font-size: 0.75rem; font-weight: 500; text-transform: none; line-height: 1.4; box-shadow: var(--shadow-md);}
.tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #1E293B transparent transparent transparent; }
.tooltip.left-top { left: auto; right: 0; transform: translateX(0); bottom: 125%;}
.tooltip.left-top::after { left: 90%; }
.tooltip.right-bottom { left: 0; transform: translateX(0); bottom: auto; top: 125%;}
.tooltip.right-bottom::after { top: auto; bottom: 100%; border-color: transparent transparent #1E293B transparent; left: 10%;}
.tooltip.top { bottom: 125%; top: auto;}
.tooltip-container:hover .tooltip { visibility: visible; opacity: 1; }

.data-pill { background: white; border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm);}
.glass-panel { background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(8px); }

/* Buttons & Inputs */
button { cursor: pointer; border: none; outline: none; transition: all 0.2s ease; display: inline-flex; justify-content: center; align-items: center; }
.primary-btn { background: var(--primary-green); color: var(--clean-white); padding: 10px 18px; border-radius: var(--radius-md); font-weight: 600; gap: 8px; box-shadow: var(--shadow-sm); }
.primary-btn:hover { background: var(--primary-green-light); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.secondary-btn { background: var(--clean-white); border: 1px solid var(--border-color); color: var(--text-primary); padding: 10px 16px; border-radius: var(--radius-md); font-weight: 600; box-shadow: var(--shadow-sm); }
.secondary-btn:hover { background: #F8FAFC; border-color: var(--primary-green-light); color: var(--primary-green-light); transform: translateY(-1px); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--clean-white); border: 1px solid var(--border-color); color: var(--text-muted); position: relative; }
.icon-btn:hover { background: #F8FAFC; color: var(--text-primary); }
.micro-btn { background: transparent; border: 1px solid var(--border-color); padding: 4px 8px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; border-radius: 4px;}
.micro-btn:hover { background: #F1F5F9; }
.micro-btn.active { background: var(--text-primary); color: white; border-color: var(--text-primary);}

.badge { position: absolute; top: -2px; right: -2px; background: var(--danger); color: white; font-size: 0.65rem; font-weight: bold; width: 16px; height: 16px; border-radius: 50%; border: 2px solid white; display: flex; align-items: center; justify-content: center; }
.pulse-btn { animation: buttonPulse 2s infinite; }
@keyframes buttonPulse { 0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(46, 125, 50, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); } }

.border-focus-transition { border: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.border-focus-transition:focus-within { background: white; border-color: var(--primary-green-light); box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1); }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #F8FAFC; border-radius: 4px;}
.custom-scrollbar::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Dropdowns & Toasts */
.dropdown-wrapper { position: relative; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 120%; width: 300px; background: white; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); z-index: 1000; animation: dropFade 0.2s ease-out; overflow: hidden; }
@keyframes dropFade { from { opacity:0; transform: translateY(-10px); } to { opacity:1; transform: translateY(0); } }
.dropdown-menu.show { display: block; }
.dropdown-header { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border-color); background: #F8FAFC; font-size: 0.85rem;}
.dropdown-item { padding: 12px 16px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background 0.2s; display: flex; gap: 12px; align-items: center; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: #F1F5F9; }
.drop-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0;}

.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { background: white; border-radius: var(--radius-md); padding: 16px 20px; box-shadow: var(--shadow-lg); border-left: 4px solid var(--info); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 12px; animation: toastIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; transform: translateX(120%); }
.toast.success { border-left-color: var(--light-green); }
.toast.error { border-left-color: var(--danger); }
.toast.hide { animation: toastOut 0.3s forwards; }
@keyframes toastIn { to { transform: translateX(0); } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ==================================================
   Layout Shell 
   ================================================== */
.dashboard-layout { display: flex; height: 100vh; width: 100vw; }
.sidebar { width: 260px; background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; border-right: 1px solid var(--sidebar-hover); flex-shrink: 0; z-index: 100; transition: transform 0.3s ease; }
.sidebar-brand { height: 70px; padding: 0 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--sidebar-hover); }
.brand-icon { font-size: 1.5rem; color: var(--primary-gold); font-weight: 800;}
.brand-text { font-size: 1.25rem; font-weight: 800; color: var(--clean-white); letter-spacing: 1px; }
.brand-os { color: var(--primary-green-light); font-weight: 400; }
.close-sidebar-btn { display: none; background: transparent; color: white; font-size: 1.2rem; margin-left: auto;}

.sidebar-section { padding: 24px 16px; flex: 1; }
.section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding-left: 12px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); color: var(--sidebar-text); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: all 0.2s; }
.nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-link:hover { background: var(--sidebar-hover); color: var(--clean-white); }
.nav-link.active { background: rgba(46, 125, 50, 0.2); color: var(--clean-white); border-left: 3px solid var(--light-green); border-right: none;}
.nav-link.active i { color: var(--light-green); }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--sidebar-hover); }
.user-profile { background: rgba(255,255,255,0.03); padding: 10px; border-radius: var(--radius-md); display: flex; align-items: center; gap: 12px; }
.user-profile:hover { background: rgba(255,255,255,0.08); }
.avatar { width: 36px; height: 36px; background: var(--primary-green-light); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.9rem; font-weight: 600; color: var(--clean-white); }
.user-role { font-size: 0.75rem; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.3s; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative;}
.top-header { height: 70px; background: var(--clean-white); border-bottom: 1px solid var(--border-color); padding: 0 32px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; z-index: 40;}
.header-left { display: flex; align-items: center; gap: 20px;}
.mobile-menu-btn { display: none; background: transparent; font-size: 1.25rem; color: var(--text-primary); }
.header-search { display: flex; align-items: center; gap: 12px; background: var(--bg-base); padding: 10px 16px; border-radius: var(--radius-md); width: 350px;}
.header-search i { color: var(--text-muted); }
.header-search input { border: none; background: transparent; width: 100%; outline: none; font-size: 0.9rem; color: var(--text-primary); }
.header-actions { display: flex; align-items: center; gap: 16px; }

/* ==================================================
   Dashboard Views & Grids 
   ================================================== */
.views-container { flex: 1; padding: 32px; overflow-y: auto; scroll-behavior: smooth;}
.dashboard-view { display: none; animation: fadeIn 0.4s ease-out forwards; opacity: 0; transform: translateY(10px); }
.dashboard-view.active { display: block; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

.view-header { margin-bottom: 24px; }
.view-title { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.view-subtitle { font-size: 0.95rem; color: var(--text-muted); margin-top: 4px; font-weight: 500;}

.grid-layout { display: grid; gap: 24px; }
.widget { background: var(--clean-white); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; }
.widget-head { padding: 16px 20px; background: #FAFAFA; border-bottom: 1px solid var(--border-color);}
.widget-head h3 { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px;}
.widget-body { padding: 20px; flex: 1; }
.full-img { width: 100%; height: 100%; object-fit: cover; }
.glassmorphism { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }

/* =========== View 1: GIS Map & Predict Engine =========== */
.gis-grid { grid-template-columns: 3fr 1fr; grid-template-rows: auto; height: 600px;}
.map-widget { grid-column: 1 / 2; height: 100%;}
.payout-feed-widget { grid-column: 2 / 3; height: 100%;}

.map-body-container { height: 100%; }
.overlay-gradient { position: absolute; inset: 0; background: linear-gradient(to right, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 40%); pointer-events: none;}
.geo-markers { position: absolute; inset: 0; }
.marker { position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%); z-index: 10; transition: transform 0.2s;}
.marker:hover { transform: translate(-50%, -50%) scale(1.2); }
.marker.selected .dot { border-color: var(--primary-gold); transform: scale(1.2);}
.dot { width: 100%; height: 100%; border-radius: 50%; border: 3px solid white; position: relative; z-index: 2; box-shadow: 0 4px 6px rgba(0,0,0,0.3); transition: all 0.2s;}
.marker.urgent .dot { background: var(--danger); }
.marker.active .dot { background: var(--light-green); }
.marker.normal .dot { background: var(--info); }
.pulse-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: inherit; animation: pulse 2s infinite ease-out; top: 0; left: 0; z-index: 1; }
.marker.urgent .pulse-ring { background: var(--danger); }
.marker.active .pulse-ring { background: var(--light-green); }
.marker.normal .pulse-ring { background: var(--info); animation-duration: 3s;}
@keyframes pulse { 0% { transform: scale(1); opacity: 0.8;} 100% { transform: scale(3); opacity: 0;} }

.floating-stat { position: absolute; padding: 12px 16px; border-radius: var(--radius-md); display: flex; flex-direction: column; min-width: 200px; z-index: 20;}
.floating-stat.bottom-left { bottom: 20px; left: 20px; }

.map-data-panel { width: 280px; position: absolute; right: 20px; top: 20px; bottom: 20px; background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-lg); z-index: 20; color: white;}
.status-badge { font-size: 0.7srem; font-weight: 800; padding: 4px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.5px; box-shadow: var(--shadow-sm);}
.status-badge.live { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1s infinite alternate;}
.status-badge.running { background: rgba(46, 125, 50, 0.2); color: #4CAF50; border: 1px solid #4CAF50; }
@keyframes blink { from{opacity:1;} to{opacity:0.3;} }

/* Circle Chart (Small for sidebar) */
.circular-chart.small { display: block; margin: 0 auto; max-width: 100px; max-height: 100px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));}
.circle-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 3.8; }
.circle { fill: none; stroke-width: 3.8; stroke-linecap: round; stroke: var(--primary-green-light); transition: stroke-dasharray 1s ease-out; }

/* Payout Feed */
.payout-feed-widget h3 { font-size: 1rem; }
.amount-large { letter-spacing: -1px; }
.feed-item { padding: 12px; background: white; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 0.8rem; box-shadow: 0 1px 2px rgba(0,0,0,0.02); animation: slideInX 0.3s ease-out;}
@keyframes slideInX { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1;} }

/* =========== View 2: AI Triage =========== */
.triage-grid { grid-template-columns: 2fr 1fr; height: 550px; }
.camera-widget { height: 100%; border-radius: var(--radius-xl); box-shadow: inset 0 0 50px rgba(0,0,0,0.8);}
.scan-img { opacity: 0.8; filter: contrast(1.1); }
.scan-overlay-text { position: absolute; top:50%; left:50%; transform:translate(-50%, -50%); color: var(--primary-gold); font-size: 1.5rem; font-weight: 800; text-shadow: 0 0 10px rgba(0,0,0,0.8); z-index: 10; display: none; }

.passport-overlay { position: absolute; z-index: 10; top: 20px; right: 20px; width: 280px; background: rgba(15, 23, 42, 0.85); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); transition: transform 0.3s; }
.passport-overlay:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2);}

.hud-corners { position: absolute; inset: 20px; pointer-events: none;}
.corner { position: absolute; width: 40px; height: 40px; border-color: rgba(255,255,255,0.7); border-style: solid; filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));}
.corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; } .corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; }
.corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; } .corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }

.laser-mesh { position: absolute; inset: 0; pointer-events:none;}
.v-line { position: absolute; top:0; height:100%; width:1px; background: rgba(0, 229, 255, 0.2); }
.h-line.scanner { position: absolute; width: 100%; height: 2px; background: #00E5FF; box-shadow: 0 0 15px #00E5FF, 0 0 5px #00E5FF; animation: vScan 2.5s infinite linear; }
@keyframes vScan { 0% { top: 0%; opacity: 0.8;} 50% {opacity: 1;} 100% { top: 100%; opacity: 0;} }

.cv-bounding-box { position: absolute; border: 2px solid var(--primary-gold); background: rgba(255, 193, 7, 0.1); box-shadow: 0 0 10px rgba(255,193,7,0.4); animation: boxPulse 2s infinite alternate;}
.cv-label { position: absolute; top: -20px; left: -2px; background: var(--primary-gold); color: black; font-size: 0.65rem; font-weight: 800; padding: 2px 6px; white-space: nowrap;}
@keyframes boxPulse { from { opacity: 0.7; } to { opacity: 1; } }

.score-dial { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; box-shadow: var(--shadow-sm);}
.bg-gold-light-alpha { background: rgba(255, 193, 7, 0.1); }
.interactive-row { padding: 6px; border-radius: 6px; transition: background 0.2s;} .interactive-row:hover { background: #F1F5F9; }
.res-track { height: 10px; background: #E2E8F0; border-radius: 5px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); flex:1;}
.res-fill { height: 100%; border-radius: 5px; width: 0; transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);}
.route-btn { width: 100%; border: 2px solid var(--primary-green); background: #F0FDF4; padding: 12px; border-radius: var(--radius-lg); display: flex; align-items: center; box-shadow: var(--shadow-sm); }
.route-btn.active:hover { background: var(--primary-green); box-shadow: var(--shadow-md); transform: translateY(-2px);}

/* =========== View 3: Bio Extraction =========== */
.bio-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
.green-hero { background: linear-gradient(135deg, var(--green-dark), var(--primary-green-light)); border: none;}
.huge-number { line-height: 1; }
.vs-circle { z-index: 10; }

.tank-widget { height: 500px; }
.tank-visual-container { border-right: 1px solid var(--border-color); }
.glass-pill-mini { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(4px); padding: 4px 10px; border-radius: var(--radius-md); /* pulse logic in html via class */}
.radial-ph { background: rgba(0,0,0,0.3); }

.terminal-body { box-shadow: inset 0 0 20px rgba(0,0,0,0.8); }
.terminal-content { line-height: 1.5; white-space: pre-wrap; font-size: 0.7rem;}
.log-line { border-left: 2px solid transparent; padding-left: 6px; animation: slideInX 0.2s ease-out;}
.log-line.warn { color: var(--primary-gold); border-left-color: var(--primary-gold); background: rgba(255,193,7,0.05);}
.log-line.success { color: var(--green-400); border-left-color: var(--green-400); }
.blink-text { animation: blinkText 1.5s infinite alternate;}
@keyframes blinkText { from { opacity: 1; text-shadow: 0 0 10px rgba(52, 211, 153, 0.8); } to { opacity: 0.5; text-shadow: none; } }

/* =========== Responsiveness =========== */
@media (max-width: 1024px) {
    .gis-grid, .bio-grid { grid-template-columns: 1fr; height: auto;}
    .map-widget { height: 500px; }
    .map-body-container { flex-direction: column; }
    .map-data-panel { position: static; width: 100%; border-radius: 0; border-left: none; border-right: none;}
    .triage-grid { grid-template-columns: 1fr; grid-template-rows: 400px auto; height: auto;}
    .passport-overlay { width: auto; left: 20px; }
    .top-bio-row { grid-template-columns: 1fr; }
    .hidden-mobile { display: none !important; }
}

@media (max-width: 768px) {
    .sidebar { position: fixed; height: 100vh; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 5px 0 15px rgba(0,0,0,0.3); }
    .close-sidebar-btn { display: block; }
    .mobile-menu-btn { display: block; }
    .header-search { width: auto; max-width: 180px;}
    .top-header { padding: 0 16px; }
    .views-container { padding: 16px; }
    .view-title { font-size: 1.4rem; }
    .flex-col-mobile { flex-direction: column; align-items: flex-start; gap: 8px;}
    .mt-2-mobile { margin-top: 0.5rem; }
    .dropdown-menu { right: -50px; width: 280px; } 
    .amount-large { font-size: 2.2rem; }
    .tank-widget { height: auto; }
}
