Web-UI: professionelles Redesign (Icons statt Emojis) + neue Features

Design:
- Neues Icon-Set (Inline-SVG, Feather-Stil), keine Emojis mehr
- Kohaerentes Design-System (Sidebar-Layout, Palette, Spacing, Light/Dark)
- Alle Seiten ueberarbeitet (Login, Dashboard, Produkte, Formular, Ein-/Auslagern,
  Lagerorte, Benutzer, Einkaufsliste)

Neue Features:
- Gruppen-Verwaltung (anlegen/bearbeiten/loeschen, Produktzahl + Bestand,
  Gruppen-Mindestbestand) inkl. Einkaufsliste
- Einfache Gruppen-Auto-Zuordnung aus OFF-Kategorie im Produktformular
- Verlauf-Seite (Bewegungen: wer/was/wann) via neuem /movements-Endpoint
- Einstellungen-Seite (Ablauf-Warnfrist)
- Lagerorte mit optional uebergeordnetem Ort (verschachtelbar)

Backend:
- groups: PATCH + Anreicherung (product_count, stock)
- views: /shopping-list/groups, /movements
- schemas: GroupUpdate, GroupShoppingItem, MovementOut

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-22 10:18:30 +02:00
parent 9d4fd030d8
commit b683f2d93b
19 changed files with 1304 additions and 421 deletions

View File

@@ -1,185 +1,323 @@
:root {
--bg: #f4f6f8;
--card: #ffffff;
--border: #e2e8f0;
--text: #1e293b;
--muted: #64748b;
--primary: #2f855a;
--primary-dark: #276749;
--danger: #c53030;
--warn: #b7791f;
--radius: 10px;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
--bg: #f6f7f9;
--surface: #ffffff;
--surface-2: #f1f3f5;
--border: #e3e6ea;
--border-strong: #d1d6dc;
--text: #1a1f27;
--muted: #6b7480;
--accent: #3f51b5;
--accent-hover: #34429a;
--accent-soft: #eceefb;
--danger: #c0392b;
--danger-soft: #fbeceb;
--warn: #b06f14;
--warn-soft: #fbf3e6;
--ok: #2e7d55;
--radius: 7px;
--radius-sm: 5px;
--sp-1: 4px;
--sp-2: 8px;
--sp-3: 12px;
--sp-4: 16px;
--sp-5: 24px;
--sp-6: 32px;
--sidebar-w: 236px;
--shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
font-family: var(--font);
background: var(--bg);
color: var(--text);
font-size: 15px;
font-size: 14.5px;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.app { min-height: 100vh; }
h1 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 0.95rem; font-weight: 650; margin: 0 0 var(--sp-3); letter-spacing: -0.005em; }
/* Topbar */
.topbar {
.icon { flex: 0 0 auto; vertical-align: middle; }
/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
width: var(--sidebar-w);
flex: 0 0 var(--sidebar-w);
background: var(--surface);
border-right: 1px solid var(--border);
display: flex;
align-items: center;
gap: 20px;
padding: 10px 20px;
background: var(--card);
border-bottom: 1px solid var(--border);
flex-direction: column;
position: sticky;
top: 0;
z-index: 10;
flex-wrap: wrap;
height: 100vh;
}
.brand { font-weight: 700; font-size: 20px; }
.brand.big { font-size: 30px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.sidebar-brand {
display: flex;
align-items: center;
gap: var(--sp-2);
padding: var(--sp-5) var(--sp-4) var(--sp-4);
font-weight: 680;
font-size: 1.05rem;
letter-spacing: -0.01em;
}
.sidebar-brand .mark {
display: grid; place-items: center;
width: 28px; height: 28px; border-radius: var(--radius-sm);
background: var(--accent); color: #fff;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2); flex: 1; overflow-y: auto; }
.nav-link {
padding: 7px 12px;
border-radius: 8px;
text-decoration: none;
display: flex; align-items: center; gap: var(--sp-3);
padding: 9px var(--sp-3);
border-radius: var(--radius-sm);
color: var(--muted);
font-weight: 500;
font-weight: 520;
font-size: 0.9rem;
}
.nav-link:hover { background: var(--bg); }
.nav-link.active { background: var(--primary); color: #fff; }
.userbox { display: flex; align-items: center; gap: 10px; }
.username { font-size: 14px; color: var(--muted); }
.badge {
background: var(--primary); color: #fff; font-size: 11px;
padding: 1px 6px; border-radius: 6px; font-weight: 700;
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-section {
padding: var(--sp-4) var(--sp-3) var(--sp-1);
font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
text-transform: uppercase; color: var(--muted); opacity: 0.7;
}
.sidebar-foot {
border-top: 1px solid var(--border);
padding: var(--sp-3);
display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.sidebar-user { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user .name { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .role { font-size: 0.72rem; color: var(--muted); }
.content { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1080px; margin: 0 auto; padding: var(--sp-6) var(--sp-5) 64px; }
.page-head {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 24px; }
.actions { display: flex; gap: 8px; }
.page-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.actions { display: flex; gap: var(--sp-2); }
/* Cards & layout */
/* ---------- Cards ---------- */
.card {
background: var(--card);
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 18px;
padding: var(--sp-5);
box-shadow: var(--shadow);
margin-bottom: 16px;
margin-bottom: var(--sp-4);
}
.card h2 { margin-top: 0; font-size: 17px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-narrow { max-width: 560px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.card-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.card-head h2 { margin: 0; }
.card-head .icon { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form-narrow { max-width: 600px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }
/* Forms */
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
/* ---------- Forms ---------- */
label { display: block; margin-bottom: var(--sp-4); font-size: 0.8rem; color: var(--muted); font-weight: 580; }
input, select {
width: 100%;
margin-top: 4px;
padding: 9px 10px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 15px;
background: #fff;
color: var(--text);
width: 100%; margin-top: 5px;
padding: 8px 10px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
font-size: 0.9rem; font-family: inherit;
background: var(--surface); color: var(--text);
transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.row { display: flex; gap: 12px; align-items: flex-start; }
input:focus, select:focus {
outline: none; border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--muted); opacity: 0.7; }
.row { display: flex; gap: var(--sp-3); align-items: flex-start; }
.row .grow { flex: 1; }
.search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 480px; }
.search input { margin-top: 0; }
.field-inline { display: flex; gap: var(--sp-2); align-items: flex-end; }
/* Buttons */
/* ---------- Buttons ---------- */
.btn {
display: inline-block;
padding: 9px 16px;
border: 1px solid var(--border);
background: #fff;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
text-decoration: none;
color: var(--text);
display: inline-flex; align-items: center; gap: var(--sp-2);
padding: 8px 14px;
border: 1px solid var(--border-strong);
background: var(--surface);
border-radius: var(--radius-sm);
font-size: 0.875rem; font-weight: 560; font-family: inherit;
cursor: pointer; color: var(--text);
transition: background .12s, border-color .12s, opacity .12s;
white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: 0.6; cursor: default; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 15px; padding: 4px 0; text-align: left; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 5px 9px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-icon { padding: 6px; border-color: transparent; background: transparent; color: var(--muted); }
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-icon.danger:hover { background: var(--danger-soft); color: var(--danger); }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-align: left; }
.link-btn:hover { text-decoration: underline; }
/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.row-danger { background: #fff5f5; }
.row-warn { background: #fffaf0; }
.row-warn-text { color: var(--warn); }
.strong { font-weight: 700; }
.thumb-cell { width: 40px; }
.thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.product-img { max-width: 160px; border-radius: 8px; margin-bottom: 10px; }
/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.table thead th {
color: var(--muted); font-weight: 600; font-size: 0.72rem;
text-transform: uppercase; letter-spacing: 0.04em;
border-bottom: 1px solid var(--border-strong);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 640; }
.thumb-cell { width: 44px; }
.thumb {
width: 34px; height: 34px; object-fit: cover;
border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
}
.thumb-fallback { display: grid; place-items: center; color: var(--muted); }
.product-img { max-width: 150px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: var(--sp-3); }
/* Lists */
.picklist, .simple-list, .checklist { list-style: none; padding: 0; margin: 10px 0 0; }
/* ---------- Badges / pills ---------- */
.badge {
display: inline-flex; align-items: center; gap: 4px;
font-size: 0.7rem; font-weight: 600; padding: 2px 7px; border-radius: 20px;
background: var(--surface-2); color: var(--muted);
}
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: #e6f4ec; color: var(--ok); }
/* ---------- Lists ---------- */
.simple-list, .picklist, .checklist { list-style: none; padding: 0; margin: var(--sp-3) 0 0; }
.simple-list li, .checklist li {
display: flex; align-items: center; justify-content: space-between;
padding: 9px 4px; border-bottom: 1px solid var(--border); gap: 10px;
padding: 10px 4px; border-bottom: 1px solid var(--border); gap: var(--sp-3);
}
.picklist li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.simple-list li:last-child, .checklist li:last-child { border-bottom: none; }
.picklist li { padding: 0; border-bottom: 1px solid var(--border); }
.picklist li:last-child { border-bottom: none; }
.picklist .link-btn { display: block; width: 100%; padding: 9px 4px; }
.picklist .link-btn:hover { text-decoration: none; background: var(--surface-2); }
.checklist label { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: inherit; color: var(--text); }
.checklist input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--accent); }
.checklist li.done .item-name { text-decoration: line-through; color: var(--muted); }
.checklist label { display: flex; align-items: center; gap: 8px; margin: 0; }
.checklist input[type="checkbox"] { width: auto; margin: 0; }
.item-name { font-weight: 600; color: var(--text); }
.item-name { font-weight: 560; }
/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert.error { background: #fff5f5; color: var(--danger); border: 1px solid #feb2b2; }
.alert.info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
.alert.warn { background: #fffaf0; color: var(--warn); border: 1px solid #fbd38d; }
/* Selected product banner */
.selected-product {
display: flex; align-items: center; gap: 12px;
padding: 10px; background: var(--bg); border-radius: 8px; margin-bottom: 16px;
/* ---------- Alerts ---------- */
.alert {
display: flex; align-items: flex-start; gap: var(--sp-2);
padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: var(--sp-4);
font-size: 0.875rem; border: 1px solid transparent;
}
.selected-product > div { flex: 1; }
.alert .icon { margin-top: 1px; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: #f0c8c4; }
.alert.info { background: var(--accent-soft); color: var(--accent-hover); border-color: #cfd6f4; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f0dcb8; }
.alert.ok { background: #e6f4ec; color: var(--ok); border-color: #c3e3d0; }
/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-card label { text-align: left; }
/* ---------- Selected product banner ---------- */
.selected-product {
display: flex; align-items: center; gap: var(--sp-3);
padding: var(--sp-3); background: var(--surface-2);
border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: var(--sp-4);
}
.selected-product > .info { flex: 1; min-width: 0; }
.selected-product .title { font-weight: 620; }
/* ---------- Stat tiles ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.stat {
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
padding: var(--sp-4); box-shadow: var(--shadow);
}
.stat .stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 560; display: flex; align-items: center; gap: 6px; }
.stat .stat-value { font-size: 1.6rem; font-weight: 680; letter-spacing: -0.02em; margin-top: 6px; }
/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-4); }
.login-card { width: 100%; max-width: 360px; }
.login-card .sidebar-brand { padding: 0 0 var(--sp-2); font-size: 1.2rem; }
.login-card .lead { color: var(--muted); font-size: 0.9rem; margin: 0 0 var(--sp-5); }
/* ---------- Utilities ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; padding: 40px; }
.small { font-size: 0.8rem; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: var(--sp-6) var(--sp-4); }
.mt-0 { margin-top: 0; }
.tree-child { padding-left: var(--sp-5); }
.row-danger td { background: var(--danger-soft); }
.row-warn td { background: var(--warn-soft); }
/* ---------- Responsive: sidebar -> top bar ---------- */
@media (max-width: 760px) {
.app-shell { flex-direction: column; }
.sidebar {
width: 100%; flex-basis: auto; height: auto; position: sticky; top: 0; z-index: 20;
border-right: none; border-bottom: 1px solid var(--border);
}
.sidebar-brand { padding: var(--sp-3) var(--sp-4); }
.sidebar-nav { flex-direction: row; overflow-x: auto; padding: var(--sp-2) var(--sp-3); gap: var(--sp-1); }
.nav-section { display: none; }
.nav-link { white-space: nowrap; }
.nav-link span.label { display: none; }
.nav-link { padding: 8px; }
.content { padding: var(--sp-4); }
}
/* ---------- Dark theme ---------- */
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f172a;
--card: #1e293b;
--border: #334155;
--text: #e2e8f0;
--muted: #94a3b8;
--bg: #0d1117;
--surface: #161b22;
--surface-2: #1c2230;
--border: #262d38;
--border-strong: #333c4a;
--text: #e6edf3;
--muted: #8b949e;
--accent: #7c8ae8;
--accent-hover: #93a0ef;
--accent-soft: #1e2340;
--danger: #f0857a;
--danger-soft: #2a1a1a;
--warn: #e0a955;
--warn-soft: #2a2312;
--ok: #5fbf8c;
--shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
input, select { background: #0f172a; }
.btn { background: #0f172a; }
.btn:hover { background: #172033; }
.row-danger { background: #3b1a1a; }
.row-warn { background: #3a2f14; }
.alert.error { background: #3b1a1a; border-color: #7f1d1d; }
.alert.info { background: #16324d; border-color: #1e4e79; }
.alert.warn { background: #3a2f14; border-color: #7c5c14; }
.badge.ok { background: #14301f; }
.alert.ok { background: #14301f; border-color: #21503a; }
}
:root[data-theme="dark"] {
--bg: #0d1117; --surface: #161b22; --surface-2: #1c2230; --border: #262d38;
--border-strong: #333c4a; --text: #e6edf3; --muted: #8b949e; --accent: #7c8ae8;
--accent-hover: #93a0ef; --accent-soft: #1e2340; --danger: #f0857a; --danger-soft: #2a1a1a;
--warn: #e0a955; --warn-soft: #2a2312; --ok: #5fbf8c;
}
:root[data-theme="light"] {
--bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f5; --border: #e3e6ea;
--border-strong: #d1d6dc; --text: #1a1f27; --muted: #6b7480; --accent: #3f51b5;
--accent-hover: #34429a; --accent-soft: #eceefb; --danger: #c0392b; --danger-soft: #fbeceb;
--warn: #b06f14; --warn-soft: #fbf3e6; --ok: #2e7d55;
}