Initial commit: Sproutly plant tracking app

This commit is contained in:
2026-03-08 23:27:16 -07:00
commit 4f66102bbb
20 changed files with 2643 additions and 0 deletions

630
nginx/html/css/style.css Normal file
View File

@@ -0,0 +1,630 @@
/* ===== CSS Custom Properties ===== */
:root {
--green-darkest: #1b4332;
--green-dark: #2d6a4f;
--green-mid: #40916c;
--green-light: #52b788;
--green-pale: #95d5b2;
--green-ghost: #d8f3dc;
--green-bg: #f0f9f4;
--amber: #f4a261;
--amber-dark: #e76f51;
--yellow: #e9c46a;
--surface: #ffffff;
--surface-alt: #f8fafb;
--border: #e2ece7;
--text: #1b4332;
--text-muted: #5f7a6e;
--text-light: #94b5a5;
--danger: #e63946;
--blue: #2d9cdb;
--radius: 10px;
--radius-sm: 6px;
--shadow: 0 2px 8px rgba(27,67,50,0.08);
--shadow-lg: 0 8px 24px rgba(27,67,50,0.12);
--sidebar-w: 220px;
}
/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--green-bg);
color: var(--text);
display: flex;
min-height: 100vh;
line-height: 1.5;
}
a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ===== Sidebar ===== */
.sidebar {
width: var(--sidebar-w);
background: var(--green-darkest);
color: #d8f3dc;
display: flex;
flex-direction: column;
position: fixed;
top: 0; left: 0; bottom: 0;
z-index: 100;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 1.4rem 1.2rem 1rem;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-icon { font-size: 1.6rem; }
.brand-name {
font-size: 1.25rem;
font-weight: 700;
color: #fff;
letter-spacing: 0.02em;
}
.sidebar-nav {
flex: 1;
padding: 0.8rem 0.6rem;
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.nav-link {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.6rem 0.8rem;
border-radius: var(--radius-sm);
color: var(--green-pale);
font-size: 0.9rem;
font-weight: 500;
transition: background 0.15s, color 0.15s;
text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--green-dark); color: #fff; }
.nav-icon { font-size: 1rem; width: 1.2rem; text-align: center; }
.sidebar-footer {
padding: 1rem 1.2rem;
font-size: 0.75rem;
color: var(--text-light);
border-top: 1px solid rgba(255,255,255,0.06);
}
/* ===== Main Content ===== */
.main-content {
margin-left: var(--sidebar-w);
flex: 1;
padding: 2rem;
max-width: 1200px;
}
.page { display: none; }
.page.active { display: block; }
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.5rem;
flex-wrap: wrap;
gap: 1rem;
}
.page-title {
font-size: 1.6rem;
font-weight: 700;
color: var(--green-darkest);
}
.page-subtitle {
color: var(--text-muted);
font-size: 0.9rem;
margin-top: 0.2rem;
}
/* ===== Stats Row ===== */
.stats-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
margin-bottom: 2rem;
}
.stat-card {
background: var(--surface);
border-radius: var(--radius);
padding: 1.2rem 1.4rem;
box-shadow: var(--shadow);
border-left: 4px solid var(--green-light);
}
.stat-card.accent { border-left-color: var(--amber); }
.stat-card.green { border-left-color: var(--green-mid); }
.stat-card.warn { border-left-color: var(--amber-dark); }
.stat-value {
font-size: 2rem;
font-weight: 700;
color: var(--green-darkest);
line-height: 1;
}
.stat-label {
font-size: 0.78rem;
color: var(--text-muted);
margin-top: 0.3rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* ===== Section Header ===== */
.section-header {
display: flex;
align-items: center;
gap: 0.8rem;
margin-bottom: 0.8rem;
}
.section-header h2 {
font-size: 1.05rem;
font-weight: 600;
color: var(--green-dark);
}
.hint-text { font-size: 0.8rem; color: var(--text-light); }
/* ===== Tasks ===== */
.tasks-group { margin-bottom: 1rem; }
.tasks-group-label {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 0.4rem;
padding: 0.2rem 0.6rem;
border-radius: 20px;
display: inline-block;
}
.tasks-group-label.overdue { background: #fde8e8; color: var(--danger); }
.tasks-group-label.today { background: #fff3e0; color: #c85000; }
.tasks-group-label.week { background: #e8f5e9; color: var(--green-dark); }
.tasks-group-label.month { background: var(--green-ghost); color: var(--green-dark); }
.task-list { display: flex; flex-direction: column; gap: 0.5rem; }
.task-card {
background: var(--surface);
border-radius: var(--radius);
padding: 0.75rem 1rem;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 1rem;
border-left: 4px solid var(--green-light);
transition: transform 0.1s;
}
.task-card:hover { transform: translateX(2px); }
.task-card.overdue { border-left-color: var(--danger); }
.task-card.today { border-left-color: var(--amber); }
.task-card.week { border-left-color: var(--green-light); }
.task-card.month { border-left-color: var(--green-ghost); }
.task-dot {
width: 12px; height: 12px;
border-radius: 50%;
flex-shrink: 0;
}
.task-info { flex: 1; }
.task-title { font-weight: 600; font-size: 0.92rem; }
.task-detail { font-size: 0.8rem; color: var(--text-muted); }
.task-date {
font-size: 0.78rem;
color: var(--text-light);
white-space: nowrap;
text-align: right;
}
.task-date.overdue { color: var(--danger); font-weight: 600; }
/* ===== Frost Badge ===== */
.badge-frost {
background: #e3f2fd;
color: #1565c0;
font-size: 0.78rem;
font-weight: 600;
padding: 0.25rem 0.7rem;
border-radius: 20px;
}
/* ===== Timeline ===== */
.timeline-wrapper {
background: var(--surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 1rem 1.2rem;
overflow-x: auto;
}
.timeline-months {
display: grid;
grid-template-columns: 120px repeat(12, 1fr);
font-size: 0.7rem;
color: var(--text-muted);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
border-bottom: 1px solid var(--border);
padding-bottom: 0.4rem;
margin-bottom: 0.4rem;
min-width: 700px;
}
.timeline-months > span:first-child { color: transparent; }
.timeline-row {
display: grid;
grid-template-columns: 120px repeat(365, 1fr);
align-items: center;
height: 26px;
position: relative;
min-width: 700px;
}
.timeline-label {
font-size: 0.78rem;
font-weight: 500;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
grid-column: 1;
padding-right: 0.5rem;
}
.timeline-bar-area {
grid-column: 2 / -1;
position: relative;
height: 18px;
}
.timeline-segment {
position: absolute;
height: 100%;
border-radius: 3px;
opacity: 0.85;
}
.timeline-today-line {
position: absolute;
top: 0; bottom: 0;
width: 2px;
background: var(--amber-dark);
z-index: 5;
pointer-events: none;
}
.timeline-today-line::after {
content: 'Today';
position: absolute;
top: -18px;
left: 50%;
transform: translateX(-50%);
font-size: 0.65rem;
color: var(--amber-dark);
white-space: nowrap;
font-weight: 700;
}
/* ===== Batch Cards ===== */
.batch-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 1rem;
}
.batch-card {
background: var(--surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
transition: box-shadow 0.2s;
}
.batch-card:hover { box-shadow: var(--shadow-lg); }
.batch-card-top {
height: 6px;
}
.batch-card-body { padding: 1rem; }
.batch-card-name {
font-weight: 600;
font-size: 1rem;
margin-bottom: 0.2rem;
}
.batch-card-variety {
font-size: 0.8rem;
color: var(--text-muted);
margin-bottom: 0.6rem;
}
.batch-card-meta {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-bottom: 0.8rem;
}
.batch-meta-item {
font-size: 0.75rem;
color: var(--text-muted);
background: var(--green-bg);
padding: 0.15rem 0.5rem;
border-radius: 20px;
}
.batch-card-actions {
display: flex;
gap: 0.4rem;
flex-wrap: wrap;
}
.badge-status {
display: inline-block;
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.2rem 0.6rem;
border-radius: 20px;
margin-bottom: 0.5rem;
}
.status-planned { background: #f1f3f5; color: #6c757d; }
.status-germinating{ background: #fff3cd; color: #856404; }
.status-seedling { background: #d1fae5; color: #065f46; }
.status-potted_up { background: #bbf7d0; color: #14532d; }
.status-hardening { background: #dbeafe; color: #1e3a8a; }
.status-garden { background: #dcfce7; color: #166534; }
.status-harvested { background: #ede9fe; color: #4c1d95; }
.status-failed { background: #fee2e2; color: #991b1b; }
/* ===== Variety Table ===== */
.variety-table {
width: 100%;
border-collapse: collapse;
background: var(--surface);
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
}
.variety-table th {
background: var(--green-darkest);
color: var(--green-ghost);
text-align: left;
padding: 0.7rem 1rem;
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.variety-table td {
padding: 0.7rem 1rem;
border-bottom: 1px solid var(--border);
font-size: 0.88rem;
vertical-align: middle;
}
.variety-table tr:last-child td { border-bottom: none; }
.variety-table tr:hover td { background: var(--green-bg); }
.variety-color-dot {
display: inline-block;
width: 10px; height: 10px;
border-radius: 50%;
margin-right: 0.4rem;
vertical-align: middle;
}
.weeks-chip {
font-size: 0.75rem;
background: var(--green-ghost);
color: var(--green-dark);
padding: 0.1rem 0.5rem;
border-radius: 20px;
white-space: nowrap;
}
/* ===== Buttons ===== */
.btn {
display: inline-flex;
align-items: center;
gap: 0.3rem;
padding: 0.5rem 1.1rem;
border-radius: var(--radius-sm);
border: none;
font-size: 0.88rem;
font-weight: 600;
cursor: pointer;
transition: opacity 0.15s, transform 0.1s;
white-space: nowrap;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-secondary { background: var(--green-ghost); color: var(--green-dark); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
/* ===== Filter Bar ===== */
.filter-bar {
display: flex;
gap: 0.8rem;
margin-bottom: 1rem;
flex-wrap: wrap;
}
.search-input, .select-input {
padding: 0.5rem 0.8rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.88rem;
background: var(--surface);
color: var(--text);
outline: none;
transition: border-color 0.15s;
}
.search-input { min-width: 220px; flex: 1; }
.search-input:focus, .select-input:focus { border-color: var(--green-light); }
/* ===== Settings ===== */
.settings-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
}
.settings-card {
background: var(--surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 1.4rem;
}
.settings-section-title {
font-size: 1rem;
font-weight: 700;
color: var(--green-dark);
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--border);
}
.settings-desc {
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 1rem;
}
.settings-status {
font-size: 0.85rem;
color: var(--green-mid);
margin-left: 1rem;
}
/* ===== Forms ===== */
.form-group { margin-bottom: 1rem; }
.form-label {
display: block;
font-size: 0.83rem;
font-weight: 600;
color: var(--text);
margin-bottom: 0.3rem;
}
.form-input, .form-select, .form-textarea {
width: 100%;
padding: 0.55rem 0.8rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.88rem;
background: var(--surface);
color: var(--text);
outline: none;
transition: border-color 0.15s, box-shadow 0.15s;
font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
border-color: var(--green-light);
box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.76rem; color: var(--text-light); margin-top: 0.25rem; display: block; }
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.form-check {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.88rem;
cursor: pointer;
}
/* ===== Modal ===== */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(27,67,50,0.45);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal {
background: var(--surface);
border-radius: var(--radius);
box-shadow: var(--shadow-lg);
width: 100%;
max-width: 580px;
max-height: 90vh;
overflow-y: auto;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.2rem 1.4rem;
border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--green-darkest); }
.modal-close {
background: none;
border: none;
font-size: 1.4rem;
cursor: pointer;
color: var(--text-muted);
line-height: 1;
padding: 0 0.3rem;
}
.modal-close:hover { color: var(--danger); }
#modal-body { padding: 1.4rem; }
/* ===== Empty State ===== */
.empty-state {
padding: 2.5rem 1rem;
text-align: center;
color: var(--text-light);
font-size: 0.9rem;
background: var(--surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
/* ===== Toast ===== */
.toast {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
background: var(--green-darkest);
color: #fff;
padding: 0.7rem 1.2rem;
border-radius: var(--radius-sm);
font-size: 0.88rem;
z-index: 2000;
box-shadow: var(--shadow-lg);
animation: fadeUp 0.3s ease;
}
.toast.hidden { display: none; }
.toast.error { background: var(--danger); }
@keyframes fadeUp {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* ===== Category Badges ===== */
.cat-badge {
font-size: 0.72rem;
font-weight: 600;
padding: 0.15rem 0.5rem;
border-radius: 20px;
text-transform: capitalize;
}
.cat-vegetable { background: #dcfce7; color: #166534; }
.cat-herb { background: #d1fae5; color: #065f46; }
.cat-flower { background: #fce7f3; color: #9d174d; }
.cat-fruit { background: #fee2e2; color: #991b1b; }
/* ===== Responsive ===== */
@media (max-width: 900px) {
.stats-row { grid-template-columns: 1fr 1fr; }
.settings-grid { grid-template-columns: 1fr; }
.form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
:root { --sidebar-w: 0px; }
.sidebar { display: none; }
.main-content { margin-left: 0; padding: 1rem; }
.stats-row { grid-template-columns: 1fr 1fr; }
}