Files
yolkbook/nginx/html/css/style.css
derekc 4172b63dc2 Add footer with CHNS.tech credit and Buy Me a Coffee button
Adds a green footer (matching nav colour) to all authenticated pages
with a "Created by: CHNS.tech" link and a styled BMC button. CSP updated
to allow buymeacoffee CDN domains.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:50:30 -07:00

464 lines
14 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;
min-height: 100vh;
display: flex;
flex-direction: column;
}
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;
flex: 1;
width: 100%;
}
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"],
input[type="password"],
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; }
.nav-username { display: none; }
}
/* ── Nav user section ─────────────────────────────────────────────────────── */
.nav-user {
margin-left: auto;
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
.nav-username {
color: rgba(255,255,255,0.85);
font-size: 0.88rem;
white-space: nowrap;
}
.nav-impersonating {
color: #ffe08a;
font-size: 0.85rem;
white-space: nowrap;
}
.nav-admin-btn {
color: rgba(255,255,255,0.85) !important;
border-color: rgba(255,255,255,0.35) !important;
}
.nav-admin-btn:hover {
background: rgba(255,255,255,0.15) !important;
color: #fff !important;
}
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: #b8720a; }
/* ── Login page ───────────────────────────────────────────────────────────── */
.login-body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: var(--bg);
}
.login-container {
width: 100%;
max-width: 380px;
padding: 0 1rem;
}
.login-brand {
text-align: center;
font-size: 1.6rem;
font-weight: 700;
color: var(--green);
margin-bottom: 1.5rem;
}
.login-card { padding: 2rem; }
.login-title {
text-align: center;
font-size: 1.3rem;
margin-bottom: 1.25rem;
}
/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.45);
display: flex;
align-items: center;
justify-content: center;
z-index: 500;
padding: 1rem;
}
.modal-box {
background: var(--card-bg);
border-radius: var(--radius);
padding: 1.75rem;
width: 100%;
max-width: 420px;
box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal-box h2 { margin-bottom: 1rem; }
/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
display: inline-block;
padding: 0.2rem 0.55rem;
border-radius: 99px;
font-size: 0.75rem;
font-weight: 600;
}
.badge-admin { background: #d4edff; color: #0055aa; }
.badge-user { background: #e8f5e9; color: #2e6b3e; }
.badge-active { background: #d4edda; color: #155724; }
.badge-disabled { background: #f8d7da; color: #721c24; }
/* ── Settings modal extras ────────────────────────────────────────────────── */
.settings-section-title {
font-size: 0.95rem;
font-weight: 600;
color: var(--green-dark);
margin-bottom: 0.75rem;
}
.settings-divider {
border: none;
border-top: 1px solid var(--border);
margin: 1.25rem 0;
}
/* ── Offline banner ───────────────────────────────────────────────────────── */
#offline-banner {
position: fixed;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
background: #333;
color: #fff;
padding: 0.5rem 1.25rem;
border-radius: 99px;
font-size: 0.875rem;
z-index: 1000;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
/* ── Session expiry warning ───────────────────────────────────────────────── */
#session-warning {
background: #fff3cd;
color: #856404;
border-bottom: 1px solid #ffc107;
padding: 0.5rem 1.5rem;
font-size: 0.875rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
#session-warning button {
background: none;
border: none;
font-size: 1rem;
cursor: pointer;
color: inherit;
padding: 0 0.25rem;
line-height: 1;
}
/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
background: var(--green);
color: rgba(255,255,255,0.85);
padding: 1rem 1.5rem;
display: flex;
align-items: center;
justify-content: center;
gap: 1.25rem;
flex-wrap: wrap;
font-size: 0.9rem;
margin-top: auto;
}
.site-footer a {
color: #fff;
font-weight: 600;
text-decoration: none;
}
.site-footer a:hover {
text-decoration: underline;
}
.bmc-btn {
display: inline-block;
background: #d4850a;
color: #000 !important;
font-family: Arial, sans-serif;
font-size: 0.8rem;
font-weight: 700;
padding: 0.3rem 0.75rem;
border-radius: 6px;
border: 1px solid rgba(0,0,0,0.3);
white-space: nowrap;
text-decoration: none !important;
}
.bmc-btn:hover {
background: #c07609;
text-decoration: none !important;
}