Design
Layout System
Grid system, sidebar, responsive breakpoints, and layout patterns.
Dashboard App Shell
css
.app {
display: grid;
grid-template-columns: 240px 1fr;
height: 100vh;
overflow: hidden;
}
Sidebar (240px, collapsible on tablet)
css
.side {
background: var(--side);
border-right: 1px solid var(--line);
display: flex;
flex-direction: column;
padding: 16px 12px;
}
Main Content
css
.main {
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--bg);
}
.top {
height: 56px;
border-bottom: 1px solid var(--line);
display: flex;
align-items: center;
gap: 14px;
padding: 0 22px;
flex: none;
}
.content {
flex: 1;
overflow: auto;
padding: 22px;
}
Responsive Breakpoints
| Breakpoint | Behavior |
|---|---|
> 1024px | Full sidebar + main layout |
≤ 1024px | Sidebar becomes off-canvas drawer, main goes full-width |
≤ 768px | Phone layout: hide breadcrumbs, time range, env toggle; KPIs 2-col |
≤ 480px | KPIs 1-col, buttons full-width |
Drawer (Tablet)
css
@media(max-width:1024px) {
.app { grid-template-columns: 1fr; height: 100dvh; }
.side {
position: fixed; top: 0; left: 0; bottom: 0;
width: 264px; z-index: 300;
transform: translateX(-100%);
transition: transform .22s cubic-bezier(.2,.8,.2,1);
box-shadow: var(--sh-md);
}
.app.nav-open .side { transform: none; }
.menu-btn { display: grid; }
}
Landing Page Layout
Container
css
.wrap {
max-width: 1140px;
margin: 0 auto;
padding: 0 24px;
}
Section Spacing
css
section {
padding: clamp(64px, 8vw, 96px) 0;
}
Section Header
css
.sec-head {
max-width: 680px;
margin-bottom: 48px;
}
.sec-head.c { /* centered */
margin-left: auto;
margin-right: auto;
text-align: center;
}
Common Grid Patterns
| Pattern | Grid Template |
|---|---|
| KPIs (4-col) | repeat(4, 1fr) |
| KPIs (2-col mobile) | repeat(2, 1fr) |
| Product cards (3-col) | repeat(3, 1fr) |
| Split (list + detail) | 300px 1fr |
| Detail grid (span tree + inspect) | 1.5fr 1fr |
| Cost split | 1fr 1fr |
| Governance split | 1.3fr 1fr |
| Settings grid | 1fr 1fr |
| Prompt editor | 300px 1fr |
Content Flow
- Top bar — fixed 56px, title + search + env toggle
- Content — scrollable, padded 22px
- Page header — title + description + action buttons
- KPI row — 4 cards, always first
- Filter bar — chips + rate counter
- Table — full-width, sticky head row
- Detail panels — grid 1.5fr/1fr, sticky inspector