/* Sidebar panel styling */
#sidebar-panel {
  display: flex;
  flex-direction: column;
  background: #f7f7fa;
  padding: 24px 18px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.07);
  min-width: 270px;
  max-width: 340px;
  gap: 28px;
  z-index: 2;
  position: relative;
  transition: width 0.2s, min-width 0.2s, max-width 0.2s;
}

/* Panel cards */
.panel-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px 14px 14px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.panel-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1em;
  color: #2a2a2a;
  letter-spacing: 0.5px;
}

#control-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98em;
}
input[type="range"] {
  flex: 1 1 0;
  accent-color: #3a7bd5;
  margin: 0 8px;
}
.form-input {
  width: 60px;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid #bbb;
  font-size: 1em;
}

.add-charge-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel-btn {
  margin-top: 8px;
  padding: 6px 0;
  border: none;
  border-radius: 5px;
  background: #3a7bd5;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.panel-btn:hover {
  background: #285a99;
}

#collapse-sidebar-btn {
  position: absolute;
  top: 10px;
  right: -14px;
  z-index: 3;
  width: 24px;
  height: 32px;
  border-radius: 0 6px 6px 0;
  border: none;
  background: #3a7bd5;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 1px 0 6px rgba(0,0,0,0.07);
  transition: background 0.15s;
}
#collapse-sidebar-btn:hover {
  background: #285a99;
}

#sidebar-panel.collapsed {
  min-width: 24px !important;
  max-width: 24px !important;
  width: 24px !important;
  padding: 0;
  overflow: visible;
  flex-basis: 24px;
}
#sidebar-panel.collapsed > *:not(#collapse-sidebar-btn) {
  display: none !important;
}

#threejs-canvas {
  flex: 1 1 0;
  height: 100vh;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
}
