* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2196F3;
  --secondary: #0D47A1;
  --bg-light: #f5f5f5;
  --sidebar-width: 250px;
  --sidebar-collapsed: 60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-light);
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: relative;
  background: var(--secondary);
  width: var(--sidebar-width);
  transition: width 0.3s;
  color: white;
  padding: 1rem;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.toggle-btn {
  position: absolute;
  right: -40px;
  top: 10px;
  background: var(--secondary);
  width: 40px;
  height: 40px;
  border-radius: 0 4px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.menu-item {
  padding: 0.8rem;
  margin: 0.5rem 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.main-content {
  flex: 1;
  padding: 2rem;
}

.config-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.config-title {
  color: var(--secondary);
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
}

input[type="number"],
input[type="time"],
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.save-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.save-btn:hover {
  background: var(--secondary);
}

.system-view {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.tank-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.sliders-container {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.tank-visualization {
  flex: 1;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.tank-svg {
  width: 200px;
  height: 300px;
}

.water-level {
  transition: height 0.5s ease-in-out, y 0.5s ease-in-out;
}

.tank-stats {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--secondary);
}

.system-map {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.slider {
  margin: 2rem 0;
}

.noUi-vertical {
  height: 200px;
}

.noUi-pips {
  color: var(--secondary);
}

.slider-values {
  text-align: center;
  color: var(--secondary);
  font-weight: bold;
}

.noUi-connect {
  background: var(--primary);
}

.noUi-handle {
  border-radius: 50%;
  background: var(--primary);
  box-shadow: none;
  border: 2px solid white;
  cursor: pointer;
}

.noUi-handle:before,
.noUi-handle:after {
  display: none;
}