# Layout Examples & Best Practices

## Standard App Layout
```html
<body class="app-body">
  <header class="header tester"><!-- Navigation --></header>
  <main class="main-content">
    <aside class="sidebar tester"><!-- Sidebar --></aside>
    <div class="content-area"><!-- Page content --></div>
  </main>
  <footer class="actionbar"><!-- Action buttons --></footer>
</body>
```

## Layout with Metasidebar
```html
<main class="main-content">
  <aside class="sidebar">...</aside>
  <div class="content-area">
    <div class="page-content">...</div>
  </div>
  <aside class="metasidebar"><!-- Related info panel --></aside>
</main>
```

## Splitview Layout
```html
<div class="splitview">
  <div class="splitview-list"><!-- List of items --></div>
  <div class="splitview-detail"><!-- Selected item detail --></div>
</div>
```

## Chat Layout
```html
<div class="chat-window">
  <div class="chat-window-header"><h3>Chat</h3></div>
  <div class="chat-window-messages">
    <div class="list-chat-messages"><!-- Messages --></div>
  </div>
  <div class="chat-window-input">
    <textarea class="form-control" placeholder="Type..."></textarea>
    <button class="btn btn-primary">Send</button>
  </div>
</div>
```

---

## Best Practices

### Layout Structure
- Use semantic HTML5 elements
- Apply layout classes: `header`, `sidebar`, `main-content`, `actionbar`
- Choose the correct portal variant (`tester`, `customer`, `manager`)

### Components
- Use semantic button types (`btn-primary`, `btn-success`, `btn-danger`)
- Apply consistent spacing with the spacing scale (`mt-xs`, `mb-sm`, `p-md`, etc.)
- Use `.form-grid` for form layouts with `.form-group` wrappers

### Icons
- Add `mr-icon-spacing` for icons that precede text
- Match icon color with surrounding text (inherited)
- Choose appropriate icon size for context

### Accessibility
- Include ARIA labels where needed
- Use `<label>` with `for` attributes on all form fields
- Maintain proper heading hierarchy
- Add `alt` text to images

### Responsive
- Use Bootstrap grid: `col-12 col-md-6 col-lg-4`
- Mobile-first approach

---

## Portal-Specific Guidelines

| Portal | Theme | Focus |
|--------|-------|-------|
| **Tester** (`header tester`, `sidebar tester`) | Purple accents, dark nav | Profile, earnings, statistics |
| **Customer** (`header customer`) | Teal/dark | Product, test management |
| **Manager** (`header manager`) | Light theme | Admin, team, project management |
