:root {
  --bg: #faf9f6;
  --bg-card: #fff;
  --bg-dark: #1c1917;
  --text: #1c1917;
  --text-muted: #78716c;
  --accent: #d97706;
  --accent-dim: rgba(217, 119, 6, 0.1);
  --border: #e7e5e4;
  --row-hover: #fef3c7;
  --font-display: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08);
}

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

.dash-body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.dash-header {
  background: var(--bg-dark);
  color: #fafaf9;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.dash-logo {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: #fafaf9;
  text-decoration: none;
}
.dash-logo:hover { color: var(--accent); }
.dash-sep { color: #57534e; }
.dash-title { color: #a8a29e; }
.dash-nav-link {
  color: #a8a29e;
  text-decoration: none;
  transition: color 0.15s ease;
}
.dash-nav-link:hover { color: var(--accent); }
.dash-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.dash-badge {
  background: var(--accent);
  color: var(--bg-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.dash-updated { color: #78716c; }

/* ── Main layout ── */
.dash-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ── Summary cards ── */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.summary-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d6d3d1;
}
.summary-card.accent {
  border-left: 3px solid var(--accent);
}
.summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.summary-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.summary-unit {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Table ── */
.dash-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 32px;
}
.table-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.table-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.table-scroll { overflow-x: auto; }
.well-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.well-table thead {
  background: #f5f5f4;
}
.well-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.well-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f5f5f4;
  white-space: nowrap;
}
.well-row {
  cursor: pointer;
  transition: background 0.12s ease;
}
.well-row:hover {
  background: var(--row-hover);
}
.col-rank {
  width: 36px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
}
.col-num {
  text-align: right !important;
}
.col-num.mono, .col-api.mono, .col-date.mono, .mono {
  font-family: var(--font-mono);
  font-size: 12px;
}
.col-name { font-weight: 600; }

/* ── Empty state ── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Well detail ── */
.well-header-section {
  margin-bottom: 24px;
}
.well-detail-name {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.well-detail-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.well-detail-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Chart ── */
.chart-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 32px;
}
.chart-container {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}
.chart-container canvas {
  display: block;
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .dash-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0;
  }
  .dash-header { height: auto; padding: 0 16px; }
  .dash-main { padding: 20px 16px 40px; }
  .summary-value { font-size: 20px; }
  .well-detail-name { font-size: 20px; }
}
