+
{userInitials}
@@ -272,7 +268,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
{user ? `Welcome back, ${user.name.split(" ")[0]}!` : "Welcome back!"}
{user && (
-
+
{targetExamLabel} Target
)}
diff --git a/src/app/globals.css b/src/app/globals.css
index 6328a3d..45214e8 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -70,6 +70,17 @@ body {
@apply antialiased selection:bg-primary/20;
}
+/* ─── Light mode: flatten card shadows so they don't look 3D/lifted ─── */
+:root:not(.dark) .shadow-sm,
+:root:not(.dark) .shadow,
+:root:not(.dark) .shadow-md,
+:root:not(.dark) .shadow-lg,
+:root:not(.dark) .shadow-xl,
+:root:not(.dark) .shadow-2xl,
+:root:not(.dark) [class*="shadow-"] {
+ box-shadow: none !important;
+}
+
@layer utilities {
.text-balance {
text-wrap: balance;
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 9521ae2..522b030 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -37,14 +37,30 @@ export default function RootLayout({
dangerouslySetInnerHTML={{
__html: `
try {
- if (window.location.pathname.startsWith('/dashboard') || window.location.pathname.startsWith('/cbt')) {
- if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
- document.documentElement.classList.add('dark')
+ if (window.location.pathname.startsWith('/admin')) {
+ // Admin panel: uses its own separate theme key, defaults to dark
+ const adminTheme = localStorage.getItem('admin-theme');
+ if (adminTheme === 'dark' || !adminTheme) {
+ document.documentElement.classList.add('dark');
} else {
- document.documentElement.classList.remove('dark')
+ document.documentElement.classList.remove('dark');
+ }
+ } else if (window.location.pathname.startsWith('/dashboard') || window.location.pathname.startsWith('/cbt')) {
+ // Dashboard: uses 'theme' key, defaults to light
+ const theme = localStorage.getItem('theme');
+ if (theme === 'dark') {
+ document.documentElement.classList.add('dark');
+ } else {
+ document.documentElement.classList.remove('dark');
}
} else {
- document.documentElement.classList.add('dark')
+ // Public pages: uses 'theme' key, defaults to light
+ const theme = localStorage.getItem('theme');
+ if (theme === 'dark') {
+ document.documentElement.classList.add('dark');
+ } else {
+ document.documentElement.classList.remove('dark');
+ }
}
} catch (_) {}
`,
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 6b079e5..43ee0ce 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -8,11 +8,10 @@ import Image from "next/image"
import Link from "next/link"
import { motion, useScroll, useTransform, Variants } from "framer-motion"
import { useRef, useEffect } from "react"
+import { ThemeToggle } from "@/components/ThemeToggle"
export default function MarketingPage() {
- useEffect(() => {
- document.documentElement.classList.add('dark');
- }, []);
+
const containerRef = useRef(null)
const { scrollYProgress } = useScroll({
@@ -82,6 +81,7 @@ export default function MarketingPage() {
About Us
+
Log in
@@ -549,66 +549,31 @@ export default function MarketingPage() {
{/* Global Footer (Static) */}