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

* { box-sizing: border-box; }

body { margin: 0; }

.app {
  min-height: 100vh;
  background: #FFFFFF;
  color: #0A0A0A;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  padding: 32px 20px 64px;
  -webkit-user-select: none;
  user-select: none;
}
.shell { max-width: 860px; margin: 0 auto; }

.header { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 6px; }
.title-group { display: flex; align-items: center; gap: 10px; }
.wordmark {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: #0A0A0A;
}
.wordmark span { color: #B8720A; }
.credit {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 16px;
  color: #0A0A0A;
  opacity: 0.5;
  margin-left: 34px;
}
.gauge-icon, .upload-icon { display: flex; }

.tagline { color: #55575C; font-size: 13px; font-weight: 600; margin: 8px 0 28px; }

.dropzone {
  border: 2px dashed #0A0A0A;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  background: #FFFFFF;
}
.dropzone:hover, .dropzone.drag { background: #FFF6E9; }
.dropzone-icon { color: #0A0A0A; margin-bottom: 8px; justify-content: center; }
.dropzone-text { font-size: 14px; font-weight: 700; color: #0A0A0A; }
.dropzone-sub { font-size: 12px; font-weight: 500; color: #6B6E76; margin-top: 4px; }
.dropzone input { display: none; }

.master-card {
  margin-top: 28px;
  background: #fff;
  border: 2px solid #0A0A0A;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 6px 6px 0 #0A0A0A;
}
.master-main { flex: 1; min-width: 200px; }
.master-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #6B6E76;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.master-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 48px;
  font-weight: 800;
  color: #B8720A;
  line-height: 1;
}
.master-value small { font-size: 18px; color: #0A0A0A; opacity: 0.4; margin-left: 6px; font-weight: 700; }
.master-sub { font-size: 12px; font-weight: 600; color: #6B6E76; margin-top: 8px; }
.master-chips { display: flex; gap: 16px; flex-wrap: wrap; }
.chip {
  background: #fff;
  border: 2px solid #0A0A0A;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 96px;
}
.chip-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6B6E76; margin-bottom: 4px; }
.chip-value { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 18px; font-weight: 800; }
.chip-unit { font-size: 11px; color: #6B6E76; }

.tracklist { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.track-card {
  background: #fff;
  border: 2px solid #0A0A0A;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 4px 4px 0 #0A0A0A;
}
.track-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.track-name { font-size: 14px; font-weight: 700; color: #0A0A0A; }
.track-meta { font-size: 11px; font-weight: 600; color: #6B6E76; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.track-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { background: none; border: none; color: #6B6E76; cursor: pointer; padding: 4px; display: flex; }
.icon-btn:hover { color: #D1232B; }

.status-row { display: flex; align-items: center; gap: 8px; color: #55575C; font-size: 13px; font-weight: 600; padding: 8px 0; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-row { display: flex; align-items: center; gap: 8px; color: #D1232B; font-size: 13px; font-weight: 700; padding: 8px 0; }

.stats-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #55575C; margin-bottom: 3px; }
.stat-value { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 800; font-size: 24px; line-height: 1; }
.stat-unit { font-size: 11px; font-weight: 700; color: #6B6E76; margin-left: 5px; }

.spark-wrap { margin-top: 16px; }
.spark-caption { font-size: 10px; font-weight: 700; color: #6B6E76; display: flex; gap: 12px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }
.sparkline { width: 100%; height: 44px; display: block; }

.empty-hint { margin-top: 40px; text-align: center; color: #6B6E76; font-weight: 600; font-size: 13px; }
.empty-hint.hidden { display: none; }

.anomaly-banner {
  border: 2px solid #D1232B;
  background: #FFF1F1;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 20px;
  box-shadow: 5px 5px 0 #D1232B;
}
.anomaly-title {
  font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em;
  color: #D1232B; display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.anomaly-item { font-size: 13px; font-weight: 600; color: #0A0A0A; padding: 8px 0; }
.anomaly-item + .anomaly-item { border-top: 1.5px solid rgba(209,35,43,0.25); }
.anomaly-item b { font-weight: 800; }
.anomaly-sub { font-size: 11px; font-weight: 600; color: #8a3a3d; margin-top: 2px; }

.warn-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800; color: #D1232B; background: #FFF1F1;
  border: 1.5px solid #D1232B; border-radius: 6px; padding: 2px 7px;
  margin-left: 8px; text-transform: uppercase; letter-spacing: 0.03em; vertical-align: middle;
}

.toolbar { display: flex; justify-content: flex-end; margin-top: 10px; }
.text-btn { background: none; border: none; color: #6B6E76; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.text-btn:hover { color: #D1232B; }
