/*
 * nh-telemetry-charts.css — stili CONDIVISI dei primitivi di telemetria (Control Tower).
 *
 * Estratti IDENTICI dalla Control Tower RAG di exoEngram (static/exoengram/index.html, inline) per
 * essere riusati dalla Control Tower di Kortexa (P5-h). Il RAG MANTIENE la propria copia inline
 * (nessuna regressione, nessun cambio di resa); i nuovi portali includono questo file.
 *
 * Token-only (ZERO hex): tutti i colori arrivano da var(--…) di theme-vars.css.
 */

/* Dashboard Control Tower — griglia 12 colonne, token-only */
.ct-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ct-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; min-width: 0; }
.ct-card h3 { margin: 0; font-size: 13px; font-weight: 600; }
.ct-card .sub { color: var(--ink-muted); font-size: 12px; margin: 2px 0 10px; }
.ct-2 { grid-column: span 2; } .ct-3 { grid-column: span 3; } .ct-4 { grid-column: span 4; }
.ct-5 { grid-column: span 5; } .ct-6 { grid-column: span 6; } .ct-7 { grid-column: span 7; } .ct-8 { grid-column: span 8; } .ct-12 { grid-column: span 12; }
@media (max-width: 1100px) { .ct-2 { grid-column: span 4; } .ct-3, .ct-4, .ct-5, .ct-6, .ct-7, .ct-8 { grid-column: span 12; } }
.ct-kpi .v { font-size: 24px; font-family: var(--font-display, var(--font-body)); letter-spacing: -.02em; }
.ct-kpi .v small { font-size: 13px; color: var(--ink-muted); margin-left: 3px; }
.ct-kpi .l { color: var(--ink-muted); font-size: 12px; }
.ct-kpi .d { color: var(--ink-subtle); font-size: 12px; margin-top: 2px; }
.ct-na { color: var(--ink-subtle); font-size: 12px; display: flex; align-items: center; gap: 6px; padding: 10px 0; }
.ct-na::before { content: "—"; color: var(--ink-subtle); }
/* motore grafici SVG (token-only) */
.ct-card svg { display: block; width: 100%; overflow: visible; }
.ct-card svg text { fill: var(--ink-muted); font-size: 11px; }
.ct-card svg .grid { stroke: var(--border); stroke-width: 1; }
.ct-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); margin-bottom: 6px; }
.ct-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
#ct-tip { position: fixed; pointer-events: none; z-index: 60; background: var(--surface-inverse, var(--ink)); color: var(--ink-inverse, var(--bg)); padding: 8px 10px; border-radius: 6px; font-size: 12px; display: none; max-width: 260px; box-shadow: 0 6px 20px var(--shadow, rgba(0,0,0,.25)); }
#ct-tip b { display: block; margin-bottom: 3px; }
#ct-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
#ct-tip .row { display: flex; justify-content: space-between; gap: 14px; }
/* barre orizzontali (composizione) + tabella salute */
.ct-hbar { display: grid; grid-template-columns: 120px 1fr 72px; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.ct-hbar .bar { width: 100%; }
.ct-hbar .n { text-align: right; color: var(--ink-muted); font-size: 12px; }
.ct-health-bar { margin-bottom: 8px; }
.ct-health-bar .field { max-width: 260px; height: 30px; }
table.ct-health { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ct-health th, table.ct-health td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.ct-health th { color: var(--ink-subtle); font-weight: 600; font-size: 12px; cursor: pointer; user-select: none; }
table.ct-health td.num, table.ct-health th.num { text-align: right; }
/* heatmap giorno×ora */
.ct-heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 2px; font-size: 11px; color: var(--ink-muted); }
.ct-heat .h { text-align: center; }
.ct-heat .cell { height: 18px; border-radius: 3px; }
/* barra impilata */
.ct-stack { display: flex; gap: 2px; height: 24px; margin-top: 4px; }
.ct-stack .seg { border-radius: 3px; min-width: 2px; }
