/* -------------------------------------------------------------
 * PATRY LIFESTYLE MAP - EXACT RECONCILIATION THEME
 * ------------------------------------------------------------- */

/* Custom CSS Variables & Design Tokens */
:root {
  --bg-base: #eef5fc;          
  --bg-sidebar: #ffffff;       
  --bg-surface: #ffffff;       
  --bg-surface-hover: #f5f9fd;
  
  --border-color: rgba(15, 37, 55, 0.08);      
  --border-color-active: #008ec4;              
  
  --text-primary: #0f2537;     
  --text-secondary: #4a6275;   
  --text-muted: #7d96ab;       
  
  --accent-gold: #cca04b;      
  --accent-copper: #d95d39;    
  --accent-sage: #2a9d8f;      
  --accent-blue: #008ec4;      
  
  --font-family: 'Outfit', -apple-system, sans-serif;
  
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
  --border-radius-sm: 4px;
  
  --shadow-premium: 0 4px 15px rgba(15, 37, 55, 0.03), 0 10px 30px rgba(15, 37, 55, 0.02);
  --shadow-active: 0 6px 20px rgba(0, 142, 196, 0.05), 0 12px 35px rgba(0, 142, 196, 0.03);
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Dark Mode Overrides */
body.dark-theme {
  --bg-base: #11161a;          
  --bg-sidebar: #171d24;       
  --bg-surface: #222933;       
  --bg-surface-hover: #29323e;
  
  --border-color: rgba(245, 242, 235, 0.07);
  --border-color-active: #00a8e8;
  
  --text-primary: #f5f8fa;     
  --text-secondary: #a1b0bd;   
  --text-muted: #677685;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-base);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Collapsible Sidebar (Width: 320px) */
.sidebar {
  width: 320px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transition: margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Collapsed Sidebar State sliding off screen */
.sidebar.collapsed {
  margin-left: -320px;
}

/* Collapsible toggle tab hanging over edge */
.sidebar-toggle-btn {
  position: absolute;
  top: 24px;
  right: -16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 37, 55, 0.08);
  color: var(--text-secondary);
  transition: transform 0.4s ease, right 0.4s ease;
  outline: none;
}

.sidebar-toggle-btn:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.sidebar.collapsed .sidebar-toggle-btn {
  transform: rotate(180deg);
  right: -48px; /* Positioned outward to easily grab when collapsed */
}

/* Sidebar Header */
.sidebar-header {
  padding: 32px 24px 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  font-size: 2.1rem;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1;
}

.sub-brand {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: none; 
}

.sidebar-scrollable::-webkit-scrollbar {
  display: none;
}

/* Interests Toggles - Modern Pill buttons matching the new design */
.persona-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.persona-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  padding: 12px 18px;
  text-align: left;
  cursor: pointer;
  border-radius: 20px; /* Full rounded capsules */
  color: inherit;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  outline: none;
}

.persona-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-blue);
}

.persona-card.active {
  background-color: var(--bg-surface-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.persona-card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.persona-card.active .card-icon {
  color: var(--accent-blue);
}

/* Perks List Layout matching mockup bullets */
.perks-bullet-list {
  list-style: none;
  padding-left: 12px;
  margin-top: 12px;
  margin-bottom: 28px;
}

.perks-bullet-list li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.perks-bullet-list li::before {
  content: "•";
  color: var(--accent-blue);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* -------------------------------------------------------------
 * ML BEHAVIOR TRACKER CONTAINER CARD
 * ------------------------------------------------------------- */
.ml-console-card {
  background-color: #fafbfc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-premium);
}

body.dark-theme .ml-console-card {
  background-color: #1a222a;
}

.ml-console-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ml-sub-card {
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 14px;
}

.ml-sub-card:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.ml-sub-card-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* User Profile Stats */
.ml-profile-id {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ml-profile-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ml-badge-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.status-parsed {
  background-color: rgba(42, 157, 143, 0.08);
  color: var(--accent-sage);
}

.ml-badge-score {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ml-badge-score strong {
  color: var(--text-primary);
}

/* Scrollable timeline items (Behavior Logs) */
.ml-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 120px;
  overflow-y: auto;
  padding-left: 12px;
  position: relative;
}

.ml-timeline-container::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 3px;
  width: 1.5px;
  background-color: var(--border-color);
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding-left: 14px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 5px;
  left: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  border: 2px solid #ffffff;
}

body.dark-theme .timeline-item::before {
  border-color: #1a222a;
}

.timeline-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.timeline-time {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.timeline-action {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Dynamic Gauge Widget (Predictions) */
.gauge-flex-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gauge-widget {
  position: relative;
  width: 84px;
  height: 42px;
}

.gauge-svg {
  transform: rotate(0deg);
}

.gauge-center-text {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.predictions-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prediction-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.prediction-bullets {
  list-style: none;
}

.prediction-bullets li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Simulator console adjustments */
.ml-sim-compact {
  border-top: 1.5px solid var(--border-color);
  padding-top: 14px;
}

.sim-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.sim-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

/* -------------------------------------------------------------
 * ANIMATED USER SIMULATOR & TELEMETRY STREAM STYLES
 * ------------------------------------------------------------- */

/* Live Telemetry Stream Ticker */
.map-floating-ticker-container {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 500px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 8px 30px rgba(15, 37, 55, 0.08);
  overflow: hidden;
  gap: 12px;
}

body.dark-theme .map-floating-ticker-container {
  background-color: rgba(23, 29, 36, 0.95);
}

.ticker-badge {
  background-color: var(--accent-blue);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  animation: pulseTicker 1.5s infinite alternate;
}

@keyframes pulseTicker {
  0% { box-shadow: 0 0 0 0 rgba(0, 142, 196, 0.4); }
  100% { box-shadow: 0 0 0 4px rgba(0, 142, 196, 0); }
}

.ticker-content {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  animation: scrollTickerEvent 0.3s ease-out;
}

@keyframes scrollTickerEvent {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Glowing Pulsing SVG Paths (Road Flow) */
.glowing-road-path {
  stroke-dasharray: 8, 8;
  animation: flowRoad 20s linear infinite;
  filter: drop-shadow(0 0 3px var(--accent-blue));
}

@keyframes flowRoad {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Animated Travel Avatar Capsule */
.map-animated-avatar {
  background: var(--accent-blue);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 142, 196, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  animation: floatAvatar 1s infinite alternate;
  transition: transform 0.1s linear;
}

@keyframes floatAvatar {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* Lead Connection Value Popup Card */
.map-connection-alert {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(15, 37, 55, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 220px;
  animation: scaleInAlert 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-theme .map-connection-alert {
  background-color: #222933;
}

@keyframes scaleInAlert {
  from { transform: scale(0.7) translateY(15px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.alert-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-sage);
  text-transform: uppercase;
}

.alert-content-body {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.alert-financial-footer {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-blue);
  border-top: 1px solid var(--border-color);
  padding-top: 4px;
  margin-top: 2px;
}

/* Confetti System */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2000;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  font-size: 1.2rem;
  user-select: none;
  animation: fallConfetti 2.5s linear forwards;
}

@keyframes fallConfetti {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotate(360deg);
    opacity: 0;
  }
}

/* Floating Reward text (+100$) */
.floating-money-badge {
  position: absolute;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-sage);
  pointer-events: none;
  animation: floatMoneyText 1.5s ease-out forwards;
  z-index: 2100;
}

@keyframes floatMoneyText {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(-15px, -50px);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .map-floating-ticker-container {
    width: 90%;
    bottom: 80px;
  }
}

.sim-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.sim-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 5px 0;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.sim-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.sim-btn.active {
  background-color: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

/* Main Content Area Layout */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

/* FLOATING HEADER CONTROLS (Floating Over Map) */

/* Center Search input matching mockup exactly */
.map-floating-search-center {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 48px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 8px 24px rgba(15, 37, 55, 0.05);
  transition: var(--transition-smooth);
}

.map-floating-search-center:focus-within {
  box-shadow: 0 8px 30px rgba(0, 142, 196, 0.06);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

.map-floating-search-center input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.search-actions-divider {
  width: 1.5px;
  height: 20px;
  background-color: var(--border-color);
  margin: 0 12px;
  flex-shrink: 0;
}

.search-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.search-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  outline: none;
}

.search-action-btn:hover {
  color: var(--accent-blue);
}

/* Right user badge card matching mockup */
.map-floating-user {
  position: absolute;
  top: 24px;
  right: 24px;
  height: 48px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 8px 24px rgba(15, 37, 55, 0.05);
  gap: 10px;
}

.user-avatar-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #cbd8e5;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.notification-bell-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-fast);
  outline: none;
}

.notification-bell-btn:hover {
  color: var(--text-primary);
}

.notification-dot {
  position: absolute;
  top: -1px;
  right: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-copper);
  border: 1px solid #ffffff;
}

/* Bottom Left Switch toggle matching mockup */
.map-floating-status-toggle {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 5;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(15, 37, 55, 0.05);
  gap: 12px;
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* iOS-style toggle checkbox slider */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--accent-blue);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.slider.round {
  border-radius: 20px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Bottom Right Map View dropdown matching mockup */
.map-floating-view-dropdown {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 5;
}

.view-dropdown-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(15, 37, 55, 0.05);
  transition: var(--transition-fast);
  outline: none;
}

.view-dropdown-btn:hover {
  background-color: var(--bg-surface-hover);
}

.dropdown-chevron {
  transition: transform 0.3s ease;
}

.view-dropdown-btn.active .dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu styling */
.view-dropdown-menu {
  position: absolute;
  bottom: 54px;
  right: 0;
  width: 150px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 24px rgba(15, 37, 55, 0.08);
  display: none;
  flex-direction: column;
  padding: 4px;
  z-index: 6;
}

.view-dropdown-menu.show {
  display: flex;
}

.menu-item {
  background: none;
  border: none;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.menu-item:hover,
.menu-item.active {
  background-color: var(--bg-surface-hover);
  color: var(--accent-blue);
}

/* Vertical Zoom Controls on the right side */
.map-floating-zoom-controls {
  position: absolute;
  bottom: 84px;
  right: 24px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zoom-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 37, 55, 0.05);
  transition: var(--transition-fast);
  outline: none;
}

.zoom-action-btn:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.locate-btn {
  margin-bottom: 4px; 
}

/* Map Container */
.map-container {
  flex: 1;
  z-index: 1;
  background-color: var(--bg-base);
  transition: filter 0.6s ease;
}

body.dark-theme .map-container {
  filter: none; 
}

/* Leaflet Custom Overrides */
.leaflet-container {
  background-color: var(--bg-base) !important;
  font-family: var(--font-family) !important;
}

.leaflet-control-zoom {
  display: none !important;
}

.leaflet-control-attribution {
  background: rgba(255,255,255,0.7) !important;
  color: var(--text-secondary) !important;
  font-size: 0.65rem !important;
}

/* -------------------------------------------------------------
 * 3D ISOMETRIC MARKERS & STANDING SIGNPOST LABELS
 * ------------------------------------------------------------- */
.custom-marker-patry,
.custom-marker-poi {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Wrapper */
.marker-3d-wrapper {
  position: relative;
  width: 90px;  
  height: 90px;
}

/* Ground shadow */
.marker-shadow-3d {
  position: absolute;
  bottom: 24px;  
  left: 28px;
  width: 34px;
  height: 12px;
  background: rgba(15, 37, 55, 0.12);
  border-radius: 50%;
  transform: rotate(-18deg) skewX(-20deg);
  filter: blur(1px);
  z-index: 1;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Vertical 3D Building models */
.marker-model-3d {
  position: absolute;
  bottom: 28px;  
  left: 23px;
  width: 44px;
  height: 58px;
  z-index: 2;
  transform-origin: bottom center;
  transition: var(--transition-smooth);
}

/* Standing Signpost labels matching mockup signs (Clubhouse, Yoga, Market) */
.marker-signpost-3d {
  position: absolute;
  bottom: -22px; 
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}

/* The vertical post line representing the road post */
.signpost-metal-pole {
  width: 3px;
  height: 24px;
  background-color: #516b80;
  box-shadow: 1px 0 2px rgba(0,0,0,0.15);
}

/* The white sign panel text capsule */
.signpost-text-board {
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(15, 37, 55, 0.06);
  line-height: 1.2;
  margin-top: -2px; 
  transition: var(--transition-smooth);
}

.signpost-text-board-sub {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-align: center;
  margin-top: 1px;
}

/* Hover effects */
.custom-marker-patry:hover .marker-model-3d,
.custom-marker-poi:hover .marker-model-3d {
  transform: translateY(-6px) scale(1.06);
}

.custom-marker-patry:hover .marker-shadow-3d,
.custom-marker-poi:hover .marker-shadow-3d {
  transform: rotate(-18deg) skewX(-20deg) scale(0.85);
  background: rgba(15, 37, 55, 0.18);
}

.custom-marker-patry:hover .signpost-text-board,
.custom-marker-poi:hover .signpost-text-board {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 142, 196, 0.08);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes signal-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(42, 157, 143, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(42, 157, 143, 0);
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: 45vh;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar.collapsed {
    margin-left: 0;
    height: 0;
    overflow: hidden;
  }

  .sidebar-toggle-btn {
    display: none; 
  }

  .map-floating-search-center {
    top: 12px;
    width: calc(100% - 24px);
    height: 40px;
  }
  
  .map-floating-user {
    display: none; 
  }
  
  .main-content {
    height: 55vh;
  }
}

/* -------------------------------------------------------------
 * ML PROPOSAL BLUEPRINT OVERLAY STYLES
 * ------------------------------------------------------------- */

/* Activation Button */
.blueprint-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 12px;
  background-color: transparent;
  border: 1.5px dashed var(--accent-blue);
  color: var(--accent-blue);
  border-radius: var(--border-radius-md);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.78rem;
  margin-top: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.blueprint-btn:hover {
  background-color: var(--bg-surface-hover);
  border-style: solid;
}

/* Modal Overlay Container */
.blueprint-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 37, 55, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none; /* Controlled via JS class */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.blueprint-modal-overlay.show {
  display: flex;
}

/* Modal Frame */
.blueprint-modal-container {
  width: 800px;
  max-width: 90%;
  height: 600px;
  max-height: 85%;
  background-color: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 50px rgba(15, 37, 55, 0.15);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme .blueprint-modal-container {
  background-color: #171d24;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Header */
.blueprint-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blueprint-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.blueprint-modal-header p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.blueprint-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  line-height: 1;
}

.blueprint-close-btn:hover {
  color: var(--accent-copper);
}

/* Body Layout */
.blueprint-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Navigation Tab Menu */
.blueprint-modal-nav {
  width: 200px;
  border-right: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #fafbfc;
  flex-shrink: 0;
}

body.dark-theme .blueprint-modal-nav {
  background-color: #11161a;
}

.blueprint-nav-item {
  background: none;
  border: none;
  text-align: left;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.blueprint-nav-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--accent-blue);
}

.blueprint-nav-item.active {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--accent-blue);
  box-shadow: var(--shadow-premium);
}

body.dark-theme .blueprint-nav-item.active {
  background-color: var(--bg-surface);
}

/* Viewport for panels */
.blueprint-modal-viewport {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background-color: #ffffff;
}

body.dark-theme .blueprint-modal-viewport {
  background-color: #171d24;
}

.blueprint-tab-pane {
  display: none;
  flex-direction: column;
  height: 100%;
}

.blueprint-tab-pane.active {
  display: flex;
}

.blueprint-tab-pane h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
}

/* ROI Calculator Widgets */
.roi-calculator-box {
  background-color: #fafbfc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 18px;
  margin-bottom: 16px;
}

body.dark-theme .roi-calculator-box {
  background-color: #222933;
}

.roi-calculator-box h4 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.roi-sliders-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.roi-slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roi-slider-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.roi-slider-group label strong {
  color: var(--accent-blue);
}

.roi-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
}

.roi-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 142, 196, 0.3);
}

.roi-output-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}

.roi-output-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  box-shadow: var(--shadow-premium);
}

body.dark-theme .roi-output-card {
  background-color: #171d24;
}

.roi-output-card.highlighted {
  border-color: var(--accent-blue);
  background-color: var(--bg-surface-hover);
}

body.dark-theme .roi-output-card.highlighted {
  background-color: rgba(0, 142, 196, 0.05);
}

.roi-output-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.roi-output-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
}

.roi-output-card.highlighted .roi-output-value {
  color: var(--accent-blue);
}

.value-loop-bullets {
  list-style: none;
  padding-left: 0;
}

.value-loop-bullets li {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 6px;
  position: relative;
  padding-left: 14px;
}

.value-loop-bullets li::before {
  content: "➔";
  color: var(--accent-blue);
  position: absolute;
  left: 0;
  font-size: 0.75rem;
}

/* Vector Pipeline Flowchart */
.pipeline-flowchart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: #fafbfc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px 16px;
  margin-bottom: 20px;
}

body.dark-theme .pipeline-flowchart {
  background-color: #222933;
}

.flow-block {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow-premium);
}

body.dark-theme .flow-block {
  background-color: #171d24;
}

.flow-step {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.flow-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.flow-arrow {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 1.2rem;
}

/* Database SQL DDL Blocks */
.schema-code-block {
  background-color: #1e252b;
  color: #abb2bf;
  padding: 16px;
  border-radius: var(--border-radius-lg);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,0.15);
  margin-bottom: 12px;
}

.schema-code-block code {
  font-family: inherit;
}

/* Future Mockups Demos Grid */
.mockups-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.demo-card-item {
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  background-color: #fafbfc;
}

body.dark-theme .demo-card-item {
  background-color: #222933;
}

.demo-card-item h5 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 6px;
}

/* Wallet Demo Widget */
.wallet-demo-widget {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
}

body.dark-theme .wallet-demo-widget {
  background-color: #171d24;
}

.wallet-badge-row {
  display: flex;
  margin-top: 4px;
}

