MAP SECTION — Premium Analytics Design ══════════════════════════════════════════ */ .map-section-card { background: #ffffff; border-radius: 2rem; border: 1px solid #f1f5f9; box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.05); overflow: hidden; transition: all 0.3s ease; } .map-section-card:hover { box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.08); } /* Header */ .map-section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.5rem 2rem; border-bottom: 1px solid #f8fafc; background: linear-gradient(to right, #f8fafc, #ffffff); } .map-section-title-group { display: flex; align-items: center; gap: 1rem; } .map-icon-wrap { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border-radius: 1rem; background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.4); } .map-section-title { font-size: 1.125rem; font-weight: 800; color: #0f172a; letter-spacing: -0.02em; } .map-section-subtitle { font-size: 0.75rem; color: #64748b; font-weight: 500; margin-top: 0.125rem; } .map-header-actions { display: flex; align-items: center; gap: 0.75rem; } .map-status-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; background: #f0fdf4; border: 1px solid #dcfce7; border-radius: 0.75rem; font-size: 0.75rem; font-weight: 700; color: #166534; box-shadow: 0 2px 10px rgba(22, 197, 94, 0.05); } .map-status-dot { position: relative; display: flex; width: 0.5rem; height: 0.5rem; } .map-status-dot span { position: absolute; display: inline-flex; width: 100%; height: 100%; border-radius: 50%; background: #22c55e; } .map-status-dot::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; background: #22c55e; opacity: 0.6; animation: pulseDot 2s ease-out infinite; } @keyframes pulseDot { 0% { transform:scale(1); opacity:.6; } 70% { transform:scale(2.4); opacity:0; } 100% { transform:scale(1); opacity:0; } } .map-clear-btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.875rem; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 0.75rem; font-size: 0.725rem; font-weight: 700; color: #64748b; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02); } .map-clear-btn:hover { border-color: #fca5a5; color: #ef4444; background: #fff5f5; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08); } /* Map Layout */ .map-body { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: 520px; } @media (max-width: 1024px) { .map-body { grid-template-columns: 1fr; grid-template-rows: 240px 400px; height: auto; } } /* Sidebar */ .map-sidebar { display: flex; flex-direction: column; border-right: 1px solid #f1f5f9; background: #fafcff; overflow: hidden; } @media (max-width: 1024px) { .map-sidebar { border-right: none; border-bottom: 1px solid #f1f5f9; } } /* Sidebar Search Box */ .map-search-container { padding: 1rem; background: #ffffff; border-bottom: 1px solid #f1f5f9; } .map-search-wrapper { position: relative; display: flex; align-items: center; } .map-search-input { width: 100%; padding: 0.625rem 1rem 0.625rem 2.25rem; border-radius: 0.75rem; border: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.775rem; font-weight: 600; color: #334155; transition: all 0.2s ease; } .map-search-input:focus { border-color: #3b82f6; background: #ffffff; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); outline: none; } .map-search-icon { position: absolute; left: 0.75rem; color: #94a3b8; pointer-events: none; } /* Sidebar List Scroll */ .map-sidebar-scroll { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; } .map-sidebar-scroll::-webkit-scrollbar { width: 4px; } .map-sidebar-scroll::-webkit-scrollbar-track { background: transparent; } .map-sidebar-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; } /* Zone header badges */ .map-zone-group { display: flex; flex-direction: column; gap: 0.375rem; } .map-zone-label { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: 0.75rem; font-size: 0.725rem; font-weight: 800; letter-spacing: -0.01em; user-select: none; margin-bottom: 0.25rem; transition: opacity 0.2s ease, background 0.15s ease; } .map-zone-label.disabled { opacity: 0.5; text-decoration: line-through; background: #e2e8f0 !important; color: #64748b !important; border-color: #cbd5e1 !important; } .map-zone-label.disabled .zone-count { background: #cbd5e1 !important; color: #64748b !important; } .map-zone-label small { font-weight: 600; opacity: 0.8; margin-left: 0.25rem; } .map-zone-label .zone-count { margin-left: auto; font-size: 0.675rem; font-weight: 900; min-width: 1.5rem; height: 1.5rem; display: flex; align-items: center; justify-content: center; border-radius: 9999px; padding: 0 0.4rem; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); } .zone-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0; } .zone-1 { background: #f0fdf4; color: #166534; border: 1px solid #dcfce7; } .zone-1 .zone-dot { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); } .zone-1 .zone-count { background: #dcfce7; color: #166534; } .zone-2 { background: #eff6ff; color: #1e40af; border: 1px solid #dbeafe; } .zone-2 .zone-dot { background: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); } .zone-2 .zone-count { background: #dbeafe; color: #1e40af; } .zone-3 { background: #fff1f2; color: #9f1239; border: 1px solid #ffe4e6; } .zone-3 .zone-dot { background: #f43f5e; box-shadow: 0 0 8px rgba(244, 63, 94, 0.5); } .zone-3 .zone-count { background: #ffe4e6; color: #9f1239; } .map-zone-items { display: flex; flex-direction: column; gap: 0.375rem; transition: all 0.2s ease; } /* Customer Item Card */ .zone-customer-btn { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; padding: 0.625rem 0.75rem; border-radius: 0.875rem; background: #ffffff; border: 1px solid #f1f5f9; cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01); } .zone-customer-btn:hover { border-color: #3b82f6; background: #f8fafc; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05); } .zone-customer-btn.active { border-color: #3b82f6; background: #f0f6ff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08); } /* Circular distance badge */ .zone-customer-distance { font-size: 0.675rem; font-weight: 800; width: 2.25rem; height: 2.25rem; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 0.75rem; line-height: 1.1; box-shadow: 0 2px 5px rgba(0,0,0,0.03); } .zone-customer-info { flex: 1; min-width: 0; } .zone-customer-name { font-size: 0.775rem; font-weight: 800; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; } .zone-customer-sub { font-size: 0.675rem; color: #64748b; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.125rem; } .zone-empty-note { font-size: 0.725rem; color: #94a3b8; text-align: center; padding: 1rem; font-style: italic; background: #f8fafc; border-radius: 0.75rem; border: 1px dashed #e2e8f0; } /* Map Canvas Container */ .map-canvas-wrap { position: relative; background: #f8fafc; overflow: hidden; } #customerMap { width: 100%; height: 100%; min-height: 400px; } /* Premium Floating Legend */ .map-legend { position: absolute; bottom: 1.25rem; left: 1.25rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px) saturate(190%); -webkit-backdrop-filter: blur(12px) saturate(190%); border: 1px solid rgba(226, 232, 240, 0.8); border-radius: 1rem; padding: 0.75rem 1rem; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); transition: all 0.3s ease; } .legend-header { font-size: 0.625rem; font-weight: 900; text-transform: uppercase; color: #64748b; letter-spacing: 0.05em; margin-bottom: 0.25rem; border-bottom: 1px solid rgba(226, 232, 240, 0.5); padding-bottom: 0.25rem; } .legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; font-weight: 700; color: #334155; cursor: pointer; padding: 0.25rem 0.375rem; border-radius: 0.5rem; transition: all 0.15s ease; } .legend-item:hover { background: rgba(226, 232, 240, 0.4); } .legend-item.disabled { opacity: 0.4; text-decoration: line-through; } .legend-dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; display: inline-block; flex-shrink: 0; } /* Map Floating Control Box (Layers & Filters) */ .map-floating-controls { position: absolute; top: 1.25rem; right: 1.25rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; } .map-control-btn { width: 2.5rem; height: 2.5rem; border-radius: 0.875rem; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); border: 1px solid rgba(226, 232, 240, 0.8); box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06); color: #334155; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .map-control-btn:hover { background: #ffffff; color: #3b82f6; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1); } .map-control-btn:active { transform: translateY(0); } .map-control-btn.active { background: #3b82f6; color: #ffffff; border-color: #3b82f6; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); } /* Premium Leaflet Popup Overrides */ .leaflet-popup-content-wrapper { border-radius: 1.25rem; box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15); border: 1px solid rgba(241, 245, 249, 0.8); padding: 0; overflow: hidden; } .leaflet-popup-content { margin: 0; width: 240px !important; } .leaflet-popup-tip-container { margin-top: -1px; } .leaflet-popup-tip { background: #ffffff; box-shadow: none; } .leaflet-control-zoom { border: none !important; box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06) !important; border-radius: 0.875rem !important; overflow: hidden; } .leaflet-control-zoom-in, .leaflet-control-zoom-out { background: rgba(255, 255, 255, 0.9) !important; backdrop-filter: blur(8px) !important; color: #334155 !important; border: 1px solid rgba(226, 232, 240, 0.8) !important; width: 2.25rem !important; height: 2.25rem !important; line-height: 2.25rem !important; transition: all 0.2s ease !important; } .leaflet-control-zoom-in:hover, .leaflet-control-zoom-out:hover { background: #ffffff !important; color: #3b82f6 !important; } .leaflet-control-attribution { font-size: 0.6rem !important; color: #94a3b8 !important; background: rgba(255,255,255,0.7) !important; backdrop-filter: blur(4px); border-top-left-radius: 0.5rem; } /* Elegant glowing connection line */ path.connection-line { stroke-dasharray: 8, 8;