.realtime-theme .floor-plan-map-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #FFFFFF;
  font-family: 'Bio Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.realtime-theme .floor-plan-image-container {
  flex: 1;
  position: relative;
  overflow: hidden;
 
  background-color: #ffffff;

  background-image:
    radial-gradient(circle at 1px 1px, rgba(155, 54, 61, 0.08) 1px, transparent 0);

  background-size: 24px 24px;
  min-height: 0;
  user-select: none;
}

.realtime-theme .floor-plan-image-container.pattern-scales::before {
  opacity: 0.03;
}

.realtime-theme .floor-plan-image-container.cursor-default {
  cursor: default;
}

.realtime-theme .floor-plan-image-container.cursor-grab {
  cursor: grab;
}

.realtime-theme .floor-plan-image-container.cursor-grabbing {
  cursor: grabbing;
}

.realtime-theme .floor-plan-content {
  transform-origin: top left;
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.2s ease-out;
}

.realtime-theme .floor-plan-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.realtime-theme .floor-plan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.realtime-theme .person-marker {
  cursor: pointer;
  pointer-events: auto;
}

.realtime-theme .person-dot {
  transition: all 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.realtime-theme .person-marker:hover .person-dot {
  r: 8;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.realtime-theme .person-label-bg {
  transition: all 0.2s ease;
}

.realtime-theme .person-marker:hover .person-label-bg {
  fill: rgba(0, 0, 0, 0.95);
}

.realtime-theme .person-label-text {
  transition: all 0.2s ease;
}

.realtime-theme .sim-indicator {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.realtime-theme .person-marker:hover .sim-indicator {
  opacity: 1;
}

.realtime-theme .floor-plan-info-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #E2E8F0;
  backdrop-filter: blur(8px);
  z-index: 20;
  min-height: 48px;
  flex-shrink: 0;
  padding: 0 16px;
}

.realtime-theme .info-stats {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.realtime-theme .info-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.realtime-theme .loading-text {
  color: #E12424;
  font-weight: 700;
  animation: pulse 1.5s infinite;
  margin-left: 8px;
}

.realtime-theme .info-icon {
  font-size: 12px;
  font-weight: 700;
}

.realtime-theme .info-icon-red {
  color: #E12424;
}

.realtime-theme .info-icon-orange {
  color: #F59E0B;
}

.realtime-theme .info-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.realtime-theme .zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #E12424;
  border: 2px solid #E12424;
  border-radius: 6px;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  font-weight: 700;
}

.realtime-theme .zoom-btn:hover {
  background: #FFFFFF;
  color: #E12424;
  transform: scale(1.05);
}

.realtime-theme .zoom-btn:active {
  transform: scale(0.95);
}

.realtime-theme .zoom-btn:disabled {
  background: #9CA3AF;
  border-color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
}

.realtime-theme .zoom-level {
  padding: 6px 12px;
  background: #FFFFFF;
  border: 2px solid #E12424;
  border-radius: 6px;
  color: #E12424;
  font-size: 11px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  transition: all 0.2s ease;
}

.realtime-theme .zoom-level-clickable {
  cursor: pointer;
}

.realtime-theme .zoom-level:hover,
.realtime-theme .zoom-level-clickable:hover {
  background: #E12424;
  color: #FFFFFF;
}

.realtime-theme .floorplan-focus-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  background: #FFFFFF;
  border: 2px solid #E12424;
  border-radius: 6px;
  color: #E12424;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.realtime-theme .floorplan-focus-btn svg {
  width: 16px;
  height: 16px;
}

.realtime-theme .floorplan-focus-btn:hover {
  background: #E12424;
  border-color: #E12424;
  color: #FFFFFF;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(225, 36, 36, 0.3);
}

.realtime-theme .floorplan-focus-btn:active {
  transform: scale(0.95);
}

.realtime-theme .floorplan-focus-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(225, 36, 36, 0.3);
}

.realtime-theme .floorplan-focus-btn.is-active {
  background: #E12424;
  border-color: #E12424;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(225, 36, 36, 0.4);
}

.realtime-theme .floorplan-focus-btn.is-active:hover {
  background: #C41E1E;
  border-color: #C41E1E;
  color: #FFFFFF;
}

.realtime-theme .color-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 150ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.realtime-theme .color-toggle-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.realtime-theme .color-toggle-btn--active {
  color: #ffffff;
  background: #3B82F6;
  border-color: #3B82F6;
}

.realtime-theme .color-toggle-btn--active:hover {
  background: #2563EB;
  border-color: #2563EB;
}

.realtime-theme .floor-plan-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  color: #64748B;
}

.realtime-theme .loading-spinner {
  font-size: 16px;
  font-weight: 500;
  animation: pulse 2s ease-in-out infinite;
}

.realtime-theme .floor-plan-info-panel {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  gap: 0;
}

.realtime-theme .info-stats {
  gap: 10px;
  max-width: 60%;
  overflow: hidden;
}

.realtime-theme .info-stat {
  font-size: 10px;
  gap: 4px;
  flex-shrink: 0;
}

.realtime-theme .info-controls {
  gap: 4px;
  padding: 0;
  margin: 0;
  font-size: 10px;
  flex-shrink: 0;
}

.realtime-theme .zoom-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  font-size: 0;
}

.realtime-theme .zoom-btn svg {
  width: 12px;
  height: 12px;
}

.realtime-theme .zoom-level {
  padding: 0;
  min-width: 34px;
  height: 24px;
  line-height: 22px;
  font-size: 9px;
  border-radius: 4px;
}

.realtime-theme .floorplan-focus-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid #E12424;
  color: #E12424;
}

.realtime-theme .floorplan-focus-btn svg {
  width: 14px;
  height: 14px;
}

.realtime-theme .info-controls > div[aria-hidden="true"] {
  width: 1px;
  height: 18px;
  margin: 0;
  background: rgba(0, 0, 0, 0.25);
}

.realtime-theme .info-controls ul {
  gap: 8px;
}

.realtime-theme .info-controls li {
  font-size: 9px;
  gap: 4px;
  white-space: nowrap;
}

.realtime-theme .info-controls li span:first-child {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.realtime-theme .floor-plan-map-container {
  overflow: hidden;
}

@media (max-width: 768px) {
  .realtime-theme .floor-plan-info-panel {
    height: 32px;
    min-height: 32px;
  }

  .realtime-theme .info-stat {
    font-size: 9px;
  }

  .realtime-theme .zoom-btn,
  .realtime-theme .zoom-level,
  .realtime-theme .floorplan-focus-btn {
    width: 22px;
    height: 22px;
  }

  .realtime-theme .zoom-level {
    min-width: 30px;
    font-size: 8px;
  }
}

@media (max-width: 1024px) {
  .realtime-theme .info-stats {
    max-width: 65%;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .realtime-theme .info-stats {
    max-width: 100%;
    justify-content: center;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (max-width: 1024px) {
  .realtime-theme .floor-plan-info-panel {
    min-height: 44px;
  }
  
  .realtime-theme .info-stats {
    gap: 16px;
  }
  
  .realtime-theme .info-stat {
    font-size: 10px;
  }
  
  .realtime-theme .zoom-btn {
    width: 28px;
    height: 28px;
  }
  
  .realtime-theme .zoom-level {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 40px;
  }
}

@media (max-width: 768px) {
  .realtime-theme .floor-plan-info-panel {
    flex-direction: column;
    gap: 8px;
    min-height: auto;
  }
  
  .realtime-theme .info-stats {
    gap: 12px;
    justify-content: center;
  }
  
  .realtime-theme .info-controls {
    gap: 6px;
  }
  
}

@media (max-width: 480px) {
  .realtime-theme .info-stats {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  
  .realtime-theme .info-stat {
    font-size: 9px;
  }
  
  .realtime-theme .zoom-btn {
    width: 24px;
    height: 24px;
  }
  
  .realtime-theme .zoom-level {
    padding: 3px 6px;
    font-size: 9px;
    min-width: 35px;
  }
  
}

@media (prefers-contrast: high) {
  .realtime-theme .floor-plan-info-panel {
    border-top: 2px solid #000000;
    background: #FFFFFF;
  }
  
  .realtime-theme .zoom-btn {
    border-width: 3px;
  }
  
  .realtime-theme .zoom-level {
    border-width: 3px;
  }

  .realtime-theme .floorplan-focus-btn {
    border-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .realtime-theme .person-dot,
  .realtime-theme .person-label-bg,
  .realtime-theme .person-label-text,
  .realtime-theme .sim-indicator,
  .realtime-theme .zoom-btn,
  .realtime-theme .floorplan-focus-btn {
    transition: none;
  }
  
  .realtime-theme .loading-spinner {
    animation: none;
  }
}/* Fullscreen loading container */
.realtime-theme .improved-loading {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
}

/* Loading card */
.realtime-theme .loading-card {
  width: 420px;
  padding: 40px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

/* Spinner */
.realtime-theme .spinner-ring {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 5px solid #e5e7eb;
  border-top: 5px solid #2563eb;
  animation: spin 1s linear infinite;
}

.realtime-theme .loading-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.realtime-theme .loading-card p {
  margin: 8px 0 20px;
  font-size: 14px;
  color: #6b7280;
}

/* Animated progress shimmer */
.realtime-theme .loading-progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.realtime-theme .loading-progress-animated {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  animation: progressMove 1.2s ease-in-out infinite alternate;
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes progressMove {
  from { transform: translateX(-40%); }
  to { transform: translateX(140%); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}