diff --git a/package-lock.json b/package-lock.json index fbde172..2342502 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,8 +17,10 @@ "clsx": "^2.1.1", "lucide-react": "^0.511.0", "next": "15.3.2", + "next-themes": "^0.4.6", "react": "^19.0.0", "react-dom": "^19.0.0", + "sonner": "^2.0.3", "tailwind-merge": "^3.3.0" }, "devDependencies": { @@ -4991,6 +4993,15 @@ } } }, + "node_modules/next-themes": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz", + "integrity": "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==", + "peerDependencies": { + "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -5798,6 +5809,15 @@ "is-arrayish": "^0.3.1" } }, + "node_modules/sonner": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.3.tgz", + "integrity": "sha512-njQ4Hht92m0sMqqHVDL32V2Oun9W1+PHO9NDv9FHfJjT3JT22IG4Jpo3FPQy+mouRKCXFWO+r67v6MrHX2zeIA==", + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", diff --git a/package.json b/package.json index 04669fb..655cdfd 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,10 @@ "clsx": "^2.1.1", "lucide-react": "^0.511.0", "next": "15.3.2", + "next-themes": "^0.4.6", "react": "^19.0.0", "react-dom": "^19.0.0", + "sonner": "^2.0.3", "tailwind-merge": "^3.3.0" }, "devDependencies": { diff --git a/src/app/globals.css b/src/app/globals.css index dc98be7..64ed405 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -45,71 +45,81 @@ :root { --radius: 0.625rem; - --background: oklch(1 0 0); - --foreground: oklch(0.145 0 0); - --card: oklch(1 0 0); - --card-foreground: oklch(0.145 0 0); - --popover: oklch(1 0 0); - --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.205 0 0); - --primary-foreground: oklch(0.985 0 0); - --secondary: oklch(0.97 0 0); - --secondary-foreground: oklch(0.205 0 0); - --muted: oklch(0.97 0 0); - --muted-foreground: oklch(0.556 0 0); - --accent: oklch(0.97 0 0); - --accent-foreground: oklch(0.205 0 0); - --destructive: oklch(0.577 0.245 27.325); - --border: oklch(0.922 0 0); - --input: oklch(0.922 0 0); - --ring: oklch(0.708 0 0); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); - --sidebar: oklch(0.985 0 0); - --sidebar-foreground: oklch(0.145 0 0); - --sidebar-primary: oklch(0.205 0 0); - --sidebar-primary-foreground: oklch(0.985 0 0); - --sidebar-accent: oklch(0.97 0 0); - --sidebar-accent-foreground: oklch(0.205 0 0); - --sidebar-border: oklch(0.922 0 0); - --sidebar-ring: oklch(0.708 0 0); + /* Light Mode Palette */ + --background: oklch(0.99 0 0); /* Very light off-white */ + --foreground: oklch(0.1 0 0); /* Very dark gray */ + --card: oklch(0.99 0 0); + --card-foreground: oklch(0.1 0 0); + --popover: oklch(0.99 0 0); + --popover-foreground: oklch(0.1 0 0); + --primary: oklch(0.45 0.15 260); /* Deep indigo/blue */ + --primary-foreground: oklch(0.98 0 0); /* Very light off-white for text on primary */ + --secondary: oklch(0.94 0 0); /* Light gray */ + --secondary-foreground: oklch(0.3 0 0); /* Medium-dark gray */ + --muted: oklch(0.94 0 0); + --muted-foreground: oklch(0.5 0 0); /* Medium gray */ + --accent: oklch(0.94 0.03 260); /* Subtle hint of primary color */ + --accent-foreground: oklch(0.3 0.05 260); /* Darker desaturated primary */ + --destructive: oklch(0.6 0.15 20); /* Standard red */ + --border: oklch(0.85 0 0); /* Medium-light gray */ + --input: oklch(0.9 0 0); /* Slightly lighter than border */ + --ring: oklch(0.7 0 0); /* Medium gray, for focus rings */ + + /* Chart Colors (Light Mode) - Distinct and harmonious */ + --chart-1: oklch(0.55 0.18 270); /* Deep purple-blue */ + --chart-2: oklch(0.65 0.15 180); /* Teal */ + --chart-3: oklch(0.7 0.12 90); /* Muted green-yellow */ + --chart-4: oklch(0.6 0.16 30); /* Orange-brown */ + --chart-5: oklch(0.75 0.1 330); /* Muted pink */ + + /* Sidebar Colors (Light Mode) */ + --sidebar: oklch(0.97 0 0); /* Slightly darker background for sidebar */ + --sidebar-foreground: oklch(0.145 0 0); /* Standard foreground */ + --sidebar-primary: oklch(0.45 0.15 260); /* Same as primary */ + --sidebar-primary-foreground: oklch(0.98 0 0); + --sidebar-accent: oklch(0.94 0.03 260); + --sidebar-accent-foreground: oklch(0.3 0.05 260); + --sidebar-border: oklch(0.85 0 0); + --sidebar-ring: oklch(0.7 0 0); } .dark { - --background: oklch(0.145 0 0); - --foreground: oklch(0.985 0 0); - --card: oklch(0.205 0 0); - --card-foreground: oklch(0.985 0 0); - --popover: oklch(0.205 0 0); - --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.922 0 0); - --primary-foreground: oklch(0.205 0 0); - --secondary: oklch(0.269 0 0); - --secondary-foreground: oklch(0.985 0 0); - --muted: oklch(0.269 0 0); - --muted-foreground: oklch(0.708 0 0); - --accent: oklch(0.269 0 0); - --accent-foreground: oklch(0.985 0 0); - --destructive: oklch(0.704 0.191 22.216); - --border: oklch(1 0 0 / 10%); - --input: oklch(1 0 0 / 15%); - --ring: oklch(0.556 0 0); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); - --sidebar: oklch(0.205 0 0); - --sidebar-foreground: oklch(0.985 0 0); - --sidebar-primary: oklch(0.488 0.243 264.376); - --sidebar-primary-foreground: oklch(0.985 0 0); - --sidebar-accent: oklch(0.269 0 0); - --sidebar-accent-foreground: oklch(0.985 0 0); - --sidebar-border: oklch(1 0 0 / 10%); - --sidebar-ring: oklch(0.556 0 0); + /* Dark Mode Palette */ + --background: oklch(0.12 0 0); /* Very dark charcoal */ + --foreground: oklch(0.92 0 0); /* Light gray */ + --card: oklch(0.18 0 0); /* Slightly lighter dark for cards */ + --card-foreground: oklch(0.92 0 0); + --popover: oklch(0.18 0 0); + --popover-foreground: oklch(0.92 0 0); + --primary: oklch(0.7 0.15 260); /* Brighter, more vibrant indigo for dark mode */ + --primary-foreground: oklch(0.15 0 0); /* Dark gray for text on primary */ + --secondary: oklch(0.22 0 0); /* Darker gray */ + --secondary-foreground: oklch(0.85 0 0); /* Lighter gray */ + --muted: oklch(0.22 0 0); + --muted-foreground: oklch(0.6 0 0); /* Mid-gray */ + --accent: oklch(0.22 0.03 260); /* Subtle dark hint of primary */ + --accent-foreground: oklch(0.8 0.05 260); /* Lighter desaturated primary */ + --destructive: oklch(0.7 0.15 20); /* Brighter red for dark mode */ + --border: oklch(0.25 0 0); /* Medium dark gray */ + --input: oklch(0.2 0 0); /* Darker than border */ + --ring: oklch(0.4 0 0); /* Mid-dark gray */ + + /* Chart Colors (Dark Mode) - Brighter and distinct */ + --chart-1: oklch(0.7 0.18 270); /* Brighter purple-blue */ + --chart-2: oklch(0.75 0.15 180); /* Brighter teal */ + --chart-3: oklch(0.8 0.12 90); /* Brighter muted green-yellow */ + --chart-4: oklch(0.75 0.16 30); /* Brighter orange-brown */ + --chart-5: oklch(0.85 0.1 330); /* Brighter muted pink */ + + /* Sidebar Colors (Dark Mode) */ + --sidebar: oklch(0.18 0 0); /* Slightly lighter dark for sidebar */ + --sidebar-foreground: oklch(0.92 0 0); + --sidebar-primary: oklch(0.7 0.15 260); + --sidebar-primary-foreground: oklch(0.15 0 0); + --sidebar-accent: oklch(0.22 0.03 260); + --sidebar-accent-foreground: oklch(0.8 0.05 260); + --sidebar-border: oklch(0.25 0 0); + --sidebar-ring: oklch(0.4 0 0); } @layer base { @@ -119,4 +129,4 @@ body { @apply bg-background text-foreground; } -} +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f7fa87e..4194305 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,10 @@ +// app/layout.tsx import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; +import { Toaster } from '@/components/ui/sonner'; +import { ThemeProvider } from '@/components/ThemeProvider'; +import { AuthProvider } from '@/context/AuthContext'; +import { ThemeToggle } from '@/components/ThemeToggle'; // Import ThemeToggle import "./globals.css"; const geistSans = Geist({ @@ -23,12 +28,27 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - +
- {children} +