Platform bundle: marketing publish, IT ops, packaging, agents mesh.
Volledige Foodlinkk Command Center uitbreiding met social automatisering, reclamefolder filters, Proxmox monitoring en documentatie.
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
.mesh-wrap {
|
||||
position: relative;
|
||||
border-radius: 14px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.16);
|
||||
background: radial-gradient(circle at 50% 40%, rgba(255, 215, 0, 0.08), rgba(0, 0, 0, 0.35));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mesh-svg {
|
||||
width: 100%;
|
||||
min-height: 520px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mesh-edge {
|
||||
stroke: rgba(0, 229, 255, 0.42);
|
||||
stroke-width: 1.6;
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.mesh-pulse {
|
||||
stroke: rgba(0, 229, 255, 0.9);
|
||||
stroke-width: 3;
|
||||
stroke-linecap: round;
|
||||
stroke-dasharray: 3 140;
|
||||
animation: mesh-pulse 2.4s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes mesh-pulse {
|
||||
from { stroke-dashoffset: 0; }
|
||||
to { stroke-dashoffset: -286; }
|
||||
}
|
||||
|
||||
.mesh-node { cursor: pointer; }
|
||||
.mesh-node text {
|
||||
font-size: 12px;
|
||||
fill: #e2e8f0;
|
||||
font-weight: 600;
|
||||
text-anchor: middle;
|
||||
}
|
||||
|
||||
.mesh-node circle {
|
||||
fill: #0f172a;
|
||||
stroke: rgba(148, 163, 184, 0.65);
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.mesh-node.healthy circle { stroke: #22c55e; }
|
||||
.mesh-node.warn circle { stroke: #f59e0b; }
|
||||
.mesh-node.idle circle { stroke: #38bdf8; }
|
||||
.mesh-node.offline circle { stroke: #64748b; }
|
||||
|
||||
.mesh-herman circle.main {
|
||||
fill: #111827;
|
||||
stroke: #ffd700;
|
||||
stroke-width: 4;
|
||||
filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
|
||||
}
|
||||
|
||||
.mesh-herman circle.ring {
|
||||
fill: none;
|
||||
stroke: rgba(255, 215, 0, 0.35);
|
||||
stroke-width: 2;
|
||||
stroke-dasharray: 8 4;
|
||||
animation: mesh-herman-ring 7s linear infinite;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
@keyframes mesh-herman-ring {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.mesh-legend {
|
||||
display: flex;
|
||||
gap: 0.8rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.75rem;
|
||||
color: #94a3b8;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
.analytics-shell {
|
||||
display: grid;
|
||||
grid-template-columns: 240px 1fr;
|
||||
gap: 1rem;
|
||||
align-items: start;
|
||||
}
|
||||
.analytics-filters label {
|
||||
display: block;
|
||||
margin-bottom: 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
color: #94a3b8;
|
||||
}
|
||||
.analytics-filters select,
|
||||
.analytics-filters input {
|
||||
width: 100%;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
.analytics-main { min-width: 0; }
|
||||
.analytics-kpis {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.analytics-kpis .kpi-card {
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 10px;
|
||||
background: rgba(15, 23, 42, 0.8);
|
||||
border: 1px solid rgba(148, 163, 184, 0.15);
|
||||
}
|
||||
.analytics-kpis .kpi-card strong {
|
||||
display: block;
|
||||
font-size: 1.35rem;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
.analytics-kpis .kpi-card span {
|
||||
font-size: 0.75rem;
|
||||
color: #64748b;
|
||||
}
|
||||
.analytics-charts {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.chart-panel canvas { max-height: 220px; }
|
||||
.chart-panel h4 { margin: 0 0 0.75rem; font-size: 0.9rem; color: #cbd5e1; }
|
||||
@media (max-width: 900px) {
|
||||
.analytics-shell { grid-template-columns: 1fr; }
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="nl">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{% block title %}{{ page_title }} · Foodlinkk{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/static/css/palantir-theme.css" />
|
||||
<link rel="stylesheet" href="/static/css/pulse-theme.css" />
|
||||
<link rel="stylesheet" href="/static/css/topnav-neo.css?v=2" />
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js"></script>
|
||||
<script defer src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body x-data="{ drawerOpen: false }" :class="{ 'drawer-open': drawerOpen }">
|
||||
<header class="topbar">
|
||||
<div class="topbar-brand">
|
||||
<p class="brand-title">Foodlinkk</p>
|
||||
<p class="brand-name">Command Center</p>
|
||||
</div>
|
||||
|
||||
<nav class="topnav">
|
||||
<a href="/" class="nav-pill nav-pill-herman topnav-herman {% if request.url.path == '/' %}active{% endif %}">
|
||||
Herman
|
||||
</a>
|
||||
|
||||
<div class="topnav-group topnav-group-crm">
|
||||
<span class="topnav-label">CRM</span>
|
||||
<a href="/clients" class="nav-pill nav-pill-clients {% if request.url.path.startswith('/clients') %}active{% endif %}">Clients</a>
|
||||
<a href="/deals" class="nav-pill nav-pill-deals {% if request.url.path.startswith('/deals') %}active{% endif %}">Deals</a>
|
||||
<a href="/products" class="nav-pill nav-pill-products {% if request.url.path.startswith('/products') %}active{% endif %}">Products</a>
|
||||
<a href="/suppliers" class="nav-pill nav-pill-suppliers {% if request.url.path.startswith('/suppliers') %}active{% endif %}">Suppliers</a>
|
||||
</div>
|
||||
|
||||
<div class="topnav-group topnav-group-intel">
|
||||
<span class="topnav-label">Intel</span>
|
||||
<a href="/beurs" class="nav-pill nav-pill-beurs {% if request.url.path.startswith('/beurs') %}active{% endif %}">Beurs Live</a>
|
||||
<a href="/retail" class="nav-pill nav-pill-retail {% if request.url.path.startswith('/retail') %}active{% endif %}">Retail</a>
|
||||
<a href="/browser" class="nav-pill nav-pill-browser {% if request.url.path.startswith('/browser') or request.url.path.startswith('/monitor') %}active{% endif %}">Browser & Monitor</a>
|
||||
<a href="/documents" class="nav-pill nav-pill-documents {% if request.url.path.startswith('/documents') %}active{% endif %}">Documents</a>
|
||||
</div>
|
||||
|
||||
<div class="topnav-group topnav-group-hermes">
|
||||
<span class="topnav-label">Hermes</span>
|
||||
<a href="/hermes" class="nav-pill nav-pill-telegram {% if request.url.path.startswith('/hermes') %}active{% endif %}">Telegram</a>
|
||||
</div>
|
||||
|
||||
<div class="topnav-group topnav-group-agents">
|
||||
<span class="topnav-label">Agents</span>
|
||||
<a href="/agents" class="nav-pill nav-pill-agents {% if request.url.path.startswith('/agents') %}active{% endif %}">Agents</a>
|
||||
<a href="/marketing" class="nav-pill nav-pill-marketing {% if request.url.path.startswith('/marketing') %}active{% endif %}">Marketing</a>
|
||||
<a href="/herman" class="nav-pill nav-pill-chat {% if request.url.path.startswith('/herman') %}active{% endif %}">Chat</a>
|
||||
<a href="/studio" class="nav-pill nav-pill-studio {% if request.url.path.startswith('/studio') %}active{% endif %}">Studio</a>
|
||||
<a href="/reports" class="nav-pill nav-pill-reports {% if request.url.path.startswith('/reports') %}active{% endif %}">Reports</a>
|
||||
</div>
|
||||
|
||||
<div class="topnav-group topnav-group-system">
|
||||
<a href="/analytics" class="nav-pill nav-pill-analytics {% if request.url.path.startswith('/analytics') %}active{% endif %}">Analytics</a>
|
||||
<a href="/voice" class="nav-pill nav-pill-voice {% if request.url.path.startswith('/voice') %}active{% endif %}">Voice</a>
|
||||
<a href="/settings" class="nav-pill nav-pill-settings {% if request.url.path.startswith('/settings') %}active{% endif %}">Settings</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="main-topnav">{% block content %}{% endblock %}</main>
|
||||
|
||||
<script src="/static/js/cockpit.js"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,171 @@
|
||||
/* Beurs & Live Intel page */
|
||||
|
||||
.beurs-shell { max-width: 1400px; margin: 0 auto; }
|
||||
|
||||
.beurs-hero {
|
||||
display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem;
|
||||
background: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(74,222,128,0.08), rgba(251,146,60,0.06));
|
||||
border: 1px solid rgba(56,189,248,0.35);
|
||||
border-radius: 16px; padding: 1.25rem 1.5rem; margin-bottom: 1rem;
|
||||
box-shadow: 0 0 30px rgba(56,189,248,0.08);
|
||||
}
|
||||
.beurs-hero h1 { margin: 0 0 0.35rem; font-size: 1.65rem; color: #f8fafc; }
|
||||
.beurs-hero .hero-sub { color: #94a3b8; margin: 0 0 0.35rem; }
|
||||
.beurs-hero small { color: #64748b; }
|
||||
.beurs-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
|
||||
|
||||
/* Neo tab bar — interactive */
|
||||
.neo-tab-bar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 0;
|
||||
background: rgba(10, 14, 22, 0.9);
|
||||
border: 1px solid rgba(56,189,248,0.2);
|
||||
border-radius: 14px;
|
||||
padding: 0.35rem;
|
||||
margin-bottom: 1.25rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.neo-tab {
|
||||
flex: 1;
|
||||
display: flex; align-items: center; justify-content: center; gap: 0.45rem;
|
||||
padding: 0.75rem 0.5rem;
|
||||
border: none; background: transparent;
|
||||
color: #94a3b8; font-size: 0.82rem; font-weight: 600;
|
||||
cursor: pointer; position: relative; z-index: 1;
|
||||
transition: color 0.25s, transform 0.2s;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
.neo-tab:hover { color: #e2e8f0; transform: translateY(-1px); }
|
||||
.neo-tab.active { color: #f8fafc; text-shadow: 0 0 20px rgba(56,189,248,0.5); }
|
||||
.neo-tab-icon { font-size: 1.1rem; }
|
||||
.neo-tab-badge {
|
||||
background: #fb7185; color: #fff; font-size: 0.6rem;
|
||||
padding: 0.1rem 0.35rem; border-radius: 999px; min-width: 1rem;
|
||||
}
|
||||
.neo-tab-indicator {
|
||||
position: absolute; bottom: 0.35rem; top: 0.35rem;
|
||||
background: linear-gradient(135deg, rgba(56,189,248,0.25), rgba(74,222,128,0.12));
|
||||
border: 1px solid rgba(56,189,248,0.45);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 24px rgba(56,189,248,0.2);
|
||||
transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
pointer-events: none; z-index: 0;
|
||||
}
|
||||
|
||||
.beurs-section { animation: fade-up 0.35s ease; }
|
||||
.section-label {
|
||||
font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
|
||||
color: #94a3b8; display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem;
|
||||
}
|
||||
|
||||
.beurs-summary-row {
|
||||
display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.25rem;
|
||||
}
|
||||
@media (max-width: 800px) { .beurs-summary-row { grid-template-columns: 1fr 1fr; } }
|
||||
.beurs-stat-card {
|
||||
background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255,255,255,0.08);
|
||||
border-radius: 12px; padding: 0.75rem 1rem;
|
||||
}
|
||||
.beurs-stat-card span { display: block; font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em; }
|
||||
.beurs-stat-card strong { font-size: 1.35rem; color: #f8fafc; }
|
||||
.beurs-stat-card strong.up { color: #4ade80; }
|
||||
.beurs-stat-card strong.down { color: #fb7185; }
|
||||
.beurs-stat-card.warn strong { color: #fb923c; }
|
||||
.beurs-stat-card.source-card a { color: #38bdf8; text-decoration: none; font-size: 0.95rem; }
|
||||
.beurs-stat-card.source-card a:hover { text-decoration: underline; }
|
||||
|
||||
.beurs-grid {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.85rem;
|
||||
}
|
||||
.beurs-card {
|
||||
background: linear-gradient(160deg, rgba(13,18,25,0.95), rgba(8,12,18,0.98));
|
||||
border: 1px solid rgba(56,189,248,0.15); border-radius: 14px;
|
||||
padding: 0.85rem 1rem; transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.beurs-card:hover { border-color: rgba(56,189,248,0.4); box-shadow: 0 0 20px rgba(56,189,248,0.1); }
|
||||
.beurs-card.trend-up { border-color: rgba(74,222,128,0.25); }
|
||||
.beurs-card.trend-down { border-color: rgba(251,113,133,0.25); }
|
||||
.beurs-card.unlisted-card { border-color: rgba(148,163,184,0.2); opacity: 0.92; }
|
||||
|
||||
.beurs-card-head { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.35rem; }
|
||||
.beurs-chain-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 0.35rem; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
|
||||
.beurs-card-head strong { display: block; color: #f1f5f9; font-size: 0.95rem; }
|
||||
.beurs-card-head small { color: #64748b; font-size: 0.7rem; }
|
||||
.beurs-pct { margin-left: auto; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 6px; }
|
||||
.beurs-pct.up { color: #4ade80; background: rgba(74,222,128,0.12); }
|
||||
.beurs-pct.down { color: #fb7185; background: rgba(251,113,133,0.12); }
|
||||
.beurs-tag { margin-left: auto; font-size: 0.65rem; padding: 0.15rem 0.4rem; border-radius: 6px; background: rgba(148,163,184,0.15); color: #94a3b8; }
|
||||
|
||||
.beurs-chains { font-size: 0.72rem; color: #64748b; margin-bottom: 0.4rem; }
|
||||
.beurs-price { font-size: 1.2rem; font-weight: 700; color: #f8fafc; margin-bottom: 0.35rem; }
|
||||
.beurs-price small { font-size: 0.65rem; color: #94a3b8; margin-left: 0.25rem; }
|
||||
.market-state { font-size: 0.6rem; color: #4ade80; margin-left: 0.5rem; text-transform: uppercase; }
|
||||
.beurs-spark { width: 100%; height: 30px; display: block; margin: 0.25rem 0; }
|
||||
.beurs-eq {
|
||||
display: flex; align-items: flex-end; justify-content: center; gap: 3px;
|
||||
height: 22px; margin: 0.35rem 0;
|
||||
}
|
||||
.beurs-eq span {
|
||||
width: 4px; border-radius: 2px;
|
||||
background: linear-gradient(to top, rgba(56,189,248,0.3), #38bdf8);
|
||||
animation: hmEq 0.55s ease-in-out infinite alternate;
|
||||
}
|
||||
.beurs-eq span:nth-child(odd) { animation-delay: 0.1s; }
|
||||
.beurs-sources { display: flex; justify-content: space-between; align-items: center; margin-top: 0.35rem; }
|
||||
.beurs-sources small { font-size: 0.65rem; color: #64748b; }
|
||||
.unlisted-note { font-size: 0.78rem; color: #94a3b8; margin: 0.35rem 0; }
|
||||
|
||||
.beurs-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
|
||||
@media (max-width: 900px) { .beurs-two-col { grid-template-columns: 1fr; } }
|
||||
.panel-inner {
|
||||
background: rgba(15,23,42,0.6); border: 1px solid rgba(255,255,255,0.06);
|
||||
border-radius: 14px; padding: 1rem 1.15rem;
|
||||
}
|
||||
.panel-inner h2 { margin: 0 0 0.75rem; font-size: 1rem; color: #f1f5f9; }
|
||||
|
||||
.tag { display: inline-block; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em; padding: 0.12rem 0.4rem; border-radius: 4px; margin-bottom: 0.35rem; }
|
||||
.tag-halal { background: rgba(74,222,128,0.15); color: #4ade80; }
|
||||
.tag-dish { background: rgba(56,189,248,0.15); color: #38bdf8; }
|
||||
.tag-trend { background: rgba(251,146,60,0.15); color: #fb923c; }
|
||||
|
||||
.concept-header { margin-bottom: 1rem; }
|
||||
.concept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
|
||||
.concept-card {
|
||||
background: linear-gradient(135deg, rgba(192,132,252,0.08), rgba(56,189,248,0.06));
|
||||
border: 1px solid rgba(192,132,252,0.25); border-radius: 14px; padding: 1rem 1.15rem;
|
||||
}
|
||||
.concept-num { font-size: 0.65rem; color: #c084fc; font-weight: 700; }
|
||||
.concept-card p { color: #e2e8f0; line-height: 1.55; margin: 0.5rem 0; font-size: 0.92rem; }
|
||||
.concept-based small { color: #64748b; font-size: 0.72rem; }
|
||||
|
||||
.events-toolbar { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.75rem; }
|
||||
.events-toolbar select { max-width: 220px; }
|
||||
.events-stream { display: flex; flex-direction: column; gap: 0.35rem; }
|
||||
.event-row {
|
||||
display: grid; grid-template-columns: 52px 100px 1fr 90px 80px; gap: 0.5rem; align-items: center;
|
||||
padding: 0.65rem 0.85rem; border-radius: 10px;
|
||||
background: rgba(15,23,42,0.7); border: 1px solid rgba(255,255,255,0.06);
|
||||
text-decoration: none; color: inherit; transition: all 0.2s;
|
||||
}
|
||||
.event-row:hover {
|
||||
border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.08);
|
||||
transform: translateX(4px);
|
||||
}
|
||||
.event-time { font-size: 0.75rem; color: #64748b; font-variant-numeric: tabular-nums; }
|
||||
.event-agent { font-size: 0.7rem; }
|
||||
.event-title { font-size: 0.85rem; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.event-status { font-size: 0.65rem; text-transform: uppercase; color: #94a3b8; }
|
||||
.event-status.st-needs_approval { color: #fb923c; }
|
||||
.event-status.st-completed { color: #4ade80; }
|
||||
.event-source { font-size: 0.65rem; color: #38bdf8; text-align: right; }
|
||||
@media (max-width: 700px) {
|
||||
.event-row { grid-template-columns: 1fr; gap: 0.25rem; }
|
||||
}
|
||||
|
||||
.topnav-beurs.active { color: #4ade80 !important; text-shadow: 0 0 12px rgba(74,222,128,0.4); }
|
||||
|
||||
@keyframes hmEq {
|
||||
from { height: 20%; opacity: 0.5; }
|
||||
to { height: 90%; opacity: 1; }
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
/* Herman dashboard — Hermes neo style (KPI cards animate, grote panelen vast) */
|
||||
|
||||
.hm-neo { --hm-cyan: #00e5ff; --hm-lime: #b8ff3c; --hm-orange: #ff9f43; --hm-purple: #a855f7; --hm-gold: #ffd700; --hm-panel: #0d1219; --hm-border: rgba(0, 229, 255, 0.12); }
|
||||
|
||||
.herman-shell.hm-neo .herman-hero {
|
||||
background: linear-gradient(160deg, rgba(13, 18, 25, 0.95), rgba(8, 12, 18, 0.98));
|
||||
border: 1px solid var(--hm-border);
|
||||
border-radius: 14px;
|
||||
padding: 1.25rem 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
/* GEEN animatie op hero — vast */
|
||||
}
|
||||
.herman-shell.hm-neo .herman-hero h1 { font-size: 1.65rem; margin: 0; }
|
||||
.herman-shell.hm-neo .hero-sub { color: var(--hm-cyan); opacity: 0.9; }
|
||||
|
||||
/* Dashboard layout sections */
|
||||
.herman-briefing-header {
|
||||
display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
|
||||
margin-bottom: 1.25rem; padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--hm-border);
|
||||
}
|
||||
.herman-briefing-header h2 { margin: 0; }
|
||||
.herman-briefing-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
|
||||
|
||||
.hm-dash-layout { display: flex; flex-direction: column; gap: 1.5rem; }
|
||||
.hm-dash-section { display: flex; flex-direction: column; gap: 0.75rem; }
|
||||
.hm-dash-full { width: 100%; }
|
||||
.hm-section-title {
|
||||
margin: 0; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
|
||||
color: #94a3b8; font-weight: 600; display: flex; align-items: center; gap: 0.5rem;
|
||||
padding-bottom: 0.35rem; border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
}
|
||||
.hm-dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
|
||||
@media (max-width: 900px) { .hm-dash-two-col { grid-template-columns: 1fr; } }
|
||||
|
||||
.briefing-summary-grid {
|
||||
display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem;
|
||||
}
|
||||
.briefing-horizon-col { display: grid; gap: 1rem; }
|
||||
@media (max-width: 900px) { .briefing-summary-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.briefing-card.summary,
|
||||
.horizon-card {
|
||||
background: var(--hm-panel); border-radius: 14px; padding: 1rem;
|
||||
}
|
||||
.briefing-card.summary { border: 1px solid var(--hm-border); }
|
||||
.briefing-card.summary h4,
|
||||
.horizon-card h4 {
|
||||
margin: 0 0 0.65rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
|
||||
}
|
||||
.horizon-card.short { border: 1px solid rgba(255,159,67,0.3); }
|
||||
.horizon-card.short h4 { color: #ff9f43; }
|
||||
.horizon-card.long { border: 1px solid rgba(168,85,247,0.3); }
|
||||
.horizon-card.long h4 { color: #a855f7; }
|
||||
|
||||
.hm-dash-trends-only { margin-top: 0; max-width: 100%; }
|
||||
.hm-dash-trends-only .hm-chart-wrap { height: 180px; }
|
||||
.beurs-cta-panel {
|
||||
display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
|
||||
background: var(--hm-panel); border: 1px solid var(--hm-border); border-radius: 14px; padding: 1rem 1.25rem;
|
||||
}
|
||||
.beurs-mini-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: flex-start; }
|
||||
.beurs-mini-chip {
|
||||
display: inline-block; padding: 0.35rem 0.65rem; border-radius: 8px; text-decoration: none;
|
||||
font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.1); color: #e2e8f0;
|
||||
}
|
||||
.beurs-mini-chip.up { border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); }
|
||||
.beurs-mini-chip.down { border-color: rgba(251,113,133,0.3); background: rgba(251,113,133,0.08); }
|
||||
.beurs-mini-chip strong { color: #f8fafc; }
|
||||
.hm-dash-feed { margin-top: 1rem; }
|
||||
|
||||
.hm-chart-head h4 {
|
||||
margin: 0; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
|
||||
color: #cbd5e1; font-weight: 600;
|
||||
}
|
||||
|
||||
/* Grote briefing panel — VAST, geen beweging */
|
||||
.herman-shell .herman-briefing {
|
||||
position: relative;
|
||||
border-left: 3px solid var(--hm-cyan);
|
||||
animation: none !important;
|
||||
transform: none !important;
|
||||
}
|
||||
.herman-shell .briefing-card,
|
||||
.herman-shell .briefing-chart-panel,
|
||||
.herman-shell .horizon-card,
|
||||
.herman-shell .hub-grid .panel {
|
||||
animation: none !important;
|
||||
}
|
||||
|
||||
/* Neo KPI row — per kaart animatie (Hermes stijl) */
|
||||
.hm-neo-kpi-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 1rem;
|
||||
margin: 1rem 0 1.25rem;
|
||||
}
|
||||
@media (max-width: 1200px) { .hm-neo-kpi-row { grid-template-columns: repeat(3, 1fr); } }
|
||||
@media (max-width: 700px) { .hm-neo-kpi-row { grid-template-columns: 1fr 1fr; } }
|
||||
|
||||
.hm-neo-kpi {
|
||||
position: relative;
|
||||
background: linear-gradient(160deg, rgba(13, 18, 25, 0.95), rgba(8, 12, 18, 0.98));
|
||||
border: 1px solid var(--hm-border);
|
||||
border-radius: 14px;
|
||||
padding: 1rem 1.1rem 0.75rem;
|
||||
overflow: hidden;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.hm-neo-kpi:hover {
|
||||
border-color: rgba(0, 229, 255, 0.35);
|
||||
box-shadow: 0 0 24px rgba(0, 229, 255, 0.1);
|
||||
}
|
||||
.hm-neo-kpi-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }
|
||||
.hm-neo-ring {
|
||||
width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
|
||||
background: conic-gradient(var(--ring-color, var(--hm-cyan)) var(--ring-pct, 75%), rgba(255,255,255,0.06) 0);
|
||||
display: grid; place-items: center;
|
||||
box-shadow: 0 0 14px color-mix(in srgb, var(--ring-color, var(--hm-cyan)) 45%, transparent);
|
||||
animation: hmRingSpin 8s linear infinite;
|
||||
}
|
||||
@keyframes hmRingSpin {
|
||||
0% { filter: brightness(1); }
|
||||
50% { filter: brightness(1.2); }
|
||||
100% { filter: brightness(1); }
|
||||
}
|
||||
.hm-neo-ring-inner {
|
||||
width: 32px; height: 32px; border-radius: 50%;
|
||||
background: var(--hm-panel); display: grid; place-items: center; font-size: 1rem;
|
||||
}
|
||||
.hm-neo-kpi-label { font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: #94a3b8; }
|
||||
.hm-neo-kpi-sub { font-size: 0.72rem; color: #64748b; }
|
||||
.hm-neo-kpi-value { font-size: 1.75rem; font-weight: 700; color: #f1f5f9; line-height: 1.1; }
|
||||
|
||||
.hm-eq {
|
||||
display: flex; align-items: flex-end; justify-content: center; gap: 3px;
|
||||
height: 26px; margin-top: 0.55rem; padding-top: 0.35rem;
|
||||
border-top: 1px solid rgba(255,255,255,0.04);
|
||||
}
|
||||
.hm-eq span {
|
||||
width: 5px; border-radius: 2px;
|
||||
background: linear-gradient(to top, rgba(0,229,255,0.3), var(--hm-cyan));
|
||||
animation: hmEq 0.55s ease-in-out infinite alternate;
|
||||
box-shadow: 0 0 6px rgba(0, 229, 255, 0.35);
|
||||
}
|
||||
.hm-eq span:nth-child(1) { animation-delay: 0s; }
|
||||
.hm-eq span:nth-child(2) { animation-delay: 0.08s; }
|
||||
.hm-eq span:nth-child(3) { animation-delay: 0.16s; }
|
||||
.hm-eq span:nth-child(4) { animation-delay: 0.24s; }
|
||||
.hm-eq span:nth-child(5) { animation-delay: 0.32s; }
|
||||
.hm-eq span:nth-child(6) { animation-delay: 0.12s; }
|
||||
.hm-eq span:nth-child(7) { animation-delay: 0.2s; }
|
||||
.hm-eq span:nth-child(8) { animation-delay: 0.28s; }
|
||||
@keyframes hmEq {
|
||||
from { height: 18%; opacity: 0.45; }
|
||||
to { height: 92%; opacity: 1; }
|
||||
}
|
||||
|
||||
.hm-neo-charts {
|
||||
display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;
|
||||
}
|
||||
@media (max-width: 900px) { .hm-neo-charts { grid-template-columns: 1fr; } }
|
||||
|
||||
.hm-chart-panel {
|
||||
background: var(--hm-panel); border: 1px solid var(--hm-border);
|
||||
border-radius: 14px; padding: 1rem 1.1rem; min-height: 260px;
|
||||
}
|
||||
.hm-chart-head {
|
||||
display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem;
|
||||
}
|
||||
.hm-chart-head h3 {
|
||||
margin: 0; font-size: 0.7rem; letter-spacing: 0.12em;
|
||||
text-transform: uppercase; color: #94a3b8; font-weight: 600;
|
||||
display: flex; align-items: center; gap: 0.5rem;
|
||||
}
|
||||
.hm-live-dot {
|
||||
width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
|
||||
box-shadow: 0 0 8px #22c55e; animation: hmPulse 2s infinite;
|
||||
}
|
||||
@keyframes hmPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
|
||||
.hm-chart-head small { color: #64748b; font-size: 0.7rem; }
|
||||
.hm-chart-wrap { position: relative; height: 200px; }
|
||||
|
||||
.briefing-loading-overlay {
|
||||
position: absolute; inset: 0; background: rgba(10, 14, 20, 0.8);
|
||||
backdrop-filter: blur(4px); display: flex; flex-direction: column;
|
||||
align-items: center; justify-content: center; gap: 1rem; z-index: 20; border-radius: 12px;
|
||||
}
|
||||
.briefing-loading-overlay .loading-dots { display: flex; gap: 0.5rem; }
|
||||
.briefing-loading-overlay .loading-dots span {
|
||||
width: 12px; height: 12px; border-radius: 50%; background: var(--hm-cyan);
|
||||
animation: hmEq 0.8s ease-in-out infinite alternate;
|
||||
}
|
||||
.briefing-loading-overlay .loading-dots span:nth-child(2) { animation-delay: 0.15s; }
|
||||
.briefing-loading-overlay .loading-dots span:nth-child(3) { animation-delay: 0.3s; }
|
||||
|
||||
.briefing-typewriter { color: #f1f5f9; line-height: 1.75; font-size: 1rem; min-height: 3rem; }
|
||||
.horizon-card ul { color: #dce6f0; line-height: 1.65; }
|
||||
.retail-highlight { text-decoration: none; color: inherit; display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--hm-border); }
|
||||
.retail-highlight:hover { background: rgba(0,229,255,0.06); }
|
||||
|
||||
.hub-kpi-row .kpi-card { animation: none !important; }
|
||||
|
||||
/* Agents page */
|
||||
.agents-neo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
|
||||
.agent-soul-card {
|
||||
background: var(--hm-panel); border: 1px solid var(--hm-border); border-radius: 14px;
|
||||
padding: 1rem; cursor: pointer; transition: all 0.2s;
|
||||
}
|
||||
.agent-soul-card:hover { border-color: rgba(0,229,255,0.4); box-shadow: 0 0 20px rgba(0,229,255,0.08); }
|
||||
.agent-soul-card.selected { border-color: var(--hm-gold); }
|
||||
.agent-soul-editor {
|
||||
background: var(--hm-panel); border: 1px solid var(--hm-border); border-radius: 14px;
|
||||
padding: 1.25rem; margin-top: 1rem;
|
||||
}
|
||||
.agent-soul-editor textarea {
|
||||
width: 100%; min-height: 280px; font-family: var(--font-mono); font-size: 0.85rem;
|
||||
background: #060a10; color: #e2e8f0; border: 1px solid var(--hm-border); border-radius: 8px; padding: 0.75rem;
|
||||
}
|
||||
|
||||
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
|
||||
.perm-card {
|
||||
background: var(--hm-panel); border: 1px solid var(--hm-border); border-radius: 10px;
|
||||
padding: 0.85rem; display: flex; justify-content: space-between; align-items: center;
|
||||
}
|
||||
.perm-card.granted { border-color: rgba(34,197,94,0.4); }
|
||||
|
||||
/* CEO market dashboard */
|
||||
.hm-ceo-market-row {
|
||||
display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem;
|
||||
}
|
||||
@media (max-width: 1000px) { .hm-ceo-market-row { grid-template-columns: 1fr; } }
|
||||
|
||||
.hm-stock-grid {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.65rem;
|
||||
}
|
||||
.hm-stock-card {
|
||||
background: rgba(0,0,0,0.25); border: 1px solid var(--hm-border); border-radius: 12px;
|
||||
padding: 0.65rem 0.75rem; transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.hm-stock-card:hover { border-color: rgba(0,229,255,0.35); box-shadow: 0 0 16px rgba(0,229,255,0.08); }
|
||||
.hm-stock-up { border-color: rgba(34,197,94,0.25); }
|
||||
.hm-stock-down { border-color: rgba(251,113,133,0.25); }
|
||||
.hm-stock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.35rem; }
|
||||
.hm-stock-head strong { display: block; font-size: 0.85rem; color: #f1f5f9; }
|
||||
.hm-stock-head small { font-size: 0.65rem; color: #94a3b8; }
|
||||
.hm-stock-pct { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 6px; }
|
||||
.hm-stock-pct.up { color: #4ade80; background: rgba(74,222,128,0.12); }
|
||||
.hm-stock-pct.down { color: #fb7185; background: rgba(251,113,133,0.12); }
|
||||
.hm-stock-price { font-size: 1.15rem; font-weight: 700; color: #f8fafc; margin: 0.35rem 0 0.15rem; }
|
||||
.hm-stock-price small { font-size: 0.65rem; color: #94a3b8; font-weight: 400; }
|
||||
.hm-stock-chain { font-size: 0.65rem; color: #64748b; margin-bottom: 0.35rem; }
|
||||
.hm-spark { width: 100%; height: 36px; display: block; opacity: 0.85; }
|
||||
.hm-eq-down span { background: linear-gradient(to top, rgba(251,113,133,0.3), #fb7185); box-shadow: 0 0 6px rgba(251,113,133,0.35); }
|
||||
|
||||
.hm-highlight-scroll { max-height: 220px; overflow-y: auto; }
|
||||
.hm-highlight-item {
|
||||
padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
}
|
||||
.hm-highlight-item strong { color: #e2e8f0; font-size: 0.85rem; text-decoration: none; }
|
||||
.hm-highlight-item a { color: inherit; text-decoration: none; }
|
||||
.hm-highlight-item a:hover strong { color: var(--hm-cyan); }
|
||||
.hm-highlight-item small { display: block; color: #64748b; font-size: 0.7rem; margin-top: 0.15rem; }
|
||||
.hm-cat-badge {
|
||||
display: inline-block; font-size: 0.55rem; letter-spacing: 0.1em; font-weight: 700;
|
||||
padding: 0.1rem 0.35rem; border-radius: 4px; margin-bottom: 0.25rem;
|
||||
background: rgba(255,159,67,0.15); color: #ff9f43;
|
||||
}
|
||||
.hm-cat-badge.hm-cat-cbs { background: rgba(56,189,248,0.15); color: #38bdf8; }
|
||||
.hm-cat-badge.hm-cat-regelgeving { background: rgba(168,85,247,0.15); color: #a855f7; }
|
||||
|
||||
.hm-neo-kpi-row { grid-template-columns: repeat(6, 1fr); }
|
||||
@media (max-width: 1200px) { .hm-neo-kpi-row { grid-template-columns: repeat(3, 1fr); } }
|
||||
@media (max-width: 640px) { .hm-neo-kpi-row { grid-template-columns: repeat(2, 1fr); } }
|
||||
|
||||
/* Agent animated avatars */
|
||||
.agent-avatar-wrap {
|
||||
position: relative; width: 64px; height: 64px; flex-shrink: 0;
|
||||
}
|
||||
.agent-avatar {
|
||||
width: 64px; height: 64px; border-radius: 50%; position: relative;
|
||||
display: grid; place-items: center; font-size: 1.5rem;
|
||||
box-shadow: 0 0 20px color-mix(in srgb, var(--av-color, #00e5ff) 40%, transparent);
|
||||
animation: agentBob 3s ease-in-out infinite;
|
||||
}
|
||||
.agent-avatar::before {
|
||||
content: ''; position: absolute; inset: -3px; border-radius: 50%;
|
||||
border: 2px solid var(--av-color, #00e5ff); opacity: 0.5;
|
||||
animation: agentPulseRing 2s ease-out infinite;
|
||||
}
|
||||
.agent-face {
|
||||
width: 48px; height: 48px; border-radius: 50%; background: var(--av-color, #00e5ff);
|
||||
position: relative; overflow: hidden;
|
||||
}
|
||||
.agent-face .eye {
|
||||
position: absolute; top: 16px; width: 7px; height: 9px; background: #0a0e14; border-radius: 50%;
|
||||
animation: agentBlink 4s infinite;
|
||||
}
|
||||
.agent-face .eye.left { left: 12px; }
|
||||
.agent-face .eye.right { right: 12px; }
|
||||
.agent-face .mouth {
|
||||
position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
|
||||
width: 14px; height: 7px; border-bottom: 3px solid #0a0e14; border-radius: 0 0 14px 14px;
|
||||
}
|
||||
.agent-face.mood-busy .mouth { width: 10px; height: 3px; border: none; background: #0a0e14; border-radius: 2px; bottom: 12px; }
|
||||
.agent-face.mood-creative .mouth { border-bottom-color: #0a0e14; width: 16px; height: 8px; }
|
||||
|
||||
/* Hair, glasses, gender styles */
|
||||
.agent-face .hair {
|
||||
position: absolute; top: 0; left: 50%; transform: translateX(-50%);
|
||||
width: 90%; height: 22px; border-radius: 50% 50% 0 0;
|
||||
background: #1a1410; z-index: 1;
|
||||
}
|
||||
.agent-face.style-female-long .hair {
|
||||
width: 110%; height: 28px; border-radius: 40% 40% 0 0;
|
||||
background: linear-gradient(180deg, #2d1810, #1a1008);
|
||||
}
|
||||
.agent-face.style-female-long::after {
|
||||
content: ''; position: absolute; top: 18px; left: -4px; width: 12px; height: 22px;
|
||||
background: #2d1810; border-radius: 0 0 50% 50%; z-index: 0;
|
||||
}
|
||||
.agent-face.style-female-bob .hair {
|
||||
width: 100%; height: 20px; background: #3d2817; border-radius: 30% 30% 0 0;
|
||||
}
|
||||
.agent-face.style-male-short .hair {
|
||||
width: 85%; height: 14px; background: #0f0f0f; border-radius: 40% 40% 0 0;
|
||||
}
|
||||
.agent-face.style-male-curl .hair {
|
||||
width: 95%; height: 18px; background: #2a1810;
|
||||
border-radius: 50% 50% 0 0; box-shadow: -6px 2px 0 #2a1810, 6px 2px 0 #2a1810;
|
||||
}
|
||||
.agent-face .glasses {
|
||||
position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
|
||||
width: 34px; height: 10px; border: 2px solid #0a0e14; border-radius: 4px;
|
||||
z-index: 3; box-shadow: -8px 0 0 -2px #0a0e14, 8px 0 0 -2px #0a0e14;
|
||||
}
|
||||
.agent-face.style-female-long .eye { top: 18px; }
|
||||
.agent-face.style-male-glasses .eye { top: 15px; }
|
||||
|
||||
.hm-exec-grid {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.65rem;
|
||||
}
|
||||
.hm-exec-item {
|
||||
display: flex; gap: 0.65rem; align-items: center; padding: 0.75rem;
|
||||
border-radius: 10px; background: rgba(0,0,0,0.25); border: 1px solid rgba(148,163,184,0.1);
|
||||
text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.2s;
|
||||
}
|
||||
.hm-exec-item:hover { border-color: rgba(0,229,255,0.35); transform: translateY(-2px); }
|
||||
.hm-exec-icon { font-size: 1.4rem; }
|
||||
.hm-exec-item strong { display: block; font-size: 0.78rem; color: #94a3b8; font-weight: 600; }
|
||||
.hm-exec-val { font-size: 1.1rem; color: #e2e8f0; font-weight: 700; }
|
||||
.hm-exec-list { margin: 0; padding-left: 1.2rem; color: #cbd5e1; font-size: 0.85rem; }
|
||||
.hm-exec-list a { color: #38bdf8; }
|
||||
.agent-status-dot {
|
||||
position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px;
|
||||
border-radius: 50%; background: #22c55e; border: 2px solid var(--hm-panel);
|
||||
box-shadow: 0 0 8px #22c55e; animation: hmPulse 2s infinite;
|
||||
}
|
||||
@keyframes agentBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
|
||||
@keyframes agentPulseRing { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.15); opacity: 0; } }
|
||||
@keyframes agentBlink { 0%,96%,100% { transform: scaleY(1); } 98% { transform: scaleY(0.1); } }
|
||||
|
||||
.agent-soul-card .agent-role-desc {
|
||||
font-size: 0.82rem; color: #cbd5e1; line-height: 1.5; margin: 0.65rem 0;
|
||||
min-height: 2.5rem;
|
||||
}
|
||||
.agent-soul-card .agent-meta-row {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
font-size: 0.72rem; color: #94a3b8;
|
||||
}
|
||||
.agent-soul-card .agent-tag {
|
||||
display: inline-block; padding: 0.15rem 0.45rem; border-radius: 999px;
|
||||
background: rgba(0,229,255,0.1); color: var(--hm-cyan); font-size: 0.65rem;
|
||||
}
|
||||
.agent-soul-editor .agent-editor-header {
|
||||
display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem;
|
||||
}
|
||||
.agent-soul-editor .agent-editor-header h2 { margin: 0; }
|
||||
@@ -0,0 +1,218 @@
|
||||
/* Hermes Neo Command Center — network monitor aesthetic */
|
||||
.hm-neo { --hm-cyan: #00e5ff; --hm-mag: #ff2d95; --hm-lime: #b8ff3c; --hm-orange: #ff9f43; --hm-purple: #a855f7; --hm-gold: #ffd700; --hm-panel: #0d1219; --hm-border: rgba(0, 229, 255, 0.12); }
|
||||
|
||||
.hm-neo-header h1 { font-size: 1.65rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
|
||||
.hm-neo-header .hm-sub { color: var(--hm-cyan); font-size: 0.85rem; margin: 0.35rem 0 0; opacity: 0.85; }
|
||||
|
||||
/* ── KPI cards (neo style) ── */
|
||||
.hm-neo-kpi-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1rem;
|
||||
margin: 1.25rem 0;
|
||||
}
|
||||
@media (max-width: 1100px) { .hm-neo-kpi-row { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 560px) { .hm-neo-kpi-row { grid-template-columns: 1fr; } }
|
||||
|
||||
.hm-neo-kpi {
|
||||
position: relative;
|
||||
background: linear-gradient(160deg, rgba(13, 18, 25, 0.95), rgba(8, 12, 18, 0.98));
|
||||
border: 1px solid var(--hm-border);
|
||||
border-radius: 14px;
|
||||
padding: 1rem 1.1rem 0.75rem;
|
||||
overflow: hidden;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.hm-neo-kpi:hover { border-color: rgba(0, 229, 255, 0.35); box-shadow: 0 0 24px rgba(0, 229, 255, 0.08); }
|
||||
.hm-neo-kpi.highlight { border-color: var(--hm-gold); box-shadow: 0 0 20px rgba(255, 215, 0, 0.12); }
|
||||
|
||||
.hm-neo-kpi-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
|
||||
.hm-neo-ring {
|
||||
width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
|
||||
background: conic-gradient(var(--ring-color, var(--hm-cyan)) var(--ring-pct, 75%), rgba(255,255,255,0.06) 0);
|
||||
display: grid; place-items: center;
|
||||
box-shadow: 0 0 12px color-mix(in srgb, var(--ring-color, var(--hm-cyan)) 40%, transparent);
|
||||
}
|
||||
.hm-neo-ring-inner {
|
||||
width: 32px; height: 32px; border-radius: 50%;
|
||||
background: var(--hm-panel); display: grid; place-items: center;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.hm-neo-kpi-label { font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: #64748b; }
|
||||
.hm-neo-kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.1; color: #f1f5f9; font-variant-numeric: tabular-nums; }
|
||||
.hm-neo-kpi-sub { font-size: 0.72rem; color: #64748b; margin-top: 0.15rem; }
|
||||
|
||||
/* Animated equalizer bars */
|
||||
.hm-eq {
|
||||
display: flex; align-items: flex-end; justify-content: center; gap: 3px;
|
||||
height: 28px; margin-top: 0.65rem; padding-top: 0.35rem;
|
||||
border-top: 1px solid rgba(255,255,255,0.04);
|
||||
}
|
||||
.hm-eq span {
|
||||
width: 5px; border-radius: 2px;
|
||||
background: linear-gradient(to top, rgba(0,229,255,0.3), var(--hm-cyan));
|
||||
animation: hmEq 0.55s ease-in-out infinite alternate;
|
||||
box-shadow: 0 0 6px rgba(0, 229, 255, 0.35);
|
||||
}
|
||||
.hm-eq span:nth-child(1) { animation-delay: 0s; }
|
||||
.hm-eq span:nth-child(2) { animation-delay: 0.08s; }
|
||||
.hm-eq span:nth-child(3) { animation-delay: 0.16s; }
|
||||
.hm-eq span:nth-child(4) { animation-delay: 0.24s; }
|
||||
.hm-eq span:nth-child(5) { animation-delay: 0.32s; }
|
||||
.hm-eq span:nth-child(6) { animation-delay: 0.12s; }
|
||||
.hm-eq span:nth-child(7) { animation-delay: 0.2s; }
|
||||
.hm-eq span:nth-child(8) { animation-delay: 0.28s; }
|
||||
@keyframes hmEq {
|
||||
from { height: 18%; opacity: 0.45; }
|
||||
to { height: 92%; opacity: 1; }
|
||||
}
|
||||
|
||||
/* ── Chart panels ── */
|
||||
.hm-neo-charts {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
@media (max-width: 900px) { .hm-neo-charts { grid-template-columns: 1fr; } }
|
||||
|
||||
.hm-chart-panel {
|
||||
background: var(--hm-panel);
|
||||
border: 1px solid var(--hm-border);
|
||||
border-radius: 14px;
|
||||
padding: 1rem 1.1rem;
|
||||
min-height: 280px;
|
||||
}
|
||||
.hm-chart-head {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.hm-chart-head h3 {
|
||||
margin: 0; font-size: 0.7rem; letter-spacing: 0.12em;
|
||||
text-transform: uppercase; color: #94a3b8; font-weight: 600;
|
||||
}
|
||||
.hm-chart-head .hm-live-dot {
|
||||
width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
|
||||
box-shadow: 0 0 8px #22c55e; animation: hmPulse 2s infinite;
|
||||
}
|
||||
@keyframes hmPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
|
||||
.hm-chart-head small { color: #475569; font-size: 0.7rem; }
|
||||
.hm-chart-wrap { position: relative; height: 220px; }
|
||||
|
||||
/* ── Tabs ── */
|
||||
.hermes-tabs {
|
||||
display: flex; flex-wrap: wrap; gap: 0.55rem;
|
||||
margin: 0 0 1rem; padding: 0.45rem;
|
||||
background: rgba(8, 12, 18, 0.8);
|
||||
border: 1px solid var(--hm-border);
|
||||
border-radius: 12px;
|
||||
}
|
||||
.hermes-tab {
|
||||
flex: 1 1 auto; min-width: 120px;
|
||||
padding: 0.8rem 1.1rem; font-size: 0.88rem; font-weight: 600;
|
||||
border-radius: 10px; cursor: pointer;
|
||||
border: 1px solid rgba(100, 116, 139, 0.25);
|
||||
background: rgba(15, 23, 42, 0.7); color: #94a3b8;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.hermes-tab:hover { border-color: rgba(0, 229, 255, 0.4); color: #e2e8f0; }
|
||||
.hermes-tab.active {
|
||||
background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(255, 215, 0, 0.08));
|
||||
border-color: var(--hm-gold); color: #fef9c3;
|
||||
box-shadow: 0 0 18px rgba(255, 215, 0, 0.15);
|
||||
}
|
||||
|
||||
/* ── Team roster (no duplicate names) ── */
|
||||
.hm-team { margin-bottom: 1rem; }
|
||||
.hm-team h3 { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; margin: 0 0 0.6rem; }
|
||||
.hm-team-card {
|
||||
display: flex; align-items: center; gap: 0.75rem;
|
||||
padding: 0.65rem 0.85rem; margin-bottom: 0.45rem;
|
||||
background: rgba(13, 18, 25, 0.9);
|
||||
border: 1px solid var(--hm-border);
|
||||
border-radius: 10px;
|
||||
}
|
||||
.hm-team-card.online { border-left: 3px solid #22c55e; }
|
||||
.hm-team-card .hm-role-badge {
|
||||
min-width: 52px; text-align: center;
|
||||
font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em;
|
||||
padding: 0.25rem 0.4rem; border-radius: 6px;
|
||||
}
|
||||
.hm-team-card .hm-role-ceo { background: rgba(255, 215, 0, 0.15); color: var(--hm-gold); border: 1px solid rgba(255,215,0,0.3); }
|
||||
.hm-team-card .hm-role-cto { background: rgba(0, 229, 255, 0.12); color: var(--hm-cyan); border: 1px solid rgba(0,229,255,0.25); }
|
||||
.hm-team-card .hm-person { flex: 1; }
|
||||
.hm-team-card .hm-person strong { display: block; font-size: 0.95rem; color: #f1f5f9; }
|
||||
.hm-team-card .hm-person small { color: #64748b; font-size: 0.72rem; }
|
||||
.hm-team-card .hm-status-dot { width: 10px; height: 10px; border-radius: 50%; }
|
||||
.hm-team-card .hm-status-dot.on { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
|
||||
.hm-team-card .hm-status-dot.off { background: #475569; }
|
||||
|
||||
.hermes-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; }
|
||||
@media (max-width: 900px) { .hermes-grid { grid-template-columns: 1fr; } }
|
||||
.hermes-sidebar { max-height: 72vh; overflow-y: auto; }
|
||||
.hermes-conv-btn {
|
||||
display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left;
|
||||
margin: 0.3rem 0; padding: 0.5rem 0.65rem;
|
||||
background: rgba(13, 18, 25, 0.8); border: 1px solid var(--hm-border);
|
||||
border-radius: 8px; color: #e2e8f0; cursor: pointer;
|
||||
}
|
||||
.hermes-conv-btn.active { border-color: var(--hm-cyan); box-shadow: 0 0 0 1px var(--hm-cyan); }
|
||||
.hermes-conv-btn .conv-role { font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.35rem; border-radius: 4px; }
|
||||
|
||||
.hermes-feed { max-height: 72vh; display: flex; flex-direction: column; }
|
||||
.hermes-messages { overflow-y: auto; flex: 1; padding: 0.5rem; }
|
||||
.hermes-msg {
|
||||
margin-bottom: 0.65rem; padding: 0.6rem 0.8rem; border-radius: 8px;
|
||||
border-left: 3px solid rgba(100,116,139,0.4);
|
||||
background: rgba(13, 18, 25, 0.6);
|
||||
}
|
||||
.hermes-msg.msg-in { border-left-color: var(--hm-cyan); background: rgba(0, 229, 255, 0.04); }
|
||||
.hermes-msg.msg-out { border-left-color: var(--hm-purple); background: rgba(168, 85, 247, 0.05); }
|
||||
.hermes-msg-meta { font-size: 0.72rem; color: #64748b; display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
|
||||
.hermes-msg-body { white-space: pre-wrap; word-break: break-word; font-size: 0.88rem; }
|
||||
|
||||
/* PA live */
|
||||
.hermes-pa-header {
|
||||
display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
|
||||
margin-bottom: 1rem; padding: 0.75rem 1rem;
|
||||
background: rgba(0, 229, 255, 0.05); border: 1px solid var(--hm-border); border-radius: 10px;
|
||||
}
|
||||
.hermes-pa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
|
||||
@media (max-width: 900px) { .hermes-pa-grid { grid-template-columns: 1fr; } }
|
||||
.hermes-pa-slot { border: 1px solid var(--hm-border); border-radius: 10px; overflow: hidden; background: var(--hm-panel); }
|
||||
.hermes-pa-slot.status-loading { border-color: var(--hm-cyan); }
|
||||
.hermes-pa-slot.status-completed { border-color: #22c55e; }
|
||||
.hermes-pa-slot.status-failed { border-color: #ef4444; }
|
||||
.hermes-pa-slot-head { display: flex; justify-content: space-between; padding: 0.5rem 0.75rem; background: rgba(0,0,0,0.3); }
|
||||
.hermes-pa-slot-body { height: 200px; background: #060a10; display: grid; place-items: center; }
|
||||
.hermes-pa-slot-body img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
|
||||
.hermes-pa-placeholder { color: #64748b; font-size: 0.82rem; text-align: center; padding: 1rem; }
|
||||
.hermes-pa-slot-foot { padding: 0.4rem 0.75rem; font-size: 0.72rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
.status-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 0.15rem 0.4rem; border-radius: 4px; }
|
||||
.status-badge.loading { background: rgba(0,229,255,0.15); color: var(--hm-cyan); }
|
||||
.status-badge.completed { background: rgba(34,197,94,0.15); color: #22c55e; }
|
||||
.status-badge.failed { background: rgba(239,68,68,0.12); color: #ef4444; }
|
||||
.status-badge.waiting, .status-badge.idle { background: rgba(100,116,139,0.15); color: #94a3b8; }
|
||||
.status-badge.running, .status-badge.comparing { background: rgba(255,159,67,0.15); color: var(--hm-orange); }
|
||||
|
||||
.hermes-graph-canvas { height: 480px; border: 1px solid var(--hm-border); border-radius: 10px; background: #060a10; }
|
||||
.hermes-search-bar { display: flex; gap: 0.5rem; margin: 1rem 0; }
|
||||
.hermes-search-bar .form-input { flex: 1; }
|
||||
.hermes-search-hit { padding: 0.65rem; border-bottom: 1px solid var(--hm-border); }
|
||||
.hermes-control-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
|
||||
.hermes-info-list { list-style: none; padding: 0; }
|
||||
.hermes-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
|
||||
.tag { padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.78rem; }
|
||||
.tag-ok { background: rgba(34,197,94,0.15); color: #22c55e; }
|
||||
.tag-block { background: rgba(239,68,68,0.12); color: #ef4444; }
|
||||
.tag-pa { background: rgba(168,85,247,0.15); color: var(--hm-purple); }
|
||||
.hermes-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
|
||||
.hermes-events { max-height: 360px; overflow-y: auto; }
|
||||
.hermes-event { padding: 0.45rem 0; border-bottom: 1px solid var(--hm-border); }
|
||||
.panel-header { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; margin-bottom: 0.65rem; }
|
||||
.hermes-select { max-width: 200px; }
|
||||
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
|
||||
.dot-in { background: var(--hm-cyan); }
|
||||
.dot-out { background: var(--hm-purple); }
|
||||
.dot-edge { background: var(--hm-orange); }
|
||||
@@ -0,0 +1,146 @@
|
||||
/**
|
||||
* Foodlinkk Command Center — mobile (Android + iOS)
|
||||
*/
|
||||
:root {
|
||||
--safe-top: env(safe-area-inset-top, 0px);
|
||||
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
||||
--safe-left: env(safe-area-inset-left, 0px);
|
||||
--safe-right: env(safe-area-inset-right, 0px);
|
||||
}
|
||||
|
||||
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
||||
body { overflow-x: hidden; padding-bottom: var(--safe-bottom); }
|
||||
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
min-width: 44px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.25);
|
||||
border-radius: 10px;
|
||||
background: rgba(15, 23, 42, 0.9);
|
||||
color: #e2e8f0;
|
||||
font-size: 1.35rem;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.mobile-nav-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
z-index: 998;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.btn, .btn-sm, .nav-pill, .vtab-btn, .side-nav-btn {
|
||||
min-height: 44px;
|
||||
}
|
||||
.form-input, select, textarea, input {
|
||||
font-size: 16px !important;
|
||||
min-height: 44px;
|
||||
}
|
||||
.main-topnav {
|
||||
padding: 0.75rem;
|
||||
padding-left: max(0.75rem, var(--safe-left));
|
||||
padding-right: max(0.75rem, var(--safe-right));
|
||||
}
|
||||
.page-header { flex-direction: column; align-items: stretch !important; gap: 0.75rem; }
|
||||
.page-header h1 { font-size: 1.35rem !important; }
|
||||
.retail-actions, .herman-briefing-actions {
|
||||
display: flex; flex-wrap: wrap; gap: 0.5rem;
|
||||
}
|
||||
.retail-actions .btn, .herman-briefing-actions .btn {
|
||||
flex: 1 1 calc(50% - 0.25rem); min-width: calc(50% - 0.25rem);
|
||||
}
|
||||
.data-table-wrap, .retail-table-wrap, .panel {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.data-table { min-width: 520px; }
|
||||
.retail-table { min-width: 480px; }
|
||||
.kpi-row, .hm-neo-kpi-row, .hub-kpi-row, .analytics-kpis {
|
||||
grid-template-columns: repeat(2, 1fr) !important;
|
||||
}
|
||||
.hm-exec-grid { grid-template-columns: 1fr !important; }
|
||||
.hm-neo-charts, .analytics-charts, .beurs-two-col { grid-template-columns: 1fr !important; }
|
||||
.vtabs-layout { grid-template-columns: 1fr !important; }
|
||||
.vtabs-nav {
|
||||
flex-direction: row !important;
|
||||
flex-wrap: nowrap !important;
|
||||
overflow-x: auto !important;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
position: relative !important;
|
||||
}
|
||||
.vtabs-nav::before { display: none; }
|
||||
.vtab-btn { flex: 0 0 auto; white-space: nowrap; }
|
||||
.retail-workspace, .retail-workspace.with-filters {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
.retail-sidebar .side-nav {
|
||||
display: flex; flex-direction: row; overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch; gap: 0.35rem;
|
||||
}
|
||||
.retail-sidebar .side-nav-btn { flex: 0 0 auto; white-space: nowrap; }
|
||||
.retail-map { min-height: 280px !important; height: 45vh !important; }
|
||||
.analytics-shell { grid-template-columns: 1fr !important; }
|
||||
.hub-grid, .hm-dash-feed, .grid-2, .briefing-summary-grid, .hm-dash-two-col {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
.agents-neo-grid, .reports-grid, .concept-grid { grid-template-columns: 1fr !important; }
|
||||
[style*="grid-template-columns:1fr 1fr"],
|
||||
[style*="grid-template-columns: 1fr 1fr"],
|
||||
.regs-columns[style*="repeat(3"] { grid-template-columns: 1fr !important; }
|
||||
.regs-columns { flex-direction: column !important; display: flex !important; }
|
||||
.pwa-install-bar { display: flex; }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.mobile-menu-btn { display: inline-flex; }
|
||||
.mobile-nav-overlay { display: block; }
|
||||
body:not(.nav-open) .mobile-nav-overlay { display: none; }
|
||||
.app-shell {
|
||||
grid-template-columns: 1fr !important;
|
||||
display: block !important;
|
||||
}
|
||||
.app-sidebar {
|
||||
position: fixed !important;
|
||||
top: 0; left: 0; bottom: 0;
|
||||
width: min(280px, 88vw);
|
||||
height: 100dvh !important;
|
||||
z-index: 999;
|
||||
transform: translateX(-105%);
|
||||
transition: transform 0.3s ease;
|
||||
box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
|
||||
padding-top: max(1rem, var(--safe-top));
|
||||
flex-direction: column !important;
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
body.nav-open .app-sidebar { transform: translateX(0); }
|
||||
body.nav-open { overflow: hidden; }
|
||||
.app-topbar {
|
||||
position: sticky; top: 0; z-index: 100;
|
||||
padding-top: max(0.5rem, var(--safe-top));
|
||||
}
|
||||
.app-topbar .page-tip { display: none; }
|
||||
.app-clock { font-size: 0.72rem; flex: 1; text-align: right; }
|
||||
.retail-actions .btn, .herman-briefing-actions .btn {
|
||||
min-width: 100%; flex: 1 1 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.pwa-install-bar {
|
||||
display: none;
|
||||
position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
|
||||
padding: 0.75rem 1rem;
|
||||
padding-bottom: max(0.75rem, var(--safe-bottom));
|
||||
background: rgba(8, 12, 18, 0.95);
|
||||
border-top: 1px solid rgba(148, 163, 184, 0.15);
|
||||
align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
|
||||
}
|
||||
.pwa-install-bar p { margin: 0; font-size: 0.85rem; color: #cbd5e1; flex: 1; }
|
||||
@media (display-mode: standalone) { .pwa-install-bar { display: none !important; } }
|
||||
@@ -0,0 +1,130 @@
|
||||
.ops-shell {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.ops-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ops-header h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ops-subtitle {
|
||||
color: #93a4b8;
|
||||
margin: 0.25rem 0 0;
|
||||
}
|
||||
|
||||
.ops-kpis {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
|
||||
}
|
||||
|
||||
.ops-kpi {
|
||||
border: 1px solid rgba(120, 170, 255, 0.25);
|
||||
border-radius: 12px;
|
||||
padding: 0.8rem;
|
||||
background: linear-gradient(150deg, rgba(15, 23, 42, 0.95), rgba(17, 30, 53, 0.7));
|
||||
box-shadow: inset 0 0 20px rgba(36, 99, 235, 0.08), 0 0 20px rgba(30, 64, 175, 0.12);
|
||||
}
|
||||
|
||||
.ops-kpi .label {
|
||||
color: #8ba3c4;
|
||||
font-size: 0.78rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.ops-kpi .value {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 700;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
.topology-card {
|
||||
position: relative;
|
||||
border-radius: 14px;
|
||||
border: 1px solid rgba(56, 189, 248, 0.3);
|
||||
background: radial-gradient(circle at top, rgba(21, 43, 77, 0.35), rgba(8, 15, 29, 0.92));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.topology-canvas {
|
||||
width: 100%;
|
||||
min-height: 520px;
|
||||
}
|
||||
|
||||
.topology-lines line {
|
||||
stroke: rgba(59, 130, 246, 0.42);
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.pulse-line {
|
||||
stroke: rgba(56, 189, 248, 0.95);
|
||||
stroke-width: 2.6;
|
||||
stroke-dasharray: 10 14;
|
||||
animation: ops-line-pulse 1.8s linear infinite;
|
||||
filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.85));
|
||||
}
|
||||
|
||||
.ops-node circle {
|
||||
fill: #0f172a;
|
||||
stroke-width: 2.2;
|
||||
}
|
||||
|
||||
.ops-node text {
|
||||
fill: #d9e8ff;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ops-node .sub {
|
||||
fill: #8ea7ca;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.node-proxmox circle {
|
||||
stroke: #f59e0b;
|
||||
filter: drop-shadow(0 0 11px rgba(245, 158, 11, 0.6));
|
||||
}
|
||||
|
||||
.node-vm circle {
|
||||
stroke: #38bdf8;
|
||||
filter: drop-shadow(0 0 9px rgba(56, 189, 248, 0.5));
|
||||
}
|
||||
|
||||
.node-service circle {
|
||||
stroke: #22c55e;
|
||||
filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.45));
|
||||
}
|
||||
|
||||
.status-offline circle {
|
||||
stroke: #ef4444;
|
||||
filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6));
|
||||
}
|
||||
|
||||
.status-degraded circle,
|
||||
.status-unknown circle {
|
||||
stroke: #f59e0b;
|
||||
}
|
||||
|
||||
.ops-meta {
|
||||
color: #8ba3c4;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
@keyframes ops-line-pulse {
|
||||
from {
|
||||
stroke-dashoffset: 26;
|
||||
}
|
||||
to {
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,867 @@
|
||||
@import url('tokens.css');
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 100%;
|
||||
background: var(--bg-root);
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-sans);
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent-cyan);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.layout {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
background: var(--bg-surface);
|
||||
border-right: 1px solid var(--border-subtle);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1.25rem 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.brand {
|
||||
padding: 0 1.25rem 1.5rem;
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.brand-title {
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-muted);
|
||||
margin: 0 0 0.25rem;
|
||||
}
|
||||
|
||||
.brand-name {
|
||||
font-size: 1.05rem;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.nav {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 0.75rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.nav li {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
display: block;
|
||||
padding: 0.55rem 0.75rem;
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.nav a:hover,
|
||||
.nav a.active {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.nav a.active {
|
||||
border-left: 2px solid var(--accent-cyan);
|
||||
}
|
||||
|
||||
.main {
|
||||
margin-left: var(--sidebar-width);
|
||||
flex: 1;
|
||||
padding: 1.5rem 2rem 2rem;
|
||||
max-width: 1400px;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
margin: 0 0 0.25rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.page-header .subtitle {
|
||||
margin: 0;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.panel {
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-panel);
|
||||
padding: 1.25rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.panel h2 {
|
||||
margin: 0 0 1rem;
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.kpi-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.kpi-card {
|
||||
background: var(--bg-elevated);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 1rem 1.15rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.kpi-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background: var(--kpi-accent, var(--accent-cyan));
|
||||
}
|
||||
|
||||
.kpi-card.purple::before { background: var(--accent-purple); }
|
||||
.kpi-card.amber::before { background: var(--accent-amber); }
|
||||
.kpi-card.green::before { background: var(--accent-green); }
|
||||
|
||||
.kpi-label {
|
||||
font-size: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
|
||||
.kpi-value {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.grid-2 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.grid-2 {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.sidebar {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
.main {
|
||||
margin-left: 0;
|
||||
}
|
||||
.layout {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.herman-briefing {
|
||||
border-left: 3px solid var(--accent-cyan);
|
||||
background: linear-gradient(135deg, var(--accent-cyan-dim), transparent);
|
||||
}
|
||||
|
||||
.herman-briefing .briefing-meta {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.herman-briefing .briefing-body {
|
||||
white-space: pre-wrap;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.45rem 0.85rem;
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border-strong);
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: var(--bg-elevated);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--accent-cyan-dim);
|
||||
border-color: var(--accent-cyan);
|
||||
color: var(--accent-cyan);
|
||||
}
|
||||
|
||||
.btn-approve {
|
||||
border-color: var(--accent-green);
|
||||
color: var(--accent-green);
|
||||
background: var(--accent-green-dim);
|
||||
}
|
||||
|
||||
.btn-reject {
|
||||
border-color: var(--accent-red);
|
||||
color: var(--accent-red);
|
||||
background: var(--accent-red-dim);
|
||||
}
|
||||
|
||||
.agent-feed {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.agent-feed li {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
padding: 0.65rem 0;
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.agent-feed li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.feed-time {
|
||||
flex-shrink: 0;
|
||||
width: 4.5rem;
|
||||
color: var(--text-muted);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.feed-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.feed-message {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 0.15rem 0.45rem;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 0.65rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.badge-agent-herman,
|
||||
.badge-agent-cyan {
|
||||
background: var(--accent-cyan-dim);
|
||||
color: var(--accent-cyan);
|
||||
}
|
||||
|
||||
.badge-agent-sales,
|
||||
.badge-agent-purple {
|
||||
background: var(--accent-purple-dim);
|
||||
color: var(--accent-purple);
|
||||
}
|
||||
|
||||
.badge-agent-marketing,
|
||||
.badge-agent-amber {
|
||||
background: var(--accent-amber-dim);
|
||||
color: var(--accent-amber);
|
||||
}
|
||||
|
||||
.badge-agent-ops,
|
||||
.badge-agent-green {
|
||||
background: var(--accent-green-dim);
|
||||
color: var(--accent-green);
|
||||
}
|
||||
|
||||
.badge-status-needs_approval {
|
||||
background: var(--accent-amber-dim);
|
||||
color: var(--accent-amber);
|
||||
}
|
||||
|
||||
.badge-status-approved,
|
||||
.badge-status-completed {
|
||||
background: var(--accent-green-dim);
|
||||
color: var(--accent-green);
|
||||
}
|
||||
|
||||
.badge-status-rejected {
|
||||
background: var(--accent-red-dim);
|
||||
color: var(--accent-red);
|
||||
}
|
||||
|
||||
.approval-queue .approval-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem 0;
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
}
|
||||
|
||||
.approval-queue .approval-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.approval-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.approval-actions form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
text-align: left;
|
||||
padding: 0.55rem 0.65rem;
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
font-size: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.data-table tbody tr:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.agent-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.agent-card {
|
||||
background: var(--bg-elevated);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.agent-card.cyan { border-top: 2px solid var(--accent-cyan); }
|
||||
.agent-card.purple { border-top: 2px solid var(--accent-purple); }
|
||||
.agent-card.amber { border-top: 2px solid var(--accent-amber); }
|
||||
.agent-card.green { border-top: 2px solid var(--accent-green); }
|
||||
|
||||
.agent-card h3 {
|
||||
margin: 0 0 0.25rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.agent-card p {
|
||||
margin: 0;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
|
||||
/* Fase 2-4: kanban, charts, voice */
|
||||
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; margin-bottom: 1.25rem; }
|
||||
.kanban-column { min-width: 220px; flex: 0 0 220px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 0.75rem; }
|
||||
.kanban-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 0.75rem; }
|
||||
.kanban-card { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 0.65rem; margin-bottom: 0.5rem; font-size: 0.8125rem; }
|
||||
.chart-placeholder { min-height: 160px; }
|
||||
.chart-bar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; font-size: 0.75rem; }
|
||||
.chart-bar .bar { height: 8px; background: var(--accent-cyan); border-radius: 4px; min-width: 4px; }
|
||||
.chart-bar .bar-purple { background: var(--accent-purple); }
|
||||
.voice-widget { text-align: center; }
|
||||
.voice-mic { margin: 1rem auto; min-width: 160px; }
|
||||
.voice-wave { display: flex; justify-content: center; gap: 0.35rem; height: 32px; align-items: flex-end; }
|
||||
.voice-wave span { width: 4px; height: 12px; background: var(--accent-cyan-dim); border-radius: 2px; animation: voice-pulse 1.2s ease-in-out infinite; }
|
||||
.voice-wave span:nth-child(2) { animation-delay: 0.2s; }
|
||||
.voice-wave span:nth-child(3) { animation-delay: 0.4s; }
|
||||
@keyframes voice-pulse { 0%, 100% { height: 8px; opacity: 0.5; } 50% { height: 24px; opacity: 1; } }
|
||||
.herman-form textarea { width: 100%; background: var(--bg-root); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); padding: 0.75rem; font-family: inherit; margin-bottom: 0.75rem; }
|
||||
|
||||
/* Command Center interactive UI */
|
||||
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; align-items: center; justify-content: center; padding: 1rem; }
|
||||
.modal.open { display: flex; }
|
||||
.modal-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); }
|
||||
.drawer { position: fixed; top: 0; right: 0; width: min(420px, 90vw); height: 100vh; background: var(--bg-surface); border-left: 1px solid var(--border-subtle); transform: translateX(100%); transition: transform .25s ease; z-index: 90; padding: 1.5rem; overflow: auto; }
|
||||
.drawer.open { transform: translateX(0); }
|
||||
.drawer-close { float: right; background: transparent; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }
|
||||
.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
|
||||
.btn-sm { padding: .25rem .55rem; font-size: 12px; }
|
||||
.clickable-row { cursor: pointer; transition: background .15s; }
|
||||
.clickable-row:hover { background: var(--bg-hover); }
|
||||
.clickable-kpi { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
|
||||
.clickable-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); text-decoration: none; }
|
||||
.tab-bar { display: flex; gap: .35rem; margin-bottom: 1rem; flex-wrap: wrap; }
|
||||
.tab-bar button { background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-secondary); padding: .45rem .9rem; border-radius: var(--radius-md); cursor: pointer; }
|
||||
.tab-bar button.active { border-color: var(--accent-cyan); color: var(--text-primary); background: var(--bg-hover); }
|
||||
.toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; }
|
||||
.toast { padding: .75rem 1rem; border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border-subtle); animation: toastIn .2s ease; }
|
||||
.toast-success { border-color: var(--accent-green); }
|
||||
.toast-error { border-color: var(--accent-red, #f44); }
|
||||
.toast-out { opacity: 0; transition: opacity .3s; }
|
||||
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
|
||||
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
|
||||
.form-input { width: 100%; padding: .55rem .75rem; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-root); color: var(--text-primary); }
|
||||
.data-table { width: 100%; border-collapse: collapse; }
|
||||
.data-table th, .data-table td { padding: .55rem .65rem; border-bottom: 1px solid var(--border-subtle); text-align: left; }
|
||||
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-top: 1rem; }
|
||||
.kanban-col { background: var(--bg-surface); border-radius: var(--radius-lg); padding: .75rem; border: 1px solid var(--border-subtle); min-height: 200px; }
|
||||
.kanban-card { background: var(--bg-root); border-radius: var(--radius-md); padding: .65rem; margin-bottom: .5rem; border: 1px solid var(--border-subtle); }
|
||||
.chat-layout { display: flex; flex-direction: column; height: calc(100vh - 4rem); }
|
||||
.chat-messages { flex: 1; overflow: auto; padding: 1rem; background: var(--bg-surface); border-radius: var(--radius-lg); margin-bottom: 1rem; }
|
||||
.chat-msg { margin-bottom: .75rem; padding: .65rem; border-radius: var(--radius-md); }
|
||||
.chat-msg.user { background: rgba(0,200,255,.08); }
|
||||
.chat-msg.agent { background: var(--bg-root); border: 1px solid var(--border-subtle); }
|
||||
.chat-input { display: flex; gap: .5rem; }
|
||||
.page-tip { color: var(--text-muted); font-size: 13px; }
|
||||
.ai-output { white-space: pre-wrap; background: var(--bg-root); padding: 1rem; border-radius: var(--radius-md); min-height: 80px; }
|
||||
.log-list { list-style: none; padding: 0; max-height: 240px; overflow: auto; }
|
||||
body.drawer-open { overflow: hidden; }
|
||||
/* Herman Daily Briefing — visual dashboard */
|
||||
.herman-briefing { border-left: 3px solid var(--accent-cyan); }
|
||||
.herman-briefing-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
|
||||
.herman-briefing-header h2 { margin: 0; }
|
||||
.briefing-meta { font-size: 0.75rem; color: var(--text-muted); }
|
||||
|
||||
.briefing-summary-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
|
||||
@media (max-width: 900px) { .briefing-summary-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.briefing-card {
|
||||
background: var(--surface-elevated, rgba(15, 23, 42, 0.6));
|
||||
border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.15));
|
||||
border-radius: 10px;
|
||||
padding: 1rem 1.15rem;
|
||||
}
|
||||
.briefing-card h3 { margin: 0 0 0.65rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-gold, #e8a838); }
|
||||
.briefing-card.summary { border-color: rgba(56, 189, 248, 0.25); }
|
||||
.briefing-card.actions { border-color: rgba(232, 168, 56, 0.25); }
|
||||
.briefing-card.actions ul { margin: 0; padding-left: 1.1rem; color: var(--text-secondary); line-height: 1.55; }
|
||||
.briefing-card.actions li { margin-bottom: 0.35rem; }
|
||||
#briefing-summary-text { color: var(--text-primary, #e2e8f0); line-height: 1.6; font-size: 0.95rem; }
|
||||
|
||||
.briefing-kpi-row { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1.25rem; }
|
||||
.briefing-stat {
|
||||
flex: 1; min-width: 100px;
|
||||
background: rgba(15, 23, 42, 0.5);
|
||||
border: 1px solid rgba(148, 163, 184, 0.12);
|
||||
border-radius: 8px;
|
||||
padding: 0.65rem 0.85rem;
|
||||
text-align: center;
|
||||
}
|
||||
.briefing-stat.green { border-color: rgba(62, 207, 142, 0.35); }
|
||||
.briefing-stat.purple { border-color: rgba(167, 139, 250, 0.35); }
|
||||
.briefing-stat.cyan { border-color: rgba(56, 189, 248, 0.35); }
|
||||
.briefing-stat.amber { border-color: rgba(232, 168, 56, 0.35); }
|
||||
.briefing-stat-label { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
|
||||
.briefing-stat-value { display: block; font-size: 1.35rem; font-weight: 600; color: var(--text-primary); margin-top: 0.15rem; }
|
||||
|
||||
.briefing-charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
|
||||
@media (max-width: 900px) { .briefing-charts-grid { grid-template-columns: 1fr; } }
|
||||
.briefing-chart-panel {
|
||||
background: rgba(15, 23, 42, 0.45);
|
||||
border: 1px solid rgba(148, 163, 184, 0.1);
|
||||
border-radius: 10px;
|
||||
padding: 0.75rem;
|
||||
min-height: 220px;
|
||||
}
|
||||
|
||||
.briefing-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
|
||||
@media (max-width: 900px) { .briefing-details-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.briefing-pending-item {
|
||||
padding: 0.5rem 0;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.08);
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.briefing-toggle { margin-top: 0.5rem; }
|
||||
.briefing-full-report {
|
||||
display: none;
|
||||
margin-top: 0.75rem;
|
||||
max-height: 280px;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
background: rgba(0,0,0,0.2);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
border: 1px solid rgba(148, 163, 184, 0.1);
|
||||
}
|
||||
.briefing-full-report.open { display: block; }
|
||||
|
||||
.badge-positive { background: rgba(62,207,142,.2); color: #3ecf8e; padding: .15rem .45rem; border-radius: 999px; font-size: .72rem; }
|
||||
.badge-neutral { background: rgba(107,114,128,.25); color: #cbd5e1; padding: .15rem .45rem; border-radius: 999px; font-size: .72rem; }
|
||||
.badge-negative { background: rgba(239,68,68,.2); color: #ef4444; padding: .15rem .45rem; border-radius: 999px; font-size: .72rem; }
|
||||
/* Settings page */
|
||||
.settings-header { margin-bottom: 0.5rem; }
|
||||
|
||||
.settings-tabs {
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
margin-bottom: 1.25rem;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.15);
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.settings-tab {
|
||||
display: inline-block;
|
||||
padding: 0.65rem 1.1rem;
|
||||
color: var(--text-muted, #94a3b8);
|
||||
text-decoration: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
margin-bottom: -1px;
|
||||
font-size: 0.9rem;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
.settings-tab:hover { color: var(--text-primary, #e2e8f0); }
|
||||
.settings-tab.active {
|
||||
color: var(--accent-gold, #e8a838);
|
||||
border-bottom-color: var(--accent-gold, #e8a838);
|
||||
}
|
||||
|
||||
.settings-panel { border-left: 3px solid var(--accent-gold, #e8a838); }
|
||||
.settings-panel-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.settings-active-banner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.65rem;
|
||||
padding: 0.65rem 0.85rem;
|
||||
background: rgba(62, 207, 142, 0.08);
|
||||
border: 1px solid rgba(62, 207, 142, 0.25);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.email-account-list { display: flex; flex-direction: column; gap: 0.75rem; }
|
||||
.email-account-card {
|
||||
background: rgba(15, 23, 42, 0.45);
|
||||
border: 1px solid rgba(148, 163, 184, 0.12);
|
||||
border-radius: 10px;
|
||||
padding: 1rem 1.1rem;
|
||||
}
|
||||
.email-account-card.is-active { border-color: rgba(62, 207, 142, 0.35); }
|
||||
.email-account-card-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.email-account-card-head strong { display: block; }
|
||||
.email-account-card-head .muted { font-size: 0.85rem; color: var(--text-muted); }
|
||||
.email-account-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.settings-modal { max-width: 520px; width: 100%; }
|
||||
.settings-form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.75rem;
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
@media (max-width: 600px) { .settings-form-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.form-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
|
||||
.form-label .form-input { margin-top: 0.25rem; }
|
||||
.form-check { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; font-size: 0.9rem; }
|
||||
|
||||
.settings-details {
|
||||
margin: 0.75rem 0;
|
||||
padding: 0.75rem;
|
||||
border: 1px dashed rgba(148, 163, 184, 0.2);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.settings-details summary { cursor: pointer; color: var(--text-secondary); font-size: 0.85rem; }
|
||||
|
||||
.sidebar .nav-settings {
|
||||
margin-top: auto;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px solid rgba(148, 163, 184, 0.12);
|
||||
}
|
||||
|
||||
[x-cloak] { display: none !important; }
|
||||
/* ── Horizontal top navigation ── */
|
||||
.topbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.15);
|
||||
padding: 0.65rem 1.25rem 0;
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
.topbar-brand {
|
||||
display: inline-block;
|
||||
margin-right: 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.topbar-brand .brand-title { margin: 0; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--accent-gold, #e8a838); text-transform: uppercase; }
|
||||
.topbar-brand .brand-name { margin: 0; font-size: 1rem; font-weight: 600; color: var(--text-primary, #e2e8f0); }
|
||||
|
||||
.topnav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
gap: 0.35rem 1.25rem;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.topnav-herman {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0.55rem 1.25rem;
|
||||
margin-right: 0.5rem;
|
||||
margin-bottom: -1px;
|
||||
border-radius: 8px 8px 0 0;
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
text-decoration: none;
|
||||
color: #0f172a;
|
||||
background: linear-gradient(135deg, #e8a838 0%, #f0c060 100%);
|
||||
border: 1px solid rgba(232, 168, 56, 0.5);
|
||||
border-bottom: none;
|
||||
box-shadow: 0 -2px 12px rgba(232, 168, 56, 0.25);
|
||||
}
|
||||
.topnav-herman:hover { filter: brightness(1.05); color: #0f172a; }
|
||||
.topnav-herman.active { background: linear-gradient(135deg, #e8a838 0%, #f5d078 100%); }
|
||||
|
||||
.topnav-group {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.15rem;
|
||||
padding-bottom: 0.45rem;
|
||||
border-left: 1px solid rgba(148, 163, 184, 0.12);
|
||||
padding-left: 1rem;
|
||||
}
|
||||
.topnav-group:first-of-type { border-left: none; padding-left: 0; }
|
||||
.topnav-label {
|
||||
font-size: 0.62rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--text-muted, #64748b);
|
||||
margin-right: 0.35rem;
|
||||
padding-right: 0.35rem;
|
||||
}
|
||||
.topnav-group a {
|
||||
display: inline-block;
|
||||
padding: 0.4rem 0.7rem;
|
||||
border-radius: 6px;
|
||||
font-size: 0.82rem;
|
||||
text-decoration: none;
|
||||
color: var(--text-secondary, #94a3b8);
|
||||
border: 1px solid transparent;
|
||||
transition: color 0.15s, background 0.15s, border-color 0.15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.topnav-group a:hover {
|
||||
color: var(--text-primary, #e2e8f0);
|
||||
background: rgba(148, 163, 184, 0.08);
|
||||
}
|
||||
.topnav-group a.active {
|
||||
color: var(--accent-cyan, #38bdf8);
|
||||
background: rgba(56, 189, 248, 0.1);
|
||||
border-color: rgba(56, 189, 248, 0.25);
|
||||
}
|
||||
.topnav-group-system { margin-left: auto; border-left: 1px solid rgba(148, 163, 184, 0.12); }
|
||||
|
||||
.main-topnav {
|
||||
padding: 1.25rem 1.5rem 2rem;
|
||||
min-height: calc(100vh - 80px);
|
||||
background: var(--bg-root, #070b14);
|
||||
}
|
||||
|
||||
/* Herman hub layout */
|
||||
.herman-hub-header { margin-bottom: 1rem; }
|
||||
.herman-hub-header h1 { margin: 0 0 0.25rem; }
|
||||
.herman-hub-header .subtitle { margin: 0; }
|
||||
|
||||
.hub-kpi-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
@media (max-width: 1100px) { .hub-kpi-row { grid-template-columns: repeat(3, 1fr); } }
|
||||
@media (max-width: 700px) { .hub-kpi-row { grid-template-columns: repeat(2, 1fr); } }
|
||||
|
||||
.hub-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1.2fr 1fr;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
@media (max-width: 1000px) { .hub-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.hub-section-tabs {
|
||||
display: flex;
|
||||
gap: 0.35rem;
|
||||
margin-bottom: 1rem;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.12);
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
.hub-section-tabs button, .hub-section-tabs a {
|
||||
padding: 0.45rem 0.9rem;
|
||||
border-radius: 6px 6px 0 0;
|
||||
font-size: 0.85rem;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.hub-section-tabs .active {
|
||||
color: var(--accent-gold);
|
||||
border-color: rgba(232, 168, 56, 0.3);
|
||||
background: rgba(232, 168, 56, 0.08);
|
||||
}
|
||||
|
||||
.hub-feed-item {
|
||||
padding: 0.55rem 0;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.08);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
.hub-feed-time { color: var(--text-muted); font-size: 0.75rem; margin-right: 0.5rem; }
|
||||
|
||||
/* Hide old sidebar layout when topnav is active */
|
||||
body:has(.topbar) .layout { display: block; }
|
||||
body:has(.topbar) .sidebar { display: none; }
|
||||
body:has(.topbar) .main { margin-left: 0; }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.topnav { gap: 0.25rem 0.75rem; }
|
||||
.topnav-group { padding-left: 0.5rem; }
|
||||
.topnav-label { display: none; }
|
||||
}
|
||||
|
||||
/* Compact Herman briefing charts */
|
||||
.briefing-charts-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.75rem;
|
||||
max-height: 180px;
|
||||
}
|
||||
@media (max-width: 1100px) { .briefing-charts-grid { grid-template-columns: repeat(2, 1fr); max-height: none; } }
|
||||
.briefing-chart-panel {
|
||||
background: rgba(15, 23, 42, 0.45);
|
||||
border: 1px solid rgba(148, 163, 184, 0.1);
|
||||
border-radius: 8px;
|
||||
padding: 0.35rem 0.5rem;
|
||||
min-height: 0 !important;
|
||||
height: 155px;
|
||||
position: relative;
|
||||
}
|
||||
.briefing-chart-panel canvas { max-height: 130px !important; }
|
||||
.briefing-summary-grid { margin-bottom: 0.75rem; }
|
||||
.briefing-kpi-row { margin-bottom: 0.75rem; }
|
||||
.briefing-kpi-row .briefing-stat { padding: 0.45rem 0.6rem; }
|
||||
.briefing-kpi-row .briefing-stat-value { font-size: 1.1rem; }
|
||||
|
||||
.browser-instruct-box {
|
||||
background: rgba(56, 189, 248, 0.06);
|
||||
border: 1px solid rgba(56, 189, 248, 0.2);
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.browser-instruct-box textarea { min-height: 70px; }
|
||||
.browser-steps-log {
|
||||
font-size: 0.8rem; color: var(--text-muted);
|
||||
margin-top: 0.5rem; max-height: 100px; overflow: auto;
|
||||
}
|
||||
.browser-action-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
|
||||
|
||||
.novnc-fallback {
|
||||
padding: 1rem; text-align: center; background: #111;
|
||||
border-radius: 8px; color: #94a3b8; font-size: 0.85rem;
|
||||
}
|
||||
.novnc-fallback a { color: var(--accent-cyan); }
|
||||
@@ -0,0 +1,335 @@
|
||||
/* Telegram-inspired pulse & live feed theme — global readability */
|
||||
:root {
|
||||
--pulse-blue: #38bdf8;
|
||||
--pulse-green: #4ade80;
|
||||
--pulse-purple: #c084fc;
|
||||
--pulse-orange: #fb923c;
|
||||
--pulse-glow: rgba(56, 189, 248, 0.5);
|
||||
}
|
||||
|
||||
/* ——— Leesbaarheid ——— */
|
||||
body, .panel, .main-topnav { color: var(--text-body); }
|
||||
h1, h2, h3, h4, strong, .kpi-value, .briefing-stat-value { color: var(--text-primary) !important; }
|
||||
.subtitle, .page-tip, .page-header .subtitle { color: var(--text-secondary) !important; font-size: 0.95rem !important; }
|
||||
.muted, .empty-state, small { color: var(--text-muted) !important; }
|
||||
.panel p, .feed-card p, .note-bubble p, .hub-feed-item, .data-table td { color: var(--text-body); }
|
||||
.data-table th { color: var(--text-secondary); }
|
||||
.feed-card .source { color: var(--pulse-blue) !important; font-weight: 600; }
|
||||
a, .feed-card a, .ticker-link { color: var(--pulse-blue); text-decoration: none; }
|
||||
a:hover, .feed-card a:hover, .ticker-link:hover { color: #7dd3fc; text-decoration: underline; }
|
||||
.form-input, select, textarea, input { color: var(--text-primary) !important; }
|
||||
|
||||
@keyframes pulse-ring {
|
||||
0% { box-shadow: 0 0 0 0 var(--pulse-glow); }
|
||||
70% { box-shadow: 0 0 0 12px rgba(56, 189, 248, 0); }
|
||||
100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
|
||||
}
|
||||
|
||||
@keyframes pulse-ring-green {
|
||||
0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
|
||||
70% { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); }
|
||||
100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
|
||||
}
|
||||
|
||||
@keyframes pulse-dot {
|
||||
0%, 100% { opacity: 1; transform: scale(1); }
|
||||
50% { opacity: 0.55; transform: scale(0.82); }
|
||||
}
|
||||
|
||||
@keyframes live-shimmer {
|
||||
0% { background-position: -200% 0; }
|
||||
100% { background-position: 200% 0; }
|
||||
}
|
||||
|
||||
@keyframes ticker-scroll {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-50%); }
|
||||
}
|
||||
|
||||
@keyframes fade-up {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes tg-breathe {
|
||||
0%, 100% { box-shadow: 0 0 0 rgba(56,189,248,0); }
|
||||
50% { box-shadow: 0 0 20px rgba(56,189,248,0.08); }
|
||||
}
|
||||
|
||||
@keyframes glow-border {
|
||||
0%, 100% { border-color: rgba(56, 189, 248, 0.25); }
|
||||
50% { border-color: rgba(56, 189, 248, 0.55); }
|
||||
}
|
||||
|
||||
/* ——— Pulse buttons (Telegram style) ——— */
|
||||
.btn-pulse, .btn-pulse-green, .btn-pulse-purple {
|
||||
position: relative;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary) !important;
|
||||
}
|
||||
.btn-pulse {
|
||||
animation: pulse-ring 2.2s infinite;
|
||||
border: 1px solid var(--pulse-blue) !important;
|
||||
background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(56,189,248,0.06)) !important;
|
||||
}
|
||||
.btn-pulse-green {
|
||||
animation: pulse-ring-green 2.2s infinite;
|
||||
border-color: var(--pulse-green) !important;
|
||||
background: linear-gradient(135deg, rgba(74,222,128,0.2), rgba(74,222,128,0.06)) !important;
|
||||
}
|
||||
.btn-pulse-purple {
|
||||
animation: pulse-ring 2.2s infinite;
|
||||
--pulse-glow: rgba(192, 132, 252, 0.45);
|
||||
border-color: var(--pulse-purple) !important;
|
||||
background: linear-gradient(135deg, rgba(192,132,252,0.2), rgba(192,132,252,0.06)) !important;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
animation: pulse-ring 3s infinite;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary) !important;
|
||||
}
|
||||
|
||||
/* Geen globale panel-beweging — alleen KPI kaarten animeren via hm-neo */
|
||||
|
||||
.live-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--pulse-green);
|
||||
}
|
||||
.live-badge::before {
|
||||
content: "";
|
||||
width: 8px; height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--pulse-green);
|
||||
animation: pulse-dot 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.live-feed-bar {
|
||||
background: linear-gradient(90deg, #0f172a 20%, #1a3a5c 50%, #0f172a 80%);
|
||||
background-size: 200% 100%;
|
||||
animation: live-shimmer 4s linear infinite;
|
||||
border: 1px solid rgba(56, 189, 248, 0.35);
|
||||
border-radius: 12px;
|
||||
padding: 0.65rem 1rem;
|
||||
margin-bottom: 1rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ticker-track { display: flex; gap: 2rem; white-space: nowrap; animation: ticker-scroll 45s linear infinite; }
|
||||
.ticker-track:hover { animation-play-state: paused; }
|
||||
.ticker-item, .ticker-link {
|
||||
background: rgba(56,189,248,0.12);
|
||||
padding: 0.3rem 0.75rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-body) !important;
|
||||
border: 1px solid rgba(56,189,248,0.25);
|
||||
display: inline-block;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.ticker-link:hover {
|
||||
background: rgba(56,189,248,0.25);
|
||||
color: var(--text-primary) !important;
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.side-nav { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.5rem; }
|
||||
.side-nav-btn {
|
||||
display: flex; align-items: center; gap: 0.6rem;
|
||||
padding: 0.65rem 0.85rem;
|
||||
border: 1px solid transparent; border-radius: 10px;
|
||||
background: transparent; color: var(--text-body); cursor: pointer;
|
||||
text-align: left; font-size: 0.9rem; transition: all 0.2s;
|
||||
}
|
||||
.side-nav-btn:hover { background: rgba(56,189,248,0.1); border-color: rgba(56,189,248,0.25); color: var(--text-primary); }
|
||||
.side-nav-btn.active {
|
||||
background: rgba(56,189,248,0.18);
|
||||
border-color: var(--pulse-blue);
|
||||
box-shadow: 0 0 14px rgba(56,189,248,0.25);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.section-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.75rem 0; }
|
||||
.section-tab {
|
||||
padding: 0.4rem 0.85rem; border-radius: 999px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
background: var(--bg-elevated);
|
||||
font-size: 0.8rem; cursor: pointer;
|
||||
color: var(--text-secondary); transition: all 0.2s;
|
||||
}
|
||||
.section-tab.active {
|
||||
border-color: var(--pulse-blue);
|
||||
background: rgba(56,189,248,0.22);
|
||||
box-shadow: 0 0 10px rgba(56,189,248,0.3);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.feed-card {
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
margin-bottom: 0.6rem;
|
||||
animation: fade-up 0.4s ease;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
background: var(--bg-elevated);
|
||||
}
|
||||
.feed-card:hover {
|
||||
border-color: var(--pulse-blue);
|
||||
box-shadow: 0 0 16px rgba(56,189,248,0.12);
|
||||
}
|
||||
.feed-card a strong { color: var(--text-primary); font-size: 0.95rem; }
|
||||
.feed-card .feed-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
|
||||
.feed-card .btn-source {
|
||||
font-size: 0.75rem; padding: 0.25rem 0.65rem;
|
||||
border-radius: 999px; border: 1px solid rgba(56,189,248,0.4);
|
||||
background: rgba(56,189,248,0.1); color: var(--pulse-blue);
|
||||
cursor: pointer; text-decoration: none; display: inline-block;
|
||||
}
|
||||
.feed-card .btn-source:hover { background: rgba(56,189,248,0.22); color: var(--text-primary); }
|
||||
.feed-card .btn-bookmark { cursor: pointer; border: 1px solid rgba(255,215,0,0.35); background: rgba(255,215,0,0.08); color: #fcd34d; }
|
||||
.feed-card .btn-bookmark.saved { background: rgba(255,215,0,0.22); color: #ffd700; }
|
||||
.feed-card.saved-rss { border-left: 3px solid #ffd700; }
|
||||
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
|
||||
.promo-card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
|
||||
.promo-card-link:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
|
||||
.promo-card-link strong, .promo-card-link p, .promo-card-link small { color: inherit; }
|
||||
.promo-cover { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 0.65rem; }
|
||||
.hm-neo-kpi-link { text-decoration: none; color: inherit; display: block; }
|
||||
.hm-neo-kpi-link:hover .hm-neo-kpi { border-color: rgba(0,229,255,0.35); }
|
||||
|
||||
.weather-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
|
||||
.weather-day {
|
||||
flex: 1; min-width: 70px; text-align: center; padding: 0.5rem;
|
||||
border-radius: 8px; background: rgba(56,189,248,0.1);
|
||||
border: 1px solid rgba(56,189,248,0.2); font-size: 0.8rem; color: var(--text-body);
|
||||
}
|
||||
.weather-day strong { display: block; font-size: 1.05rem; color: var(--text-primary); }
|
||||
|
||||
.note-bubble {
|
||||
background: rgba(56,189,248,0.1);
|
||||
border-left: 3px solid var(--pulse-blue);
|
||||
padding: 0.65rem 0.85rem; border-radius: 0 8px 8px 0;
|
||||
margin-bottom: 0.5rem; font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.milestone-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border-bottom: 1px solid var(--border-subtle); }
|
||||
.milestone-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pulse-orange); animation: pulse-dot 2s infinite; }
|
||||
.milestone-dot.done { background: var(--pulse-green); animation: none; }
|
||||
|
||||
.pro-tab-bar { display: flex; gap: 0; border-bottom: none; margin-bottom: 1rem; }
|
||||
|
||||
/* Neo tabs — shared with Beurs page (beurs.css extends this) */
|
||||
.neo-tab-bar.pro-tab-bar {
|
||||
position: relative;
|
||||
background: rgba(10, 14, 22, 0.9);
|
||||
border: 1px solid rgba(56,189,248,0.2);
|
||||
border-radius: 14px;
|
||||
padding: 0.35rem;
|
||||
}
|
||||
.neo-tab-bar .neo-tab, .neo-tab-bar .pro-tab {
|
||||
flex: 1; border: none; background: transparent;
|
||||
color: #94a3b8; cursor: pointer; transition: color 0.2s, transform 0.2s;
|
||||
border-bottom: none !important; margin-bottom: 0 !important;
|
||||
padding: 0.65rem 0.5rem; font-weight: 600; font-size: 0.82rem;
|
||||
}
|
||||
.neo-tab-bar .neo-tab.active, .neo-tab-bar .pro-tab.active {
|
||||
color: #f8fafc;
|
||||
background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(74,222,128,0.08));
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 16px rgba(56,189,248,0.15);
|
||||
}
|
||||
.neo-tab-bar .neo-tab:hover, .neo-tab-bar .pro-tab:hover { color: #e2e8f0; transform: translateY(-1px); }
|
||||
|
||||
.pro-tab {
|
||||
padding: 0.75rem 1.25rem; border: none; background: transparent;
|
||||
color: var(--text-muted); cursor: pointer; font-size: 0.9rem;
|
||||
border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
|
||||
}
|
||||
.pro-tab.active { color: var(--pulse-blue); border-bottom-color: var(--pulse-blue); }
|
||||
.pro-tab:hover { color: var(--text-primary); }
|
||||
|
||||
.kpi-pulse strong {
|
||||
background: linear-gradient(90deg, var(--pulse-blue), var(--pulse-purple));
|
||||
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
|
||||
}
|
||||
|
||||
/* ——— Herman dashboard pulse ——— */
|
||||
.herman-hero {
|
||||
background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(192,132,252,0.08));
|
||||
border: 1px solid rgba(56,189,248,0.3);
|
||||
border-radius: 16px;
|
||||
padding: 1.5rem 1.75rem;
|
||||
margin-bottom: 1.25rem;
|
||||
animation: glow-border 3s ease-in-out infinite;
|
||||
}
|
||||
.herman-hero h1 { margin: 0 0 0.35rem; font-size: 1.75rem; }
|
||||
.herman-hero .hero-sub { color: var(--text-secondary); font-size: 1rem; margin: 0; }
|
||||
|
||||
.pulse-panel {
|
||||
border: 1px solid rgba(56,189,248,0.2);
|
||||
border-radius: 12px;
|
||||
animation: glow-border 4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.hub-kpi-row .kpi-card, .clickable-kpi {
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
animation: fade-up 0.5s ease;
|
||||
}
|
||||
.hub-kpi-row .kpi-card:hover, .clickable-kpi:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 24px rgba(56,189,248,0.15);
|
||||
}
|
||||
|
||||
.hub-feed-item {
|
||||
padding: 0.6rem 0;
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
color: var(--text-body);
|
||||
animation: fade-up 0.35s ease;
|
||||
}
|
||||
|
||||
.briefing-typewriter {
|
||||
color: var(--text-primary);
|
||||
line-height: 1.75;
|
||||
font-size: 1rem;
|
||||
min-height: 4rem;
|
||||
}
|
||||
|
||||
.briefing-horizon-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
@media (max-width: 900px) { .briefing-horizon-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.horizon-card {
|
||||
background: var(--bg-elevated);
|
||||
border-radius: 12px;
|
||||
padding: 1rem 1.15rem;
|
||||
border: 1px solid var(--border-subtle);
|
||||
}
|
||||
.horizon-card.short { border-color: rgba(251,146,60,0.35); }
|
||||
.horizon-card.long { border-color: rgba(192,132,252,0.35); }
|
||||
.horizon-card h3 { margin: 0 0 0.65rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
|
||||
.horizon-card.short h3 { color: var(--pulse-orange); }
|
||||
.horizon-card.long h3 { color: var(--pulse-purple); }
|
||||
.horizon-card ul { margin: 0; padding-left: 1.1rem; color: var(--text-body); line-height: 1.65; }
|
||||
.horizon-card li { margin-bottom: 0.4rem; }
|
||||
|
||||
.retail-highlight {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
padding: 0.55rem 0; border-bottom: 1px solid var(--border-subtle);
|
||||
color: var(--text-body); font-size: 0.9rem;
|
||||
}
|
||||
.retail-highlight strong { color: var(--text-primary); }
|
||||
|
||||
.panel { color: var(--text-body); }
|
||||
.panel h2 { color: var(--text-primary); }
|
||||
|
||||
.kpi-card span { color: var(--text-secondary) !important; }
|
||||
.kpi-card strong { color: var(--text-primary) !important; }
|
||||
@@ -0,0 +1,116 @@
|
||||
.retail-workspace {
|
||||
display: grid;
|
||||
grid-template-columns: 200px 280px 1fr 360px;
|
||||
gap: 1rem;
|
||||
min-height: 75vh;
|
||||
}
|
||||
|
||||
.retail-sidebar { overflow-y: auto; max-height: 75vh; }
|
||||
.retail-filters label {
|
||||
display: block;
|
||||
margin-bottom: 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.retail-filters select,
|
||||
.retail-filters input[type="text"],
|
||||
.retail-filters input[type="number"] {
|
||||
width: 100%;
|
||||
margin-top: 0.25rem;
|
||||
padding: 0.4rem 0.5rem;
|
||||
border: 1px solid var(--border, #334155);
|
||||
border-radius: 6px;
|
||||
background: var(--panel-bg, #0f172a);
|
||||
color: inherit;
|
||||
}
|
||||
.retail-filters h4 { margin: 1rem 0 0.5rem; font-size: 0.9rem; }
|
||||
.retail-filters .checkbox { display: flex; align-items: center; gap: 0.5rem; }
|
||||
|
||||
.retail-map-wrap { position: relative; min-height: 500px; }
|
||||
.retail-map { height: 75vh; min-height: 500px; border-radius: 8px; border: 1px solid #334155; }
|
||||
.map-loading {
|
||||
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
||||
background: rgba(0,0,0,0.3); border-radius: 8px; pointer-events: none;
|
||||
}
|
||||
|
||||
.retail-panel { overflow-y: auto; max-height: 75vh; }
|
||||
.retail-panel .detail-section { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #334155; }
|
||||
.retail-panel .detail-dl {
|
||||
display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 0.5rem; font-size: 0.85rem;
|
||||
}
|
||||
.retail-panel .detail-dl dt { opacity: 0.7; }
|
||||
.retail-panel .detail-dl dd { margin: 0; font-weight: 600; text-align: right; }
|
||||
|
||||
.clickable-row { cursor: pointer; }
|
||||
.clickable-row:hover { opacity: 0.85; }
|
||||
|
||||
.retail-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
|
||||
.page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
|
||||
|
||||
.kpi-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
|
||||
.kpi-card {
|
||||
flex: 1; min-width: 110px; padding: 0.75rem 1rem;
|
||||
background: var(--panel-bg, #1e293b); border-radius: 8px; border: 1px solid #334155;
|
||||
}
|
||||
.kpi-card span { display: block; font-size: 0.75rem; opacity: 0.7; }
|
||||
.kpi-card strong { font-size: 1.25rem; }
|
||||
.kpi-green strong { color: #22c55e; }
|
||||
|
||||
.retail-main { min-height: 500px; }
|
||||
.retail-table-wrap { max-height: 75vh; overflow: auto; }
|
||||
.retail-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
|
||||
.retail-table th, .retail-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #334155; text-align: left; }
|
||||
.retail-table th { position: sticky; top: 0; background: var(--panel-bg, #1e293b); z-index: 1; }
|
||||
|
||||
.trends-ticker { margin-bottom: 1rem; padding: 0.75rem 1rem; overflow-x: auto; }
|
||||
.ticker-items { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
|
||||
.ticker-item {
|
||||
background: rgba(42,171,238,0.1); padding: 0.25rem 0.6rem; border-radius: 999px;
|
||||
font-size: 0.8rem; white-space: nowrap; border: 1px solid rgba(42,171,238,0.2);
|
||||
}
|
||||
|
||||
.field-picker { margin-top: 1rem; font-size: 0.8rem; }
|
||||
.field-group { margin: 0.5rem 0; }
|
||||
.btn-block { width: 100%; margin-top: 0.35rem; }
|
||||
.muted { opacity: 0.75; font-size: 0.9rem; }
|
||||
.hint { font-size: 0.8rem; opacity: 0.7; }
|
||||
|
||||
.wholesale-list { max-height: 75vh; overflow-y: auto; }
|
||||
.wholesale-item {
|
||||
padding: 0.6rem; border-bottom: 1px solid #1e293b; cursor: pointer; font-size: 0.85rem;
|
||||
}
|
||||
.wholesale-item:hover { background: rgba(42,171,238,0.06); }
|
||||
.wholesale-item.active { border-left: 3px solid var(--pulse-blue, #2aabee); }
|
||||
|
||||
.filter-group {
|
||||
border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
|
||||
margin-bottom: 0.65rem; padding: 0.35rem 0.5rem; background: rgba(0,0,0,0.15);
|
||||
}
|
||||
.filter-group summary {
|
||||
cursor: pointer; font-size: 0.8rem; font-weight: 600; color: #cbd5e1;
|
||||
padding: 0.35rem 0; list-style: none;
|
||||
}
|
||||
.filter-group summary::-webkit-details-marker { display: none; }
|
||||
.filter-actions { margin: 0.75rem 0; }
|
||||
.retail-filters { overflow-y: auto; max-height: 75vh; }
|
||||
|
||||
.retail-regs-wrap { max-height: 75vh; overflow-y: auto; }
|
||||
.regs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
|
||||
.regs-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
|
||||
@media (max-width: 1100px) { .regs-columns { grid-template-columns: 1fr; } }
|
||||
.regs-columns h4 { font-size: 0.85rem; color: #94a3b8; margin: 0 0 0.5rem; }
|
||||
.reg-item { padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
||||
.reg-item a { color: #e2e8f0; text-decoration: none; font-size: 0.85rem; }
|
||||
.reg-item a:hover { color: var(--pulse-blue, #2aabee); }
|
||||
.reg-item small { display: block; color: #64748b; font-size: 0.7rem; margin-top: 0.15rem; }
|
||||
.reg-badge {
|
||||
display: inline-block; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em;
|
||||
padding: 0.1rem 0.35rem; border-radius: 4px; margin-bottom: 0.2rem;
|
||||
background: rgba(168,85,247,0.15); color: #a855f7;
|
||||
}
|
||||
.reg-badge.cbs { background: rgba(56,189,248,0.15); color: #38bdf8; }
|
||||
.reg-badge.markt { background: rgba(255,159,67,0.15); color: #ff9f43; }
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.retail-workspace { grid-template-columns: 180px 260px 1fr; }
|
||||
.retail-panel { grid-column: 1 / -1; max-height: 50vh; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
:root {
|
||||
--bg-root: #0a0e14;
|
||||
--bg-surface: #121820;
|
||||
--bg-elevated: #182030;
|
||||
--bg-hover: #1e2a3a;
|
||||
--border-subtle: #2d3f54;
|
||||
--border-strong: #3d5268;
|
||||
--text-primary: #f4f8fc;
|
||||
--text-secondary: #c8d4e0;
|
||||
--text-muted: #9fb0c4;
|
||||
--text-body: #dce6f0;
|
||||
--accent-cyan: #38bdf8;
|
||||
--accent-cyan-dim: rgba(56, 189, 248, 0.18);
|
||||
--accent-purple: #c084fc;
|
||||
--accent-purple-dim: rgba(192, 132, 252, 0.18);
|
||||
--accent-amber: #fcd34d;
|
||||
--accent-amber-dim: rgba(252, 211, 77, 0.18);
|
||||
--accent-green: #4ade80;
|
||||
--accent-green-dim: rgba(74, 222, 128, 0.18);
|
||||
--accent-red: #fb7185;
|
||||
--accent-red-dim: rgba(251, 113, 133, 0.18);
|
||||
--shadow-panel: 0 4px 24px rgba(0, 0, 0, 0.45);
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 12px;
|
||||
--font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
|
||||
--font-mono: "JetBrains Mono", "Fira Code", monospace;
|
||||
--sidebar-width: 240px;
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
/* Neo topnav — unieke kleur per tab + glow pill effect */
|
||||
|
||||
.topnav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
gap: 0.4rem 0.85rem;
|
||||
padding-bottom: 0.55rem;
|
||||
}
|
||||
|
||||
/* Shared pill base */
|
||||
.nav-pill,
|
||||
.topnav-herman.nav-pill {
|
||||
--pill-color: #38bdf8;
|
||||
--pill-glow: rgba(56, 189, 248, 0.45);
|
||||
--pill-bg: rgba(56, 189, 248, 0.12);
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.45rem 0.85rem;
|
||||
border-radius: 10px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
color: #cbd5e1;
|
||||
border: 1px solid color-mix(in srgb, var(--pill-color) 28%, rgba(255, 255, 255, 0.06));
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s, color 0.2s;
|
||||
overflow: hidden;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.nav-pill::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(135deg, var(--pill-bg), transparent 70%);
|
||||
opacity: 0.85;
|
||||
z-index: -1;
|
||||
transition: opacity 0.25s;
|
||||
}
|
||||
|
||||
.nav-pill::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
left: -60%;
|
||||
width: 50%;
|
||||
height: 200%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
|
||||
transform: skewX(-20deg);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s, left 0.5s;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.nav-pill:hover {
|
||||
transform: translateY(-2px);
|
||||
color: #f8fafc;
|
||||
border-color: color-mix(in srgb, var(--pill-color) 50%, transparent);
|
||||
box-shadow: 0 4px 20px var(--pill-glow), 0 0 0 1px color-mix(in srgb, var(--pill-color) 25%, transparent);
|
||||
}
|
||||
|
||||
.nav-pill:hover::after {
|
||||
opacity: 1;
|
||||
left: 120%;
|
||||
}
|
||||
|
||||
.nav-pill.active {
|
||||
color: #fff;
|
||||
border-color: var(--pill-color);
|
||||
box-shadow:
|
||||
0 0 0 1px color-mix(in srgb, var(--pill-color) 40%, transparent),
|
||||
0 0 22px var(--pill-glow),
|
||||
inset 0 0 18px color-mix(in srgb, var(--pill-color) 18%, transparent);
|
||||
text-shadow: 0 0 12px var(--pill-glow);
|
||||
animation: nav-pill-pulse 2.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.nav-pill.active::before {
|
||||
opacity: 1;
|
||||
background: linear-gradient(145deg, color-mix(in srgb, var(--pill-color) 35%, transparent), color-mix(in srgb, var(--pill-color) 8%, transparent));
|
||||
}
|
||||
|
||||
@keyframes nav-pill-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pill-color) 40%, transparent), 0 0 18px var(--pill-glow), inset 0 0 14px color-mix(in srgb, var(--pill-color) 15%, transparent); }
|
||||
50% { box-shadow: 0 0 0 1px var(--pill-color), 0 0 28px var(--pill-glow), inset 0 0 22px color-mix(in srgb, var(--pill-color) 22%, transparent); }
|
||||
}
|
||||
|
||||
/* Herman — reset legacy gold tab, use neo pill */
|
||||
.topnav-herman.nav-pill {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
color: #cbd5e1;
|
||||
box-shadow: none;
|
||||
}
|
||||
.topnav-herman.nav-pill.active {
|
||||
color: #fff;
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
}
|
||||
|
||||
.nav-pill-herman {
|
||||
--pill-color: #fbbf24;
|
||||
--pill-glow: rgba(251, 191, 36, 0.55);
|
||||
--pill-bg: rgba(251, 191, 36, 0.2);
|
||||
font-weight: 700;
|
||||
font-size: 0.88rem;
|
||||
padding: 0.5rem 1.1rem;
|
||||
}
|
||||
|
||||
/* CRM */
|
||||
.nav-pill-clients { --pill-color: #38bdf8; --pill-glow: rgba(56, 189, 248, 0.5); --pill-bg: rgba(56, 189, 248, 0.15); }
|
||||
.nav-pill-deals { --pill-color: #4ade80; --pill-glow: rgba(74, 222, 128, 0.5); --pill-bg: rgba(74, 222, 128, 0.12); }
|
||||
.nav-pill-products { --pill-color: #a855f7; --pill-glow: rgba(168, 85, 247, 0.5); --pill-bg: rgba(168, 85, 247, 0.12); }
|
||||
.nav-pill-suppliers { --pill-color: #fb923c; --pill-glow: rgba(251, 146, 60, 0.5); --pill-bg: rgba(251, 146, 60, 0.12); }
|
||||
|
||||
/* Intel */
|
||||
.nav-pill-beurs { --pill-color: #b8ff3c; --pill-glow: rgba(184, 255, 60, 0.45); --pill-bg: rgba(184, 255, 60, 0.1); }
|
||||
.nav-pill-retail { --pill-color: #0066cc; --pill-glow: rgba(0, 102, 204, 0.55); --pill-bg: rgba(0, 102, 204, 0.18); }
|
||||
.nav-pill-browser { --pill-color: #14b8a6; --pill-glow: rgba(20, 184, 166, 0.5); --pill-bg: rgba(20, 184, 166, 0.12); }
|
||||
.nav-pill-documents { --pill-color: #94a3b8; --pill-glow: rgba(148, 163, 184, 0.4); --pill-bg: rgba(148, 163, 184, 0.1); }
|
||||
|
||||
/* Hermes */
|
||||
.nav-pill-telegram { --pill-color: #2aabee; --pill-glow: rgba(42, 171, 238, 0.55); --pill-bg: rgba(42, 171, 238, 0.15); }
|
||||
|
||||
/* Agents */
|
||||
.nav-pill-agents { --pill-color: #00e5ff; --pill-glow: rgba(0, 229, 255, 0.5); --pill-bg: rgba(0, 229, 255, 0.1); }
|
||||
.nav-pill-marketing { --pill-color: #ff6b9d; --pill-glow: rgba(255, 107, 157, 0.5); --pill-bg: rgba(255, 107, 157, 0.12); }
|
||||
.nav-pill-chat { --pill-color: #fcd34d; --pill-glow: rgba(252, 211, 77, 0.45); --pill-bg: rgba(252, 211, 77, 0.12); }
|
||||
.nav-pill-studio { --pill-color: #ec4899; --pill-glow: rgba(236, 72, 153, 0.5); --pill-bg: rgba(236, 72, 153, 0.12); }
|
||||
.nav-pill-reports { --pill-color: #6366f1; --pill-glow: rgba(99, 102, 241, 0.5); --pill-bg: rgba(99, 102, 241, 0.12); }
|
||||
|
||||
/* System */
|
||||
.nav-pill-analytics { --pill-color: #8b5cf6; --pill-glow: rgba(139, 92, 246, 0.5); --pill-bg: rgba(139, 92, 246, 0.12); }
|
||||
.nav-pill-voice { --pill-color: #f97316; --pill-glow: rgba(249, 115, 22, 0.5); --pill-bg: rgba(249, 115, 22, 0.12); }
|
||||
.nav-pill-ops { --pill-color: #22d3ee; --pill-glow: rgba(34, 211, 238, 0.5); --pill-bg: rgba(34, 211, 238, 0.12); }
|
||||
.nav-pill-settings { --pill-color: #e2e8f0; --pill-glow: rgba(226, 232, 240, 0.35); --pill-bg: rgba(226, 232, 240, 0.08); }
|
||||
|
||||
/* Group labels — subtiel gekleurd */
|
||||
.topnav-group {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.3rem;
|
||||
padding: 0.35rem 0.65rem;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.04);
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.topnav-group:first-of-type { border-left: none; }
|
||||
.topnav-group-system { margin-left: auto; }
|
||||
|
||||
.topnav-label {
|
||||
font-size: 0.58rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: #64748b;
|
||||
margin-right: 0.15rem;
|
||||
padding: 0.2rem 0.35rem;
|
||||
border-radius: 4px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.topnav-group-crm .topnav-label { color: #38bdf8; }
|
||||
.topnav-group-intel .topnav-label { color: #b8ff3c; }
|
||||
.topnav-group-hermes .topnav-label { color: #2aabee; }
|
||||
.topnav-group-agents .topnav-label { color: #00e5ff; }
|
||||
|
||||
/* Override legacy palantir topnav link styles */
|
||||
.topnav-group a.nav-pill {
|
||||
margin: 0;
|
||||
}
|
||||
.topnav-group a.nav-pill:hover,
|
||||
.topnav-group a.nav-pill.active {
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
}
|
||||
|
||||
.topbar {
|
||||
padding: 0.65rem 1.25rem 0.35rem;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.topnav-label { display: none; }
|
||||
.nav-pill { padding: 0.4rem 0.65rem; font-size: 0.75rem; }
|
||||
.topnav-group { padding: 0.25rem 0.4rem; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.nav-pill.active { animation: none; }
|
||||
.nav-pill:hover { transform: none; }
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
/* Vertical tab navigation with animated active indicator */
|
||||
|
||||
.vtabs-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 220px 1fr;
|
||||
gap: 1rem;
|
||||
align-items: start;
|
||||
min-height: 60vh;
|
||||
}
|
||||
.vtabs-nav {
|
||||
position: sticky;
|
||||
top: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.35rem;
|
||||
padding: 0.75rem;
|
||||
border-radius: 14px;
|
||||
background: rgba(10, 14, 20, 0.85);
|
||||
border: 1px solid rgba(148, 163, 184, 0.12);
|
||||
overflow: hidden;
|
||||
}
|
||||
.vtabs-nav::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: var(--vt-indicator-top, 0);
|
||||
width: 3px;
|
||||
height: var(--vt-indicator-h, 40px);
|
||||
background: linear-gradient(180deg, var(--vt-color, #00e5ff), transparent);
|
||||
border-radius: 0 4px 4px 0;
|
||||
transition: top 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), height 0.25s ease;
|
||||
box-shadow: 0 0 12px var(--vt-color, #00e5ff);
|
||||
}
|
||||
.vtab-btn {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
width: 100%;
|
||||
padding: 0.65rem 0.85rem;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
color: #94a3b8;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s, background 0.25s, transform 0.2s;
|
||||
text-decoration: none;
|
||||
}
|
||||
.vtab-btn:hover {
|
||||
color: #e2e8f0;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
transform: translateX(4px);
|
||||
}
|
||||
.vtab-btn.active {
|
||||
color: #fff;
|
||||
background: color-mix(in srgb, var(--vt-color, #00e5ff) 12%, transparent);
|
||||
text-shadow: 0 0 10px color-mix(in srgb, var(--vt-color, #00e5ff) 50%, transparent);
|
||||
}
|
||||
.vtab-icon { font-size: 1.1rem; flex-shrink: 0; }
|
||||
.vtabs-content { min-width: 0; animation: vtabFadeIn 0.35s ease; }
|
||||
@keyframes vtabFadeIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* App sidebar layout */
|
||||
.app-shell {
|
||||
display: grid;
|
||||
grid-template-columns: 200px 1fr;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.app-sidebar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
padding: 1rem 0.65rem;
|
||||
background: linear-gradient(180deg, rgba(8, 12, 18, 0.98), rgba(12, 18, 28, 0.95));
|
||||
border-right: 1px solid rgba(148, 163, 184, 0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.app-sidebar-brand {
|
||||
padding: 0.5rem 0.75rem 1rem;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.08);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.app-sidebar-brand .brand-title { font-size: 0.65rem; letter-spacing: 0.12em; color: #64748b; margin: 0; }
|
||||
.app-sidebar-brand .brand-name { font-size: 1rem; font-weight: 700; color: #e2e8f0; margin: 0.15rem 0 0; }
|
||||
.app-sidebar-group { margin-bottom: 0.75rem; }
|
||||
.app-sidebar-label {
|
||||
font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em;
|
||||
color: #64748b; padding: 0.25rem 0.75rem; margin-bottom: 0.25rem;
|
||||
}
|
||||
.app-sidebar .nav-pill {
|
||||
display: flex; width: 100%; justify-content: flex-start;
|
||||
margin-bottom: 0.2rem; border-radius: 10px;
|
||||
animation: none;
|
||||
}
|
||||
.app-sidebar .nav-pill.active { animation: nav-pill-pulse 2.5s ease-in-out infinite; }
|
||||
.app-main { min-width: 0; }
|
||||
.app-topbar {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
padding: 0.65rem 1.25rem; border-bottom: 1px solid rgba(148, 163, 184, 0.08);
|
||||
background: rgba(8, 12, 18, 0.6);
|
||||
}
|
||||
.app-clock {
|
||||
font-family: ui-monospace, monospace; font-size: 0.85rem; color: #94a3b8;
|
||||
}
|
||||
.app-clock strong { color: #e2e8f0; }
|
||||
.main-topnav { padding: 1rem 1.25rem; }
|
||||
|
||||
/* Mobile layout → see mobile.css */
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img">
|
||||
<rect width="512" height="512" rx="96" fill="#0a0e14"/>
|
||||
<rect x="32" y="32" width="448" height="448" rx="80" fill="none" stroke="#fbbf24" stroke-width="12"/>
|
||||
<text x="256" y="290" text-anchor="middle" font-size="200" font-family="system-ui,sans-serif" fill="#fbbf24">F</text>
|
||||
<circle cx="400" cy="112" r="28" fill="#22c55e"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 415 B |
@@ -0,0 +1,109 @@
|
||||
(function () {
|
||||
const NS = 'http://www.w3.org/2000/svg';
|
||||
|
||||
function make(tag, attrs = {}) {
|
||||
const el = document.createElementNS(NS, tag);
|
||||
Object.entries(attrs).forEach(([k, v]) => el.setAttribute(k, String(v)));
|
||||
return el;
|
||||
}
|
||||
|
||||
function clear(el) {
|
||||
while (el.firstChild) el.removeChild(el.firstChild);
|
||||
}
|
||||
|
||||
function curvePath(x1, y1, x2, y2) {
|
||||
const cx1 = x1 + (x2 - x1) * 0.35;
|
||||
const cy1 = y1;
|
||||
const cx2 = x1 + (x2 - x1) * 0.72;
|
||||
const cy2 = y2;
|
||||
return `M ${x1} ${y1} C ${cx1} ${cy1}, ${cx2} ${cy2}, ${x2} ${y2}`;
|
||||
}
|
||||
|
||||
async function loadMeshData() {
|
||||
const r = await fetch('/api/agents/mesh');
|
||||
if (!r.ok) throw new Error('Mesh API unavailable');
|
||||
return r.json();
|
||||
}
|
||||
|
||||
function drawMesh(svg, data) {
|
||||
clear(svg);
|
||||
const vb = svg.viewBox.baseVal;
|
||||
const width = vb && vb.width ? vb.width : 1000;
|
||||
const height = vb && vb.height ? vb.height : 620;
|
||||
const cx = width / 2;
|
||||
const cy = height / 2;
|
||||
const radius = Math.min(width, height) * 0.35;
|
||||
|
||||
const souls = (data.nodes || []).filter((n) => (n.agent_key || '').toLowerCase() !== 'herman');
|
||||
const edgesBySource = {};
|
||||
(data.edges || []).forEach((e) => { edgesBySource[e.source] = e; });
|
||||
|
||||
souls.forEach((node, i) => {
|
||||
const a = (Math.PI * 2 * i) / Math.max(1, souls.length) - Math.PI / 2;
|
||||
node._x = cx + Math.cos(a) * radius;
|
||||
node._y = cy + Math.sin(a) * radius;
|
||||
});
|
||||
|
||||
const edgesLayer = make('g');
|
||||
const nodesLayer = make('g');
|
||||
svg.appendChild(edgesLayer);
|
||||
svg.appendChild(nodesLayer);
|
||||
|
||||
souls.forEach((node) => {
|
||||
const pathDef = curvePath(node._x, node._y, cx, cy);
|
||||
const edge = make('path', { d: pathDef, class: 'mesh-edge' });
|
||||
edgesLayer.appendChild(edge);
|
||||
|
||||
if (edgesBySource[node.agent_key]) {
|
||||
const pulse = make('path', { d: pathDef, class: 'mesh-pulse' });
|
||||
pulse.style.animationDuration = `${Math.max(1.2, 3.5 - Math.min(2.2, edgesBySource[node.agent_key].weight / 8))}s`;
|
||||
edgesLayer.appendChild(pulse);
|
||||
}
|
||||
});
|
||||
|
||||
const herman = make('g', { class: 'mesh-node mesh-herman' });
|
||||
herman.appendChild(make('circle', { class: 'ring', cx, cy, r: 62 }));
|
||||
herman.appendChild(make('circle', { class: 'main', cx, cy, r: 46 }));
|
||||
const crown = make('text', { x: cx, y: cy - 2, 'font-size': 24, 'text-anchor': 'middle' });
|
||||
crown.textContent = '👑';
|
||||
herman.appendChild(crown);
|
||||
const label = make('text', { x: cx, y: cy + 22 });
|
||||
label.textContent = 'Herman · Co-CEO';
|
||||
herman.appendChild(label);
|
||||
nodesLayer.appendChild(herman);
|
||||
|
||||
souls.forEach((node) => {
|
||||
const group = make('g', { class: `mesh-node ${node.health || 'idle'}` });
|
||||
group.appendChild(make('circle', { cx: node._x, cy: node._y, r: 24 }));
|
||||
const shortName = (node.display_name || node.agent_key || '?').split(' ')[0];
|
||||
const t = make('text', { x: node._x, y: node._y + 4 });
|
||||
t.textContent = shortName;
|
||||
group.appendChild(t);
|
||||
const role = make('text', { x: node._x, y: node._y + 42, 'font-size': 10, opacity: 0.82 });
|
||||
role.textContent = node.role_title || node.agent_key;
|
||||
group.appendChild(role);
|
||||
group.addEventListener('click', () => {
|
||||
if (window.Cockpit && Cockpit.toast) {
|
||||
Cockpit.toast(`${node.display_name || node.agent_key}: ${node.health || 'idle'}`, 'success');
|
||||
}
|
||||
});
|
||||
nodesLayer.appendChild(group);
|
||||
});
|
||||
}
|
||||
|
||||
async function mount(targetId) {
|
||||
const svg = document.getElementById(targetId);
|
||||
if (!svg) return;
|
||||
try {
|
||||
const data = await loadMeshData();
|
||||
drawMesh(svg, data);
|
||||
} catch (e) {
|
||||
clear(svg);
|
||||
const msg = make('text', { x: 32, y: 40, fill: '#ef4444', 'font-size': 14 });
|
||||
msg.textContent = 'Mesh kon niet geladen worden';
|
||||
svg.appendChild(msg);
|
||||
}
|
||||
}
|
||||
|
||||
window.AgentsMesh = { mount };
|
||||
})();
|
||||
@@ -0,0 +1,181 @@
|
||||
window.AnalyticsCharts = (function () {
|
||||
var charts = {};
|
||||
var colors = {
|
||||
gold: 'rgba(252, 211, 77, 0.85)', cyan: 'rgba(56, 189, 248, 0.85)',
|
||||
green: 'rgba(74, 222, 128, 0.85)', red: 'rgba(251, 113, 133, 0.85)',
|
||||
purple: 'rgba(168, 85, 247, 0.85)', orange: 'rgba(255, 159, 67, 0.85)',
|
||||
gray: 'rgba(159, 176, 196, 0.85)', grid: 'rgba(159, 176, 196, 0.12)', text: '#c8d4e0',
|
||||
};
|
||||
var palette = [colors.gold, colors.cyan, colors.green, colors.purple, colors.orange, colors.red, colors.gray];
|
||||
|
||||
function destroyAll() {
|
||||
Object.keys(charts).forEach(function (k) {
|
||||
if (charts[k]) { charts[k].destroy(); charts[k] = null; }
|
||||
});
|
||||
}
|
||||
|
||||
function barChart(id, labels, values, label, horizontal) {
|
||||
var canvas = document.getElementById(id);
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
if (charts[id]) charts[id].destroy();
|
||||
charts[id] = new Chart(canvas, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{ label: label, data: values, backgroundColor: palette.slice(0, labels.length), borderRadius: 6 }],
|
||||
},
|
||||
options: {
|
||||
indexAxis: horizontal ? 'y' : 'x',
|
||||
responsive: true,
|
||||
plugins: { legend: { display: false } },
|
||||
scales: {
|
||||
x: { ticks: { color: colors.text, maxRotation: 45 }, grid: { color: colors.grid } },
|
||||
y: { ticks: { color: colors.text }, grid: { color: colors.grid } },
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function doughnut(id, labels, values) {
|
||||
var canvas = document.getElementById(id);
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
if (charts[id]) charts[id].destroy();
|
||||
charts[id] = new Chart(canvas, {
|
||||
type: 'doughnut',
|
||||
data: { labels: labels, datasets: [{ data: values, backgroundColor: palette, borderWidth: 0 }] },
|
||||
options: { responsive: true, plugins: { legend: { position: 'bottom', labels: { color: colors.text, boxWidth: 12 } } } },
|
||||
});
|
||||
}
|
||||
|
||||
function lineChart(id, labels, values) {
|
||||
var canvas = document.getElementById(id);
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
if (charts[id]) charts[id].destroy();
|
||||
charts[id] = new Chart(canvas, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{ data: values, borderColor: colors.cyan, backgroundColor: 'rgba(56,189,248,0.15)', fill: true, tension: 0.3 }],
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
plugins: { legend: { display: false } },
|
||||
scales: {
|
||||
x: { ticks: { color: colors.text }, grid: { color: colors.grid } },
|
||||
y: { ticks: { color: colors.text }, grid: { color: colors.grid } },
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function renderKpis(container, kpis) {
|
||||
if (!container || !kpis) return;
|
||||
var items = [
|
||||
['Klanten totaal', kpis.clients_total], ['Actieve klanten', kpis.clients_active],
|
||||
['Pipeline €', '€' + Math.round(kpis.pipeline_eur || 0).toLocaleString('nl-NL')],
|
||||
['Supermarkten', kpis.supermarkets], ['Groothandels', kpis.wholesalers],
|
||||
['CRM actief', kpis.crm_partnerships], ['RSS items', kpis.rss_items],
|
||||
['Bookmarks', kpis.rss_bookmarks], ['Promo's', kpis.promo_campaigns],
|
||||
['Agent events', kpis.agent_events], ['Goedkeuringen', kpis.pending_approvals],
|
||||
['Contacten SM', kpis.contacts_supermarket], ['NAS docs', kpis.nas_docs],
|
||||
];
|
||||
container.innerHTML = items.map(function (it) {
|
||||
return '<div class="kpi-card"><span>' + it[0] + '</span><strong>' + it[1] + '</strong></div>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderTables(data) {
|
||||
var dealsEl = document.getElementById('analytics-deals-table');
|
||||
var eventsEl = document.getElementById('analytics-events-table');
|
||||
if (dealsEl) {
|
||||
dealsEl.innerHTML = (data.recent_deals || []).map(function (d) {
|
||||
return '<tr><td>' + (d.title || '—') + '</td><td>' + (d.stage || '') + '</td><td>€' + Math.round(Number(d.value || 0)).toLocaleString('nl-NL') + '</td></tr>';
|
||||
}).join('') || '<tr><td colspan="3">Geen deals</td></tr>';
|
||||
}
|
||||
if (eventsEl) {
|
||||
eventsEl.innerHTML = (data.recent_events || []).map(function (e) {
|
||||
var t = (e.created_at || '').substring(0, 16).replace('T', ' ');
|
||||
return '<tr><td>' + (e.agent_name || '') + '</td><td>' + (e.title || e.event_type || '') + '</td><td>' + t + '</td></tr>';
|
||||
}).join('') || '<tr><td colspan="3">Geen events</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
function render(data) {
|
||||
if (!data) return;
|
||||
renderKpis(document.getElementById('analytics-kpis'), data.kpis);
|
||||
barChart('chart-deals', (data.deals_by_stage || []).map(function (r) { return r.stage; }),
|
||||
(data.deals_by_stage || []).map(function (r) { return Number(r.total || r.cnt || 0); }), 'EUR');
|
||||
barChart('chart-clients', (data.clients_by_stage || []).map(function (r) { return r.stage; }),
|
||||
(data.clients_by_stage || []).map(function (r) { return Number(r.cnt || 0); }), 'Klanten');
|
||||
barChart('chart-chains', (data.supermarkets_by_chain || []).map(function (r) { return r.chain; }),
|
||||
(data.supermarkets_by_chain || []).map(function (r) { return Number(r.cnt || 0); }), 'Filialen');
|
||||
doughnut('chart-provinces', (data.supermarkets_by_province || []).map(function (r) { return r.province; }),
|
||||
(data.supermarkets_by_province || []).map(function (r) { return Number(r.cnt || 0); }));
|
||||
doughnut('chart-partnerships', (data.partnership_breakdown || []).map(function (r) { return r.status; }),
|
||||
(data.partnership_breakdown || []).map(function (r) { return Number(r.cnt || 0); }));
|
||||
barChart('chart-agents', (data.events_by_agent || []).map(function (r) { return r.agent_name; }),
|
||||
(data.events_by_agent || []).map(function (r) { return Number(r.cnt || 0); }), 'Events', true);
|
||||
lineChart('chart-timeline', (data.events_timeline || []).map(function (r) { return String(r.day || '').substring(5); }),
|
||||
(data.events_timeline || []).map(function (r) { return Number(r.cnt || 0); }));
|
||||
doughnut('chart-rss', (data.rss_by_category || []).map(function (r) { return r.category || 'other'; }),
|
||||
(data.rss_by_category || []).map(function (r) { return Number(r.cnt || 0); }));
|
||||
barChart('chart-wholesale', (data.wholesalers_by_province || []).map(function (r) { return r.province; }),
|
||||
(data.wholesalers_by_province || []).map(function (r) { return Number(r.cnt || 0); }), 'GH');
|
||||
doughnut('chart-sentiment', (data.sentiment_distribution || []).map(function (r) { return r.sentiment_label || 'neutral'; }),
|
||||
(data.sentiment_distribution || []).map(function (r) { return Number(r.cnt || 0); }));
|
||||
barChart('chart-words', (data.top_words || []).slice(0, 10).map(function (r) { return r.lemma; }),
|
||||
(data.top_words || []).slice(0, 10).map(function (r) { return Number(r.total || 0); }), 'Count', true);
|
||||
barChart('chart-opportunities', (data.top_opportunities || []).map(function (r) { return (r.chain || '') + ' ' + (r.city || ''); }),
|
||||
(data.top_opportunities || []).map(function (r) { return Math.round(Number(r.halal_opportunity_score || 0)); }), 'Score', true);
|
||||
barChart('chart-promo', (data.promo_by_chain || []).map(function (r) { return r.chain || '?'; }),
|
||||
(data.promo_by_chain || []).map(function (r) { return Number(r.cnt || 0); }), 'Promo');
|
||||
doughnut('chart-milestones', (data.milestones_by_status || []).map(function (r) { return r.status; }),
|
||||
(data.milestones_by_status || []).map(function (r) { return Number(r.cnt || 0); }));
|
||||
renderTables(data);
|
||||
}
|
||||
|
||||
return { render: render, destroyAll: destroyAll };
|
||||
})();
|
||||
|
||||
function analyticsHub() {
|
||||
return {
|
||||
loading: false,
|
||||
updatedAt: '—',
|
||||
liveLabel: 'Live',
|
||||
f: { chain: '', province: '', stage: '', agent: '', days: 90 },
|
||||
meta: {},
|
||||
_pollStop: null,
|
||||
init() {
|
||||
var initial = window.ANALYTICS_INITIAL || {};
|
||||
this.meta = initial.filter_meta || {};
|
||||
AnalyticsCharts.render(initial);
|
||||
this.updatedAt = (initial.generated_at || '').substring(0, 19).replace('T', ' ');
|
||||
this._pollStop = CockpitLive.startPolling(function () { return this.refresh(false); }.bind(this), 30000);
|
||||
},
|
||||
params() {
|
||||
var p = new URLSearchParams();
|
||||
Object.entries(this.f).forEach(function (e) {
|
||||
if (e[1] !== null && e[1] !== '' && e[1] !== undefined) p.set(e[0], e[1]);
|
||||
});
|
||||
return p.toString();
|
||||
},
|
||||
async refresh(toast) {
|
||||
this.loading = true;
|
||||
try {
|
||||
var data = await fetch('/analytics/api/data?' + this.params()).then(function (r) { return r.json(); });
|
||||
this.meta = data.filter_meta || this.meta;
|
||||
AnalyticsCharts.render(data);
|
||||
this.updatedAt = (data.generated_at || '').substring(0, 19).replace('T', ' ');
|
||||
if (toast !== false) Cockpit.toast('Analytics bijgewerkt', 'success');
|
||||
} catch (e) {
|
||||
if (toast !== false) Cockpit.toast(e.message, 'error');
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
resetFilters() {
|
||||
this.f = { chain: '', province: '', stage: '', agent: '', days: 90 };
|
||||
this.refresh();
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
window.beursHub = function () {
|
||||
return {
|
||||
tab: new URLSearchParams(location.search).get('tab') || 'beurs',
|
||||
busy: false,
|
||||
lastRefresh: '',
|
||||
listed: [],
|
||||
unlisted: [],
|
||||
summary: {},
|
||||
trends: { halal_meat_trends: [], top_dishes: [], market_trends: [] },
|
||||
concepts: [],
|
||||
events: [],
|
||||
platformStats: {},
|
||||
eventFilter: '',
|
||||
pollTimer: null,
|
||||
indicatorStyle: { left: '0%', width: '25%' },
|
||||
|
||||
init() {
|
||||
this.updateIndicator();
|
||||
this.refreshAll();
|
||||
this.pollTimer = setInterval(() => {
|
||||
if (this.tab === 'events') this.loadEvents(false);
|
||||
}, 5000);
|
||||
},
|
||||
|
||||
setTab(t) {
|
||||
this.tab = t;
|
||||
const url = new URL(location.href);
|
||||
url.searchParams.set('tab', t);
|
||||
history.replaceState({}, '', url);
|
||||
this.updateIndicator();
|
||||
if (t === 'trends' && !this.trends.halal_meat_trends?.length) this.loadTrends();
|
||||
if (t === 'concepten' && !this.concepts.length) this.loadConcepts();
|
||||
if (t === 'events') this.loadEvents();
|
||||
},
|
||||
|
||||
updateIndicator() {
|
||||
const tabs = ['beurs', 'trends', 'concepten', 'events'];
|
||||
const i = tabs.indexOf(this.tab);
|
||||
const w = 100 / tabs.length;
|
||||
this.indicatorStyle = { left: (i * w) + '%', width: w + '%' };
|
||||
},
|
||||
|
||||
sparkPoints(arr) {
|
||||
if (!arr || !arr.length) return '';
|
||||
const min = Math.min.apply(null, arr);
|
||||
const max = Math.max.apply(null, arr);
|
||||
const range = max - min || 1;
|
||||
return arr.map(function (v, idx) {
|
||||
var x = (idx / (arr.length - 1 || 1)) * 100;
|
||||
var y = 28 - ((v - min) / range) * 24;
|
||||
return x.toFixed(1) + ',' + y.toFixed(1);
|
||||
}).join(' ');
|
||||
},
|
||||
|
||||
async refreshAll() {
|
||||
this.busy = true;
|
||||
try {
|
||||
await Promise.all([
|
||||
this.loadMarket(),
|
||||
this.loadTrends(),
|
||||
this.loadConcepts(),
|
||||
this.loadEvents(false),
|
||||
]);
|
||||
this.lastRefresh = new Date().toLocaleString('nl-NL');
|
||||
if (typeof Cockpit !== 'undefined') Cockpit.toast('Beurs data bijgewerkt', 'success');
|
||||
} catch (e) {
|
||||
if (typeof Cockpit !== 'undefined') Cockpit.toast(e.message, 'error');
|
||||
}
|
||||
this.busy = false;
|
||||
},
|
||||
|
||||
async loadMarket() {
|
||||
const d = await fetch('/api/retail/market/supermarkets').then(function (r) { return r.json(); });
|
||||
this.listed = d.listed || [];
|
||||
this.unlisted = d.unlisted_nl || [];
|
||||
this.summary = d.summary || {};
|
||||
},
|
||||
|
||||
async loadTrends() {
|
||||
const d = await fetch('/api/retail/market/food-trends').then(function (r) { return r.json(); });
|
||||
this.trends = d;
|
||||
},
|
||||
|
||||
async loadConcepts() {
|
||||
const d = await fetch('/api/retail/market/concepts?limit=6').then(function (r) { return r.json(); });
|
||||
this.concepts = d.concepts || [];
|
||||
},
|
||||
|
||||
async loadEvents(toast) {
|
||||
var q = this.eventFilter ? '?limit=80&agent=' + encodeURIComponent(this.eventFilter) : '?limit=80';
|
||||
try {
|
||||
var r = await fetch('/api/live/platform' + q).then(function (x) { return x.json(); });
|
||||
this.events = r.events || [];
|
||||
this.platformStats = r.stats || {};
|
||||
} catch (e) {
|
||||
if (toast !== false && typeof Cockpit !== 'undefined') Cockpit.toast(e.message, 'error');
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,347 @@
|
||||
window.BriefingCharts = (function () {
|
||||
var charts = {};
|
||||
var typewriterTimer = null;
|
||||
|
||||
function destroyAll() {
|
||||
Object.keys(charts).forEach(function (k) {
|
||||
if (charts[k]) { charts[k].destroy(); charts[k] = null; }
|
||||
});
|
||||
}
|
||||
|
||||
function parseContent(content) {
|
||||
var parts = (content || '').split(/\n---\n/);
|
||||
var ai = parts[0] || '';
|
||||
var summary = '', actions = [], longTerm = [];
|
||||
var sm = ai.match(/##\s*Samenvatting\s*\n([\s\S]*?)(?=##\s*Actiepunten|##\s*Lange termijn|$)/i);
|
||||
if (sm) summary = sm[1].trim().replace(/\*\*/g, '');
|
||||
var am = ai.match(/##\s*Actiepunten[^\n]*\n([\s\S]*?)(?=##\s*Lange termijn|$)/i);
|
||||
if (am) actions = am[1].split('\n').map(function (l) { return l.replace(/^[-*]\s*/, '').trim(); }).filter(Boolean);
|
||||
var lm = ai.match(/##\s*Lange termijn[^\n]*\n([\s\S]*)/i);
|
||||
if (lm) longTerm = lm[1].split('\n').map(function (l) { return l.replace(/^[-*]\s*/, '').trim(); }).filter(Boolean);
|
||||
if (!summary && ai.trim()) summary = ai.trim().slice(0, 800).replace(/\*\*/g, '');
|
||||
return { summary: summary, actions: actions, longTerm: longTerm };
|
||||
}
|
||||
|
||||
function typewriter(el, text, speed) {
|
||||
if (!el) return;
|
||||
if (typewriterTimer) clearInterval(typewriterTimer);
|
||||
el.textContent = '';
|
||||
if (!text) { el.textContent = 'Klik «Genereer dagrapport» voor je persoonlijke Herman briefing.'; return; }
|
||||
var i = 0;
|
||||
typewriterTimer = setInterval(function () {
|
||||
if (i < text.length) { el.textContent += text.charAt(i); i++; }
|
||||
else clearInterval(typewriterTimer);
|
||||
}, speed || 8);
|
||||
}
|
||||
|
||||
function countUp(el, end, prefix, suffix) {
|
||||
if (!el) return;
|
||||
prefix = prefix || ''; suffix = suffix || '';
|
||||
var start = 0, dur = 600, t0 = performance.now();
|
||||
function step(t) {
|
||||
var p = Math.min(1, (t - t0) / dur);
|
||||
var v = Math.round(start + (end - start) * p);
|
||||
el.textContent = prefix + v.toLocaleString('nl-NL') + suffix;
|
||||
if (p < 1) requestAnimationFrame(step);
|
||||
}
|
||||
requestAnimationFrame(step);
|
||||
}
|
||||
|
||||
function chartColors() {
|
||||
return {
|
||||
gold: 'rgba(252, 211, 77, 0.9)', cyan: 'rgba(56, 189, 248, 0.9)',
|
||||
green: 'rgba(74, 222, 128, 0.9)', red: 'rgba(251, 113, 133, 0.9)',
|
||||
gray: 'rgba(159, 176, 196, 0.85)', grid: 'rgba(159, 176, 196, 0.15)', text: '#c8d4e0',
|
||||
};
|
||||
}
|
||||
|
||||
function renderPipeline(canvas, stats) {
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
var rows = stats.deals_by_stage || [];
|
||||
var c = chartColors();
|
||||
if (charts.pipeline) charts.pipeline.destroy();
|
||||
charts.pipeline = new Chart(canvas, {
|
||||
type: 'bar',
|
||||
data: { labels: rows.map(function (r) { return r.stage || '?'; }), datasets: [{ label: 'EUR', data: rows.map(function (r) { return Number(r.total) || 0; }), backgroundColor: c.gold, borderRadius: 6 }] },
|
||||
options: { responsive: true, plugins: { legend: { display: false }, title: { display: true, text: 'Pipeline per stage', color: c.text } },
|
||||
scales: { y: { ticks: { color: c.text, callback: function (v) { return '€' + v.toLocaleString('nl-NL'); } }, grid: { color: c.grid } }, x: { ticks: { color: c.text }, grid: { display: false } } } },
|
||||
});
|
||||
}
|
||||
|
||||
function renderSentiment(canvas, stats) {
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
var files = stats.nas_files || [], counts = { positive: 0, neutral: 0, negative: 0 };
|
||||
files.forEach(function (f) { var s = (f.sentiment_label || 'neutral').toLowerCase(); if (counts[s] !== undefined) counts[s]++; });
|
||||
if (!files.length) counts.neutral = 1;
|
||||
var c = chartColors();
|
||||
if (charts.sentiment) charts.sentiment.destroy();
|
||||
charts.sentiment = new Chart(canvas, {
|
||||
type: 'doughnut',
|
||||
data: { labels: ['Positief', 'Neutraal', 'Negatief'], datasets: [{ data: [counts.positive, counts.neutral, counts.negative], backgroundColor: [c.green, c.gray, c.red], borderWidth: 0 }] },
|
||||
options: { responsive: true, plugins: { legend: { position: 'bottom', labels: { color: c.text } }, title: { display: true, text: 'NAS sentiment', color: c.text } } },
|
||||
});
|
||||
}
|
||||
|
||||
function renderWords(canvas, stats) {
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
var rows = (stats.top_words || []).slice(0, 8), c = chartColors();
|
||||
if (charts.words) charts.words.destroy();
|
||||
charts.words = new Chart(canvas, {
|
||||
type: 'bar',
|
||||
data: { labels: rows.map(function (r) { return r.lemma; }), datasets: [{ data: rows.map(function (r) { return Number(r.total) || 0; }), backgroundColor: c.cyan, borderRadius: 6 }] },
|
||||
options: { indexAxis: 'y', responsive: true, plugins: { legend: { display: false }, title: { display: true, text: 'Top woorden NAS', color: c.text } },
|
||||
scales: { x: { ticks: { color: c.text }, grid: { color: c.grid } }, y: { ticks: { color: c.text }, grid: { display: false } } } },
|
||||
});
|
||||
}
|
||||
|
||||
function renderAgents(canvas, stats) {
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
var map = {};
|
||||
(stats.recent_events || []).forEach(function (e) { var a = e.agent_name || 'other'; map[a] = (map[a] || 0) + 1; });
|
||||
var labels = Object.keys(map), c = chartColors();
|
||||
if (charts.agents) charts.agents.destroy();
|
||||
charts.agents = new Chart(canvas, {
|
||||
type: 'polarArea',
|
||||
data: { labels: labels, datasets: [{ data: labels.map(function (k) { return map[k]; }), backgroundColor: [c.gold, c.cyan, c.green, c.red, c.gray] }] },
|
||||
options: { responsive: true, plugins: { legend: { position: 'bottom', labels: { color: c.text } }, title: { display: true, text: 'Agent activiteit', color: c.text } },
|
||||
scales: { r: { ticks: { display: false }, grid: { color: c.grid } } } },
|
||||
});
|
||||
}
|
||||
|
||||
function eqBars() {
|
||||
return '<div class="hm-eq"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div>';
|
||||
}
|
||||
|
||||
function sparklineSvg(values, trend) {
|
||||
if (!values || !values.length) return '';
|
||||
var min = Math.min.apply(null, values), max = Math.max.apply(null, values);
|
||||
var range = max - min || 1;
|
||||
var pts = values.map(function (v, i) {
|
||||
var x = (i / (values.length - 1 || 1)) * 100;
|
||||
var y = 100 - ((v - min) / range) * 80 - 10;
|
||||
return x.toFixed(1) + ',' + y.toFixed(1);
|
||||
}).join(' ');
|
||||
var color = trend === 'down' ? '#fb7185' : '#4ade80';
|
||||
return '<svg class="hm-spark" viewBox="0 0 100 100" preserveAspectRatio="none"><polyline fill="none" stroke="' + color + '" stroke-width="3" points="' + pts + '"/></svg>';
|
||||
}
|
||||
|
||||
function stockEqBars(trend) {
|
||||
var cls = trend === 'down' ? ' hm-eq-down' : '';
|
||||
return '<div class="hm-eq' + cls + '"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div>';
|
||||
}
|
||||
|
||||
function renderStocksMini(container, stats) {
|
||||
if (!container) return;
|
||||
var stocks = (stats.market_stocks || []).slice(0, 4);
|
||||
var summary = stats.market_summary || {};
|
||||
if (!stocks.length) {
|
||||
container.innerHTML = '<a href="/beurs" class="btn btn-sm">Beurs openen →</a>';
|
||||
return;
|
||||
}
|
||||
container.innerHTML = stocks.map(function (s) {
|
||||
var pct = Number(s.change_pct || 0);
|
||||
return '<a href="/beurs" class="beurs-mini-chip ' + (pct >= 0 ? 'up' : 'down') + '">' +
|
||||
'<strong>' + (s.symbol || s.name) + '</strong> ' +
|
||||
(pct >= 0 ? '+' : '') + pct.toFixed(2) + '%</a>';
|
||||
}).join('') + '<small style="display:block;margin-top:0.35rem;color:#64748b">Gem. ' +
|
||||
(summary.avg_change_pct || 0) + '% · <a href="/beurs">alle koersen →</a></small>';
|
||||
}
|
||||
|
||||
function renderStocks(container, stats) {
|
||||
if (!container) return;
|
||||
var stocks = stats.market_stocks || [];
|
||||
var summary = stats.market_summary || {};
|
||||
var meta = document.getElementById('market-updated-at');
|
||||
if (meta) {
|
||||
var avg = summary.avg_change_pct;
|
||||
meta.textContent = stocks.length ? ('Gem. ' + (avg >= 0 ? '+' : '') + Number(avg || 0).toFixed(2) + '% · ' + (summary.quote_count || stocks.length) + ' quotes') : 'Beurs data laden…';
|
||||
}
|
||||
if (!stocks.length) {
|
||||
container.innerHTML = '<p class="empty-state">Beursdata tijdelijk niet beschikbaar — probeer Live data opnieuw.</p>';
|
||||
return;
|
||||
}
|
||||
container.innerHTML = stocks.map(function (s) {
|
||||
var pct = Number(s.change_pct || 0);
|
||||
var up = pct >= 0;
|
||||
var price = s.price != null ? Number(s.price).toFixed(2) : '—';
|
||||
var cur = s.currency || 'EUR';
|
||||
return '<div class="hm-stock-card hm-stock-' + (s.trend || (up ? 'up' : 'down')) + '">' +
|
||||
'<div class="hm-stock-head"><div><strong>' + (s.symbol || '') + '</strong><small>' + (s.name || '') + '</small></div>' +
|
||||
'<span class="hm-stock-pct ' + (up ? 'up' : 'down') + '">' + (up ? '▲' : '▼') + ' ' + Math.abs(pct).toFixed(2) + '%</span></div>' +
|
||||
'<div class="hm-stock-price">' + price + ' <small>' + cur + '</small></div>' +
|
||||
'<div class="hm-stock-chain">' + (s.chain || s.market || '') + '</div>' +
|
||||
sparklineSvg(s.sparkline || [], s.trend) + stockEqBars(s.trend) + '</div>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderFoodHighlights(container, stats) {
|
||||
if (!container) return;
|
||||
var items = stats.food_market_highlights || stats.rss_highlights || [];
|
||||
if (!items.length) {
|
||||
container.innerHTML = '<p class="empty-state">Geen highlights — <a href="/marketing">RSS ophalen</a></p>';
|
||||
return;
|
||||
}
|
||||
container.innerHTML = items.map(function (r) {
|
||||
var cat = (r.category || 'markt').toUpperCase();
|
||||
return '<div class="hm-highlight-item"><span class="hm-cat-badge">' + cat + '</span>' +
|
||||
'<a href="' + (r.link || '#') + '" target="_blank" rel="noopener"><strong>' + (r.title || '') + '</strong></a>' +
|
||||
'<small>' + (r.feed_name || '') + '</small></div>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderRegulations(container, stats) {
|
||||
if (!container) return;
|
||||
var items = stats.regulation_highlights || [];
|
||||
if (!items.length) {
|
||||
container.innerHTML = '<p class="empty-state">Regelgeving feeds — klik RSS refresh in Retail 360</p>';
|
||||
return;
|
||||
}
|
||||
container.innerHTML = items.map(function (r) {
|
||||
var cat = r.category === 'cbs' ? 'CBS' : 'REG';
|
||||
return '<div class="hm-highlight-item"><span class="hm-cat-badge hm-cat-' + (r.category || 'reg') + '">' + cat + '</span>' +
|
||||
'<a href="' + (r.link || '#') + '" target="_blank" rel="noopener"><strong>' + (r.title || '') + '</strong></a>' +
|
||||
'<small>' + (r.feed_name || '') + '</small></div>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderTrends(canvas, stats) {
|
||||
if (!canvas || typeof Chart === 'undefined') return;
|
||||
var rows = stats.market_trends || [];
|
||||
var c = chartColors();
|
||||
if (charts.trends) charts.trends.destroy();
|
||||
if (!rows.length) return;
|
||||
charts.trends = new Chart(canvas, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: rows.map(function (r) { return (r.trend_name || '?').slice(0, 18); }),
|
||||
datasets: [{
|
||||
label: 'Kans %',
|
||||
data: rows.map(function (r) { return Math.round(Number(r.opportunity_score || 0) * 100); }),
|
||||
backgroundColor: [c.green, c.cyan, c.gold, c.purple || '#a855f7'],
|
||||
borderRadius: 6,
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
plugins: { legend: { display: false }, title: { display: true, text: 'Markt trend scores', color: c.text } },
|
||||
scales: {
|
||||
y: { max: 100, ticks: { color: c.text, callback: function (v) { return v + '%'; } }, grid: { color: c.grid } },
|
||||
x: { ticks: { color: c.text, maxRotation: 45 }, grid: { display: false } },
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function renderKpis(container, stats) {
|
||||
if (!container) return;
|
||||
var summary = stats.market_summary || {};
|
||||
var avgPct = Number(summary.avg_change_pct || 0);
|
||||
var best = summary.best_performer || {};
|
||||
var items = [
|
||||
{ label: 'Pipeline', sub: 'actieve deals', icon: '💰', color: '#00e5ff', pct: '72%', val: '€' + Math.round(stats.pipeline_eur || 0).toLocaleString('nl-NL') },
|
||||
{ label: 'Actieve klanten', sub: 'CRM · zaken mee', icon: '🤝', color: '#22c55e', pct: Math.min(95, Math.round(((stats.clients_active || 0) / Math.max(stats.clients_total || 1, 1)) * 100)) + '%', val: (stats.clients_active || 0) + ' / ' + (stats.clients_total || 0), link: '/clients' },
|
||||
{ label: 'CRM partnerships', sub: 'actieve filialen', icon: '🏪', color: '#ff9f43', pct: '45%', val: stats.crm_partnerships || 0, link: '/retail' },
|
||||
{ label: 'Supermarkten', sub: 'Retail 360 DB', icon: '🏪', color: '#b8ff3c', pct: '88%', val: (stats.supermarkets || 0).toLocaleString('nl-NL') },
|
||||
{ label: 'Halal kansen', sub: 'top score', icon: '🎯', color: '#a855f7', pct: '65%', val: stats.top_opportunities && stats.top_opportunities[0] ? Math.round(Number(stats.top_opportunities[0].halal_opportunity_score || 0)) + '/100' : '—' },
|
||||
{ label: 'Goedkeuringen', sub: 'wacht op OK', icon: '✓', color: '#ffd700', pct: '30%', val: stats.pending_approvals || 0 },
|
||||
];
|
||||
container.className = 'hm-neo-kpi-row';
|
||||
container.innerHTML = items.map(function (it) {
|
||||
var inner = '<div class="hm-neo-kpi"><div class="hm-neo-kpi-top">' +
|
||||
'<div class="hm-neo-ring" style="--ring-color:' + it.color + ';--ring-pct:' + it.pct + '"><div class="hm-neo-ring-inner">' + it.icon + '</div></div>' +
|
||||
'<div><div class="hm-neo-kpi-label">' + it.label + '</div><div class="hm-neo-kpi-sub">' + it.sub + '</div></div></div>' +
|
||||
'<div class="hm-neo-kpi-value">' + it.val + '</div>' + eqBars() + '</div>';
|
||||
return it.link ? '<a href="' + it.link + '" class="hm-neo-kpi-link">' + inner + '</a>' : inner;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderRetail(container, stats) {
|
||||
if (!container) return;
|
||||
var opps = stats.top_opportunities || [];
|
||||
if (!opps.length) { container.innerHTML = '<p class="empty-state">Geen kansen — <a href="/retail">open Retail 360</a></p>'; return; }
|
||||
container.innerHTML = opps.map(function (o) {
|
||||
var score = Math.round(Number(o.halal_opportunity_score) || 0);
|
||||
return '<a href="/retail" class="retail-highlight"><span><strong>' + (o.chain || '') + ' · ' + (o.name || '') + '</strong><br><small>' + (o.city || '') + '</small></span><span class="ticker-item">' + score + '/100</span></a>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderMilestones(container, stats) {
|
||||
if (!container) return;
|
||||
var ms = stats.milestones_pending || [];
|
||||
if (!ms.length) {
|
||||
container.innerHTML = '<p class="empty-state">Nog geen milestones — voeg toe via <a href="/retail">Retail 360 → Sales tab</a></p>';
|
||||
return;
|
||||
}
|
||||
container.innerHTML = ms.map(function (m) {
|
||||
return '<div class="milestone-item"><span class="milestone-dot"></span><div><strong>' + (m.title || '') + '</strong><br><small>' + (m.chain || '') + ' ' + (m.store_name || '') + '</small></div></div>';
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderExecutiveSummary(container, stats) {
|
||||
if (!container) return;
|
||||
var items = [
|
||||
{ icon: '🤝', label: 'Actieve klanten', val: (stats.clients_active || 0) + ' van ' + (stats.clients_total || stats.clients || 0), link: '/clients' },
|
||||
{ icon: '💰', label: 'Pipeline', val: '€' + Math.round(stats.pipeline_eur || 0).toLocaleString('nl-NL'), link: '/deals' },
|
||||
{ icon: '🏪', label: 'CRM partnerships', val: stats.crm_partnerships || 0, link: '/retail' },
|
||||
{ icon: '🛒', label: 'Supermarkten DB', val: (stats.supermarkets || 0).toLocaleString('nl-NL'), link: '/retail' },
|
||||
{ icon: '📦', label: 'Groothandels', val: stats.wholesalers || 0, link: '/retail' },
|
||||
{ icon: '✓', label: 'Goedkeuringen open', val: stats.pending_approvals || 0, link: '/' },
|
||||
{ icon: '📁', label: 'Actieve promo\'s', val: stats.promo_campaigns || '—', link: '/marketing?tab=reclame' },
|
||||
{ icon: '📊', label: 'NAS documenten', val: stats.nas_docs || 0, link: '/documents' },
|
||||
];
|
||||
var opps = (stats.top_opportunities || []).slice(0, 3);
|
||||
var ms = (stats.milestones_pending || []).slice(0, 3);
|
||||
var html = '<div class="hm-exec-grid">' + items.map(function (it) {
|
||||
return '<a href="' + it.link + '" class="hm-exec-item"><span class="hm-exec-icon">' + it.icon + '</span>' +
|
||||
'<div><strong>' + it.label + '</strong><div class="hm-exec-val">' + it.val + '</div></div></a>';
|
||||
}).join('') + '</div>';
|
||||
if (opps.length) {
|
||||
html += '<h4 style="margin:1rem 0 0.5rem;font-size:0.8rem;color:#94a3b8">Top halal kansen</h4><ul class="hm-exec-list">';
|
||||
opps.forEach(function (o) {
|
||||
html += '<li><a href="/retail">' + (o.chain || '') + ' · ' + (o.name || '') + ' (' + (o.city || '') + ') — ' + Math.round(Number(o.halal_opportunity_score || 0)) + '/100</a></li>';
|
||||
});
|
||||
html += '</ul>';
|
||||
}
|
||||
if (ms.length) {
|
||||
html += '<h4 style="margin:1rem 0 0.5rem;font-size:0.8rem;color:#94a3b8">Open milestones</h4><ul class="hm-exec-list">';
|
||||
ms.forEach(function (m) {
|
||||
html += '<li>' + (m.title || '') + ' · ' + (m.chain || '') + ' ' + (m.store_name || '') + '</li>';
|
||||
});
|
||||
html += '</ul>';
|
||||
}
|
||||
html += '<p class="hm-exec-footer" style="margin-top:1rem;font-size:0.8rem;color:#64748b">RSS & reclame folders → <a href="/marketing">Marketing Hub</a> · Volledige analytics → <a href="/analytics">Analytics</a></p>';
|
||||
container.innerHTML = html;
|
||||
}
|
||||
|
||||
function renderText(root, content, createdAt) {
|
||||
if (!root) return;
|
||||
var parsed = parseContent(content);
|
||||
var meta = document.getElementById('briefing-meta');
|
||||
if (meta && createdAt) meta.textContent = 'Laatst bijgewerkt: ' + String(createdAt).substring(0, 19).replace('T', ' ');
|
||||
typewriter(document.getElementById('briefing-summary-text'), parsed.summary, 8);
|
||||
var actEl = document.getElementById('briefing-actions-list');
|
||||
if (actEl) actEl.innerHTML = parsed.actions.length ? parsed.actions.map(function (a) { return '<li>' + a + '</li>'; }).join('') : '<li>Genereer dagrapport voor actiepunten</li>';
|
||||
var longEl = document.getElementById('briefing-longterm-list');
|
||||
if (longEl) longEl.innerHTML = parsed.longTerm.length ? parsed.longTerm.map(function (a) { return '<li>' + a + '</li>'; }).join('') : '<li>Halal kant-en-klaar partnerships schalen</li>';
|
||||
}
|
||||
|
||||
function renderLive(root, stats) {
|
||||
if (!root || !stats) return;
|
||||
renderKpis(document.getElementById('briefing-kpis'), stats);
|
||||
renderFoodHighlights(document.getElementById('briefing-food-highlights'), stats);
|
||||
renderExecutiveSummary(document.getElementById('briefing-executive-summary'), stats);
|
||||
renderRetail(document.getElementById('briefing-retail'), stats);
|
||||
renderMilestones(document.getElementById('briefing-milestones'), stats);
|
||||
renderPipeline(document.getElementById('chart-pipeline'), stats);
|
||||
renderSentiment(document.getElementById('chart-sentiment'), stats);
|
||||
renderWords(document.getElementById('chart-words'), stats);
|
||||
renderAgents(document.getElementById('chart-agents'), stats);
|
||||
}
|
||||
|
||||
function render(root, stats, content, createdAt) {
|
||||
renderLive(root, stats);
|
||||
renderText(root, content, createdAt);
|
||||
}
|
||||
|
||||
return { render: render, renderLive: renderLive, renderText: renderText, renderExecutiveSummary: renderExecutiveSummary, destroyAll: destroyAll };
|
||||
})();
|
||||
@@ -0,0 +1,75 @@
|
||||
window.Cockpit = (function () {
|
||||
const API = '/api/admin';
|
||||
|
||||
function toast(message, type) {
|
||||
type = type || 'info';
|
||||
let root = document.getElementById('cockpit-toasts');
|
||||
if (!root) {
|
||||
root = document.createElement('div');
|
||||
root.id = 'cockpit-toasts';
|
||||
root.className = 'toast-container';
|
||||
document.body.appendChild(root);
|
||||
}
|
||||
const el = document.createElement('div');
|
||||
el.className = 'toast toast-' + type;
|
||||
el.textContent = message;
|
||||
root.appendChild(el);
|
||||
setTimeout(function () { el.classList.add('toast-out'); setTimeout(function () { el.remove(); }, 300); }, 3500);
|
||||
}
|
||||
|
||||
function clearEmbeddedIframes() {
|
||||
document.querySelectorAll('iframe.browser-novnc, iframe[data-clear-on-nav]').forEach(function (f) {
|
||||
try { f.src = 'about:blank'; } catch (e) {}
|
||||
});
|
||||
}
|
||||
|
||||
async function request(path, options) {
|
||||
options = options || {};
|
||||
const url = path.startsWith('http') || path.startsWith('/api/') ? path : API + path;
|
||||
const headers = Object.assign({ 'Content-Type': 'application/json' }, options.headers || {});
|
||||
const fetchOpts = Object.assign({}, options, { headers: headers });
|
||||
if (options.signal) fetchOpts.signal = options.signal;
|
||||
const res = await fetch(url, fetchOpts);
|
||||
let data = null;
|
||||
try { data = await res.json(); } catch (e) { data = null; }
|
||||
if (!res.ok) {
|
||||
const msg = (data && (data.detail || data.message)) || res.statusText;
|
||||
throw new Error(typeof msg === 'string' ? msg : JSON.stringify(msg));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
function confirmDelete(message) {
|
||||
return window.confirm(message || 'Delete this item?');
|
||||
}
|
||||
|
||||
function openDrawer(id) {
|
||||
document.body.classList.add('drawer-open');
|
||||
var el = document.getElementById(id);
|
||||
if (el) el.classList.add('open');
|
||||
}
|
||||
|
||||
function closeDrawer(id) {
|
||||
document.body.classList.remove('drawer-open');
|
||||
if (id) {
|
||||
var el = document.getElementById(id);
|
||||
if (el) el.classList.remove('open');
|
||||
}
|
||||
document.querySelectorAll('.drawer.open').forEach(function (d) { d.classList.remove('open'); });
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') closeDrawer();
|
||||
});
|
||||
|
||||
document.addEventListener('click', function (e) {
|
||||
var link = e.target.closest('a[href]');
|
||||
if (!link || link.target === '_blank' || link.hasAttribute('download')) return;
|
||||
var href = link.getAttribute('href') || '';
|
||||
if (!href || href.charAt(0) === '#') return;
|
||||
if (href.indexOf('6080') !== -1 || href.indexOf('7788') !== -1) return;
|
||||
if (href.charAt(0) === '/' || href.indexOf('http') === 0) clearEmbeddedIframes();
|
||||
}, true);
|
||||
|
||||
return { toast: toast, api: request, confirmDelete: confirmDelete, openDrawer: openDrawer, closeDrawer: closeDrawer, clearIframes: clearEmbeddedIframes };
|
||||
})();
|
||||
@@ -0,0 +1,346 @@
|
||||
/**
|
||||
* Hermes Neo Command Center
|
||||
*/
|
||||
function hermesControl() {
|
||||
const PA_SITES = ['Airbnb', 'Booking.com', 'DuckDuckGo', 'HolidayCheck'];
|
||||
|
||||
/** Canonical team — never duplicate role as name */
|
||||
const ROSTER = [
|
||||
{ chat_id: 8859782446, role: 'CEO', name: 'Aïssa' },
|
||||
{ chat_id: 789036463, role: 'CTO', name: 'Mo' },
|
||||
];
|
||||
|
||||
return {
|
||||
tab: 'feed',
|
||||
live: true,
|
||||
stats: { conversations: 0, messages: 0, edges: 0, embeddings: 0, inbound: 0, outbound: 0 },
|
||||
conversations: [],
|
||||
messages: [],
|
||||
users: [],
|
||||
agentEvents: [],
|
||||
selectedChatId: null,
|
||||
graphChatFilter: '',
|
||||
searchQuery: '',
|
||||
searchResults: [],
|
||||
searchRan: false,
|
||||
graphNetwork: null,
|
||||
pollTimer: null,
|
||||
paPollTimer: null,
|
||||
paPolling: false,
|
||||
paLive: { status: 'idle', query: '', slots: [] },
|
||||
paScreenshotTs: Date.now(),
|
||||
hermesOnline: false,
|
||||
hermesStatus: {},
|
||||
actionBusy: false,
|
||||
actionMsg: '',
|
||||
chartDirection: null,
|
||||
chartAgents: null,
|
||||
|
||||
get teamRoster() {
|
||||
const byId = {};
|
||||
(this.users || []).forEach(u => { byId[u.chat_id] = u; });
|
||||
(this.conversations || []).forEach(c => {
|
||||
if (!byId[c.chat_id]) byId[c.chat_id] = c;
|
||||
else {
|
||||
byId[c.chat_id].message_count = c.message_count || byId[c.chat_id].message_count;
|
||||
}
|
||||
});
|
||||
return ROSTER.map(r => ({
|
||||
...r,
|
||||
online: !!(byId[r.chat_id]?.online),
|
||||
pa_mode: !!(byId[r.chat_id]?.pa_mode),
|
||||
message_count: byId[r.chat_id]?.message_count || 0,
|
||||
}));
|
||||
},
|
||||
|
||||
get paLiveUser() {
|
||||
const cid = this.paLive.chat_id;
|
||||
if (!cid) return '';
|
||||
const m = ROSTER.find(r => r.chat_id === cid);
|
||||
return m ? `${m.role} — ${m.name}` : this.paLive.user_name || '';
|
||||
},
|
||||
|
||||
get paSlots() {
|
||||
const slots = this.paLive.slots || [];
|
||||
if (slots.length >= 4) return slots;
|
||||
const byLabel = {};
|
||||
slots.forEach(s => { byLabel[s.label] = s; });
|
||||
return PA_SITES.map(label => byLabel[label] || {
|
||||
label, status: 'idle', has_screenshot: false,
|
||||
});
|
||||
},
|
||||
|
||||
rosterPerson(chatId) {
|
||||
return ROSTER.find(r => r.chat_id === Number(chatId)) || null;
|
||||
},
|
||||
|
||||
msgLabel(msg) {
|
||||
const p = this.rosterPerson(msg.chat_id);
|
||||
if (p) return `${p.role} (${p.name})`;
|
||||
if (msg.user_role && msg.user_name) return `${msg.user_role} (${msg.user_name})`;
|
||||
return msg.user_role || msg.chat_id || '?';
|
||||
},
|
||||
|
||||
async init() {
|
||||
const hash = (window.location.hash || '').replace('#', '');
|
||||
if (['feed', 'pa', 'graph', 'search', 'control'].includes(hash)) this.tab = hash;
|
||||
await this.refreshStats();
|
||||
await this.refreshConversations();
|
||||
await this.refreshUsers();
|
||||
await this.refreshFeed();
|
||||
await this.refreshPaLive();
|
||||
setTimeout(() => this.initCharts(), 200);
|
||||
this.pollTimer = setInterval(() => {
|
||||
if (this.tab === 'feed' && this.live) this.refreshFeed(true);
|
||||
}, 5000);
|
||||
this.paPollTimer = setInterval(() => {
|
||||
if (this.tab === 'pa' || this.paLive.status === 'running') this.refreshPaLive(true);
|
||||
}, 2000);
|
||||
window.addEventListener('hashchange', () => {
|
||||
const h = (window.location.hash || '').replace('#', '');
|
||||
if (['feed', 'pa', 'graph', 'search', 'control'].includes(h)) this.tab = h;
|
||||
});
|
||||
},
|
||||
|
||||
initCharts() {
|
||||
if (typeof Chart === 'undefined') return;
|
||||
const neoColors = ['#00e5ff', '#ff2d95', '#b8ff3c', '#ff9f43', '#a855f7', '#ffd700'];
|
||||
Chart.defaults.color = '#64748b';
|
||||
Chart.defaults.borderColor = 'rgba(0,229,255,0.08)';
|
||||
|
||||
const dirEl = document.getElementById('hm-chart-direction');
|
||||
if (dirEl && !this.chartDirection) {
|
||||
this.chartDirection = new Chart(dirEl, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: ['Inbound', 'Outbound', 'Vectors'],
|
||||
datasets: [{
|
||||
data: [1, 1, 1],
|
||||
backgroundColor: ['#00e5ff', '#a855f7', '#b8ff3c'],
|
||||
borderWidth: 0,
|
||||
hoverOffset: 8,
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
cutout: '62%',
|
||||
plugins: {
|
||||
legend: { position: 'right', labels: { boxWidth: 12, padding: 10, color: '#94a3b8' } },
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const agEl = document.getElementById('hm-chart-agents');
|
||||
if (agEl && !this.chartAgents) {
|
||||
this.chartAgents = new Chart(agEl, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['herman', 'browser', 'marketing'],
|
||||
datasets: [{
|
||||
label: 'events',
|
||||
data: [0, 0, 0],
|
||||
backgroundColor: 'rgba(0, 229, 255, 0.55)',
|
||||
borderColor: '#00e5ff',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
y: { beginAtZero: true, grid: { color: 'rgba(255,255,255,0.04)' }, ticks: { stepSize: 1 } },
|
||||
x: { grid: { display: false } },
|
||||
},
|
||||
plugins: { legend: { display: false } },
|
||||
},
|
||||
});
|
||||
}
|
||||
this.updateCharts();
|
||||
},
|
||||
|
||||
updateCharts() {
|
||||
const s = this.stats;
|
||||
if (this.chartDirection) {
|
||||
this.chartDirection.data.datasets[0].data = [
|
||||
Math.max(s.inbound || 0, 0),
|
||||
Math.max(s.outbound || 0, 0),
|
||||
Math.max(s.embeddings || 0, 0),
|
||||
];
|
||||
this.chartDirection.update('none');
|
||||
}
|
||||
if (this.chartAgents) {
|
||||
const counts = {};
|
||||
(this.agentEvents || []).forEach(ev => {
|
||||
const n = (ev.agent_name || 'other').toLowerCase();
|
||||
counts[n] = (counts[n] || 0) + 1;
|
||||
});
|
||||
const labels = Object.keys(counts).slice(0, 8);
|
||||
if (!labels.length) labels.push('herman');
|
||||
this.chartAgents.data.labels = labels;
|
||||
this.chartAgents.data.datasets[0].data = labels.map(l => counts[l] || 0);
|
||||
this.chartAgents.update('none');
|
||||
}
|
||||
},
|
||||
|
||||
setTab(t) {
|
||||
this.tab = t;
|
||||
history.replaceState(null, '', t === 'feed' ? '/hermes' : '/hermes#' + t);
|
||||
if (t === 'graph') setTimeout(() => this.loadGraph(), 100);
|
||||
if (t === 'control') { this.refreshStats(); this.refreshUsers(); }
|
||||
if (t === 'pa') { this.paPolling = true; this.refreshPaLive(); }
|
||||
},
|
||||
|
||||
formatTime(iso) {
|
||||
if (!iso) return '';
|
||||
try {
|
||||
return new Date(iso).toLocaleString('nl-NL', { dateStyle: 'short', timeStyle: 'short' });
|
||||
} catch { return iso; }
|
||||
},
|
||||
|
||||
paStatusLabel() {
|
||||
const m = { idle: 'Idle', running: 'Zoekt…', comparing: 'Vergelijkt…', done: 'Klaar', failed: 'Mislukt' };
|
||||
return m[this.paLive.status] || this.paLive.status || 'Idle';
|
||||
},
|
||||
|
||||
slotStatusLabel(s) {
|
||||
const m = { idle: 'Idle', waiting: 'Wacht', loading: 'Bezig', completed: 'Klaar', failed: 'Fout' };
|
||||
return m[s] || s || 'Idle';
|
||||
},
|
||||
|
||||
slotScreenshotUrl(label) {
|
||||
if (!label) return '';
|
||||
return `/api/admin/hermes/pa/live/${encodeURIComponent(label)}/screenshot.jpg?t=${this.paScreenshotTs}`;
|
||||
},
|
||||
|
||||
async selectChat(chatId) {
|
||||
this.selectedChatId = chatId;
|
||||
await this.refreshFeed();
|
||||
},
|
||||
|
||||
async refreshStats() {
|
||||
try {
|
||||
const data = await Cockpit.api('/hermes/stats');
|
||||
this.stats = data.stats || this.stats;
|
||||
this.agentEvents = data.agent_events || [];
|
||||
this.updateCharts();
|
||||
} catch (e) { console.warn('stats', e); }
|
||||
},
|
||||
|
||||
async refreshUsers() {
|
||||
try {
|
||||
const data = await Cockpit.api('/hermes/users');
|
||||
this.users = data.users || [];
|
||||
} catch (e) { console.warn('users', e); }
|
||||
},
|
||||
|
||||
async refreshConversations() {
|
||||
try {
|
||||
const data = await Cockpit.api('/hermes/conversations');
|
||||
this.conversations = data.items || [];
|
||||
} catch (e) { console.warn('conversations', e); }
|
||||
},
|
||||
|
||||
async refreshFeed(quiet) {
|
||||
try {
|
||||
let path = '/hermes/feed?limit=80';
|
||||
if (this.selectedChatId) path += '&chat_id=' + this.selectedChatId;
|
||||
const data = await Cockpit.api(path);
|
||||
this.messages = data.items || [];
|
||||
if (!quiet) await this.refreshStats();
|
||||
} catch (e) { console.warn('feed', e); }
|
||||
},
|
||||
|
||||
async refreshPaLive(quiet) {
|
||||
try {
|
||||
const data = await Cockpit.api('/hermes/pa/live');
|
||||
this.paLive = data;
|
||||
this.paScreenshotTs = Date.now();
|
||||
if (data.hermes) {
|
||||
this.hermesOnline = data.hermes.online !== false;
|
||||
this.hermesStatus = data.hermes;
|
||||
}
|
||||
} catch (e) {
|
||||
if (!quiet) console.warn('pa live', e);
|
||||
}
|
||||
},
|
||||
|
||||
async loadGraph() {
|
||||
try {
|
||||
let data;
|
||||
if (this.graphChatFilter) {
|
||||
data = await Cockpit.api('/hermes/graph/' + this.graphChatFilter + '?limit=80');
|
||||
} else {
|
||||
data = await Cockpit.api('/hermes/graph?limit=100');
|
||||
}
|
||||
this.renderGraph(data);
|
||||
} catch (e) {
|
||||
Cockpit.toast('Graph laden mislukt: ' + e.message, 'error');
|
||||
}
|
||||
},
|
||||
|
||||
renderGraph(data) {
|
||||
const el = document.getElementById('hermes-graph');
|
||||
if (!el || typeof vis === 'undefined') return;
|
||||
const nodes = new vis.DataSet((data.nodes || []).map(n => ({
|
||||
id: n.id,
|
||||
label: this.truncate(n.label || n.id, 40),
|
||||
color: n.direction === 'in'
|
||||
? { background: '#164e63', border: '#00e5ff' }
|
||||
: { background: '#4c1d95', border: '#a855f7' },
|
||||
font: { color: '#e8edf5', size: 11 },
|
||||
})));
|
||||
const edges = new vis.DataSet((data.edges || []).map(e => ({
|
||||
id: 'e' + e.id, from: e.from, to: e.to,
|
||||
label: e.type || '', arrows: 'to',
|
||||
color: { color: '#ff9f43' },
|
||||
})).filter(e => e.to));
|
||||
if (this.graphNetwork) this.graphNetwork.destroy();
|
||||
this.graphNetwork = new vis.Network(el, { nodes, edges }, {
|
||||
physics: { stabilization: true },
|
||||
interaction: { hover: true },
|
||||
});
|
||||
},
|
||||
|
||||
truncate(s, n) {
|
||||
s = String(s || '');
|
||||
return s.length > n ? s.slice(0, n) + '…' : s;
|
||||
},
|
||||
|
||||
async runSearch() {
|
||||
if (!this.searchQuery || this.searchQuery.length < 2) {
|
||||
Cockpit.toast('Minimaal 2 tekens', 'warn');
|
||||
return;
|
||||
}
|
||||
this.searchRan = true;
|
||||
try {
|
||||
const data = await Cockpit.api('/hermes/search', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ query: this.searchQuery, chat_id: this.selectedChatId || null, limit: 15 }),
|
||||
});
|
||||
this.searchResults = data.results || [];
|
||||
} catch (e) {
|
||||
Cockpit.toast('Zoeken mislukt: ' + e.message, 'error');
|
||||
}
|
||||
},
|
||||
|
||||
async runAction(action) {
|
||||
this.actionBusy = true;
|
||||
this.actionMsg = '';
|
||||
try {
|
||||
const data = await Cockpit.api('/hermes/actions/' + action, { method: 'POST' });
|
||||
this.actionMsg = data.output || '✅ Actie uitgevoerd';
|
||||
Cockpit.toast(this.actionMsg.slice(0, 80), 'success');
|
||||
await this.refreshStats();
|
||||
} catch (e) {
|
||||
this.actionMsg = '❌ ' + e.message;
|
||||
Cockpit.toast(this.actionMsg, 'error');
|
||||
} finally {
|
||||
this.actionBusy = false;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
window.CockpitLive = (function () {
|
||||
var ws = null;
|
||||
var reconnectTimer = null;
|
||||
|
||||
function startPolling(fn, intervalMs) {
|
||||
intervalMs = intervalMs || 30000;
|
||||
fn();
|
||||
var id = setInterval(fn, intervalMs);
|
||||
return function () { clearInterval(id); };
|
||||
}
|
||||
|
||||
function connectFeed(onMessage) {
|
||||
if (typeof WebSocket === 'undefined') return function () {};
|
||||
var proto = location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
function connect() {
|
||||
try {
|
||||
ws = new WebSocket(proto + '//' + location.host + '/ws/feed');
|
||||
ws.onmessage = function (ev) {
|
||||
try {
|
||||
var data = JSON.parse(ev.data);
|
||||
if (onMessage) onMessage(data);
|
||||
} catch (e) {}
|
||||
};
|
||||
ws.onclose = function () {
|
||||
reconnectTimer = setTimeout(connect, 5000);
|
||||
};
|
||||
} catch (e) {
|
||||
reconnectTimer = setTimeout(connect, 5000);
|
||||
}
|
||||
}
|
||||
connect();
|
||||
return function () {
|
||||
if (reconnectTimer) clearTimeout(reconnectTimer);
|
||||
if (ws) { try { ws.close(); } catch (e) {} ws = null; }
|
||||
};
|
||||
}
|
||||
|
||||
function updateLiveBadge(el, at) {
|
||||
if (!el) return;
|
||||
el.textContent = 'Live · ' + (at || new Date().toLocaleTimeString('nl-NL', { hour: '2-digit', minute: '2-digit' }));
|
||||
}
|
||||
|
||||
function renderAgentFeed(container, events) {
|
||||
if (!container || !events) return;
|
||||
container.innerHTML = events.slice(0, 12).map(function (ev) {
|
||||
var t = (ev.created_at || '').substring(11, 16);
|
||||
return '<div class="hub-feed-item"><span>' + t + '</span>' +
|
||||
'<span class="badge badge-agent-' + String(ev.agent_name || '').toLowerCase() + '">' + (ev.agent_name || '') + '</span> ' +
|
||||
(ev.title || ev.event_type || '') + '</div>';
|
||||
}).join('') || '<p class="empty-state">Nog geen events.</p>';
|
||||
}
|
||||
|
||||
return { startPolling: startPolling, connectFeed: connectFeed, updateLiveBadge: updateLiveBadge, renderAgentFeed: renderAgentFeed };
|
||||
})();
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "Foodlinkk Command Center",
|
||||
"short_name": "Foodlinkk",
|
||||
"description": "Herman CEO dashboard · CRM · Retail · Marketing",
|
||||
"start_url": "/",
|
||||
"scope": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"background_color": "#0a0e14",
|
||||
"theme_color": "#0a0e14",
|
||||
"lang": "nl",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/icons/app-icon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/app-icon.svg",
|
||||
"sizes": "512x512",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
/* Retail 360 workspace layout */
|
||||
|
||||
.retail-workspace {
|
||||
display: grid;
|
||||
grid-template-columns: 200px 1fr 360px;
|
||||
gap: 1rem;
|
||||
min-height: 75vh;
|
||||
align-items: start;
|
||||
}
|
||||
.retail-workspace.with-filters {
|
||||
grid-template-columns: 200px 300px 1fr 360px;
|
||||
}
|
||||
|
||||
.retail-sidebar { overflow-y: auto; max-height: 75vh; position: sticky; top: 0.5rem; }
|
||||
|
||||
/* Filter panel */
|
||||
.retail-filters {
|
||||
overflow-y: auto;
|
||||
max-height: 75vh;
|
||||
position: sticky;
|
||||
top: 0.5rem;
|
||||
padding: 0.85rem 1rem !important;
|
||||
}
|
||||
.filters-head {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: 0.75rem; padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.08);
|
||||
}
|
||||
.filters-head h3 { margin: 0; font-size: 1rem; }
|
||||
.filter-count {
|
||||
font-size: 0.65rem; padding: 0.15rem 0.45rem; border-radius: 999px;
|
||||
background: rgba(42,171,238,0.15); color: #38bdf8;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
border: 1px solid rgba(255,255,255,0.07);
|
||||
border-radius: 10px;
|
||||
margin-bottom: 0.55rem;
|
||||
background: rgba(0,0,0,0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
.filter-group summary {
|
||||
cursor: pointer;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
color: #e2e8f0;
|
||||
padding: 0.55rem 0.65rem;
|
||||
list-style: none;
|
||||
user-select: none;
|
||||
}
|
||||
.filter-group summary::-webkit-details-marker { display: none; }
|
||||
.filter-group[open] summary {
|
||||
border-bottom: 1px solid rgba(255,255,255,0.06);
|
||||
background: rgba(255,255,255,0.02);
|
||||
}
|
||||
.filter-group-body {
|
||||
padding: 0.55rem 0.65rem 0.65rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.55rem;
|
||||
}
|
||||
|
||||
.filter-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.filter-label {
|
||||
display: block;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
.filter-field select,
|
||||
.filter-field input[type="text"],
|
||||
.filter-field input[type="number"] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0.45rem 0.55rem;
|
||||
border: 1px solid rgba(255,255,255,0.12);
|
||||
border-radius: 8px;
|
||||
background: #0a0f18;
|
||||
color: #f1f5f9;
|
||||
font-size: 0.85rem;
|
||||
margin: 0;
|
||||
}
|
||||
.filter-field select:focus,
|
||||
.filter-field input:focus {
|
||||
outline: none;
|
||||
border-color: rgba(42,171,238,0.5);
|
||||
box-shadow: 0 0 0 2px rgba(42,171,238,0.15);
|
||||
}
|
||||
.filter-field.filter-check {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.15rem 0;
|
||||
}
|
||||
.filter-field.filter-check input[type="checkbox"] {
|
||||
width: 16px; height: 16px; flex-shrink: 0; margin: 0;
|
||||
accent-color: #2aabee;
|
||||
}
|
||||
.filter-field.filter-check span {
|
||||
font-size: 0.82rem;
|
||||
color: #cbd5e1;
|
||||
}
|
||||
|
||||
.filter-actions { margin: 0.65rem 0; display: flex; flex-direction: column; gap: 0.35rem; }
|
||||
.filter-sync { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.06); }
|
||||
.filter-sync h4 { margin: 0 0 0.5rem; font-size: 0.85rem; color: #94a3b8; }
|
||||
|
||||
.retail-map-wrap { position: relative; min-height: 500px; }
|
||||
.retail-map { height: 75vh; min-height: 500px; border-radius: 8px; border: 1px solid #334155; }
|
||||
.map-loading {
|
||||
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
||||
background: rgba(0,0,0,0.3); border-radius: 8px; pointer-events: none;
|
||||
}
|
||||
|
||||
.retail-panel { overflow-y: auto; max-height: 75vh; position: sticky; top: 0.5rem; }
|
||||
.retail-panel .detail-section { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #334155; }
|
||||
.retail-panel .detail-dl {
|
||||
display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 0.5rem; font-size: 0.85rem;
|
||||
}
|
||||
.retail-panel .detail-dl dt { opacity: 0.7; }
|
||||
.retail-panel .detail-dl dd { margin: 0; font-weight: 600; text-align: right; }
|
||||
|
||||
.clickable-row { cursor: pointer; }
|
||||
.clickable-row:hover { opacity: 0.85; }
|
||||
|
||||
.retail-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
|
||||
.page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
|
||||
|
||||
.kpi-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
|
||||
.kpi-card {
|
||||
flex: 1; min-width: 110px; padding: 0.75rem 1rem;
|
||||
background: var(--panel-bg, #1e293b); border-radius: 8px; border: 1px solid #334155;
|
||||
}
|
||||
.kpi-card span { display: block; font-size: 0.75rem; opacity: 0.7; }
|
||||
.kpi-card strong { font-size: 1.25rem; }
|
||||
.kpi-green strong { color: #22c55e; }
|
||||
|
||||
.retail-main { min-height: 500px; min-width: 0; }
|
||||
.retail-table-wrap { max-height: 75vh; overflow: auto; }
|
||||
.retail-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
|
||||
.retail-table th, .retail-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #334155; text-align: left; }
|
||||
.retail-table th { position: sticky; top: 0; background: var(--panel-bg, #1e293b); z-index: 1; }
|
||||
|
||||
.trends-ticker { margin-bottom: 1rem; padding: 0.75rem 1rem; overflow-x: auto; }
|
||||
.ticker-items { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
|
||||
.ticker-item {
|
||||
background: rgba(42,171,238,0.1); padding: 0.25rem 0.6rem; border-radius: 999px;
|
||||
font-size: 0.8rem; white-space: nowrap; border: 1px solid rgba(42,171,238,0.2);
|
||||
}
|
||||
|
||||
.field-picker { margin-top: 1rem; font-size: 0.8rem; }
|
||||
.field-group { margin: 0.5rem 0; }
|
||||
.btn-block { width: 100%; margin-top: 0; }
|
||||
.muted { opacity: 0.75; font-size: 0.9rem; }
|
||||
.hint { font-size: 0.8rem; opacity: 0.7; }
|
||||
|
||||
.wholesale-list { max-height: 75vh; overflow-y: auto; }
|
||||
.wholesale-item {
|
||||
padding: 0.6rem; border-bottom: 1px solid #1e293b; cursor: pointer; font-size: 0.85rem;
|
||||
}
|
||||
.wholesale-item:hover { background: rgba(42,171,238,0.06); }
|
||||
.wholesale-item.active { border-left: 3px solid var(--pulse-blue, #2aabee); }
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.retail-workspace.with-filters { grid-template-columns: 180px 280px 1fr; }
|
||||
.retail-panel { grid-column: 1 / -1; max-height: 45vh; position: static; }
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.retail-workspace,
|
||||
.retail-workspace.with-filters { grid-template-columns: 1fr; }
|
||||
.retail-sidebar, .retail-filters, .retail-panel { position: static; max-height: none; }
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css" />
|
||||
<link rel="stylesheet" href="/static/retail.css" />
|
||||
|
||||
<div x-data="retailIntel()" x-init="init()">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<h1>Retail Intelligence</h1>
|
||||
<p class="subtitle">Supermarkten · CBS demografie · PDOK · partnerships</p>
|
||||
</div>
|
||||
<div class="retail-actions">
|
||||
<button class="btn btn-sm" @click="applyFilters()" :disabled="loading">Vernieuwen</button>
|
||||
<button class="btn btn-sm btn-primary" @click="runEnrich()" :disabled="enriching">
|
||||
<span x-text="enriching ? 'CBS laden…' : 'CBS/PDOK verrijken'"></span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="kpi-row">
|
||||
<div class="kpi-card"><span>Totaal</span><strong x-text="stats.total || 0"></strong></div>
|
||||
<div class="kpi-card kpi-green"><span>Actief</span><strong x-text="stats.active_partnerships || 0"></strong></div>
|
||||
<div class="kpi-card"><span>CBS data</span><strong x-text="stats.with_area_data || 0"></strong></div>
|
||||
<div class="kpi-card"><span>Gem. inkomen</span><strong x-text="formatEuro(stats.avg_area_income)"></strong></div>
|
||||
<div class="kpi-card"><span>Gem. halal-markt*</span><strong x-text="formatPct(stats.avg_muslim_proxy_pct)"></strong></div>
|
||||
<div class="kpi-card"><span>Resultaat</span><strong x-text="mapCount"></strong></div>
|
||||
</div>
|
||||
|
||||
<div class="retail-layout">
|
||||
<aside class="retail-filters panel">
|
||||
<h3>Filters</h3>
|
||||
<label>Keten
|
||||
<select x-model="f.chain" @change="applyFilters()">
|
||||
<option value="">Alle ketens</option>
|
||||
<template x-for="c in meta.chains" :key="c.chain">
|
||||
<option :value="c.chain" x-text="`${c.chain} (${c.n})`"></option>
|
||||
</template>
|
||||
</select>
|
||||
</label>
|
||||
<label>Provincie
|
||||
<select x-model="f.province" @change="applyFilters()">
|
||||
<option value="">Alle provincies</option>
|
||||
<template x-for="p in meta.provinces" :key="p.province">
|
||||
<option :value="p.province" x-text="`${p.province} (${p.n})`"></option>
|
||||
</template>
|
||||
</select>
|
||||
</label>
|
||||
<label>Partnership
|
||||
<select x-model="f.partnership" @change="applyFilters()">
|
||||
<option value="">Alle</option>
|
||||
<option value="active">Actief</option>
|
||||
<option value="proposal">Voorstel</option>
|
||||
<option value="none">Geen</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>Postcode prefix<input type="text" x-model="f.postcode_prefix" maxlength="4" placeholder="10" @change="applyFilters()"></label>
|
||||
<label>Zoeken<input type="text" x-model="f.q" placeholder="Naam, adres, stad" @keyup.enter="applyFilters()"></label>
|
||||
<label class="checkbox"><input type="checkbox" x-model="f.halal_certified" @change="applyFilters()"> Halal gecertificeerd</label>
|
||||
<label class="checkbox"><input type="checkbox" x-model="f.has_area_data" @change="applyFilters()"> Alleen met CBS data</label>
|
||||
|
||||
<h4>CBS demografie (gemeente-niveau)</h4>
|
||||
<label>Min. bevolking<input type="number" x-model.number="f.min_population" min="0" step="1000" @change="applyFilters()"></label>
|
||||
<label>Min. gem. inkomen (€)<input type="number" x-model.number="f.min_avg_income" min="0" step="1000" @change="applyFilters()"></label>
|
||||
<label>Min. halal-markt proxy (%)*<input type="number" x-model.number="f.min_muslim_pct" min="0" max="100" step="0.5" @change="applyFilters()"></label>
|
||||
<p class="hint">*Indicatief: Marokko+Turkije / bevolking (CBS)</p>
|
||||
<button class="btn btn-sm" @click="resetFilters()">Reset filters</button>
|
||||
|
||||
<div class="enrich-status" x-show="enrichment">
|
||||
<h4>Databronnen</h4>
|
||||
<p><span x-text="enrichment.enriched_postcodes || 0"></span> / <span x-text="enrichment.unique_postcodes || 0"></span> postcodes verrijkt</p>
|
||||
<ul class="provider-list">
|
||||
<template x-for="p in (enrichment.data_providers || [])" :key="p.name">
|
||||
<li><span x-text="p.name"></span> <small x-text="p.last_status || '—'"></small></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="retail-map-wrap">
|
||||
<div id="map" class="retail-map"></div>
|
||||
<div class="map-loading" x-show="loading">Kaart laden…</div>
|
||||
</div>
|
||||
|
||||
<aside class="retail-panel panel">
|
||||
<template x-if="selected">
|
||||
<div class="store-detail">
|
||||
<h3 x-text="selected.name"></h3>
|
||||
<p class="muted"><span x-text="selected.chain"></span> · <span x-text="selected.city"></span> · <span x-text="selected.postcode"></span></p>
|
||||
<p x-text="selected.address"></p>
|
||||
|
||||
<div class="detail-section">
|
||||
<h4>Partnership</h4>
|
||||
<p>Status: <strong x-text="selected.partnership_status"></strong></p>
|
||||
<p x-show="selected.halal_certified">✅ Halal gecertificeerd</p>
|
||||
</div>
|
||||
|
||||
<template x-if="detail.area_analysis">
|
||||
<div class="detail-section">
|
||||
<h4>CBS Demografie</h4>
|
||||
<p class="hint" x-text="detail.area_analysis.data_source"></p>
|
||||
<dl class="detail-dl">
|
||||
<dt>Bevolking</dt><dd x-text="formatNum(detail.area_analysis.population)"></dd>
|
||||
<dt>Huishoudens</dt><dd x-text="formatNum(detail.area_analysis.households)"></dd>
|
||||
<dt>Gem. inkomen</dt><dd x-text="formatEuro(detail.area_analysis.avg_income)"></dd>
|
||||
<dt>Halal-markt proxy</dt><dd x-text="formatPct(detail.area_analysis.religious_composition?.muslim_proxy_pct)"></dd>
|
||||
<dt>Niet-Westers %</dt><dd x-text="formatPct(detail.area_analysis.ethnic_composition?.niet_westers_pct)"></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</template>
|
||||
<template x-if="!detail.area_analysis">
|
||||
<p class="hint">Geen CBS data — klik 'CBS/PDOK verrijken'</p>
|
||||
</template>
|
||||
|
||||
<template x-if="detail.nearby_stores && detail.nearby_stores.length">
|
||||
<div class="detail-section">
|
||||
<h4>Concurrentie (<3 km)</h4>
|
||||
<ul class="nearby-list">
|
||||
<template x-for="n in detail.nearby_stores" :key="n.id">
|
||||
<li @click="selectStore(n.id)" class="clickable-row">
|
||||
<span x-text="n.chain"></span> — <span x-text="n.name"></span>
|
||||
<small x-text="`${n.distance_km?.toFixed?.(1) || n.distance_km} km`"></small>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template x-if="detail.recommendations && detail.recommendations.length">
|
||||
<div class="detail-section">
|
||||
<h4>Herman</h4>
|
||||
<template x-for="r in detail.recommendations" :key="r.id">
|
||||
<p><strong x-text="r.title"></strong><br><small x-text="r.description"></small></p>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<template x-if="!selected">
|
||||
<p class="muted">Klik een marker voor CBS-data, concurrentie en Herman-tips.</p>
|
||||
<h4>Herman Top picks</h4>
|
||||
<ul class="reco-list">
|
||||
{% for r in recommendations %}
|
||||
<li><strong>{{ r.title }}</strong><br><small>{{ r.priority }} · {{ r.recommendation_type }}</small></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</template>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||
<script src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script>
|
||||
<script>
|
||||
function retailIntel(){
|
||||
return {
|
||||
map: null, cluster: null, markers: [],
|
||||
stats: {{ stats | tojson }},
|
||||
meta: {{ filters | tojson }},
|
||||
enrichment: {{ enrichment | tojson }},
|
||||
f: { chain:'', province:'', partnership:'', postcode_prefix:'', q:'',
|
||||
halal_certified:false, has_area_data:false,
|
||||
min_population:null, min_avg_income:null, min_muslim_pct:null },
|
||||
selected: null, detail: {}, loading: false, enriching: false, mapCount: 0,
|
||||
|
||||
init(){
|
||||
this.map = L.map('map').setView([52.15, 5.3], 8);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18 }).addTo(this.map);
|
||||
this.cluster = L.markerClusterGroup();
|
||||
this.map.addLayer(this.cluster);
|
||||
this.applyFilters();
|
||||
},
|
||||
|
||||
params(){
|
||||
const p = new URLSearchParams();
|
||||
Object.entries(this.f).forEach(([k,v]) => {
|
||||
if (v === null || v === '' || v === false) return;
|
||||
p.set(k, v);
|
||||
});
|
||||
return p.toString();
|
||||
},
|
||||
|
||||
async applyFilters(){
|
||||
this.loading = true;
|
||||
try {
|
||||
const [stats, mapData] = await Promise.all([
|
||||
fetch('/api/retail/stats?' + this.params()).then(r=>r.json()),
|
||||
fetch('/api/retail/map?' + this.params()).then(r=>r.json()),
|
||||
]);
|
||||
this.stats = stats;
|
||||
this.mapCount = mapData.count || 0;
|
||||
this.renderMarkers(mapData.items || []);
|
||||
} finally { this.loading = false; }
|
||||
},
|
||||
|
||||
renderMarkers(stores){
|
||||
this.cluster.clearLayers();
|
||||
this.markers = [];
|
||||
const colors = { 'Albert Heijn':'#0066cc', 'Jumbo':'#ffcc00', 'Plus':'#008040',
|
||||
'Lidl':'#0050aa', 'ALDI':'#0066b3', 'Dirk':'#e30613' };
|
||||
stores.forEach(s => {
|
||||
if (!s.latitude || !s.longitude) return;
|
||||
const active = s.partnership_status === 'active';
|
||||
const color = active ? '#22c55e' : (colors[s.chain] || '#64748b');
|
||||
const m = L.circleMarker([+s.latitude, +s.longitude], {
|
||||
radius: active ? 10 : 7, color, weight: 2, fillColor: color, fillOpacity: 0.85
|
||||
});
|
||||
m.storeId = s.id;
|
||||
m.on('click', () => this.selectStore(s.id));
|
||||
m.bindTooltip(`${s.chain}: ${s.name}`, { direction: 'top' });
|
||||
this.cluster.addLayer(m);
|
||||
this.markers.push(m);
|
||||
});
|
||||
},
|
||||
|
||||
async selectStore(id){
|
||||
const d = await fetch(`/api/retail/supermarkets/${id}`).then(r=>r.json());
|
||||
this.selected = d;
|
||||
this.detail = d;
|
||||
if (d.latitude && d.longitude) this.map.setView([+d.latitude, +d.longitude], 14);
|
||||
},
|
||||
|
||||
resetFilters(){
|
||||
this.f = { chain:'', province:'', partnership:'', postcode_prefix:'', q:'',
|
||||
halal_certified:false, has_area_data:false,
|
||||
min_population:null, min_avg_income:null, min_muslim_pct:null };
|
||||
this.selected = null; this.detail = {};
|
||||
this.applyFilters();
|
||||
},
|
||||
|
||||
async runEnrich(){
|
||||
this.enriching = true;
|
||||
try {
|
||||
await fetch('/api/retail/enrich?limit=100', { method:'POST' });
|
||||
this.enrichment = await fetch('/api/retail/filters').then(r=>r.json()).then(d=>d.enrichment);
|
||||
await this.applyFilters();
|
||||
} finally { this.enriching = false; }
|
||||
},
|
||||
|
||||
formatEuro(v){ return v ? '€ ' + Math.round(v).toLocaleString('nl-NL') : '—'; },
|
||||
formatNum(v){ return v ? Number(v).toLocaleString('nl-NL') : '—'; },
|
||||
formatPct(v){ return (v !== null && v !== undefined) ? v + '%' : '—'; },
|
||||
};
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Retail intelligence map page + API proxy."""
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from typing import Any, Optional
|
||||
|
||||
import httpx
|
||||
from fastapi import APIRouter, Query, Request
|
||||
from fastapi.responses import JSONResponse
|
||||
from fastapi.templating import Jinja2Templates
|
||||
from pathlib import Path
|
||||
|
||||
router = APIRouter()
|
||||
BASE = Path(__file__).resolve().parent.parent.parent
|
||||
templates = Jinja2Templates(directory=str(BASE / "templates"))
|
||||
TOOLS = os.getenv("TOOLS_API_URL", "http://tools-api:8700").rstrip("/")
|
||||
|
||||
|
||||
async def _tools_get(path: str, params: Optional[dict] = None) -> Any:
|
||||
async with httpx.AsyncClient(timeout=60) as client:
|
||||
resp = await client.get(f"{TOOLS}{path}", params=params or {})
|
||||
resp.raise_for_status()
|
||||
return resp.json()
|
||||
|
||||
|
||||
@router.get("/retail")
|
||||
async def retail_page(request: Request):
|
||||
stats = await _tools_get("/retail/stats")
|
||||
filters = await _tools_get("/retail/filters")
|
||||
enrich = await _tools_get("/retail/enrich/status")
|
||||
recs = await _tools_get("/recommendations/pending", {"limit": 5})
|
||||
return templates.TemplateResponse(
|
||||
"retail.html",
|
||||
{
|
||||
"request": request,
|
||||
"stats": stats,
|
||||
"filters": filters,
|
||||
"enrichment": enrich,
|
||||
"recommendations": recs.get("items", []),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@router.get("/api/retail/stats")
|
||||
async def api_retail_stats(request: Request):
|
||||
return JSONResponse(await _tools_get("/retail/stats", dict(request.query_params)))
|
||||
|
||||
|
||||
@router.get("/api/retail/filters")
|
||||
async def api_retail_filters():
|
||||
return JSONResponse(await _tools_get("/retail/filters"))
|
||||
|
||||
|
||||
@router.get("/api/retail/map")
|
||||
async def api_retail_map(request: Request):
|
||||
return JSONResponse(await _tools_get("/retail/map", dict(request.query_params)))
|
||||
|
||||
|
||||
@router.get("/api/retail/supermarkets/{store_id}")
|
||||
async def api_retail_store(store_id: int):
|
||||
return JSONResponse(await _tools_get(f"/retail/supermarkets/{store_id}"))
|
||||
|
||||
|
||||
@router.post("/api/retail/enrich")
|
||||
async def api_retail_enrich(limit: int = Query(50, ge=1, le=200)):
|
||||
async with httpx.AsyncClient(timeout=300) as client:
|
||||
resp = await client.post(f"{TOOLS}/retail/enrich", params={"limit": limit})
|
||||
resp.raise_for_status()
|
||||
return JSONResponse(resp.json())
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Foodlinkk PWA — light cache for shell */
|
||||
const CACHE = 'foodlinkk-v1';
|
||||
const ASSETS = [
|
||||
'/',
|
||||
'/static/css/palantir-theme.css',
|
||||
'/static/css/pulse-theme.css',
|
||||
'/static/css/mobile.css',
|
||||
'/static/css/vertical-tabs.css',
|
||||
'/static/js/cockpit.js',
|
||||
'/static/js/live-pulse.js',
|
||||
'/static/icons/app-icon.svg',
|
||||
'/static/manifest.json',
|
||||
];
|
||||
|
||||
self.addEventListener('install', (e) => {
|
||||
e.waitUntil(
|
||||
caches.open(CACHE).then((c) => c.addAll(ASSETS).catch(() => {}))
|
||||
);
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener('activate', (e) => {
|
||||
e.waitUntil(
|
||||
caches.keys().then((keys) =>
|
||||
Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))
|
||||
)
|
||||
);
|
||||
self.clients.claim();
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (e) => {
|
||||
if (e.request.method !== 'GET') return;
|
||||
const url = new URL(e.request.url);
|
||||
if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/ws')) return;
|
||||
e.respondWith(
|
||||
fetch(e.request)
|
||||
.then((r) => {
|
||||
if (r.ok && url.pathname.startsWith('/static/')) {
|
||||
const clone = r.clone();
|
||||
caches.open(CACHE).then((c) => c.put(e.request, clone));
|
||||
}
|
||||
return r;
|
||||
})
|
||||
.catch(() => caches.match(e.request).then((m) => m || caches.match('/')))
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user