/* SECTION_CSS_POSITIONS */

/* Wrapper overflow horizontal */
.table-wrap { overflow-x: auto; }

/* Cellule actif avec icône */
.pos-asset-cell { display: flex; align-items: center; gap: 8px; }
.pos-asset-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; font-style: normal;
}
.pos-asset-name { font-weight: 700; font-size: 13px; font-family: var(--sans); }

/* Badge Rôle */
.role-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 10px; font-weight: 700;
  font-family: var(--sans); white-space: nowrap;
}
.role-hedge {
  background: rgba(77,159,255,.10); color: var(--blue);
  border: 1px solid rgba(77,159,255,.20);
}
.role-exposure {
  background: rgba(240,165,0,.10); color: var(--orange);
  border: 1px solid rgba(240,165,0,.20);
}

/* Distance liquidation */
.dist-safe   { color: var(--green); }
.dist-warn   { color: var(--orange); }
.dist-danger { color: var(--red); font-weight: 700; }

/* Note bas de page */
#positions-footnote {
  padding: 8px 12px 2px; font-size: 10px; color: var(--muted2);
  font-family: var(--sans); display: flex; align-items: center; gap: 6px;
  border-top: 1px solid var(--border); margin-top: 10px;
}

/* ── Cards mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  #positions-table-wrap { display: none; }
  #positions-cards      { display: flex !important; flex-direction: column; gap: 10px; }
}
.pos-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px; transition: border-color .2s;
}
.pos-card:hover { border-color: var(--border2); }
.pos-card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.pos-card-header-left { display: flex; align-items: center; gap: 10px; }
.pos-card-pnl { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.pos-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pos-card-kv   { display: flex; flex-direction: column; gap: 2px; }
.pos-card-k {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted2); font-family: var(--sans);
}
.pos-card-v { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); }
.pos-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border);
}
.pos-card.long-card  { border-left: 3px solid var(--green); }
.pos-card.short-card { border-left: 3px solid var(--red); }

/* SECTION_CSS_CHARTS */
.chart-wrap { position: relative; }

/* SECTION_CSS_MISC */
.refresh-btn {
  border-radius: var(--radius); border: 1px solid var(--border2);
  color: var(--muted); font-size: 11px; font-weight: 500;
  padding: 5px 12px; transition: all 0.15s; background: transparent;
}
.refresh-btn:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }
.error-banner {
  background: rgba(255,77,106,0.06); border: 1px solid rgba(255,77,106,0.2); border-radius: var(--radius);
  padding: 10px 14px; font-size: 12px; color: var(--red); margin-bottom: 12px;
}
.loading { color: var(--muted); font-size: 12px; padding: 20px; text-align: center; }
.unavailable { color: var(--muted); font-style: italic; }
.green  { color: var(--green);  }
.red    { color: var(--red);    }
.orange { color: var(--orange); }
.muted  { color: var(--muted);  }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mb8  { margin-bottom: 8px;  }
.mb16 { margin-bottom: 16px; }
.mt8  { margin-top: 8px;     }
.funding-table td, .funding-table th { font-size: 11px; }
.countdown { font-variant-numeric: tabular-nums; color: var(--orange); }

/* SECTION_CSS_DRAWER */
#drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200;
}
#drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 380px;
  background: var(--bg2); border-left: 1px solid var(--border);
  padding: 24px; overflow-y: auto; z-index: 201;
  transform: translateX(100%); transition: transform 0.25s ease;
}
#drawer.open { transform: translateX(0); }

/* ── MISSION CONTROL BANNER ─────────────────────────────────────── */
#mission-control-banner {
  display: flex;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  margin: 0 0 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mcb-metric {
  flex: 1;
  padding: 14px 20px 12px;
}
.mcb-divider {
  width: 1px;
  background: var(--border2);
  margin: 10px 0;
  flex-shrink: 0;
}
.mcb-label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted2);
  margin-bottom: 6px;
}
.mcb-value {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 3px;
  transition: color .4s;
  color: var(--muted);
}
.mcb-sub {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  min-height: 16px;
}
.mcb-bar-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
  margin-bottom: 6px;
}
.mcb-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width .7s cubic-bezier(.4,0,.2,1), background .4s;
}
.mcb-detail {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted2);
  min-height: 14px;
}
@media (max-width: 640px) {
  #mission-control-banner { flex-direction: column; }
  .mcb-divider { width: auto; height: 1px; margin: 0 16px; }
  .mcb-value { font-size: 1.6rem; }
}

/* ── MCB SCENARIO SELECTOR ──────────────────────────────────────── */
.mcb-scenario-sel {
  margin-top: 8px;
  padding: 3px 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted2);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  max-width: 160px;
}
.mcb-scenario-sel:hover { border-color: rgba(0,212,170,.4); color: var(--fg); }
.mcb-scenario-sel option { background: #1a1a2e; }

/* ── PRESCRIPTIVE HEDGE CARD ────────────────────────────────────── */
#prescriptive-hedge-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.phc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.phc-title {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted2);
}
.phc-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.10);
  transition: color .3s, background .3s;
}
.phc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .phc-grid { grid-template-columns: repeat(2, 1fr); }
}
.phc-kv {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
}
.phc-label {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--muted2);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.phc-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: color .3s;
}
#phc-action-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,167,38,.06);
  border: 1px solid rgba(255,167,38,.25);
  border-radius: var(--radius);
  padding: 9px 14px;
}
.phc-action-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.phc-action-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  flex: 1;
}
.phc-action-contracts {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
#drawer-title { font-family: var(--sans); font-size: 16px; font-weight: 700; margin-bottom: 20px; }
#drawer-close {
  position: absolute; top: 20px; right: 20px;
  width: 28px; height: 28px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-size: 14px;
}
#drawer-close:hover { border-color: var(--border2); color: var(--text); }
.drawer-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.drawer-row .dk { font-family: var(--sans); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }

/* SECTION_CSS_CARDS */
/* SECTION_CSS_CARDS */
.kpi-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 12px;
}
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.kpi-card:hover { border-color: var(--border2); }
.kpi-card .label {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
}
.kpi-card .value {
  font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text);
  letter-spacing: -0.02em; margin-top: 6px;
}
.kpi-card .value.green  { color: var(--green);  }
.kpi-card .value.red    { color: var(--red);    }
.kpi-card .value.orange { color: var(--orange); }
.kpi-card .sub { font-size: 11px; color: var(--muted); margin-top: 4px; font-family: var(--sans); }
.health-bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.05); margin-top: 10px; overflow: hidden; }
.health-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s, background 0.5s; }

/* SECTION_CSS_TABLE */
/* SECTION_CSS_TABLE */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.section-title {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
/* Tableau positions — compact sans scroll horizontal */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); text-align: right;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th:first-child { text-align: left; }
.data-table td {
  font-family: var(--mono); font-size: 11px;
  padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.03);
  text-align: right; white-space: nowrap;
}
.data-table td:first-child { font-family: var(--sans); text-align: left; font-size: 11px; }
.data-table tr:hover td { background: rgba(255,255,255,0.015); }
.data-table tr.long  td:first-child { border-left: 2px solid var(--green); padding-left: 8px; }
.data-table tr.short td:first-child { border-left: 2px solid var(--red);   padding-left: 8px; }
.badge {
  display: inline-block; border-radius: 4px; font-size: 9px; font-weight: 700;
  font-family: var(--sans); letter-spacing: 0.04em; padding: 1px 6px;
}
.badge.long  { background: rgba(0,212,170,0.10);  color: var(--green);  border: 1px solid rgba(0,212,170,0.18); }
.badge.short { background: rgba(255,77,106,0.10);  color: var(--red);    border: 1px solid rgba(255,77,106,0.18); }
.badge.limit { background: rgba(77,159,255,0.10);  color: var(--blue);   border: 1px solid rgba(77,159,255,0.18); }
.badge.tp    { background: rgba(0,212,170,0.10);   color: var(--green);  border: 1px solid rgba(0,212,170,0.18); }
.badge.sl    { background: rgba(255,77,106,0.10);  color: var(--red);    border: 1px solid rgba(255,77,106,0.18); }

/* SECTION_CSS_SECTION_WRAP */
/* SECTION_CSS_SECTION_WRAP */
/* Harmonisé avec .widget-card pour un Bento Grid cohérent */
.section-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

/* SECTION_CSS_SIMULATOR */
/* SECTION_CSS_SIMULATOR */

/* ── Header : presets + reset ── */
#sim-header-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px;
}
#sim-presets { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.sim-preset {
  padding: 3px 9px; border-radius: var(--radius);
  border: 1px solid var(--border2); background: transparent;
  color: var(--muted); font-size: 10px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; transition: all .15s;
}
.sim-preset[data-preset="bear"]:hover  { border-color: var(--red);    color: var(--red);    }
.sim-preset[data-preset="crash"]:hover { border-color: var(--orange);  color: var(--orange); }
.sim-preset[data-preset="bull"]:hover  { border-color: var(--green);   color: var(--green);  }
#btn-sim-reset {
  padding: 3px 10px; border-radius: var(--radius);
  border: 1px solid var(--border2); background: transparent;
  color: var(--muted2); font-size: 10px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; transition: all .15s;
}
#btn-sim-reset:hover { color: var(--muted); }

/* ── Alerte liq BTC badge ── */
@keyframes liqBadgePulse {
  0%,100% { border-color: var(--border); background: var(--bg3); }
  50%     { border-color: rgba(255,77,106,.6); background: rgba(255,77,106,.08); }
}
.gauge-kpi-badge.liq-alert { animation: liqBadgePulse 1.6s ease-in-out infinite; }

/* ── Corps 2 colonnes ── */
#sim-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ── GAUCHE : sliders par position ── */
#sim-controls { display: flex; flex-direction: column; gap: 10px; }
#sim-sliders  { display: flex; flex-direction: column; gap: 10px; }
.sim-asset-row {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px;
}
.sim-asset-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
}
.sim-asset-name  { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sim-asset-side  {
  font-size: 8px; font-weight: 700; padding: 1px 5px;
  border-radius: 4px; background: rgba(255,255,255,.05);
  text-transform: uppercase; letter-spacing: .05em;
}
.sim-asset-entry { font-size: 10px; color: var(--muted2); }
.sim-asset-pct-wrap {
  display: flex; flex-direction: column; align-items: flex-end;
  margin-left: auto; gap: 1px;
}
.sim-asset-pct   {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--muted); text-align: right;
}
.sim-asset-px    {
  font-family: var(--mono); font-size: 9px; color: var(--muted2); text-align: right;
}
.sim-asset-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--red) 0%, var(--bg4) 50%, var(--green) 100%);
}
.sim-asset-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg2);
  box-shadow: 0 0 6px rgba(0,0,0,.5);
}
.sim-asset-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg2);
  box-shadow: 0 0 6px rgba(0,0,0,.5); border: none;
}
.sim-slider-ticks {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--muted2); margin-top: 5px; font-family: var(--sans);
}
.sim-no-pos { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0; }

/* ── DROITE : résultats ── */
#sim-results {
  display: flex; flex-direction: column;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.sim-result-big {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.sim-res-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted2); font-family: var(--sans);
}
.sim-res-val {
  font-family: var(--mono); font-size: 1.35rem;
  font-weight: 700; letter-spacing: -.02em; color: var(--text); line-height: 1;
}
/* Métriques secondaires (taille réduite) */
.sim-result-sm { padding: 8px 14px !important; }
.sim-result-sm .sim-res-val { font-size: 1.1rem; }

/* Breakdown par position */
#sim-breakdown { display: flex; flex-direction: column; }
.sim-breakdown-row {
  display: grid; grid-template-columns: 38px 18px 1fr 1fr 70px;
  align-items: center; gap: 8px; padding: 10px 20px;
  border-bottom: 1px solid var(--border); font-family: var(--mono);
}
.sim-bd-coin { font-size: 12px; font-weight: 700; }
.sim-bd-side { font-size: 9px;  font-weight: 700; text-align: center; }
.sim-bd-pct  { font-size: 11px; line-height: 1.4; }
.sim-bd-pnl  { font-size: 13px; font-weight: 700; text-align: right; }
.sim-bd-liq  { font-size: 10px; color: var(--orange); text-align: right; font-family: var(--mono); }

/* Hedge meter */
#sim-hedge-meter { padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; }
#sim-hedge-label-row { display: flex; justify-content: space-between; align-items: center; }
#sim-hedge-pct { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--muted); }
#sim-hedge-bar-wrap { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
#sim-hedge-bar { height: 100%; width: 0%; border-radius: 3px; background: var(--green); transition: width .4s, background .4s; }

/* ── Alerte Liquidation Croisée ── */
@keyframes sim-liq-pulse {
  0%, 100% { background: rgba(255,77,106,.06); border-color: rgba(255,77,106,.25); }
  50%       { background: rgba(255,77,106,.20); border-color: rgba(255,77,106,.60); }
}
@keyframes slot-liq-pulse {
  0%, 100% { box-shadow: none; border-color: var(--border); }
  50%       { box-shadow: 0 0 32px rgba(255,77,106,.20); border-color: rgba(255,77,106,.55); }
}
#sim-liq-alert {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px 22px; text-align: center; flex: 1;
  animation: sim-liq-pulse 1.4s ease-in-out infinite;
  border: 1px solid rgba(255,77,106,.25);
  border-radius: var(--radius-lg); margin: 0 16px 16px;
}
#sim-liq-icon   { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
#sim-liq-title  {
  font-family: var(--sans); font-size: 24px; font-weight: 900;
  color: var(--red); text-transform: uppercase; letter-spacing: .04em; line-height: 1;
  margin-bottom: 4px;
}
#sim-liq-sub    {
  font-family: var(--sans); font-size: 12px; font-weight: 800;
  color: var(--red); text-transform: uppercase; letter-spacing: .05em; opacity: .85;
  margin-bottom: 6px;
}
#sim-liq-detail { font-size: 10px; color: var(--muted2); margin-bottom: 20px; max-width: 220px; line-height: 1.5; }
#sim-liq-values { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.sim-liq-kv     { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#slot-sim.sim-liquidation { animation: slot-liq-pulse 1.4s ease-in-out infinite; }

/* ── Mobile ── */
@media (max-width: 768px) {
  #sim-body { grid-template-columns: 1fr; }
  .sim-res-val { font-size: 1.4rem; }
}

/* SECTION_CSS_ACCORDION */
/* SECTION_CSS_ACCORDION */
.accordion-btn {
  width: 100%; text-align: left; padding: 10px 14px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12px; font-weight: 500; color: var(--text); margin-bottom: 4px;
  display: flex; justify-content: space-between; align-items: center;
  transition: border-color 0.15s;
}
.accordion-btn:hover { border-color: var(--border2); }
.accordion-btn::after { content: '▼'; font-size: 10px; color: var(--muted); transition: transform 0.2s; }
.accordion-btn.open::after { transform: rotate(180deg); }
.accordion-body {
  display: none; padding: 12px 14px;
  background: var(--bg3); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); font-size: 12px; line-height: 1.6;
}
.accordion-body.open { display: block; }

/* SECTION_CSS_EXPORT */
/* SECTION_CSS_EXPORT */
.export-btn {
  border-radius: var(--radius); border: 1px solid var(--border2);
  color: var(--muted); font-size: 11px; font-weight: 500;
  padding: 5px 12px; transition: all 0.15s; background: transparent; font-family: var(--mono);
}
.export-btn:hover { border-color: var(--blue); color: var(--blue); }

/* SECTION_CSS_MOBILE */
/* SECTION_CSS_MOBILE */
@media (max-width: 900px) {
  #main-content { margin-left: 0; }
  #header { padding-left: 58px; }
  #market-clock { display: none; }
}
@media (max-width: 768px) {
  #tab1 { padding: 12px 12px 24px; }
  #tab1 .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .tab-panel { padding: 12px; }
}
@media (max-width: 480px) {
  .kpi-card .value { font-size: 17px; }
}

/* SECTION_CSS_ANIM */
/* SECTION_CSS_ANIM */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes flash-green { 0%,100% { background: transparent; } 50% { background: rgba(0,212,170,0.07); } }
@keyframes flash-red   { 0%,100% { background: transparent; } 50% { background: rgba(255,77,106,0.07); } }
.flash-green { animation: flash-green 0.6s ease; }
.flash-red   { animation: flash-red   0.6s ease; }
.pulse { animation: pulse 2s infinite; }

/* SECTION_CSS_PRIVACY_MODE */
/* SECTION_CSS_PRIVACY_MODE */
.price-blur { transition: filter 0.3s ease; }
body.privacy-mode .price-blur { filter: blur(5px); user-select: none; transition: filter 0.3s ease; }
body.privacy-mode .price-blur:hover { filter: blur(2px); }

/* SECTION_CSS_WIDGET_SLOTS */
/* SECTION_CSS_WIDGET_SLOTS */
.widget-slots-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 14px; }
.widget-placeholder {
  background: var(--bg3); border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 160px; text-align: center;
}
.widget-placeholder .wp-icon { font-size: 22px; opacity: 0.4; }
.widget-placeholder .wp-label { font-family: var(--sans); font-weight: 600; color: var(--muted); font-size: 12px; }
.widget-placeholder .wp-sub { font-size: 10px; color: var(--muted2); }

/* SECTION_CSS_WIDGET_CARDS */
/* SECTION_CSS_WIDGET_CARDS */
.widget-card {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.widget-header {
  display: flex; align-items: center; justify-content: space-between;
}
.widget-title {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
.widget-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; font-family: var(--sans); letter-spacing: 0.05em;
}
.widget-badge.sain      { background: rgba(0,212,170,0.10);  color: var(--green);  border: 1px solid rgba(0,212,170,0.2);  }
.widget-badge.attention { background: rgba(240,165,0,0.10);  color: var(--orange); border: 1px solid rgba(240,165,0,0.2);  }
.widget-badge.danger    { background: rgba(255,77,106,0.10); color: var(--red);    border: 1px solid rgba(255,77,106,0.2); }

/* ── SANTÉ DU COMPTE — styles minimaux (layout 100% inline dans le HTML) ── */
#slot-gauge { transition: box-shadow .4s ease, border-color .4s ease; }
#slot-gauge.danger-pulse { animation: gaugePulse 2s ease-in-out infinite; }
@keyframes gaugePulse {
  0%,100% { box-shadow: var(--shadow); border-color: var(--border); }
  50%     { box-shadow: 0 0 18px rgba(255,77,106,.35), 0 0 0 1px rgba(255,77,106,.25);
            border-color: rgba(255,77,106,.4); }
}
/* Badges compacts — utilisés par le JS pour les valeurs colorées */
.gauge-kpi-badge {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; display: flex; flex-direction: column; gap: 1px;
  transition: border-color .2s;
}
.gauge-kpi-badge:hover { border-color: var(--border2); }
.gkb-label { font-family: var(--sans); font-size: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted2); }
.gkb-val { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--text); }

/* Sparkline 7j equity dans Santé */
#gauge-sparkline-wrap {
  margin-top: 8px; border-top: 1px solid var(--border);
  padding-top: 8px;
}
#gauge-sparkline-label {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted2); font-family: var(--sans);
  margin-bottom: 4px;
}
#chartGaugeSparkline { width: 100% !important; height: 36px !important; display: block; }

/* Sparkline height fix */
#chartGaugeSparkline { width: 100% !important; height: 36px !important; display: block; max-height: 36px; }
#gauge-sparkline-wrap { max-height: 52px; overflow: hidden; }

/* Section separators */
.gauge-section-sep {
  height: 1px; background: var(--border); margin: 10px 0;
}
.gauge-section-title {
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted2);
}

/* ═══════════════════════════════════════════════════════════
   BENTO GRID — Onglet 1
   ═══════════════════════════════════════════════════════════ */

/* L1 : Jauge + Donut/Equity */
#health-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px; margin-bottom: 14px;
  align-items: stretch;        /* hauteurs égales */
}
@media (max-width: 900px) { #health-row { grid-template-columns: 1fr; } }

/* Bloc equity-simulée dans le donut */
#donut-equity-block {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: space-between;
}
#sim-equity-mirror {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.03em; color: var(--text);
}
.deq-label {
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted2);
}

/* L2 : Tableau positions pleine largeur */
#positions-row {
  margin-bottom: 14px;
}
#positions-row .section-wrap { margin-bottom: 0; overflow-x: auto; }

/* Bottom row : Ordres uniquement */
#bottom-row {
  display: block;
  margin-bottom: 14px;
}

/* Donut card : flex-column pour que l'equity-block s'ancre en bas */
#slot-donut {
  display: flex;
  flex-direction: column;
}
#donut-equity-block {
  margin-top: auto;        /* pousse vers le bas = même hauteur que jauge */
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: space-between;
}

/* Ordres dans L3 — même style que les autres cards */
#orders-section.in-bottom-row {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
#orders-section.in-bottom-row .orders-table-wrap {
  flex: 1; overflow-y: auto; max-height: 260px;
}

/* ── Légende zones sous la jauge ── */
#gauge-legend-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding: 6px 8px;
  background: var(--bg3); border-radius: var(--radius); gap: 4px;
}
.glb-zone { display: flex; align-items: center; gap: 5px; flex: 1; justify-content: center; }
.glb-zone + .glb-zone { border-left: 1px solid var(--border); }
.glb-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.glb-text { font-family: var(--sans); font-size: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Positions compactes (conservées, juste masquées dans le nouveau layout) */
#positions-compact { display: flex; flex-direction: column; }
.pos-compact-row {
  display: grid; grid-template-columns: 38px 22px 1fr 70px;
  align-items: center; gap: 6px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.pos-compact-row:last-child { border-bottom: none; }
.pos-c-coin { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.pos-c-side { font-size: 9px; font-weight: 700; padding: 1px 4px;
  border-radius: 3px; text-align: center; font-family: var(--sans); }
.pos-c-pnl  { font-family: var(--mono); font-size: 12px; font-weight: 700; text-align: right; }
.pos-c-dist { font-family: var(--mono); font-size: 10px; text-align: right; }

/* Funding estimé */
#funding-est-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0 2px;
}
#funding-est-amount { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted); }

/* Score risque dans action-card */
#risk-score-block { display: flex; flex-direction: column; align-items: center; gap: 2px; }
#risk-score-num { font-family: var(--mono); font-size: 26px; font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--muted); }
#risk-score-label { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-family: var(--sans); color: var(--muted2); }
#risk-score-bar-wrap { width: 52px; height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 3px; }
#risk-score-bar { height: 100%; border-radius: 2px; transition: width .4s, background .4s; }

/* Barre capacité levier */
#lev-bar-wrap { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.05); margin-top: 8px; overflow: hidden; }
#lev-bar { height: 100%; border-radius: 2px; transition: width .5s, background .5s; }

/* Donut */
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-family: var(--sans); font-size: 11px; }
.donut-legend-item { display: flex; align-items: center; gap: 6px; color: #B0B8C8; }
/* Légende horizontale sous le donut */
.donut-legend-row {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  padding: 6px 14px 4px; justify-content: center;
}
.donut-legend-row .donut-legend-item {
  font-size: 11px; color: #B0B8C8; white-space: nowrap;
}
.donut-legend-row .donut-legend-item b {
  color: #ECEFF4; font-weight: 700;
}
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-name { flex: 1; color: var(--text); font-weight: 600; }
.donut-legend-pct { font-family: var(--mono); font-size: 11px; }
#donut-center-overlay {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
  width: 160px; z-index: 3;
}
#donut-net-delta-val {
  font-family: var(--mono); font-size: 20px; font-weight: 900;
  color: #ECEFF4; line-height: 1; letter-spacing: -.03em;
  text-shadow: 0 0 20px rgba(0,0,0,.8);
}
#donut-net-delta-lbl {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #8892A4; font-family: var(--sans); margin-top: 4px;
}

/* Gauge trend arrow */
#gauge-trend-arrow { font-size: 1.1rem; font-weight: 900; line-height: 1; transition: color .4s; }

/* ── Prepare a Trade panel ── */
#btn-prepare-trade {
  padding: 5px 12px; border-radius: var(--radius);
  border: 1px solid rgba(0,212,170,.25); color: var(--green);
  background: rgba(0,212,170,.07); font-size: 11px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
#btn-prepare-trade:hover { background: rgba(0,212,170,.14); border-color: rgba(0,212,170,.4); }
#prepare-trade-panel {
  display: none; margin-top: 4px; padding: 12px 14px;
  background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg); flex-direction: column; gap: 10px;
}
#prepare-trade-panel.open { display: flex; }

/* Simulation header */
.pt-sim-header {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted2); font-family: var(--sans);
}
.pt-sim-badge {
  display: inline-block; font-size: 8px; padding: 1px 6px; border-radius: 3px;
  background: rgba(129,140,248,.1); color: #818CF8;
  border: 1px solid rgba(129,140,248,.2); font-weight: 600;
  text-transform: none; letter-spacing: 0; margin-left: 4px;
}

/* Direction */
.pt-side-row { display: flex; gap: 6px; }
.pt-side-btn {
  flex: 1; padding: 6px; border-radius: var(--radius);
  border: 1px solid var(--border2); font-size: 11px; font-weight: 700;
  font-family: var(--sans); cursor: pointer; transition: all .15s;
  color: var(--muted2); background: transparent;
}
.pt-side-btn.long.active  { background: rgba(0,212,170,.12); border-color: rgba(0,212,170,.4); color: var(--green); }
.pt-side-btn.short.active { background: rgba(255,77,106,.12); border-color: rgba(255,77,106,.4); color: var(--red); }

/* Asset pills */
.pt-asset-row { display: flex; gap: 4px; flex-wrap: wrap; }
.pt-asset-btn {
  padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: 700;
  font-family: var(--mono); cursor: pointer; transition: all .15s;
  background: transparent; border: 1px solid var(--border); color: var(--muted2);
}
.pt-asset-btn.active {
  background: rgba(66,165,245,.12); border-color: rgba(66,165,245,.4); color: #42A5F5;
}
.pt-asset-btn:hover:not(.active) { border-color: var(--border2); color: var(--text); }

/* Slider block */
.pt-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted2); font-family: var(--sans); }
.pt-slider-block { display: flex; flex-direction: column; gap: 8px; }
.pt-slider-header { display: flex; justify-content: space-between; align-items: center; }
.pt-size-val { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.pt-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; outline: none; cursor: pointer;
  background: linear-gradient(to right,
    rgba(0,212,170,.6) 0%, rgba(0,212,170,.3) 50%,
    rgba(255,167,38,.6) 50%, rgba(255,167,38,.6) 80%,
    rgba(239,83,80,.7) 80%, rgba(239,83,80,.9) 100%);
}
.pt-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--bg2);
  box-shadow: 0 0 0 2px rgba(255,255,255,.2), 0 2px 6px rgba(0,0,0,.4);
  cursor: pointer; transition: transform .1s;
}
.pt-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.pt-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--bg2); cursor: pointer;
}
.pt-pct-row { display: flex; gap: 4px; }
.pt-pct-btn {
  flex: 1; padding: 4px 0; border-radius: 5px; font-size: 10px; font-weight: 700;
  font-family: var(--mono); cursor: pointer; transition: all .15s; text-align: center;
  background: transparent; border: 1px solid var(--border); color: var(--muted2);
}
.pt-pct-btn:hover, .pt-pct-btn.active {
  background: rgba(66,165,245,.12); border-color: rgba(66,165,245,.4); color: #42A5F5;
}

/* Barre d'impact CMR */
.pt-cmr-bar-wrap { }
.pt-cmr-track {
  position: relative; height: 8px; border-radius: 4px;
  display: flex; overflow: hidden; margin-bottom: 5px;
}
.pt-cmr-zone { height: 100%; }
.pt-cmr-zone.safe   { width: 50%; background: linear-gradient(to right, rgba(0,212,170,.55), rgba(0,212,170,.2)); }
.pt-cmr-zone.warn   { width: 30%; background: linear-gradient(to right, rgba(255,167,38,.3), rgba(255,167,38,.55)); }
.pt-cmr-zone.danger { width: 20%; background: linear-gradient(to right, rgba(239,83,80,.5), rgba(239,83,80,.8)); }
.pt-cmr-marker {
  position: absolute; top: -2px; width: 3px; height: 12px;
  border-radius: 2px; background: rgba(255,255,255,.85);
  transform: translateX(-50%); transition: left .3s ease;
  pointer-events: none;
}
.pt-cmr-marker.sim {
  background: #818CF8; box-shadow: 0 0 5px rgba(129,140,248,.7);
  top: -3px; height: 14px; width: 2px;
}
.pt-cmr-scale {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 8px; color: var(--muted2);
}

/* Résultats */
#pt-result {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px;
  padding: 10px 0 2px; border-top: 1px solid var(--border);
}
.pt-kv { display: flex; flex-direction: column; gap: 3px; }
.pt-kv-label { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted2); font-family: var(--sans); }
.pt-kv-val { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); }

/* Heatmap legend */
.hm-legend-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.hm-leg-item {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--sans); font-size: 8.5px; color: var(--muted2);
}
.hm-leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── t1-main-row : Positions (2/3) | Scénarios (1/3) ── */
#t1-main-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px; margin-bottom: 12px; align-items: start;
}
/* Heatmap passe en dessous pleine largeur */
#t1-main-row #slot-heatmap {
  grid-column: 1 / -1;
}
@media(max-width:900px) { #t1-main-row { grid-template-columns: 1fr; } }
#t1-main-row #positions-row { margin-bottom: 0; overflow-x: hidden; }
#t1-main-row #positions-row .section-wrap { margin-bottom: 0; }

/* Heatmap pleine largeur : liste verticale, max-height + scroll */
#t1-main-row #slot-heatmap #liq-heatmap-bars {
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
#t1-main-row #slot-heatmap .liq-hm-row {
  grid-template-columns: 52px 1fr 38px;
}

/* ── Heatmap Liquidation — style Coinglass vertical ── */
#liq-heatmap-wrap { display: flex; flex-direction: column; gap: 0; }
#liq-heatmap-scale { display: none; } /* remplacé par labels inline */
#liq-heatmap-bars  { display: flex; flex-direction: column; gap: 2px; }

.liq-hm-row {
  display: grid;
  grid-template-columns: 46px 1fr 34px;
  gap: 5px; align-items: center; height: 16px; position: relative;
}
.liq-hm-price {
  font-family: var(--mono); font-size: 8.5px; color: var(--muted2);
  text-align: right; line-height: 1; white-space: nowrap;
}
.liq-hm-bar-wrap {
  position: relative; height: 10px;
  background: rgba(255,255,255,.03);
  border-radius: 2px; overflow: hidden;
}
.liq-hm-bar {
  height: 100%; border-radius: 2px;
  transition: width .35s ease;
  min-width: 2px;
}
.liq-hm-vol {
  font-family: var(--mono); font-size: 8px; color: #3A4A5A;
  text-align: left; line-height: 1;
}

/* Ligne du prix actuel */
.liq-hm-row.is-current .liq-hm-price { color: #00D4AA; font-weight: 800; }
.liq-hm-row.is-current .liq-hm-bar-wrap { outline: 1px solid rgba(0,212,170,.5); border-radius: 2px; }

/* Ligne liquidation utilisateur */
.liq-hm-row.is-user-liq .liq-hm-price { color: #EF5350; font-weight: 800; }
.liq-hm-row.is-user-liq .liq-hm-bar-wrap::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(239,83,80,.6); border-radius: 2px; z-index: 2;
}
.liq-hm-myline {
  display: none; /* remplacé par .is-user-liq class */
}
.stress-slider-wrap { display: flex; flex-direction: column; gap: 6px; }
.stress-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; font-family: var(--sans); color: var(--muted2);
}
.stress-labels .stress-mid {
  color: var(--muted); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; font-size: 9px;
}
.stress-current {
  text-align: center; font-family: var(--mono); font-size: 20px;
  font-weight: 700; letter-spacing: -0.02em; margin: 2px 0;
}
input#stress-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; border-radius: 2px;
  background: linear-gradient(to right, var(--red), var(--bg4) 50%, var(--green));
  outline: none;
}
input#stress-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--text);
  border: 2px solid var(--bg2); cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.stress-results { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.stress-result-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  text-align: center;
}
.stress-result-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted2); font-family: var(--sans);
  margin-bottom: 6px;
}
.stress-result-val {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── F1/F3/F4 — New KPI cards ── */
.sec-kpi-card--new {
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, var(--bg3) 100%);
  border-color: rgba(99,102,241,0.25);
}
.kpi-badge-period {
  display: inline-block;
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
  background: rgba(99,102,241,0.15);
  padding: 1px 5px; border-radius: 3px; margin-left: 4px;
  vertical-align: middle;
}
.sec-kpi-sub {
  font-size: 9px; color: var(--muted2); font-family: var(--sans);
  margin-top: 3px; letter-spacing: 0.02em;
}

/* ── F2 — Liquidation alert banner ── */
#liq-alert-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  pointer-events: none;
}
.liq-alert-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(239,68,68,0.92); color: #fff;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  padding: 8px 18px; border-bottom: 1px solid rgba(255,255,255,0.15);
  animation: liqSlideIn 0.3s ease;
}
.liq-alert-item .liq-icon { font-size: 16px; }
.liq-alert-item .liq-pct  { font-family: var(--mono); font-size: 14px; font-weight: 700; }
@keyframes liqSlideIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── F5 — Funding rate sparklines ── */
.fr-charts-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 4px 0;
}
.fr-spark-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  min-width: 140px; flex: 1 1 140px; max-width: 200px;
}
.fr-spark-card.fr-positive { border-color: rgba(74,222,128,0.3); }
.fr-spark-card.fr-negative { border-color: rgba(239,68,68,0.3); }
.fr-spark-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.fr-spark-coin {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text);
}
.fr-spark-rate {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.fr-spark-rate.pos { color: var(--green); }
.fr-spark-rate.neg { color: var(--red); }
.fr-spark-canvas { width: 100% !important; height: 40px !important; }
.fr-spark-avg {
  font-size: 9px; color: var(--muted2); font-family: var(--sans);
  margin-top: 4px; text-align: right;
}

/* ── F6 — Hedge correlation signal badge ── */
.hedge-signal-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted2);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.hedge-signal-badge.signal-strong {
  background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.4);
  color: var(--green);
}
.hedge-signal-badge.signal-moderate {
  background: rgba(250,204,21,0.12); border-color: rgba(250,204,21,0.4);
  color: #facc15;
}
.hedge-signal-badge.signal-weak {
  background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4);
  color: var(--red);
}

/* ── Strategy Monitor ── */
.sm-level-row {
  display:flex;align-items:center;gap:7px;
  padding:4px 8px;border-radius:5px;
  background:rgba(255,255,255,0.02);
  transition:background .2s;
}
.sm-level-row.sm-active { background:rgba(171,124,247,0.08);border:1px solid rgba(171,124,247,0.2); }
.sm-level-row.sm-alert  { background:rgba(239,83,80,0.08);border:1px solid rgba(239,83,80,0.2); }
.sm-level-dot  { width:6px;height:6px;border-radius:50%;flex-shrink:0; }
.sm-level-label{ font-family:var(--mono);font-size:11px;font-weight:700;color:var(--text);min-width:62px; }
.sm-level-desc { font-size:10px;color:var(--muted2);flex:1;line-height:1.3; }
.sm-level-badge {
  font-family:var(--mono);font-size:9px;font-weight:700;
  padding:1px 6px;border-radius:4px;
  background:rgba(255,255,255,0.05);color:var(--muted2);
  white-space:nowrap;flex-shrink:0;
}
.sm-level-badge.above { background:rgba(38,166,154,0.12);color:var(--green); }
.sm-level-badge.below { background:rgba(239,83,80,0.12);color:var(--red); }
.sm-level-badge.near  { background:rgba(255,167,38,0.12);color:var(--orange);animation:smPulse 1.2s infinite; }
.sm-alert-pill {
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 9px;border-radius:12px;
  font-size:10px;font-weight:700;font-family:var(--sans);
}
.sm-alert-pill.warn   { background:rgba(255,167,38,0.12);color:var(--orange);border:1px solid rgba(255,167,38,0.25); }
.sm-alert-pill.danger { background:rgba(239,83,80,0.12);color:var(--red);border:1px solid rgba(239,83,80,0.25); }
.sm-alert-pill.ok     { background:rgba(38,166,154,0.12);color:var(--green);border:1px solid rgba(38,166,154,0.25); }
@keyframes smPulse { 0%,100%{opacity:1} 50%{opacity:.4} }
@media (max-width:600px) {
  #strategy-monitor [style*="grid-template-columns:1fr 1fr"] { grid-template-columns:1fr !important; }
  .sm-level-desc { display:none; }
}
