Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,17 +38,16 @@ from charts import (
|
|
| 38 |
CSS = """
|
| 39 |
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Nunito:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
|
| 40 |
|
| 41 |
-
/* Variables — Stormy Morning & Ink Wash */
|
| 42 |
:root {
|
| 43 |
-
--bg: #FFFFE3;
|
| 44 |
-
--card: #FFFFFF;
|
| 45 |
-
--border: #BDDDFC;
|
| 46 |
-
--text: #
|
| 47 |
-
--dim: #
|
| 48 |
-
--primary: #269ccc;
|
| 49 |
-
--pos: #88BDF2;
|
| 50 |
-
--neg: #6A89A7;
|
| 51 |
-
--neu: #CBCBCB;
|
| 52 |
--tag-bg: #BDDDFC;
|
| 53 |
--tag-text: #384959;
|
| 54 |
--green: #16a34a;
|
|
@@ -59,7 +58,6 @@ CSS = """
|
|
| 59 |
--shadow-md: 0 4px 14px rgba(38,156,204,0.14), 0 1px 3px rgba(0,0,0,0.05);
|
| 60 |
}
|
| 61 |
|
| 62 |
-
/* Base */
|
| 63 |
html, body {
|
| 64 |
background: var(--bg) !important;
|
| 65 |
color: var(--text) !important;
|
|
@@ -78,7 +76,6 @@ div[class*="block"], div[class*="wrap"],
|
|
| 78 |
div[class*="panel"], div[class*="gap"],
|
| 79 |
.gap { background: transparent !important; border: none !important; }
|
| 80 |
|
| 81 |
-
/* Cards / Groups */
|
| 82 |
.gr-group, .gr-box, .vv-section {
|
| 83 |
background: var(--card) !important;
|
| 84 |
border: 1px solid var(--border) !important;
|
|
@@ -87,7 +84,6 @@ div[class*="panel"], div[class*="gap"],
|
|
| 87 |
box-shadow: var(--shadow-sm) !important;
|
| 88 |
}
|
| 89 |
|
| 90 |
-
/* Tabs */
|
| 91 |
.tab-nav button {
|
| 92 |
background: transparent !important;
|
| 93 |
border: none !important;
|
|
@@ -106,7 +102,6 @@ div[class*="panel"], div[class*="gap"],
|
|
| 106 |
}
|
| 107 |
.tab-nav { border-bottom: 1px solid var(--border) !important; }
|
| 108 |
|
| 109 |
-
/* Inputs */
|
| 110 |
input[type="text"], input[type="password"], input[type="number"], textarea, select {
|
| 111 |
background: #FFFFE3 !important;
|
| 112 |
border: 1.5px solid var(--border) !important;
|
|
@@ -120,7 +115,10 @@ input:focus, textarea:focus, select:focus {
|
|
| 120 |
box-shadow: 0 0 0 3px rgba(38,156,204,0.15) !important;
|
| 121 |
outline: none !important;
|
| 122 |
}
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
| 124 |
color: var(--dim) !important;
|
| 125 |
font-family: 'DM Sans', sans-serif !important;
|
| 126 |
font-size: 0.75rem !important;
|
|
@@ -129,10 +127,8 @@ label, .gr-label, span.svelte-1b6s6s {
|
|
| 129 |
font-weight: 600 !important;
|
| 130 |
}
|
| 131 |
|
| 132 |
-
/* Slider */
|
| 133 |
input[type="range"] { accent-color: var(--primary); }
|
| 134 |
|
| 135 |
-
/* Buttons */
|
| 136 |
button.primary, button[variant="primary"], .primary {
|
| 137 |
background: linear-gradient(135deg, var(--primary), #1a7faa) !important;
|
| 138 |
border: none !important;
|
|
@@ -153,7 +149,6 @@ button.secondary {
|
|
| 153 |
}
|
| 154 |
button:hover { opacity: 0.88; transform: translateY(-1px); transition: all 0.15s; }
|
| 155 |
|
| 156 |
-
/* Dropdowns */
|
| 157 |
.dropdown, ul[role="listbox"], li[role="option"] {
|
| 158 |
background: #FFFFE3 !important;
|
| 159 |
border-color: var(--border) !important;
|
|
@@ -161,7 +156,6 @@ button:hover { opacity: 0.88; transform: translateY(-1px); transition: all 0.15s
|
|
| 161 |
}
|
| 162 |
li[role="option"]:hover { background: var(--primary-light) !important; }
|
| 163 |
|
| 164 |
-
/* Dataframe */
|
| 165 |
.gr-dataframe, table {
|
| 166 |
background: var(--card) !important;
|
| 167 |
border-radius: 10px !important;
|
|
@@ -186,7 +180,6 @@ li[role="option"]:hover { background: var(--primary-light) !important; }
|
|
| 186 |
}
|
| 187 |
.gr-dataframe tr:hover td { background: var(--primary-light) !important; }
|
| 188 |
|
| 189 |
-
/* Accordion */
|
| 190 |
details > summary {
|
| 191 |
color: var(--dim) !important;
|
| 192 |
font-family: 'DM Sans', sans-serif !important;
|
|
@@ -197,217 +190,268 @@ details > summary {
|
|
| 197 |
}
|
| 198 |
details[open] > summary { color: var(--primary) !important; }
|
| 199 |
|
| 200 |
-
/* Plot containers */
|
| 201 |
.js-plotly-plot, .plotly { background: transparent !important; }
|
| 202 |
.modebar { display: none !important; }
|
| 203 |
|
| 204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
::-webkit-scrollbar { width: 6px; height: 6px; }
|
| 206 |
::-webkit-scrollbar-track { background: var(--bg); }
|
| 207 |
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
| 208 |
::-webkit-scrollbar-thumb:hover { background: var(--dim); }
|
| 209 |
|
| 210 |
|
| 211 |
-
/* Shared HTML component classes */
|
| 212 |
-
|
| 213 |
.vv-hero {
|
| 214 |
-
font-family: 'Nunito', sans-serif;
|
| 215 |
-
font-size: 1.7rem;
|
| 216 |
-
font-weight: 800;
|
| 217 |
background: linear-gradient(135deg, #269ccc, #88BDF2);
|
| 218 |
-
-webkit-background-clip: text;
|
| 219 |
-
-webkit-text-fill-color: transparent;
|
| 220 |
-
background-clip: text;
|
| 221 |
-
letter-spacing: -0.02em;
|
| 222 |
-
line-height: 1.2;
|
| 223 |
}
|
|
|
|
| 224 |
.vv-section-title {
|
| 225 |
-
font-family: 'DM Sans', sans-serif;
|
| 226 |
-
font-size: 0.68rem;
|
| 227 |
-
font-weight: 700;
|
| 228 |
-
letter-spacing: 0.16em;
|
| 229 |
-
text-transform: uppercase;
|
| 230 |
-
color:
|
| 231 |
-
margin-bottom: 0.5rem;
|
| 232 |
-
margin-top: 0;
|
| 233 |
}
|
| 234 |
|
| 235 |
-
/* ─── Metric cards: 4-column grid with hover-lift ─────────────────────────── */
|
| 236 |
.vv-metric-grid {
|
| 237 |
-
display: grid;
|
| 238 |
-
grid-template-columns: repeat(4, 1fr);
|
| 239 |
-
gap: 10px;
|
| 240 |
-
margin: 0.5rem 0 1rem;
|
| 241 |
}
|
| 242 |
.vv-metric-card {
|
| 243 |
-
background: #FFFFFF;
|
| 244 |
-
border: 1.5px solid #BDDDFC;
|
| 245 |
-
border-radius: 14px;
|
| 246 |
-
padding: 1rem 0.7rem;
|
| 247 |
-
text-align: center;
|
| 248 |
-
cursor: default;
|
| 249 |
-
transition: all 0.22s ease;
|
| 250 |
-
box-shadow: 0 1px 4px rgba(189,221,252,0.25);
|
| 251 |
-
position: relative;
|
| 252 |
-
overflow: hidden;
|
| 253 |
}
|
| 254 |
.vv-metric-card::before {
|
| 255 |
-
content: '';
|
| 256 |
-
position: absolute;
|
| 257 |
-
top: 0; left: 0; right: 0;
|
| 258 |
-
height: 3px;
|
| 259 |
-
background: linear-gradient(90deg, #269ccc, #88BDF2);
|
| 260 |
-
opacity: 0;
|
| 261 |
-
transition: opacity 0.22s ease;
|
| 262 |
}
|
| 263 |
.vv-metric-card:hover {
|
| 264 |
-
transform: translateY(-4px);
|
| 265 |
-
box-shadow: 0 10px 26px rgba(38,156,204,0.2);
|
| 266 |
-
border-color: #269ccc;
|
| 267 |
}
|
| 268 |
-
.vv-metric-card:hover::before { opacity: 1; }
|
| 269 |
.vv-metric-icon {
|
| 270 |
-
font-size: 1.4rem;
|
| 271 |
-
margin-bottom: 4px;
|
| 272 |
-
display: block;
|
| 273 |
}
|
| 274 |
.vv-metric-value {
|
| 275 |
-
font-family: 'Nunito', sans-serif;
|
| 276 |
-
font-size: 1.25rem;
|
| 277 |
-
font-weight: 800;
|
| 278 |
-
color: #269ccc;
|
| 279 |
-
margin: 0;
|
| 280 |
-
line-height: 1.2;
|
|
|
|
| 281 |
}
|
| 282 |
.vv-metric-label {
|
| 283 |
-
font-family: 'DM Sans', sans-serif;
|
| 284 |
-
font-size: 0.62rem;
|
| 285 |
-
font-weight: 600;
|
| 286 |
-
letter-spacing: 0.1em;
|
| 287 |
-
text-transform: uppercase;
|
| 288 |
-
color: #
|
| 289 |
-
|
|
|
|
| 290 |
}
|
| 291 |
|
| 292 |
-
/* Video info grid */
|
| 293 |
.vv-info-grid {
|
| 294 |
-
display: grid;
|
| 295 |
-
grid-template-columns: 1fr 1fr;
|
| 296 |
-
gap: 8px;
|
| 297 |
-
margin: 0.5rem 0;
|
| 298 |
}
|
| 299 |
.vv-info-item {
|
| 300 |
-
background: #FFFFE3;
|
| 301 |
-
border: 1px solid #BDDDFC;
|
| 302 |
-
border-radius: 9px;
|
| 303 |
-
padding: 0.55rem 0.75rem;
|
| 304 |
}
|
| 305 |
.vv-info-label {
|
| 306 |
-
display: block;
|
| 307 |
-
font-family: 'DM Sans', sans-serif;
|
| 308 |
-
font-size: 0.62rem;
|
| 309 |
-
font-weight: 700;
|
| 310 |
-
letter-spacing: 0.12em;
|
| 311 |
-
text-transform: uppercase;
|
| 312 |
-
color: #
|
| 313 |
-
|
|
|
|
| 314 |
}
|
| 315 |
.vv-info-value {
|
| 316 |
-
display: block;
|
| 317 |
-
font-family: 'DM Sans', sans-serif;
|
| 318 |
-
font-size: 0.82rem;
|
| 319 |
-
font-weight: 600;
|
| 320 |
-
color: #
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
|
|
|
| 324 |
}
|
| 325 |
|
| 326 |
-
/* Tags — chips in Stormy Light */
|
| 327 |
.vv-tags-grid {
|
| 328 |
-
display: flex;
|
| 329 |
-
flex-wrap: wrap;
|
| 330 |
-
gap: 5px;
|
| 331 |
-
margin-top: 0.4rem;
|
| 332 |
}
|
| 333 |
.vv-tag {
|
| 334 |
-
display: inline-block;
|
| 335 |
-
background: #BDDDFC;
|
| 336 |
-
border: 1px solid #9dcbf7;
|
| 337 |
-
border-radius: 20px;
|
| 338 |
-
padding: 3px 12px;
|
| 339 |
-
font-family: 'DM Sans', sans-serif;
|
| 340 |
-
font-size: 0.7rem;
|
| 341 |
-
font-weight: 600;
|
| 342 |
-
color: #384959;
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
|
|
|
| 346 |
|
| 347 |
.vv-card {
|
| 348 |
-
background: #FFFFFF;
|
| 349 |
-
border: 1px solid #BDDDFC;
|
| 350 |
-
border-radius: 12px;
|
| 351 |
-
padding: 1rem 1.1rem;
|
| 352 |
-
margin-bottom: 0.7rem;
|
| 353 |
-
box-shadow: 0 1px 4px rgba(189,221,252,0.2);
|
| 354 |
}
|
| 355 |
.vv-badge-green {
|
| 356 |
-
display: inline-block;
|
| 357 |
-
background: #dcfce7;
|
| 358 |
-
border: 1.5px solid #16a34a;
|
| 359 |
-
color: #15803d;
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
font-
|
| 364 |
-
font-
|
|
|
|
| 365 |
}
|
| 366 |
.vv-badge-red {
|
| 367 |
-
display: inline-block;
|
| 368 |
-
background: #fee2e2;
|
| 369 |
-
border: 1.5px solid #dc2626;
|
| 370 |
-
color: #b91c1c;
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
font-
|
| 375 |
-
font-
|
|
|
|
| 376 |
}
|
| 377 |
.vv-badge-amber {
|
| 378 |
-
display: inline-block;
|
| 379 |
-
background: #fef3c7;
|
| 380 |
-
border: 1.5px solid #d97706;
|
| 381 |
-
color: #b45309;
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
font-
|
| 386 |
-
font-
|
|
|
|
| 387 |
}
|
| 388 |
.vv-reasoning {
|
| 389 |
-
background: #fefce8;
|
| 390 |
-
border-left: 3px solid #d97706;
|
| 391 |
-
padding: 0.8rem 1rem;
|
| 392 |
-
border-radius: 0 10px 10px 0;
|
| 393 |
-
font-size: 0.83rem;
|
| 394 |
-
color: #78350f;
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
.vv-stat-big-pos {
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
.vv-
|
| 410 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
"""
|
| 412 |
|
| 413 |
|
|
@@ -418,12 +462,12 @@ def _empty_plotly(msg: str = "Run analysis to see data", h: int = 230):
|
|
| 418 |
import plotly.graph_objects as go
|
| 419 |
fig = go.Figure()
|
| 420 |
fig.update_layout(
|
| 421 |
-
paper_bgcolor="rgba(255,255,227,0)", plot_bgcolor="rgba(
|
| 422 |
-
font=dict(color="#
|
| 423 |
)
|
| 424 |
fig.add_annotation(
|
| 425 |
text=msg, x=0.5, y=0.5, xref="paper", yref="paper",
|
| 426 |
-
showarrow=False, font=dict(size=12, color="#
|
| 427 |
)
|
| 428 |
return fig
|
| 429 |
|
|
|
|
| 38 |
CSS = """
|
| 39 |
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Nunito:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
|
| 40 |
|
|
|
|
| 41 |
:root {
|
| 42 |
+
--bg: #FFFFE3;
|
| 43 |
+
--card: #FFFFFF;
|
| 44 |
+
--border: #BDDDFC;
|
| 45 |
+
--text: #2d2d2d;
|
| 46 |
+
--dim: #555555;
|
| 47 |
+
--primary: #269ccc;
|
| 48 |
+
--pos: #88BDF2;
|
| 49 |
+
--neg: #6A89A7;
|
| 50 |
+
--neu: #CBCBCB;
|
| 51 |
--tag-bg: #BDDDFC;
|
| 52 |
--tag-text: #384959;
|
| 53 |
--green: #16a34a;
|
|
|
|
| 58 |
--shadow-md: 0 4px 14px rgba(38,156,204,0.14), 0 1px 3px rgba(0,0,0,0.05);
|
| 59 |
}
|
| 60 |
|
|
|
|
| 61 |
html, body {
|
| 62 |
background: var(--bg) !important;
|
| 63 |
color: var(--text) !important;
|
|
|
|
| 76 |
div[class*="panel"], div[class*="gap"],
|
| 77 |
.gap { background: transparent !important; border: none !important; }
|
| 78 |
|
|
|
|
| 79 |
.gr-group, .gr-box, .vv-section {
|
| 80 |
background: var(--card) !important;
|
| 81 |
border: 1px solid var(--border) !important;
|
|
|
|
| 84 |
box-shadow: var(--shadow-sm) !important;
|
| 85 |
}
|
| 86 |
|
|
|
|
| 87 |
.tab-nav button {
|
| 88 |
background: transparent !important;
|
| 89 |
border: none !important;
|
|
|
|
| 102 |
}
|
| 103 |
.tab-nav { border-bottom: 1px solid var(--border) !important; }
|
| 104 |
|
|
|
|
| 105 |
input[type="text"], input[type="password"], input[type="number"], textarea, select {
|
| 106 |
background: #FFFFE3 !important;
|
| 107 |
border: 1.5px solid var(--border) !important;
|
|
|
|
| 115 |
box-shadow: 0 0 0 3px rgba(38,156,204,0.15) !important;
|
| 116 |
outline: none !important;
|
| 117 |
}
|
| 118 |
+
|
| 119 |
+
label:not(.vv-metric-label):not(.vv-info-label),
|
| 120 |
+
.gr-label,
|
| 121 |
+
span.svelte-1b6s6s {
|
| 122 |
color: var(--dim) !important;
|
| 123 |
font-family: 'DM Sans', sans-serif !important;
|
| 124 |
font-size: 0.75rem !important;
|
|
|
|
| 127 |
font-weight: 600 !important;
|
| 128 |
}
|
| 129 |
|
|
|
|
| 130 |
input[type="range"] { accent-color: var(--primary); }
|
| 131 |
|
|
|
|
| 132 |
button.primary, button[variant="primary"], .primary {
|
| 133 |
background: linear-gradient(135deg, var(--primary), #1a7faa) !important;
|
| 134 |
border: none !important;
|
|
|
|
| 149 |
}
|
| 150 |
button:hover { opacity: 0.88; transform: translateY(-1px); transition: all 0.15s; }
|
| 151 |
|
|
|
|
| 152 |
.dropdown, ul[role="listbox"], li[role="option"] {
|
| 153 |
background: #FFFFE3 !important;
|
| 154 |
border-color: var(--border) !important;
|
|
|
|
| 156 |
}
|
| 157 |
li[role="option"]:hover { background: var(--primary-light) !important; }
|
| 158 |
|
|
|
|
| 159 |
.gr-dataframe, table {
|
| 160 |
background: var(--card) !important;
|
| 161 |
border-radius: 10px !important;
|
|
|
|
| 180 |
}
|
| 181 |
.gr-dataframe tr:hover td { background: var(--primary-light) !important; }
|
| 182 |
|
|
|
|
| 183 |
details > summary {
|
| 184 |
color: var(--dim) !important;
|
| 185 |
font-family: 'DM Sans', sans-serif !important;
|
|
|
|
| 190 |
}
|
| 191 |
details[open] > summary { color: var(--primary) !important; }
|
| 192 |
|
|
|
|
| 193 |
.js-plotly-plot, .plotly { background: transparent !important; }
|
| 194 |
.modebar { display: none !important; }
|
| 195 |
|
| 196 |
+
.js-plotly-plot text,
|
| 197 |
+
.js-plotly-plot .gtitle,
|
| 198 |
+
.js-plotly-plot .xtitle,
|
| 199 |
+
.js-plotly-plot .ytitle,
|
| 200 |
+
.js-plotly-plot .xtick text,
|
| 201 |
+
.js-plotly-plot .ytick text,
|
| 202 |
+
.js-plotly-plot .legendtext {
|
| 203 |
+
fill: #2d2d2d !important;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
::-webkit-scrollbar { width: 6px; height: 6px; }
|
| 207 |
::-webkit-scrollbar-track { background: var(--bg); }
|
| 208 |
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
| 209 |
::-webkit-scrollbar-thumb:hover { background: var(--dim); }
|
| 210 |
|
| 211 |
|
|
|
|
|
|
|
| 212 |
.vv-hero {
|
| 213 |
+
font-family: 'Nunito', sans-serif !important;
|
| 214 |
+
font-size: 1.7rem !important;
|
| 215 |
+
font-weight: 800 !important;
|
| 216 |
background: linear-gradient(135deg, #269ccc, #88BDF2);
|
| 217 |
+
-webkit-background-clip: text !important;
|
| 218 |
+
-webkit-text-fill-color: transparent !important;
|
| 219 |
+
background-clip: text !important;
|
| 220 |
+
letter-spacing: -0.02em !important;
|
| 221 |
+
line-height: 1.2 !important;
|
| 222 |
}
|
| 223 |
+
|
| 224 |
.vv-section-title {
|
| 225 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 226 |
+
font-size: 0.68rem !important;
|
| 227 |
+
font-weight: 700 !important;
|
| 228 |
+
letter-spacing: 0.16em !important;
|
| 229 |
+
text-transform: uppercase !important;
|
| 230 |
+
color: #2d2d2d !important;
|
| 231 |
+
margin-bottom: 0.5rem !important;
|
| 232 |
+
margin-top: 0 !important;
|
| 233 |
}
|
| 234 |
|
|
|
|
| 235 |
.vv-metric-grid {
|
| 236 |
+
display: grid !important;
|
| 237 |
+
grid-template-columns: repeat(4, 1fr) !important;
|
| 238 |
+
gap: 10px !important;
|
| 239 |
+
margin: 0.5rem 0 1rem !important;
|
| 240 |
}
|
| 241 |
.vv-metric-card {
|
| 242 |
+
background: #FFFFFF !important;
|
| 243 |
+
border: 1.5px solid #BDDDFC !important;
|
| 244 |
+
border-radius: 14px !important;
|
| 245 |
+
padding: 1rem 0.7rem !important;
|
| 246 |
+
text-align: center !important;
|
| 247 |
+
cursor: default !important;
|
| 248 |
+
transition: all 0.22s ease !important;
|
| 249 |
+
box-shadow: 0 1px 4px rgba(189,221,252,0.25) !important;
|
| 250 |
+
position: relative !important;
|
| 251 |
+
overflow: hidden !important;
|
| 252 |
}
|
| 253 |
.vv-metric-card::before {
|
| 254 |
+
content: '' !important;
|
| 255 |
+
position: absolute !important;
|
| 256 |
+
top: 0; left: 0; right: 0 !important;
|
| 257 |
+
height: 3px !important;
|
| 258 |
+
background: linear-gradient(90deg, #269ccc, #88BDF2) !important;
|
| 259 |
+
opacity: 0 !important;
|
| 260 |
+
transition: opacity 0.22s ease !important;
|
| 261 |
}
|
| 262 |
.vv-metric-card:hover {
|
| 263 |
+
transform: translateY(-4px) !important;
|
| 264 |
+
box-shadow: 0 10px 26px rgba(38,156,204,0.2) !important;
|
| 265 |
+
border-color: #269ccc !important;
|
| 266 |
}
|
| 267 |
+
.vv-metric-card:hover::before { opacity: 1 !important; }
|
| 268 |
.vv-metric-icon {
|
| 269 |
+
font-size: 1.4rem !important;
|
| 270 |
+
margin-bottom: 4px !important;
|
| 271 |
+
display: block !important;
|
| 272 |
}
|
| 273 |
.vv-metric-value {
|
| 274 |
+
font-family: 'Nunito', sans-serif !important;
|
| 275 |
+
font-size: 1.25rem !important;
|
| 276 |
+
font-weight: 800 !important;
|
| 277 |
+
color: #269ccc !important;
|
| 278 |
+
margin: 0 !important;
|
| 279 |
+
line-height: 1.2 !important;
|
| 280 |
+
-webkit-text-fill-color: #269ccc !important;
|
| 281 |
}
|
| 282 |
.vv-metric-label {
|
| 283 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 284 |
+
font-size: 0.62rem !important;
|
| 285 |
+
font-weight: 600 !important;
|
| 286 |
+
letter-spacing: 0.1em !important;
|
| 287 |
+
text-transform: uppercase !important;
|
| 288 |
+
color: #555555 !important;
|
| 289 |
+
-webkit-text-fill-color: #555555 !important;
|
| 290 |
+
margin-top: 2px !important;
|
| 291 |
}
|
| 292 |
|
|
|
|
| 293 |
.vv-info-grid {
|
| 294 |
+
display: grid !important;
|
| 295 |
+
grid-template-columns: 1fr 1fr !important;
|
| 296 |
+
gap: 8px !important;
|
| 297 |
+
margin: 0.5rem 0 !important;
|
| 298 |
}
|
| 299 |
.vv-info-item {
|
| 300 |
+
background: #FFFFE3 !important;
|
| 301 |
+
border: 1px solid #BDDDFC !important;
|
| 302 |
+
border-radius: 9px !important;
|
| 303 |
+
padding: 0.55rem 0.75rem !important;
|
| 304 |
}
|
| 305 |
.vv-info-label {
|
| 306 |
+
display: block !important;
|
| 307 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 308 |
+
font-size: 0.62rem !important;
|
| 309 |
+
font-weight: 700 !important;
|
| 310 |
+
letter-spacing: 0.12em !important;
|
| 311 |
+
text-transform: uppercase !important;
|
| 312 |
+
color: #555555 !important;
|
| 313 |
+
-webkit-text-fill-color: #555555 !important;
|
| 314 |
+
margin-bottom: 2px !important;
|
| 315 |
}
|
| 316 |
.vv-info-value {
|
| 317 |
+
display: block !important;
|
| 318 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 319 |
+
font-size: 0.82rem !important;
|
| 320 |
+
font-weight: 600 !important;
|
| 321 |
+
color: #2d2d2d !important;
|
| 322 |
+
-webkit-text-fill-color: #2d2d2d !important;
|
| 323 |
+
white-space: nowrap !important;
|
| 324 |
+
overflow: hidden !important;
|
| 325 |
+
text-overflow: ellipsis !important;
|
| 326 |
}
|
| 327 |
|
|
|
|
| 328 |
.vv-tags-grid {
|
| 329 |
+
display: flex !important;
|
| 330 |
+
flex-wrap: wrap !important;
|
| 331 |
+
gap: 5px !important;
|
| 332 |
+
margin-top: 0.4rem !important;
|
| 333 |
}
|
| 334 |
.vv-tag {
|
| 335 |
+
display: inline-block !important;
|
| 336 |
+
background: #BDDDFC !important;
|
| 337 |
+
border: 1px solid #9dcbf7 !important;
|
| 338 |
+
border-radius: 20px !important;
|
| 339 |
+
padding: 3px 12px !important;
|
| 340 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 341 |
+
font-size: 0.7rem !important;
|
| 342 |
+
font-weight: 600 !important;
|
| 343 |
+
color: #384959 !important;
|
| 344 |
+
-webkit-text-fill-color: #384959 !important;
|
| 345 |
+
transition: background 0.15s, transform 0.12s !important;
|
| 346 |
+
}
|
| 347 |
+
.vv-tag:hover { background: #a5cef8 !important; transform: translateY(-1px) !important; }
|
| 348 |
|
| 349 |
.vv-card {
|
| 350 |
+
background: #FFFFFF !important;
|
| 351 |
+
border: 1px solid #BDDDFC !important;
|
| 352 |
+
border-radius: 12px !important;
|
| 353 |
+
padding: 1rem 1.1rem !important;
|
| 354 |
+
margin-bottom: 0.7rem !important;
|
| 355 |
+
box-shadow: 0 1px 4px rgba(189,221,252,0.2) !important;
|
| 356 |
}
|
| 357 |
.vv-badge-green {
|
| 358 |
+
display: inline-block !important;
|
| 359 |
+
background: #dcfce7 !important;
|
| 360 |
+
border: 1.5px solid #16a34a !important;
|
| 361 |
+
color: #15803d !important;
|
| 362 |
+
-webkit-text-fill-color: #15803d !important;
|
| 363 |
+
border-radius: 20px !important;
|
| 364 |
+
padding: 0.32rem 1.1rem !important;
|
| 365 |
+
font-size: 0.85rem !important;
|
| 366 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 367 |
+
font-weight: 700 !important;
|
| 368 |
}
|
| 369 |
.vv-badge-red {
|
| 370 |
+
display: inline-block !important;
|
| 371 |
+
background: #fee2e2 !important;
|
| 372 |
+
border: 1.5px solid #dc2626 !important;
|
| 373 |
+
color: #b91c1c !important;
|
| 374 |
+
-webkit-text-fill-color: #b91c1c !important;
|
| 375 |
+
border-radius: 20px !important;
|
| 376 |
+
padding: 0.32rem 1.1rem !important;
|
| 377 |
+
font-size: 0.85rem !important;
|
| 378 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 379 |
+
font-weight: 700 !important;
|
| 380 |
}
|
| 381 |
.vv-badge-amber {
|
| 382 |
+
display: inline-block !important;
|
| 383 |
+
background: #fef3c7 !important;
|
| 384 |
+
border: 1.5px solid #d97706 !important;
|
| 385 |
+
color: #b45309 !important;
|
| 386 |
+
-webkit-text-fill-color: #b45309 !important;
|
| 387 |
+
border-radius: 20px !important;
|
| 388 |
+
padding: 0.32rem 1.1rem !important;
|
| 389 |
+
font-size: 0.85rem !important;
|
| 390 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 391 |
+
font-weight: 700 !important;
|
| 392 |
}
|
| 393 |
.vv-reasoning {
|
| 394 |
+
background: #fefce8 !important;
|
| 395 |
+
border-left: 3px solid #d97706 !important;
|
| 396 |
+
padding: 0.8rem 1rem !important;
|
| 397 |
+
border-radius: 0 10px 10px 0 !important;
|
| 398 |
+
font-size: 0.83rem !important;
|
| 399 |
+
color: #78350f !important;
|
| 400 |
+
-webkit-text-fill-color: #78350f !important;
|
| 401 |
+
line-height: 1.65 !important;
|
| 402 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 403 |
+
margin-top: 8px !important;
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
.vv-stat-big-pos {
|
| 407 |
+
font-family: 'Nunito', sans-serif !important;
|
| 408 |
+
font-size: 1.6rem !important;
|
| 409 |
+
font-weight: 800 !important;
|
| 410 |
+
color: #3a8fd1 !important;
|
| 411 |
+
-webkit-text-fill-color: #3a8fd1 !important;
|
| 412 |
+
margin: 0 !important;
|
| 413 |
+
}
|
| 414 |
+
.vv-stat-big-neg {
|
| 415 |
+
font-family: 'Nunito', sans-serif !important;
|
| 416 |
+
font-size: 1.6rem !important;
|
| 417 |
+
font-weight: 800 !important;
|
| 418 |
+
color: #4a6a87 !important;
|
| 419 |
+
-webkit-text-fill-color: #4a6a87 !important;
|
| 420 |
+
margin: 0 !important;
|
| 421 |
+
}
|
| 422 |
+
.vv-stat-big-dim {
|
| 423 |
+
font-family: 'Nunito', sans-serif !important;
|
| 424 |
+
font-size: 1.6rem !important;
|
| 425 |
+
font-weight: 800 !important;
|
| 426 |
+
color: #888888 !important;
|
| 427 |
+
-webkit-text-fill-color: #888888 !important;
|
| 428 |
+
margin: 0 !important;
|
| 429 |
+
}
|
| 430 |
+
.vv-stat-big-green {
|
| 431 |
+
font-family: 'Nunito', sans-serif !important;
|
| 432 |
+
font-size: 1.6rem !important;
|
| 433 |
+
font-weight: 800 !important;
|
| 434 |
+
color: #3a8fd1 !important;
|
| 435 |
+
-webkit-text-fill-color: #3a8fd1 !important;
|
| 436 |
+
margin: 0 !important;
|
| 437 |
+
}
|
| 438 |
+
.vv-stat-big-red {
|
| 439 |
+
font-family: 'Nunito', sans-serif !important;
|
| 440 |
+
font-size: 1.6rem !important;
|
| 441 |
+
font-weight: 800 !important;
|
| 442 |
+
color: #4a6a87 !important;
|
| 443 |
+
-webkit-text-fill-color: #4a6a87 !important;
|
| 444 |
+
margin: 0 !important;
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
.vv-log-line {
|
| 448 |
+
font-size: 0.72rem !important;
|
| 449 |
+
color: #555555 !important;
|
| 450 |
+
-webkit-text-fill-color: #555555 !important;
|
| 451 |
+
font-family: 'JetBrains Mono', monospace !important;
|
| 452 |
+
margin: 2px 0 !important;
|
| 453 |
+
}
|
| 454 |
+
.vv-hr { border: none !important; border-top: 1px solid #BDDDFC !important; margin: 1.1rem 0 !important; }
|
| 455 |
"""
|
| 456 |
|
| 457 |
|
|
|
|
| 462 |
import plotly.graph_objects as go
|
| 463 |
fig = go.Figure()
|
| 464 |
fig.update_layout(
|
| 465 |
+
paper_bgcolor="rgba(255,255,227,0)", plot_bgcolor="rgba(189,221,252,0.13)",
|
| 466 |
+
font=dict(color="#2d2d2d"), margin=dict(l=10, r=10, t=10, b=10), height=h,
|
| 467 |
)
|
| 468 |
fig.add_annotation(
|
| 469 |
text=msg, x=0.5, y=0.5, xref="paper", yref="paper",
|
| 470 |
+
showarrow=False, font=dict(size=12, color="#555555"),
|
| 471 |
)
|
| 472 |
return fig
|
| 473 |
|