Files
KLC-Hr-Dashboard-Frontend/src/styles/globals.css
priyanshuvish 77e43c6012 first commit
2025-08-28 14:53:23 +05:30

535 lines
13 KiB
CSS

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import "tailwindcss";
@custom-variant dark (&:is(.dark *));
:root {
--font-size: 14px;
/* KLC Brand Color Primitives */
--brand-gold: #F8C301;
--brand-gold-foreground: #26231a;
--brand-navy: #04045B;
--brand-navy-foreground: #ffffff;
--brand-charcoal: #26231A;
--brand-charcoal-foreground: #ffffff;
--silver-grey: #C0C0C0;
--burgundy: #89002D;
--burgundy-foreground: #ffffff;
/* Semantic Tokens - Light Mode */
--background: #ffffff;
--foreground: #26231A;
--bg-surface: #ffffff;
--bg-elevated: #f8f9fa;
--text-primary: #26231A;
--text-secondary: #717182;
--brand-primary: #04045B;
--brand-contrast: #ffffff;
--status-success: #21a36a;
--status-success-foreground: #ffffff;
--status-warn: #F8C301;
--status-warn-foreground: #26231a;
--status-error: #d64545;
--status-error-foreground: #ffffff;
--chrome-divider: rgba(0, 0, 0, 0.1);
/* Component Variables */
--card: #ffffff;
--card-foreground: #26231A;
--popover: #ffffff;
--popover-foreground: #26231A;
--primary: #04045B;
--primary-foreground: #ffffff;
--secondary: #f8f9fa;
--secondary-foreground: #26231A;
--muted: #ececf0;
--muted-foreground: #717182;
--accent: #e9ebef;
--accent-foreground: #26231A;
--destructive: #d64545;
--destructive-foreground: #ffffff;
--border: var(--chrome-divider);
--input: transparent;
--input-background: #f3f3f5;
--switch-background: #cbced4;
--ring: #04045B;
/* Chart Colors */
--chart-1: #04045B;
--chart-2: #F8C301;
--chart-3: #21a36a;
--chart-4: #89002D;
--chart-5: #C0C0C0;
/* Spacing Scale (4-32px) */
--spacing-4: 0.286rem; /* 4px */
--spacing-8: 0.571rem; /* 8px */
--spacing-12: 0.857rem; /* 12px */
--spacing-16: 1.143rem; /* 16px */
--spacing-20: 1.429rem; /* 20px */
--spacing-24: 1.714rem; /* 24px */
--spacing-28: 2rem; /* 28px */
--spacing-32: 2.286rem; /* 32px */
/* Radius Scale */
--radius-4: 0.286rem; /* 4px */
--radius-8: 0.571rem; /* 8px */
--radius-12: 0.857rem; /* 12px */
--radius: var(--radius-8);
/* Shadow Scale */
--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-2: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
--shadow-3: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
/* Type Scale (12-32px) */
--text-12: 0.857rem; /* 12px */
--text-14: 1rem; /* 14px */
--text-16: 1.143rem; /* 16px */
--text-18: 1.286rem; /* 18px */
--text-20: 1.429rem; /* 20px */
--text-24: 1.714rem; /* 24px */
--text-28: 2rem; /* 28px */
--text-32: 2.286rem; /* 32px */
--font-weight-medium: 500;
--font-weight-normal: 400;
--font-weight-semibold: 600;
--font-weight-bold: 700;
/* HR Sidebar Variables - Navy Blue Background */
--sidebar: #04045B;
--sidebar-foreground: #ffffff;
--sidebar-primary: #F8C301;
--sidebar-primary-foreground: #26231A;
--sidebar-accent: rgba(248, 195, 1, 0.1);
--sidebar-accent-foreground: #ffffff;
--sidebar-border: transparent;
--sidebar-ring: #F8C301;
}
.dark {
/* Semantic Tokens - Dark Mode */
--background: #1a1a1a;
--foreground: #ffffff;
--bg-surface: #1a1a1a;
--bg-elevated: #2a2a2a;
--text-primary: #ffffff;
--text-secondary: #a1a1aa;
--brand-primary: #6366f1;
--brand-contrast: #ffffff;
--status-success: #22c55e;
--status-success-foreground: #ffffff;
--status-warn: #F8C301;
--status-warn-foreground: #26231a;
--status-error: #ef4444;
--status-error-foreground: #ffffff;
--chrome-divider: rgba(255, 255, 255, 0.1);
/* Component Variables - Dark Mode */
--card: #2a2a2a;
--card-foreground: #ffffff;
--popover: #2a2a2a;
--popover-foreground: #ffffff;
--primary: #6366f1;
--primary-foreground: #ffffff;
--secondary: #374151;
--secondary-foreground: #ffffff;
--muted: #374151;
--muted-foreground: #a1a1aa;
--accent: #374151;
--accent-foreground: #ffffff;
--destructive: #ef4444;
--destructive-foreground: #ffffff;
--border: var(--chrome-divider);
--input: #374151;
--input-background: #374151;
--switch-background: #4b5563;
--ring: #6366f1;
/* Chart Colors - Dark Mode */
--chart-1: #6366f1;
--chart-2: #F8C301;
--chart-3: #22c55e;
--chart-4: #ef4444;
--chart-5: #a1a1aa;
/* HR Sidebar Variables - Keep Navy Blue in Dark Mode */
--sidebar: #04045B;
--sidebar-foreground: #ffffff;
--sidebar-primary: #F8C301;
--sidebar-primary-foreground: #26231A;
--sidebar-accent: rgba(248, 195, 1, 0.1);
--sidebar-accent-foreground: #ffffff;
--sidebar-border: transparent;
--sidebar-ring: #F8C301;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-bg-surface: var(--bg-surface);
--color-bg-elevated: var(--bg-elevated);
--color-text-primary: var(--text-primary);
--color-text-secondary: var(--text-secondary);
--color-brand-primary: var(--brand-primary);
--color-brand-contrast: var(--brand-contrast);
--color-brand-gold: var(--brand-gold);
--color-brand-gold-foreground: var(--brand-gold-foreground);
--color-brand-navy: var(--brand-navy);
--color-brand-navy-foreground: var(--brand-navy-foreground);
--color-brand-charcoal: var(--brand-charcoal);
--color-brand-charcoal-foreground: var(--brand-charcoal-foreground);
--color-status-success: var(--status-success);
--color-status-success-foreground: var(--status-success-foreground);
--color-status-warn: var(--status-warn);
--color-status-warn-foreground: var(--status-warn-foreground);
--color-status-error: var(--status-error);
--color-status-error-foreground: var(--status-error-foreground);
--color-chrome-divider: var(--chrome-divider);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-input-background: var(--input-background);
--color-switch-background: var(--switch-background);
--color-ring: var(--ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--radius-sm: var(--radius-4);
--radius-md: var(--radius-8);
--radius-lg: var(--radius-12);
--radius-xl: calc(var(--radius-12) + 4px);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
html {
font-size: var(--font-size);
scroll-behavior: smooth;
}
body {
@apply bg-background text-foreground;
font-family: "Inter", system-ui, -apple-system, sans-serif;
overflow-x: hidden;
}
/* Focus management for accessibility */
*:focus {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
outline: 2px solid var(--primary);
outline-offset: 2px;
border-radius: 4px;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.sr-only:focus {
position: static;
width: auto;
height: auto;
padding: inherit;
margin: inherit;
overflow: visible;
clip: auto;
white-space: normal;
}
}
/**
* Base typography hierarchy using Inter font family
* Minimum font size: 14px (1rem at 14px base)
*/
@layer base {
:where(:not(:has([class*=" text-"]), :not(:has([class^="text-"])))) {
h1 {
font-size: var(--text-32);
font-weight: var(--font-weight-bold);
line-height: 1.2;
letter-spacing: -0.025em;
}
h2 {
font-size: var(--text-28);
font-weight: var(--font-weight-semibold);
line-height: 1.3;
letter-spacing: -0.025em;
}
h3 {
font-size: var(--text-24);
font-weight: var(--font-weight-semibold);
line-height: 1.4;
}
h4 {
font-size: var(--text-20);
font-weight: var(--font-weight-medium);
line-height: 1.5;
}
h5 {
font-size: var(--text-18);
font-weight: var(--font-weight-medium);
line-height: 1.5;
}
h6 {
font-size: var(--text-16);
font-weight: var(--font-weight-medium);
line-height: 1.5;
}
p {
font-size: var(--text-16);
font-weight: var(--font-weight-normal);
line-height: 1.6;
}
label {
font-size: var(--text-16);
font-weight: var(--font-weight-medium);
line-height: 1.5;
}
button {
font-size: var(--text-16);
font-weight: var(--font-weight-medium);
line-height: 1.5;
}
input,
textarea,
select {
font-size: var(--text-16);
font-weight: var(--font-weight-normal);
line-height: 1.5;
}
/* Small text elements - minimum 14px */
small,
.text-sm {
font-size: var(--text-14);
line-height: 1.4;
}
/* Override any text-xs to minimum 14px */
.text-xs {
font-size: var(--text-14);
line-height: 1.3;
}
}
}
/* Minimal animation utilities */
@layer utilities {
.animate-fade-in {
opacity: 0;
animation: fadeIn 400ms ease-out forwards;
}
.animate-slide-up {
opacity: 0;
animation: slideUp 400ms ease-out forwards;
}
.animate-count-up {
animation: countUp 1200ms ease-out;
}
.animate-slide-in-right {
opacity: 0;
animation: slideInRight 180ms ease-out forwards;
}
.animate-scale-hover {
transition: transform 120ms ease-out;
}
.animate-scale-hover:hover {
transform: scale(1.02);
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
from { opacity: 0; transform: translateX(100%); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
from { transform: scale(0.8); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
}
/* Accessibility: Reduce motion support */
@media (prefers-reduced-motion: reduce) {
.animate-fade-in,
.animate-slide-up,
.animate-count-up,
.animate-slide-in-right,
.animate-scale-hover {
animation: none !important;
opacity: 1 !important;
transform: none !important;
}
.animate-scale-hover:hover {
transform: none !important;
}
html {
scroll-behavior: auto !important;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* High contrast mode support */
@media (prefers-contrast: high) {
:root {
--border: #000000;
--chrome-divider: #000000;
}
.dark {
--border: #ffffff;
--chrome-divider: #ffffff;
}
button,
input,
textarea,
select {
border: 2px solid currentColor;
}
}
/* Minimal scrollbar design */
@layer base {
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--muted-foreground);
opacity: 0.3;
border-radius: 3px;
transition: opacity 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
opacity: 0.5;
}
::-webkit-scrollbar-thumb:active {
opacity: 0.7;
}
* {
scrollbar-width: thin;
scrollbar-color: var(--muted-foreground) transparent;
}
}
/* Utility classes for HR Portal */
@layer utilities {
.min-tap-44 {
min-height: 44px;
min-width: 44px;
}
.sticky-header {
position: sticky;
top: 0;
z-index: 10;
background: var(--background);
border-bottom: 1px solid var(--border);
}
.focus-ring {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
.skeleton {
background: linear-gradient(
90deg,
var(--muted) 0%,
var(--accent) 50%,
var(--muted) 100%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
}