devaanand commited on
Commit
54bd1cf
·
1 Parent(s): 8ed8f32

refactor: enhance AdminPage overview display and improve navigation

Browse files

- Added a Stat component to better visualize user statistics on the AdminPage.
- Updated the overview section to use the new Stat component for a cleaner layout.
- Improved the header navigation in App component for better user experience.
- Changed the brand header to a link for easier navigation back to the dashboard.
- Enhanced styling for header elements and added hover effects for links.
- Updated empty state messaging and layout in the App component for clarity.
- Refined CSS styles for better visual consistency and responsiveness.

backend/app/guide.html CHANGED
@@ -7,13 +7,13 @@
7
  <style>
8
  :root {
9
  --bg: #ffffff; --fg: #1a1a1a; --muted: #666; --border: #ddd;
10
- --accent: #2456a6; --card: #f7f7f8; --amber-bg: #fff7e0; --amber-border: #e0b84d;
11
- --code-bg: #f0f0f2;
12
  }
13
  @media (prefers-color-scheme: dark) {
14
  :root {
15
  --bg: #16181c; --fg: #e6e6e6; --muted: #9a9a9a; --border: #3a3d44;
16
- --accent: #7aa7e8; --card: #1f2228; --amber-bg: #2e2810; --amber-border: #8a6d1f;
17
  --code-bg: #24272e;
18
  }
19
  }
@@ -22,6 +22,21 @@
22
  margin: 0; background: var(--bg); color: var(--fg);
23
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
26
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
27
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
@@ -69,7 +84,7 @@
69
  }
70
  .toast {
71
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
72
- background: var(--accent); color: #fff; padding: .5rem .9rem; border-radius: 8px;
73
  font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .2s;
74
  }
75
  .toast.show { opacity: 1; }
@@ -80,9 +95,18 @@
80
  </style>
81
  </head>
82
  <body>
 
 
 
 
 
 
 
 
 
83
  <main>
84
 
85
- <h1>CCR Platform - Testing Guide</h1>
86
  <p class="sub">Everything built so far, as click-through scenarios: what to do and exactly what
87
  you should see. Every dataset referenced is downloadable right here - all texts are
88
  synthetic, written for this kit; no real participant data anywhere.</p>
 
7
  <style>
8
  :root {
9
  --bg: #ffffff; --fg: #1a1a1a; --muted: #666; --border: #ddd;
10
+ --accent: #7a1f3d; --card: #f7f7f8; --amber-bg: #fff7e0; --amber-border: #e0b84d;
11
+ --code-bg: #f0f0f2; --maroon: #7a1f3d;
12
  }
13
  @media (prefers-color-scheme: dark) {
14
  :root {
15
  --bg: #16181c; --fg: #e6e6e6; --muted: #9a9a9a; --border: #3a3d44;
16
+ --accent: #e08aa3; --card: #1f2228; --amber-bg: #2e2810; --amber-border: #8a6d1f;
17
  --code-bg: #24272e;
18
  }
19
  }
 
22
  margin: 0; background: var(--bg); color: var(--fg);
23
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
24
  }
25
+ /* Shared top bar: same maroon brand as the app, links back to it. */
26
+ .topbar {
27
+ background: var(--maroon); color: #fff;
28
+ padding: 12px 1.25rem;
29
+ display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
30
+ }
31
+ .topbar .brand {
32
+ color: #fff; font-weight: 650; font-size: 1.02rem;
33
+ text-decoration: none; letter-spacing: .2px; white-space: nowrap;
34
+ }
35
+ .topbar .brand:hover { opacity: .88; }
36
+ .topbar nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
37
+ .topbar nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: .88rem; }
38
+ .topbar nav a:hover { color: #fff; text-decoration: underline; }
39
+ .topbar nav a.current { color: #fff; font-weight: 600; }
40
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
41
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
42
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
 
84
  }
85
  .toast {
86
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
87
+ background: var(--maroon); color: #fff; padding: .5rem .9rem; border-radius: 8px;
88
  font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .2s;
89
  }
90
  .toast.show { opacity: 1; }
 
95
  </style>
96
  </head>
97
  <body>
98
+ <header class="topbar">
99
+ <a class="brand" href="/">CCR Platform</a>
100
+ <nav>
101
+ <a href="/">Dashboard</a>
102
+ <a href="/welcome">About</a>
103
+ <a href="/guide" class="current">Guide</a>
104
+ <a href="/product">How it works</a>
105
+ </nav>
106
+ </header>
107
  <main>
108
 
109
+ <h1>Testing guide</h1>
110
  <p class="sub">Everything built so far, as click-through scenarios: what to do and exactly what
111
  you should see. Every dataset referenced is downloadable right here - all texts are
112
  synthetic, written for this kit; no real participant data anywhere.</p>
backend/app/product.html CHANGED
@@ -7,13 +7,13 @@
7
  <style>
8
  :root {
9
  --bg: #ffffff; --fg: #1a1a1a; --muted: #666; --border: #ddd;
10
- --accent: #2456a6; --card: #f7f7f8; --amber-bg: #fff7e0; --amber-border: #e0b84d;
11
- --code-bg: #f0f0f2;
12
  }
13
  @media (prefers-color-scheme: dark) {
14
  :root {
15
  --bg: #16181c; --fg: #e6e6e6; --muted: #9a9a9a; --border: #3a3d44;
16
- --accent: #7aa7e8; --card: #1f2228; --amber-bg: #2e2810; --amber-border: #8a6d1f;
17
  --code-bg: #24272e;
18
  }
19
  }
@@ -22,6 +22,21 @@
22
  margin: 0; background: var(--bg); color: var(--fg);
23
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
26
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
27
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
@@ -66,7 +81,7 @@
66
  }
67
  .toast {
68
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
69
- background: var(--accent); color: #fff; padding: .5rem .9rem; border-radius: 8px;
70
  font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .2s;
71
  }
72
  .toast.show { opacity: 1; }
@@ -79,9 +94,18 @@
79
  </style>
80
  </head>
81
  <body>
 
 
 
 
 
 
 
 
 
82
  <main>
83
 
84
- <h1>CCR Platform - Product &amp; Architecture</h1>
85
  <p class="sub">The under-the-hood companion to the <a href="/guide">testing guide</a>:
86
  who can do what, how access is governed, what runs where, and the engineering
87
  decisions behind it. The guide tells you how to <em>use</em> the platform; this
 
7
  <style>
8
  :root {
9
  --bg: #ffffff; --fg: #1a1a1a; --muted: #666; --border: #ddd;
10
+ --accent: #7a1f3d; --card: #f7f7f8; --amber-bg: #fff7e0; --amber-border: #e0b84d;
11
+ --code-bg: #f0f0f2; --maroon: #7a1f3d;
12
  }
13
  @media (prefers-color-scheme: dark) {
14
  :root {
15
  --bg: #16181c; --fg: #e6e6e6; --muted: #9a9a9a; --border: #3a3d44;
16
+ --accent: #e08aa3; --card: #1f2228; --amber-bg: #2e2810; --amber-border: #8a6d1f;
17
  --code-bg: #24272e;
18
  }
19
  }
 
22
  margin: 0; background: var(--bg); color: var(--fg);
23
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
24
  }
25
+ /* Shared top bar: same maroon brand as the app, links back to it. */
26
+ .topbar {
27
+ background: var(--maroon); color: #fff;
28
+ padding: 12px 1.25rem;
29
+ display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
30
+ }
31
+ .topbar .brand {
32
+ color: #fff; font-weight: 650; font-size: 1.02rem;
33
+ text-decoration: none; letter-spacing: .2px; white-space: nowrap;
34
+ }
35
+ .topbar .brand:hover { opacity: .88; }
36
+ .topbar nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
37
+ .topbar nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: .88rem; }
38
+ .topbar nav a:hover { color: #fff; text-decoration: underline; }
39
+ .topbar nav a.current { color: #fff; font-weight: 600; }
40
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
41
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
42
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
 
81
  }
82
  .toast {
83
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
84
+ background: var(--maroon); color: #fff; padding: .5rem .9rem; border-radius: 8px;
85
  font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .2s;
86
  }
87
  .toast.show { opacity: 1; }
 
94
  </style>
95
  </head>
96
  <body>
97
+ <header class="topbar">
98
+ <a class="brand" href="/">CCR Platform</a>
99
+ <nav>
100
+ <a href="/">Dashboard</a>
101
+ <a href="/welcome">About</a>
102
+ <a href="/guide">Guide</a>
103
+ <a href="/product" class="current">How it works</a>
104
+ </nav>
105
+ </header>
106
  <main>
107
 
108
+ <h1>Product &amp; architecture</h1>
109
  <p class="sub">The under-the-hood companion to the <a href="/guide">testing guide</a>:
110
  who can do what, how access is governed, what runs where, and the engineering
111
  decisions behind it. The guide tells you how to <em>use</em> the platform; this
backend/static/assets/{index-qbWtJ-39.js → index-BLDcIlkB.js} RENAMED
The diff for this file is too large to render. See raw diff
 
backend/static/assets/index-DAnNOmJI.css DELETED
@@ -1 +0,0 @@
1
- :root{--maroon: #7a1f3d;--maroon-dark: #5e1730;--ink: #1d2129;--muted: #667085;--line: #e5e7eb;--bg: #f7f7f8;--card: #ffffff;--ok: #157f3d;--err: #b42318;--accent-soft: #f6ebef;--control-height: 40px}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,sans-serif;color:var(--ink);background:var(--bg);font-size:14.5px;line-height:1.5}.app{display:flex;flex-direction:column;min-height:100vh}.header{background:var(--maroon);color:#fff;padding:14px 28px;display:flex;align-items:baseline;flex-wrap:wrap;gap:14px}.header h1{flex:0 0 auto;font-size:17px;margin:0;font-weight:650;letter-spacing:.2px;white-space:nowrap}.header .sub{flex:1 1 280px;min-width:0;font-size:12.5px;opacity:.85}.layout{display:flex;flex:1;min-width:0;min-height:0}.sidebar{width:250px;background:var(--card);border-right:1px solid var(--line);padding:18px 14px;flex-shrink:0;display:flex;flex-direction:column;min-height:0}.sidebar h2{font-size:11.5px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);margin:0 0 10px 4px;display:flex;align-items:center;gap:8px}.sidebar h2 .count{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:0 8px;font-size:10.5px;letter-spacing:0;color:var(--muted)}.sidebar-filter{width:100%;padding:7px 10px;margin-bottom:10px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:13px;background:#fff;color:var(--ink)}.sidebar-filter:focus{outline:none;border-color:var(--maroon)}.project-list{flex:1;min-height:0;overflow-y:auto;margin:0 -4px;padding:0 4px 4px}.group-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:10px 4px 5px}div:first-child>.group-label{margin-top:2px}.project-item{display:block;width:100%;text-align:left;padding:9px 12px;margin-bottom:5px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;font:inherit;color:var(--ink)}.project-item:hover{background:var(--bg)}.project-item.active{background:var(--accent-soft);border-color:var(--maroon);font-weight:600}.project-item .project-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-item .date{display:block;font-size:11.5px;color:var(--muted);font-weight:400}.project-create{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.project-create>button{width:100%}.main{flex:1;padding:22px 28px;overflow-y:auto;min-width:0}.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:18px 20px;margin-bottom:16px}.card h3{margin:0 0 4px;font-size:15px}.card .hint{color:var(--muted);font-size:12.5px;margin:0 0 12px}.step-badge{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--maroon);color:#fff;font-size:12px;font-weight:700;margin-right:8px;vertical-align:-3px}button{white-space:nowrap}button.primary{background:var(--maroon);color:#fff;border:none;min-height:var(--control-height);display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;line-height:1.2}button.primary:hover{background:var(--maroon-dark)}button.primary:disabled{background:#c9ccd1;cursor:not-allowed}a.google-btn{background:var(--maroon);color:#fff;border:none;min-height:var(--control-height);display:flex;align-items:center;justify-content:center;padding:0 18px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;line-height:1.2;text-decoration:none;width:100%;box-sizing:border-box}a.google-btn:hover{background:var(--maroon-dark)}button.ghost{background:none;border:1px solid var(--line);color:var(--ink);min-height:var(--control-height);display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border-radius:8px;font:inherit;cursor:pointer;line-height:1.2}button.ghost:hover{border-color:var(--maroon);color:var(--maroon)}button.linkish{background:none;border:none;color:var(--maroon);font:inherit;cursor:pointer;padding:0;text-decoration:underline}input[type=text],input[type=email],input[type=password],textarea,select{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff;color:var(--ink)}input[type=text],input[type=email],input[type=password],select{height:var(--control-height)}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid rgba(122,31,61,.38);outline-offset:2px}input[type=file]{display:block;max-width:100%;margin-top:6px;font-size:13px;color:var(--muted)}input[type=file]::file-selector-button{background:#fff;border:1px solid var(--line);color:var(--ink);padding:7px 14px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer;margin-right:10px}input[type=file]::file-selector-button:hover{border-color:var(--maroon);color:var(--maroon)}.row>button{align-self:flex-end;margin-bottom:1px}textarea{resize:vertical}label.field{display:block;margin-bottom:10px;font-size:13px;font-weight:600}label.field>*{margin-top:4px;font-weight:400}.field-hint{margin-top:0;font-weight:400;color:var(--muted);font-size:12px}.row{display:flex;gap:14px;flex-wrap:wrap}.row>*{min-width:0}.row>.grow{flex:1;min-width:min(220px,100%)}.language-control{min-width:170px}.model-control{min-width:260px}.run-settings{display:grid;grid-template-columns:minmax(160px,230px) minmax(320px,720px) max-content;justify-content:start;gap:14px;align-items:end}.run-settings .field{margin-bottom:0}.run-button{min-width:180px;height:var(--control-height)}.construct-row{display:grid;grid-template-columns:minmax(320px,1120px) max-content;justify-content:start;align-items:end;gap:14px}.results-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;flex-wrap:wrap}.result-actions{justify-content:flex-end}.result-actions a{display:inline-flex;text-decoration:none}.pill{display:inline-block;padding:2px 10px;border-radius:999px;font-size:11.5px;font-weight:600}.pill.completed{background:#e6f4ea;color:var(--ok)}.pill.running{background:#fff3e0;color:#b45309}.pill.queued{background:#eef2f7;color:var(--muted)}.pill.failed{background:#fdecea;color:var(--err)}.progress-track{background:var(--line);border-radius:999px;height:7px;overflow:hidden}.progress-fill{background:var(--maroon);height:100%;transition:width .4s ease}.warnings{background:#fff8e6;border:1px solid #f2dfa8;color:#7a5b00;border-radius:8px;padding:10px 14px}.error-banner{background:#fdecea;color:var(--err);border:1px solid #f5c6c0;padding:10px 14px;border-radius:8px;margin-bottom:14px;font-size:13px}.table-wrap{width:100%;overflow-x:auto}table.docs{width:100%;border-collapse:collapse;font-size:13px}table.docs th{text-align:left;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;padding:6px 8px;border-bottom:1px solid var(--line)}table.docs td{padding:7px 8px;border-bottom:1px solid var(--bg);vertical-align:top;overflow-wrap:anywhere}table.docs td.score{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.stat-grid{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:4px}.stat{flex:1;min-width:110px;background:var(--bg);border-radius:8px;padding:10px 14px}.stat .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}.stat .k{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.item-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:7px}.item-bar-label{flex:1;font-size:12.5px;min-width:0;overflow-wrap:anywhere}.item-bar-track{flex:1.2;background:var(--bg);border-radius:999px;height:10px}.item-bar-fill{background:var(--maroon);opacity:.85;height:100%;border-radius:999px}.item-bar-val{width:52px;text-align:right;font-variant-numeric:tabular-nums;font-size:12.5px;font-weight:600}.construct-items{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:12.5px}.construct-items li{margin-bottom:2px}.meta-footer{font-size:12px;color:var(--muted);background:var(--bg);border-radius:8px;padding:10px 14px;margin-top:14px;font-variant-numeric:tabular-nums}.meta-footer code{font-size:11.5px}.muted{color:var(--muted)}.small{font-size:12.5px}.mt{margin-top:12px}.header-auth{margin-left:auto;display:flex;align-items:center;gap:10px;color:#fff}.header-btn{background:#ffffff1f;color:#fff;border:1px solid rgba(255,255,255,.45);padding:5px 14px;border-radius:7px;font:inherit;font-size:13px;cursor:pointer}.header-btn:hover{background:#ffffff38}.project-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}.project-title{font-size:17px;font-weight:650;margin-right:10px}button.danger{color:var(--err);border-color:#f0c4be}button.danger:hover{color:var(--err);border-color:var(--err)}button.danger-solid{background:var(--err)}button.danger-solid:hover{background:#93261b}button.danger-solid:disabled{background:#c9ccd1}.picker{position:relative}.picker-display{width:100%;display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;font:inherit;color:var(--ink);cursor:pointer;text-align:left}.picker-display:hover{border-color:var(--maroon)}.picker-display .picker-caret{margin-left:auto;color:var(--muted);font-size:11px}.picker-search{width:100%;padding:8px 12px;border:1px solid var(--maroon);border-radius:8px;font:inherit;background:#fff}.picker-search:focus{outline:none;box-shadow:0 0 0 3px #7a1f3d1f}.picker-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:50;width:100%;max-width:640px;background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px #0000002e;max-height:340px;overflow-y:auto;padding:4px 0 6px}.picker-group{font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);padding:8px 12px 3px;position:sticky;top:0;background:var(--card)}.picker-option{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 12px;cursor:pointer;font-size:13.5px}.picker-option:hover,.picker-option.active{background:var(--accent-soft)}.picker-option.selected .picker-name{font-weight:650;color:var(--maroon)}.picker-name{min-width:0}.picker-meta{flex-shrink:0;font-size:11.5px;color:var(--muted);white-space:nowrap}.picker-empty{padding:12px;margin:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#14161a73;display:flex;align-items:center;justify-content:center;z-index:40;padding:16px}.modal{background:var(--card);border-radius:12px;padding:26px 28px 24px;width:100%;max-width:460px;box-shadow:0 12px 40px #0000002e}.modal h3{margin:0 0 8px;font-size:18px}.modal .hint{color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 4px}.modal form.mt{margin-top:18px}.modal label.field{margin-bottom:16px}.modal label.field:last-of-type{margin-bottom:20px}.modal .row{gap:10px}.modal .row>.primary{flex:1}.modal p.small.muted.mt{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);font-size:12.5px;line-height:1.6}@media (max-width: 820px){body{font-size:14px}.header{padding:12px 16px;align-items:flex-start;gap:2px 12px}.header h1{font-size:16px}.header .sub{flex:1 1 210px;font-size:12px;line-height:1.35}.layout{display:block}.sidebar{width:100%;border-right:0;border-bottom:1px solid var(--line);padding:14px}.project-list{max-height:220px;margin-right:0;flex:none}.project-create{border-top:0}.main{width:100%;padding:16px 14px 28px;overflow:visible}.card{padding:16px;margin-bottom:14px}.row,.run-settings,.construct-row,.results-toolbar,.result-actions{gap:10px}.row,.results-toolbar,.result-actions{flex-direction:column;align-items:stretch}.run-settings,.construct-row{grid-template-columns:1fr}.row>.grow,.construct-row>.grow,.language-control,.model-control{width:100%;min-width:0}.main .row>button,.main .row>a,.main .row>a>button,.results-toolbar>button{align-self:stretch;margin-bottom:0;width:100%}.run-button{width:100%;min-width:0}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.stat{min-width:0}.item-bar-row{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:6px 10px}.item-bar-track{grid-column:1 / -1;width:100%}.item-bar-val{width:auto}table.docs{min-width:520px}}@media (max-width: 460px){.header .sub{flex-basis:100%}.stat-grid{grid-template-columns:1fr}}.welcome{padding-top:1.2rem}.welcome-hero h2{margin:0 0 .6rem;font-size:1.45rem}.welcome-hero p{max-width:62ch}.welcome-cta{display:flex;gap:.9rem;align-items:center;flex-wrap:wrap;margin:1.1rem 0 .6rem}.welcome-cta .ghost-link{font-size:.95rem}.welcome-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.welcome-step h3{margin:.2rem 0 .3rem}.step-n{width:1.9rem;height:1.9rem;border-radius:50%;background:var(--maroon);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center}@media (max-width: 700px){.welcome-steps{grid-template-columns:1fr}}
 
 
backend/static/assets/index-DRwGDsQP.css ADDED
@@ -0,0 +1 @@
 
 
1
+ :root{--maroon: #7a1f3d;--maroon-dark: #5e1730;--ink: #1d2129;--muted: #667085;--line: #e5e7eb;--bg: #f7f7f8;--card: #ffffff;--ok: #157f3d;--err: #b42318;--accent-soft: #f6ebef;--control-height: 40px}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,sans-serif;color:var(--ink);background:var(--bg);font-size:14.5px;line-height:1.5}.app{display:flex;flex-direction:column;min-height:100vh}a{color:var(--maroon)}.header{background:var(--maroon);color:#fff;padding:14px 28px;display:flex;align-items:center;flex-wrap:wrap;gap:14px}.header .brand{flex:0 0 auto;font-size:17px;font-weight:650;letter-spacing:.2px;white-space:nowrap;color:#fff;text-decoration:none}.header .brand:hover{opacity:.88}.header .sub{flex:1 1 280px;min-width:0;font-size:12.5px;opacity:.85}.layout{display:flex;flex:1;min-width:0;min-height:0}.sidebar{width:250px;background:var(--card);border-right:1px solid var(--line);padding:18px 14px;flex-shrink:0;display:flex;flex-direction:column;min-height:0}.sidebar h2{font-size:11.5px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);margin:0 0 10px 4px;display:flex;align-items:center;gap:8px}.sidebar h2 .count{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:0 8px;font-size:10.5px;letter-spacing:0;color:var(--muted)}.sidebar-filter{width:100%;padding:7px 10px;margin-bottom:10px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:13px;background:#fff;color:var(--ink)}.sidebar-filter:focus{outline:none;border-color:var(--maroon)}.project-list{flex:1;min-height:0;overflow-y:auto;margin:0 -4px;padding:0 4px 4px}.group-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:10px 4px 5px}div:first-child>.group-label{margin-top:2px}.project-item{display:block;width:100%;text-align:left;padding:9px 12px;margin-bottom:5px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;font:inherit;color:var(--ink)}.project-item:hover{background:var(--bg)}.project-item.active{background:var(--accent-soft);border-color:var(--maroon);font-weight:600}.project-item .project-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-item .date{display:block;font-size:11.5px;color:var(--muted);font-weight:400}.project-create{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.project-create>button{width:100%}.main{flex:1;padding:22px 28px;overflow-y:auto;min-width:0}.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:18px 20px;margin-bottom:16px;box-shadow:0 1px 2px #1018280a}.card h3{margin:0 0 4px;font-size:15px}.card .hint{color:var(--muted);font-size:12.5px;margin:0 0 12px}.step-badge{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--maroon);color:#fff;font-size:12px;font-weight:700;margin-right:8px;vertical-align:-3px}button{white-space:nowrap}button.primary{background:var(--maroon);color:#fff;border:none;min-height:var(--control-height);display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;line-height:1.2;transition:background-color .15s ease}button.primary:hover{background:var(--maroon-dark)}button.primary:disabled{background:#c9ccd1;cursor:not-allowed}a.google-btn{background:var(--maroon);color:#fff;border:none;min-height:var(--control-height);display:flex;align-items:center;justify-content:center;padding:0 18px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;line-height:1.2;text-decoration:none;width:100%;box-sizing:border-box}a.google-btn:hover{background:var(--maroon-dark)}button.ghost,a.ghost{background:none;border:1px solid var(--line);color:var(--ink);min-height:var(--control-height);display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border-radius:8px;font:inherit;cursor:pointer;line-height:1.2;text-decoration:none;transition:border-color .15s ease,color .15s ease}button.ghost:hover,a.ghost:hover{border-color:var(--maroon);color:var(--maroon)}button.linkish{background:none;border:none;color:var(--maroon);font:inherit;cursor:pointer;padding:0;text-decoration:underline}input[type=text],input[type=email],input[type=password],textarea,select{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff;color:var(--ink)}input[type=text],input[type=email],input[type=password],select{height:var(--control-height)}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid rgba(122,31,61,.38);outline-offset:2px}input[type=file]{display:block;max-width:100%;margin-top:6px;font-size:13px;color:var(--muted)}input[type=file]::file-selector-button{background:#fff;border:1px solid var(--line);color:var(--ink);padding:7px 14px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer;margin-right:10px}input[type=file]::file-selector-button:hover{border-color:var(--maroon);color:var(--maroon)}.row>button{align-self:flex-end;margin-bottom:1px}textarea{resize:vertical}label.field{display:block;margin-bottom:10px;font-size:13px;font-weight:600}label.field>*{margin-top:4px;font-weight:400}.field-hint{margin-top:0;font-weight:400;color:var(--muted);font-size:12px}.row{display:flex;gap:14px;flex-wrap:wrap}.row>*{min-width:0}.row>.grow{flex:1;min-width:min(220px,100%)}.language-control{min-width:170px}.model-control{min-width:260px}.run-settings{display:grid;grid-template-columns:minmax(160px,230px) minmax(320px,720px) max-content;justify-content:start;gap:14px;align-items:end}.run-settings .field{margin-bottom:0}.run-button{min-width:180px;height:var(--control-height)}.construct-row{display:grid;grid-template-columns:minmax(320px,1120px) max-content;justify-content:start;align-items:end;gap:14px}.results-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;flex-wrap:wrap}.result-actions{justify-content:flex-end}.result-actions a{display:inline-flex;text-decoration:none}.pill{display:inline-block;padding:2px 10px;border-radius:999px;font-size:11.5px;font-weight:600}.pill.completed{background:#e6f4ea;color:var(--ok)}.pill.running{background:#fff3e0;color:#b45309}.pill.queued{background:#eef2f7;color:var(--muted)}.pill.failed{background:#fdecea;color:var(--err)}.progress-track{background:var(--line);border-radius:999px;height:7px;overflow:hidden}.progress-fill{background:var(--maroon);height:100%;transition:width .4s ease}.warnings{background:#fff8e6;border:1px solid #f2dfa8;color:#7a5b00;border-radius:8px;padding:10px 14px}.error-banner{background:#fdecea;color:var(--err);border:1px solid #f5c6c0;padding:10px 14px;border-radius:8px;margin-bottom:14px;font-size:13px}.table-wrap{width:100%;overflow-x:auto}table.docs{width:100%;border-collapse:collapse;font-size:13px}table.docs th{text-align:left;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;padding:6px 8px;border-bottom:1px solid var(--line)}table.docs td{padding:7px 8px;border-bottom:1px solid var(--bg);vertical-align:top;overflow-wrap:anywhere}table.docs td.score{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}table.docs tbody tr:hover td{background:var(--bg)}.stat-grid{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:4px}.stat{flex:1;min-width:110px;background:var(--bg);border-radius:8px;padding:10px 14px}.stat .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}.stat .k{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.item-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:7px}.item-bar-label{flex:1;font-size:12.5px;min-width:0;overflow-wrap:anywhere}.item-bar-track{flex:1.2;background:var(--bg);border-radius:999px;height:10px}.item-bar-fill{background:var(--maroon);opacity:.85;height:100%;border-radius:999px}.item-bar-val{width:52px;text-align:right;font-variant-numeric:tabular-nums;font-size:12.5px;font-weight:600}.construct-items{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:12.5px}.construct-items li{margin-bottom:2px}.meta-footer{font-size:12px;color:var(--muted);background:var(--bg);border-radius:8px;padding:10px 14px;margin-top:14px;font-variant-numeric:tabular-nums}.meta-footer code{font-size:11.5px}.muted{color:var(--muted)}.small{font-size:12.5px}.mt{margin-top:12px}.header-nav{margin-left:auto;display:flex;align-items:center;gap:14px;color:#fff;flex-wrap:wrap}.header-link{background:none;border:none;padding:0;color:#ffffffd1;font:inherit;font-size:13px;cursor:pointer;text-decoration:none;transition:color .15s ease}.header-link:hover{color:#fff;text-decoration:underline}.header-link.current{color:#fff;font-weight:600}.header-btn{background:#ffffff1f;color:#fff;border:1px solid rgba(255,255,255,.45);padding:5px 14px;border-radius:7px;font:inherit;font-size:13px;cursor:pointer;text-decoration:none;transition:background-color .15s ease}.header-btn:hover{background:#ffffff38}.project-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}.project-title{font-size:17px;font-weight:650;margin-right:10px}button.danger{color:var(--err);border-color:#f0c4be}button.danger:hover{color:var(--err);border-color:var(--err)}button.danger-solid{background:var(--err)}button.danger-solid:hover{background:#93261b}button.danger-solid:disabled{background:#c9ccd1}.picker{position:relative}.picker-display{width:100%;display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;font:inherit;color:var(--ink);cursor:pointer;text-align:left}.picker-display:hover{border-color:var(--maroon)}.picker-display .picker-caret{margin-left:auto;color:var(--muted);font-size:11px}.picker-search{width:100%;padding:8px 12px;border:1px solid var(--maroon);border-radius:8px;font:inherit;background:#fff}.picker-search:focus{outline:none;box-shadow:0 0 0 3px #7a1f3d1f}.picker-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:50;width:100%;max-width:640px;background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px #0000002e;max-height:340px;overflow-y:auto;padding:4px 0 6px}.picker-group{font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);padding:8px 12px 3px;position:sticky;top:0;background:var(--card)}.picker-option{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 12px;cursor:pointer;font-size:13.5px}.picker-option:hover,.picker-option.active{background:var(--accent-soft)}.picker-option.selected .picker-name{font-weight:650;color:var(--maroon)}.picker-name{min-width:0}.picker-meta{flex-shrink:0;font-size:11.5px;color:var(--muted);white-space:nowrap}.picker-empty{padding:12px;margin:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#14161a73;display:flex;align-items:center;justify-content:center;z-index:40;padding:16px}.modal{background:var(--card);border-radius:12px;padding:26px 28px 24px;width:100%;max-width:460px;box-shadow:0 12px 40px #0000002e}.modal h3{margin:0 0 8px;font-size:18px}.modal .hint{color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 4px}.modal form.mt{margin-top:18px}.modal label.field{margin-bottom:16px}.modal label.field:last-of-type{margin-bottom:20px}.modal .row{gap:10px}.modal .row>.primary{flex:1}.modal p.small.muted.mt{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);font-size:12.5px;line-height:1.6}@media (max-width: 820px){body{font-size:14px}.header{padding:12px 16px;align-items:flex-start;gap:2px 12px}.header .brand{font-size:16px}.header-nav{gap:10px 14px}.header .sub{flex:1 1 210px;font-size:12px;line-height:1.35}.layout{display:block}.sidebar{width:100%;border-right:0;border-bottom:1px solid var(--line);padding:14px}.project-list{max-height:220px;margin-right:0;flex:none}.project-create{border-top:0}.main{width:100%;padding:16px 14px 28px;overflow:visible}.card{padding:16px;margin-bottom:14px}.row,.run-settings,.construct-row,.results-toolbar,.result-actions{gap:10px}.row,.results-toolbar,.result-actions{flex-direction:column;align-items:stretch}.run-settings,.construct-row{grid-template-columns:1fr}.row>.grow,.construct-row>.grow,.language-control,.model-control{width:100%;min-width:0}.main .row>button,.main .row>a,.main .row>a>button,.results-toolbar>button{align-self:stretch;margin-bottom:0;width:100%}.run-button{width:100%;min-width:0}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.stat{min-width:0}.item-bar-row{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:6px 10px}.item-bar-track{grid-column:1 / -1;width:100%}.item-bar-val{width:auto}table.docs{min-width:520px}}@media (max-width: 460px){.header .sub{flex-basis:100%}.stat-grid{grid-template-columns:1fr}}.empty-state{text-align:center;max-width:560px;margin:48px auto 0;padding:36px 28px 28px}.empty-state h3{font-size:17px}.empty-state .hint{font-size:13px}.empty-actions{display:flex;gap:16px;align-items:center;justify-content:center;flex-wrap:wrap;margin:18px 0 16px}.ghost-link{color:var(--maroon);font-weight:600;text-decoration:none}.ghost-link:hover{text-decoration:underline}.welcome{padding-top:1.2rem}.welcome-hero{padding:26px 28px}.welcome-hero h2{margin:0 0 .6rem;font-size:1.5rem}.welcome-hero p{max-width:62ch}.welcome-cta{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin:1.1rem 0 .6rem}.welcome-cta .ghost-link{font-size:.95rem}.welcome-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.welcome-step h3{margin:.2rem 0 .3rem}.step-n{width:1.9rem;height:1.9rem;border-radius:50%;background:var(--maroon);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center}@media (max-width: 700px){.welcome-steps{grid-template-columns:1fr}}
backend/static/index.html CHANGED
@@ -4,8 +4,8 @@
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>CCR Platform - Contextualized Construct Representations</title>
7
- <script type="module" crossorigin src="/assets/index-qbWtJ-39.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-DAnNOmJI.css">
9
  </head>
10
  <body>
11
  <div id="root"></div>
 
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>CCR Platform - Contextualized Construct Representations</title>
7
+ <script type="module" crossorigin src="/assets/index-BLDcIlkB.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-DRwGDsQP.css">
9
  </head>
10
  <body>
11
  <div id="root"></div>
frontend/src/AdminPage.jsx CHANGED
@@ -15,6 +15,15 @@ const ROLE_LABELS = {
15
  pi: "PI",
16
  };
17
 
 
 
 
 
 
 
 
 
 
18
  // Every admin card is collapsible; the big ones (verification queue, audit)
19
  // start closed so the page stays scannable.
20
  function Section({ title, hint, defaultOpen = true, children }) {
@@ -135,23 +144,33 @@ export default function AdminPage({ auth }) {
135
 
136
  <div className="project-header">
137
  <span className="project-title">Admin</span>
138
- <a className="ghost header-btn" href="/">Back to platform</a>
139
  </div>
140
 
141
  {/* Overview */}
142
  <Section title="Overview">
143
  {overview ? (
144
- <p className="hint">
145
- <b>{overview.users}</b> accounts (
146
- {ROLES.filter((r) => overview.users_by_role?.[r])
147
- .map((r) => `${overview.users_by_role[r]} ${ROLE_LABELS[r]}`)
148
- .join(", ") || "none"}
149
- ; {overview.signups_last_7_days} new this week) · <b>{overview.runs_total}</b>{" "}
150
- runs total ({overview.runs_last_7_days} this week
151
- {overview.runs_by_status?.failed ? `, ${overview.runs_by_status.failed} failed` : ""}) ·{" "}
152
- <b>{overview.projects}</b> projects ({overview.anonymous_projects} anonymous) ·{" "}
153
- <b>{overview.constructs_unverified}</b> library scales awaiting verification
154
- </p>
 
 
 
 
 
 
 
 
 
 
155
  ) : (
156
  <p className="hint">Loading…</p>
157
  )}
 
15
  pi: "PI",
16
  };
17
 
18
+ function Stat({ k, v }) {
19
+ return (
20
+ <div className="stat">
21
+ <div className="v">{v}</div>
22
+ <div className="k">{k}</div>
23
+ </div>
24
+ );
25
+ }
26
+
27
  // Every admin card is collapsible; the big ones (verification queue, audit)
28
  // start closed so the page stays scannable.
29
  function Section({ title, hint, defaultOpen = true, children }) {
 
144
 
145
  <div className="project-header">
146
  <span className="project-title">Admin</span>
147
+ <a className="ghost" href="/">Back to dashboard</a>
148
  </div>
149
 
150
  {/* Overview */}
151
  <Section title="Overview">
152
  {overview ? (
153
+ <>
154
+ <div className="stat-grid">
155
+ <Stat k="Accounts" v={overview.users} />
156
+ <Stat k="Runs total" v={overview.runs_total} />
157
+ <Stat k="Projects" v={overview.projects} />
158
+ <Stat k="Awaiting verification" v={overview.constructs_unverified} />
159
+ </div>
160
+ <p className="small muted" style={{ margin: "10px 0 0" }}>
161
+ {ROLES.filter((r) => overview.users_by_role?.[r])
162
+ .map((r) => `${overview.users_by_role[r]} ${ROLE_LABELS[r]}`)
163
+ .join(", ") || "no accounts yet"}
164
+ {" "}· {overview.signups_last_7_days} sign-up
165
+ {overview.signups_last_7_days === 1 ? "" : "s"} and{" "}
166
+ {overview.runs_last_7_days} run{overview.runs_last_7_days === 1 ? "" : "s"} this week
167
+ {overview.runs_by_status?.failed
168
+ ? ` · ${overview.runs_by_status.failed} failed run${overview.runs_by_status.failed === 1 ? "" : "s"} total`
169
+ : ""}
170
+ {" "}· {overview.anonymous_projects} anonymous project
171
+ {overview.anonymous_projects === 1 ? "" : "s"}
172
+ </p>
173
+ </>
174
  ) : (
175
  <p className="hint">Loading…</p>
176
  )}
frontend/src/App.jsx CHANGED
@@ -183,16 +183,36 @@ export default function App() {
183
  return (
184
  <div className="app">
185
  <header className="header">
186
- <h1>CCR Platform</h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  <span className="sub">
188
  Contextualized Construct Representations · theory-driven psychological text analysis
189
  </span>
190
- <span className="header-auth">
191
- {!showWelcome && (
192
- <button className="header-btn" onClick={() => setShowWelcome(true)}>
 
 
 
 
 
193
  About
194
  </button>
195
  )}
 
 
196
  {auth?.signed_in ? (
197
  <>
198
  <span className="small">Hi, {auth.name}</span>
@@ -208,7 +228,7 @@ export default function App() {
208
  Sign in
209
  </button>
210
  )}
211
- </span>
212
  </header>
213
 
214
  {showLogin && (
@@ -408,17 +428,24 @@ export default function App() {
408
  }}
409
  />
410
  ) : (
411
- <div className="card">
412
- <h3>Welcome</h3>
413
  <p className="hint">
414
- Create or select a project, upload a corpus (CSV/XLSX), choose a validated
415
- construct, and run a CCR analysis. Results include per-item loadings,
416
- score distributions, and a reproducibility record for every run.
 
417
  </p>
 
 
 
 
 
 
418
  <p className="small muted">
419
  Self-contained by design: embeddings run on this server itself - no
420
- third-party AI APIs. Demo instance: storage is ephemeral and may reset;
421
- please don&apos;t upload sensitive or identifiable data.
422
  </p>
423
  </div>
424
  )}
 
183
  return (
184
  <div className="app">
185
  <header className="header">
186
+ <a
187
+ className="brand"
188
+ href="/"
189
+ onClick={(e) => {
190
+ // Inside the SPA the brand is an instant way back to the
191
+ // dashboard; from /admin it's a normal navigation.
192
+ if (!IS_ADMIN_PATH) {
193
+ e.preventDefault();
194
+ enterDashboard();
195
+ }
196
+ }}
197
+ >
198
+ CCR Platform
199
+ </a>
200
  <span className="sub">
201
  Contextualized Construct Representations · theory-driven psychological text analysis
202
  </span>
203
+ <nav className="header-nav">
204
+ {IS_ADMIN_PATH ? (
205
+ <a className="header-link" href="/welcome">About</a>
206
+ ) : (
207
+ <button
208
+ className={"header-link" + (showWelcome ? " current" : "")}
209
+ onClick={() => setShowWelcome(true)}
210
+ >
211
  About
212
  </button>
213
  )}
214
+ <a className="header-link" href="/guide">Guide</a>
215
+ <a className="header-link" href="/product">How it works</a>
216
  {auth?.signed_in ? (
217
  <>
218
  <span className="small">Hi, {auth.name}</span>
 
228
  Sign in
229
  </button>
230
  )}
231
+ </nav>
232
  </header>
233
 
234
  {showLogin && (
 
428
  }}
429
  />
430
  ) : (
431
+ <div className="card empty-state">
432
+ <h3>Create your first project</h3>
433
  <p className="hint">
434
+ A project holds your datasets and runs. Upload a corpus (CSV/XLSX),
435
+ choose a validated construct, and run a CCR analysis - results include
436
+ per-item loadings, score distributions, and a reproducibility record
437
+ for every run.
438
  </p>
439
+ <div className="empty-actions">
440
+ <button className="primary" onClick={() => setCreating(true)}>
441
+ + New project
442
+ </button>
443
+ <a className="ghost-link" href="/guide">Read the 5-minute guide</a>
444
+ </div>
445
  <p className="small muted">
446
  Self-contained by design: embeddings run on this server itself - no
447
+ third-party AI APIs. Please don&apos;t upload sensitive or identifiable
448
+ data on this dev instance.
449
  </p>
450
  </div>
451
  )}
frontend/src/styles.css CHANGED
@@ -25,24 +25,28 @@ body {
25
 
26
  .app { display: flex; flex-direction: column; min-height: 100vh; }
27
 
 
 
28
  /* ---------- header ---------- */
29
  .header {
30
  background: var(--maroon);
31
  color: #fff;
32
  padding: 14px 28px;
33
  display: flex;
34
- align-items: baseline;
35
  flex-wrap: wrap;
36
  gap: 14px;
37
  }
38
- .header h1 {
39
  flex: 0 0 auto;
40
  font-size: 17px;
41
- margin: 0;
42
  font-weight: 650;
43
  letter-spacing: 0.2px;
44
  white-space: nowrap;
 
 
45
  }
 
46
  .header .sub { flex: 1 1 280px; min-width: 0; font-size: 12.5px; opacity: 0.85; }
47
 
48
  .layout { display: flex; flex: 1; min-width: 0; min-height: 0; }
@@ -112,7 +116,8 @@ div:first-child > .group-label { margin-top: 2px; }
112
 
113
  .card {
114
  background: var(--card); border: 1px solid var(--line);
115
- border-radius: 8px; padding: 18px 20px; margin-bottom: 16px;
 
116
  }
117
  .card h3 { margin: 0 0 4px; font-size: 15px; }
118
  .card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
@@ -135,6 +140,7 @@ button.primary {
135
  justify-content: center;
136
  padding: 0 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
137
  line-height: 1.2;
 
138
  }
139
  button.primary:hover { background: var(--maroon-dark); }
140
  button.primary:disabled { background: #c9ccd1; cursor: not-allowed; }
@@ -147,16 +153,17 @@ a.google-btn {
147
  box-sizing: border-box;
148
  }
149
  a.google-btn:hover { background: var(--maroon-dark); }
150
- button.ghost {
151
  background: none; border: 1px solid var(--line); color: var(--ink);
152
  min-height: var(--control-height);
153
  display: inline-flex;
154
  align-items: center;
155
  justify-content: center;
156
  padding: 0 14px; border-radius: 8px; font: inherit; cursor: pointer;
157
- line-height: 1.2;
 
158
  }
159
- button.ghost:hover { border-color: var(--maroon); color: var(--maroon); }
160
  button.linkish {
161
  background: none; border: none; color: var(--maroon);
162
  font: inherit; cursor: pointer; padding: 0; text-decoration: underline;
@@ -267,6 +274,7 @@ table.docs td {
267
  overflow-wrap: anywhere;
268
  }
269
  table.docs td.score { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
 
270
 
271
  .stat-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
272
  .stat {
@@ -296,14 +304,23 @@ table.docs td.score { font-variant-numeric: tabular-nums; font-weight: 600; whit
296
  .small { font-size: 12.5px; }
297
  .mt { margin-top: 12px; }
298
 
299
- /* ---------- header auth ---------- */
300
- .header-auth {
301
- margin-left: auto; display: flex; align-items: center; gap: 10px; color: #fff;
 
302
  }
 
 
 
 
 
 
 
303
  .header-btn {
304
  background: rgba(255, 255, 255, 0.12); color: #fff;
305
  border: 1px solid rgba(255, 255, 255, 0.45);
306
  padding: 5px 14px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer;
 
307
  }
308
  .header-btn:hover { background: rgba(255, 255, 255, 0.22); }
309
 
@@ -386,7 +403,8 @@ button.danger-solid:disabled { background: #c9ccd1; }
386
  align-items: flex-start;
387
  gap: 2px 12px;
388
  }
389
- .header h1 { font-size: 16px; }
 
390
  .header .sub {
391
  flex: 1 1 210px;
392
  font-size: 12px;
@@ -470,12 +488,30 @@ button.danger-solid:disabled { background: #c9ccd1; }
470
  .stat-grid { grid-template-columns: 1fr; }
471
  }
472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  /* ------------------------------------------------------------- welcome */
474
  .welcome { padding-top: 1.2rem; }
475
- .welcome-hero h2 { margin: 0 0 .6rem; font-size: 1.45rem; }
 
476
  .welcome-hero p { max-width: 62ch; }
477
  .welcome-cta {
478
- display: flex; gap: .9rem; align-items: center; flex-wrap: wrap;
479
  margin: 1.1rem 0 .6rem;
480
  }
481
  .welcome-cta .ghost-link { font-size: .95rem; }
 
25
 
26
  .app { display: flex; flex-direction: column; min-height: 100vh; }
27
 
28
+ a { color: var(--maroon); }
29
+
30
  /* ---------- header ---------- */
31
  .header {
32
  background: var(--maroon);
33
  color: #fff;
34
  padding: 14px 28px;
35
  display: flex;
36
+ align-items: center;
37
  flex-wrap: wrap;
38
  gap: 14px;
39
  }
40
+ .header .brand {
41
  flex: 0 0 auto;
42
  font-size: 17px;
 
43
  font-weight: 650;
44
  letter-spacing: 0.2px;
45
  white-space: nowrap;
46
+ color: #fff;
47
+ text-decoration: none;
48
  }
49
+ .header .brand:hover { opacity: 0.88; }
50
  .header .sub { flex: 1 1 280px; min-width: 0; font-size: 12.5px; opacity: 0.85; }
51
 
52
  .layout { display: flex; flex: 1; min-width: 0; min-height: 0; }
 
116
 
117
  .card {
118
  background: var(--card); border: 1px solid var(--line);
119
+ border-radius: 10px; padding: 18px 20px; margin-bottom: 16px;
120
+ box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
121
  }
122
  .card h3 { margin: 0 0 4px; font-size: 15px; }
123
  .card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
 
140
  justify-content: center;
141
  padding: 0 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
142
  line-height: 1.2;
143
+ transition: background-color 0.15s ease;
144
  }
145
  button.primary:hover { background: var(--maroon-dark); }
146
  button.primary:disabled { background: #c9ccd1; cursor: not-allowed; }
 
153
  box-sizing: border-box;
154
  }
155
  a.google-btn:hover { background: var(--maroon-dark); }
156
+ button.ghost, a.ghost {
157
  background: none; border: 1px solid var(--line); color: var(--ink);
158
  min-height: var(--control-height);
159
  display: inline-flex;
160
  align-items: center;
161
  justify-content: center;
162
  padding: 0 14px; border-radius: 8px; font: inherit; cursor: pointer;
163
+ line-height: 1.2; text-decoration: none;
164
+ transition: border-color 0.15s ease, color 0.15s ease;
165
  }
166
+ button.ghost:hover, a.ghost:hover { border-color: var(--maroon); color: var(--maroon); }
167
  button.linkish {
168
  background: none; border: none; color: var(--maroon);
169
  font: inherit; cursor: pointer; padding: 0; text-decoration: underline;
 
274
  overflow-wrap: anywhere;
275
  }
276
  table.docs td.score { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
277
+ table.docs tbody tr:hover td { background: var(--bg); }
278
 
279
  .stat-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
280
  .stat {
 
304
  .small { font-size: 12.5px; }
305
  .mt { margin-top: 12px; }
306
 
307
+ /* ---------- header nav + auth ---------- */
308
+ .header-nav {
309
+ margin-left: auto; display: flex; align-items: center; gap: 14px; color: #fff;
310
+ flex-wrap: wrap;
311
  }
312
+ .header-link {
313
+ background: none; border: none; padding: 0;
314
+ color: rgba(255, 255, 255, 0.82); font: inherit; font-size: 13px;
315
+ cursor: pointer; text-decoration: none; transition: color 0.15s ease;
316
+ }
317
+ .header-link:hover { color: #fff; text-decoration: underline; }
318
+ .header-link.current { color: #fff; font-weight: 600; }
319
  .header-btn {
320
  background: rgba(255, 255, 255, 0.12); color: #fff;
321
  border: 1px solid rgba(255, 255, 255, 0.45);
322
  padding: 5px 14px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer;
323
+ text-decoration: none; transition: background-color 0.15s ease;
324
  }
325
  .header-btn:hover { background: rgba(255, 255, 255, 0.22); }
326
 
 
403
  align-items: flex-start;
404
  gap: 2px 12px;
405
  }
406
+ .header .brand { font-size: 16px; }
407
+ .header-nav { gap: 10px 14px; }
408
  .header .sub {
409
  flex: 1 1 210px;
410
  font-size: 12px;
 
488
  .stat-grid { grid-template-columns: 1fr; }
489
  }
490
 
491
+ /* ---------- empty state (no projects yet) ---------- */
492
+ .empty-state {
493
+ text-align: center;
494
+ max-width: 560px;
495
+ margin: 48px auto 0;
496
+ padding: 36px 28px 28px;
497
+ }
498
+ .empty-state h3 { font-size: 17px; }
499
+ .empty-state .hint { font-size: 13px; }
500
+ .empty-actions {
501
+ display: flex; gap: 16px; align-items: center; justify-content: center;
502
+ flex-wrap: wrap; margin: 18px 0 16px;
503
+ }
504
+
505
+ .ghost-link { color: var(--maroon); font-weight: 600; text-decoration: none; }
506
+ .ghost-link:hover { text-decoration: underline; }
507
+
508
  /* ------------------------------------------------------------- welcome */
509
  .welcome { padding-top: 1.2rem; }
510
+ .welcome-hero { padding: 26px 28px; }
511
+ .welcome-hero h2 { margin: 0 0 .6rem; font-size: 1.5rem; }
512
  .welcome-hero p { max-width: 62ch; }
513
  .welcome-cta {
514
+ display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
515
  margin: 1.1rem 0 .6rem;
516
  }
517
  .welcome-cta .ghost-link { font-size: .95rem; }