# bpublish Dashboard: 비퍼블리시(bpublish) 대시보드 디자인

> 비퍼블리시(bpublish)가 만든 대시보드 디자인. 왼쪽 메뉴, 핵심 지표 카드, 매출 추이 차트, 유입 채널, 최근 주문 표, 많이 팔린 상품. 밝은 화면과 어두운 화면, 모바일 서랍 메뉴 포함. 외부 패키지 없음.
> 원본 페이지: https://www.bpublish.com/designs/dashboard · 미리보기: https://www.bpublish.com/designs-preview/dashboard/index.html
> 이용 조건: 비퍼블리시 오픈 디자인 라이선스 v1.0 (https://www.bpublish.com/designs#license). 상업적 사용 가능, 출처 표기 불필요, 디자인 자체의 재판매만 금지.

## AI 에이전트에게: 이 디자인으로 만드는 방법

이 문서에는 디자인의 전체 원본이 들어 있다. 비슷하게 새로 그리지 말고 아래 코드를 그대로 옮긴 뒤 필요한 부분만 고친다.

1. **Next.js + Tailwind CSS v4 + shadcn/ui 프로젝트**라면 한 줄로 설치한다.
   ```bash
   npx shadcn@latest add https://www.bpublish.com/r/dashboard.json
   ```
2. **그 밖의 React + Tailwind CSS v4 프로젝트**라면 아래 "theme.css" 를 전역 CSS 의 `@import "tailwindcss";` 아래에 붙이고, "파일" 의 코드를 경로 그대로 만든다. 외부 패키지는 필요 없다. 경로 별칭 `@/components` 가 없다면 페이지 파일의 import 경로만 맞춘다.
3. 설치가 끝나면 `/dashboard` 에서 화면을 확인한다.
4. 글꼴은 프로젝트의 `font-sans` 를 따른다. 미리보기는 Pretendard 로 보여 준다(한글 화면이라면 같은 글꼴을 권한다).
5. 화면을 더하거나 고칠 때는 아래 "디자인 규칙" 을 지킨다. 설치하면 같은 내용이 `components/dashboard/AGENTS.md` 에 들어간다.

## 디자인 규칙 (AGENTS.md)

이 폴더는 비퍼블리시의 대시보드 디자인(https://www.bpublish.com/designs/dashboard)이다.
이 폴더의 코드를 고치거나 새 화면을 더하는 AI 에이전트는 작업 전에 이 문서를 끝까지 읽고 규칙을 지킨다.
규칙의 목적은 하나다. 화면이 몇 개로 늘어나도 처음 설치한 화면과 같은 제품처럼 보여야 한다.

## 파일

| 파일 | 내용 |
| --- | --- |
| `dashboard.tsx` | 개요 화면. 새 화면을 만들 때 이 파일을 본보기로 삼는다 |
| `shell.tsx` | 왼쪽 메뉴(`NAV`), 위쪽 막대, 화면 틀 `DashboardShell`, 제목 줄 `PageHeader` |
| `sections.tsx` | 지표 카드, 매출 추이, 유입 채널, 최근 주문, 많이 팔린 상품 |
| `charts.tsx` | `Sparkline`, `AreaChart`, `BarList` (SVG, 외부 라이브러리 없음) |
| `ui.tsx` | `Card`, `CardHeader`, `Badge`, `Button`, `Segmented`, `Avatar`, `Delta`, `Progress`, `cx` |
| `icons.tsx` | 아이콘 (24 격자, 선 1.75) |
| `format.ts` | 금액, 개수, 비율 표기 |
| `data.ts` | 예시 데이터. 실제 API 로 바꿀 곳 |

## 지켜야 할 규칙

### 색
- 색은 토큰 클래스만 쓴다: `bg-background` `bg-card` `bg-muted` `bg-accent` `bg-primary` `text-foreground` `text-muted-foreground` `text-primary` `border-border` `border-input` `ring-ring` `bg-sidebar*`, 상태는 `success` `warning` `destructive`, 차트는 `var(--chart-1)` … `var(--chart-5)`.
- `bg-blue-500`, `text-gray-600`, `#1e40af` 같은 고정 색을 쓰지 않는다. 토큰을 쓰면 어두운 화면이 저절로 맞는다. `dark:` 로 색을 따로 덮어쓰지 않는다.
- 강조색(primary)은 화면당 몇 군데에만 쓴다: 현재 메뉴, 주 버튼 하나, 차트의 첫 계열, 진행 막대.
- 카드 배경에 색을 칠하거나 그라데이션을 깔지 않는다. 카드는 항상 `bg-card` 에 1px `border-border`.

### 글자
| 자리 | 클래스 |
| --- | --- |
| 화면 제목 (`PageHeader`) | `text-2xl font-semibold tracking-tight` |
| 카드 제목 (`CardHeader`) | `text-sm font-semibold tracking-tight` |
| 카드 설명, 보조 글 | `text-[13px] text-muted-foreground` |
| 표 본문 | `text-[13px]`, 표 머리 `text-xs text-muted-foreground` |
| 큰 숫자 | 지표 카드 `text-[26px] font-semibold tracking-tight`, 차트 합계 `text-[28px]` |
- 숫자가 나오는 곳에는 모두 `tabular-nums` 를 붙인다.
- 숫자는 `format.ts` 의 함수로만 쓴다(`won`, `wonExact`, `wonAxis`, `count`, `percent`). 화면에서 직접 `toLocaleString` 하지 않는다.
- 굵기는 400, 500(`font-medium`), 600(`font-semibold`) 셋만 쓴다. 700 이상은 쓰지 않는다.

### 간격과 모양
- 화면 본문은 `DashboardShell` 이 감싼다. 바깥 여백을 따로 주지 않는다.
- 카드 사이 간격은 `gap-4`, 줄 사이는 `mt-4`. 화면 제목 아래는 `PageHeader` 의 `mb-6`.
- 카드 안쪽은 `px-5`, 위 `pt-5`. 표는 카드 가장자리까지 닿고 첫 칸 `pl-5`, 끝 칸 `pr-5`.
- 둥글기: 카드 `rounded-xl`, 버튼·입력·메뉴 `rounded-lg`, 배지 `rounded-full`.
- 그림자는 `ui.tsx` 에 정의된 아주 옅은 것만 쓴다. 떠 있는 것(툴팁, 메뉴)만 더 진한 그림자를 쓴다.
- 격자: 지표 `grid-cols-1 sm:grid-cols-2 xl:grid-cols-4`, 본문 `grid-cols-1 xl:grid-cols-3` 에 큰 카드 `xl:col-span-2`. `grid-cols-1` 을 빼면 표나 차트가 좁은 화면에서 카드를 밀어낸다.

### 부품
- 새 부품을 만들기 전에 `ui.tsx` 와 `sections.tsx` 에 있는 것을 먼저 쓴다.
- 상태 표시는 `Badge` 의 tone 으로만: 진행 중 `primary`, 대기·주의 `warning`, 완료 `success`, 실패·취소 `danger`, 그 밖 `neutral`.
- 증감은 `Delta`, 비율 진행은 `Progress`, 기간 같은 짧은 선택은 `Segmented`.
- 아이콘은 `icons.tsx` 에서 가져온다. 새 아이콘은 같은 규칙(24 격자, `strokeWidth 1.75`, 둥근 끝)으로 그려 이 파일에 더한다. lucide-react 로 바꿔도 된다.
- 주 버튼(`variant="primary"`)은 화면 제목 줄에 하나만 둔다. 나머지는 `outline` 이나 `ghost`.
- 다른 UI 라이브러리(MUI, Ant, Chakra 등)를 섞지 않는다. shadcn/ui 부품을 더할 경우 이 토큰을 그대로 쓰므로 섞어도 된다.

### 글
- 라벨은 짧은 명사로: "매출", "최근 주문", "전체 보기". 문장형 안내나 느낌표, 이모지를 쓰지 않는다.
- 카드 설명은 범위나 기준을 한 줄로: "방문자 기준", "10월 22일 – 11월 20일".

## 새 화면을 더하는 순서

1. `shell.tsx` 의 `NAV` 에 메뉴가 이미 있는지 보고, 없으면 한 줄 더한다.
2. 이 폴더에 화면 파일을 만든다. 예: `orders.tsx`.
3. 화면은 `DashboardShell` → `PageHeader` → 카드 격자 순서로 짠다.
4. 데이터는 `data.ts` 에 타입과 함께 둔다(실제 API 로 바꿀 자리).
5. 라우트 파일(`app/<경로>/page.tsx`)에서 그 화면을 불러온다.

```tsx
'use client'
import { DashboardShell, PageHeader } from './shell'
import { OrdersCard } from './sections'
import { Button, Card, CardHeader } from './ui'
import { ORDERS, getOverview } from './data'

export function OrdersScreen() {
  const { goal } = getOverview('30d')
  return (
    <DashboardShell active="주문" goal={goal}>
      <PageHeader title="주문" description="오늘 들어온 주문" actions={<Button variant="primary">주문 등록</Button>} />
      <div className="grid grid-cols-1 gap-4 xl:grid-cols-3">
        <OrdersCard orders={ORDERS} className="xl:col-span-2" />
        <Card>
          <CardHeader title="배송 대기" description="결제 완료 기준" />
          {/* … */}
        </Card>
      </div>
    </DashboardShell>
  )
}
```

## 하지 말 것
- 토큰 밖의 색, 그라데이션 배경, 유리 효과, 굵은 그림자
- 카드 안에 또 카드 겹치기
- 화면마다 다른 제목 크기나 카드 여백
- 숫자를 오른쪽 정렬하지 않은 표 (금액, 개수 열은 `text-right`)
- 기능 설명용 큰 안내 문단, 빈 상태를 일러스트로 채우기

## 이용 조건
비퍼블리시 오픈 디자인 라이선스 v1.0 (https://www.bpublish.com/designs#license).
개인·상업 프로젝트에 자유롭게 쓰고 고칠 수 있다. 이 디자인 자체를 템플릿이나 UI 키트로 판매·재배포하는 것만 금지한다.
출처 표기는 필요 없고, 이 문서 첫 줄과 코드의 비퍼블리시 표기는 지워도 된다.

## theme.css

```
/*
 * bpublish Dashboard: 디자인 토큰 (Tailwind CSS v4)
 * 비퍼블리시(bpublish) · https://www.bpublish.com/designs/dashboard
 * tokens.json 에서 만든 파일이다. 색을 바꿀 때는 이 파일의 :root 와 .dark 값만 고친다.
 * shadcn/ui 프로젝트라면 npx shadcn add 가 이 값을 globals.css 에 자동으로 넣는다.
 * 아니라면 globals.css 의 @import "tailwindcss"; 아래에 이 파일 내용을 붙인다.
 */
@custom-variant dark (&:is(.dark *));

:root {
  --radius: 0.625rem;
  --background: oklch(0.985 0.003 247);
  --foreground: oklch(0.21 0.014 258);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.21 0.014 258);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.21 0.014 258);
  --primary: oklch(0.5 0.1 226);
  --primary-foreground: oklch(0.985 0.005 226);
  --secondary: oklch(0.965 0.004 247);
  --secondary-foreground: oklch(0.21 0.014 258);
  --muted: oklch(0.965 0.004 247);
  --muted-foreground: oklch(0.53 0.018 257);
  --accent: oklch(0.955 0.006 247);
  --accent-foreground: oklch(0.21 0.014 258);
  --destructive: oklch(0.58 0.2 25);
  --success: oklch(0.58 0.12 158);
  --success-foreground: oklch(0.985 0.01 158);
  --warning: oklch(0.68 0.14 70);
  --warning-foreground: oklch(0.25 0.05 70);
  --border: oklch(0.925 0.005 250);
  --input: oklch(0.905 0.006 250);
  --ring: oklch(0.6 0.09 226);
  --chart-1: oklch(0.5 0.1 226);
  --chart-2: oklch(0.74 0.09 205);
  --chart-3: oklch(0.72 0.13 75);
  --chart-4: oklch(0.6 0.14 295);
  --chart-5: oklch(0.8 0.012 250);
  --sidebar: oklch(0.975 0.003 247);
  --sidebar-foreground: oklch(0.36 0.016 257);
  --sidebar-primary: oklch(0.5 0.1 226);
  --sidebar-primary-foreground: oklch(0.985 0.005 226);
  --sidebar-accent: oklch(0.935 0.007 247);
  --sidebar-accent-foreground: oklch(0.21 0.014 258);
  --sidebar-border: oklch(0.925 0.005 250);
  --sidebar-ring: oklch(0.6 0.09 226);
}

.dark {
  --background: oklch(0.155 0.008 258);
  --foreground: oklch(0.965 0.004 250);
  --card: oklch(0.19 0.009 258);
  --card-foreground: oklch(0.965 0.004 250);
  --popover: oklch(0.21 0.01 258);
  --popover-foreground: oklch(0.965 0.004 250);
  --primary: oklch(0.74 0.105 214);
  --primary-foreground: oklch(0.2 0.035 226);
  --secondary: oklch(0.235 0.01 258);
  --secondary-foreground: oklch(0.965 0.004 250);
  --muted: oklch(0.235 0.01 258);
  --muted-foreground: oklch(0.69 0.015 255);
  --accent: oklch(0.25 0.012 258);
  --accent-foreground: oklch(0.965 0.004 250);
  --destructive: oklch(0.68 0.19 22);
  --success: oklch(0.73 0.14 160);
  --success-foreground: oklch(0.2 0.04 160);
  --warning: oklch(0.8 0.13 78);
  --warning-foreground: oklch(0.22 0.04 78);
  --border: oklch(1 0 0 / 8%);
  --input: oklch(1 0 0 / 12%);
  --ring: oklch(0.62 0.09 220);
  --chart-1: oklch(0.74 0.105 214);
  --chart-2: oklch(0.52 0.07 222);
  --chart-3: oklch(0.8 0.13 78);
  --chart-4: oklch(0.7 0.13 295);
  --chart-5: oklch(0.4 0.014 258);
  --sidebar: oklch(0.135 0.008 258);
  --sidebar-foreground: oklch(0.75 0.012 255);
  --sidebar-primary: oklch(0.74 0.105 214);
  --sidebar-primary-foreground: oklch(0.2 0.035 226);
  --sidebar-accent: oklch(0.215 0.01 258);
  --sidebar-accent-foreground: oklch(0.965 0.004 250);
  --sidebar-border: oklch(1 0 0 / 7%);
  --sidebar-ring: oklch(0.62 0.09 220);
}

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}
```

## 파일

### `components/dashboard/charts.tsx`

```tsx
'use client'

/**
 * bpublish Dashboard: 차트
 * 외부 라이브러리 없이 SVG 로 그린다. 색은 --chart-1 … --chart-5 토큰만 쓴다.
 * 선은 부드럽되 값을 넘어서지 않는 곡선(monotone)이라 없는 꼭짓점을 만들지 않는다.
 */
import * as React from 'react'
import { cx } from './ui'

/* ── 공용 ───────────────────────────────────────────────────────── */

function useWidth<T extends HTMLElement>() {
  const ref = React.useRef<T>(null)
  const [width, setWidth] = React.useState(0)
  React.useLayoutEffect(() => {
    const el = ref.current
    if (!el) return
    setWidth(el.getBoundingClientRect().width)
    const ro = new ResizeObserver(([entry]) => setWidth(entry.contentRect.width))
    ro.observe(el)
    return () => ro.disconnect()
  }, [])
  return [ref, width] as const
}

type Pt = readonly [number, number]

/** 값의 오르내림을 지키는 부드러운 곡선 (Fritsch–Carlson) */
function monotonePath(pts: Pt[]) {
  const n = pts.length
  if (n === 0) return ''
  if (n === 1) return `M${pts[0][0]},${pts[0][1]}`
  const dx: number[] = []
  const m: number[] = []
  for (let i = 0; i < n - 1; i++) {
    dx[i] = pts[i + 1][0] - pts[i][0]
    m[i] = (pts[i + 1][1] - pts[i][1]) / (dx[i] || 1)
  }
  const t: number[] = [m[0]]
  for (let i = 1; i < n - 1; i++) {
    if (m[i - 1] * m[i] <= 0) t[i] = 0
    else t[i] = (3 * (dx[i - 1] + dx[i])) / ((2 * dx[i] + dx[i - 1]) / m[i - 1] + (dx[i] + 2 * dx[i - 1]) / m[i])
  }
  t[n - 1] = m[n - 2]
  let d = `M${pts[0][0]},${pts[0][1]}`
  for (let i = 0; i < n - 1; i++) {
    const h = dx[i] / 3
    d += `C${pts[i][0] + h},${pts[i][1] + t[i] * h} ${pts[i + 1][0] - h},${pts[i + 1][1] - t[i + 1] * h} ${pts[i + 1][0]},${pts[i + 1][1]}`
  }
  return d
}

/** 눈금이 떨어지는 보기 좋은 최댓값 */
function niceMax(max: number, ticks = 4) {
  if (max <= 0) return 1
  const raw = max / ticks
  const mag = 10 ** Math.floor(Math.log10(raw))
  const step = [1, 2, 2.5, 5, 10].map((s) => s * mag).find((s) => s * ticks >= max) ?? 10 * mag
  return step * ticks
}

/* ── 작은 선 그래프 (지표 카드 아래) ─────────────────────────────────── */

export function Sparkline({
  values,
  color = 'var(--chart-1)',
  className,
}: {
  values: number[]
  color?: string
  className?: string
}) {
  const id = React.useId()
  const W = 120
  const H = 36
  const min = Math.min(...values)
  const max = Math.max(...values)
  const span = max - min || 1
  const pts = values.map((v, i) => [(i / Math.max(1, values.length - 1)) * W, H - 3 - ((v - min) / span) * (H - 8)] as const)
  const line = monotonePath(pts)
  return (
    <svg aria-hidden viewBox={`0 0 ${W} ${H}`} preserveAspectRatio="none" className={cx('h-9 w-full overflow-visible', className)}>
      <defs>
        <linearGradient id={id} x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%" stopColor={color} stopOpacity={0.18} />
          <stop offset="100%" stopColor={color} stopOpacity={0} />
        </linearGradient>
      </defs>
      <path d={`${line}L${W},${H}L0,${H}Z`} fill={`url(#${id})`} />
      <path d={line} fill="none" stroke={color} strokeWidth={1.5} vectorEffect="non-scaling-stroke" strokeLinejoin="round" />
    </svg>
  )
}

/* ── 영역 그래프 (매출 추이) ─────────────────────────────────────── */

export type Series = {
  key: string
  label: string
  values: number[]
  color: string
  /** 점선으로 그리고 면을 채우지 않는다. 비교 기간에 쓴다 */
  dashed?: boolean
}

export function AreaChart({
  labels,
  series,
  height = 280,
  formatValue,
  formatAxis,
  label,
}: {
  labels: string[]
  series: Series[]
  height?: number
  formatValue: (v: number) => string
  formatAxis: (v: number) => string
  /** 화면 읽기 프로그램이 읽을 차트 설명 */
  label: string
}) {
  const [ref, width] = useWidth<HTMLDivElement>()
  const [active, setActive] = React.useState<number | null>(null)
  const gid = React.useId()

  const n = labels.length
  const pad = { top: 12, right: 8, bottom: 28, left: 52 }
  const iw = Math.max(0, width - pad.left - pad.right)
  const ih = height - pad.top - pad.bottom
  const max = niceMax(Math.max(...series.flatMap((s) => s.values)) * 1.04)
  const x = (i: number) => pad.left + (n <= 1 ? iw / 2 : (i / (n - 1)) * iw)
  const y = (v: number) => pad.top + ih - (v / max) * ih
  const ticks = [0, 0.25, 0.5, 0.75, 1].map((f) => f * max)
  /* 날짜 글자 하나가 차지하는 폭(약 56px)보다 촘촘하게 놓지 않는다 */
  const every = Math.max(1, Math.ceil(n / Math.max(2, Math.min(6, Math.floor(iw / 56)))))
  const xTicks = labels.map((_, i) => i).filter((i) => (n - 1 - i) % every === 0)

  const pick = (clientX: number, el: Element) => {
    const r = el.getBoundingClientRect()
    const i = Math.round(((clientX - r.left - pad.left) / (iw || 1)) * (n - 1))
    setActive(Math.max(0, Math.min(n - 1, i)))
  }

  const onKey = (e: React.KeyboardEvent) => {
    if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return
    e.preventDefault()
    setActive((a) => {
      const cur = a ?? n - 1
      return Math.max(0, Math.min(n - 1, cur + (e.key === 'ArrowRight' ? 1 : -1)))
    })
  }

  const tipLeft = active === null ? 0 : Math.min(Math.max(x(active), pad.left + 80), width - 88)

  return (
    <div ref={ref} className="relative w-full min-w-0 select-none" style={{ height }}>
      {width > 0 ? (
        <svg
          role="img"
          aria-label={label}
          tabIndex={0}
          width={width}
          height={height}
          className="absolute inset-0 block rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
          onPointerMove={(e) => pick(e.clientX, e.currentTarget)}
          onPointerLeave={() => setActive(null)}
          onKeyDown={onKey}
          onBlur={() => setActive(null)}
        >
          <defs>
            {series.map((s, si) => (
              <linearGradient key={s.key} id={`${gid}-${si}`} x1="0" x2="0" y1="0" y2="1">
                <stop offset="0%" stopColor={s.color} stopOpacity={0.2} />
                <stop offset="100%" stopColor={s.color} stopOpacity={0} />
              </linearGradient>
            ))}
          </defs>

          {ticks.map((t) => (
            <g key={t}>
              <line
                x1={pad.left}
                x2={width - pad.right}
                y1={y(t)}
                y2={y(t)}
                stroke="var(--border)"
                strokeDasharray={t === 0 ? undefined : '3 4'}
              />
              <text x={pad.left - 10} y={y(t)} dy="0.32em" textAnchor="end" className="fill-muted-foreground text-[11px] tabular-nums">
                {formatAxis(t)}
              </text>
            </g>
          ))}

          {xTicks.map((i) => (
            <text
              key={i}
              x={x(i)}
              y={height - 8}
              textAnchor={i === n - 1 ? 'end' : i === 0 ? 'start' : 'middle'}
              className="fill-muted-foreground text-[11px] tabular-nums"
            >
              {labels[i]}
            </text>
          ))}

          {series.map((s, si) => {
            const pts = s.values.map((v, i) => [x(i), y(v)] as const)
            const line = monotonePath(pts)
            return (
              <g key={s.key}>
                {s.dashed ? null : (
                  <path d={`${line}L${x(n - 1)},${y(0)}L${x(0)},${y(0)}Z`} fill={`url(#${gid}-${si})`} />
                )}
                <path
                  d={line}
                  fill="none"
                  stroke={s.color}
                  strokeWidth={s.dashed ? 1.5 : 2}
                  strokeDasharray={s.dashed ? '4 4' : undefined}
                  strokeLinejoin="round"
                  strokeLinecap="round"
                />
              </g>
            )
          })}

          {active !== null ? (
            <g>
              <line x1={x(active)} x2={x(active)} y1={pad.top} y2={pad.top + ih} stroke="var(--foreground)" strokeOpacity={0.18} />
              {series.map((s) => (
                <circle
                  key={s.key}
                  cx={x(active)}
                  cy={y(s.values[active])}
                  r={4}
                  fill="var(--card)"
                  stroke={s.color}
                  strokeWidth={2}
                />
              ))}
            </g>
          ) : null}
        </svg>
      ) : null}

      {active !== null ? (
        <div
          aria-live="polite"
          className="pointer-events-none absolute top-1 z-10 min-w-40 -translate-x-1/2 rounded-lg border border-border bg-popover px-3 py-2.5 text-popover-foreground shadow-[0_12px_32px_-12px_rgb(16_24_40/0.25)]"
          style={{ left: tipLeft }}
        >
          <p className="text-xs font-medium text-muted-foreground">{labels[active]}</p>
          <ul className="mt-1.5 space-y-1">
            {series.map((s) => (
              <li key={s.key} className="flex items-center justify-between gap-4 text-[13px]">
                <span className="flex items-center gap-1.5 text-muted-foreground">
                  <span aria-hidden className="h-2 w-2 rounded-[3px]" style={{ backgroundColor: s.color }} />
                  {s.label}
                </span>
                <span className="font-semibold tabular-nums">{formatValue(s.values[active])}</span>
              </li>
            ))}
          </ul>
        </div>
      ) : null}
    </div>
  )
}

/* ── 막대 목록 (유입 채널 같은 순위) ───────────────────────────────── */

export function BarList({
  items,
  format,
  className,
}: {
  items: Array<{ label: string; value: number }>
  format: (v: number) => string
  className?: string
}) {
  const total = items.reduce((a, b) => a + b.value, 0) || 1
  const max = Math.max(...items.map((i) => i.value)) || 1
  return (
    <ul className={cx('space-y-2.5', className)}>
      {items.map((it, i) => (
        <li key={it.label} className="flex items-center gap-3">
          <div className="relative flex h-9 min-w-0 flex-1 items-center">
            <div
              aria-hidden
              className="absolute inset-y-0 left-0 rounded-md transition-[width] duration-700"
              style={{
                width: `${(it.value / max) * 100}%`,
                backgroundColor: `color-mix(in oklab, var(--chart-1) ${i === 0 ? 16 : 10}%, transparent)`,
              }}
            />
            <span className="relative truncate px-2.5 text-[13px] text-foreground">{it.label}</span>
          </div>
          <span className="w-14 text-right text-[13px] font-medium tabular-nums">{format(it.value)}</span>
          <span className="w-11 text-right text-xs text-muted-foreground tabular-nums">
            {((it.value / total) * 100).toFixed(0)}%
          </span>
        </li>
      ))}
    </ul>
  )
}
```

### `components/dashboard/dashboard.tsx`

```tsx
'use client'

/**
 * bpublish Dashboard
 * 비퍼블리시(bpublish)가 만든 대시보드 디자인 · https://www.bpublish.com/designs/dashboard
 * 비퍼블리시 오픈 디자인 라이선스 v1.0 · https://www.bpublish.com/designs#license
 *
 * 디자인 규칙은 같은 폴더의 AGENTS.md 에 있다. AI 로 화면을 더할 때 먼저 읽게 한다.
 */
import * as React from 'react'
import { getOverview, ORDERS, PRODUCTS, RANGES, type Range } from './data'
import { IconDownload } from './icons'
import { ChannelsCard, KpiCard, OrdersCard, ProductsCard, RevenueCard } from './sections'
import { DashboardShell, PageHeader } from './shell'
import { Button, Segmented } from './ui'

export function Dashboard() {
  const [range, setRange] = React.useState<Range>('30d')
  const data = React.useMemo(() => getOverview(range), [range])

  return (
    <DashboardShell active="개요" goal={data.goal}>
      <PageHeader
        title="개요"
        description={`${data.period} · 이전 기간 대비`}
        actions={
          <>
            <Segmented label="기간" value={range} options={RANGES} onChange={setRange} />
            <Button>
              <IconDownload />
              내보내기
            </Button>
          </>
        }
      />

      <section aria-label="핵심 지표" className="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4">
        {data.metrics.map((m) => (
          <KpiCard key={m.key} metric={m} />
        ))}
      </section>

      <div className="mt-4 grid grid-cols-1 gap-4 xl:grid-cols-3">
        <RevenueCard data={data} className="xl:col-span-2" />
        <ChannelsCard data={data} />
      </div>

      <div className="mt-4 grid grid-cols-1 gap-4 xl:grid-cols-3">
        <OrdersCard orders={ORDERS} className="xl:col-span-2" />
        <ProductsCard products={PRODUCTS} period={data.period} />
      </div>
    </DashboardShell>
  )
}
```

### `components/dashboard/data.ts`

```ts
/**
 * bpublish Dashboard: 예시 데이터
 * 화면을 채우는 가짜 숫자다. 실제 서비스에서는 이 파일의 함수들을 API 호출로 바꾼다.
 * 함수의 반환 모양(타입)만 지키면 화면 쪽 코드는 고칠 필요가 없다.
 */

export type Range = '7d' | '30d' | '90d'

export const RANGES: ReadonlyArray<{ value: Range; label: string }> = [
  { value: '7d', label: '7일' },
  { value: '30d', label: '30일' },
  { value: '90d', label: '90일' },
]

const DAYS: Record<Range, number> = { '7d': 7, '30d': 30, '90d': 90 }

/** 매번 같은 숫자가 나오도록 씨앗이 있는 난수 */
function seeded(seed: number) {
  let s = seed >>> 0
  return () => {
    s = (Math.imul(s, 1664525) + 1013904223) >>> 0
    return s / 4294967296
  }
}

/* 마지막 날을 고정해 두어야 미리보기가 언제 봐도 같다 */
const END = new Date(2026, 10, 20)

type Day = { date: Date; visitors: number; orders: number; revenue: number }

function simulate(days: number, offsetDays: number, seed: number, lift: number): Day[] {
  const rand = seeded(seed)
  const out: Day[] = []
  for (let i = 0; i < days; i++) {
    const date = new Date(END)
    date.setDate(END.getDate() - offsetDays - (days - 1 - i))
    const dow = date.getDay()
    const week = dow === 0 || dow === 6 ? 1.07 : dow === 1 ? 0.95 : 1
    const trend = 1 + (i / days) * 0.12
    const visitors = Math.round(2280 * lift * week * trend * (0.94 + rand() * 0.12))
    const rate = (0.032 + rand() * 0.0035) * (lift > 1 ? 1.04 : 1)
    const orders = Math.max(1, Math.round(visitors * rate))
    const aov = 50600 + rand() * 2800
    out.push({ date, visitors, orders, revenue: Math.round((orders * aov) / 100) * 100 })
  }
  return out
}

const sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0)

export type Metric = {
  key: 'revenue' | 'orders' | 'visitors' | 'conversion'
  label: string
  value: number
  previous: number
  /** 하루 단위 값. 카드 아래 작은 선 그래프에 쓴다 */
  trend: number[]
}

export type Overview = {
  range: Range
  /** "10월 22일 – 11월 20일" */
  period: string
  labels: string[]
  revenue: { current: number[]; previous: number[] }
  metrics: Metric[]
  channels: Array<{ label: string; value: number }>
  goal: { label: string; value: number; target: number }
}

const md = (d: Date) => `${d.getMonth() + 1}월 ${d.getDate()}일`

export function getOverview(range: Range): Overview {
  const days = DAYS[range]
  const cur = simulate(days, 0, 7 + days, 1.08)
  const prev = simulate(days, days, 91 + days, 1)

  const totals = (xs: Day[]) => {
    const visitors = sum(xs.map((d) => d.visitors))
    const orders = sum(xs.map((d) => d.orders))
    return { visitors, orders, revenue: sum(xs.map((d) => d.revenue)), conversion: (orders / visitors) * 100 }
  }
  const c = totals(cur)
  const p = totals(prev)

  const shares = [
    ['검색 광고', 0.34],
    ['자연 검색', 0.26],
    ['인스타그램', 0.18],
    ['직접 방문', 0.13],
    ['이메일', 0.09],
  ] as const

  return {
    range,
    period: `${md(cur[0].date)} – ${md(cur[cur.length - 1].date)}`,
    labels: cur.map((d) => `${d.date.getMonth() + 1}.${d.date.getDate()}`),
    revenue: { current: cur.map((d) => d.revenue), previous: prev.map((d) => d.revenue) },
    metrics: [
      { key: 'revenue', label: '매출', value: c.revenue, previous: p.revenue, trend: cur.map((d) => d.revenue) },
      { key: 'orders', label: '주문', value: c.orders, previous: p.orders, trend: cur.map((d) => d.orders) },
      { key: 'visitors', label: '방문자', value: c.visitors, previous: p.visitors, trend: cur.map((d) => d.visitors) },
      {
        key: 'conversion',
        label: '구매 전환율',
        value: c.conversion,
        previous: p.conversion,
        trend: cur.map((d) => (d.orders / d.visitors) * 100),
      },
    ],
    channels: shares.map(([label, share]) => ({ label, value: Math.round(c.visitors * share) })),
    goal: {
      label: `${END.getMonth() + 1}월 매출 목표`,
      /* 이번 달 1일부터 오늘까지. 30일 화면의 숫자와 어긋나지 않게 같은 씨앗을 쓴다 */
      value: sum(simulate(30, 0, 37, 1.08).filter((d) => d.date.getMonth() === END.getMonth()).map((d) => d.revenue)),
      target: 160_000_000,
    },
  }
}

export type OrderStatus = 'paid' | 'shipping' | 'delivered' | 'refund'

export const ORDER_STATUS: Record<OrderStatus, { label: string; tone: 'primary' | 'warning' | 'success' | 'danger' }> = {
  paid: { label: '결제 완료', tone: 'primary' },
  shipping: { label: '배송 중', tone: 'warning' },
  delivered: { label: '배송 완료', tone: 'success' },
  refund: { label: '환불 요청', tone: 'danger' },
}

export type Order = {
  id: string
  customer: string
  email: string
  item: string
  amount: number
  status: OrderStatus
  time: string
}

export const ORDERS: Order[] = [
  { id: 'A-20418', customer: '김서연', email: 'seoyeon@example.com', item: '리넨 오버셔츠 외 1건', amount: 128400, status: 'paid', time: '12분 전' },
  { id: 'A-20417', customer: '이도윤', email: 'doyoon@example.com', item: '울 블렌드 머플러', amount: 59000, status: 'paid', time: '34분 전' },
  { id: 'A-20416', customer: '박지우', email: 'jiwoo@example.com', item: '캔버스 토트백', amount: 42000, status: 'shipping', time: '1시간 전' },
  { id: 'A-20415', customer: '최하준', email: 'hajun@example.com', item: '코튼 니트 가디건 외 2건', amount: 214600, status: 'shipping', time: '2시간 전' },
  { id: 'A-20414', customer: '정유나', email: 'yuna@example.com', item: '세라믹 머그 세트', amount: 36000, status: 'refund', time: '3시간 전' },
  { id: 'A-20413', customer: '강민재', email: 'minjae@example.com', item: '와이드 치노 팬츠', amount: 69000, status: 'delivered', time: '5시간 전' },
]

export type Product = { name: string; category: string; sold: number; revenue: number; hue: number }

export const PRODUCTS: Product[] = [
  { name: '리넨 오버셔츠', category: '상의', sold: 412, revenue: 28_428_000, hue: 75 },
  { name: '코튼 니트 가디건', category: '상의', sold: 318, revenue: 25_122_000, hue: 226 },
  { name: '와이드 치노 팬츠', category: '하의', sold: 296, revenue: 20_424_000, hue: 160 },
  { name: '캔버스 토트백', category: '잡화', sold: 254, revenue: 10_668_000, hue: 25 },
  { name: '울 블렌드 머플러', category: '잡화', sold: 171, revenue: 10_089_000, hue: 295 },
  { name: '세라믹 머그 세트', category: '리빙', sold: 158, revenue: 5_688_000, hue: 200 },
]

export const NOTIFICATIONS = 3
```

### `components/dashboard/format.ts`

```ts
/**
 * bpublish Dashboard: 숫자 표기
 * 화면의 모든 숫자는 여기를 거친다. 통화나 언어를 바꿀 때는 이 파일만 고친다.
 */

const n0 = new Intl.NumberFormat('ko-KR', { maximumFractionDigits: 0 })
const n1 = new Intl.NumberFormat('ko-KR', { maximumFractionDigits: 1 })

/** 1억 2,483만원 처럼 큰 단위로 끊어 읽는 금액 */
export function won(v: number) {
  const eok = Math.floor(v / 1e8)
  const man = Math.round((v % 1e8) / 1e4)
  if (eok > 0) return man > 0 ? `${eok}억 ${n0.format(man)}만원` : `${eok}억원`
  if (v >= 1e4) return `${n0.format(Math.round(v / 1e4))}만원`
  return `${n0.format(v)}원`
}

/** 표 안의 정확한 금액: 128,400원 */
export function wonExact(v: number) {
  return `${n0.format(v)}원`
}

/** 차트 축처럼 좁은 자리: 1,200만 · 1.2억 */
export function wonAxis(v: number) {
  if (v >= 1e8) return `${n1.format(v / 1e8)}억`
  if (v >= 1e4) return `${n0.format(v / 1e4)}만`
  return n0.format(v)
}

export function count(v: number) {
  return n0.format(v)
}

export function percent(v: number, digits = 1) {
  return `${v.toFixed(digits)}%`
}

/** 이전 값 대비 증감률(%) */
export function change(current: number, previous: number) {
  if (previous === 0) return 0
  return ((current - previous) / previous) * 100
}
```

### `components/dashboard/icons.tsx`

```tsx
/**
 * bpublish Dashboard: 아이콘
 * 24 격자, 선 굵기 1.75, 둥근 끝. 새 아이콘도 같은 규칙으로 그린다.
 * 아이콘 라이브러리를 쓰고 싶다면 lucide-react 가 같은 규칙이라 그대로 바꿔 끼울 수 있다.
 */
import * as React from 'react'

type IconProps = React.SVGProps<SVGSVGElement>

function Svg({ children, ...props }: IconProps & { children: React.ReactNode }) {
  return (
    <svg
      aria-hidden
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth={1.75}
      strokeLinecap="round"
      strokeLinejoin="round"
      width={20}
      height={20}
      {...props}
    >
      {children}
    </svg>
  )
}

export const IconOverview = (p: IconProps) => (
  <Svg {...p}>
    <rect x="3.5" y="3.5" width="7" height="9" rx="1.5" />
    <rect x="13.5" y="3.5" width="7" height="5" rx="1.5" />
    <rect x="13.5" y="11.5" width="7" height="9" rx="1.5" />
    <rect x="3.5" y="15.5" width="7" height="5" rx="1.5" />
  </Svg>
)

export const IconOrders = (p: IconProps) => (
  <Svg {...p}>
    <path d="M6 7h12l-1 12.5a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 7 19.5L6 7Z" />
    <path d="M9 9.5V6a3 3 0 0 1 6 0v3.5" />
  </Svg>
)

export const IconProducts = (p: IconProps) => (
  <Svg {...p}>
    <path d="m12 3 8 4.5v9L12 21l-8-4.5v-9L12 3Z" />
    <path d="m4 7.5 8 4.5 8-4.5" />
    <path d="M12 12v9" />
  </Svg>
)

export const IconCustomers = (p: IconProps) => (
  <Svg {...p}>
    <circle cx="9" cy="8" r="3.5" />
    <path d="M3 20c.6-3.4 3-5.5 6-5.5s5.4 2.1 6 5.5" />
    <path d="M16 4.6a3.5 3.5 0 0 1 0 6.8" />
    <path d="M18 14.8c1.7.7 2.8 2.5 3 5.2" />
  </Svg>
)

export const IconAnalytics = (p: IconProps) => (
  <Svg {...p}>
    <path d="M4 20V4" />
    <path d="M4 20h16" />
    <path d="m8 15 3.5-4 3 2.5L20 7" />
  </Svg>
)

export const IconMarketing = (p: IconProps) => (
  <Svg {...p}>
    <path d="M4 10v4a1 1 0 0 0 1 1h2l5 4V5L7 9H5a1 1 0 0 0-1 1Z" />
    <path d="M16 8.5a5 5 0 0 1 0 7" />
    <path d="M18.5 6a8.5 8.5 0 0 1 0 12" />
  </Svg>
)

export const IconSettings = (p: IconProps) => (
  <Svg {...p}>
    <circle cx="12" cy="12" r="3" />
    <path d="M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.6 1.6 0 0 0 1.5-1 1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H9a1.6 1.6 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V9a1.6 1.6 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1Z" />
  </Svg>
)

export const IconHelp = (p: IconProps) => (
  <Svg {...p}>
    <circle cx="12" cy="12" r="8.5" />
    <path d="M9.6 9.4a2.5 2.5 0 0 1 4.8.9c0 1.7-2.4 2.2-2.4 3.7" />
    <path d="M12 17h.01" />
  </Svg>
)

export const IconSearch = (p: IconProps) => (
  <Svg {...p}>
    <circle cx="11" cy="11" r="6.5" />
    <path d="m20 20-4.2-4.2" />
  </Svg>
)

export const IconBell = (p: IconProps) => (
  <Svg {...p}>
    <path d="M6 9.5a6 6 0 0 1 12 0c0 5 2 6.5 2 6.5H4s2-1.5 2-6.5Z" />
    <path d="M10.3 19.5a1.9 1.9 0 0 0 3.4 0" />
  </Svg>
)

export const IconSun = (p: IconProps) => (
  <Svg {...p}>
    <circle cx="12" cy="12" r="4" />
    <path d="M12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4" />
  </Svg>
)

export const IconMoon = (p: IconProps) => (
  <Svg {...p}>
    <path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z" />
  </Svg>
)

export const IconMenu = (p: IconProps) => (
  <Svg {...p}>
    <path d="M4 7h16M4 12h16M4 17h10" />
  </Svg>
)

export const IconClose = (p: IconProps) => (
  <Svg {...p}>
    <path d="M6 6l12 12M18 6 6 18" />
  </Svg>
)

export const IconDownload = (p: IconProps) => (
  <Svg {...p}>
    <path d="M12 4v11" />
    <path d="m7.5 10.5 4.5 4.5 4.5-4.5" />
    <path d="M5 19.5h14" />
  </Svg>
)

export const IconPlus = (p: IconProps) => (
  <Svg {...p}>
    <path d="M12 5v14M5 12h14" />
  </Svg>
)

export const IconCalendar = (p: IconProps) => (
  <Svg {...p}>
    <rect x="3.5" y="5" width="17" height="15.5" rx="2" />
    <path d="M3.5 10h17M8 3v4M16 3v4" />
  </Svg>
)

export const IconMore = (p: IconProps) => (
  <Svg {...p}>
    <circle cx="5.5" cy="12" r="1" fill="currentColor" stroke="none" />
    <circle cx="12" cy="12" r="1" fill="currentColor" stroke="none" />
    <circle cx="18.5" cy="12" r="1" fill="currentColor" stroke="none" />
  </Svg>
)

export const IconChevronRight = (p: IconProps) => (
  <Svg {...p}>
    <path d="m9.5 6 6 6-6 6" />
  </Svg>
)

export const IconChevronsUpDown = (p: IconProps) => (
  <Svg {...p}>
    <path d="m8 9 4-4 4 4M8 15l4 4 4-4" />
  </Svg>
)

export const IconArrowUpRight = (p: IconProps) => (
  <Svg {...p}>
    <path d="M7 17 17 7M8.5 7H17v8.5" />
  </Svg>
)
```

### `components/dashboard/sections.tsx`

```tsx
'use client'

/**
 * bpublish Dashboard: 화면 묶음
 * 카드 하나가 질문 하나에 답한다. 새 카드를 만들 때도 <Card> + <CardHeader> 로 시작한다.
 */
import * as React from 'react'
import { AreaChart, BarList, Sparkline } from './charts'
import { change, count, percent, won, wonAxis, wonExact } from './format'
import { IconArrowUpRight, IconMore } from './icons'
import { Avatar, Badge, Button, Card, CardHeader, Delta, cx, tint } from './ui'
import { ORDER_STATUS, type Metric, type Order, type Overview, type Product } from './data'

/* ── 지표 카드 ──────────────────────────────────────────────────── */

function formatMetric(m: Metric, v: number) {
  if (m.key === 'revenue') return won(v)
  if (m.key === 'conversion') return percent(v, 2)
  return count(v)
}

export function KpiCard({ metric, className }: { metric: Metric; className?: string }) {
  return (
    <Card className={cx('flex flex-col p-5', className)}>
      <div className="flex items-center justify-between gap-3">
        <h2 className="text-[13px] font-medium text-muted-foreground">{metric.label}</h2>
        <Delta value={change(metric.value, metric.previous)} />
      </div>
      <p className="mt-2 text-[26px] leading-tight font-semibold tracking-tight tabular-nums">
        {formatMetric(metric, metric.value)}
      </p>
      <p className="mt-1 text-xs text-muted-foreground tabular-nums">이전 기간 {formatMetric(metric, metric.previous)}</p>
      <Sparkline values={metric.trend} className="mt-4" />
    </Card>
  )
}

/* ── 매출 추이 ──────────────────────────────────────────────────── */

export function RevenueCard({ data, className }: { data: Overview; className?: string }) {
  const total = data.revenue.current.reduce((a, b) => a + b, 0)
  const prev = data.revenue.previous.reduce((a, b) => a + b, 0)
  const series = [
    { key: 'current', label: '이번 기간', values: data.revenue.current, color: 'var(--chart-1)' },
    { key: 'previous', label: '이전 기간', values: data.revenue.previous, color: 'var(--chart-5)', dashed: true },
  ]
  return (
    <Card className={cx('flex flex-col', className)}>
      <CardHeader
        title="매출 추이"
        description={`${data.period} · 이전 기간과 비교`}
        action={
          <ul className="hidden items-center gap-4 sm:flex">
            {series.map((s) => (
              <li key={s.key} className="flex items-center gap-1.5 text-xs text-muted-foreground">
                <span
                  aria-hidden
                  className="h-0.5 w-3.5 rounded-full"
                  style={
                    s.dashed
                      ? { backgroundImage: `linear-gradient(90deg, ${s.color} 55%, transparent 55%)`, backgroundSize: '6px 2px' }
                      : { backgroundColor: s.color }
                  }
                />
                {s.label}
              </li>
            ))}
          </ul>
        }
      />
      <div className="flex items-baseline gap-2.5 px-5 pt-4">
        <p className="text-[28px] leading-none font-semibold tracking-tight tabular-nums">{won(total)}</p>
        <Delta value={change(total, prev)} />
      </div>
      <div className="mt-auto px-3 pt-4 pb-3">
        <AreaChart
          labels={data.labels}
          series={series}
          formatValue={wonExact}
          formatAxis={wonAxis}
          label={`${data.period} 매출 추이. 합계 ${won(total)}, 이전 기간 ${won(prev)}.`}
        />
      </div>
    </Card>
  )
}

/* ── 유입 채널 ──────────────────────────────────────────────────── */

export function ChannelsCard({ data, className }: { data: Overview; className?: string }) {
  const visitors = data.metrics.find((m) => m.key === 'visitors')?.value ?? 0
  return (
    <Card className={cx('flex flex-col', className)}>
      <CardHeader
        title="유입 채널"
        description="방문자 기준"
        action={
          <Button variant="ghost" size="icon" aria-label="유입 채널 메뉴" className="-mt-1.5 -mr-2">
            <IconMore />
          </Button>
        }
      />
      <BarList items={data.channels} format={count} className="px-5 pt-5" />
      <dl className="mt-auto grid grid-cols-2 border-t border-border">
        <div className="px-5 py-4">
          <dt className="text-xs text-muted-foreground">신규 방문</dt>
          <dd className="mt-1 text-base font-semibold tabular-nums">{count(Math.round(visitors * 0.62))}</dd>
        </div>
        <div className="border-l border-border px-5 py-4">
          <dt className="text-xs text-muted-foreground">재방문</dt>
          <dd className="mt-1 text-base font-semibold tabular-nums">{count(Math.round(visitors * 0.38))}</dd>
        </div>
      </dl>
    </Card>
  )
}

/* ── 최근 주문 ──────────────────────────────────────────────────── */

export function OrdersCard({ orders, className }: { orders: Order[]; className?: string }) {
  return (
    <Card className={cx('flex flex-col overflow-hidden', className)}>
      <CardHeader
        title="최근 주문"
        description={`오늘 들어온 주문 ${orders.length}건`}
        action={
          <Button size="sm">
            전체 보기
            <IconArrowUpRight />
          </Button>
        }
      />
      <div className="mt-4 overflow-x-auto">
        <table className="w-full min-w-[480px] text-left text-[13px]">
          <thead>
            <tr className="border-y border-border bg-muted/50 text-xs text-muted-foreground">
              <th scope="col" className="py-2.5 pr-3 pl-5 font-medium">주문</th>
              <th scope="col" className="px-3 py-2.5 font-medium">고객</th>
              <th scope="col" className="hidden px-3 py-2.5 font-medium md:table-cell">상품</th>
              <th scope="col" className="px-3 py-2.5 text-right font-medium">금액</th>
              <th scope="col" className="px-3 py-2.5 font-medium">상태</th>
              <th scope="col" className="hidden py-2.5 pr-5 pl-3 text-right font-medium sm:table-cell">시간</th>
            </tr>
          </thead>
          <tbody className="divide-y divide-border">
            {orders.map((o) => {
              const s = ORDER_STATUS[o.status]
              return (
                <tr key={o.id} className="transition-colors hover:bg-muted/40">
                  <td className="py-3 pr-3 pl-5 font-medium whitespace-nowrap tabular-nums">#{o.id}</td>
                  <td className="px-3 py-3">
                    <div className="flex items-center gap-2.5">
                      <Avatar name={o.customer} size={28} />
                      <div className="min-w-0">
                        <p className="truncate font-medium">{o.customer}</p>
                        <p className="truncate text-xs text-muted-foreground">{o.email}</p>
                      </div>
                    </div>
                  </td>
                  <td className="hidden max-w-56 truncate px-3 py-3 text-muted-foreground md:table-cell">{o.item}</td>
                  <td className="px-3 py-3 text-right font-medium whitespace-nowrap tabular-nums">{wonExact(o.amount)}</td>
                  <td className="px-3 py-3">
                    <Badge tone={s.tone} dot>
                      {s.label}
                    </Badge>
                  </td>
                  <td className="hidden py-3 pr-5 pl-3 text-right whitespace-nowrap text-muted-foreground sm:table-cell">{o.time}</td>
                </tr>
              )
            })}
          </tbody>
        </table>
      </div>
    </Card>
  )
}

/* ── 많이 팔린 상품 ─────────────────────────────────────────────── */

export function ProductsCard({ products, period, className }: { products: Product[]; period: string; className?: string }) {
  const max = Math.max(...products.map((p) => p.revenue)) || 1
  return (
    <Card className={cx('flex flex-col', className)}>
      <CardHeader title="많이 팔린 상품" description={period} />
      <ol className="flex flex-col gap-1 px-3 pt-3 pb-3">
        {products.map((p, i) => (
          <li key={p.name} className="flex items-center gap-3 rounded-lg px-2 py-2.5">
            <span
              aria-hidden
              className={cx('grid size-10 shrink-0 place-items-center rounded-lg text-sm font-semibold', tint)}
              style={{ '--h': p.hue } as React.CSSProperties}
            >
              {i + 1}
            </span>
            <div className="min-w-0 flex-1">
              <div className="flex items-baseline justify-between gap-3">
                <p className="truncate text-[13px] font-medium">{p.name}</p>
                <p className="shrink-0 text-[13px] font-semibold tabular-nums">{won(p.revenue)}</p>
              </div>
              <div className="mt-1.5 flex items-center gap-3">
                <div className="h-1 flex-1 overflow-hidden rounded-full bg-muted">
                  <div className="h-full rounded-full bg-chart-1/70" style={{ width: `${(p.revenue / max) * 100}%` }} />
                </div>
                <p className="shrink-0 text-xs text-muted-foreground tabular-nums">
                  {p.category} · {count(p.sold)}개
                </p>
              </div>
            </div>
          </li>
        ))}
      </ol>
    </Card>
  )
}
```

### `components/dashboard/shell.tsx`

```tsx
'use client'

/**
 * bpublish Dashboard: 화면 틀 (왼쪽 메뉴 · 위쪽 막대)
 * 새 화면을 더할 때는 NAV 에 줄을 하나 넣고, 본문은 <DashboardShell> 안에 둔다.
 */
import * as React from 'react'
import { Avatar, Button, Progress, cx } from './ui'
import { won } from './format'
import {
  IconAnalytics,
  IconBell,
  IconChevronsUpDown,
  IconClose,
  IconCustomers,
  IconHelp,
  IconMarketing,
  IconMenu,
  IconMoon,
  IconOrders,
  IconOverview,
  IconProducts,
  IconSearch,
  IconSettings,
  IconSun,
} from './icons'

type NavItem = { label: string; href: string; icon: (p: React.SVGProps<SVGSVGElement>) => React.ReactElement; badge?: number }

export const NAV: ReadonlyArray<{ group?: string; items: NavItem[] }> = [
  {
    items: [
      { label: '개요', href: '#', icon: IconOverview },
      { label: '주문', href: '#orders', icon: IconOrders, badge: 12 },
      { label: '상품', href: '#products', icon: IconProducts },
      { label: '고객', href: '#customers', icon: IconCustomers },
    ],
  },
  {
    group: '성장',
    items: [
      { label: '분석', href: '#analytics', icon: IconAnalytics },
      { label: '마케팅', href: '#marketing', icon: IconMarketing },
    ],
  },
]

const FOOT_NAV: NavItem[] = [
  { label: '설정', href: '#settings', icon: IconSettings },
  { label: '도움말', href: '#help', icon: IconHelp },
]

function NavLink({ item, active }: { item: NavItem; active: boolean }) {
  const Icon = item.icon
  return (
    <a
      href={item.href}
      aria-current={active ? 'page' : undefined}
      className={cx(
        'group flex h-9 items-center gap-3 rounded-lg px-2.5 text-sm font-medium transition-colors outline-none',
        'focus-visible:ring-2 focus-visible:ring-sidebar-ring/60',
        active
          ? 'bg-sidebar-accent text-sidebar-accent-foreground'
          : 'text-sidebar-foreground hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground',
      )}
    >
      <Icon className={cx('size-[18px] shrink-0', active ? 'text-sidebar-primary' : 'opacity-75 group-hover:opacity-100')} />
      <span className="flex-1 truncate">{item.label}</span>
      {item.badge ? (
        <span className="grid h-5 min-w-5 place-items-center rounded-full bg-sidebar-primary px-1.5 text-[11px] font-semibold text-sidebar-primary-foreground tabular-nums">
          {item.badge}
        </span>
      ) : null}
    </a>
  )
}

function Brand() {
  return (
    <button
      type="button"
      className="flex w-full items-center gap-3 rounded-lg p-1.5 text-left transition-colors outline-none hover:bg-sidebar-accent/60 focus-visible:ring-2 focus-visible:ring-sidebar-ring/60"
    >
      <span className="grid size-8 shrink-0 place-items-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground shadow-[inset_0_1px_0_rgb(255_255_255/0.2)]">
        <svg aria-hidden viewBox="0 0 20 20" className="size-4">
          <circle cx="10" cy="10" r="6.25" fill="none" stroke="currentColor" strokeWidth="2" />
          <circle cx="15.2" cy="5.6" r="2" fill="currentColor" />
        </svg>
      </span>
      <span className="min-w-0 flex-1">
        <span className="block truncate text-sm font-semibold text-sidebar-accent-foreground">Orbit</span>
        <span className="block truncate text-xs text-sidebar-foreground/80">스토어 관리</span>
      </span>
      <IconChevronsUpDown className="size-4 shrink-0 text-sidebar-foreground/70" />
    </button>
  )
}

function SidebarBody({ active, goal }: { active: string; goal: { label: string; value: number; target: number } }) {
  const pct = (goal.value / goal.target) * 100
  return (
    <div className="flex h-full flex-col gap-6 px-3 py-4">
      <Brand />

      <nav aria-label="주 메뉴" className="flex flex-col gap-5">
        {NAV.map((g, gi) => (
          <div key={gi}>
            {g.group ? (
              <p className="mb-1.5 px-2.5 text-[11px] font-semibold tracking-wide text-sidebar-foreground/60">{g.group}</p>
            ) : null}
            <ul className="space-y-0.5">
              {g.items.map((it) => (
                <li key={it.label}>
                  <NavLink item={it} active={it.label === active} />
                </li>
              ))}
            </ul>
          </div>
        ))}
      </nav>

      <div className="mt-auto flex flex-col gap-4">
        <div className="rounded-xl border border-sidebar-border bg-card p-3.5">
          <div className="flex items-baseline justify-between gap-2">
            <p className="text-xs font-medium text-muted-foreground">{goal.label}</p>
            <p className="text-xs font-semibold text-primary tabular-nums">{pct.toFixed(0)}%</p>
          </div>
          <p className="mt-1.5 text-sm font-semibold tabular-nums">{won(goal.value)}</p>
          <Progress value={pct} className="mt-2.5" />
          <p className="mt-2 text-[11px] text-muted-foreground tabular-nums">목표 {won(goal.target)}</p>
        </div>

        <ul className="space-y-0.5">
          {FOOT_NAV.map((it) => (
            <li key={it.label}>
              <NavLink item={it} active={false} />
            </li>
          ))}
        </ul>

        <div className="flex items-center gap-3 border-t border-sidebar-border px-1.5 pt-4">
          <Avatar name="한지민" size={32} />
          <div className="min-w-0 flex-1">
            <p className="truncate text-sm font-medium text-sidebar-accent-foreground">한지민</p>
            <p className="truncate text-xs text-sidebar-foreground/80">jimin@orbit.example</p>
          </div>
        </div>
      </div>
    </div>
  )
}

export function Sidebar({
  open,
  onClose,
  active = '개요',
  goal,
}: {
  open: boolean
  onClose: () => void
  active?: string
  goal: { label: string; value: number; target: number }
}) {
  React.useEffect(() => {
    if (!open) return
    const onKey = (e: KeyboardEvent) => e.key === 'Escape' && onClose()
    window.addEventListener('keydown', onKey)
    return () => window.removeEventListener('keydown', onKey)
  }, [open, onClose])

  return (
    <>
      {/* 넓은 화면: 늘 보이는 메뉴 */}
      <aside className="sticky top-0 hidden h-svh w-64 shrink-0 overflow-y-auto border-r border-sidebar-border bg-sidebar lg:block">
        <SidebarBody active={active} goal={goal} />
      </aside>

      {/* 좁은 화면: 위쪽 막대의 메뉴 버튼으로 여는 서랍 */}
      <div className={cx('fixed inset-0 z-50 lg:hidden', open ? 'visible' : 'invisible')} aria-hidden={!open}>
        <div
          className={cx('absolute inset-0 bg-black/40 backdrop-blur-[2px] transition-opacity duration-300', open ? 'opacity-100' : 'opacity-0')}
          onClick={onClose}
        />
        <aside
          role="dialog"
          aria-modal="true"
          aria-label="메뉴"
          className={cx(
            'absolute inset-y-0 left-0 w-72 max-w-[85vw] overflow-y-auto border-r border-sidebar-border bg-sidebar shadow-2xl transition-transform duration-300 ease-out',
            open ? 'translate-x-0' : '-translate-x-full',
          )}
        >
          <Button variant="ghost" size="icon" onClick={onClose} aria-label="메뉴 닫기" className="absolute top-4 right-3">
            <IconClose />
          </Button>
          <SidebarBody active={active} goal={goal} />
        </aside>
      </div>
    </>
  )
}

function ThemeToggle() {
  const [dark, setDark] = React.useState(false)
  React.useEffect(() => setDark(document.documentElement.classList.contains('dark')), [])
  const toggle = () => {
    const next = !dark
    const root = document.documentElement
    root.classList.toggle('dark', next)
    root.style.colorScheme = next ? 'dark' : 'light'
    setDark(next)
  }
  return (
    <Button variant="ghost" size="icon" onClick={toggle} aria-label={dark ? '밝은 화면으로' : '어두운 화면으로'}>
      {dark ? <IconSun /> : <IconMoon />}
    </Button>
  )
}

export function Topbar({ onMenu }: { onMenu: () => void }) {
  return (
    <header className="sticky top-0 z-30 flex h-16 shrink-0 items-center gap-3 border-b border-border bg-background/80 px-4 backdrop-blur-md sm:px-6 lg:px-8">
      <Button variant="ghost" size="icon" onClick={onMenu} aria-label="메뉴 열기" className="-ml-2 lg:hidden">
        <IconMenu />
      </Button>

      <label className="relative flex h-9 w-full max-w-sm items-center">
        <span className="sr-only">검색</span>
        <IconSearch className="pointer-events-none absolute left-3 size-4 text-muted-foreground" />
        <input
          type="search"
          placeholder="주문, 상품, 고객 검색"
          className="h-full w-full rounded-lg border border-input bg-card pr-12 pl-9 text-sm text-foreground shadow-[0_1px_2px_0_rgb(16_24_40/0.04)] transition-shadow outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/20"
        />
        <kbd className="pointer-events-none absolute right-2.5 hidden h-5 items-center rounded border border-border bg-muted px-1.5 font-sans text-[11px] text-muted-foreground sm:inline-flex">
          ⌘K
        </kbd>
      </label>

      <div className="ml-auto flex items-center gap-1">
        <ThemeToggle />
        <Button variant="ghost" size="icon" aria-label="알림 3개" className="relative">
          <IconBell />
          <span aria-hidden className="absolute top-2 right-2.5 size-2 rounded-full bg-destructive ring-2 ring-background" />
        </Button>
        <span aria-hidden className="mx-2 hidden h-6 w-px bg-border sm:block" />
        <button
          type="button"
          aria-label="내 계정"
          className="hidden rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring/60 sm:block"
        >
          <Avatar name="한지민" size={32} />
        </button>
      </div>
    </header>
  )
}

/**
 * 모든 화면이 같은 틀을 쓴다. 새 화면은 이렇게 만든다:
 *   <DashboardShell active="주문" goal={goal}> …본문… </DashboardShell>
 */
export function DashboardShell({
  active,
  goal,
  children,
}: {
  active?: string
  goal: { label: string; value: number; target: number }
  children: React.ReactNode
}) {
  const [open, setOpen] = React.useState(false)
  const close = React.useCallback(() => setOpen(false), [])
  return (
    <div className="flex min-h-svh bg-background text-foreground">
      <Sidebar open={open} onClose={close} active={active} goal={goal} />
      <div className="flex min-w-0 flex-1 flex-col">
        <Topbar onMenu={() => setOpen(true)} />
        <main className="mx-auto w-full max-w-[1400px] flex-1 px-4 py-6 sm:px-6 lg:px-8 lg:py-8">{children}</main>
      </div>
    </div>
  )
}

export function PageHeader({
  title,
  description,
  actions,
}: {
  title: string
  description?: React.ReactNode
  actions?: React.ReactNode
}) {
  return (
    <div className="mb-6 flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
      <div className="min-w-0">
        <h1 className="text-2xl font-semibold tracking-tight text-foreground">{title}</h1>
        {description ? <p className="mt-1 text-sm text-muted-foreground">{description}</p> : null}
      </div>
      {actions ? <div className="flex flex-wrap items-center gap-2">{actions}</div> : null}
    </div>
  )
}
```

### `components/dashboard/ui.tsx`

```tsx
/**
 * bpublish Dashboard: 기본 부품
 * 비퍼블리시(bpublish)가 만든 대시보드 디자인 · https://www.bpublish.com/designs/dashboard
 * 디자인 규칙은 같은 폴더의 AGENTS.md 에 있다. 새 화면도 이 부품으로 만든다.
 */
import * as React from 'react'

export function cx(...v: Array<string | false | null | undefined>) {
  return v.filter(Boolean).join(' ')
}

/* ── 카드 ───────────────────────────────────────────────────────── */

export function Card({ className, ...props }: React.ComponentProps<'section'>) {
  return (
    <section
      className={cx(
        'rounded-xl border border-border bg-card text-card-foreground shadow-[0_1px_2px_0_rgb(16_24_40/0.04)]',
        className,
      )}
      {...props}
    />
  )
}

export function CardHeader({
  title,
  description,
  action,
  className,
}: {
  title: React.ReactNode
  description?: React.ReactNode
  action?: React.ReactNode
  className?: string
}) {
  return (
    <header className={cx('flex items-start justify-between gap-4 px-5 pt-5', className)}>
      <div className="min-w-0">
        <h2 className="text-sm font-semibold tracking-tight text-foreground">{title}</h2>
        {description ? <p className="mt-1 text-[13px] leading-5 text-muted-foreground">{description}</p> : null}
      </div>
      {action ? <div className="flex shrink-0 items-center gap-2">{action}</div> : null}
    </header>
  )
}

/* ── 배지 ───────────────────────────────────────────────────────── */

export type Tone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger'

const toneClass: Record<Tone, string> = {
  neutral: 'bg-muted text-muted-foreground',
  primary: 'bg-primary/10 text-primary',
  success: 'bg-success/12 text-success',
  warning: 'bg-warning/15 text-warning-foreground dark:text-warning',
  danger: 'bg-destructive/10 text-destructive',
}

export function Badge({
  tone = 'neutral',
  dot = false,
  className,
  children,
}: {
  tone?: Tone
  dot?: boolean
  className?: string
  children: React.ReactNode
}) {
  return (
    <span
      className={cx(
        'inline-flex h-6 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium whitespace-nowrap',
        toneClass[tone],
        className,
      )}
    >
      {dot ? <span aria-hidden className="size-1.5 rounded-full bg-current" /> : null}
      {children}
    </span>
  )
}

/* ── 버튼 ───────────────────────────────────────────────────────── */

type ButtonVariant = 'primary' | 'outline' | 'ghost'
type ButtonSize = 'sm' | 'md' | 'icon'

const variantClass: Record<ButtonVariant, string> = {
  primary: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow-[0_1px_2px_0_rgb(16_24_40/0.08)]',
  outline:
    'border border-border bg-card text-foreground hover:bg-accent shadow-[0_1px_2px_0_rgb(16_24_40/0.04)]',
  ghost: 'text-muted-foreground hover:bg-accent hover:text-foreground',
}

const sizeClass: Record<ButtonSize, string> = {
  sm: 'h-8 gap-1.5 rounded-lg px-3 text-[13px]',
  md: 'h-9 gap-2 rounded-lg px-3.5 text-sm',
  icon: 'size-9 rounded-lg',
}

export function Button({
  variant = 'outline',
  size = 'md',
  className,
  type = 'button',
  ...props
}: React.ComponentProps<'button'> & { variant?: ButtonVariant; size?: ButtonSize }) {
  return (
    <button
      type={type}
      className={cx(
        'inline-flex shrink-0 items-center justify-center font-medium whitespace-nowrap transition-colors outline-none',
        'focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background',
        'disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0',
        variantClass[variant],
        sizeClass[size],
        className,
      )}
      {...props}
    />
  )
}

/* ── 기간 고르기 같은 짧은 선택지 ────────────────────────────────────── */

export function Segmented<T extends string>({
  value,
  options,
  onChange,
  label,
  className,
}: {
  value: T
  options: ReadonlyArray<{ value: T; label: string }>
  onChange: (v: T) => void
  label: string
  className?: string
}) {
  return (
    <div
      role="radiogroup"
      aria-label={label}
      className={cx('inline-flex h-9 items-center rounded-lg border border-border bg-muted p-0.5', className)}
    >
      {options.map((o) => {
        const on = o.value === value
        return (
          <button
            key={o.value}
            type="button"
            role="radio"
            aria-checked={on}
            onClick={() => onChange(o.value)}
            className={cx(
              'h-full rounded-md px-3 text-[13px] font-medium transition-all outline-none',
              'focus-visible:ring-2 focus-visible:ring-ring/60',
              on
                ? 'bg-card text-foreground shadow-[0_1px_2px_0_rgb(16_24_40/0.08)] dark:bg-accent'
                : 'text-muted-foreground hover:text-foreground',
            )}
          >
            {o.label}
          </button>
        )
      })}
    </div>
  )
}

/* ── 아바타 ─────────────────────────────────────────────────────── */

const avatarHues = [226, 160, 75, 295, 25, 200]

/**
 * 색조(--h) 하나로 밝은 화면·어두운 화면 모두에 맞는 옅은 바탕과 글자색.
 * 아바타, 상품 번호처럼 구분만 필요한 작은 칸에 쓴다. style={{ '--h': 160 }} 과 함께.
 */
export const tint =
  'bg-[oklch(0.94_0.035_var(--h))] text-[oklch(0.42_0.08_var(--h))] dark:bg-[oklch(0.3_0.045_var(--h))] dark:text-[oklch(0.86_0.07_var(--h))]'

export function Avatar({ name, size = 32, className }: { name: string; size?: number; className?: string }) {
  let h = 0
  for (const ch of name) h = (h * 31 + ch.charCodeAt(0)) >>> 0
  const hue = avatarHues[h % avatarHues.length]
  return (
    <span
      aria-hidden
      className={cx('inline-grid shrink-0 place-items-center rounded-full font-semibold', tint, className)}
      style={{ width: size, height: size, fontSize: Math.round(size * 0.4), '--h': hue } as React.CSSProperties}
    >
      {name.slice(0, 1)}
    </span>
  )
}

/* ── 증감 표시 ──────────────────────────────────────────────────── */

export function Delta({ value, className }: { value: number; className?: string }) {
  const up = value >= 0
  return (
    <span
      className={cx(
        'inline-flex h-5 items-center gap-0.5 rounded-md px-1.5 text-xs font-semibold tabular-nums',
        up ? 'bg-success/12 text-success' : 'bg-destructive/10 text-destructive',
        className,
      )}
    >
      <svg aria-hidden viewBox="0 0 12 12" className={cx('size-3', !up && 'rotate-180')}>
        <path d="M6 2.5 9.5 7h-7L6 2.5Z" fill="currentColor" />
      </svg>
      {Math.abs(value).toFixed(1)}%
      <span className="sr-only">{up ? '증가' : '감소'}</span>
    </span>
  )
}

/* ── 진행 막대 ──────────────────────────────────────────────────── */

export function Progress({ value, className }: { value: number; className?: string }) {
  const v = Math.max(0, Math.min(100, value))
  return (
    <div
      role="progressbar"
      aria-valuemin={0}
      aria-valuemax={100}
      aria-valuenow={Math.round(v)}
      className={cx('h-1.5 w-full overflow-hidden rounded-full bg-muted', className)}
    >
      <div className="h-full rounded-full bg-primary transition-[width] duration-700" style={{ width: `${v}%` }} />
    </div>
  )
}
```

### `app/dashboard/page.tsx`

```tsx
import { Dashboard } from '@/components/dashboard/dashboard'

export const metadata = { title: '대시보드' }

export default function DashboardPage() {
  return <Dashboard />
}
```
