:root {
  --bg: #070a12;
  --panel: #10182a;
  --ink: #e7f2ff;
  --muted: #93a4c4;
  --line: #2a3c5e;
  --cyan: #3ee0ff;
  --arcade: #ff7a3c;
  --staub: #3ee0ff;
  --data: #3ddc97;
  --social: #c084fc;
  --tokens: #f5c451;
  --other: #7e8da8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(62, 224, 255, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", sans-serif;
}

header, main, .day-filter, .table-wrap, .status, footer {
  width: min(1180px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

header { padding-top: 28px; }

.heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
}

#snapshot {
  flex: none;
  margin-top: 6px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  padding: 8px 14px;
  font: 600 14px "Segoe UI", sans-serif;
  cursor: pointer;
}

#snapshot:disabled {
  opacity: 0.55;
  cursor: wait;
}

.snapshot-value {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  min-width: 140px;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  max-width: 860px;
}

.controls {
  display: flex;
  gap: 18px;
  margin: 18px 0 8px;
}

label {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

select {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  min-width: 140px;
}

main {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 22px;
  align-items: start;
  margin-top: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(62, 224, 255, 0.35);
  border-radius: 12px;
  padding: 12px;
  position: relative;
  min-height: 420px;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.legend article {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px 10px;
}

.swatch {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 3px;
}

.legend h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.legend p {
  margin: 3px 0 0;
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

form.day-filter {
  width: min(1180px, calc(100% - 48px));
  margin: 20px auto 12px;
  padding-left: 4px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th:first-child, td:first-child { text-align: left; }

th { color: var(--cyan); font-weight: 600; }

.status, footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

footer { padding-bottom: 32px; }

.empty {
  position: absolute;
  inset: 0;
  place-items: center;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.empty:not([hidden]) {
  display: grid;
}

.tip {
  position: fixed;
  z-index: 5;
  background: #0c1424;
  border: 1px solid var(--cyan);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.4;
  max-width: 280px;
}

@media (max-width: 860px) {
  main { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
}
