straighten
Spacing Scale
Base Unit: 8px is the fundamental spacing unit. All layout spacing uses multiples of 8px.
spacing.none
0px
None
Adjacent
spacing.xs
4px
XS
Icon ↔ label
spacing.sm
8px
SM · Base
Tight related
spacing.mid
12px
MID
Component internals
spacing.md
16px
MD
Form fields · gutters
spacing.lg
24px
LG
Form spacing · large components
spacing.xl
32px
XL
Section breaks
spacing.xxl
40px
XXL
Page margins · modals
grid_on
8px Grid Rule
All layout spacing must be a multiple of 8px — creating consistent vertical and horizontal rhythm across the entire application.
16px between fields
24px card padding
40px page margins
warning_amber
4px Exception
4px is allowed only for related content within a single component — never for layout spacing between components or sections.
icon → label gap
label → value gap
between sections ✗
grid_view
Layout Grid System
AHTG uses a 12-column flexbox grid with 16px gutters and 16px page margins. The fixed navigation sidebar sits outside the grid. All content containers are expressed as column spans within the main content area.
Nav Sidebar
Fixed — outside grid
12-Column Reference
1
2
3
4
5
6
7
8
9
10
11
12
Page Layout Hierarchy
localhost:8888 / dashboard
Page Header / Toolbar
12 cols
Breadcrumb & Page Title
12 cols
Metric Card
3 cols
Metric Card
3 cols
Metric Card
3 cols
Metric Card
3 cols
Primary Content (Data Table / Chart)
8 cols
Secondary Panel
4 cols
Section A
6 cols
Section B
6 cols
16px margins left & right of content area
16px gutter between every column
8px gap between content rows
Toolbar / Header (12 cols)
Metric Cards (3 cols each)
Equal Sections (6 + 6 cols)
Header Navigation — Full Page Width Layout
localhost:8888 / projects
Dashboard
Projects
Workers
Timecards
Reports
GLOBAL HEADER NAV — FULL VIEWPORT WIDTH (outside 12-col grid)
Metric Card
3 cols
Metric Card
3 cols
Metric Card
3 cols
Metric Card
3 cols
Full-Width Data Table / Primary Content
12 cols
Summary Panel A
6 cols
Summary Panel B
6 cols
Full width global header nav sits outside & above the 12-col grid at full viewport width
16px grid margins begin below the header for all page content
12 cols content now fills the full available width (no sidebar offset)
Common Column Span Patterns
Full Width — 12/12
Page headers, toolbars, data tables, breadcrumbs
Two Equal — 6 + 6
Side-by-side form sections, two-panel layouts
Main + Side — 8 + 4
Content area with supporting sidebar or filter panel
Three Equal — 4 + 4 + 4
Three-up card rows, form field triads
Four Equal — 3 + 3 + 3 + 3
Metric card rows (primary dashboard pattern)
Asymmetric — 9 + 3
Wide content with narrow supporting info column
open_in_new
Modal Layout
Modals come in two fixed widths — 900px (large) and 500px (small). Both use 40px internal padding on all sides and a 16px gutter between content areas. The grid inside a modal follows the same 12-column structure scaled to the modal's content width.
Internal Padding
40px all sides
Modal Size Comparison
Large — 900px
Complex forms, multi-section content, data entry
Small — 500px
Confirmations, simple forms, single-field entry
Large Modal — Internal Grid Hierarchy
localhost:8888 / workers/add
Department 4
Start Date 4
Pay Rate 4
Notes / Description 12 cols
40px modal internal padding (all sides)
16px gutter between form field columns
6px gap between field rows
12 cols full-width: section headers, textareas, notes
6 + 6 paired fields (name, date ranges)
8 + 4 primary field + short select
4+4+4 three short fields in a row
apps
Application Examples
Form Layouts:
- Between form fields: 16px (md)
- Between form sections: 32px (xl)
- Form padding: 24px (lg)
- Label to input: 8px (sm)
Cards & Containers:
- Card padding: 24px (lg)
- Between cards: 16px (md)
- Card title to content: 16px (md)
Lists & Tables:
- List item height: 48px (minimum)
- List item padding: 16px (md)
- Between list items: 0px or 8px (sm)
- Table cell padding: 16px (md)
Page Layout:
- Page margins: 40px (xxl)
- Section spacing: 32px (xl)
- Content max-width: 1200-1400px