Files
analiticaNucleo/nuxt4-app/app/assets/css/main.css
josedario87 8dee464a54
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 48s
Fix: Mapear variables UI de Nuxt a variables brand dinámicas
PROBLEMA: Los componentes de Nuxt UI (UCard, UButton, etc.) usaban
colores fijos de --color-coffee-* que no respondían a cambios de tema.

SOLUCIÓN: Mapear --ui-color-neutral-* a variables --brand-* dinámicas:
- neutral-50/100 → --brand-bg (fondos más oscuros)
- neutral-200 → --brand-surface (fondos elevados)
- neutral-300/400 → --brand-border (bordes)
- neutral-500/600/700 → --brand-primary/primary-strong (interactivos)
- neutral-800/900/950 → --brand-text/text-muted (textos)

RESULTADO: Ahora los UCard y otros componentes de Nuxt UI cambian
correctamente cuando se selecciona un tema predefinido.

Archivos modificados:
- app/assets/css/main.css: Remapeo de variables --ui-color-neutral-*
2025-10-30 16:56:26 -06:00

141 lines
3.5 KiB
CSS

@import "tailwindcss";
@import "@nuxt/ui";
@theme {
/* Definir color café personalizado con todos los shades
Optimizado para dark mode - los valores más altos son más claros */
--color-coffee-50: #1b1209;
--color-coffee-100: #2a1f14;
--color-coffee-200: #3a2a16;
--color-coffee-300: #5a3a18;
--color-coffee-400: #805020;
--color-coffee-500: #c08040;
--color-coffee-600: #d09050;
--color-coffee-700: #e0c080;
--color-coffee-800: #f0d0a0;
--color-coffee-900: #fde5c0;
--color-coffee-950: #fef9f0;
}
:root {
--brand-bg: #14100b;
--brand-surface: #1f180f;
--brand-border: #3a2a16;
--brand-primary: #e0c080;
--brand-primary-strong: #c08040;
--brand-accent: #ffe0a0;
--brand-text: #fef9f0;
--brand-text-muted: #d8c7a6;
/* Mapear variables UI neutral a nuestras variables dinámicas --brand-*
Esto permite que los componentes de Nuxt UI respondan a cambios de tema */
--ui-color-neutral-50: var(--brand-bg);
--ui-color-neutral-100: var(--brand-bg);
--ui-color-neutral-200: var(--brand-surface);
--ui-color-neutral-300: var(--brand-border);
--ui-color-neutral-400: var(--brand-border);
--ui-color-neutral-500: var(--brand-primary-strong);
--ui-color-neutral-600: var(--brand-primary);
--ui-color-neutral-700: var(--brand-primary);
--ui-color-neutral-800: var(--brand-text-muted);
--ui-color-neutral-900: var(--brand-text);
--ui-color-neutral-950: var(--brand-text);
}
/* Critical: Prevent white flash on load */
html,
body {
margin: 0 !important;
padding: 0 !important;
background-color: #1b1209 !important;
color: var(--brand-text);
min-height: 100vh;
}
.brand-shell {
background: radial-gradient(circle at 20% 20%, rgba(255, 224, 160, 0.08), transparent 55%),
radial-gradient(circle at 80% 10%, rgba(192, 128, 64, 0.08), transparent 45%),
var(--brand-bg);
min-height: 100vh;
}
.brand-card {
background: linear-gradient(145deg, rgba(20, 16, 11, 0.95), rgba(31, 24, 15, 0.85));
border: 1px solid rgba(224, 192, 128, 0.12);
box-shadow: 0 12px 40px rgba(12, 8, 4, 0.55);
}
.brand-divider {
border-top: 1px solid rgba(224, 192, 128, 0.16);
}
.brand-chip {
background: rgba(255, 224, 160, 0.08);
border: 1px solid rgba(255, 224, 160, 0.18);
color: var(--brand-accent);
}
.brand-table thead {
background: linear-gradient(90deg, rgba(32, 24, 15, 0.95), rgba(24, 18, 11, 0.95));
}
.brand-table tbody tr {
transition: background 0.2s ease, transform 0.2s ease;
}
.brand-table tbody tr:hover {
background: rgba(255, 224, 160, 0.06);
}
.brand-pill {
background: rgba(224, 192, 128, 0.14);
border: 1px solid rgba(224, 192, 128, 0.28);
color: var(--brand-primary);
}
.brand-badge {
color: var(--brand-bg);
background: var(--brand-primary);
}
.brand-section-title {
color: var(--brand-primary);
}
/* Custom Scrollbar Styles */
/* Firefox */
* {
scrollbar-width: thin;
scrollbar-color: var(--brand-primary-strong) var(--brand-surface);
}
/* WebKit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
width: 8px;
height: 8px;
}
*::-webkit-scrollbar-track {
background: var(--brand-surface);
border-radius: 4px;
}
*::-webkit-scrollbar-thumb {
background: var(--brand-primary-strong);
border-radius: 4px;
border: 2px solid var(--brand-surface);
}
*::-webkit-scrollbar-thumb:hover {
background: var(--brand-primary);
}
*::-webkit-scrollbar-thumb:active {
background: var(--brand-accent);
}
/* Scrollbar corner (when both scrollbars are visible) */
*::-webkit-scrollbar-corner {
background: var(--brand-surface);
}