Files
gravl/frontend/src/index.css
T
clawd 1f2a892391 feat(frontend): Kinetic Precision design system — new lime theme, glassmorphism, redesigned pages
- New design system: Stitch (kinetic-precision.css) with lime (#cafd00) accent
- New Google Fonts: Lexend, Plus Jakarta Sans, Space Grotesk
- New page: BenchmarksPage with strength/endurance/body tracking
- Redesigned: Dashboard, ProgressPage, WorkoutPage, LoginPage + LoginPage.css
- Add shared glassmorphism nav, kinetic buttons, intensity indicators
- Build: 265KB JS / 88KB CSS / 2.54s (clean)
2026-04-27 08:49:23 +02:00

861 lines
18 KiB
CSS

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
/* Kinetic Precision - Stitch Design System */
--bg-primary: #0e0e0e;
--bg-secondary: #131313;
--bg-tertiary: #1a1a1a;
--bg-card: #1a1a1a;
--bg-card-hover: #20201f;
--bg-elevated: #20201f;
--bg: #0e0e0e;
--text-primary: #ffffff;
--text-secondary: #adaaaa;
--text-muted: #767575;
--text-tertiary: #484847;
--text: #ffffff;
/* Primary: Electric Lime */
--accent: #cafd00;
--accent-hover: #beee00;
--accent-subtle: rgba(202, 253, 0, 0.12);
--accent-glow: rgba(202, 253, 0, 0.25);
--accent-on: #516700;
/* Secondary: Orange */
--secondary: #ff7440;
--secondary-hover: #ff8c5a;
--secondary-subtle: rgba(255, 116, 64, 0.12);
--secondary-glow: rgba(255, 116, 64, 0.25);
--success: #f3ffca;
--success-subtle: rgba(243, 255, 202, 0.12);
--warning: #ff7440;
--warning-subtle: rgba(255, 116, 64, 0.12);
--error: #ff7351;
--error-subtle: rgba(255, 115, 81, 0.15);
--border: #1f1f1f;
--border-hover: #262626;
--border-accent: rgba(202, 253, 0, 0.2);
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
--shadow-glow: 0 0 20px rgba(202, 253, 0, 0.3);
--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.5);
--shadow-elevated: 0 8px 16px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
--workout-push: #ff7440;
--workout-pull: #f3ffca;
--workout-legs: #cafd00;
--workout-shoulders: #ff7440;
--workout-upper: #f3ffca;
--workout-lower: #beee00;
--workout-default: #cafd00;
--font-xs: 0.75rem;
--font-sm: 0.875rem;
--font-base: 1rem;
--font-lg: 1.125rem;
--font-xl: 1.25rem;
--font-2xl: 1.5rem;
--font-3xl: 2rem;
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.25rem;
--space-6: 1.5rem;
--space-8: 2rem;
--space-10: 2.5rem;
--space-12: 3rem;
--transition-fast: 150ms ease;
--transition-base: 200ms ease;
--transition-slow: 300ms ease;
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 8px;
--radius-xl: 10px;
--radius-2xl: 12px;
--radius-full: 9999px;
}
html, body {
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Lexend', sans-serif;
font-weight: 700;
line-height: 1.2;
}
#root {
min-height: 100vh;
}
button {
font-family: inherit;
cursor: pointer;
border: none;
outline: none;
font-size: var(--font-base);
}
input {
font-family: inherit;
outline: none;
font-size: var(--font-base);
}
/* Scrollbar styling - refined */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-secondary);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-tertiary);
}
/* ============================================
AUTH PAGES - Premium First Impression
============================================ */
.auth-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-5);
background: var(--bg-primary);
position: relative;
overflow: hidden;
}
/* Subtle background gradient */
.auth-page::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(
ellipse at 30% 20%,
rgba(255, 107, 74, 0.03) 0%,
transparent 50%
),
radial-gradient(
ellipse at 70% 80%,
rgba(99, 102, 241, 0.03) 0%,
transparent 50%
);
pointer-events: none;
}
.auth-card {
background: var(--bg-card);
padding: var(--space-10) var(--space-8);
border-radius: var(--radius-2xl);
width: 100%;
max-width: 420px;
text-align: center;
box-shadow: var(--shadow-elevated);
border: 1px solid var(--border);
position: relative;
z-index: 1;
}
.auth-card h1 {
font-size: var(--font-3xl);
margin-bottom: var(--space-2);
background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.auth-card h2 {
color: var(--text-secondary);
font-weight: 500;
margin-bottom: var(--space-8);
font-size: var(--font-lg);
}
.logo-mark {
width: 56px;
height: 56px;
color: var(--accent);
margin: 0 auto var(--space-4);
display: block;
}
.auth-title {
font-size: var(--font-2xl);
font-weight: 700;
color: var(--text-primary);
margin-bottom: var(--space-1);
}
.auth-tagline {
color: var(--text-secondary);
font-size: var(--font-sm);
margin-bottom: var(--space-6);
}
@keyframes auth-error-in {
from {
opacity: 0;
transform: translateY(-4px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.auth-error {
animation: auth-error-in 0.2s ease-out;
}
.auth-card form {
display: flex;
flex-direction: column;
gap: var(--space-4);
}
.auth-card input {
padding: var(--space-4) var(--space-5);
border-radius: var(--radius-md);
border: 1px solid var(--border);
background: var(--bg-secondary);
color: var(--text-primary);
font-size: 16px;
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-card input:hover {
border-color: var(--border-hover);
}
.auth-card input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-subtle);
}
.auth-card input::placeholder {
color: var(--text-tertiary);
}
.auth-card button[type="submit"] {
padding: var(--space-4);
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
color: var(--accent-on);
border-radius: var(--radius-md);
font-size: var(--font-base);
font-weight: 600;
transition: all var(--transition-base);
box-shadow: 0 4px 12px rgba(202, 253, 0, 0.3);
position: relative;
overflow: hidden;
}
.auth-card button[type="submit"]::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
pointer-events: none;
}
.auth-card button[type="submit"]:hover:not(:disabled) {
background: linear-gradient(135deg, var(--accent-hover) 0%, #b0de00 100%);
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(202, 253, 0, 0.4);
}
.auth-card button[type="submit"]:active:not(:disabled) {
transform: translateY(0);
box-shadow: 0 2px 8px rgba(202, 253, 0, 0.3);
}
.auth-card button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.auth-card .error {
background: var(--error-subtle);
color: var(--error);
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-md);
margin-bottom: var(--space-4);
font-size: var(--font-sm);
border: 1px solid rgba(239, 68, 68, 0.2);
}
.auth-link {
margin-top: var(--space-6);
color: var(--text-muted);
font-size: var(--font-sm);
}
.auth-link a {
color: var(--accent);
text-decoration: none;
font-weight: 500;
transition: color var(--transition-fast);
}
.auth-link a:hover {
color: var(--accent-hover);
text-decoration: underline;
}
/* ============================================
ONBOARDING - Premium Step Wizard
============================================ */
.onboarding {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-5);
background: var(--bg-primary);
position: relative;
overflow: hidden;
}
.onboarding::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(
ellipse at 30% 20%,
rgba(255, 107, 74, 0.04) 0%,
transparent 50%
),
radial-gradient(
ellipse at 70% 80%,
rgba(99, 102, 241, 0.04) 0%,
transparent 50%
);
pointer-events: none;
}
.onboarding-card {
background: var(--bg-card);
padding: var(--space-8);
border-radius: var(--radius-2xl);
width: 100%;
max-width: 520px;
box-shadow: var(--shadow-elevated);
border: 1px solid var(--border);
position: relative;
z-index: 1;
}
.steps-indicator {
display: flex;
justify-content: center;
gap: var(--space-3);
margin-bottom: var(--space-8);
}
.steps-indicator span {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--bg-secondary);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--font-sm);
font-weight: 600;
color: var(--text-muted);
transition: all var(--transition-base);
border: 2px solid var(--border);
}
.steps-indicator span.active {
background: var(--accent);
color: white;
border-color: var(--accent);
box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
}
.step h2 {
margin-bottom: var(--space-6);
text-align: center;
font-size: var(--font-xl);
}
.step .hint {
color: var(--text-muted);
font-size: var(--font-sm);
margin-bottom: var(--space-4);
text-align: center;
}
.field {
margin-bottom: var(--space-4);
}
.field label {
display: block;
margin-bottom: var(--space-2);
color: var(--text-secondary);
font-size: var(--font-sm);
font-weight: 500;
}
.field input {
width: 100%;
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-md);
border: 1px solid var(--border);
background: var(--bg-secondary);
color: var(--text-primary);
font-size: 16px;
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.field input:hover {
border-color: var(--border-hover);
}
/* ============================================
CHAT ONBOARDING
============================================ */
.chat-onboarding {
min-height: 100vh;
display: flex;
justify-content: center;
padding: var(--space-5);
background: radial-gradient(circle at top, rgba(255, 107, 74, 0.08), transparent 55%), var(--bg-primary);
}
.chat-shell {
width: 100%;
max-width: 720px;
min-height: calc(100vh - var(--space-10));
background: var(--bg-card);
border-radius: var(--radius-2xl);
border: 1px solid var(--border);
box-shadow: var(--shadow-elevated);
display: flex;
flex-direction: column;
overflow: hidden;
}
.chat-header {
padding: var(--space-5) var(--space-5) var(--space-4);
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, rgba(255, 107, 74, 0.1), rgba(18, 18, 26, 0.9));
}
.chat-header h1 {
font-size: var(--font-2xl);
}
.chat-subtitle {
font-size: var(--font-sm);
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: var(--space-1);
}
.chat-status {
font-size: var(--font-sm);
padding: var(--space-2) var(--space-3);
border-radius: var(--radius-full);
background: rgba(34, 197, 94, 0.12);
color: var(--success);
border: 1px solid rgba(34, 197, 94, 0.3);
}
.chat-status.saving {
background: rgba(245, 158, 11, 0.12);
color: var(--warning);
border-color: rgba(245, 158, 11, 0.3);
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: var(--space-5);
display: flex;
flex-direction: column;
gap: var(--space-4);
background: var(--bg-elevated);
}
.chat-message {
display: flex;
align-items: flex-end;
gap: var(--space-3);
animation: slideUp 0.3s ease both;
}
.chat-message.user {
justify-content: flex-end;
}
.chat-message.user .chat-bubble {
background: var(--accent);
color: #fff;
border-bottom-right-radius: var(--radius-sm);
box-shadow: var(--shadow-glow);
}
.chat-message.coach .chat-bubble {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-bottom-left-radius: var(--radius-sm);
}
.chat-bubble {
max-width: 80%;
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-lg);
font-size: var(--font-base);
line-height: 1.5;
}
.chat-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--accent-subtle);
color: var(--accent);
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
flex-shrink: 0;
}
.chat-actions {
padding: var(--space-4);
border-top: 1px solid var(--border);
background: var(--bg-card);
}
.chat-input-area {
display: flex;
flex-direction: column;
gap: var(--space-3);
}
.chat-input-row {
display: flex;
gap: var(--space-3);
}
.chat-input-row input {
flex: 1;
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-md);
border: 1px solid var(--border);
background: var(--bg-secondary);
color: var(--text-primary);
font-size: var(--font-base);
}
.chat-input-row input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-subtle);
}
.send-btn {
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-md);
background: var(--accent);
color: #fff;
font-weight: 600;
transition: transform var(--transition-fast);
}
.send-btn:active {
transform: scale(0.97);
}
.chat-error {
color: var(--error);
font-size: var(--font-sm);
}
.quick-replies {
display: flex;
gap: var(--space-2);
overflow-x: auto;
padding-bottom: var(--space-1);
-webkit-overflow-scrolling: touch;
}
.quick-reply {
padding: var(--space-2) var(--space-4);
border-radius: var(--radius-full);
background: var(--bg-secondary);
color: var(--text-primary);
border: 1px solid var(--border);
white-space: nowrap;
transition: all var(--transition-fast);
}
.quick-reply:hover:not(:disabled) {
border-color: var(--accent);
color: var(--accent);
}
.quick-reply:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.quick-reply.ghost {
background: transparent;
color: var(--text-muted);
}
.typing-indicator {
display: flex;
gap: var(--space-2);
align-items: center;
}
.typing-indicator span {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--text-muted);
animation: typingPulse 1.2s infinite;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes slideUp {
from { transform: translateY(12px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
@keyframes typingPulse {
0%, 100% { transform: translateY(0); opacity: 0.4; }
50% { transform: translateY(-4px); opacity: 1; }
}
@media (max-width: 700px) {
.chat-onboarding {
padding: var(--space-3);
}
.chat-shell {
min-height: calc(100vh - var(--space-6));
}
.chat-header {
padding: var(--space-4);
}
.chat-messages {
padding: var(--space-4);
}
}
.field input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-subtle);
}
.field input::placeholder {
color: var(--text-tertiary);
}
.btn-group {
display: flex;
gap: var(--space-2);
}
.btn-group.vertical {
flex-direction: column;
}
.btn-group button {
flex: 1;
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-md);
background: var(--bg-secondary);
color: var(--text-secondary);
border: 1px solid var(--border);
transition: all var(--transition-base);
font-weight: 500;
min-height: 44px;
}
.btn-group button:hover {
border-color: var(--accent);
color: var(--text-primary);
background: var(--bg-tertiary);
}
.btn-group button.active {
background: var(--accent);
color: white;
border-color: var(--accent);
box-shadow: 0 4px 12px rgba(255, 107, 74, 0.25);
}
.rm-fields {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-3);
margin-top: var(--space-2);
}
.rm-fields .field {
margin-bottom: 0;
}
.bodyfat-result {
background: var(--success-subtle);
color: var(--success);
padding: var(--space-4);
border-radius: var(--radius-md);
text-align: center;
margin: var(--space-4) 0;
border: 1px solid rgba(34, 197, 94, 0.2);
}
.bodyfat-result strong {
font-size: var(--font-lg);
}
.nav-btns {
display: flex;
gap: var(--space-3);
margin-top: var(--space-6);
}
.nav-btns button {
flex: 1;
padding: var(--space-4);
border-radius: var(--radius-md);
font-size: var(--font-base);
transition: all var(--transition-base);
min-height: 44px;
}
.nav-btns button:first-child {
background: var(--bg-secondary);
color: var(--text-secondary);
border: 1px solid var(--border);
}
.nav-btns button:first-child:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
border-color: var(--border-hover);
}
.next-btn, .finish-btn {
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
color: var(--accent-on) !important;
font-weight: 600;
border: none !important;
box-shadow: 0 4px 12px rgba(202, 253, 0, 0.3);
}
.next-btn:hover:not(:disabled), .finish-btn:hover:not(:disabled) {
background: linear-gradient(135deg, var(--accent-hover) 0%, #b0de00 100%) !important;
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(202, 253, 0, 0.4);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Header logout */
.header-left {
display: flex;
align-items: center;
gap: var(--space-4);
}
.logout-btn {
padding: var(--space-2) var(--space-3);
background: var(--bg-secondary);
color: var(--text-muted);
border-radius: var(--radius-sm);
font-size: var(--font-xs);
transition: all var(--transition-base);
border: 1px solid var(--border);
}
.logout-btn:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
border-color: var(--border-hover);
}
/* ============================================
GLOBAL INPUT ACCESSIBILITY
Ensure all inputs have font-size >= 16px to prevent iOS auto-zoom
============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
font-size: 16px;
}