/* BetterBrain Trends Dashboard — Symetrics dark + Roboto Mono + #46bdc6 accent */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #0d0d0d;
  --bg-card: #1a1a1a;
  --bg-elevated: #242424;
  --text: #FFFFFF;
  --text-muted: #999999;
  --accent: #46bdc6;
  --accent-soft: rgba(70, 189, 198, 0.15);
  --border: #2a2a2a;
  --hover: #2a2a2a;
}

* { box-sizing: border-box; }

body {
  font-family: 'Roboto Mono', monospace, ui-monospace, Menlo, Monaco, "Courier New";
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

h1 {
  font-family: 'Roboto Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.subtitle {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

#reload-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  transition: opacity 0.15s;
}
#reload-btn:hover { opacity: 0.85; }

.controls {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 22px 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group label {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.control-group select,
.control-group input[type="date"] {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
}
.control-group select:focus,
.control-group input[type="date"]:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.control-group button {
  padding: 7px 14px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.control-group button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.control-group button:hover { opacity: 0.85; }

.hint {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

section {
  padding: 28px 40px;
}

.chart-section,
.related-section,
.geo-section {
  background: var(--bg-card);
  margin: 22px 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 28px;
}

h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 span {
  color: var(--accent);
  font-weight: 700;
}

.section-note {
  margin: 0 0 20px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}

.chart-wrapper {
  position: relative;
  height: 380px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.related-card h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: 'Roboto Mono', monospace;
}

th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

th {
  font-weight: 700;
  background: var(--bg-elevated);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

td:last-child, th:last-child { text-align: right; }

td a { color: var(--accent); text-decoration: none; }
td a:hover { text-decoration: underline; }

.geo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.geo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: 3px;
  font-size: 12px;
  border-left: 2px solid var(--accent);
}

.geo-row .bar {
  display: inline-block;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
  margin-right: 10px;
  vertical-align: middle;
}

.geo-row .geo-val {
  color: var(--accent);
  font-weight: 700;
}

footer {
  padding: 30px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  border-top: 1px solid var(--border);
  margin-top: 30px;
  background: var(--bg-card);
}

footer p { margin: 4px 0; }
footer .server-info { font-size: 10px; }

/* Chart.js dark theme overrides via wrapper */
.chart-wrapper canvas {
  background: transparent;
}
