- Merge Economics + Update Data into single Admin tab with sub-nav (Economics | Update Data | Access Log) - Add Economics tab: per-market financial metrics parsed from Box MD files, card grid matching Markets dashboard style, drill-in detail view for key characteristics; admin-only - Add Access Log: DB migration (003_access_log), login events recorded in auth.js, admin endpoint + frontend table showing user/action/IP/timestamp - Fix deliverable downloads: copy PDFs/XLSXs to clients/adeo/deliverables/ and update deliverables.json paths to container-accessible locations - Patch gap analysis: extract gaps from Question_XX_Analysis.md files in Box for all 8 markets (90 questions patched) - Mobile: fix card grid minmax, modal max-width uses min(740px,90vw) - Loading: replace invisible auth-loading with visible spinner overlay - Add economic.json with key metrics for all 8 markets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
716 lines
38 KiB
HTML
716 lines
38 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Maturity Tool</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>
|
|
<style>
|
|
/* ── CSS Variables — Dark (default) ── */
|
|
:root {
|
|
--bg: #111111;
|
|
--bg-card: #1c1c1c;
|
|
--bg-modal: #1a1a1a;
|
|
--bg-input: #1c1c1c;
|
|
--bg-inset: #111111;
|
|
--border: #262626;
|
|
--border-sub: #1e1e1e;
|
|
--text: #f3f4f6;
|
|
--text-sub: #9ca3af;
|
|
--text-muted: #6b7280;
|
|
--text-faint: #4b5563;
|
|
--scrolltrack: #1a1a1a;
|
|
--scrollthumb: #3a3a3a;
|
|
--header-bg: #111111;
|
|
--header-bdr: #1e1e1e;
|
|
--shadow: none;
|
|
--accent: #78BE20;
|
|
}
|
|
|
|
/* ── CSS Variables — Light ── */
|
|
body.light {
|
|
--bg: #f4f4f5;
|
|
--bg-card: #ffffff;
|
|
--bg-modal: #ffffff;
|
|
--bg-input: #f9fafb;
|
|
--bg-inset: #f4f4f5;
|
|
--border: #e4e4e7;
|
|
--border-sub: #f0f0f0;
|
|
--text: #111111;
|
|
--text-sub: #52525b;
|
|
--text-muted: #71717a;
|
|
--text-faint: #a1a1aa;
|
|
--scrolltrack: #e4e4e7;
|
|
--scrollthumb: #d4d4d8;
|
|
--header-bg: #ffffff;
|
|
--header-bdr: #e4e4e7;
|
|
--shadow: 0 1px 3px rgba(0,0,0,0.08);
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
transition: background 0.2s, color 0.2s;
|
|
margin: 0;
|
|
}
|
|
|
|
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
::-webkit-scrollbar-track { background: var(--scrolltrack); }
|
|
::-webkit-scrollbar-thumb { background: var(--scrollthumb); border-radius: 3px; }
|
|
|
|
/* ── Tabs ── */
|
|
.tab-btn {
|
|
padding: 10px 20px; font-size: 14px; font-weight: 500;
|
|
color: var(--text-muted); border-bottom: 2px solid transparent;
|
|
cursor: pointer; transition: color 0.2s, border-color 0.2s;
|
|
white-space: nowrap; background: none;
|
|
border-top: none; border-left: none; border-right: none;
|
|
}
|
|
.tab-btn:hover { color: var(--text); }
|
|
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
|
|
|
|
/* ── Panel ── */
|
|
.panel {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 20px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
/* ── Section header ── */
|
|
.section-header {
|
|
font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
|
|
text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
|
|
}
|
|
|
|
/* ── Badge ── */
|
|
.badge {
|
|
display: inline-block; font-size: 10px; font-weight: 700;
|
|
letter-spacing: 0.06em; text-transform: uppercase;
|
|
padding: 2px 8px; border-radius: 4px;
|
|
}
|
|
|
|
/* ── Score level badge colours ── */
|
|
.score-1 { background: #C62828; color: #fff; }
|
|
.score-2 { background: #E65100; color: #fff; }
|
|
.score-3 { background: #2E7D32; color: #fff; }
|
|
.score-4 { background: #1B5E20; color: #fff; }
|
|
|
|
.score-bg-1 { background: rgba(198,40,40,0.15); border: 1px solid rgba(198,40,40,0.35); }
|
|
.score-bg-2 { background: rgba(230,81,0,0.15); border: 1px solid rgba(230,81,0,0.35); }
|
|
.score-bg-3 { background: rgba(46,125,50,0.15); border: 1px solid rgba(46,125,50,0.35); }
|
|
.score-bg-4 { background: rgba(27,94,32,0.15); border: 1px solid rgba(27,94,32,0.35); }
|
|
body.light .score-bg-1 { background: #FFEBEE; border-color: #C62828; }
|
|
body.light .score-bg-2 { background: #FFF3E0; border-color: #E65100; }
|
|
body.light .score-bg-3 { background: #E8F5E9; border-color: #2E7D32; }
|
|
body.light .score-bg-4 { background: #F1F8E9; border-color: #1B5E20; }
|
|
|
|
/* ── Entity cards ── */
|
|
.entity-card {
|
|
background: var(--bg-card); border: 1px solid var(--border);
|
|
border-radius: 10px; padding: 18px; cursor: pointer;
|
|
transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.entity-card:hover {
|
|
border-color: var(--accent); transform: translateY(-1px);
|
|
box-shadow: 0 4px 14px rgba(0,0,0,0.18);
|
|
}
|
|
|
|
/* ── Client cards (home screen) ── */
|
|
.client-card {
|
|
background: var(--bg-card); border: 1px solid var(--border);
|
|
border-radius: 12px; padding: 28px; cursor: pointer;
|
|
transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.client-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
|
|
|
|
/* ── Pillar mini-bars ── */
|
|
.pillar-bar-track { height: 4px; border-radius: 2px; background: var(--border); margin-top: 3px; }
|
|
.pillar-bar-fill { height: 4px; border-radius: 2px; background: var(--accent); transition: width 0.6s ease; }
|
|
|
|
/* ── Pillar accordion (entity detail) ── */
|
|
.pillar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
|
|
.pillar-card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; transition: background 0.15s; }
|
|
.pillar-card-header:hover { background: var(--bg-inset); }
|
|
.pillar-card-body { display: none; border-top: 1px solid var(--border); }
|
|
.pillar-card.open .pillar-card-body { display: block; }
|
|
.pillar-chevron { transition: transform 0.2s; color: var(--text-muted); flex-shrink: 0; }
|
|
.pillar-card.open .pillar-chevron { transform: rotate(180deg); }
|
|
|
|
/* ── Question rows ── */
|
|
.question-row {
|
|
display: flex; align-items: flex-start; gap: 12px;
|
|
padding: 10px 16px; border-bottom: 1px solid var(--border-sub);
|
|
cursor: pointer; transition: background 0.1s;
|
|
}
|
|
.question-row:last-child { border-bottom: none; }
|
|
.question-row:hover { background: var(--bg-inset); }
|
|
|
|
/* ── Modal ── */
|
|
.modal-overlay {
|
|
position: fixed; inset: 0; z-index: 50;
|
|
background: rgba(0,0,0,0.65);
|
|
display: flex; align-items: center; justify-content: center;
|
|
padding: 16px; overflow-y: auto;
|
|
}
|
|
.modal-overlay.hidden { display: none; }
|
|
.modal-box {
|
|
background: var(--bg-modal); border: 1px solid var(--border);
|
|
border-radius: 12px; width: 100%; max-width: min(740px, 90vw);
|
|
max-height: 90vh; overflow-y: auto;
|
|
padding: 28px; position: relative;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.45);
|
|
}
|
|
|
|
.spec-detail-row {
|
|
display: grid; grid-template-columns: 150px 1fr;
|
|
gap: 8px 16px; padding: 10px 0;
|
|
border-bottom: 1px solid var(--border-sub);
|
|
}
|
|
.spec-detail-row:last-child { border-bottom: none; }
|
|
.spec-detail-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); padding-top: 2px; }
|
|
.spec-detail-value { font-size: 13px; color: var(--text); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
|
|
.spec-detail-value.empty { color: var(--text-faint); font-style: italic; }
|
|
|
|
/* ── Buttons ── */
|
|
.btn-primary {
|
|
background: var(--accent); color: #111; font-weight: 700;
|
|
padding: 9px 20px; border-radius: 6px; font-size: 13px;
|
|
border: none; cursor: pointer; transition: opacity 0.2s;
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
}
|
|
.btn-primary:hover { opacity: 0.88; }
|
|
.btn-ghost {
|
|
background: transparent; color: var(--text-sub); font-weight: 500;
|
|
padding: 8px 16px; border-radius: 6px; font-size: 13px;
|
|
border: 1px solid var(--border); cursor: pointer; transition: border-color 0.2s, color 0.2s;
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
}
|
|
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
|
|
|
|
/* ── Theme toggle ── */
|
|
.theme-toggle {
|
|
width: 36px; height: 36px; border-radius: 8px;
|
|
border: 1px solid var(--border); background: transparent;
|
|
color: var(--text-muted); display: flex; align-items: center;
|
|
justify-content: center; cursor: pointer; transition: all 0.2s;
|
|
}
|
|
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
|
|
|
|
/* ── Compare table ── */
|
|
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
.compare-table th {
|
|
padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700;
|
|
text-transform: uppercase; letter-spacing: 0.05em;
|
|
color: var(--accent); border-bottom: 2px solid var(--accent);
|
|
background: var(--bg-inset);
|
|
}
|
|
.compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-sub); vertical-align: middle; }
|
|
.compare-table tr:last-child td { border-bottom: none; }
|
|
.compare-table .row-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); width: 190px; }
|
|
.compare-table td.diff-hi { background: rgba(46,125,50,0.1); font-weight: 600; color: var(--text); }
|
|
.compare-table td.diff-lo { background: rgba(198,40,40,0.1); font-weight: 600; color: var(--text); }
|
|
|
|
/* ── Summary stat box ── */
|
|
.stat-box { text-align: center; padding: 12px 16px; }
|
|
.stat-num { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
|
|
.stat-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-top: 4px; }
|
|
|
|
/* ── Toast ── */
|
|
#toast {
|
|
position: fixed; bottom: 24px; right: 24px; z-index: 100;
|
|
background: var(--bg-card); border: 1px solid var(--border);
|
|
border-radius: 8px; padding: 12px 18px;
|
|
font-size: 13px; color: var(--text);
|
|
transform: translateY(80px); opacity: 0;
|
|
transition: all 0.3s ease; pointer-events: none;
|
|
}
|
|
#toast.show { transform: translateY(0); opacity: 1; }
|
|
#toast.success { border-left: 3px solid #34d399; }
|
|
#toast.error { border-left: 3px solid #f87171; }
|
|
|
|
/* ── Cards grid ── */
|
|
.cards-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
|
|
gap: 14px;
|
|
}
|
|
|
|
/* ── Back button row ── */
|
|
.back-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
|
|
|
|
/* ── Fade-up animation ── */
|
|
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
|
|
.fade-up { animation: fadeUp 0.25s ease both; }
|
|
|
|
/* ── Import modal ── */
|
|
.drop-zone {
|
|
border: 2px dashed var(--border); border-radius: 8px;
|
|
padding: 28px 16px; text-align: center; cursor: pointer;
|
|
transition: border-color 0.2s, background 0.2s;
|
|
}
|
|
.drop-zone:hover, .drop-zone.drag-over {
|
|
border-color: var(--accent); background: rgba(120,190,32,0.04);
|
|
}
|
|
.drop-zone.has-file { border-color: var(--accent); }
|
|
.sync-log {
|
|
display: none; margin-top: 14px; padding: 12px 14px;
|
|
background: var(--bg-inset); border: 1px solid var(--border);
|
|
border-radius: 8px; font-family: ui-monospace, monospace;
|
|
font-size: 12px; color: var(--text-sub); white-space: pre-wrap;
|
|
max-height: 220px; overflow-y: auto; line-height: 1.5;
|
|
}
|
|
.field-label {
|
|
font-size: 11px; font-weight: 700; text-transform: uppercase;
|
|
letter-spacing: 0.06em; color: var(--text-muted);
|
|
display: block; margin-bottom: 6px;
|
|
}
|
|
select.field-select {
|
|
width: 100%; padding: 8px 10px; background: var(--bg-input);
|
|
border: 1px solid var(--border); border-radius: 6px;
|
|
color: var(--text); font-size: 13px; outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
select.field-select:focus { border-color: var(--accent); }
|
|
/* ── New client card ── */
|
|
.new-client-card {
|
|
background: transparent; border: 2px dashed var(--border);
|
|
border-radius: 12px; padding: 28px; cursor: pointer;
|
|
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
gap: 8px; transition: border-color 0.2s, background 0.2s; min-height: 180px;
|
|
}
|
|
.new-client-card:hover { border-color: var(--accent); background: var(--bg-inset); }
|
|
/* ── Wizard inputs ── */
|
|
.wizard-input {
|
|
width: 100%; padding: 9px 11px; background: var(--bg-input);
|
|
border: 1px solid var(--border); border-radius: 6px;
|
|
color: var(--text); font-size: 13px; outline: none; transition: border-color 0.2s;
|
|
}
|
|
.wizard-input:focus { border-color: var(--accent); }
|
|
.wizard-input::placeholder { color: var(--text-faint); }
|
|
|
|
/* Home screen tabs */
|
|
.home-tab-btn {
|
|
background:none; border:none; padding:10px 18px; font-size:14px; font-weight:600;
|
|
color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent;
|
|
margin-bottom:-2px; transition:color 0.15s, border-color 0.15s;
|
|
}
|
|
.home-tab-btn:hover { color:var(--text); }
|
|
.home-tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); }
|
|
|
|
/* About page */
|
|
.about-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
|
|
@media(max-width:700px){ .about-grid { grid-template-columns:1fr; } }
|
|
.about-card { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:20px 22px; }
|
|
.about-pillar-row { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--border-sub); }
|
|
.about-pillar-row:last-child { border-bottom:none; }
|
|
.level-row { display:flex; gap:12px; align-items:flex-start; padding:8px 0; border-bottom:1px solid var(--border-sub); }
|
|
.level-row:last-child { border-bottom:none; }
|
|
|
|
/* Sort/group controls */
|
|
.ctrl-btn {
|
|
font-size:12px; font-weight:600; padding:5px 12px; border-radius:6px;
|
|
border:1px solid var(--border); background:var(--bg-card); color:var(--text-sub); cursor:pointer;
|
|
}
|
|
.ctrl-btn.active { background:var(--accent); color:#fff; border-color:var(--accent); }
|
|
.ctrl-select {
|
|
font-size:12px; padding:5px 10px; border-radius:6px; border:1px solid var(--border);
|
|
background:var(--bg-card); color:var(--text); cursor:pointer; outline:none;
|
|
}
|
|
|
|
/* Heatmap */
|
|
.heatmap-table { width:100%; border-collapse:collapse; font-size:13px; }
|
|
.heatmap-table th { padding:10px 14px; font-size:11px; font-weight:700; color:var(--text-muted);
|
|
text-transform:uppercase; letter-spacing:0.05em; border-bottom:2px solid var(--border); }
|
|
.heatmap-table td { padding:10px 14px; border-bottom:1px solid var(--border-sub); }
|
|
.heatmap-table tr:hover td { background:var(--bg-inset) !important; }
|
|
.heatmap-cell { border-radius:6px; padding:6px 10px; font-weight:700; font-size:14px; display:inline-block; min-width:44px; text-align:center; }
|
|
|
|
/* Data quality flag indicators */
|
|
.entity-flag-badge {
|
|
font-size: 10px; font-weight: 700; color: #E65100;
|
|
background: rgba(230,81,0,0.1); border: 1px solid rgba(230,81,0,0.25);
|
|
border-radius: 4px; padding: 2px 6px; white-space: nowrap; cursor: help;
|
|
}
|
|
body.light .entity-flag-badge {
|
|
background: #FFF3E0; border-color: rgba(230,81,0,0.35);
|
|
}
|
|
.flag-banner {
|
|
display: flex; align-items: flex-start; gap: 10px;
|
|
background: rgba(230,81,0,0.08); border: 1px solid rgba(230,81,0,0.25);
|
|
border-radius: 8px; padding: 10px 14px; margin-bottom: 16px;
|
|
font-size: 13px; color: #E65100;
|
|
}
|
|
body.light .flag-banner {
|
|
background: #FFF3E0; border-color: rgba(230,81,0,0.4);
|
|
}
|
|
/* ── Login screen ── */
|
|
#loginScreen {
|
|
position: fixed; inset: 0; z-index: 100;
|
|
display: flex; align-items: center; justify-content: center;
|
|
background: var(--bg);
|
|
}
|
|
.login-card {
|
|
width: 100%; max-width: 380px;
|
|
background: var(--bg-card); border: 1px solid var(--border);
|
|
border-radius: 12px; padding: 28px 28px 24px; box-shadow: var(--shadow);
|
|
}
|
|
.login-card h1 {
|
|
font-size: 18px; font-weight: 700; color: var(--text);
|
|
margin: 0 0 4px;
|
|
}
|
|
.login-card .login-sub {
|
|
font-size: 12px; color: var(--text-muted); margin: 0 0 20px;
|
|
}
|
|
.login-card .field-label { display: block; margin-bottom: 6px; }
|
|
.login-card .field-input {
|
|
width: 100%; box-sizing: border-box; margin-bottom: 14px;
|
|
padding: 9px 11px; font-size: 13px;
|
|
background: var(--bg-input); color: var(--text);
|
|
border: 1px solid var(--border); border-radius: 6px;
|
|
outline: none;
|
|
}
|
|
.login-card .field-input:focus { border-color: var(--accent); }
|
|
.login-card .login-error {
|
|
font-size: 12px; color: #E65100;
|
|
background: rgba(230,81,0,0.08); border: 1px solid rgba(230,81,0,0.25);
|
|
border-radius: 6px; padding: 8px 10px; margin-bottom: 12px;
|
|
display: none;
|
|
}
|
|
.login-card .login-error.show { display: block; }
|
|
.login-card .login-submit {
|
|
width: 100%; padding: 10px; font-size: 13px; font-weight: 600;
|
|
background: var(--accent); color: #111; border: none; border-radius: 6px;
|
|
cursor: pointer; transition: opacity 0.15s;
|
|
}
|
|
.login-card .login-submit:hover { opacity: 0.9; }
|
|
.login-card .login-submit:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
.login-card .login-divider {
|
|
display: flex; align-items: center; gap: 10px;
|
|
margin: 18px 0 14px; color: var(--text-faint); font-size: 11px;
|
|
text-transform: uppercase; letter-spacing: 0.08em;
|
|
}
|
|
.login-card .login-divider::before,
|
|
.login-card .login-divider::after {
|
|
content: ''; flex: 1; height: 1px; background: var(--border-sub);
|
|
}
|
|
.login-card .msft-btn {
|
|
width: 100%; padding: 9px; font-size: 13px;
|
|
background: var(--bg-input); color: var(--text-muted);
|
|
border: 1px solid var(--border); border-radius: 6px;
|
|
cursor: not-allowed; display: flex; align-items: center; justify-content: center; gap: 8px;
|
|
}
|
|
.login-card .msft-btn:disabled { opacity: 0.7; }
|
|
/* Hide admin-only UI when body has the role-user class */
|
|
body.role-user .admin-only { display: none !important; }
|
|
/* Loading spinner shown while auth check resolves */
|
|
body.auth-loading #appLoader { display: flex; }
|
|
#appLoader {
|
|
display: none; position: fixed; inset: 0; z-index: 9999;
|
|
background: var(--bg); align-items: center; justify-content: center; flex-direction: column; gap: 16px;
|
|
}
|
|
#appLoader .loader-ring {
|
|
width: 44px; height: 44px; border-radius: 50%;
|
|
border: 3px solid var(--border); border-top-color: var(--accent);
|
|
animation: spin 0.7s linear infinite;
|
|
}
|
|
#appLoader .loader-txt { font-size: 13px; color: var(--text-sub); }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
</style>
|
|
</head>
|
|
<body class="auth-loading">
|
|
|
|
<!-- ══ APP LOADER ═══════════════════════════════════════════════════════════ -->
|
|
<div id="appLoader">
|
|
<div class="loader-ring"></div>
|
|
<div class="loader-txt">Loading…</div>
|
|
</div>
|
|
|
|
<!-- ══ LOGIN SCREEN ══════════════════════════════════════════════════════════ -->
|
|
<div id="loginScreen" style="display:none;">
|
|
<div class="login-card">
|
|
<h1>Sign in</h1>
|
|
<p class="login-sub">Maturity Tool</p>
|
|
<div id="loginError" class="login-error"></div>
|
|
<form id="loginForm" autocomplete="on">
|
|
<label class="field-label" for="loginEmail">Email</label>
|
|
<input id="loginEmail" class="field-input" type="email" name="email" autocomplete="username" required>
|
|
<label class="field-label" for="loginPassword">Password</label>
|
|
<input id="loginPassword" class="field-input" type="password" name="password" autocomplete="current-password" required>
|
|
<button type="submit" id="loginSubmit" class="login-submit">Sign in</button>
|
|
</form>
|
|
<div class="login-divider">or</div>
|
|
<button type="button" class="msft-btn" disabled title="Coming soon">
|
|
<svg width="14" height="14" viewBox="0 0 23 23" aria-hidden="true">
|
|
<rect x="1" y="1" width="10" height="10" fill="#F25022"/>
|
|
<rect x="12" y="1" width="10" height="10" fill="#7FBA00"/>
|
|
<rect x="1" y="12" width="10" height="10" fill="#00A4EF"/>
|
|
<rect x="12" y="12" width="10" height="10" fill="#FFB900"/>
|
|
</svg>
|
|
Sign in with Microsoft (coming soon)
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ══ HEADER ══════════════════════════════════════════════════════════════ -->
|
|
<header style="background:var(--header-bg);border-bottom:1px solid var(--header-bdr);position:sticky;top:0;z-index:40;padding:16px 24px;box-shadow:var(--shadow);">
|
|
<div style="max-width:1280px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;">
|
|
<div style="display:flex;align-items:center;gap:14px;">
|
|
<!-- Back to home (shown when inside a client) -->
|
|
<button id="homeBtn" onclick="goHome()" style="display:none;background:none;border:none;cursor:pointer;color:var(--text-muted);padding:4px;border-radius:6px;transition:color 0.2s;" title="All clients">
|
|
<svg width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3 12L12 3l9 9"/><path d="M9 21V12h6v9"/></svg>
|
|
</button>
|
|
<div>
|
|
<h1 style="font-size:17px;font-weight:800;color:var(--text);margin:0;line-height:1.2;" id="headerTitle">Maturity Tool</h1>
|
|
<p style="font-size:12px;color:var(--text-muted);margin:2px 0 0;" id="headerSub">Loading…</p>
|
|
</div>
|
|
</div>
|
|
<div style="display:flex;align-items:center;gap:8px;">
|
|
<span id="userBadge" style="font-size:11px;color:var(--text-muted);display:none;"></span>
|
|
<select id="langToggle" onchange="setLang(this.value)" style="display:none;background:var(--bg-card);border:1px solid var(--border);border-radius:8px;padding:5px 11px;font-size:12px;font-weight:700;letter-spacing:0.06em;color:var(--text-muted);cursor:pointer;transition:all 0.2s;" title="Switch language">
|
|
<option value="en">EN</option>
|
|
<option value="fr">FR</option>
|
|
<option value="es">ES</option>
|
|
<option value="pt">PT</option>
|
|
<option value="it">IT</option>
|
|
<option value="pl">PL</option>
|
|
</select>
|
|
<button class="theme-toggle" onclick="toggleTheme()" id="themeToggle" title="Toggle theme">
|
|
<svg id="iconDark" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>
|
|
<svg id="iconLight" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" style="display:none"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>
|
|
</button>
|
|
<button id="logoutBtn" class="theme-toggle" onclick="logout()" title="Sign out" style="display:none;">
|
|
<svg width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- ══ TAB BAR (shown inside a client) ══════════════════════════════════════ -->
|
|
<div id="tabBar" style="display:none;background:var(--header-bg);border-bottom:1px solid var(--header-bdr);position:sticky;top:57px;z-index:30;">
|
|
<div style="max-width:1280px;margin:0 auto;padding:0 24px;display:flex;">
|
|
<button class="tab-btn active" id="tab-entities" onclick="showTab('entities')">Markets</button>
|
|
<button class="tab-btn" id="tab-focus" onclick="showTab('focus')">Focus Areas</button>
|
|
<button class="tab-btn" id="tab-compare" onclick="showTab('compare')">Compare</button>
|
|
<button class="tab-btn" id="tab-heatmap" onclick="showTab('heatmap')">Heatmap</button>
|
|
<button class="tab-btn admin-only" id="tab-admin" onclick="showTab('admin')">Admin</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ══ MAIN CONTENT ══════════════════════════════════════════════════════════ -->
|
|
<div style="max-width:1280px;margin:0 auto;padding:24px;">
|
|
|
|
<!-- ── Home screen: client selector ── -->
|
|
<div id="homeScreen">
|
|
<!-- Home tab bar -->
|
|
<div style="display:flex;gap:0;border-bottom:2px solid var(--border);margin-bottom:24px;">
|
|
<button class="home-tab-btn active" id="home-tab-clients" onclick="showHomeTab('clients')">Clients</button>
|
|
<button class="home-tab-btn" id="home-tab-about" onclick="showHomeTab('about')">About this tool</button>
|
|
</div>
|
|
<div id="homeTab-clients"><div id="clientCards" class="cards-grid"></div></div>
|
|
<div id="homeTab-about" style="display:none;"></div>
|
|
</div>
|
|
|
|
<!-- ── Client view ── -->
|
|
<div id="clientView" style="display:none;">
|
|
|
|
<!-- Tab: Entities (Markets) -->
|
|
<div id="tab-entities-content">
|
|
<!-- Summary bar -->
|
|
<div class="panel fade-up" id="summaryBar" style="margin-bottom:16px;"></div>
|
|
<!-- Sort/Group controls -->
|
|
<div id="cardControls" style="display:none;margin-bottom:14px;align-items:center;gap:10px;flex-wrap:wrap;"></div>
|
|
<!-- Export row (all entities) -->
|
|
<div id="exportRow" style="display:none;margin-bottom:16px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;">
|
|
<span id="exportAllLabel" style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.07em;color:var(--text-muted);margin-right:4px;">Export all</span>
|
|
<button class="btn-ghost" onclick="exportCsv()" title="Download flat CSV of all entities">
|
|
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
|
CSV
|
|
</button>
|
|
<button class="btn-ghost" onclick="exportXlsx(null)" title="Download formatted Excel workbook">
|
|
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
|
XLSX
|
|
</button>
|
|
</div>
|
|
<!-- Entity cards grid -->
|
|
<div id="entityGrid" class="cards-grid"></div>
|
|
<!-- Entity detail panel (replaces grid) -->
|
|
<div id="detailPanel" style="display:none;"></div>
|
|
</div>
|
|
|
|
<!-- Tab: Focus Areas -->
|
|
<div id="tab-focus-content" style="display:none;"></div>
|
|
|
|
<!-- Tab: Compare -->
|
|
<div id="tab-compare-content" style="display:none;">
|
|
<div class="panel fade-up" id="compareSelector" style="margin-bottom:16px;"></div>
|
|
<div class="panel fade-up" id="compareResult" style="display:none;"></div>
|
|
</div>
|
|
|
|
<!-- Tab: Heatmap -->
|
|
<div id="tab-heatmap-content" style="display:none;">
|
|
<div class="panel fade-up" id="heatmapPanel"></div>
|
|
</div>
|
|
|
|
<!-- Tab: Admin (economics + update data + access log) -->
|
|
<div id="tab-admin-content" style="display:none;">
|
|
|
|
<!-- Admin sub-nav -->
|
|
<div style="display:flex;gap:0;border-bottom:2px solid var(--border);margin-bottom:24px;">
|
|
<button class="home-tab-btn active" id="admin-sub-economics" onclick="showAdminSub('economics')">Economics</button>
|
|
<button class="home-tab-btn" id="admin-sub-update" onclick="showAdminSub('update')">Update Data</button>
|
|
<button class="home-tab-btn" id="admin-sub-access" onclick="showAdminSub('access')">Access Log</button>
|
|
</div>
|
|
|
|
<!-- Sub: Economics -->
|
|
<div id="admin-economics-content">
|
|
<div class="panel fade-up" id="economicPanel"></div>
|
|
</div>
|
|
|
|
<!-- Sub: Update Data -->
|
|
<div id="admin-update-content" style="display:none;">
|
|
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;">
|
|
|
|
<!-- Sync from Box -->
|
|
<div class="panel fade-up">
|
|
<p class="section-header" id="syncTitle">Sync from Box</p>
|
|
<p id="syncDesc" style="font-size:13px;color:var(--text-sub);margin:0 0 14px;line-height:1.65;">
|
|
Re-run the data converter against the current source files in Box.
|
|
</p>
|
|
<div style="margin-bottom:14px;">
|
|
<label class="field-label" id="syncScopeLabel" for="syncEntitySel">Scope</label>
|
|
<select id="syncEntitySel" class="field-select">
|
|
<option value="">All entities</option>
|
|
</select>
|
|
</div>
|
|
<button class="btn-primary" id="syncRunBtn" onclick="runBoxSync()">
|
|
<svg width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"/></svg>
|
|
Sync from Box
|
|
</button>
|
|
<div class="sync-log" id="syncLog"></div>
|
|
</div>
|
|
|
|
<!-- Upload File -->
|
|
<div class="panel fade-up" style="animation-delay:40ms;">
|
|
<p class="section-header" id="uploadTitle">Upload File</p>
|
|
<div style="margin-bottom:14px;">
|
|
<label class="field-label" id="uploadEntityLabel" for="importEntitySel">Entity to update</label>
|
|
<select id="importEntitySel" class="field-select">
|
|
<option value="">-- Select entity --</option>
|
|
</select>
|
|
</div>
|
|
<div style="margin-bottom:18px;">
|
|
<label class="field-label" id="uploadFileLabel">File (CSV or XLSX)</label>
|
|
<div class="drop-zone" id="dropZone"
|
|
onclick="document.getElementById('importFileInput').click()"
|
|
ondragover="event.preventDefault();this.classList.add('drag-over')"
|
|
ondragleave="this.classList.remove('drag-over')"
|
|
ondrop="handleFileDrop(event)">
|
|
<input type="file" id="importFileInput" accept=".csv,.xlsx,.xls" style="display:none;" onchange="onFileSelected(this.files[0])">
|
|
<svg width="26" height="26" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" style="color:var(--text-muted);margin-bottom:10px;display:block;margin-left:auto;margin-right:auto;"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
|
|
<p id="dropZoneText" style="font-size:13px;color:var(--text-muted);margin:0;line-height:1.4;">Drop a CSV or XLSX here, or click to browse</p>
|
|
</div>
|
|
</div>
|
|
<div style="display:flex;gap:10px;align-items:center;flex-wrap:wrap;">
|
|
<button class="btn-primary" id="importRunBtn" onclick="runFileImport()">
|
|
<svg width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
|
|
Import
|
|
</button>
|
|
<span id="uploadNote" style="font-size:11px;color:var(--text-muted);">Updates scores only — preserves entity name & metadata</span>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Activity log -->
|
|
<div style="margin-top:24px;">
|
|
<button id="activityToggleBtn" onclick="toggleActivity()" style="background:rgba(0,204,223,0.08);border:1.5px solid var(--accent);border-radius:6px;padding:7px 18px;font-size:13px;color:var(--accent);cursor:pointer;display:inline-flex;align-items:center;gap:8px;font-weight:600;">
|
|
<svg width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>
|
|
Activity
|
|
</button>
|
|
<div id="activityPanel" style="display:none;margin-top:14px;">
|
|
<div class="panel fade-up" style="padding:0;overflow:hidden;">
|
|
<div style="display:flex;align-items:center;justify-content:space-between;padding:12px 16px 0;">
|
|
<span style="font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted);">Import & Sync History</span>
|
|
<button onclick="activityLoaded=false;loadActivity();" style="background:none;border:none;cursor:pointer;color:var(--text-muted);padding:4px;display:flex;align-items:center;gap:5px;font-size:12px;" title="Refresh">
|
|
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"/></svg>
|
|
Refresh
|
|
</button>
|
|
</div>
|
|
<div id="activityContent" style="padding:12px 16px 16px;font-size:13px;color:var(--text-muted);">Loading…</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Sub: Access Log -->
|
|
<div id="admin-access-content" style="display:none;">
|
|
<div class="panel fade-up" style="padding:0;overflow:hidden;">
|
|
<div style="display:flex;align-items:center;justify-content:space-between;padding:14px 16px;">
|
|
<span style="font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted);">Login & Access History</span>
|
|
<button onclick="loadAccessLog(true)" style="background:none;border:none;cursor:pointer;color:var(--text-muted);padding:4px;display:flex;align-items:center;gap:5px;font-size:12px;" title="Refresh">
|
|
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"/></svg>
|
|
Refresh
|
|
</button>
|
|
</div>
|
|
<div id="accessLogContent" style="padding:0 16px 16px;font-size:13px;color:var(--text-muted);">Loading…</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- ══ WIZARD MODAL ═════════════════════════════════════════════════════════ -->
|
|
<div id="wizardModal" class="modal-overlay hidden" onclick="handleWizardOverlayClick(event)">
|
|
<div class="modal-box" style="max-width:540px;" onclick="event.stopPropagation()">
|
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;">
|
|
<div>
|
|
<h2 style="font-size:17px;font-weight:700;color:var(--text);margin:0;">New Client Setup</h2>
|
|
<p id="wizardStepLabel" style="font-size:12px;color:var(--text-muted);margin:4px 0 0;"></p>
|
|
</div>
|
|
<button onclick="closeWizard()" style="background:none;border:none;cursor:pointer;color:var(--text-muted);padding:4px;flex-shrink:0;" title="Close">
|
|
<svg width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
</button>
|
|
</div>
|
|
<div id="wizardDots" style="display:flex;gap:4px;align-items:center;margin-bottom:24px;"></div>
|
|
<div id="wizardBody"></div>
|
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:24px;padding-top:16px;border-top:1px solid var(--border);">
|
|
<button id="wizardBackBtn" class="btn-ghost" onclick="wizardBack()">← Back</button>
|
|
<button id="wizardNextBtn" class="btn-primary" onclick="wizardNext()">Next →</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ══ QUESTION MODAL ════════════════════════════════════════════════════════ -->
|
|
<div id="questionModal" class="modal-overlay hidden" onclick="handleModalOverlayClick(event)">
|
|
<div class="modal-box" onclick="event.stopPropagation()">
|
|
<div style="display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px;">
|
|
<div style="padding-right:32px;flex:1;">
|
|
<div id="qModalBadges" style="display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px;"></div>
|
|
<h2 id="qModalTitle" style="font-size:17px;font-weight:700;color:var(--text);margin:0;line-height:1.4;"></h2>
|
|
<p id="qModalMeta" style="font-size:12px;color:var(--text-muted);margin:5px 0 0;"></p>
|
|
</div>
|
|
<button onclick="closeModal()" style="background:none;border:none;cursor:pointer;color:var(--text-muted);padding:4px;flex-shrink:0;" title="Close">
|
|
<svg width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
</button>
|
|
</div>
|
|
<div id="qModalBody"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ══ TOAST ═════════════════════════════════════════════════════════════════ -->
|
|
<div id="toast"></div>
|
|
|
|
<script src="i18n/ui.js"></script>
|
|
<script src="script.js?v=2"></script>
|
|
</body>
|
|
</html>
|