feat: dark/light mode + trading console BI + Chart.js local + fix themeScript

- Dark/light mode toggle across all pages (login, dashboard, corporate, admin, BI)
- BI Executive redesigned as permanent dark trading console (Bloomberg-style)
- Floating vertical nav with anchor scroll for mobile navigation
- Chart.js bundled locally (eliminates CDN dependency)
- Chart.js inlined in HTML for guaranteed loading
- Fix: themeScript </script> tag had literal backslash breaking HTML parser
- Fix: each chart wrapped in individual try/catch for graceful degradation
- No-cache headers on BI page to prevent stale HTML
- Robust init that handles DOMContentLoaded already fired

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-15 10:21:05 -05:00
parent ddf016a627
commit 95958e9a96
9 changed files with 547 additions and 47 deletions

View File

@@ -175,6 +175,24 @@ function buildAdminHTML(agentes, admin) {
tbody td { padding: 8px 6px; }
.status-badge { font-size: 10px; padding: 3px 8px; }
}
/* Dark Mode overrides */
[data-theme="dark"] thead th { background: var(--bg); }
[data-theme="dark"] tbody td { border-bottom-color: var(--border); }
[data-theme="dark"] tbody tr:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
[data-theme="dark"] tbody tr:nth-child(even):hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select { background: var(--bg); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .form-group input:disabled { background: var(--border); }
[data-theme="dark"] .btn-cancel { background: var(--bg); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .btn-cancel:hover { background: var(--border); }
[data-theme="dark"] .modal { background: var(--card); }
[data-theme="dark"] .modal-overlay.active { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .btn-emular:hover { background: rgba(63,185,80,0.15); }
[data-theme="dark"] .btn-edit:hover { background: rgba(88,166,255,0.15); }
[data-theme="dark"] .btn-toggle:hover { background: rgba(240,136,62,0.15); }
[data-theme="dark"] .btn-password:hover { background: rgba(188,140,255,0.15); }
</style>
`;