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

html, body {
  width: 100%;
  height: 100%;
  background: #131722;
  color: #b2b5be;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
#topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 40px;
  background: #1e222d;
  border-bottom: 1px solid #2a2e39;
  flex-shrink: 0;
}

#symbol-select {
  background: #2a2e39;
  color: #b2b5be;
  border: 1px solid #363a45;
  border-radius: 4px;
  padding: 3px 6px;
  height: 26px;
  cursor: pointer;
  outline: none;
  font-size: 13px;
}

#symbol-select:hover {
  border-color: #4c525e;
}

#tf-buttons {
  display: flex;
  gap: 2px;
}

.tf-btn {
  background: transparent;
  color: #787b86;
  border: none;
  border-radius: 3px;
  padding: 3px 7px;
  height: 26px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.1s, background 0.1s;
}

.tf-btn:hover {
  background: #2a2e39;
  color: #b2b5be;
}

.tf-btn.active {
  background: #2962ff;
  color: #fff;
}

#controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.sep {
  color: #363a45;
  user-select: none;
}

#vol-toggle {
  background: transparent;
  color: #787b86;
  border: 1px solid #363a45;
  border-radius: 3px;
  padding: 3px 8px;
  height: 26px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.1s, background 0.1s, border-color 0.1s;
}

#vol-toggle:hover {
  border-color: #4c525e;
  color: #b2b5be;
}

#vol-toggle.active {
  background: #2a2e39;
  border-color: #2962ff;
  color: #2962ff;
}

#date-input {
  background: #2a2e39;
  color: #b2b5be;
  border: 1px solid #363a45;
  border-radius: 4px;
  padding: 3px 6px;
  height: 26px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
}

#date-input:hover {
  border-color: #4c525e;
}

#date-input:focus {
  border-color: #2962ff;
}

#go-btn {
  background: #2962ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 3px 10px;
  height: 26px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.1s;
}

#go-btn:hover {
  background: #1e53e5;
}

/* ── Chart ── */
#chart-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Status bar ── */
#statusbar {
  height: 22px;
  line-height: 22px;
  padding: 0 10px;
  background: #1e222d;
  border-top: 1px solid #2a2e39;
  color: #ef5350;
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
