From 36180cda2b81e71fa2eca7237fb6de3feafefbfb Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Mon, 17 Aug 2026 09:00:08 +0330 Subject: [PATCH] Give dashboards a themed orb background and a solid current-nav state. Login pages share the same wash as the app shell; customer light mode matches business while dark mode stays gray. Co-authored-by: Cursor --- .../src/components/BackgroundOrbs.module.css | 134 +++++++++++++++++ .../src/components/BackgroundOrbs.tsx | 12 ++ apps/business/src/components/PageLayout.tsx | 2 + .../src/components/Sidebar.module.css | 22 ++- apps/business/src/index.css | 82 +++-------- apps/business/src/pages/LoginPage.module.css | 2 + apps/business/src/pages/LoginPage.tsx | 2 + .../pages/WebsiteStaticImagesPage.module.css | 6 + .../src/pages/WebsiteStaticImagesPage.tsx | 45 +++--- apps/business/src/utils/applyBusinessTheme.ts | 4 + .../src/utils/businessPrimaryColors.ts | 57 +++++++- apps/business/src/utils/staticImagePages.ts | 9 ++ .../src/components/BackgroundOrbs.module.css | 138 ++++++++++++++++++ .../src/components/BackgroundOrbs.tsx | 12 ++ apps/customer/src/components/PageLayout.tsx | 2 + .../src/components/Sidebar.module.css | 22 ++- apps/customer/src/index.css | 46 +++++- apps/customer/src/pages/LoginPage.module.css | 2 + apps/customer/src/pages/LoginPage.tsx | 2 + apps/customer/src/utils/applyBusinessTheme.ts | 4 + .../src/utils/businessPrimaryColors.ts | 57 +++++++- apps/super-admin/src/index.css | 12 +- .../src/utils/applyBusinessTheme.ts | 4 + .../src/utils/businessPrimaryColors.ts | 57 +++++++- packages/dashboard-core/src/styles/tokens.css | 22 ++- 25 files changed, 636 insertions(+), 121 deletions(-) create mode 100644 apps/business/src/components/BackgroundOrbs.module.css create mode 100644 apps/business/src/components/BackgroundOrbs.tsx create mode 100644 apps/customer/src/components/BackgroundOrbs.module.css create mode 100644 apps/customer/src/components/BackgroundOrbs.tsx diff --git a/apps/business/src/components/BackgroundOrbs.module.css b/apps/business/src/components/BackgroundOrbs.module.css new file mode 100644 index 0000000..04d33bd --- /dev/null +++ b/apps/business/src/components/BackgroundOrbs.module.css @@ -0,0 +1,134 @@ +.bgOrbs { + position: fixed; + inset: 0; + pointer-events: none; + z-index: 0; + overflow: hidden; +} + +.bgOrbs::after { + content: ''; + position: absolute; + inset: 0; + background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(255, 255, 255, 0.2) 100%); + backdrop-filter: blur(1px); +} + +.orb1, +.orb2, +.orb3, +.orb4 { + position: absolute; + border-radius: 50%; + filter: blur(100px); + will-change: transform; +} + +.orb1 { + width: 560px; + height: 560px; + background: radial-gradient( + circle, + color-mix(in srgb, var(--primary-light) 55%, #ffffff) 0%, + color-mix(in srgb, var(--primary) 30%, #ffffff) 55%, + transparent 72% + ); + opacity: 0.55; + top: -140px; + right: -120px; + animation: floatOrb1 18s ease-in-out infinite; +} + +.orb2 { + width: 480px; + height: 480px; + background: radial-gradient( + circle, + color-mix(in srgb, var(--primary) 28%, #ffffff) 0%, + color-mix(in srgb, var(--primary) 38%, #ffffff) 50%, + transparent 70% + ); + opacity: 0.42; + bottom: -100px; + left: 15%; + animation: floatOrb2 22s ease-in-out infinite; +} + +.orb3 { + width: 380px; + height: 380px; + background: radial-gradient( + circle, + color-mix(in srgb, var(--page-accent) 30%, #ffffff) 0%, + color-mix(in srgb, var(--page-accent) 48%, #ffffff) 55%, + transparent 72% + ); + opacity: 0.42; + top: 38%; + left: -100px; + animation: floatOrb3 20s ease-in-out infinite; +} + +.orb4 { + width: 320px; + height: 320px; + background: radial-gradient( + circle, + color-mix(in srgb, var(--primary-light) 45%, var(--page-accent)) 0%, + color-mix(in srgb, var(--page-accent) 32%, var(--primary-light)) 50%, + transparent 70% + ); + opacity: 0.38; + top: 12%; + right: 28%; + animation: floatOrb4 24s ease-in-out infinite; +} + +@keyframes floatOrb1 { + 0%, + 100% { + transform: translate(0, 0) scale(1); + } + 50% { + transform: translate(-30px, 25px) scale(1.06); + } +} + +@keyframes floatOrb2 { + 0%, + 100% { + transform: translate(0, 0) scale(1); + } + 50% { + transform: translate(35px, -20px) scale(1.05); + } +} + +@keyframes floatOrb3 { + 0%, + 100% { + transform: translate(0, 0) scale(1); + } + 50% { + transform: translate(20px, 30px) scale(1.08); + } +} + +@keyframes floatOrb4 { + 0%, + 100% { + transform: translate(0, 0) scale(1); + } + 50% { + transform: translate(-25px, -15px) scale(1.04); + } +} + +@media (prefers-reduced-motion: reduce) { + .orb1, + .orb2, + .orb3, + .orb4 { + animation: none; + } +} diff --git a/apps/business/src/components/BackgroundOrbs.tsx b/apps/business/src/components/BackgroundOrbs.tsx new file mode 100644 index 0000000..7a2f9b2 --- /dev/null +++ b/apps/business/src/components/BackgroundOrbs.tsx @@ -0,0 +1,12 @@ +import styles from './BackgroundOrbs.module.css' + +export function BackgroundOrbs() { + return ( +