:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #38bdf8;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  --accent-purple: #c084fc;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Lock state */
.app-locked {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

/* Login Overlay Modal */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease-out;
}

.login-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.login-icon-wrap {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  margin-bottom: 0.25rem;
}

.login-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  transition: all 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.login-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  text-align: center;
  display: none;
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* App Header */
.app-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-user-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent-blue);
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-outline-accent:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-blue);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #ffffff;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

/* Collapsible Top Controls Tray */
#top-tray {
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease;
  max-height: 500px;
  overflow: hidden;
  opacity: 1;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

#top-tray.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  pointer-events: none;
}

/* Metrics Banner */
.metrics-banner {
  padding: 0.6rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.65rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.metric-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon-blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }
.metric-icon-green { background: rgba(52, 211, 153, 0.15); color: var(--accent-emerald); }
.metric-icon-amber { background: rgba(251, 191, 36, 0.15); color: var(--accent-amber); }
.metric-icon-purple { background: rgba(192, 132, 252, 0.15); color: var(--accent-purple); }

.metric-content {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.metric-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Input Section */
.input-section {
  padding: 0.75rem 1.25rem;
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.input-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-box-wrapper {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
}

.zip-textarea {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  transition: border-color 0.15s;
}

.zip-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  max-height: 60px;
  overflow-y: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.chip-remove {
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

.chip-remove:hover {
  color: var(--accent-rose);
}

/* ==============================================================================
   SEAMLESS MAXIMUM MAP DASHBOARD LAYOUT
   ============================================================================== */
.dashboard-layout {
  flex: 1;
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Map Section (takes 100% full space) */
.map-panel {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

#map {
  width: 100%;
  height: 100%;
  background: #0f172a;
}

/* Floating HUD Quick Bar on Map (Top-Left) */
.map-hud-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  max-width: calc(100% - 320px);
  pointer-events: none;
}

.hud-pill {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-md);
}

.hud-pill strong {
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* Floating Drawer Toggle Button (Top-Right on map) */
.drawer-toggle-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 998;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: var(--accent-blue);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.drawer-toggle-btn:hover {
  background: var(--accent-blue);
  color: #0f172a;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* Floating Map Layers Control Panel */
.map-floating-panel {
  position: absolute;
  top: 56px;
  right: 14px;
  z-index: 997;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 240px;
}

.control-title {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 13px;
  height: 13px;
}

.basemap-select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.45rem;
  font-size: 0.75rem;
  outline: none;
}

.active-zip-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 999;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.active-zip-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.active-zip-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-blue);
}

/* Sliding Data & Distance Drawer */
.data-panel {
  width: 500px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.35s ease, opacity 0.2s ease;
  z-index: 1000;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* When drawer is closed, map expands to 100% full width */
.data-panel.collapsed {
  margin-right: -500px;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

/* Max Map Mode (Hide Header too) */
body.max-map-mode .app-header {
  transform: translateY(-100%);
  position: absolute;
}

body.max-map-mode #top-tray {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
}

body.max-map-mode .dashboard-layout {
  height: 100vh;
}

/* Floating Exit Max Map button when in full max mode */
.floating-exit-max {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  display: none;
}

body.max-map-mode .floating-exit-max {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Tabs & Data Section */
.tabs-header {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  flex-shrink: 0;
}

.tab-btn {
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.08);
}

.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: none;
}

.tab-content.active {
  display: block;
}

/* Table Wrapper */
.table-wrapper {
  overflow: auto;
  max-height: calc(100vh - 210px);
  min-height: 250px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
  text-align: left;
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: #1e293b;
}

th {
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.1s;
  cursor: pointer;
}

tbody tr:hover {
  background-color: var(--bg-card-hover);
}

tbody tr.selected-row {
  background-color: rgba(56, 189, 248, 0.15);
  border-left: 3px solid var(--accent-blue);
}

td {
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.zip-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-blue);
}

.tag-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
}

.tag-green {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.tag-blue {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag-amber {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Distance Matrix Table */
.distance-matrix-wrapper {
  overflow: auto;
  max-height: calc(100vh - 240px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.distance-matrix-table td {
  padding: 0.4rem 0.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.matrix-header-cell {
  position: sticky;
  inset-inline-start: 0;
  background: #1e293b;
  z-index: 5;
  font-weight: 700;
  color: var(--accent-blue);
  text-align: left;
}

.matrix-zero {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.matrix-adjacent {
  background: rgba(52, 211, 153, 0.25) !important;
  color: #34d399 !important;
  font-weight: 700;
}

/* Analytics Cards */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.card-highlight {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Distance List View */
.distance-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.distance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}

.distance-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.4);
}

.distance-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.distance-item-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.distance-meter-bar {
  width: 80px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.distance-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #38bdf8);
  border-radius: var(--radius-full);
}

/* Leaflet Custom Marker & Labels */
.zip-map-label {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.distance-line-label {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pulsing-point-marker {
  width: 14px;
  height: 14px;
  background: #f43f5e;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #f43f5e;
  animation: pulse 1.8s infinite;
}

/* Facility Hub Marker */
.facility-hub-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.hub-pin {
  width: 26px;
  height: 26px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #38bdf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  animation: pulse-cyan 2s infinite;
}

.hub-label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 2px;
  white-space: nowrap;
}

/* Facility Point Badges */
.facility-point-marker {
  cursor: pointer;
  pointer-events: auto;
}

.point-badge {
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.15s;
}

.point-badge:hover {
  transform: scale(1.15);
  z-index: 1000;
}

.badge-unique {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #fbbf24;
  color: #fbbf24;
}

.badge-pobox {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #c084fc;
  color: #c084fc;
}

.badge-point {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #f43f5e;
  color: #f43f5e;
}

.tag-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.tag-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

@keyframes pulse-cyan {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
