From 2c6d4dedaea224efa6e59514f478a2c04edcf150 Mon Sep 17 00:00:00 2001 From: qcigano Date: Mon, 3 Aug 2026 17:49:24 +0200 Subject: [PATCH] Abo-Bereich visuell auf Premium-Niveau gehoben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan-Karten: eigenes Icon je Stufe (🌱/🌿/👑), Rabatt als farbiger Chip statt reinem Fließtext, Prämien-Intervalle als eigene Chips (aus den admin- konfigurierten Werten berechnet), Preis mit Farbverlauf, sanft pulsierender Rahmen für die aktuell gebuchte Stufe. Abo-Status: Tabelle durch ein Stat-Kachel-Raster ersetzt (Icon + Label + Wert pro Kennzahl, Rabatt farblich hervorgehoben), echte Fortschrittsbalken statt Text für den Weg zum nächsten Teddy (Prozent aus dem admin-konfigurierten Intervall berechnet), "Bereits erhalten" als Badge-Chip, verfügbare Prämien als eigene, leicht glühende Karten statt schlichter Buttons. Benachrichtigungen: farbiger Icon-Kreis pro Ereignistyp (Erfolg/Prämie/ Warnung/Abbruch/Info) statt einheitlicher grauer Liste — auf einen Blick erkennbar, worum es bei jedem Eintrag geht. Alles in 4 Sprachen (DE/EN/CH/FR), neues i18n-Template aboRewardEveryLabel für die Prämien-Intervall-Chips. Co-Authored-By: Claude Sonnet 5 --- src/i18n/ui.ts | 4 + src/pages/ch/konto/angemeldet.astro | 170 ++++++++++++++++++++++------ src/pages/en/konto/angemeldet.astro | 170 ++++++++++++++++++++++------ src/pages/fr/konto/angemeldet.astro | 170 ++++++++++++++++++++++------ src/pages/konto/angemeldet.astro | 170 ++++++++++++++++++++++------ src/styles/global.css | 155 +++++++++++++++++++++++-- 6 files changed, 695 insertions(+), 144 deletions(-) diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index d76cf04..1109c80 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -257,6 +257,7 @@ export const ui = { aboAktivesLabel: "✓ Dein aktuelles Abo", aboWechselnBtn: "Zu diesem Abo wechseln", aboNichtBuchbar: "Derzeit nicht buchbar", + aboRewardEveryLabel: "alle {n} Mon.", aboStatusTitle: "Dein Abo-Status", aboFieldStufe: "Abo-Stufe", aboFieldPreis: "Monatlicher Preis", aboFieldRabatt: "Enthaltener Rabatt", aboFieldStart: "Startdatum", aboFieldNaechsteZahlung: "Nächste Zahlung", aboFieldLaufzeit: "Bisherige Laufzeit", @@ -558,6 +559,7 @@ export const ui = { aboAktivesLabel: "✓ Your current plan", aboWechselnBtn: "Switch to this plan", aboNichtBuchbar: "Currently unavailable", + aboRewardEveryLabel: "every {n} mo.", aboStatusTitle: "Your subscription status", aboFieldStufe: "Plan", aboFieldPreis: "Monthly price", aboFieldRabatt: "Included discount", aboFieldStart: "Start date", aboFieldNaechsteZahlung: "Next payment", aboFieldLaufzeit: "Duration so far", @@ -859,6 +861,7 @@ export const ui = { aboAktivesLabel: "✓ Dis aktuells Abo", aboWechselnBtn: "Zu dem Abo wechsle", aboNichtBuchbar: "Momentan nöd buechbar", + aboRewardEveryLabel: "alli {n} Mt.", aboStatusTitle: "Din Abo-Status", aboFieldStufe: "Abo-Stufe", aboFieldPreis: "Monetliche Priis", aboFieldRabatt: "Enthaltene Rabatt", aboFieldStart: "Startdatum", aboFieldNaechsteZahlung: "Nächschti Zahlig", aboFieldLaufzeit: "Bisherigi Laufziit", @@ -1160,6 +1163,7 @@ export const ui = { aboAktivesLabel: "✓ Votre abonnement actuel", aboWechselnBtn: "Passer à cet abonnement", aboNichtBuchbar: "Actuellement indisponible", + aboRewardEveryLabel: "tous les {n} mois", aboStatusTitle: "Statut de votre abonnement", aboFieldStufe: "Formule", aboFieldPreis: "Prix mensuel", aboFieldRabatt: "Remise incluse", aboFieldStart: "Date de début", aboFieldNaechsteZahlung: "Prochain paiement", aboFieldLaufzeit: "Durée jusqu'ici", diff --git a/src/pages/ch/konto/angemeldet.astro b/src/pages/ch/konto/angemeldet.astro index a100dba..4324c76 100644 --- a/src/pages/ch/konto/angemeldet.astro +++ b/src/pages/ch/konto/angemeldet.astro @@ -57,6 +57,9 @@ const aboPlanLabels: Record = { mittel: { name: aboStufeName("mittel", lang), vorteil: aboStufeVorteil("mittel", lang) }, gross: { name: aboStufeName("gross", lang), vorteil: aboStufeVorteil("gross", lang) }, }; +// Eigenes Icon je Stufe (rein optisch, nicht admin-editierbar) — soll auf einen Blick erkennbar +// machen, dass es sich um eine aufsteigende Reihe handelt (Keimling → Blatt → Krone). +const aboPlanIcon: Record = { klein: "🌱", mittel: "🌿", gross: "👑" }; // "Zuletzt angesehen" zeigt in dieser Vorschau einfach die ersten echten Produkte aus dem Shop — // in Phase 2 kommt hier die tatsächliche Verlaufs-Historie der angemeldeten Person hin. @@ -356,8 +359,18 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === return (
+

{labels.name}

{formatPrice(cfg.preis, lang)} {t.accountDash.aboPreisSuffix}

+ 💰 −{cfg.rabattProzent}% +
+ {cfg.kleinIntervallMonate > 0 && ( + 🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.kleinIntervallMonate))} + )} + {cfg.grossIntervallMonate > 0 && ( + 🧸🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.grossIntervallMonate))} + )} +

{labels.vorteil}

@@ -369,28 +382,81 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status ===

{t.accountDash.aboStatusTitle}

- - - - - - - - - -
{t.accountDash.aboFieldStufe}
{t.accountDash.aboFieldPreis}
{t.accountDash.aboFieldRabatt}
{t.accountDash.aboFieldStart}
{t.accountDash.aboFieldNaechsteZahlung}
{t.accountDash.aboFieldLaufzeit}
- - -

+
+
+ + {t.accountDash.aboFieldStufe} + +
+
+ + {t.accountDash.aboFieldPreis} + +
+
+ + {t.accountDash.aboFieldRabatt} + +
+
+ + {t.accountDash.aboFieldStart} + +
+
+ + {t.accountDash.aboFieldNaechsteZahlung} + +
+
+ + {t.accountDash.aboFieldLaufzeit} + +
+
+ +
+ + +
+ +
+ + +

{t.accountDash.aboPraemienVerfuegbarTitle}

{t.accountDash.aboKeinePraemienVerfuegbar}

- - + +
@@ -506,6 +572,7 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === import { rechnungAlsPdfHerunterladen } from "../../../scripts/invoice-pdf"; import { fuegeTeddyGratisHinzu } from "../../../scripts/cart"; import { formatPrice } from "../../../i18n/format"; + import { aboStufenKonfig } from "../../../data/abo"; const { loginPath, fallbackName, greetingTemplate, reviewedBadgeText, invoiceLang, invoiceLabels, loyaltyProgressTemplate, loyaltyRemainingOne, loyaltyRemainingOther, loyaltyUnlockedTitle, loyaltyUnlockedText, aboLang, aboLabels } = (window as any).__accountDashVars; // Zugriffsschutz: diese Seite ist nur für angemeldete Kund:innen gedacht. Es gibt noch kein @@ -595,6 +662,30 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === // Abosystem: Pläne, Status, Fortschritt, Prämien und Benachrichtigungen live aus dem Konto // rendern (Nav-Kachel + Planvergleich + Statuskarte + Benachrichtigungsliste). const aboNameMap: Record = { klein: aboLabels.nameKlein, mittel: aboLabels.nameMittel, gross: aboLabels.nameGross }; + // Icon + Farbkategorie je Benachrichtigungs-Typ — rein optisch, keine Übersetzung nötig + // (die Schlüssel sind sprachneutrale Konstanten aus scripts/account.ts). + const NOTIF_ICON: Record = { + abo_abgeschlossen: "🎉", + abo_gewechselt: "🔄", + abo_zahlung_erfolgreich: "✅", + abo_teddy_klein_frei: "🧸", + abo_teddy_gross_frei: "🧸", + abo_bald_praemie: "⏳", + abo_gekuendigt: "🚫", + abo_teddy_klein_eingeloest: "🎁", + abo_teddy_gross_eingeloest: "🎁", + }; + const NOTIF_KATEGORIE: Record = { + abo_abgeschlossen: "erfolg", + abo_gewechselt: "info", + abo_zahlung_erfolgreich: "erfolg", + abo_teddy_klein_frei: "praemie", + abo_teddy_gross_frei: "praemie", + abo_bald_praemie: "warnung", + abo_gekuendigt: "abbruch", + abo_teddy_klein_eingeloest: "praemie", + abo_teddy_gross_eingeloest: "praemie", + }; function renderAbo() { const a = getAccount(); @@ -645,19 +736,28 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === activeBadge.className = "badge " + (status.aktiv ? "abo-badge-active" : "abo-badge-inactive"); } - const fortschrittKlein = document.getElementById("abo-fortschritt-klein"); - if (fortschrittKlein) { - if (status.naechsterKleinIn != null) { - fortschrittKlein.style.display = "block"; - fortschrittKlein.textContent = aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn)); - } else fortschrittKlein.style.display = "none"; + // Echte Fortschrittsbalken statt reinem Text — Prozent ergibt sich aus dem admin- + // konfigurierten Intervall (aboStufenKonfig) minus der noch fehlenden Monate. + const stufenKonfig = aboStufenKonfig(status.stufe); + const fortschrittKleinWrap = document.getElementById("abo-fortschritt-klein-wrap"); + if (fortschrittKleinWrap) { + if (status.naechsterKleinIn != null && stufenKonfig.kleinIntervallMonate > 0) { + fortschrittKleinWrap.style.display = "block"; + setText("abo-fortschritt-klein-text", aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.kleinIntervallMonate - status.naechsterKleinIn) / stufenKonfig.kleinIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-klein-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittKleinWrap.style.display = "none"; } - const fortschrittGross = document.getElementById("abo-fortschritt-gross"); - if (fortschrittGross) { - if (status.naechsterGrossIn != null) { - fortschrittGross.style.display = "block"; - fortschrittGross.textContent = aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn)); - } else fortschrittGross.style.display = "none"; + const fortschrittGrossWrap = document.getElementById("abo-fortschritt-gross-wrap"); + if (fortschrittGrossWrap) { + if (status.naechsterGrossIn != null && stufenKonfig.grossIntervallMonate > 0) { + fortschrittGrossWrap.style.display = "block"; + setText("abo-fortschritt-gross-text", aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.grossIntervallMonate - status.naechsterGrossIn) / stufenKonfig.grossIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-gross-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittGrossWrap.style.display = "none"; } setText("abo-praemien-erhalten", aboLabels.praemienErhaltenTemplate @@ -674,11 +774,11 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === const hasKlein = status.kleinVerfuegbar > 0; const hasGross = status.grossVerfuegbar > 0; - const einloesenKlein = document.getElementById("abo-einloesen-klein") as HTMLElement | null; - const einloesenGross = document.getElementById("abo-einloesen-gross") as HTMLElement | null; + const einloesenKleinWrap = document.getElementById("abo-einloesen-klein-wrap") as HTMLElement | null; + const einloesenGrossWrap = document.getElementById("abo-einloesen-gross-wrap") as HTMLElement | null; const keinePraemien = document.getElementById("abo-keine-praemien") as HTMLElement | null; - if (einloesenKlein) einloesenKlein.style.display = hasKlein ? "inline-flex" : "none"; - if (einloesenGross) einloesenGross.style.display = hasGross ? "inline-flex" : "none"; + if (einloesenKleinWrap) einloesenKleinWrap.style.display = hasKlein ? "flex" : "none"; + if (einloesenGrossWrap) einloesenGrossWrap.style.display = hasGross ? "flex" : "none"; if (keinePraemien) keinePraemien.style.display = hasKlein || hasGross ? "none" : "block"; const kuendigenBtn = document.getElementById("abo-kuendigen-btn") as HTMLElement | null; @@ -696,10 +796,14 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === } else { a.benachrichtigungen.forEach((n) => { const li = document.createElement("li"); - li.className = "small abo-notif-item" + (n.gelesen ? "" : " abo-notif-unread"); + const kategorie = NOTIF_KATEGORIE[n.key] ?? "info"; + li.className = `abo-notif-item abo-notif-${kategorie}` + (n.gelesen ? "" : " abo-notif-unread"); let text = aboLabels.notifKeyLabels[n.key] ?? n.key; if (n.stufe) text = text.replace("{stufe}", aboNameMap[n.stufe] ?? n.stufe); - li.textContent = `${n.datum} — ${text}`; + li.innerHTML = ` + + ${text}${n.datum} + `; list.appendChild(li); }); } diff --git a/src/pages/en/konto/angemeldet.astro b/src/pages/en/konto/angemeldet.astro index 0a85401..f9f7e1c 100644 --- a/src/pages/en/konto/angemeldet.astro +++ b/src/pages/en/konto/angemeldet.astro @@ -57,6 +57,9 @@ const aboPlanLabels: Record = { mittel: { name: aboStufeName("mittel", lang), vorteil: aboStufeVorteil("mittel", lang) }, gross: { name: aboStufeName("gross", lang), vorteil: aboStufeVorteil("gross", lang) }, }; +// Eigenes Icon je Stufe (rein optisch, nicht admin-editierbar) — soll auf einen Blick erkennbar +// machen, dass es sich um eine aufsteigende Reihe handelt (Keimling → Blatt → Krone). +const aboPlanIcon: Record = { klein: "🌱", mittel: "🌿", gross: "👑" }; // "Zuletzt angesehen" zeigt in dieser Vorschau einfach die ersten echten Produkte aus dem Shop — // in Phase 2 kommt hier die tatsächliche Verlaufs-Historie der angemeldeten Person hin. @@ -356,8 +359,18 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === return (
+

{labels.name}

{formatPrice(cfg.preis, lang)} {t.accountDash.aboPreisSuffix}

+ 💰 −{cfg.rabattProzent}% +
+ {cfg.kleinIntervallMonate > 0 && ( + 🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.kleinIntervallMonate))} + )} + {cfg.grossIntervallMonate > 0 && ( + 🧸🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.grossIntervallMonate))} + )} +

{labels.vorteil}

@@ -369,28 +382,81 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status ===

{t.accountDash.aboStatusTitle}

- - - - - - - - - -
{t.accountDash.aboFieldStufe}
{t.accountDash.aboFieldPreis}
{t.accountDash.aboFieldRabatt}
{t.accountDash.aboFieldStart}
{t.accountDash.aboFieldNaechsteZahlung}
{t.accountDash.aboFieldLaufzeit}
- - -

+
+
+ + {t.accountDash.aboFieldStufe} + +
+
+ + {t.accountDash.aboFieldPreis} + +
+
+ + {t.accountDash.aboFieldRabatt} + +
+
+ + {t.accountDash.aboFieldStart} + +
+
+ + {t.accountDash.aboFieldNaechsteZahlung} + +
+
+ + {t.accountDash.aboFieldLaufzeit} + +
+
+ +
+ + +
+ +
+ + +

{t.accountDash.aboPraemienVerfuegbarTitle}

{t.accountDash.aboKeinePraemienVerfuegbar}

- - + +
@@ -506,6 +572,7 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === import { rechnungAlsPdfHerunterladen } from "../../../scripts/invoice-pdf"; import { fuegeTeddyGratisHinzu } from "../../../scripts/cart"; import { formatPrice } from "../../../i18n/format"; + import { aboStufenKonfig } from "../../../data/abo"; const { loginPath, fallbackName, greetingTemplate, reviewedBadgeText, invoiceLang, invoiceLabels, loyaltyProgressTemplate, loyaltyRemainingOne, loyaltyRemainingOther, loyaltyUnlockedTitle, loyaltyUnlockedText, aboLang, aboLabels } = (window as any).__accountDashVars; // Zugriffsschutz: diese Seite ist nur für angemeldete Kund:innen gedacht. Es gibt noch kein @@ -595,6 +662,30 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === // Abosystem: Pläne, Status, Fortschritt, Prämien und Benachrichtigungen live aus dem Konto // rendern (Nav-Kachel + Planvergleich + Statuskarte + Benachrichtigungsliste). const aboNameMap: Record = { klein: aboLabels.nameKlein, mittel: aboLabels.nameMittel, gross: aboLabels.nameGross }; + // Icon + Farbkategorie je Benachrichtigungs-Typ — rein optisch, keine Übersetzung nötig + // (die Schlüssel sind sprachneutrale Konstanten aus scripts/account.ts). + const NOTIF_ICON: Record = { + abo_abgeschlossen: "🎉", + abo_gewechselt: "🔄", + abo_zahlung_erfolgreich: "✅", + abo_teddy_klein_frei: "🧸", + abo_teddy_gross_frei: "🧸", + abo_bald_praemie: "⏳", + abo_gekuendigt: "🚫", + abo_teddy_klein_eingeloest: "🎁", + abo_teddy_gross_eingeloest: "🎁", + }; + const NOTIF_KATEGORIE: Record = { + abo_abgeschlossen: "erfolg", + abo_gewechselt: "info", + abo_zahlung_erfolgreich: "erfolg", + abo_teddy_klein_frei: "praemie", + abo_teddy_gross_frei: "praemie", + abo_bald_praemie: "warnung", + abo_gekuendigt: "abbruch", + abo_teddy_klein_eingeloest: "praemie", + abo_teddy_gross_eingeloest: "praemie", + }; function renderAbo() { const a = getAccount(); @@ -645,19 +736,28 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === activeBadge.className = "badge " + (status.aktiv ? "abo-badge-active" : "abo-badge-inactive"); } - const fortschrittKlein = document.getElementById("abo-fortschritt-klein"); - if (fortschrittKlein) { - if (status.naechsterKleinIn != null) { - fortschrittKlein.style.display = "block"; - fortschrittKlein.textContent = aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn)); - } else fortschrittKlein.style.display = "none"; + // Echte Fortschrittsbalken statt reinem Text — Prozent ergibt sich aus dem admin- + // konfigurierten Intervall (aboStufenKonfig) minus der noch fehlenden Monate. + const stufenKonfig = aboStufenKonfig(status.stufe); + const fortschrittKleinWrap = document.getElementById("abo-fortschritt-klein-wrap"); + if (fortschrittKleinWrap) { + if (status.naechsterKleinIn != null && stufenKonfig.kleinIntervallMonate > 0) { + fortschrittKleinWrap.style.display = "block"; + setText("abo-fortschritt-klein-text", aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.kleinIntervallMonate - status.naechsterKleinIn) / stufenKonfig.kleinIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-klein-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittKleinWrap.style.display = "none"; } - const fortschrittGross = document.getElementById("abo-fortschritt-gross"); - if (fortschrittGross) { - if (status.naechsterGrossIn != null) { - fortschrittGross.style.display = "block"; - fortschrittGross.textContent = aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn)); - } else fortschrittGross.style.display = "none"; + const fortschrittGrossWrap = document.getElementById("abo-fortschritt-gross-wrap"); + if (fortschrittGrossWrap) { + if (status.naechsterGrossIn != null && stufenKonfig.grossIntervallMonate > 0) { + fortschrittGrossWrap.style.display = "block"; + setText("abo-fortschritt-gross-text", aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.grossIntervallMonate - status.naechsterGrossIn) / stufenKonfig.grossIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-gross-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittGrossWrap.style.display = "none"; } setText("abo-praemien-erhalten", aboLabels.praemienErhaltenTemplate @@ -674,11 +774,11 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === const hasKlein = status.kleinVerfuegbar > 0; const hasGross = status.grossVerfuegbar > 0; - const einloesenKlein = document.getElementById("abo-einloesen-klein") as HTMLElement | null; - const einloesenGross = document.getElementById("abo-einloesen-gross") as HTMLElement | null; + const einloesenKleinWrap = document.getElementById("abo-einloesen-klein-wrap") as HTMLElement | null; + const einloesenGrossWrap = document.getElementById("abo-einloesen-gross-wrap") as HTMLElement | null; const keinePraemien = document.getElementById("abo-keine-praemien") as HTMLElement | null; - if (einloesenKlein) einloesenKlein.style.display = hasKlein ? "inline-flex" : "none"; - if (einloesenGross) einloesenGross.style.display = hasGross ? "inline-flex" : "none"; + if (einloesenKleinWrap) einloesenKleinWrap.style.display = hasKlein ? "flex" : "none"; + if (einloesenGrossWrap) einloesenGrossWrap.style.display = hasGross ? "flex" : "none"; if (keinePraemien) keinePraemien.style.display = hasKlein || hasGross ? "none" : "block"; const kuendigenBtn = document.getElementById("abo-kuendigen-btn") as HTMLElement | null; @@ -696,10 +796,14 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === } else { a.benachrichtigungen.forEach((n) => { const li = document.createElement("li"); - li.className = "small abo-notif-item" + (n.gelesen ? "" : " abo-notif-unread"); + const kategorie = NOTIF_KATEGORIE[n.key] ?? "info"; + li.className = `abo-notif-item abo-notif-${kategorie}` + (n.gelesen ? "" : " abo-notif-unread"); let text = aboLabels.notifKeyLabels[n.key] ?? n.key; if (n.stufe) text = text.replace("{stufe}", aboNameMap[n.stufe] ?? n.stufe); - li.textContent = `${n.datum} — ${text}`; + li.innerHTML = ` + + ${text}${n.datum} + `; list.appendChild(li); }); } diff --git a/src/pages/fr/konto/angemeldet.astro b/src/pages/fr/konto/angemeldet.astro index dfaf06e..5dd6382 100644 --- a/src/pages/fr/konto/angemeldet.astro +++ b/src/pages/fr/konto/angemeldet.astro @@ -57,6 +57,9 @@ const aboPlanLabels: Record = { mittel: { name: aboStufeName("mittel", lang), vorteil: aboStufeVorteil("mittel", lang) }, gross: { name: aboStufeName("gross", lang), vorteil: aboStufeVorteil("gross", lang) }, }; +// Eigenes Icon je Stufe (rein optisch, nicht admin-editierbar) — soll auf einen Blick erkennbar +// machen, dass es sich um eine aufsteigende Reihe handelt (Keimling → Blatt → Krone). +const aboPlanIcon: Record = { klein: "🌱", mittel: "🌿", gross: "👑" }; // "Zuletzt angesehen" zeigt in dieser Vorschau einfach die ersten echten Produkte aus dem Shop — // in Phase 2 kommt hier die tatsächliche Verlaufs-Historie der angemeldeten Person hin. @@ -356,8 +359,18 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === return (
+

{labels.name}

{formatPrice(cfg.preis, lang)} {t.accountDash.aboPreisSuffix}

+ 💰 −{cfg.rabattProzent}% +
+ {cfg.kleinIntervallMonate > 0 && ( + 🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.kleinIntervallMonate))} + )} + {cfg.grossIntervallMonate > 0 && ( + 🧸🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.grossIntervallMonate))} + )} +

{labels.vorteil}

@@ -369,28 +382,81 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status ===

{t.accountDash.aboStatusTitle}

- - - - - - - - - -
{t.accountDash.aboFieldStufe}
{t.accountDash.aboFieldPreis}
{t.accountDash.aboFieldRabatt}
{t.accountDash.aboFieldStart}
{t.accountDash.aboFieldNaechsteZahlung}
{t.accountDash.aboFieldLaufzeit}
- - -

+
+
+ + {t.accountDash.aboFieldStufe} + +
+
+ + {t.accountDash.aboFieldPreis} + +
+
+ + {t.accountDash.aboFieldRabatt} + +
+
+ + {t.accountDash.aboFieldStart} + +
+
+ + {t.accountDash.aboFieldNaechsteZahlung} + +
+
+ + {t.accountDash.aboFieldLaufzeit} + +
+
+ +
+ + +
+ +
+ + +

{t.accountDash.aboPraemienVerfuegbarTitle}

{t.accountDash.aboKeinePraemienVerfuegbar}

- - + +
@@ -506,6 +572,7 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === import { rechnungAlsPdfHerunterladen } from "../../../scripts/invoice-pdf"; import { fuegeTeddyGratisHinzu } from "../../../scripts/cart"; import { formatPrice } from "../../../i18n/format"; + import { aboStufenKonfig } from "../../../data/abo"; const { loginPath, fallbackName, greetingTemplate, reviewedBadgeText, invoiceLang, invoiceLabels, loyaltyProgressTemplate, loyaltyRemainingOne, loyaltyRemainingOther, loyaltyUnlockedTitle, loyaltyUnlockedText, aboLang, aboLabels } = (window as any).__accountDashVars; // Zugriffsschutz: diese Seite ist nur für angemeldete Kund:innen gedacht. Es gibt noch kein @@ -595,6 +662,30 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === // Abosystem: Pläne, Status, Fortschritt, Prämien und Benachrichtigungen live aus dem Konto // rendern (Nav-Kachel + Planvergleich + Statuskarte + Benachrichtigungsliste). const aboNameMap: Record = { klein: aboLabels.nameKlein, mittel: aboLabels.nameMittel, gross: aboLabels.nameGross }; + // Icon + Farbkategorie je Benachrichtigungs-Typ — rein optisch, keine Übersetzung nötig + // (die Schlüssel sind sprachneutrale Konstanten aus scripts/account.ts). + const NOTIF_ICON: Record = { + abo_abgeschlossen: "🎉", + abo_gewechselt: "🔄", + abo_zahlung_erfolgreich: "✅", + abo_teddy_klein_frei: "🧸", + abo_teddy_gross_frei: "🧸", + abo_bald_praemie: "⏳", + abo_gekuendigt: "🚫", + abo_teddy_klein_eingeloest: "🎁", + abo_teddy_gross_eingeloest: "🎁", + }; + const NOTIF_KATEGORIE: Record = { + abo_abgeschlossen: "erfolg", + abo_gewechselt: "info", + abo_zahlung_erfolgreich: "erfolg", + abo_teddy_klein_frei: "praemie", + abo_teddy_gross_frei: "praemie", + abo_bald_praemie: "warnung", + abo_gekuendigt: "abbruch", + abo_teddy_klein_eingeloest: "praemie", + abo_teddy_gross_eingeloest: "praemie", + }; function renderAbo() { const a = getAccount(); @@ -645,19 +736,28 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === activeBadge.className = "badge " + (status.aktiv ? "abo-badge-active" : "abo-badge-inactive"); } - const fortschrittKlein = document.getElementById("abo-fortschritt-klein"); - if (fortschrittKlein) { - if (status.naechsterKleinIn != null) { - fortschrittKlein.style.display = "block"; - fortschrittKlein.textContent = aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn)); - } else fortschrittKlein.style.display = "none"; + // Echte Fortschrittsbalken statt reinem Text — Prozent ergibt sich aus dem admin- + // konfigurierten Intervall (aboStufenKonfig) minus der noch fehlenden Monate. + const stufenKonfig = aboStufenKonfig(status.stufe); + const fortschrittKleinWrap = document.getElementById("abo-fortschritt-klein-wrap"); + if (fortschrittKleinWrap) { + if (status.naechsterKleinIn != null && stufenKonfig.kleinIntervallMonate > 0) { + fortschrittKleinWrap.style.display = "block"; + setText("abo-fortschritt-klein-text", aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.kleinIntervallMonate - status.naechsterKleinIn) / stufenKonfig.kleinIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-klein-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittKleinWrap.style.display = "none"; } - const fortschrittGross = document.getElementById("abo-fortschritt-gross"); - if (fortschrittGross) { - if (status.naechsterGrossIn != null) { - fortschrittGross.style.display = "block"; - fortschrittGross.textContent = aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn)); - } else fortschrittGross.style.display = "none"; + const fortschrittGrossWrap = document.getElementById("abo-fortschritt-gross-wrap"); + if (fortschrittGrossWrap) { + if (status.naechsterGrossIn != null && stufenKonfig.grossIntervallMonate > 0) { + fortschrittGrossWrap.style.display = "block"; + setText("abo-fortschritt-gross-text", aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.grossIntervallMonate - status.naechsterGrossIn) / stufenKonfig.grossIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-gross-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittGrossWrap.style.display = "none"; } setText("abo-praemien-erhalten", aboLabels.praemienErhaltenTemplate @@ -674,11 +774,11 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === const hasKlein = status.kleinVerfuegbar > 0; const hasGross = status.grossVerfuegbar > 0; - const einloesenKlein = document.getElementById("abo-einloesen-klein") as HTMLElement | null; - const einloesenGross = document.getElementById("abo-einloesen-gross") as HTMLElement | null; + const einloesenKleinWrap = document.getElementById("abo-einloesen-klein-wrap") as HTMLElement | null; + const einloesenGrossWrap = document.getElementById("abo-einloesen-gross-wrap") as HTMLElement | null; const keinePraemien = document.getElementById("abo-keine-praemien") as HTMLElement | null; - if (einloesenKlein) einloesenKlein.style.display = hasKlein ? "inline-flex" : "none"; - if (einloesenGross) einloesenGross.style.display = hasGross ? "inline-flex" : "none"; + if (einloesenKleinWrap) einloesenKleinWrap.style.display = hasKlein ? "flex" : "none"; + if (einloesenGrossWrap) einloesenGrossWrap.style.display = hasGross ? "flex" : "none"; if (keinePraemien) keinePraemien.style.display = hasKlein || hasGross ? "none" : "block"; const kuendigenBtn = document.getElementById("abo-kuendigen-btn") as HTMLElement | null; @@ -696,10 +796,14 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === } else { a.benachrichtigungen.forEach((n) => { const li = document.createElement("li"); - li.className = "small abo-notif-item" + (n.gelesen ? "" : " abo-notif-unread"); + const kategorie = NOTIF_KATEGORIE[n.key] ?? "info"; + li.className = `abo-notif-item abo-notif-${kategorie}` + (n.gelesen ? "" : " abo-notif-unread"); let text = aboLabels.notifKeyLabels[n.key] ?? n.key; if (n.stufe) text = text.replace("{stufe}", aboNameMap[n.stufe] ?? n.stufe); - li.textContent = `${n.datum} — ${text}`; + li.innerHTML = ` + + ${text}${n.datum} + `; list.appendChild(li); }); } diff --git a/src/pages/konto/angemeldet.astro b/src/pages/konto/angemeldet.astro index a35b83f..148cce8 100644 --- a/src/pages/konto/angemeldet.astro +++ b/src/pages/konto/angemeldet.astro @@ -58,6 +58,9 @@ const aboPlanLabels: Record = { mittel: { name: aboStufeName("mittel", lang), vorteil: aboStufeVorteil("mittel", lang) }, gross: { name: aboStufeName("gross", lang), vorteil: aboStufeVorteil("gross", lang) }, }; +// Eigenes Icon je Stufe (rein optisch, nicht admin-editierbar) — soll auf einen Blick erkennbar +// machen, dass es sich um eine aufsteigende Reihe handelt (Keimling → Blatt → Krone). +const aboPlanIcon: Record = { klein: "🌱", mittel: "🌿", gross: "👑" }; // "Zuletzt angesehen" zeigt in dieser Vorschau einfach die ersten echten Produkte aus dem Shop — // in Phase 2 kommt hier die tatsächliche Verlaufs-Historie der angemeldeten Person hin. @@ -360,8 +363,18 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === return (
+

{labels.name}

{formatPrice(cfg.preis, lang)} {t.accountDash.aboPreisSuffix}

+ 💰 −{cfg.rabattProzent}% +
+ {cfg.kleinIntervallMonate > 0 && ( + 🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.kleinIntervallMonate))} + )} + {cfg.grossIntervallMonate > 0 && ( + 🧸🧸 {t.accountDash.aboRewardEveryLabel.replace("{n}", String(cfg.grossIntervallMonate))} + )} +

{labels.vorteil}

@@ -373,28 +386,81 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status ===

{t.accountDash.aboStatusTitle}

- - - - - - - - - -
{t.accountDash.aboFieldStufe}
{t.accountDash.aboFieldPreis}
{t.accountDash.aboFieldRabatt}
{t.accountDash.aboFieldStart}
{t.accountDash.aboFieldNaechsteZahlung}
{t.accountDash.aboFieldLaufzeit}
- - -

+
+
+ + {t.accountDash.aboFieldStufe} + +
+
+ + {t.accountDash.aboFieldPreis} + +
+
+ + {t.accountDash.aboFieldRabatt} + +
+
+ + {t.accountDash.aboFieldStart} + +
+
+ + {t.accountDash.aboFieldNaechsteZahlung} + +
+
+ + {t.accountDash.aboFieldLaufzeit} + +
+
+ +
+ + +
+ +
+ + +

{t.accountDash.aboPraemienVerfuegbarTitle}

{t.accountDash.aboKeinePraemienVerfuegbar}

- - + +
@@ -514,6 +580,7 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === import { rechnungAlsPdfHerunterladen } from "../../scripts/invoice-pdf"; import { fuegeTeddyGratisHinzu } from "../../scripts/cart"; import { formatPrice } from "../../i18n/format"; + import { aboStufenKonfig } from "../../data/abo"; const { loginPath, fallbackName, greetingTemplate, reviewedBadgeText, invoiceLang, invoiceLabels, loyaltyProgressTemplate, loyaltyRemainingOne, loyaltyRemainingOther, loyaltyUnlockedTitle, loyaltyUnlockedText, aboLang, aboLabels } = (window as any).__accountDashVars; // Zugriffsschutz: diese Seite ist nur für angemeldete Kund:innen gedacht. Es gibt noch kein @@ -605,6 +672,30 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === // Abosystem: Pläne, Status, Fortschritt, Prämien und Benachrichtigungen live aus dem Konto // rendern (Nav-Kachel + Planvergleich + Statuskarte + Benachrichtigungsliste). const aboNameMap: Record = { klein: aboLabels.nameKlein, mittel: aboLabels.nameMittel, gross: aboLabels.nameGross }; + // Icon + Farbkategorie je Benachrichtigungs-Typ — rein optisch, keine Übersetzung nötig + // (die Schlüssel sind sprachneutrale Konstanten aus scripts/account.ts). + const NOTIF_ICON: Record = { + abo_abgeschlossen: "🎉", + abo_gewechselt: "🔄", + abo_zahlung_erfolgreich: "✅", + abo_teddy_klein_frei: "🧸", + abo_teddy_gross_frei: "🧸", + abo_bald_praemie: "⏳", + abo_gekuendigt: "🚫", + abo_teddy_klein_eingeloest: "🎁", + abo_teddy_gross_eingeloest: "🎁", + }; + const NOTIF_KATEGORIE: Record = { + abo_abgeschlossen: "erfolg", + abo_gewechselt: "info", + abo_zahlung_erfolgreich: "erfolg", + abo_teddy_klein_frei: "praemie", + abo_teddy_gross_frei: "praemie", + abo_bald_praemie: "warnung", + abo_gekuendigt: "abbruch", + abo_teddy_klein_eingeloest: "praemie", + abo_teddy_gross_eingeloest: "praemie", + }; function renderAbo() { const a = getAccount(); @@ -655,19 +746,28 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === activeBadge.className = "badge " + (status.aktiv ? "abo-badge-active" : "abo-badge-inactive"); } - const fortschrittKlein = document.getElementById("abo-fortschritt-klein"); - if (fortschrittKlein) { - if (status.naechsterKleinIn != null) { - fortschrittKlein.style.display = "block"; - fortschrittKlein.textContent = aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn)); - } else fortschrittKlein.style.display = "none"; + // Echte Fortschrittsbalken statt reinem Text — Prozent ergibt sich aus dem admin- + // konfigurierten Intervall (aboStufenKonfig) minus der noch fehlenden Monate. + const stufenKonfig = aboStufenKonfig(status.stufe); + const fortschrittKleinWrap = document.getElementById("abo-fortschritt-klein-wrap"); + if (fortschrittKleinWrap) { + if (status.naechsterKleinIn != null && stufenKonfig.kleinIntervallMonate > 0) { + fortschrittKleinWrap.style.display = "block"; + setText("abo-fortschritt-klein-text", aboLabels.fortschrittKleinTemplate.replace("{n}", String(status.naechsterKleinIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.kleinIntervallMonate - status.naechsterKleinIn) / stufenKonfig.kleinIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-klein-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittKleinWrap.style.display = "none"; } - const fortschrittGross = document.getElementById("abo-fortschritt-gross"); - if (fortschrittGross) { - if (status.naechsterGrossIn != null) { - fortschrittGross.style.display = "block"; - fortschrittGross.textContent = aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn)); - } else fortschrittGross.style.display = "none"; + const fortschrittGrossWrap = document.getElementById("abo-fortschritt-gross-wrap"); + if (fortschrittGrossWrap) { + if (status.naechsterGrossIn != null && stufenKonfig.grossIntervallMonate > 0) { + fortschrittGrossWrap.style.display = "block"; + setText("abo-fortschritt-gross-text", aboLabels.fortschrittGrossTemplate.replace("{n}", String(status.naechsterGrossIn))); + const pct = Math.min(100, Math.max(0, ((stufenKonfig.grossIntervallMonate - status.naechsterGrossIn) / stufenKonfig.grossIntervallMonate) * 100)); + const fill = document.getElementById("abo-fortschritt-gross-fill") as HTMLElement | null; + if (fill) fill.style.width = `${pct}%`; + } else fortschrittGrossWrap.style.display = "none"; } setText("abo-praemien-erhalten", aboLabels.praemienErhaltenTemplate @@ -684,11 +784,11 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === const hasKlein = status.kleinVerfuegbar > 0; const hasGross = status.grossVerfuegbar > 0; - const einloesenKlein = document.getElementById("abo-einloesen-klein") as HTMLElement | null; - const einloesenGross = document.getElementById("abo-einloesen-gross") as HTMLElement | null; + const einloesenKleinWrap = document.getElementById("abo-einloesen-klein-wrap") as HTMLElement | null; + const einloesenGrossWrap = document.getElementById("abo-einloesen-gross-wrap") as HTMLElement | null; const keinePraemien = document.getElementById("abo-keine-praemien") as HTMLElement | null; - if (einloesenKlein) einloesenKlein.style.display = hasKlein ? "inline-flex" : "none"; - if (einloesenGross) einloesenGross.style.display = hasGross ? "inline-flex" : "none"; + if (einloesenKleinWrap) einloesenKleinWrap.style.display = hasKlein ? "flex" : "none"; + if (einloesenGrossWrap) einloesenGrossWrap.style.display = hasGross ? "flex" : "none"; if (keinePraemien) keinePraemien.style.display = hasKlein || hasGross ? "none" : "block"; const kuendigenBtn = document.getElementById("abo-kuendigen-btn") as HTMLElement | null; @@ -706,10 +806,14 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === } else { a.benachrichtigungen.forEach((n) => { const li = document.createElement("li"); - li.className = "small abo-notif-item" + (n.gelesen ? "" : " abo-notif-unread"); + const kategorie = NOTIF_KATEGORIE[n.key] ?? "info"; + li.className = `abo-notif-item abo-notif-${kategorie}` + (n.gelesen ? "" : " abo-notif-unread"); let text = aboLabels.notifKeyLabels[n.key] ?? n.key; if (n.stufe) text = text.replace("{stufe}", aboNameMap[n.stufe] ?? n.stufe); - li.textContent = `${n.datum} — ${text}`; + li.innerHTML = ` + + ${text}${n.datum} + `; list.appendChild(li); }); } diff --git a/src/styles/global.css b/src/styles/global.css index 7354ff2..f404169 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -2458,24 +2458,67 @@ a:focus-visible, button:focus-visible { } @media (prefers-reduced-motion: reduce) { .btn-daten-hero, .btn-daten-hero::after, .btn-daten-hero-sparkle { animation: none; } } -/* Abosystem: drei Planvergleichs-Karten + Statuskarte + Benachrichtigungsliste. */ +/* Abosystem: drei Planvergleichs-Karten + Statuskarte + Benachrichtigungsliste. Soll insgesamt + deutlich "wertiger" aussehen als ein normaler Formular-/Tabellenbereich — durchgehend mit + Icons, Farbverläufen, echten Fortschrittsbalken statt reinem Text und leicht animierten + Akzenten, damit sich das Abo auf den ersten Blick nach einem Premium-Feature anfühlt. */ .abo-plans { margin: 1.4rem 0 1.6rem; } .abo-plan-card { position: relative; + overflow: hidden; display: flex; flex-direction: column; - gap: 0.6rem; + gap: 0.5rem; border: 1.5px solid rgba(244, 241, 247, 0.14); - transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); + transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease); } -.abo-plan-card:hover { transform: translateY(-3px); } +.abo-plan-card::before { + content: ""; + position: absolute; + inset: 0; + background: radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--plan-color, var(--c-accent)) 16%, transparent), transparent 70%); + pointer-events: none; +} +.abo-plan-card > * { position: relative; z-index: 1; } +.abo-plan-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -20px color-mix(in srgb, var(--plan-color, var(--c-accent)) 55%, transparent); } .abo-plan-klein { --plan-color: #6ecb8f; } .abo-plan-mittel { --plan-color: var(--c-accent); } .abo-plan-gross { --plan-color: #e3b23c; } -.abo-plan-card h3 { margin: 0.2rem 0 0; color: var(--plan-color, var(--c-accent)); } -.abo-plan-price { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; margin: 0; } +.abo-plan-icon { font-size: 2.1rem; line-height: 1; filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--plan-color, var(--c-accent)) 60%, transparent)); } +.abo-plan-card h3 { margin: 0; color: var(--plan-color, var(--c-accent)); } +.abo-plan-price { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; margin: 0; background-image: linear-gradient(120deg, var(--c-text), var(--plan-color, var(--c-accent))); -webkit-background-clip: text; background-clip: text; color: transparent; } +.abo-plan-price .small { -webkit-text-fill-color: var(--c-text-muted); color: var(--c-text-muted); } +.abo-plan-discount-chip { + align-self: flex-start; + font-weight: 800; + font-size: 0.9rem; + padding: 0.25rem 0.75rem; + border-radius: 999px; + background: color-mix(in srgb, var(--plan-color, var(--c-accent)) 26%, transparent); + border: 1px solid color-mix(in srgb, var(--plan-color, var(--c-accent)) 50%, transparent); + color: var(--plan-color, var(--c-accent)); +} +.abo-plan-rewards { display: flex; gap: 0.4rem; flex-wrap: wrap; } +.abo-plan-reward-chip { + font-size: 0.78rem; + font-weight: 600; + padding: 0.2rem 0.6rem; + border-radius: 999px; + background: rgba(244, 241, 247, 0.06); + border: 1px solid rgba(244, 241, 247, 0.16); + color: var(--c-text-muted); +} +.abo-plan-reward-chip-gross { background: color-mix(in srgb, #e3b23c 16%, transparent); border-color: color-mix(in srgb, #e3b23c 40%, transparent); color: #f6dda0; } .abo-plan-vorteil { margin: 0; color: var(--c-text-muted); flex-grow: 1; } -.abo-plan-card.is-current-plan { border-color: var(--plan-color, var(--c-accent)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--plan-color, var(--c-accent)) 50%, transparent), 0 0 20px -8px color-mix(in srgb, var(--plan-color, var(--c-accent)) 60%, transparent); } +.abo-plan-card.is-current-plan { + border-color: var(--plan-color, var(--c-accent)); + box-shadow: 0 0 0 1px color-mix(in srgb, var(--plan-color, var(--c-accent)) 55%, transparent), 0 0 28px -10px color-mix(in srgb, var(--plan-color, var(--c-accent)) 70%, transparent); + animation: abo-plan-current-glow 3.2s ease-in-out infinite; +} +@keyframes abo-plan-current-glow { + 0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--plan-color, var(--c-accent)) 55%, transparent), 0 0 20px -10px color-mix(in srgb, var(--plan-color, var(--c-accent)) 65%, transparent); } + 50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--plan-color, var(--c-accent)) 70%, transparent), 0 0 32px -8px color-mix(in srgb, var(--plan-color, var(--c-accent)) 80%, transparent); } +} .abo-plan-badge { align-self: flex-start; background: color-mix(in srgb, var(--plan-color, var(--c-accent)) 30%, transparent); border: 1px solid color-mix(in srgb, var(--plan-color, var(--c-accent)) 55%, transparent); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.78rem; font-weight: 700; } .abo-plan-btn { align-self: flex-start; } .abo-plan-btn:disabled { opacity: 0.6; cursor: default; } @@ -2485,13 +2528,101 @@ a:focus-visible, button:focus-visible { .abo-status-card h3 { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; } .abo-badge-active { background: rgba(126, 200, 160, 0.28); border-color: rgba(126, 200, 160, 0.5); color: #cfeee0; } .abo-badge-inactive { background: color-mix(in srgb, var(--c-sale) 30%, transparent); border-color: color-mix(in srgb, var(--c-sale) 55%, transparent); } + +/* Stat-Kacheln statt trockener Tabelle — jede Kennzahl bekommt ein eigenes Icon und mehr + optisches Gewicht, der Rabatt (der eigentliche "Wow"-Wert des Abos) sticht farblich heraus. */ +.abo-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; margin: 0.2rem 0 1.1rem; } +.abo-stat-tile { + display: flex; + flex-direction: column; + gap: 0.15rem; + padding: 0.8rem 0.9rem; + border-radius: var(--radius-m); + background: rgba(244, 241, 247, 0.045); + border: 1px solid rgba(244, 241, 247, 0.1); +} +.abo-stat-tile-highlight { background: color-mix(in srgb, #e3b23c 12%, transparent); border-color: color-mix(in srgb, #e3b23c 38%, transparent); } +.abo-stat-icon { font-size: 1.3rem; } +.abo-stat-label { font-size: 0.76rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.03em; } +.abo-stat-value { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; } +.abo-stat-tile-highlight .abo-stat-value { color: #e3b23c; } + +/* Echte Fortschrittsbalken (wiederverwendet dieselbe Optik wie der Treuebonus-Balken) für den + Weg zum nächsten Teddy — deutlich greifbarer als reiner Fließtext. */ +.abo-reward-progress-block { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 0.4rem; } +.abo-reward-progress-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; font-weight: 600; } +.abo-reward-bar-gross { background: linear-gradient(90deg, #e3b23c, #f6dda0); } + +.abo-erhalten-chip { + align-self: flex-start; + display: inline-flex; + align-items: center; + gap: 0.5rem; + padding: 0.4rem 0.9rem; + border-radius: 999px; + background: rgba(126, 200, 160, 0.14); + border: 1px solid rgba(126, 200, 160, 0.35); + font-size: 0.9rem; +} + .abo-praemien-block { border-top: 1px dashed rgba(244, 241, 247, 0.14); padding-top: 0.9rem; margin-top: 0.3rem; } .abo-praemien-block h4 { margin: 0 0 0.4rem; } -.abo-praemien-row { display: flex; gap: 0.7rem; flex-wrap: wrap; } +.abo-praemien-row { display: flex; gap: 0.9rem; flex-wrap: wrap; } + +/* Verfügbare Prämie: eigene, leicht pulsierende Karte statt eines schlichten Buttons — soll + klar als "hier wartet etwas Kostenloses auf dich" auffallen. */ +.abo-reward-ready { + display: flex; + align-items: center; + gap: 0.8rem; + padding: 0.7rem 1rem; + border-radius: var(--radius-l); + background: linear-gradient(155deg, color-mix(in srgb, #e3b23c 16%, var(--c-anthracite-light)), var(--c-anthracite)); + border: 1.5px solid color-mix(in srgb, #e3b23c 45%, transparent); + animation: abo-reward-ready-glow 2.6s ease-in-out infinite; +} +@keyframes abo-reward-ready-glow { + 0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, #e3b23c 35%, transparent), 0 0 14px -6px color-mix(in srgb, #e3b23c 55%, transparent); } + 50% { box-shadow: 0 0 0 1px color-mix(in srgb, #e3b23c 55%, transparent), 0 0 22px -4px color-mix(in srgb, #e3b23c 75%, transparent); } +} +.abo-reward-ready-icon { font-size: 1.8rem; } +.abo-reward-ready-body { display: flex; flex-direction: column; gap: 0.4rem; } +.abo-reward-ready-body strong { font-size: 0.92rem; } + .abo-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.6rem; } .abo-cancel-btn { border-color: color-mix(in srgb, var(--c-sale) 55%, transparent); color: var(--c-sale); } -.abo-notif-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; max-height: 260px; overflow-y: auto; } -.abo-notif-item { padding: 0.5rem 0.7rem; border-radius: var(--radius-m); background: rgba(244, 241, 247, 0.05); border-left: 3px solid transparent; } -.abo-notif-item.abo-notif-unread { border-left-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, transparent); } -@media (prefers-reduced-motion: reduce) { .abo-plan-card { transition: none; } } +/* Benachrichtigungen als kleine Timeline: farbiger Icon-Kreis je Ereignistyp statt einer + einheitlichen grauen Liste. */ +.abo-notif-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; max-height: 320px; overflow-y: auto; } +.abo-notif-item { + display: flex; + align-items: flex-start; + gap: 0.7rem; + padding: 0.55rem 0.8rem; + border-radius: var(--radius-m); + background: rgba(244, 241, 247, 0.05); + border-left: 3px solid transparent; + --notif-color: var(--c-text-muted); +} +.abo-notif-item.abo-notif-unread { border-left-color: var(--notif-color); background: color-mix(in srgb, var(--notif-color) 10%, transparent); } +.abo-notif-item.abo-notif-erfolg { --notif-color: #7ec8a0; } +.abo-notif-item.abo-notif-praemie { --notif-color: #e3b23c; } +.abo-notif-item.abo-notif-warnung { --notif-color: var(--c-sale); } +.abo-notif-item.abo-notif-abbruch { --notif-color: #e07a9c; } +.abo-notif-item.abo-notif-info { --notif-color: var(--c-accent); } +.abo-notif-icon { + flex-shrink: 0; + width: 30px; + height: 30px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.95rem; + background: color-mix(in srgb, var(--notif-color) 22%, transparent); + border: 1px solid color-mix(in srgb, var(--notif-color) 45%, transparent); +} +.abo-notif-body { display: flex; flex-direction: column; gap: 0.15rem; } +.abo-notif-date { color: var(--c-text-muted); } +@media (prefers-reduced-motion: reduce) { .abo-plan-card, .abo-plan-card.is-current-plan, .abo-reward-ready { animation: none; transition: none; } }