ca-grow-ops-manager/frontend/src/index.css
fullsizemalt 71e58dd4c7
Some checks are pending
Deploy to Production / deploy (push) Waiting to run
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run
feat: Linear-inspired UI redesign with Space Grotesk headlines
- Complete UI refactor with charcoal/bone color palette
- Add Space Grotesk font for headlines, Inter for body
- Update all 24+ pages with new design system
- Add LinearPrimitives reusable components
- Improve dark mode support throughout
- Add subtle micro-animations and transitions
2025-12-12 14:29:47 -08:00

666 lines
No EOL
15 KiB
CSS

/* Linear-Inspired Design System v2.0 */
/* Fonts: Space Grotesk for headlines, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
/* ============================================
CSS Custom Properties (Design Tokens)
============================================ */
:root {
/* Font families */
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
--font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
/* Transition timing */
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
--ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
/* Duration */
--duration-instant: 50ms;
--duration-fast: 100ms;
--duration-normal: 150ms;
--duration-slow: 250ms;
--duration-slower: 400ms;
/* Light mode (Bone) */
--color-bg-primary: #FFFFFF;
--color-bg-secondary: #FAFAFA;
--color-bg-tertiary: #F5F5F5;
--color-bg-elevated: #FFFFFF;
--color-text-primary: #171717;
--color-text-secondary: #525252;
--color-text-tertiary: #A3A3A3;
--color-text-quaternary: #D4D4D4;
--color-border-default: #E5E5E5;
--color-border-subtle: #F5F5F5;
--color-border-strong: #D4D4D4;
--color-accent: #5E6AD2;
--color-accent-hover: #6E7AE2;
--color-accent-muted: rgba(94, 106, 210, 0.15);
/* shadcn/ui compatibility */
--background: 0 0% 100%;
--foreground: 0 0% 9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 9%;
--primary: 235 58% 60%;
--primary-foreground: 0 0% 100%;
--secondary: 0 0% 96%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96%;
--muted-foreground: 0 0% 45%;
--accent: 235 58% 60%;
--accent-foreground: 0 0% 100%;
--destructive: 0 84% 60%;
--destructive-foreground: 0 0% 100%;
--border: 0 0% 90%;
--input: 0 0% 90%;
--ring: 235 58% 60%;
--radius: 6px;
}
/* Dark mode (Charcoal) */
.dark {
--color-bg-primary: #0A0A0A;
--color-bg-secondary: #111111;
--color-bg-tertiary: #1A1A1A;
--color-bg-elevated: #171717;
--color-text-primary: #FAFAFA;
--color-text-secondary: #A3A3A3;
--color-text-tertiary: #737373;
--color-text-quaternary: #525252;
--color-border-default: #262626;
--color-border-subtle: #1F1F1F;
--color-border-strong: #404040;
/* shadcn/ui compatibility */
--background: 0 0% 4%;
--foreground: 0 0% 98%;
--card: 0 0% 9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 9%;
--popover-foreground: 0 0% 98%;
--primary: 235 58% 60%;
--primary-foreground: 0 0% 100%;
--secondary: 0 0% 15%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 15%;
--muted-foreground: 0 0% 64%;
--accent: 235 58% 60%;
--accent-foreground: 0 0% 100%;
--destructive: 0 84% 60%;
--destructive-foreground: 0 0% 100%;
--border: 0 0% 15%;
--input: 0 0% 15%;
--ring: 235 58% 60%;
}
/* ============================================
Base Styles
============================================ */
html {
font-size: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
scroll-behavior: smooth;
overflow-x: hidden;
}
body {
background-color: var(--color-bg-primary);
color: var(--color-text-primary);
font-family: var(--font-sans);
font-feature-settings: 'ss01' 1, 'cv01' 1;
letter-spacing: -0.011em;
transition:
background-color var(--duration-slow) var(--ease-out-expo),
color var(--duration-slow) var(--ease-out-expo);
}
/* Code */
code,
pre,
kbd,
samp {
font-family: var(--font-mono);
}
/* Headings - Space Grotesk */
h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
font-family: var(--font-display);
font-weight: 600;
letter-spacing: -0.02em;
}
h1 {
font-size: 2rem;
line-height: 1.2;
}
h2 {
font-size: 1.5rem;
line-height: 1.25;
}
h3 {
font-size: 1.25rem;
line-height: 1.3;
}
h4 {
font-size: 1.125rem;
line-height: 1.35;
}
h5 {
font-size: 1rem;
line-height: 1.4;
}
h6 {
font-size: 0.875rem;
line-height: 1.45;
}
/* ============================================
Interactive Elements
============================================ */
button,
input,
select,
textarea,
a {
min-height: 44px;
min-width: 44px;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
/* Global interactive transition */
button,
a,
input,
select,
textarea,
[role="button"],
[tabindex="0"] {
transition:
background-color var(--duration-fast) var(--ease-out-expo),
border-color var(--duration-fast) var(--ease-out-expo),
color var(--duration-fast) var(--ease-out-expo),
box-shadow var(--duration-normal) var(--ease-out-expo),
transform var(--duration-fast) var(--ease-spring);
}
/* Focus ring (Linear-style) */
*:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-accent);
transition: box-shadow var(--duration-normal) var(--ease-out-expo);
}
/* Subtle press effect */
button:active:not(:disabled),
[role="button"]:active:not(:disabled) {
transform: scale(0.98);
}
/* ============================================
Typography
============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 600;
letter-spacing: -0.02em;
color: var(--color-text-primary);
}
h1 {
font-size: 30px;
line-height: 1.2;
}
h2 {
font-size: 24px;
line-height: 1.3;
}
h3 {
font-size: 18px;
line-height: 1.4;
}
h4 {
font-size: 16px;
line-height: 1.5;
}
/* Links (subtle, no color, underline on hover) */
a:not(.btn):not([class*="bg-"]) {
color: var(--color-text-primary);
text-decoration: none;
transition: color var(--duration-fast) var(--ease-out-expo);
}
a:not(.btn):not([class*="bg-"]):hover {
color: var(--color-accent);
}
/* Selection */
::selection {
background-color: var(--color-accent-muted);
color: var(--color-text-primary);
}
/* ============================================
Reduced Motion
============================================ */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* ============================================
High Contrast Mode
============================================ */
@media (prefers-contrast: high) {
:root {
--color-border-default: #171717;
--color-border-subtle: #525252;
}
.dark {
--color-border-default: #FAFAFA;
--color-border-subtle: #A3A3A3;
}
}
}
@layer components {
/* ============================================
Custom Scrollbar (Linear-style)
============================================ */
.custom-scrollbar::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background-color: var(--color-border-default);
border-radius: 4px;
border: 2px solid transparent;
background-clip: content-box;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background-color: var(--color-border-strong);
}
/* Hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
/* ============================================
Button Styles
============================================ */
.btn {
@apply inline-flex items-center justify-center gap-2;
height: 36px;
padding: 0 14px;
font-size: 13px;
font-weight: 500;
border-radius: 6px;
cursor: pointer;
user-select: none;
white-space: nowrap;
}
.btn-primary {
background-color: var(--color-accent);
color: white;
}
.btn-primary:hover:not(:disabled) {
background-color: var(--color-accent-hover);
}
.btn-secondary {
background-color: transparent;
color: var(--color-text-secondary);
border: 1px solid var(--color-border-default);
}
.btn-secondary:hover:not(:disabled) {
background-color: var(--color-bg-tertiary);
color: var(--color-text-primary);
border-color: var(--color-border-strong);
}
.btn-ghost {
background-color: transparent;
color: var(--color-text-secondary);
}
.btn-ghost:hover:not(:disabled) {
background-color: var(--color-bg-tertiary);
color: var(--color-text-primary);
}
.btn-destructive {
background-color: #EF4444;
color: white;
}
.btn-destructive:hover:not(:disabled) {
background-color: #DC2626;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* ============================================
Card Styles
============================================ */
.card {
background-color: var(--color-bg-elevated);
border: 1px solid var(--color-border-subtle);
border-radius: 8px;
transition:
border-color var(--duration-fast) var(--ease-out-expo),
box-shadow var(--duration-normal) var(--ease-out-expo);
}
.card:hover {
border-color: var(--color-border-default);
}
.card-interactive:hover {
border-color: var(--color-border-strong);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.dark .card-interactive:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
/* ============================================
Input Styles
============================================ */
.input {
height: 36px;
padding: 0 12px;
font-size: 14px;
background-color: var(--color-bg-primary);
border: 1px solid var(--color-border-default);
border-radius: 6px;
color: var(--color-text-primary);
transition:
border-color var(--duration-fast) var(--ease-out-expo),
box-shadow var(--duration-normal) var(--ease-out-expo);
}
.input::placeholder {
color: var(--color-text-tertiary);
}
.input:focus {
border-color: var(--color-accent);
box-shadow: 0 0 0 3px var(--color-accent-muted);
outline: none;
}
/* ============================================
Badge Styles
============================================ */
.badge {
@apply inline-flex items-center justify-center;
height: 20px;
padding: 0 6px;
font-size: 11px;
font-weight: 500;
border-radius: 4px;
background-color: var(--color-bg-tertiary);
color: var(--color-text-secondary);
}
.badge-accent {
background-color: var(--color-accent-muted);
color: var(--color-accent);
}
.badge-success {
background-color: rgba(34, 197, 94, 0.15);
color: #22C55E;
}
.badge-warning {
background-color: rgba(234, 179, 8, 0.15);
color: #CA8A04;
}
.badge-destructive {
background-color: rgba(239, 68, 68, 0.15);
color: #EF4444;
}
/* ============================================
Skeleton Loading (Shimmer)
============================================ */
.skeleton {
background: linear-gradient(90deg,
var(--color-bg-tertiary) 0%,
var(--color-bg-secondary) 50%,
var(--color-bg-tertiary) 100%);
background-size: 200% 100%;
animation: shimmer 1.5s ease-in-out infinite;
border-radius: 4px;
}
@keyframes shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
/* ============================================
Tooltip
============================================ */
.tooltip {
position: absolute;
z-index: 50;
padding: 6px 10px;
font-size: 12px;
font-weight: 500;
background-color: var(--color-text-primary);
color: var(--color-bg-primary);
border-radius: 6px;
pointer-events: none;
opacity: 0;
transform: translateY(4px);
transition:
opacity var(--duration-fast) var(--ease-out-expo),
transform var(--duration-normal) var(--ease-out-expo);
}
.tooltip.show {
opacity: 1;
transform: translateY(0);
}
/* ============================================
Divider
============================================ */
.divider {
height: 1px;
background-color: var(--color-border-subtle);
}
}
@layer utilities {
/* Screen reader only */
.sr-only {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
/* Touch target */
.touch-target {
min-height: 44px;
min-width: 44px;
@apply flex items-center justify-center;
}
/* Text colors using CSS vars */
.text-primary {
color: var(--color-text-primary);
}
.text-secondary {
color: var(--color-text-secondary);
}
.text-tertiary {
color: var(--color-text-tertiary);
}
.text-quaternary {
color: var(--color-text-quaternary);
}
.text-accent {
color: var(--color-accent);
}
/* Background colors using CSS vars */
.bg-primary {
background-color: var(--color-bg-primary);
}
.bg-secondary {
background-color: var(--color-bg-secondary);
}
.bg-tertiary {
background-color: var(--color-bg-tertiary);
}
.bg-elevated {
background-color: var(--color-bg-elevated);
}
/* Border colors using CSS vars */
.border-default {
border-color: var(--color-border-default);
}
.border-subtle {
border-color: var(--color-border-subtle);
}
.border-strong {
border-color: var(--color-border-strong);
}
/* Animation utilities */
.animate-in {
animation: fade-in var(--duration-normal) var(--ease-out-expo);
}
.animate-slide-up {
animation: slide-up var(--duration-slow) var(--ease-out-expo);
}
.animate-scale-in {
animation: scale-in var(--duration-normal) var(--ease-out-expo);
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slide-up {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes scale-in {
from {
opacity: 0;
transform: scale(0.96);
}
to {
opacity: 1;
transform: scale(1);
}
}
}