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

:root {
  --bg: #1e1e2e;
  --surface: #2a2a3c;
  --border: #3a3a50;
  --text: #cdd6f4;
  --text-dim: #8888aa;
  --accent: #89b4fa;
  --green: #22cc22;
  --red: #f38ba8;
  --btn-bg: #3a3a50;
  --btn-hover: #4a4a62;
}

html, body {
  height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

/* Toolbars */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.bottom-toolbar {
  border-bottom: none;
  border-top: 1px solid var(--border);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-group {
  margin-left: auto;
}

/* Inputs */
label {
  font-size: 13px;
  color: var(--text-dim);
  user-select: none;
}

select,
button {
  font-family: inherit;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

select:hover,
button:hover {
  background: var(--btn-hover);
}

select:focus,
button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button:active {
  transform: translateY(1px);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Activity LED */
.led {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.led-gray {
  background: #555;
}

.led-green {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

/* Chart area */
#chartContainer {
  flex: 1;
  min-height: 0;
  padding: 8px;
}

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

/* Status text */
#statusText {
  font-size: 12px;
  color: var(--text-dim);
}
