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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f7fa;
  color: #242428;
  min-height: 100vh;
  padding: 24px;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  color: #242428;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

#drop-zone {
  border: 2px dashed #e8e8ed;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
  margin-bottom: 24px;
}

#drop-zone.drag-over {
  border-color: #FC5200;
  background: #fff5f0;
}

#drop-zone p {
  color: #6d6d78;
  font-size: 14px;
  margin-top: 8px;
}

#drop-zone .icon {
  font-size: 36px;
  margin-bottom: 8px;
}

#file-input { display: none; }

.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background: #FC5200;
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.btn:hover { background: #e04a00; }

#stats {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 10px;
  padding: 16px 20px;
}

.stat-card .label {
  font-size: 11px;
  color: #6d6d78;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 22px;
  font-weight: 700;
  color: #242428;
}

.stat-card .unit {
  font-size: 12px;
  color: #6d6d78;
  margin-left: 4px;
}

#range-controls {
  display: none;
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: none;
  flex-direction: column;
  gap: 14px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-label {
  font-size: 12px;
  font-weight: 600;
  width: 28px;
  flex-shrink: 0;
}

.range-track {
  position: relative;
  flex: 1;
  height: 6px;
  background: #f0f0f4;
  border-radius: 3px;
}

.range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0.5;
  /* left/width set dynamically from JS */
}

.range-track input[type=range] {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.range-pct {
  font-size: 12px;
  color: #6d6d78;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

#chart-container {
  display: none;
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 12px;
  padding: 16px;
}

#chart { width: 100%; height: 420px; }

#export-bar {
  display: none;
  margin-top: 16px;
  text-align: right;
}

.btn-export {
  background: #242428;
}

.btn-export:hover {
  background: #3a3a40;
}

#error-msg {
  display: none;
  background: #fff5f0;
  border: 1px solid #FC5200;
  color: #c94000;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
}
