:root {
  color-scheme: dark;
}

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #f5f5f5;
}

.stat-box {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(15, 15, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

/* Sidebar-Layout: vertikale Box, links/rechts angedockt, vertikal zentriert */
.stat-box.layout-sidebar {
  top: 50%;
  transform: translateY(-50%);
  min-width: 200px;
}

.stat-box.layout-sidebar.pos-left {
  left: 28px;
}

.stat-box.layout-sidebar.pos-right {
  right: 28px;
}

.stat-box.layout-sidebar.has-map {
  min-width: 260px;
}

.stat-box.layout-sidebar #stat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Topbar-Layout: horizontale Leiste oben, kein Karten-Panel */
.stat-box.layout-topbar {
  top: 20px;
  padding: 10px 22px;
}

.stat-box.layout-topbar.align-left {
  left: 28px;
}

.stat-box.layout-topbar.align-center {
  left: 50%;
  transform: translateX(-50%);
}

.stat-box.layout-topbar.align-right {
  right: 28px;
}

.stat-box.layout-topbar #stat-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

.stat-box.layout-topbar .stat-row:not(:first-child) {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 18px;
}

.stat-box.layout-topbar .stat-label {
  display: none;
}

#map-wrap {
  width: 100%;
  height: 170px;
  border-radius: 10px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}

.leaflet-control-attribution {
  font-size: 9px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.stat-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.stat-label {
  opacity: 0.7;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: auto;
}

.stat-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat-row.status .stat-value {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-live {
  background: #33d17a;
  box-shadow: 0 0 6px #33d17a;
}

.dot-offline {
  background: #e5484d;
  box-shadow: 0 0 6px #e5484d;
}
