@@ -19,12 +19,8 @@ import { InsightCardBody } from "./insight-card-renderers";
1919import { DashboardLoading } from "./DashboardLoading" ;
2020import { PromptBar } from "./PromptBar" ;
2121
22- // --- Layout type ---
23-
2422type LayoutType = "executive" | "operational" | "analytics" ;
2523
26- // --- Helpers ---
27-
2824function cardBgStyle (
2925 bg : string ,
3026 opacity : number ,
@@ -45,9 +41,7 @@ function cardBgStyle(
4541}
4642
4743// --- Helpers ---
48-
4944const sizeToFr : Record < string , string > = { sm : "1fr" , md : "2fr" , lg : "1fr" } ;
50-
5145function InsightGrid ( {
5246 layout,
5347 shared,
@@ -131,31 +125,29 @@ function ExecutiveLayout({
131125 < div className = "flex flex-col" style = { gapStyle } >
132126 < Card
133127 variant = "glass"
134- className = { `!bg-white flex-1 !gap-4 !pb-0 overflow-hidden ${ shared } ` }
128+ className = { `!bg-white flex-1 !gap-4 !p-8 !pt-10 overflow-hidden ${ shared } ` }
135129 style = { cardBgStyle (
136130 cards . overviewBg ,
137131 cards . overviewOpacity ,
138132 cards . overviewGradient ,
139133 ) }
140134 >
141- < CardHeader className = "!pt-8 !gap-2" >
142- < svg
143- xmlns = "http://www.w3.org/2000/svg"
144- viewBox = "0 0 24 24"
145- fill = "none"
146- stroke = "currentColor"
147- strokeWidth = "1.5"
148- strokeLinecap = "round"
149- strokeLinejoin = "round"
150- className = "size-5 text-foreground"
151- >
152- < path d = "M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.582a.5.5 0 0 1 0 .963L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z" />
153- </ svg >
135+ < CardHeader className = "!p-0 !gap-2" >
136+ < img
137+ src = "/Autopilot_dark.svg"
138+ alt = "Autopilot"
139+ className = "size-5 block dark:hidden"
140+ />
141+ < img
142+ src = "/Autopilot_light.svg"
143+ alt = "Autopilot"
144+ className = "size-5 hidden dark:block"
145+ />
154146 < CardTitle className = "text-sm font-bold tracking-tight" >
155147 Good morning, Peter
156148 </ CardTitle >
157149 </ CardHeader >
158- < CardContent className = "flex-1 flex flex-col !pb -0" >
150+ < CardContent className = "flex-1 flex flex-col !p -0" >
159151 < div >
160152 < p className = "text-4xl font-bold tracking-tight pr-16" >
161153 Loan volume scales as setup time drops by 3.5 days.
@@ -165,37 +157,40 @@ function ExecutiveLayout({
165157 ↑18%.
166158 </ p >
167159 </ div >
168- < div className = "flex-1 relative min-h-0" >
160+ < div className = "flex-1 min-h-0 mt-4 mb-6 relative pl-8 pr-1 " >
169161 < svg
170- viewBox = "0 0 200 60 "
162+ viewBox = "0 0 200 70 "
171163 preserveAspectRatio = "none"
172- className = "absolute inset-0 w-full h-full"
164+ className = "w-full h-full rounded-xl "
173165 fill = "none"
174166 xmlns = "http://www.w3.org/2000/svg"
175167 >
176168 < defs >
177- < linearGradient id = "spark-fill" x1 = "0" y1 = "0" x2 = "0" y2 = "1" >
178- < stop
179- offset = "0%"
180- className = "[stop-color:var(--insight-500)]"
181- stopOpacity = "0.7"
182- />
183- < stop
184- offset = "100%"
185- className = "[stop-color:var(--primary-400)]"
186- stopOpacity = "0"
187- />
188- </ linearGradient >
189- < linearGradient id = "spark-stroke" x1 = "0" y1 = "0" x2 = "1" y2 = "0" >
169+ < linearGradient
170+ id = "overview-spark-fill"
171+ x1 = "0"
172+ y1 = "0"
173+ x2 = "0"
174+ y2 = "1"
175+ >
190176 < stop
191177 offset = "0%"
192- className = "[stop-color:var(--insight-500)]"
178+ style = { {
179+ stopColor : "var(--insight-500)" ,
180+ stopOpacity : 0.15 ,
181+ } }
193182 />
194183 < stop
195184 offset = "100%"
196- className = "[stop-color:var(--primary-400)]"
185+ style = { {
186+ stopColor : "var(--primary-400)" ,
187+ stopOpacity : 0 ,
188+ } }
197189 />
198190 </ linearGradient >
191+ < filter id = "overview-fill-blur" >
192+ < feGaussianBlur stdDeviation = "9" />
193+ </ filter >
199194 </ defs >
200195 { /* Horizontal guide lines */ }
201196 < line
@@ -236,20 +231,63 @@ function ExecutiveLayout({
236231 vectorEffect = "non-scaling-stroke"
237232 strokeDasharray = "4 4"
238233 />
239- { /* Fill area */ }
234+ { /* Fill area with soft edges */ }
240235 < path
241- d = "M0,42 C11,40 22,36 33,34 C44,32 55,38 67,35 C78,32 89,22 100,20 C111,18 122,26 133,24 C144,22 155,14 167,12 C178,10 189,15 200,10 L200,60 L0,60 Z"
242- fill = "url(#spark-fill)"
236+ d = "M0,42 C11,40 22,36 33,34 C44,32 55,38 67,35 C78,32 89,22 100,20 C111,18 122,26 133,24 C144,22 155,14 167,12 C178,10 189,15 200,8 L200,60 L0,60 Z"
237+ fill = "url(#overview-spark-fill)"
238+ filter = "url(#overview-fill-blur)"
243239 />
240+ { /* Line */ }
244241 < path
245- d = "M0,42 C11,40 22,36 33,34 C44,32 55,38 67,35 C78,32 89,22 100,20 C111,18 122,26 133,24 C144,22 155,14 167,12 C178,10 189,15 200,10 "
242+ d = "M0,42 C11,40 22,36 33,34 C44,32 55,38 67,35 C78,32 89,22 100,20 C111,18 122,26 133,24 C144,22 155,14 167,12 C178,10 189,15 200,8 "
246243 className = "stroke-foreground"
247244 strokeWidth = "2"
248245 vectorEffect = "non-scaling-stroke"
249246 strokeLinecap = "round"
250247 fill = "none"
251248 />
252249 </ svg >
250+ { /* Y-axis labels */ }
251+ < span
252+ className = "absolute left-0 text-[10px] text-muted-foreground/50 -translate-y-1/2"
253+ style = { { top : "calc(15 / 70 * 100%)" } }
254+ >
255+ 200
256+ </ span >
257+ < span
258+ className = "absolute left-0 text-[10px] text-muted-foreground/50 -translate-y-1/2"
259+ style = { { top : "calc(25 / 70 * 100%)" } }
260+ >
261+ 150
262+ </ span >
263+ < span
264+ className = "absolute left-0 text-[10px] text-muted-foreground/50 -translate-y-1/2"
265+ style = { { top : "calc(30 / 70 * 100%)" } }
266+ >
267+ 100
268+ </ span >
269+ < span
270+ className = "absolute left-0 text-[10px] text-muted-foreground/50 -translate-y-1/2"
271+ style = { { top : "calc(45 / 70 * 100%)" } }
272+ >
273+ 50
274+ </ span >
275+ { /* Target label */ }
276+ < span
277+ className = "absolute right-0 text-[10px] text-muted-foreground/50 -translate-y-full -mt-0.5"
278+ style = { { top : "calc(25 / 70 * 100%)" } }
279+ >
280+ Target
281+ </ span >
282+ { /* Dot at end of line */ }
283+ < div
284+ className = "absolute size-2 rounded-full bg-foreground"
285+ style = { {
286+ top : "calc(8 / 70 * 100%)" ,
287+ right : "4px" ,
288+ transform : "translate(50%, -50%)" ,
289+ } }
290+ />
253291 </ div >
254292 </ CardContent >
255293 </ Card >
0 commit comments