:root,
html[data-theme='dark'] {
  --bg: #14171c;
  --panel: #1e232b;
  --border: #2c333d;
  --text: #d6dae0;
  --muted: #8a94a0;
  --accent: #4f9dde;
  --input-bg: #12161b;
  --sel-bg: #1a2735;
}

html[data-theme='light'] {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --border: #d4dae0;
  --text: #1b2028;
  --muted: #6a747f;
  --accent: #2b7fc4;
  --input-bg: #eef1f4;
  --sel-bg: #dceaf6;
}

html[data-theme='solarized'] {
  --bg: #002b36;
  --panel: #073642;
  --border: #0d4552;
  --text: #eee8d5;
  --muted: #93a1a1;
  --accent: #268bd2;
  --input-bg: #052832;
  --sel-bg: #0a4150;
}

html[data-theme='highcontrast'] {
  --bg: #000000;
  --panel: #0a0a0a;
  --border: #444444;
  --text: #ffffff;
  --muted: #bbbbbb;
  --accent: #ffcc00;
  --input-bg: #111111;
  --sel-bg: #222222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

aside {
  width: 380px;
  min-width: 300px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--panel);
}

header.side-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

header.side-head h1 {
  font-size: 15px;
  margin: 0 0 8px;
}

.controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.controls input,
.controls select,
.controls button {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
}

.controls input[type='search'] {
  flex: 1;
  min-width: 120px;
}

button {
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

.run-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.run-item {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 7px 9px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 12px;
}

.run-item:hover {
  border-color: var(--accent);
}

.run-item.selected {
  border-color: var(--accent);
  background: var(--sel-bg);
}

.run-item .title {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.run-item .badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #2c333d;
  color: var(--muted);
  white-space: nowrap;
}

.run-item .meta {
  color: var(--muted);
  margin-top: 3px;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toolbar {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar label {
  font-size: 12px;
  color: var(--muted);
}

.chart-wrap {
  flex: 1;
  padding: 14px;
  position: relative;
  min-height: 0;
}

.status {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

table.summary {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

table.summary th,
table.summary td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  text-align: right;
}

table.summary th:first-child,
table.summary td:first-child {
  text-align: left;
}

table.summary th {
  background: var(--input-bg);
  color: var(--muted);
}

.summary-wrap {
  max-height: 220px;
  overflow: auto;
  padding: 0 14px 14px;
}
