Files
eggtracker/nginx/html/css/style.css
derekc 492e1fd68f Initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 22:27:58 -08:00

263 lines
8.8 KiB
CSS

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
--green: #3d6b4f;
--green-dark: #2e5240;
--amber: #d4850a;
--bg: #f7f4ef;
--card-bg: #ffffff;
--border: #ddd6cc;
--text: #2c2c2c;
--muted: #6b6b6b;
--danger: #b83232;
--danger-dark: #962828;
--radius: 8px;
--shadow: 0 2px 8px rgba(0,0,0,0.08);
--nav-h: 56px;
}
/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.5;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
height: var(--nav-h);
background: var(--green);
display: flex;
align-items: center;
padding: 0 1.5rem;
gap: 2rem;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-brand {
font-size: 1.2rem;
font-weight: 700;
color: #fff;
white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }
.nav-links {
display: flex;
gap: 0.25rem;
list-style: none;
}
.nav-links a {
color: rgba(255,255,255,0.8);
padding: 0.4rem 0.75rem;
border-radius: 4px;
font-size: 0.95rem;
transition: background 0.15s, color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
background: rgba(255,255,255,0.18);
color: #fff;
text-decoration: none;
}
/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
max-width: 980px;
margin: 0 auto;
padding: 2rem 1.5rem;
}
h1 { font-size: 1.6rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.15rem; margin-bottom: 1rem; color: var(--green-dark); }
/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.stat-card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.25rem 1rem;
text-align: center;
box-shadow: var(--shadow);
}
.stat-card .label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--muted);
margin-bottom: 0.4rem;
}
.stat-card .value {
font-size: 2rem;
font-weight: 700;
color: var(--green);
line-height: 1.1;
}
.stat-card .unit {
font-size: 0.78rem;
color: var(--muted);
margin-top: 0.2rem;
}
.stat-card.accent .value { color: var(--amber); }
/* ── Cards / sections ────────────────────────────────────────────────────── */
.card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
box-shadow: var(--shadow);
margin-bottom: 2rem;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
width: 100%;
border-collapse: collapse;
background: var(--card-bg);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
font-size: 0.93rem;
}
thead { background: var(--green); color: #fff; }
th, td { padding: 0.7rem 1rem; text-align: left; }
th { font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; }
tbody tr:nth-child(even) { background: #f9f7f4; }
tbody tr:hover { background: #f0ebe3; }
td.notes { color: var(--muted); font-style: italic; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { white-space: nowrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 2rem; font-style: italic; }
.total-row td { font-weight: 600; background: #ede8e0 !important; }
/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
gap: 1rem;
align-items: end;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.span-full { grid-column: 1 / -1; }
label { font-size: 0.875rem; font-weight: 500; }
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
padding: 0.5rem 0.75rem;
border: 1px solid var(--border);
border-radius: 4px;
font-size: 0.93rem;
font-family: inherit;
background: #fff;
color: var(--text);
transition: border-color 0.15s, box-shadow 0.15s;
width: 100%;
}
input:focus, textarea:focus, select:focus {
outline: none;
border-color: var(--green);
box-shadow: 0 0 0 3px rgba(61,107,79,0.12);
}
textarea { resize: vertical; min-height: 68px; }
/* Inline edit inputs inside table cells */
td input[type="text"],
td input[type="number"],
td input[type="date"] {
padding: 0.3rem 0.5rem;
font-size: 0.88rem;
min-width: 80px;
}
/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
display: inline-block;
padding: 0.5rem 1.1rem;
border: none;
border-radius: 4px;
font-size: 0.9rem;
font-family: inherit;
font-weight: 500;
cursor: pointer;
transition: background 0.15s;
white-space: nowrap;
line-height: 1.4;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: #ede8e0; }
.btn-sm { padding: 0.28rem 0.65rem; font-size: 0.8rem; }
/* ── Messages ────────────────────────────────────────────────────────────── */
.message {
padding: 0.75rem 1rem;
border-radius: 4px;
margin-bottom: 1rem;
font-size: 0.9rem;
display: none;
}
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.message.visible { display: block; }
/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
display: flex;
gap: 0.75rem;
align-items: flex-end;
flex-wrap: wrap;
margin-bottom: 1rem;
}
.filter-bar .form-group { min-width: 140px; }
/* ── Misc ────────────────────────────────────────────────────────────────── */
.text-muted { color: var(--muted); font-size: 0.9rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
/* ── Mobile nav ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
.nav { gap: 0.5rem; padding: 0 0.75rem; }
.nav-brand span { display: none; } /* hide text, keep emoji */
.nav-links { overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { padding: 0.4rem 0.55rem; font-size: 0.82rem; white-space: nowrap; }
}