Files
teatracker/styles.css
Vibe Nuage Agent fc5d63604e feat: Add TeeTracker web application
- Add index.html with responsive layout and tab navigation
- Add styles.css with modern design and tea-themed colors
- Add app.js with full functionality:
  - Tea management (add, edit, delete, search, filter)
  - Consumption tracking with date, time, amount, notes
  - Dashboard with statistics cards and recent activity
  - Statistics with Chart.js visualizations
  - Data persistence using localStorage
  - Toast notifications for user feedback
  - Confirmation modals for deletions

Features:
- Dashboard: Total cups, today's cups, weekly cups, tea count
- Tea Management: Add, edit, delete teas with type, brand, description
- Tracking: Record tea consumption with date, time, amount, notes
- Statistics: Charts and detailed stats with period filtering
- Responsive design for mobile and desktop
- German language interface

Generated by Vibe Code

Co-authored-by: trevor1969 <trevor1969@users.noreply.github.com>
2026-06-04 10:35:40 +00:00

766 lines
13 KiB
CSS

/* TeeTracker - Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #8B4513;
--primary-light: #A0522D;
--primary-dark: #654321;
--secondary-color: #4ECDC4;
--background-color: #F5F5F5;
--card-bg: #FFFFFF;
--text-color: #333333;
--text-light: #666666;
--success-color: #28a745;
--danger-color: #dc3545;
--warning-color: #ffc107;
--border-radius: 8px;
--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.6;
min-height: 100vh;
}
.app-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Header */
header {
text-align: center;
margin-bottom: 30px;
padding: 20px;
background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
border-radius: var(--border-radius);
color: white;
box-shadow: var(--box-shadow);
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
header p {
font-size: 1.1rem;
opacity: 0.9;
}
/* Tabs */
.tabs {
display: flex;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.tab-button {
padding: 12px 24px;
background-color: var(--card-bg);
border: 2px solid var(--primary-color);
border-radius: var(--border-radius);
cursor: pointer;
font-size: 1rem;
font-weight: 600;
color: var(--primary-color);
transition: var(--transition);
box-shadow: var(--box-shadow);
}
.tab-button:hover {
background-color: var(--primary-light);
color: white;
}
.tab-button.active {
background-color: var(--primary-color);
color: white;
}
/* Tab Content */
.tab-content {
min-height: 60vh;
}
.tab-pane {
display: none;
animation: fadeIn 0.3s ease;
}
.tab-pane.active {
display: block;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Dashboard Cards */
.dashboard-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.card {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
text-align: center;
transition: var(--transition);
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.card h3 {
font-size: 1rem;
color: var(--text-light);
margin-bottom: 10px;
text-transform: uppercase;
letter-spacing: 1px;
}
.card-value {
font-size: 2rem;
font-weight: bold;
color: var(--primary-color);
}
/* Recent Activity */
.recent-activity {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
}
.recent-activity h3 {
margin-bottom: 15px;
color: var(--text-color);
border-bottom: 2px solid var(--primary-light);
padding-bottom: 10px;
}
.activity-list {
max-height: 300px;
overflow-y: auto;
}
.activity-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
border-bottom: 1px solid #eee;
transition: var(--transition);
}
.activity-item:last-child {
border-bottom: none;
}
.activity-item:hover {
background-color: #f9f9f9;
}
.activity-info {
flex: 1;
}
.activity-tea {
font-weight: 600;
color: var(--primary-color);
margin-bottom: 5px;
}
.activity-details {
font-size: 0.9rem;
color: var(--text-light);
}
.activity-amount {
font-weight: bold;
color: var(--secondary-color);
font-size: 1.1rem;
}
/* Teas Section */
.teas-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
flex-wrap: wrap;
gap: 15px;
}
.teas-header h2 {
color: var(--text-color);
}
.tea-filters {
display: flex;
gap: 15px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.tea-filters input,
.tea-filters select {
padding: 10px 15px;
border: 2px solid #ddd;
border-radius: var(--border-radius);
font-size: 1rem;
flex: 1;
min-width: 200px;
transition: var(--transition);
}
.tea-filters input:focus,
.tea-filters select:focus {
outline: none;
border-color: var(--primary-color);
}
.teas-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.tea-card {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
cursor: pointer;
transition: var(--transition);
border-left: 5px solid var(--primary-color);
}
.tea-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.tea-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 10px;
}
.tea-name {
font-size: 1.2rem;
font-weight: 600;
color: var(--text-color);
}
.tea-type {
background-color: var(--primary-light);
color: white;
padding: 4px 10px;
border-radius: 20px;
font-size: 0.8rem;
text-transform: uppercase;
}
.tea-brand {
font-size: 0.9rem;
color: var(--text-light);
margin-bottom: 10px;
}
.tea-description {
font-size: 0.9rem;
color: var(--text-light);
margin-bottom: 15px;
line-height: 1.5;
}
.tea-actions {
display: flex;
gap: 10px;
}
.tea-action-btn {
padding: 6px 12px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.8rem;
transition: var(--transition);
}
.tea-edit-btn {
background-color: var(--secondary-color);
color: white;
}
.tea-edit-btn:hover {
background-color: #3aa89e;
}
.tea-delete-btn {
background-color: var(--danger-color);
color: white;
}
.tea-delete-btn:hover {
background-color: #c82333;
}
/* Track Form */
.track-form {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--box-shadow);
max-width: 600px;
margin: 0 auto;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: var(--text-color);
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="color"],
.form-group select,
.form-group textarea {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: var(--border-radius);
font-size: 1rem;
transition: var(--transition);
font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--primary-color);
}
.form-group textarea {
resize: vertical;
min-height: 80px;
}
.form-actions {
display: flex;
gap: 15px;
justify-content: flex-end;
margin-top: 10px;
}
/* Buttons */
.btn {
padding: 12px 24px;
border: none;
border-radius: var(--border-radius);
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-primary {
background-color: var(--primary-color);
color: white;
}
.btn-primary:hover {
background-color: var(--primary-dark);
}
.btn-secondary {
background-color: #6c757d;
color: white;
}
.btn-secondary:hover {
background-color: #5a6268;
}
.btn-danger {
background-color: var(--danger-color);
color: white;
}
.btn-danger:hover {
background-color: #c82333;
}
.btn-success {
background-color: var(--success-color);
color: white;
}
.btn-success:hover {
background-color: #218838;
}
/* Stats Section */
.stats-filters {
margin-bottom: 20px;
}
.stats-filters label {
margin-right: 10px;
font-weight: 600;
}
.stats-filters select {
padding: 10px 15px;
border: 2px solid #ddd;
border-radius: var(--border-radius);
font-size: 1rem;
}
.stats-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.chart-container {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
}
.chart-container h3 {
margin-bottom: 15px;
color: var(--text-color);
text-align: center;
}
.chart-container canvas {
max-height: 300px;
}
.stats-details {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
}
.stats-details h3 {
margin-bottom: 15px;
color: var(--text-color);
}
.details-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
}
.detail-item {
background-color: #f9f9f9;
padding: 15px;
border-radius: var(--border-radius);
text-align: center;
}
.detail-item-label {
font-size: 0.9rem;
color: var(--text-light);
margin-bottom: 5px;
}
.detail-item-value {
font-size: 1.3rem;
font-weight: bold;
color: var(--primary-color);
}
/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
align-items: center;
justify-content: center;
padding: 20px;
}
.modal.active {
display: flex;
}
.modal-content {
background-color: var(--card-bg);
border-radius: var(--border-radius);
width: 100%;
max-width: 500px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 2px solid #eee;
}
.modal-header h2 {
color: var(--text-color);
}
.close-btn {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--text-light);
transition: var(--transition);
}
.close-btn:hover {
color: var(--danger-color);
}
.modal-form {
padding: 20px;
}
.modal-body {
padding: 20px;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 15px;
padding: 20px;
border-top: 2px solid #eee;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: var(--primary-color);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--primary-dark);
}
/* Responsive */
@media (max-width: 768px) {
.app-container {
padding: 10px;
}
header h1 {
font-size: 2rem;
}
.tabs {
flex-direction: column;
align-items: stretch;
}
.tab-button {
width: 100%;
}
.dashboard-cards {
grid-template-columns: repeat(2, 1fr);
}
.stats-container {
grid-template-columns: 1fr;
}
.tea-filters {
flex-direction: column;
}
.tea-filters input,
.tea-filters select {
width: 100%;
}
.form-actions {
flex-direction: column;
align-items: stretch;
}
.btn {
width: 100%;
justify-content: center;
}
}
@media (max-width: 480px) {
.dashboard-cards {
grid-template-columns: 1fr;
}
.teas-grid {
grid-template-columns: 1fr;
}
.details-grid {
grid-template-columns: 1fr;
}
}
/* Empty State */
.empty-state {
text-align: center;
padding: 40px;
color: var(--text-light);
}
.empty-state-icon {
font-size: 3rem;
margin-bottom: 15px;
}
.empty-state-text {
font-size: 1.1rem;
margin-bottom: 10px;
}
.empty-state-subtext {
font-size: 0.9rem;
}
/* Loading State */
.loading {
text-align: center;
padding: 20px;
}
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid var(--primary-color);
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Toast Notifications */
.toast {
position: fixed;
bottom: 20px;
right: 20px;
background-color: var(--text-color);
color: white;
padding: 15px 25px;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
z-index: 1001;
animation: toastSlideIn 0.3s ease;
}
.toast.success {
background-color: var(--success-color);
}
.toast.error {
background-color: var(--danger-color);
}
.toast.info {
background-color: var(--secondary-color);
}
@keyframes toastSlideIn {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Tea Color Preview */
.tea-color-preview {
width: 20px;
height: 20px;
border-radius: 50%;
display: inline-block;
margin-right: 10px;
border: 2px solid #ddd;
}