diff --git a/frontend/src/index.css b/frontend/src/index.css index 0e93a5a..75b6c4f 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -110,6 +110,224 @@ a:hover { outline-offset: 2px; } +/* ===================================================== + UTILITY CLASSES + ===================================================== */ + +/* Spacing - Margin Bottom */ +.mb-xs { + margin-bottom: var(--space-xs); +} + +.mb-sm { + margin-bottom: var(--space-sm); +} + +.mb-md { + margin-bottom: var(--space-md); +} + +.mb-lg { + margin-bottom: var(--space-lg); +} + +.mb-xl { + margin-bottom: var(--space-xl); +} + +/* Spacing - Margin Top */ +.mt-xs { + margin-top: var(--space-xs); +} + +.mt-sm { + margin-top: var(--space-sm); +} + +.mt-md { + margin-top: var(--space-md); +} + +.mt-lg { + margin-top: var(--space-lg); +} + +.mt-xl { + margin-top: var(--space-xl); +} + +/* Spacing - Margin Left */ +.ml-xs { + margin-left: var(--space-xs); +} + +.ml-sm { + margin-left: var(--space-sm); +} + +.ml-md { + margin-left: var(--space-md); +} + +/* Spacing - Padding */ +.p-sm { + padding: var(--space-sm); +} + +.p-md { + padding: var(--space-md); +} + +.p-lg { + padding: var(--space-lg); +} + +.p-xl { + padding: var(--space-xl); +} + +/* Flex Layouts */ +.flex { + display: flex; +} + +.flex-col { + display: flex; + flex-direction: column; +} + +.flex-center { + display: flex; + align-items: center; + justify-content: center; +} + +.flex-between { + display: flex; + align-items: center; + justify-content: space-between; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +/* Gaps */ +.gap-xs { + gap: var(--space-xs); +} + +.gap-sm { + gap: var(--space-sm); +} + +.gap-md { + gap: var(--space-md); +} + +.gap-lg { + gap: var(--space-lg); +} + +/* Text Utilities */ +.text-center { + text-align: center; +} + +.text-xs { + font-size: 12px; +} + +.text-sm { + font-size: 14px; +} + +.font-medium { + font-weight: 500; +} + +.font-semibold { + font-weight: 600; +} + +.uppercase { + text-transform: uppercase; +} + +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Modal */ +.modal-overlay { + position: fixed; + inset: 0; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.modal-content { + max-width: 400px; + text-align: center; +} + +/* Display */ +.hidden { + display: none; +} + +.block { + display: block; +} + +/* Width */ +.w-full { + width: 100%; +} + +.max-w-sm { + max-width: 400px; +} + +.max-w-md { + max-width: 600px; +} + +.max-w-lg { + max-width: 800px; +} + +.max-w-xl { + max-width: 1000px; +} + +/* Min Width / Flex */ +.min-w-0 { + min-width: 0; +} + +.flex-1 { + flex: 1; +} + +/* Border */ +.border-t { + border-top: 1px solid var(--border); +} + +/* ===================================================== + END UTILITY CLASSES + ===================================================== */ + /* Button Base */ .btn { display: inline-flex; @@ -463,7 +681,7 @@ select.input { } .biomarker-info { - flex: 0 0 240px; + flex: 0 0 320px; min-width: 0; display: flex; flex-direction: row; @@ -473,13 +691,11 @@ select.input { .biomarker-info .biomarker-name { font-size: 14px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; } .biomarker-info .biomarker-unit { font-size: 11px; + flex-shrink: 0; } /* Biomarker Scale Bar */ @@ -785,4 +1001,97 @@ select.input { .page-loading { padding: var(--space-lg); color: var(--text-secondary); +} + +/* ===================================================== + SOURCES PAGE + ===================================================== */ + +/* Upload Zone */ +.upload-zone { + border: 2px dashed var(--border); + border-radius: var(--radius-md); + padding: var(--space-xl); + text-align: center; + cursor: pointer; + transition: all 0.2s; +} + +.upload-zone:hover { + border-color: var(--accent); + background-color: color-mix(in srgb, var(--accent) 5%, var(--bg-secondary)); +} + +.upload-zone.drag-over { + border-color: var(--accent); + background-color: color-mix(in srgb, var(--accent) 5%, var(--bg-secondary)); +} + +.upload-zone.uploading { + cursor: wait; +} + +/* Upload Icon */ +.upload-icon { + width: 36px; + height: 36px; + display: block; + margin: 0 auto; +} + +/* Source Item */ +.source-item { + padding: var(--space-sm) 0; + border-bottom: 1px solid var(--border); +} + +/* Status Parsed */ +.status-parsed { + color: var(--indicator-normal); +} + +/* Icon sizes */ +.icon-sm { + width: 14px; + height: 14px; +} + +/* ===================================================== + DASHBOARD PAGE + ===================================================== */ + +/* Category Card */ +.category-card { + padding: 0; +} + +/* Category Name */ +.category-name { + font-size: 16px; + font-weight: 600; + text-transform: uppercase; +} + +/* Collapsible Header Button */ +.collapsible-header { + background: none; + border: none; + cursor: pointer; + text-align: left; + color: var(--text-primary); +} + +/* Collapse Icon */ +.collapse-icon { + width: 18px; + height: 18px; + transition: transform 0.2s; +} + +/* ===================================================== + INSIGHTS PAGE + ===================================================== */ + +.coming-soon-icon { + font-size: 48px; } \ No newline at end of file diff --git a/frontend/src/pages/Admin.tsx b/frontend/src/pages/Admin.tsx index 966e8a8..e3a9eec 100644 --- a/frontend/src/pages/Admin.tsx +++ b/frontend/src/pages/Admin.tsx @@ -121,7 +121,7 @@ export function AdminPage() { const isConfigAdmin = (user: User) => user.username === CONFIG_ADMIN_USERNAME if (loading) { - return
Loading...
+ return
Loading...
} if (!currentUser || currentUser.role !== 'admin') { @@ -129,10 +129,10 @@ export function AdminPage() { } return ( -
-
+
+
← Back to Dashboard -
+

User Management

-
+
@@ -327,7 +327,7 @@ function EditUserModal({ user, onClose, onSave, setMessage }: EditUserModalProps placeholder="Full name" />
-
+
@@ -419,7 +419,7 @@ function ResetPasswordModal({ user, onClose, onSave, setMessage }: ResetPassword />
{error &&
{error}
} -
+
diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index 12c8d8e..b46e35c 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -60,53 +60,38 @@ export function DashboardPage() {
-

Biomarker Categories

-
+

Biomarker Categories

+
{categories.map(category => { const categoryBiomarkers = getBiomarkersForCategory(category.id) const isExpanded = expandedCategories.has(category.id) return ( -
+
{isExpanded && ( -
+
{categoryBiomarkers.length === 0 ? ( -

+

No biomarkers in this category

) : ( diff --git a/frontend/src/pages/Insights.tsx b/frontend/src/pages/Insights.tsx index c187bce..f89dbcc 100644 --- a/frontend/src/pages/Insights.tsx +++ b/frontend/src/pages/Insights.tsx @@ -6,8 +6,8 @@ export function InsightsPage() {

AI-powered analysis of your health data

-
-
🚀
+
+
🚀

Coming Soon

AI-generated health insights and recommendations based on your biomarker data. diff --git a/frontend/src/pages/Login.tsx b/frontend/src/pages/Login.tsx index 9253ba2..d7e0ade 100644 --- a/frontend/src/pages/Login.tsx +++ b/frontend/src/pages/Login.tsx @@ -91,7 +91,7 @@ export function LoginPage() { -

+

Don't have an account? Sign up

diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index ff95192..f7c4363 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx @@ -123,7 +123,7 @@ export function ProfilePage() { } return ( -
+

Profile

Manage your account and health information

@@ -131,8 +131,8 @@ export function ProfilePage() {
{/* Account Info */} -
-

Account

+
+

Account

@@ -165,8 +165,8 @@ export function ProfilePage() {
{/* Physical Info */} -
-

Physical Info

+
+

Physical Info

@@ -214,8 +214,8 @@ export function ProfilePage() {
{/* Lifestyle */} -
-

Lifestyle

+
+

Lifestyle

diff --git a/frontend/src/pages/Signup.tsx b/frontend/src/pages/Signup.tsx index f5da0bf..855184b 100644 --- a/frontend/src/pages/Signup.tsx +++ b/frontend/src/pages/Signup.tsx @@ -98,7 +98,7 @@ export function SignupPage() { -

+

Already have an account? Sign in

diff --git a/frontend/src/pages/Sources.tsx b/frontend/src/pages/Sources.tsx index 5780083..30b3d04 100644 --- a/frontend/src/pages/Sources.tsx +++ b/frontend/src/pages/Sources.tsx @@ -117,13 +117,13 @@ export function SourcesPage() {
-

Upload Data

-

+

Upload Data

+

Upload lab reports in PDF, CSV, or Excel format to import your biomarker data.

{error && ( -
+
{error}
)} @@ -131,7 +131,7 @@ export function SourcesPage() { handleUpload(e.target.files)} @@ -139,15 +139,6 @@ export function SourcesPage() {
!uploading && fileInputRef.current?.click()} onDragOver={(e) => { e.preventDefault(); setDragOver(true) }} onDragLeave={() => setDragOver(false)} @@ -159,20 +150,20 @@ export function SourcesPage() { > {uploading ? ( <> -
- Uploading +
+ Uploading

Uploading...

) : ( <> -
- Upload +
+ Upload

Drag & drop files here, or click to browse

-

+

Supported: PDF, CSV, XLSX, Images

@@ -180,8 +171,8 @@ export function SourcesPage() {
-
-

Recent Uploads

+
+

Recent Uploads

{loading ? (

Loading...

@@ -190,28 +181,22 @@ export function SourcesPage() { ) : (
{sources.map(source => ( -
-
-
+
+
+
{source.name}
{source.file_type} • {formatFileSize(source.file_size)} • {formatDate(source.uploaded_at)}
-
+
{source.ocr_data ? ( - - Parsed Parsed + + Parsed Parsed ) : ( - Pending + Pending )}