mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-04 19:27:31 +01:00
ChartKit 0.7.0 closes the three gaps recorded in package-plan.json (#136): LineChart labels days on short spans, Sparkline takes per-point tones and null gaps, and Meter takes a tone and showValue={false}. - CheckinTrendChart and AssessmentTrendChart render ChartKit's LineChart on the server, dated by ISO day in the app's en-GB locale. Callers pass the day instead of a pre-formatted label, and the assessments page drops its client wrapper. - The patients table's 7-day strip is a Sparkline: one point a day, toned by wellness level (SPARK_LEVEL_TONES), a gap on a day without a check-in, and the counts in its accessible name. - Dimension score bars (/assessments, the public results overlay) and the reports adherence bars are toned Meters; scoreColor becomes scoreTone. The overlay sets --ck-line to its own hairline. - --ck-series-4 maps to the gold: it defaulted to --ck-up, the same teal as the accent, so Energy and Focus drew in one colour. - recharts, the metric colour field, --purple and the bar/dot CSS are removed; the design gate's allowlist drops the three files that no longer need a style prop. All three exceptions leave package-plan.json. Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 Co-authored-by: Claude <noreply@anthropic.com>
388 lines
11 KiB
CSS
388 lines
11 KiB
CSS
@import "@bitbaum/chatkit/styles.css";
|
|
@import "@bitbaum/chartkit/styles.css";
|
|
@import "tailwindcss";
|
|
|
|
/* ─── Design Tokens ────────────────────────────────────── */
|
|
:root {
|
|
/* Base palette */
|
|
--ink: #1a1a22;
|
|
--ink2: #3a3a4a;
|
|
--muted: #71727c; /* darkened from #888a96 — passes WCAG AA 4.5:1 on white */
|
|
--faint: #c4c0b8;
|
|
--teal: #2a7a8a;
|
|
--teal-dark: #1e6672;
|
|
/* Teal as TEXT on a dark surface. --teal is tuned to carry white on top of
|
|
it (4.94:1) and is a good fill; the same colour AS text on the dark page
|
|
is only 3.50:1, below the 4.5 AA floor — which is what made the outlined
|
|
"DISCOVERY CALL BUCHEN" CTA hard to read. Lightening --teal itself would
|
|
have fixed the text and broken the fill, dropping white-on-teal to
|
|
3.45:1. Two roles, two tokens. 5.01:1 on the dark page. */
|
|
--teal-on-dark: #3796a8;
|
|
--gold: #b8960a;
|
|
--off: #f8f7f4;
|
|
--light: #f1ede7;
|
|
--border: #e5e0d8;
|
|
--warn: #d4820a;
|
|
--danger: #e05a5a;
|
|
--white: #ffffff;
|
|
--footer-bg: #111118;
|
|
|
|
/* Ink surface gradient — the one dark-card treatment used across the portal
|
|
sidebar and profile hero. Was hardcoded identically in two files; a
|
|
third dark surface (portal.module.css / dashboard.module.css) uses flat
|
|
--ink instead, which is a deliberate lighter-weight variant, not drift. */
|
|
--gradient-ink: linear-gradient(200deg, var(--ink2) -40%, var(--ink) 45%);
|
|
|
|
/* Layout */
|
|
--section-pad-y: 6rem;
|
|
--section-pad-x: 3rem;
|
|
|
|
/* White opacity scale — used in dark/ink-background sections */
|
|
--white-3: rgba(255, 255, 255, 0.03);
|
|
--white-5: rgba(255, 255, 255, 0.05);
|
|
--white-6: rgba(255, 255, 255, 0.06);
|
|
--white-7: rgba(255, 255, 255, 0.07);
|
|
--white-8: rgba(255, 255, 255, 0.08);
|
|
--white-10: rgba(255, 255, 255, 0.1);
|
|
--white-12: rgba(255, 255, 255, 0.12);
|
|
--white-15: rgba(255, 255, 255, 0.15);
|
|
--white-18: rgba(255, 255, 255, 0.18);
|
|
--white-20: rgba(255, 255, 255, 0.2);
|
|
--white-25: rgba(255, 255, 255, 0.25);
|
|
--white-30: rgba(255, 255, 255, 0.3);
|
|
--white-35: rgba(255, 255, 255, 0.35);
|
|
--white-40: rgba(255, 255, 255, 0.4);
|
|
--white-50: rgba(255, 255, 255, 0.5);
|
|
--white-55: rgba(255, 255, 255, 0.55);
|
|
--white-58: rgba(255, 255, 255, 0.58);
|
|
--white-60: rgba(255, 255, 255, 0.6);
|
|
--white-62: rgba(255, 255, 255, 0.62);
|
|
--white-75: rgba(255, 255, 255, 0.75);
|
|
--white-80: rgba(255, 255, 255, 0.8);
|
|
--white-90: rgba(255, 255, 255, 0.9);
|
|
--white-97: rgba(255, 255, 255, 0.97);
|
|
|
|
/* Primary (teal) opacity scale — computed from --teal so theme changes cascade */
|
|
--teal-6: color-mix(in srgb, var(--teal) 6%, transparent);
|
|
--teal-8: color-mix(in srgb, var(--teal) 8%, transparent);
|
|
--teal-10: color-mix(in srgb, var(--teal) 10%, transparent);
|
|
--teal-15: color-mix(in srgb, var(--teal) 15%, transparent);
|
|
--teal-20: color-mix(in srgb, var(--teal) 20%, transparent);
|
|
--teal-30: color-mix(in srgb, var(--teal) 30%, transparent);
|
|
--teal-50: color-mix(in srgb, var(--teal) 50%, transparent);
|
|
--teal-60: color-mix(in srgb, var(--teal) 60%, transparent);
|
|
--teal-70: color-mix(in srgb, var(--teal) 70%, transparent);
|
|
|
|
/* Gold opacity scale */
|
|
--gold-6: color-mix(in srgb, var(--gold) 6%, transparent);
|
|
--gold-12: color-mix(in srgb, var(--gold) 12%, transparent);
|
|
--gold-70: color-mix(in srgb, var(--gold) 70%, transparent);
|
|
|
|
/* Danger opacity scale */
|
|
--danger-10: color-mix(in srgb, var(--danger) 10%, transparent);
|
|
|
|
/* Warn opacity scale */
|
|
--warn-8: color-mix(in srgb, var(--warn) 8%, transparent);
|
|
--warn-10: color-mix(in srgb, var(--warn) 10%, transparent);
|
|
--warn-12: color-mix(in srgb, var(--warn) 12%, transparent);
|
|
|
|
/* Muted opacity scale */
|
|
--muted-8: color-mix(in srgb, var(--muted) 8%, transparent);
|
|
--muted-10: color-mix(in srgb, var(--muted) 10%, transparent);
|
|
--muted-12: color-mix(in srgb, var(--muted) 12%, transparent);
|
|
--muted-18: color-mix(in srgb, var(--muted) 18%, transparent);
|
|
|
|
/* Extended teal opacity */
|
|
--teal-12: color-mix(in srgb, var(--teal) 12%, transparent);
|
|
--teal-18: color-mix(in srgb, var(--teal) 18%, transparent);
|
|
--teal-25: color-mix(in srgb, var(--teal) 25%, transparent);
|
|
|
|
/* Extended gold opacity */
|
|
--gold-20: color-mix(in srgb, var(--gold) 20%, transparent);
|
|
--gold-30: color-mix(in srgb, var(--gold) 30%, transparent);
|
|
|
|
/* Shadow scale — for dropdowns, cards, modals */
|
|
--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.03);
|
|
--shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.1);
|
|
--shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
|
|
--shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
|
|
/* Border radius scale */
|
|
--radius-2xs: 2px;
|
|
--radius-xs: 0.2rem;
|
|
--radius-sm: 0.25rem;
|
|
--radius-md: 0.4rem;
|
|
--radius-lg: 0.5rem;
|
|
--radius-xl: 0.875rem;
|
|
--radius-2xl: 1rem;
|
|
--radius-full: 50%;
|
|
--radius-pill: 2rem;
|
|
|
|
/* Transition timing */
|
|
--transition-fast: 0.15s;
|
|
--transition-normal: 0.3s;
|
|
--transition-slow: 0.4s;
|
|
|
|
/* Mobile bottom nav height — anything sticky above it must clear this. */
|
|
--portal-bottom-nav-h: 60px;
|
|
|
|
/* Z-index scale */
|
|
--z-sticky: 10;
|
|
--z-nav: 100;
|
|
/* Dropdown panels (mega menu, notification bell, user menu) sit above the
|
|
nav bar they hang off of but below the full-screen mobile overlay. */
|
|
--z-dropdown: 150;
|
|
--z-overlay: 200;
|
|
--z-overlay-pb: 201;
|
|
--z-overlay-close: 202;
|
|
}
|
|
|
|
/* ─── Base ─────────────────────────────────────────────── */
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html {
|
|
scroll-behavior: smooth;
|
|
font-size: 112%; /* 17.9px effective — all rem values scale up ~12% for readability */
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-dm-sans), "DM Sans", sans-serif;
|
|
font-weight: 300;
|
|
color: var(--ink);
|
|
background: var(--white);
|
|
line-height: 1.7;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* ─── Shared Utilities ─────────────────────────────────── */
|
|
.section-inner {
|
|
max-width: 1100px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.eyebrow {
|
|
font-size: 0.72rem;
|
|
letter-spacing: 0.25em;
|
|
text-transform: uppercase;
|
|
color: var(--teal);
|
|
margin-bottom: 0.8rem;
|
|
}
|
|
|
|
.sec-title {
|
|
font-family: var(--font-cormorant), serif;
|
|
font-size: 2.4rem;
|
|
font-weight: 300;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.sec-title em {
|
|
font-style: italic;
|
|
color: var(--teal);
|
|
}
|
|
|
|
/* Dark section overrides — for sections with dark/ink backgrounds */
|
|
.sec-title-light {
|
|
color: var(--white);
|
|
}
|
|
|
|
.sec-title-light em {
|
|
font-style: italic;
|
|
color: var(--white-35);
|
|
}
|
|
|
|
.eyebrow-gold {
|
|
color: var(--gold-70);
|
|
}
|
|
|
|
/* Centred section headers */
|
|
.section-header {
|
|
text-align: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.sec-title-center {
|
|
text-align: center;
|
|
}
|
|
|
|
.sec-sub-mt {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.sec-sub {
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
line-height: 1.85;
|
|
max-width: 34rem;
|
|
}
|
|
|
|
.hr-rule {
|
|
height: 1px;
|
|
background: var(--border);
|
|
margin: 0 3rem;
|
|
}
|
|
|
|
.hr-dark {
|
|
height: 1px;
|
|
background: var(--white-5);
|
|
margin: 0;
|
|
}
|
|
|
|
.tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.4rem;
|
|
margin-top: 0.8rem;
|
|
}
|
|
|
|
.tag {
|
|
font-size: 0.65rem;
|
|
letter-spacing: 0.1em;
|
|
text-transform: uppercase;
|
|
padding: 0.3rem 0.7rem;
|
|
background: var(--teal-6);
|
|
color: var(--teal);
|
|
border-radius: var(--radius-2xl);
|
|
}
|
|
|
|
/* ─── Global CTA Buttons ───────────────────────────────── */
|
|
.btn-dark {
|
|
display: inline-block;
|
|
background: var(--ink);
|
|
color: var(--white);
|
|
border: 1.5px solid var(--ink);
|
|
padding: 0.75rem 1.75rem;
|
|
border-radius: var(--radius-md);
|
|
font-family: var(--font-dm-sans), "DM Sans", sans-serif;
|
|
font-size: 0.78rem;
|
|
font-weight: 400;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
transition:
|
|
background var(--transition-fast),
|
|
border-color var(--transition-fast);
|
|
}
|
|
|
|
.btn-dark:hover,
|
|
.btn-dark:focus-visible {
|
|
background: var(--ink2);
|
|
border-color: var(--ink2);
|
|
outline: none;
|
|
}
|
|
|
|
.btn-outline {
|
|
display: inline-block;
|
|
background: transparent;
|
|
color: var(--ink);
|
|
border: 1.5px solid var(--ink);
|
|
padding: 0.75rem 1.75rem;
|
|
border-radius: var(--radius-md);
|
|
font-family: var(--font-dm-sans), "DM Sans", sans-serif;
|
|
font-size: 0.78rem;
|
|
font-weight: 400;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
transition:
|
|
background var(--transition-fast),
|
|
color var(--transition-fast);
|
|
}
|
|
|
|
.btn-outline:hover,
|
|
.btn-outline:focus-visible {
|
|
background: var(--ink);
|
|
color: var(--white);
|
|
outline: none;
|
|
}
|
|
|
|
/* ─── Score colour utilities ───────────────────────────────── */
|
|
/* Use className={scoreClass(n)} instead of style={{ color: scoreColor(n) }} */
|
|
.score-good {
|
|
color: var(--teal);
|
|
}
|
|
.score-warn {
|
|
color: var(--warn);
|
|
}
|
|
.score-bad {
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* ─── Profile completeness colour utilities ─────────────────── */
|
|
/* Use className={profileCompletenessClass(pct)} instead of inline style */
|
|
.pct-good {
|
|
color: var(--teal);
|
|
}
|
|
.pct-warn {
|
|
color: var(--warn);
|
|
}
|
|
.pct-bad {
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* ─── Booking status badge utilities ───────────────────────── */
|
|
/* Use className={s.badgeClass} instead of style={{ color: s.color, background: s.bg }} */
|
|
.booking-status-pending {
|
|
color: var(--warn);
|
|
background: var(--warn-12);
|
|
}
|
|
.booking-status-confirmed {
|
|
color: var(--teal);
|
|
background: var(--teal-12);
|
|
}
|
|
.booking-status-attended {
|
|
color: var(--gold);
|
|
background: var(--gold-12);
|
|
}
|
|
.booking-status-cancelled {
|
|
color: var(--muted);
|
|
background: var(--muted-12);
|
|
}
|
|
|
|
/* ─── Accessibility utilities ──────────────────────────────── */
|
|
/* Visually hidden but available to screen readers */
|
|
.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;
|
|
}
|
|
|
|
/* One chat renderer, this product's palette. */
|
|
:root {
|
|
--ck-page: var(--off);
|
|
--ck-bg: var(--white);
|
|
--ck-raised: var(--light);
|
|
--ck-fg: var(--ink);
|
|
--ck-fg-2: var(--ink2);
|
|
--ck-fg-3: var(--muted);
|
|
--ck-line: var(--border);
|
|
--ck-line-2: var(--faint);
|
|
}
|
|
|
|
/* One chart renderer (@bitbaum/chartkit), the same palette. It shares --ck-line
|
|
and --ck-bg with chatkit above; its other defaults expect design-tokens' HSL
|
|
triplets, which this app does not use, so they are mapped here. */
|
|
:root {
|
|
--ck-ink: var(--ink);
|
|
--ck-ink-muted: var(--muted);
|
|
--ck-accent: var(--teal);
|
|
--ck-up: var(--teal);
|
|
--ck-down: var(--danger);
|
|
--ck-warning: var(--warn);
|
|
--ck-font: var(--font-dm-sans), "DM Sans", sans-serif;
|
|
/* Series 4 defaults to --ck-up, which is the accent's teal here: give it the
|
|
gold so five check-in lines are five colours as well as five dashes. */
|
|
--ck-series-4: var(--gold);
|
|
}
|