Initial scaffold: wages app

Full wage cost reporting app — weekly/monthly views, rolling 12-week/12-month
history, budget management, Workforce API sync with SSE backfill, net sales
via forecasting public API, department filter, CSV export.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-23 09:03:52 +00:00
commit 2e0592eb90
37 changed files with 3078 additions and 0 deletions

325
frontend/src/index.css Normal file
View file

@ -0,0 +1,325 @@
/* Stack design system tokens */
:root {
--navy: #1a1a2e;
--gold: #c9a84c;
--body-bg: #f4f5f7;
--card-bg: #ffffff;
--text-primary: #1a1a2e;
--text-muted: #6b7280;
--border: #e5e7eb;
--radius: 8px;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
--shadow-md: 0 4px 12px rgba(0,0,0,0.12);
/* App theme — dark green for finance */
--app-primary: #065f46;
--app-primary-light: #059669;
--app-primary-dark: #064e3b;
/* UpdateBanner aliases */
--sidebar: var(--navy);
--text-light: #ffffff;
--accent: var(--gold);
/* Layout */
--sidebar-w: 200px;
--topbar-h: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body, #root {
height: 100%;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--body-bg);
color: var(--text-primary);
font-size: 14px;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
/* ── App shell ──────────────────────────────────────────────────── */
.app-shell {
display: flex;
height: 100vh;
overflow: hidden;
}
/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
width: var(--sidebar-w);
background: var(--navy);
display: flex;
flex-direction: column;
flex-shrink: 0;
overflow-y: auto;
}
.sidebar-logo {
padding: 20px 16px 12px;
color: var(--gold);
font-size: 13px;
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
border-bottom: 1px solid rgba(255,255,255,0.08);
display: flex;
align-items: center;
gap: 8px;
}
.sidebar-nav {
padding: 8px 0;
flex: 1;
}
.nav-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 16px;
color: rgba(255,255,255,0.65);
cursor: pointer;
font-size: 13px;
border-left: 3px solid transparent;
transition: all 0.15s;
user-select: none;
}
.nav-item:hover {
background: rgba(255,255,255,0.06);
color: rgba(255,255,255,0.9);
}
.nav-item.active {
background: rgba(201,168,76,0.12);
color: var(--gold);
border-left-color: var(--gold);
font-weight: 500;
}
/* ── Content area ───────────────────────────────────────────────── */
.content {
flex: 1;
overflow-y: auto;
padding: 24px;
}
/* ── Cards ──────────────────────────────────────────────────────── */
.card {
background: var(--card-bg);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
padding: 20px;
margin-bottom: 20px;
}
.card-title {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
margin: 0 0 16px;
}
/* ── Summary cards ──────────────────────────────────────────────── */
.summary-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 14px;
margin-bottom: 20px;
}
.summary-card {
background: var(--card-bg);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
padding: 16px;
}
.summary-card .label {
font-size: 11px;
font-weight: 500;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 6px;
}
.summary-card .value {
font-size: 22px;
font-weight: 700;
color: var(--text-primary);
line-height: 1.1;
}
.summary-card .sub {
font-size: 11px;
color: var(--text-muted);
margin-top: 4px;
}
/* ── Tables ─────────────────────────────────────────────────────── */
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.data-table th {
text-align: left;
padding: 8px 12px;
font-size: 11px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
border-bottom: 1px solid var(--border);
white-space: nowrap;
}
.data-table th.right,
.data-table td.right { text-align: right; }
.data-table td {
padding: 9px 12px;
border-bottom: 1px solid var(--border);
color: var(--text-primary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.total-row td {
font-weight: 700;
border-top: 2px solid var(--border);
border-bottom: none;
}
.data-table tr:hover:not(.total-row) td {
background: var(--body-bg);
}
/* ── Traffic lights ─────────────────────────────────────────────── */
.pct-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
font-size: 12px;
font-weight: 600;
}
.pct-green { background: #d1fae5; color: #065f46; }
.pct-amber { background: #fef3c7; color: #92400e; }
.pct-red { background: #fee2e2; color: #991b1b; }
.variance-over { color: #dc2626; font-weight: 600; }
.variance-under { color: #059669; font-weight: 600; }
/* ── Partial / forecast ─────────────────────────────────────────── */
.partial-badge {
display: inline-block;
font-size: 10px;
font-weight: 500;
color: var(--text-muted);
background: var(--body-bg);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 6px;
margin-left: 6px;
vertical-align: middle;
}
/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
border-radius: var(--radius);
font-size: 13px;
font-weight: 500;
cursor: pointer;
border: none;
transition: opacity 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover:not(:disabled) { opacity: 0.88; }
.btn-primary {
background: var(--app-primary);
color: #fff;
}
.btn-secondary {
background: var(--body-bg);
color: var(--text-primary);
border: 1px solid var(--border);
}
.btn-gold {
background: var(--gold);
color: var(--navy);
}
/* ── Page header ────────────────────────────────────────────────── */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.page-title {
font-size: 20px;
font-weight: 700;
color: var(--text-primary);
margin: 0;
}
/* ── Week / month selector ──────────────────────────────────────── */
.period-nav {
display: flex;
align-items: center;
gap: 10px;
}
.period-label {
font-size: 14px;
font-weight: 600;
min-width: 150px;
text-align: center;
}
/* ── Form elements ──────────────────────────────────────────────── */
input[type="number"], input[type="text"] {
width: 100%;
padding: 6px 10px;
border: 1px solid var(--border);
border-radius: 6px;
font-size: 13px;
color: var(--text-primary);
background: var(--card-bg);
}
input[type="number"]:focus,
input[type="text"]:focus {
outline: 2px solid var(--app-primary-light);
border-color: var(--app-primary-light);
}
/* ── Footnote ───────────────────────────────────────────────────── */
.footnote {
font-size: 11px;
color: var(--text-muted);
margin-top: 8px;
font-style: italic;
}
/* ── Loading/error states ───────────────────────────────────────── */
.state-center {
display: flex;
align-items: center;
justify-content: center;
height: 200px;
color: var(--text-muted);
font-size: 14px;
}