/* Layout */

/* Sidebar */
.sidebar {
  width: 52px;
  background: var(--sb);
  border-right: 1px solid var(--sb-b);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 4px;
  flex-shrink: 0;
  z-index: 10;
}

.sb-logo {
  width: 34px;
  height: 34px;
  background: var(--ac);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.sb-logo svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--mu);
  transition: background 0.12s, color 0.12s;
  position: relative;
}

.sb-btn:hover {
  background: var(--ch);
  color: var(--tx);
}

.sb-btn.active {
  background: var(--alo);
  color: var(--ac);
}

.sb-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--re);
  border: 1.5px solid var(--sb);
  display: none;
}

.sb-sep {
  width: 28px;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.sb-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ac);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.dark-toggle {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--ch);
  cursor: pointer;
  color: var(--mu);
}

.dark-toggle:hover {
  color: var(--tx);
}

.dark-toggle svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Map */
.map-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

[data-theme=dark] .leaflet-tile {
  filter: brightness(0.75) saturate(0.7) hue-rotate(180deg) invert(1);
}

.ov {
  position: absolute;
  z-index: 400;
  pointer-events: none;
}

.ov > * {
  pointer-events: all;
}

/* Panel */
.panel {
  width: 320px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
}

.panel-head {
  padding: 14px 14px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-tabs {
  display: flex;
  gap: 0;
  margin-top: 10px;
}

.panel-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--mu);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  position: relative;
  font-family: var(--sans);
}

.panel-tab:hover {
  color: var(--tx);
}

.panel-tab.active {
  color: var(--ac);
  border-bottom-color: var(--ac);
}

.panel-tab-badge {
  position: absolute;
  top: -2px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--re);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.panel-footer {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  flex-shrink: 0;
  background: var(--panel);
}
