/* RF Mapper - Main Stylesheet */ :root { --bg-primary: #1a1a2e; --bg-secondary: #16213e; --bg-tertiary: #0f3460; --bg-dark: #0a0a1a; --color-primary: #00ff88; --color-secondary: #4dabf7; --color-warning: #ffd93d; --color-danger: #ff6b6b; --color-text: #eee; --color-text-muted: #888; --color-text-dim: #666; --border-color: #0f3460; --border-radius: 4px; --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--font-family); background: var(--bg-primary); color: var(--color-text); min-height: 100vh; } /* Header */ .header { background: var(--bg-secondary); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border-color); } .header h1 { color: var(--color-primary); font-size: 1.5rem; } .header-controls { display: flex; gap: 1rem; align-items: center; } /* Buttons */ .btn { background: var(--bg-tertiary); color: var(--color-primary); border: 1px solid var(--color-primary); padding: 0.5rem 1rem; border-radius: var(--border-radius); cursor: pointer; font-size: 0.9rem; transition: all 0.2s; } .btn:hover { background: var(--color-primary); color: var(--bg-primary); } .btn:disabled { opacity: 0.5; cursor: not-allowed; } .btn-danger { border-color: var(--color-danger); color: var(--color-danger); } .btn-danger:hover { background: var(--color-danger); color: var(--bg-primary); } /* Layout */ .main-container { display: grid; grid-template-columns: 1fr 350px; height: calc(100vh - 60px); } .map-container { position: relative; } #map { height: 100%; width: 100%; background: var(--bg-dark); } /* View Toggle */ .view-toggle { position: absolute; top: 10px; left: 50px; z-index: 1000; display: flex; gap: 0; } .view-toggle button { background: var(--bg-secondary); color: var(--color-text-muted); border: 1px solid var(--border-color); padding: 0.5rem 1rem; cursor: pointer; } .view-toggle button:first-child { border-radius: var(--border-radius) 0 0 var(--border-radius); } .view-toggle button:last-child { border-radius: 0 var(--border-radius) var(--border-radius) 0; } .view-toggle button:not(:first-child):not(:last-child) { border-radius: 0; } .view-toggle button.active { background: var(--bg-tertiary); color: var(--color-primary); } /* Filter Controls */ .filter-controls { position: absolute; top: 10px; right: 10px; z-index: 1000; display: flex; gap: 0.5rem; } .filter-btn { background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 0.5rem 0.75rem; border-radius: var(--border-radius); cursor: pointer; display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; transition: all 0.2s; } .filter-btn.wifi { color: var(--color-primary); border-color: var(--color-primary); } .filter-btn.wifi.inactive { color: #555; border-color: #333; background: #111; } .filter-btn.bluetooth { color: var(--color-secondary); border-color: var(--color-secondary); } .filter-btn.bluetooth.inactive { color: #555; border-color: #333; background: #111; } .filter-btn:hover { transform: scale(1.05); } .filter-indicator { width: 8px; height: 8px; border-radius: 50%; background: currentColor; } .filter-btn.inactive .filter-indicator { background: #333; } /* Sidebar */ .sidebar { background: var(--bg-secondary); border-left: 2px solid var(--border-color); overflow-y: auto; padding: 1rem; } .section { margin-bottom: 1.5rem; } .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); } .section-title { color: var(--color-primary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; } .device-count { background: var(--bg-tertiary); color: var(--color-primary); padding: 0.2rem 0.5rem; border-radius: 10px; font-size: 0.8rem; } /* Device Cards */ .device-list { display: flex; flex-direction: column; gap: 0.5rem; } .device-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 0.75rem; cursor: pointer; transition: all 0.2s; } .device-card:hover { border-color: var(--color-primary); transform: translateX(3px); } .device-card.wifi { border-left: 3px solid var(--color-primary); } .device-card.bluetooth { border-left: 3px solid var(--color-secondary); } .device-header { display: flex; justify-content: space-between; align-items: center; } .device-name { font-weight: 600; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .device-info { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--color-text-muted); } /* Signal Bars */ .signal-bar { display: flex; gap: 2px; align-items: flex-end; height: 12px; } .signal-bar span { width: 4px; background: #333; border-radius: 1px; } .signal-bar span.active { background: var(--color-primary); } .signal-bar.weak span.active { background: var(--color-danger); } .signal-bar.fair span.active { background: var(--color-warning); } /* Stats Grid */ .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; } .stat-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 0.75rem; text-align: center; } .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); } .stat-label { font-size: 0.7rem; color: var(--color-text-muted); text-transform: uppercase; } /* Radar Canvas */ .radar-canvas { width: 100%; height: 100%; display: none; } .radar-canvas.active { display: block; } #leaflet-map { height: 100%; width: 100%; } #leaflet-map.hidden { display: none; } /* Misc */ .scan-info { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 1rem; } .manufacturer { font-size: 0.75rem; color: var(--color-text-dim); font-style: italic; } .position-input { display: flex; gap: 0.5rem; margin-bottom: 1rem; } .position-input input { flex: 1; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--color-text); padding: 0.5rem; border-radius: var(--border-radius); font-size: 0.9rem; } .loading { display: flex; align-items: center; justify-content: center; height: 100px; color: var(--color-text-muted); } .loading::after { content: ''; width: 20px; height: 20px; border: 2px solid var(--border-color); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 1s linear infinite; margin-left: 10px; } @keyframes spin { to { transform: rotate(360deg); } } .distance-badge { background: var(--bg-tertiary); color: var(--color-primary); padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.75rem; } /* Bluetooth Identify */ .identify-btn { background: transparent; border: 1px solid var(--color-secondary); color: var(--color-secondary); padding: 0.2rem 0.4rem; border-radius: 3px; cursor: pointer; font-size: 0.7rem; transition: all 0.2s; } .identify-btn:hover { background: var(--color-secondary); color: var(--bg-primary); } .identify-btn.loading { opacity: 0.5; cursor: wait; } .device-services { font-size: 0.7rem; color: var(--color-secondary); margin-top: 0.3rem; display: none; } .device-services.visible { display: block; } .service-tag { display: inline-block; background: var(--bg-tertiary); color: var(--color-secondary); padding: 0.1rem 0.3rem; border-radius: 2px; margin: 0.1rem; font-size: 0.65rem; } .device-type-badge { background: #1a3a5c; color: var(--color-secondary); padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.7rem; margin-top: 0.3rem; display: inline-block; } /* Auto-Scan Controls */ .autoscan-status { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 3px; background: var(--bg-tertiary); color: var(--color-text-muted); } .autoscan-status.running { background: rgba(0, 255, 136, 0.2); color: var(--color-primary); } .autoscan-controls { display: flex; flex-direction: column; gap: 0.5rem; } .autoscan-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; } .autoscan-row label { font-size: 0.8rem; color: var(--color-text-muted); } .autoscan-row input { width: 80px; padding: 0.3rem 0.5rem; background: var(--bg-dark); border: 1px solid var(--border-color); color: var(--color-text); border-radius: var(--border-radius); font-size: 0.8rem; } .autoscan-row input[type="text"] { width: 100px; } #autoscan-info { font-size: 0.75rem; color: var(--color-text-dim); padding: 0.25rem 0; } .autoscan-buttons { display: flex; gap: 0.5rem; margin-top: 0.25rem; } .btn-small { padding: 0.3rem 0.75rem; font-size: 0.75rem; } .btn-secondary { background: var(--bg-tertiary); color: var(--color-text); } .btn-secondary:hover { background: #1a5a8a; } #autoscan-btn.active { background: rgba(0, 255, 136, 0.2); color: var(--color-primary); border-color: var(--color-primary); } /* Device Detail Panel */ .device-detail-panel { position: absolute; background: var(--bg-secondary); border: 1px solid var(--color-primary); border-radius: var(--border-radius); padding: 1rem; min-width: 220px; max-width: 300px; z-index: 1001; box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2); opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s; pointer-events: none; } .device-detail-panel.visible { opacity: 1; transform: scale(1); pointer-events: auto; } .device-detail-panel.hidden { display: none; } .detail-close { position: absolute; top: 0.5rem; right: 0.5rem; background: none; border: none; color: var(--color-text-muted); font-size: 1.2rem; cursor: pointer; padding: 0 0.3rem; } .detail-close:hover { color: var(--color-text); } .detail-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); } .detail-icon { font-size: 1.2rem; } .detail-name { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .detail-content { display: flex; flex-direction: column; gap: 0.4rem; } .detail-row { display: flex; justify-content: space-between; font-size: 0.85rem; } .detail-label { color: var(--color-text-muted); } .detail-value { color: var(--color-text); font-weight: 500; } .device-detail-panel.wifi { border-color: var(--color-primary); box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2); } .device-detail-panel.bluetooth { border-color: var(--color-secondary); box-shadow: 0 4px 20px rgba(77, 171, 247, 0.2); } /* Radar hover tooltip */ .radar-tooltip { position: absolute; background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 0.3rem 0.5rem; border-radius: var(--border-radius); font-size: 0.8rem; pointer-events: none; z-index: 1000; white-space: nowrap; opacity: 0; transition: opacity 0.15s; } .radar-tooltip.visible { opacity: 1; } /* 3D Map View */ .map-3d { width: 100%; height: 100%; background: var(--bg-dark); } .map-3d.hidden { display: none; } .map-3d.active { display: block; } /* MapLibre popup overrides to match theme */ .maplibregl-popup-content { background: var(--bg-secondary) !important; color: var(--color-text) !important; border: 1px solid var(--color-primary) !important; border-radius: var(--border-radius) !important; padding: 0.75rem !important; box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2) !important; } .maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--color-primary) !important; } .maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--color-primary) !important; } .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--color-primary) !important; } .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--color-primary) !important; } .maplibregl-popup-close-button { color: var(--color-text-muted) !important; font-size: 1.2rem !important; } .maplibregl-popup-close-button:hover { color: var(--color-text) !important; background: transparent !important; } /* Popup floor control */ .popup-floor-control { margin-top: 6px; padding-top: 6px; display: flex; align-items: center; gap: 8px; } .popup-floor-control:first-of-type { margin-top: 8px; border-top: 1px solid var(--border-color); } .popup-floor-control label { font-weight: bold; color: var(--color-text-muted); } .popup-floor-control select { flex: 1; padding: 4px 8px; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--color-text); border-radius: var(--border-radius); cursor: pointer; } .popup-floor-control select:hover { border-color: var(--color-primary); } .popup-floor-control select:focus { outline: none; border-color: var(--color-primary); } .popup-floor-control input[type="number"] { flex: 1; max-width: 80px; padding: 4px 8px; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--color-text); border-radius: var(--border-radius); } .popup-floor-control input[type="number"]:hover { border-color: var(--color-primary); } .popup-floor-control input[type="number"]:focus { outline: none; border-color: var(--color-primary); } .popup-floor-control input[type="number"]::placeholder { color: var(--color-text-muted); opacity: 0.7; } /* Live Track Button */ #live-track-btn.active { background: var(--color-accent); animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } } /* Moving device markers - purple */ .marker-3d.moving .marker-icon { background: #9b59b6 !important; box-shadow: 0 0 15px rgba(155, 89, 182, 0.8), 0 2px 8px rgba(0, 0, 0, 0.5) !important; animation: moving-pulse 0.8s ease-in-out infinite; } .marker-3d.moving .marker-floor { background: #9b59b6 !important; } @keyframes moving-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } } /* 3D Markers */ .marker-3d { display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .marker-3d .marker-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; color: var(--bg-primary); } .marker-3d:hover { transform: scale(1.2); } .marker-3d .marker-floor { font-size: 10px; font-weight: bold; color: white; background: rgba(0, 0, 0, 0.7); padding: 1px 4px; border-radius: 3px; margin-top: 2px; white-space: nowrap; } .marker-3d.wifi .marker-icon { background: var(--color-primary); box-shadow: 0 0 15px var(--color-primary), 0 2px 8px rgba(0, 0, 0, 0.5); border: 2px solid rgba(255, 255, 255, 0.3); } .marker-3d.bluetooth .marker-icon { background: var(--color-secondary); box-shadow: 0 0 15px var(--color-secondary), 0 2px 8px rgba(0, 0, 0, 0.5); border: 2px solid rgba(255, 255, 255, 0.3); } .marker-3d.center .marker-icon { background: #ffffff; box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 2px 8px rgba(0, 0, 0, 0.5); border: 3px solid var(--color-primary); width: 24px; height: 24px; z-index: 100; } /* Floor Controls */ .floor-section { display: block; } .floor-controls { display: flex; flex-direction: column; gap: 0.5rem; } .floor-controls select { width: 100%; padding: 0.5rem; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--color-text); border-radius: var(--border-radius); font-size: 0.9rem; cursor: pointer; } .floor-controls select:hover { border-color: var(--color-primary); } .floor-controls select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2); } .floor-info { font-size: 0.8rem; color: var(--color-text-muted); padding: 0.25rem 0; } #floor-device-count { color: var(--color-primary); font-weight: 600; } /* 3D Map Controls Override */ .maplibregl-ctrl-group { background: var(--bg-secondary) !important; border: 1px solid var(--border-color) !important; } .maplibregl-ctrl-group button { background-color: var(--bg-secondary) !important; border-color: var(--border-color) !important; } .maplibregl-ctrl-group button:hover { background-color: var(--bg-tertiary) !important; } .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); } .maplibregl-ctrl-attrib { background: rgba(22, 33, 62, 0.8) !important; color: var(--color-text-muted) !important; } .maplibregl-ctrl-attrib a { color: var(--color-primary) !important; } /* Responsive */ @media (max-width: 768px) { .main-container { grid-template-columns: 1fr; } .sidebar { max-height: 40vh; border-left: none; border-top: 2px solid var(--border-color); } }