* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #0f1115;
  color: #f5f7fa;
}

body {
  min-height: 100dvh;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  z-index: 1;
}

.leaflet-container {
  width: 100%;
  height: 100%;
}

.menu-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1200;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: rgba(23, 26, 33, 0.92);
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  max-width: 88vw;
  height: 100dvh;
  padding: 20px;
  background: rgba(23, 26, 33, 0.98);
  border-right: 1px solid #2a2f3a;
  overflow-y: auto;
  z-index: 1300;
  transform: translateX(0);
  transition: transform 0.25s ease;
  backdrop-filter: blur(6px);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar h1 {
  margin: 0;
  font-size: 24px;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #2a3140;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1250;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
}

.muted {
  color: #b9c0cc;
  font-size: 14px;
  line-height: 1.5;
}

label {
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
  font-weight: bold;
}

input[type="text"],
input[type="color"],
input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #394150;
  border-radius: 10px;
  background: #0e1014;
  color: white;
  outline: none;
}

input[type="color"] {
  height: 48px;
  padding: 6px;
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

button {
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: #2f80ed;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

button.danger {
  background: #d64545;
}

.small-btn {
  padding: 10px 12px;
}

.status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #202632;
  color: #d7deea;
  line-height: 1.5;
}

.note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #222a36;
  color: #d8dee9;
  font-size: 14px;
  line-height: 1.5;
}

.avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.default-preview {
  background: #2f80ed;
}

hr {
  border: none;
  border-top: 1px solid #2a2f3a;
  margin: 18px 0;
}

.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}

.custom-marker {
  background: transparent;
  border: none;
}

.marker-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .sidebar {
    width: 320px;
    max-width: 86vw;
  }
}
