diff --git a/web/src/finance.css b/web/src/finance.css index 0287584..f3e2926 100644 --- a/web/src/finance.css +++ b/web/src/finance.css @@ -149,32 +149,37 @@ font-size: 0.8rem; } -/* Kategorie-Gruppe (Verwaltung). */ -.cat-group + .cat-group { - margin-top: var(--sp-4); +/* Kategorien-Verwaltung: durchgehende Liste in EINER Karte, die Gruppen nur als + dezente Zwischenüberschrift dazwischen (keine abgesetzten Gruppen-Karten). */ +.cat-section + .cat-section { + margin-top: var(--sp-5); } -.cat-group-head { +.cat-section-head { display: flex; align-items: center; - gap: var(--sp-3); - margin-bottom: var(--sp-2); + gap: var(--sp-2); + padding-bottom: var(--sp-2); + margin-bottom: 2px; + border-bottom: 2px solid var(--border-strong); } -.cat-group-head h2 { - margin: 0; -} -.cat-list { - display: flex; - flex-direction: column; - gap: 6px; +.cat-section-name { + flex: 1; + min-width: 0; + font-size: 1.05rem; + font-weight: 650; } .cat-row { display: flex; align-items: center; gap: var(--sp-3); - padding: var(--sp-2) var(--sp-3); - border: 1px solid var(--border); - border-radius: var(--radius-sm); - background: var(--surface); + padding: 9px 4px; + border-bottom: 1px solid var(--border); +} +.cat-section .cat-row:last-child { + border-bottom: none; +} +.cat-row:hover { + background: var(--surface-2); } .cat-row .grow { flex: 1; diff --git a/web/src/pages/Categories.jsx b/web/src/pages/Categories.jsx index b46e7e0..fa33c8c 100644 --- a/web/src/pages/Categories.jsx +++ b/web/src/pages/Categories.jsx @@ -209,28 +209,28 @@ export default function Categories() { - {groups.map((g) => ( -
-
- -

{g.name}

- - {g.kind === "income" ? t("categories.income") : t("categories.expense")} - - - - -
-
+
+ {groups.map((g) => ( +
+
+ + {g.name} + + {g.kind === "income" ? t("categories.income") : t("categories.expense")} + + + + +
{g.categories.map((c) => (
- + {c.name}
))} - {g.categories.length === 0 &&
{t("categories.emptyGroup")}
} + {g.categories.length === 0 && ( +
{t("categories.emptyGroup")}
+ )}
-
- ))} + ))} + {groups.length === 0 &&
{t("categories.emptyGroup")}
} +
{modal && (