/* ═══════════════════════════════════════════════════════════════════
   KORAXIS — style_hub.css
   Styles exclusifs au panel HUB (KPI strip, carte Stanton, hub-body,
   hub-main, hub-right, hub-bottom, légende, prix, activité, logs).
   Fichier isolé — ne pas modifier sans raison valable.
   Chargé après style_koraxis.css dans index.html.
═══════════════════════════════════════════════════════════════════ */

/* ── HUB KPI STRIP (hub-topbar) — VISIBLE UNIQUEMENT DANS #panel-hub ── */
.hub-topbar { display: none; }
#panel-hub.active .hub-topbar {
  display: flex; flex-shrink: 0;
  gap: 10px; padding: 2px 10px 8px;
  background: transparent;
  border-bottom: none;
  height: 104px; max-height: 104px;
}
.hub-kpi {
  flex: 1; padding: 10px 14px;
  border-radius: 22px; position: relative; overflow: hidden;
  border: 1px solid rgba(89,208,255,.14);
  background: linear-gradient(180deg, rgba(10,20,35,.92), rgba(7,14,28,.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 30px rgba(0,0,0,.35);
  transition: .2s ease;
}
.hub-kpi::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,153,0,.12), transparent 45%);
  pointer-events: none;
}
.hub-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(255,153,0,.35);
  box-shadow: 0 0 24px rgba(255,153,0,.12), 0 18px 40px rgba(0,0,0,.45);
}
.hub-kpi-alert { border-color: rgba(255,153,0,.4); }
.hub-kpi-lbl {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 4px;
  display: flex; align-items: center; gap: 5px; position: relative;
}
.hub-kpi-icon { color: var(--orange); }
.hub-kpi-val {
  font-family: 'Orbitron', var(--mono);
  font-size: 18px;
  color: var(--text-bright); letter-spacing: 1px; line-height: 1;
  position: relative;
}
.hub-kpi-val.green  { color: var(--green); }
.hub-kpi-val.orange { color: var(--orange); }
.hub-kpi-d { font-size: 11px; font-family: var(--mono); margin-top: 3px; color: var(--text-dim); position: relative; }
.hub-kpi-d.up   { color: var(--green); }
.hub-kpi-d.down { color: var(--red); }
.hub-kpi-d.warn { color: var(--orange); cursor: pointer; }

/* ── HUB LAYOUT ─────────────────────────────────────────────────── */
.hub-body { display: flex; flex: 1; overflow: hidden; flex-direction: row; min-height: 0; }

/* Colonne gauche (hub-main = hub-left de NEXORA) */
.hub-left, .hub-main {
  position: relative;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  margin: 0 4px 8px 8px;
  border-radius: 22px;
  border: 1px solid rgba(89,208,255,.12);
  background: linear-gradient(180deg, rgba(7,15,28,.92), rgba(4,10,22,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 15px 40px rgba(0,0,0,.42);
  backdrop-filter: blur(16px);
}
.hub-left::before, .hub-main::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.7; border-radius: 22px 22px 0 0; z-index: 1;
}
.hub-map-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px; border-bottom: 1px solid rgba(255,153,0,.15);
  background: transparent;
  flex-shrink: 0; height: 40px; box-sizing: border-box;
  border-radius: 22px 22px 0 0;
}
.hub-map-title { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--orange); text-transform: uppercase; }
.map-toggle { display: flex; }
.map-btn, .hub-map-btn {
  padding: 4px 10px; font-size: 11px; letter-spacing: 1px;
  border: 1px solid rgba(89,208,255,.14); background: rgba(255,255,255,.02);
  color: var(--text); font-family: var(--ui); font-weight: 600; transition: all 0.15s;
  border-radius: 12px;
}
.map-btn + .map-btn, .hub-map-btn + .hub-map-btn { margin-left: 4px; }
.map-btn.active, .hub-map-btn.active {
  background: linear-gradient(90deg, rgba(255,153,0,.28), rgba(255,153,0,.08));
  border-color: rgba(255,153,0,.55); color: #fff;
}
.map-btn:hover, .hub-map-btn:hover { border-color: rgba(255,153,0,.45); box-shadow: var(--glow-orange); }

/* Canvas */
#stanton-canvas, #stanton-canvas-kx {
  display: block; flex: 1; min-height: 0; width: 100%;
  background: radial-gradient(ellipse at center, #0d1220 0%, #04060b 60%, #020308 100%);
  box-shadow: inset 0 0 60px rgba(0,0,0,.8);
}

/* Légende */
.map-legend {
  display: flex; gap: 14px; padding: 5px 13px;
  border-top: 1px solid rgba(89,208,255,.1);
  background: rgba(8,15,30,.55); flex-shrink: 0;
  height: 28px; box-sizing: border-box; overflow: hidden;
  border-radius: 0 0 22px 22px;
}
.leg-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.leg-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.leg-line, .leg-line-item { width: 16px; height: 1px; border-top: 1px dashed var(--text-dim); flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* Bandeau bas */
.hub-bottom {
  display: flex; flex-shrink: 0;
  height: 210px; min-height: 210px;
  overflow: hidden; gap: 8px;
  padding: 0 0 8px 0;
  border-top: none;
}
.hub-sec, .hub-bottom-sec {
  position: relative;
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(89,208,255,.12);
  background: linear-gradient(180deg, rgba(7,15,28,.92), rgba(4,10,22,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 15px 40px rgba(0,0,0,.42);
  backdrop-filter: blur(16px);
}
.hub-sec:first-child, .hub-bottom-sec:first-child { margin-left: 0; }
.hub-sec::before, .hub-bottom-sec::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.7; border-radius: 22px 22px 0 0; z-index: 1;
}
.hub-sec-title {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--orange); padding: 7px 12px;
  border-bottom: 1px solid rgba(255,153,0,.15);
  border-left: 2px solid var(--orange);
  background: transparent;
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  border-radius: 22px 22px 0 0;
}
.hub-sec-body { flex: 1; overflow-y: auto; padding: 4px 6px; }

/* Mini tables */
.mini-table, .top-res-table { width: 100%; border-collapse: collapse; }
.mini-table th, .top-res-table th { padding: 4px 9px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid rgba(89,208,255,.1); background: transparent; text-align: left; }
.mini-table td, .top-res-table td { padding: 5px 9px; font-family: var(--mono); font-size: 13px; border-bottom: 1px solid rgba(255,153,0,.04); color: var(--text); }
.mini-table td.profit { color: var(--green); font-weight: 600; }

/* Colonne droite */
.hub-right {
  position: relative;
  width: 295px; flex-shrink: 0;
  display: flex; flex-direction: column;
  overflow: hidden; gap: 8px;
  padding: 0 8px 8px 4px;
}
.hub-right::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.7; border-radius: 22px 22px 0 0; z-index: 1;
}
.hub-right-sec {
  position: relative;
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(89,208,255,.12);
  background: linear-gradient(180deg, rgba(7,15,28,.92), rgba(4,10,22,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 15px 40px rgba(0,0,0,.42);
  backdrop-filter: blur(16px);
  min-height: 0;
}
.hub-right-sec .hub-sec-title { border-radius: 22px 22px 0 0; }
.hub-right-sec::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.7; border-radius: 22px 22px 0 0; z-index: 1;
}
.hub-right-sec .hub-sec-body { overflow-y: auto; }

/* Tables prix */
.prix-table, .price-table { width: 100%; border-collapse: collapse; }
.prix-table th, .price-table th { padding: 5px 9px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid rgba(89,208,255,.1); background: transparent; text-align: left; }
.prix-table td, .price-table td { padding: 6px 9px; font-family: var(--mono); font-size: 13px; border-bottom: 1px solid rgba(255,153,0,.05); color: var(--text); }
.prix-table tr:hover td, .price-table tr:hover td { background: rgba(255,153,0,.04); }
.prix-res-name { color: var(--orange); }
.prix-up, .price-table td.evo.up   { color: var(--green); }
.prix-down, .price-table td.evo.down { color: var(--red); }

/* Activity */
.act-item { display: flex; align-items: flex-start; gap: 9px; padding: 7px 11px; border-bottom: 1px solid rgba(255,153,0,.04); }
.act-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.act-desc { font-size: 13px; color: var(--text); line-height: 1.4; }
.act-meta { display: flex; justify-content: space-between; margin-top: 2px; }
.act-amt  { font-family: var(--mono); font-size: 12px; }
.act-amt.pos { color: var(--green); }
.act-amt.neg { color: var(--red); }
.act-time { font-size: 11px; color: var(--text-dim); }

/* Logs */
.log-line { font-family: var(--mono); font-size: 10px; color: var(--text-dim); padding: 3px 8px; border-bottom: 1px solid rgba(255,153,0,.03); line-height: 1.5; }
.log-line .log-time { color: rgba(255,153,0,.5); margin-right: 6px; }
.log-line .log-ok   { color: var(--green); }
.log-line .log-warn { color: var(--orange); }
.log-line .log-err  { color: var(--red); }
.terminal { padding: 8px 11px; font-family: var(--mono); font-size: 12px; line-height: 1.9; }
.log-ln { display: flex; gap: 7px; opacity: 0; animation: logIn 0.4s forwards; }
@keyframes logIn { to { opacity: 1; } }
.log-ts  { color: var(--text-dim); }
.log-ok  { color: var(--green); }
.log-err { color: var(--red); }