diff --git a/src/index.css b/src/index.css
index adc4663..7404a0d 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,7 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
-@import './styles/theme-vars.css';
-
@tailwind base;
@tailwind components;
@tailwind utilities;
@@ -14,16 +12,16 @@
@layer base {
:root {
/* Core palette - Light blue-gray with teal accent */
- --background: 216 22% 94%; /* cool blue-gray — cards lift clearly off this */
- --foreground: 222 47% 9%; /* near-black navy */
+ --background: 216 22% 94%;
+ --foreground: 222 47% 9%;
- --card: 0 0% 100%; /* pure white — 6% lightness gap over bg */
+ --card: 0 0% 100%;
--card-foreground: 222 47% 9%;
--popover: 0 0% 100%;
--popover-foreground: 222 47% 9%;
- /* Primary — theme-configurable (teal default, red for dev, purple for staging) */
+ /* Primary — theme-configurable */
--primary: var(--theme-primary);
--primary-foreground: var(--theme-primary-foreground);
@@ -31,7 +29,7 @@
--secondary: 216 20% 91%;
--secondary-foreground: 222 47% 18%;
- /* Muted — noticeably darker than secondary, used for section bg */
+ /* Muted */
--muted: 216 18% 88%;
--muted-foreground: 222 18% 42%;
@@ -53,7 +51,7 @@
--info-foreground: 0 0% 100%;
/* UI chrome */
- --border: 216 18% 84%; /* clearly visible on white card */
+ --border: 216 18% 84%;
--input: 216 18% 92%;
--ring: var(--theme-ring);
@@ -70,12 +68,7 @@
--sidebar-ring: var(--theme-ring);
--sidebar-muted: 222 20% 48%;
- /* Gradients */
- --gradient-brand: linear-gradient(135deg, hsl(var(--theme-primary)), hsl(var(--theme-primary) / 0.8));
- --gradient-accent: linear-gradient(135deg, hsl(var(--theme-primary)), hsl(var(--theme-primary) / 0.8));
- --gradient-subtle: linear-gradient(135deg, hsl(216 28% 97%), hsl(216 18% 93%));
-
- /* Shadows — stronger alpha so cards lift off the bg */
+ /* Shadows */
--shadow-sm: 0 1px 2px 0 hsl(222 47% 9% / 0.10);
--shadow-md: 0 4px 6px -1px hsl(222 47% 9% / 0.14), 0 2px 4px -2px hsl(222 47% 9% / 0.10);
--shadow-lg: 0 10px 15px -3px hsl(222 47% 9% / 0.14), 0 4px 6px -4px hsl(222 47% 9% / 0.10);
@@ -153,6 +146,34 @@
}
@layer components {
+ /* Environment banner — solid theme color */
+ .env-banner {
+ @apply fixed top-0 left-0 right-0 z-[100] px-3 py-1.5 text-center text-xs font-bold uppercase tracking-wider;
+ background-color: hsl(var(--theme-primary));
+ color: hsl(var(--theme-primary-foreground));
+ box-shadow: 0 2px 4px 0 hsl(var(--theme-primary) / 0.3);
+ }
+
+ /* Sidebar header — solid theme color background */
+ .sidebar-header-themed {
+ background-color: hsl(var(--theme-sidebar-primary));
+ color: hsl(var(--theme-sidebar-primary-foreground));
+ border-bottom: 1px solid hsl(var(--theme-sidebar-primary) / 0.3);
+ }
+
+ /* Top bar — theme-colored bottom border + subtle tint */
+ .top-bar-themed {
+ border-bottom: 2px solid hsl(var(--theme-primary));
+ background-color: hsl(var(--theme-primary) / 0.04);
+ }
+
+ /* Active nav item — theme color background */
+ .active-nav-themed {
+ background-color: hsl(var(--theme-primary) / 0.12);
+ color: hsl(var(--theme-primary));
+ border-radius: var(--radius);
+ }
+
/* Auth card for public pages */
.auth-card {
@apply bg-card rounded-xl p-8 shadow-card border border-border;
@@ -207,7 +228,6 @@
}
@layer utilities {
- /* Animation utilities */
.animate-fade-in {
animation: fadeIn 0.3s ease-out;
}
@@ -217,22 +237,12 @@
}
@keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
+ from { opacity: 0; }
+ to { opacity: 1; }
}
@keyframes slideIn {
- from {
- opacity: 0;
- transform: translateY(-8px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
+ from { opacity: 0; transform: translateY(-8px); }
+ to { opacity: 1; transform: translateY(0); }
}
}
diff --git a/vite.config.ts b/vite.config.ts
index 5fee80e..f5c40e5 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -17,9 +17,21 @@ export default defineConfig(({ mode }) => {
const appName = env.VITE_APP_NAME || (themeName === "dev" ? "Secuird Dev" : themeName === "preprod" ? "Secuird Staging" : "Secuird");
const favicon = env.VITE_FAVICON || (themeName === "dev" ? "/favicon-dev.svg" : themeName === "preprod" ? "/favicon-staging.svg" : "/favicon.svg");
- const themeColor = `hsl(${colors.primary})`;
+ const themeColorHsl = `hsl(${colors.primary})`;
+
+ // Build a CSS block that injects directly into before any stylesheets load.
+ const themeStyles = `
+`;
-
return {
server: {
host: "::",
@@ -37,30 +49,18 @@ export default defineConfig(({ mode }) => {
transformIndexHtml: {
order: "pre",
handler: (html) => {
- return html
+ const headClose = html.indexOf("");
+ const withStyle = headClose > -1
+ ? html.slice(0, headClose) + themeStyles + "\n" + html.slice(headClose)
+ : html;
+ return withStyle
.replace(/%VITE_APP_NAME%/g, appName)
.replace(/%VITE_FAVICON%/g, favicon)
- .replace(/%VITE_THEME_COLOR%/g, themeColor);
+ .replace(/%VITE_THEME_COLOR%/g, themeColorHsl);
},
},
},
],
- css: {
- preprocessorOptions: {
- css: {
- additionalData: `
- :root {
- --theme-primary: ${colors.primary};
- --theme-primary-foreground: 0 0% 100%;
- --theme-sidebar-primary: ${colors.sidebarPrimary};
- --theme-sidebar-primary-foreground: 0 0% 100%;
- --theme-ring: ${colors.ring};
- --theme-color: hsl(${colors.primary});
- }
- `,
- },
- },
- },
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),