/* ==========================================================================
   SolTerm — style « data terminal » (tasteskill v2, app screens, kind: markets)
   Écran lu en longues sessions : cartes plus sombres que le fond, chiffres tabulaires
   en mono qui s'empilent, signes plutôt que couleurs, et toute sélection marquée par
   la même ligne d'accent de 1px. Couleur sur les données uniquement (< 3 % des pixels).
   Pas de dégradé, de halo, de verre, de violet.
   ========================================================================== */
:root {
  /* tokens dealt — data-terminal (seed 1339154129) */
  --ground: #171719;
  --surface: #131217;
  --raised: #212023;
  --border: #222224;
  --rule: #1b1a1f;
  --control: #3a3a3e;
  --text: #ffffff;
  --muted: #8a8c92;
  --accent: #4a8ad6;
  --positive: #44a282;
  --negative: #e5566f;
  --warning: #d9a441;
  --pill-positive-bg: #1b2828; --pill-positive-ink: #5fc39c;
  --pill-negative-bg: #2c1a20; --pill-negative-ink: #e5566f;
  --pill-warning-bg: #2a2416; --pill-warning-ink: #d9a441;
  --pill-neutral-bg: #212023; --pill-neutral-ink: #bdbdc0;
  --shadow: 0 12px 28px rgba(0, 0, 0, .2);
  --float: 0 18px 48px rgba(0, 0, 0, .5);
  --radius-card: 6px;
  --radius-control: 999px;
  --radius-chip: 4px;
  --row-height: 42px;
  --gap: 24px;
  --pad: 32px;
  --control-height: 34px;
  --fs-title: 26px;
  --fs-section: 20px;
  --fs-kpi: 20px;
  --fs-body: 13px;
  --fs-small: 12px;
  --font: "Public Sans", Inter, system-ui, sans-serif;
  /* Le visage choisi : chaque chiffre en mono, des digits qui s'empilent. */
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --rail: 56px;
  --header: 52px;
  --status: 28px;
  --wl: 0px;

  /* alias des anciens noms encore utilisés par le JS */
  --green: var(--positive);
  --red: var(--negative);
  --yellow: var(--warning);
  --orange: var(--warning);
  --blue: var(--accent);
  --blue2: var(--accent);
  --purple: var(--accent);
  --violet: var(--accent);
  --text2: var(--muted);
  --text3: var(--muted);
  --panel: var(--surface);
  --panel2: var(--raised);
  --line: var(--border);
  --line2: var(--control);
  --hover: var(--raised);
  --bg: var(--ground);
  --bg2: var(--surface);
  color-scheme: dark;
}
body.has-wl { --wl: 36px; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  background: var(--ground);
  color: var(--text);
  font: 400 var(--fs-body)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
::selection { background: rgba(74, 138, 214, .35); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--raised); border-radius: 8px; border: 2px solid var(--surface); }
::-webkit-scrollbar-track { background: transparent; }
svg.i { width: 15px; height: 15px; flex: none; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted, .dim { color: var(--muted); }
.up { color: var(--positive); }
.down { color: var(--negative); }
.hidden { display: none !important; }
.spacer { flex: 1; }
kbd {
  font: 500 10px/1 var(--mono); color: var(--muted); padding: 2px 5px;
  border: 1px solid var(--control); border-radius: var(--radius-chip);
}
.loader { width: 16px; height: 16px; border: 1.5px solid var(--control); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }

/* Toutes les valeurs chiffrées en mono tabulaire */
.pc-r, .cell-main, .cell-sub, .tk-stat .v, .trow > span, .hrow > div:not(:first-child), .kpi .v, #balTxt, .icell .v,
.kv > span:last-child, .bdg, .shield, .qbuy, .pnl-pct, .pnl-abs, .pos-big, .score-ring b, .curve-top b, .hsum b, .hrow2 > span,
.drow2 > span, .frow > span:not(.who):not(.tok):not(.act), .wl-item span, .amts button, .fee-edit input, .field input[type=number],
.status, .age, .stat, .tl, .clean-row > span:last-child, .sres .right {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- rail ---------- */
.side {
  height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0;
  background: var(--ground); border-right: 1px solid var(--border); position: relative; z-index: 20;
}
.brand { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 16px; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--muted); border-radius: var(--radius-card); transition: color .15s;
}
.nav a svg { width: 17px; height: 17px; stroke-width: 1.6; }
.nav a .nl { display: none; }
.nav a:hover { color: var(--text); }
/* le mouvement du style : la sélection est une ligne d'accent de 1px sur le bord du rail */
.nav a.active { color: var(--text); }
.nav a.active::after { content: ""; position: absolute; right: -8px; top: 10px; bottom: 10px; width: 1px; background: var(--accent); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.side-btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); border-radius: var(--radius-card); }
.side-btn:hover { color: var(--text); }
.side-btn svg { width: 17px; height: 17px; }

/* ---------- colonne principale ---------- */
.main { display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.header {
  height: var(--header); flex: none; display: flex; align-items: center; gap: 16px; padding: 0 20px;
  border-bottom: 1px solid var(--border); background: var(--ground); position: relative; z-index: 15;
}
body.paper .header { border-bottom-color: var(--warning); }
.product { font-weight: 600; font-size: 14px; }
.search-btn {
  width: min(440px, 40vw); height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border-radius: var(--radius-control); border: 1px solid var(--control); color: var(--muted); margin-left: 8px;
}
.search-btn:hover { color: var(--text); }
.search-btn svg { width: 14px; height: 14px; }
.search-btn kbd { margin-left: auto; }
.hright { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip {
  height: var(--control-height); display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  border-radius: var(--radius-control); border: 1px solid var(--control); font-weight: 500;
}
.chip:hover { border-color: var(--muted); }
.chip svg.i { width: 14px; height: 14px; color: var(--muted); }
.btn-primary {
  height: var(--control-height); padding: 0 18px; border-radius: var(--radius-control);
  background: var(--text); color: #000; font-weight: 600;
}
.btn-primary:hover { background: #e4e4e6; }
.icon-btn { width: var(--control-height); height: var(--control-height); display: grid; place-items: center; border-radius: var(--radius-control); border: 1px solid var(--control); color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small svg { width: 13px; height: 13px; }

.paper-toggle {
  height: var(--control-height); display: inline-flex; align-items: center; gap: 9px; padding: 0 14px 0 10px;
  border-radius: var(--radius-control); border: 1px solid var(--control); color: var(--muted); font-weight: 500;
}
.paper-toggle:hover { color: var(--text); }
.paper-toggle .sw { width: 28px; height: 16px; border-radius: 999px; background: var(--raised); position: relative; }
.paper-toggle .sw i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .15s ease-out; }
body.paper .paper-toggle { color: var(--pill-warning-ink); border-color: var(--pill-warning-ink); background: var(--pill-warning-bg); }
body.paper .paper-toggle .sw { background: var(--warning); }
body.paper .paper-toggle .sw i { transform: translateX(12px); background: #000; }
.ptag { display: none; font: 600 11px/1 var(--font); color: var(--pill-warning-ink); background: var(--pill-warning-bg); border-radius: var(--radius-chip); padding: 3px 6px; }
body.paper .ptag { display: inline-block; }

.menu {
  position: absolute; top: calc(var(--header) - 4px); right: 20px; width: 290px; padding: 6px; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--float);
}
.menu .mhead { padding: 12px 10px 14px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.menu .mhead .big { font: 600 22px/1.2 var(--mono); display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-chip); color: var(--muted); text-align: left; }
.menu button:hover { background: var(--raised); color: var(--text); }

/* watchlist */
.wl { height: var(--wl); flex: none; display: none; align-items: center; gap: 18px; padding: 0 20px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
body.has-wl .wl { display: flex; }
.wl-title { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-small); flex: none; }
.wl-title svg { width: 12px; height: 12px; color: var(--warning); }
.wl-item { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--muted); }
.wl-item b { color: var(--text); font-weight: 600; font-family: var(--font); }
.wl-item:hover b { text-decoration: underline; text-underline-offset: 3px; }
.wl-item .av .lp { display: none; }
.wl-item button { color: var(--muted); display: none; }
.wl-item:hover button { display: inline-flex; }
.wl-item button svg { width: 11px; height: 11px; }

.app { flex: 1; min-height: 0; overflow: hidden; }
.page { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.page-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px 16px; flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-title); font-weight: 600; margin: 0; letter-spacing: -.02em; }
.hint { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--muted); }
.hint svg { width: 14px; height: 14px; }

.status { height: var(--status); flex: none; display: flex; align-items: center; gap: 18px; padding: 0 20px; font-size: 12px; white-space: nowrap; overflow: hidden; color: var(--muted); border-top: 1px solid var(--border); }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--negative); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.status .dot.on { background: var(--positive); }
.status button { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.status button:hover { color: var(--text); }
.status button svg { width: 13px; height: 13px; }
.status .pp { display: inline-flex; gap: 10px; }
.status .pp button { position: relative; font-weight: 600; padding: 0 1px; }
.status .pp button.on { color: var(--text); }
.status .pp button.on::after { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 1px; background: var(--accent); }
.paper-flag { color: var(--warning); }

/* ---------- contrôles : la sélection est toujours la même ligne d'accent ---------- */
.seg { display: inline-flex; gap: 16px; align-items: center; height: var(--control-height); }
.seg button { position: relative; color: var(--muted); font-weight: 500; font-size: var(--fs-body); padding: 0; transition: color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); }
.seg button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--accent); }
.seg.small { gap: 12px; height: 28px; }
.seg.small button { font-size: var(--fs-small); }
.seg.small button.on::after { bottom: -5px; }
.tabs { display: flex; gap: 24px; align-items: center; }
.tabs button { position: relative; color: var(--muted); font-weight: 600; font-size: var(--fs-section); letter-spacing: -.01em; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); }
.qb-input, .hidden-toggle, .mcap-max {
  height: var(--control-height); display: inline-flex; align-items: center; gap: 7px; padding: 0 14px;
  border-radius: var(--radius-control); border: 1px solid var(--control); color: var(--muted); font-size: var(--fs-small); font-weight: 500;
}
.qb-input svg, .hidden-toggle svg { width: 13px; height: 13px; }
.qb-input input { width: 54px; background: transparent; border: 0; outline: 0; font: 600 13px var(--mono); text-align: right; color: var(--text); }
.qb-input:focus-within { border-color: var(--accent); }
.hidden-toggle:hover { color: var(--text); }
.hidden-toggle.on { color: var(--text); border-color: var(--muted); }
.hidden-toggle .count { font-family: var(--mono); color: var(--text); }
.mcap-max select { background: transparent; border: 0; color: var(--text); font: 600 12px var(--mono); outline: 0; cursor: pointer; }
.mcap-max select option { background: var(--surface); }
.btn {
  height: 30px; padding: 0 12px; border-radius: var(--radius-control); border: 1px solid var(--control);
  font-size: var(--fs-small); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s, color .15s;
}
.btn:hover { border-color: var(--muted); }
.btn.blue { background: var(--text); color: #000; border-color: var(--text); font-weight: 600; }
.btn.blue:hover { background: #e4e4e6; }
.btn.red { color: var(--negative); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 13px; height: 13px; }
.import-btn { width: 100%; justify-content: center; height: 34px; border-style: dashed; color: var(--muted); }
.field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--ground); border: 1px solid var(--control); border-radius: var(--radius-card); min-width: 0; }
.field:focus-within { border-color: var(--accent); }
.field input { flex: 1; min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; font-size: 14px; font-weight: 500; }
.field .unit { color: var(--muted); display: flex; align-items: center; gap: 5px; flex: none; font-size: var(--fs-small); }
.field.mini { height: 28px; padding: 0 8px; width: 96px; }
.field.mini input { font-size: var(--fs-small); }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-small); color: var(--muted); cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }
.switch { width: 28px; height: 16px; border-radius: 999px; background: var(--raised); border: 1px solid var(--control); position: relative; flex: none; }
.switch i { position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .15s ease-out; }
.switch.on { background: var(--positive); border-color: var(--positive); }
.switch.on i { transform: translateX(12px); background: #fff; }

/* ---------- avatars, badges ---------- */
.av { position: relative; flex: none; }
.av img, .av .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--raised); }
.av .ph { display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.av.ring { padding: 0; background: none; box-shadow: none; }
.av .lp { position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%; background: var(--ground); display: grid; place-items: center; }
.av .lp svg { width: 10px; height: 10px; }
.soc { display: inline-flex; gap: 8px; align-items: center; }
.soc a, .soc button { color: var(--muted); display: inline-flex; transition: color .15s; }
.soc a:hover, .soc button:hover { color: var(--text); }
.soc svg { width: 13px; height: 13px; }
.age { color: var(--text); }
.stat { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.stat svg { width: 12px; height: 12px; }
.bdg, .shield {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; white-space: nowrap;
  border-radius: var(--radius-chip); font-size: 11px; font-weight: 500;
  background: var(--pill-neutral-bg); color: var(--pill-neutral-ink);
}
.bdg svg, .shield svg { width: 11px; height: 11px; }
.bdg.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.bdg.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.bdg.neutral { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.shield { font-weight: 600; }
.shield.good { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); } /* bon score = pas de signal, donc pas de couleur */
.shield.mid { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.shield.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.star-btn, .hide-btn { color: var(--muted); display: inline-flex; opacity: 0; transition: opacity .15s, color .15s; }
.star-btn.on { color: var(--warning); opacity: 1; }
.pcard:hover .star-btn, .drow.item:hover .star-btn, .tk-name .star-btn,
.pcard:hover .hide-btn, .drow.item:hover .hide-btn, .is-hidden .hide-btn { opacity: 1; }
.star-btn:hover { color: var(--warning); }
.hide-btn:hover { color: var(--text); }
.is-hidden { opacity: .45; }
.is-hidden:hover { opacity: .8; }
/* achat rapide : contrôle neutre au contour, plein blanc au survol */
.qbuy {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; white-space: nowrap;
  border-radius: var(--radius-control); border: 1px solid var(--control); color: var(--text); font-size: var(--fs-small); font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.qbuy svg { width: 11px; height: 11px; }
.qbuy:hover { background: var(--text); color: #000; border-color: var(--text); }
.qbuy:active { transform: scale(.97); }
.qbuy.loading { opacity: .5; pointer-events: none; }
.sol { display: inline-block; vertical-align: -1px; flex: none; }
.txbar { display: inline-block; width: 32px; height: 2px; background: var(--negative); vertical-align: middle; margin-left: 6px; }
.txbar i { display: block; height: 100%; background: var(--positive); }

/* ---------- PULSE ---------- */
.pulse-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding: 0 24px 24px; min-height: 0; }
.pcol { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.pcol-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--rule); flex: none; }
.pcol-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pcol-head .dot { display: none; }
.pcol-head .count { font: 500 12px var(--mono); color: var(--muted); }
.pcol-head .paused { font-size: 11px; color: var(--muted); display: none; }
.pcol.hovering .paused { display: inline; }
.col-filter { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 2px; color: var(--muted); font: 500 12px var(--mono); position: relative; }
.col-filter:hover { color: var(--text); }
.col-filter.on { color: var(--text); }
.col-filter.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 1px; background: var(--accent); }
.col-filter svg { width: 13px; height: 13px; }
.plist { overflow-y: auto; flex: 1; }
.pcard {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px 16px; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background .15s;
}
.pcard:hover { background: var(--raised); }
.pcard.enter { animation: rowin .35s ease-out; }
@keyframes rowin { from { opacity: .3; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pcard .av { width: 48px; height: 48px; }
.pc-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pc-l1 .sym { font-weight: 600; font-size: 14px; white-space: nowrap; }
.pc-l1 .nm { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-l2 { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.pc-l3 { display: flex; gap: 4px; flex-wrap: wrap; }
.pc-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--muted); }
.pc-r .lbl { font-family: var(--font); font-size: 11px; margin-right: 6px; }
.pc-r .mc b { font-size: 16px; font-weight: 600; color: var(--text); }
.pc-r .qbuy { margin-top: 6px; }
/* l'élément signature : la bonding curve de chaque token, en piste de 2px sous la carte */
.pc-curve { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; background: var(--raised); }
.pc-curve i { display: block; height: 100%; background: var(--muted); }
.pc-curve.hot i { background: var(--positive); }

/* ---------- DISCOVER ---------- */
.dtable { flex: 1; overflow: auto; margin: 0 24px 24px; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.drow { display: grid; grid-template-columns: minmax(260px, 2.2fr) 1fr 1fr 1fr 1fr minmax(250px, 1.7fr) 90px; align-items: center; gap: 16px; padding: 0 20px; min-height: 64px; border-bottom: 1px solid var(--rule); min-width: 1140px; }
.drow > div:nth-child(n+2):nth-child(-n+5) { text-align: right; }
.drow > div:last-child { text-align: right; }
.drow.head { min-height: 42px; position: sticky; top: 0; z-index: 2; background: var(--surface); color: var(--muted); font-size: var(--fs-small); font-weight: 400; }
.drow.head button { color: inherit; display: inline-flex; gap: 4px; align-items: center; position: relative; }
.drow.head button:hover { color: var(--text); }
.drow.head button.on { color: var(--text); }
.drow.head button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); }
.drow.item { cursor: pointer; transition: background .15s; }
.drow.item:hover { background: var(--raised); }
.pair { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pair .av { width: 36px; height: 36px; }
.pair .t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pair .t1 { display: flex; gap: 8px; align-items: baseline; }
.pair .sym { font-weight: 600; font-size: 14px; }
.pair .nm { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.pair .t2 { display: flex; gap: 10px; align-items: center; font-size: var(--fs-small); }
.cell-main { font-weight: 500; font-size: 13px; }
.cell-sub { font-size: var(--fs-small); color: var(--muted); }
.cell-sub.up { color: var(--positive); }
.cell-sub.down { color: var(--negative); }
.tinfo { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- TOKEN ---------- */
.tk { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); padding: 0 24px 24px; min-height: 0; }
.tk-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); overflow: hidden; }
.tk-head { display: flex; align-items: center; gap: 28px; padding: 16px 20px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tk-id { display: flex; gap: 12px; align-items: center; flex: none; }
.tk-id .av { width: 40px; height: 40px; }
.tk-name { display: flex; gap: 8px; align-items: center; }
.tk-name .sym { margin: 0; font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.tk-sub { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: var(--fs-small); }
.tk-sub .soc svg { width: 13px; height: 13px; }
.tk-stat { display: flex; flex-direction: column; gap: 3px; flex: none; text-align: right; }
.tk-stat .l { color: var(--muted); font-size: var(--fs-small); }
.tk-stat .v { font-weight: 500; font-size: 14px; }
.tk-stat.big .v { font-size: var(--fs-title); font-weight: 600; letter-spacing: -.02em; }
.chart-wrap { flex: 1; min-height: 280px; display: flex; flex-direction: column; }
.chart-bar { display: flex; gap: 24px; align-items: center; padding: 6px 20px; border-bottom: 1px solid var(--rule); }
#chart { flex: 1; position: relative; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; text-align: center; padding: 20px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--muted); }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--positive); animation: pulse 1.6s infinite; }
.tk-bottom { height: 300px; flex: none; border-top: 1px solid var(--rule); display: flex; flex-direction: column; min-height: 0; }
.tk-tabs { display: flex; align-items: center; gap: 24px; padding: 0 20px; border-bottom: 1px solid var(--rule); min-height: 46px; }
.tk-tabs > button { position: relative; color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; height: 46px; }
.tk-tabs > button:hover { color: var(--text); }
.tk-tabs > button.on { color: var(--text); }
.tk-tabs > button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); }
.tk-tabs .count { font: 500 12px var(--mono); color: var(--muted); }
.tk-panel { flex: 1; overflow-y: auto; }
.trow { display: grid; grid-template-columns: 56px 48px 1fr 1fr .9fr 1.8fr 24px; gap: 12px; padding: 0 20px; height: 36px; font-size: 13px; border-bottom: 1px solid var(--rule); align-items: center; }
.trow > span:nth-child(3), .trow > span:nth-child(4), .trow > span:nth-child(5) { text-align: right; }
.trow.head { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--muted); font-family: var(--font); }
.trow.head > span { font-family: var(--font); }
.trow.mine { box-shadow: inset 1px 0 0 var(--accent); }
.trow.new { animation: rowin .35s ease-out; }
.trader { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.tl { font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: var(--radius-chip); background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); white-space: nowrap; font-family: var(--font); }
.tl.you { box-shadow: inset 0 -1px 0 var(--accent); color: var(--text); }
.tl.dev { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.tl.snip, .tl.bund { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.tl.trk { color: var(--text); }
.hsum { display: flex; gap: 22px; padding: 12px 20px; font-size: var(--fs-small); color: var(--muted); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.hsum b { color: var(--text); font-weight: 500; }
.hrow2 { display: grid; grid-template-columns: 40px 1.6fr 1.2fr 70px 80px; gap: 12px; padding: 0 20px; height: 34px; align-items: center; font-size: 13px; border-bottom: 1px solid var(--rule); }
.hrow2 > span:nth-child(4), .hrow2 > span:nth-child(5) { text-align: right; }
.hrow2.sys { opacity: .5; }
.hbar { height: 2px; background: var(--raised); }
.hbar i { display: block; height: 100%; background: var(--muted); }
.hrow2:first-of-type .hbar i { background: var(--text); }
.dev-head { display: flex; gap: 32px; padding: 16px 20px; border-bottom: 1px solid var(--rule); align-items: center; flex-wrap: wrap; font-size: var(--fs-body); }
.dev-head .dim { font-size: var(--fs-small); margin-bottom: 4px; }
.verdict { margin-left: auto; height: 24px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--radius-chip); font-weight: 500; font-size: var(--fs-small); }
.verdict.good { color: var(--pill-positive-ink); background: var(--pill-positive-bg); }
.verdict.mid { color: var(--pill-warning-ink); background: var(--pill-warning-bg); }
.verdict.bad { color: var(--pill-negative-ink); background: var(--pill-negative-bg); }
.drow2 { display: grid; grid-template-columns: 90px 1.4fr 60px 1fr 1fr 80px; gap: 12px; padding: 0 20px; height: 38px; font-size: var(--fs-small); border-bottom: 1px solid var(--rule); cursor: pointer; align-items: center; }
.drow2:hover { background: var(--raised); }
.drow2 .sym { font-weight: 600; font-family: var(--font); }

.tk-right { overflow-y: auto; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tk-right > .card { background: none; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--rule); }
.tk-right > .card:last-child { border-bottom: 0; }
.card { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 20px; }
.card h4 { margin: 0 0 14px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h4 svg { width: 14px; height: 14px; color: var(--muted); }
.card h4 .dim { font-weight: 400; font-size: var(--fs-small); }
.trade-card { }
.bs { display: flex; gap: 24px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.bs button { position: relative; padding: 0 0 12px; font-weight: 600; font-size: 15px; color: var(--muted); }
.bs button:hover { color: var(--text); }
.bs button.on { color: var(--text); }
.bs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); }
.hold { display: flex; justify-content: space-between; font-size: var(--fs-small); color: var(--muted); margin-bottom: 10px; }
.hold > span:last-child { font-family: var(--mono); color: var(--text); }
.amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.amts button {
  position: relative; height: 36px; border-radius: var(--radius-control); border: 1px solid var(--control);
  font-weight: 500; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: border-color .15s;
}
.amts button:hover { border-color: var(--muted); }
.amts button.on { border-color: var(--text); }
.amts kbd { display: none; }
.preset-line { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; font-size: var(--fs-small); color: var(--muted); }
.fee-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.fee-edit label { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--radius-card); background: var(--ground); border: 1px solid var(--border); cursor: text; }
.fee-edit label:focus-within { border-color: var(--accent); }
.fee-edit span { font-size: 11px; color: var(--muted); }
.fee-edit input { width: 100%; background: transparent; border: 0; outline: 0; font-weight: 500; font-size: 13px; padding: 0; }
.fee-edit em { display: none; }
.fee-warn { margin: -6px 0 14px; padding: 10px 12px; border-radius: var(--radius-card); font-size: var(--fs-small); line-height: 1.5; color: var(--pill-warning-ink); background: var(--pill-warning-bg); }
/* l'action principale de l'écran : achat (vert) ou vente (rouge), un seul plein à la fois */
.big-btn { width: 100%; height: 44px; border-radius: var(--radius-control); font-weight: 600; font-size: 14px; transition: filter .15s, transform .1s; }
.big-btn.buy { background: var(--positive); color: #04120c; }
.big-btn.sell { background: var(--negative); color: #fff; }
.big-btn:hover { filter: brightness(1.08); }
.big-btn:active { transform: scale(.99); }
.big-btn:disabled { opacity: .5; cursor: wait; }
body.paper .big-btn.buy { background: var(--warning); color: #1a1204; }
.ghost-full { width: 100%; justify-content: center; height: 34px; margin-top: 10px; }
.hotkeys { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-size: 11px; color: var(--muted); }
.hotkeys svg { width: 14px; height: 14px; }
.share-btn { height: 26px; padding: 0 10px; margin-left: auto; }
.pnl-hero { padding: 4px 0 16px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.pnl-pct { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.pnl-hero.win .pnl-pct { color: var(--positive); }
.pnl-hero.loss .pnl-pct { color: var(--negative); }
.pnl-abs { margin-top: 6px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pnl-abs span { color: var(--muted); margin-left: 4px; }
.pnl-bars { display: grid; gap: 8px; margin-bottom: 10px; font-size: var(--fs-small); }
.pnl-bars > div { display: grid; grid-template-columns: 100px 1fr auto; gap: 10px; align-items: center; }
.pnl-bars .k { color: var(--muted); }
.pnl-bars b { font: 500 12px var(--mono); }
.pnl-bars .bar { height: 2px; background: var(--raised); }
.pnl-bars .bar i { display: block; height: 100%; background: var(--muted); }
.pnl-bars .bar.win i { background: var(--positive); }
.pnl-bars .bar.loss i { background: var(--negative); }
.pos-big { font-size: 24px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.pos-big span { font-size: 13px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; height: 28px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .k .dim { font-size: 11px; }
.exits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.exits .field { height: 36px; padding: 0 10px; gap: 4px; min-width: 0; }
.exits .field input { font-size: 13px; }
.exits .unit { font-size: 11px; }
.shield-card { display: flex; gap: 16px; align-items: center; }
/* score Shield : un chiffre, pas un anneau en dégradé */
.score-ring { width: 72px; height: 72px; flex: none; display: grid; place-content: center; text-align: center; border-radius: 50%; border: 2px solid var(--c, var(--positive)); background: none; box-shadow: none; }
.score-ring b { font-size: 24px; line-height: 1; font-weight: 600; }
.score-ring span { font-size: 11px; color: var(--muted); }
.shield-card .why { font-size: var(--fs-small); display: grid; gap: 6px; color: var(--muted); }
.curve-top { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-small); gap: 8px; }
.curve-top b { font-size: 22px; font-weight: 600; }
.prog { height: 2px; background: var(--raised); margin-top: 10px; }
.prog i { display: block; height: 100%; background: var(--text); }
.prog.big { height: 2px; margin: 14px 0 8px; }
.igrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border-radius: var(--radius-card); overflow: hidden; }
.icell { background: var(--surface); padding: 12px 10px; }
.icell .v { font-weight: 500; font-size: 14px; }
.icell .v.up, .icell .v.down { color: var(--text); }
.icell .v.down::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--negative); margin-right: 6px; vertical-align: 2px; }
.icell .l { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- PORTFOLIO, REWARDS ---------- */
.pf { flex: 1; overflow-y: auto; padding: 0 24px 24px; display: flex; flex-direction: column; gap: var(--gap); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.kpi { background: var(--surface); padding: 20px; }
.kpi .l { color: var(--muted); font-size: var(--fs-small); }
.kpi .v { font-size: var(--fs-kpi); font-weight: 600; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.kpi .s { color: var(--muted); font-size: var(--fs-small); margin-top: 6px; }
.kpi .actions, .kpi .reset { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.kpi .reset input { width: 80px; height: 30px; background: var(--ground); border: 1px solid var(--control); border-radius: var(--radius-control); padding: 0 10px; outline: 0; font: 500 12px var(--mono); }
.kpi.paper .l::after { content: " · paper"; color: var(--warning); }
.kpi.reward.has .v { color: var(--text); }
.section-title { font-size: var(--fs-section); font-weight: 400; color: var(--muted); margin: 8px 0 -8px; }
.htable { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); overflow: hidden; }
.hrow { display: grid; grid-template-columns: minmax(200px, 1.6fr) 1fr 1fr 1fr 1fr 230px 280px; gap: 16px; padding: 0 20px; min-height: 56px; border-bottom: 1px solid var(--rule); align-items: center; }
.hrow > div:nth-child(n+2):nth-child(-n+5) { text-align: right; }
.hrow.head { min-height: 42px; color: var(--muted); font-size: var(--fs-small); }
.hrow.head > div { font-family: var(--font); }
.hrow:last-child { border-bottom: 0; }
.hrow .tp { display: flex; gap: 6px; }
.hrow .tp input { width: 64px; height: 28px; background: var(--ground); border: 1px solid var(--control); border-radius: var(--radius-control); padding: 0 10px; outline: 0; font: 500 12px var(--mono); }
.hrow .tp input:focus { border-color: var(--accent); }
.hrow .acts { display: flex; gap: 6px; justify-content: flex-end; }
.hrow .acts .btn { height: 26px; padding: 0 9px; }
.hrow.rw-row { grid-template-columns: 1.1fr 1.4fr 1fr 1fr .8fr 1fr 1fr; }
.rw-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-card); font-size: var(--fs-body); line-height: 1.55; color: var(--muted); background: var(--surface); box-shadow: var(--shadow); }
.rw-banner b { color: var(--text); font-weight: 600; }
.rw-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--warning); }
.rw-banner.on .rw-dot { background: var(--positive); }

/* ---------- TRACKER ---------- */
.tr-grid { flex: 1; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: var(--gap); padding: 0 24px 24px; min-height: 0; }
.tr-wallets { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.tr-add, .wcard { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 16px; }
.tr-add { display: grid; gap: 10px; }
.tr-emoji { display: flex; gap: 4px; flex-wrap: wrap; }
.tr-emoji button { width: 30px; height: 30px; border-radius: var(--radius-card); font-size: 15px; position: relative; }
.tr-emoji button.on::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -2px; height: 1px; background: var(--accent); }
.wcard { display: grid; gap: 12px; }
.wtop { display: flex; gap: 12px; align-items: center; }
.wemoji { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: var(--raised); }
.wtop .mono { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--muted); }
.wtop .soc svg { width: 12px; height: 12px; }
.wcopy { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--muted); flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--rule); }
.wcopy.on { color: var(--text); }
.tr-feed { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tr-feed .dot { display: none; }
.frow { display: grid; grid-template-columns: 48px 150px 60px 1.3fr 100px 100px 84px; gap: 12px; align-items: center; padding: 0 16px; height: 48px; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: var(--fs-small); }
.frow > span:nth-child(5), .frow > span:nth-child(6), .frow > span:nth-child(7) { text-align: right; }
.frow:hover { background: var(--raised); }
.frow.enter { animation: rowin .35s ease-out; }
.frow .who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .act { font-weight: 500; }
.frow .tok { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.frow .tok .av { width: 24px; height: 24px; }
.frow .tok .av .lp { display: none; }
.import-area { width: 100%; height: 200px; resize: vertical; background: var(--ground); border: 1px solid var(--control); border-radius: var(--radius-card); padding: 12px; outline: 0; font: 12px/1.5 var(--mono); }
.import-area:focus { border-color: var(--accent); }

/* ---------- ce qui flotte : modales, menus, toasts (seuls à porter une ombre forte) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 50; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow-y: auto; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--float);
  animation: pop .18s ease-out;
}
.modal.wide { width: min(720px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.modal h2 { margin: 0 0 6px; font-size: var(--fs-section); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.modal .sub { color: var(--muted); font-size: var(--fs-body); margin-bottom: 18px; line-height: 1.55; }
.modal .close { color: var(--muted); }
.modal .close:hover { color: var(--text); }
.label { font-size: var(--fs-small); color: var(--muted); margin: 16px 0 8px; display: flex; justify-content: space-between; }
.grid1 { display: grid; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qr { background: #fff; border-radius: var(--radius-card); padding: 10px; width: 200px; height: 200px; margin: 8px auto 18px; }
.qr svg { width: 100%; height: 100%; display: block; }
.addr-box { display: flex; align-items: center; gap: 8px; background: var(--ground); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 10px 12px; word-break: break-all; }
.addr-box .mono { flex: 1; }
.note { font-size: var(--fs-small); color: var(--muted); margin-top: 14px; line-height: 1.55; }
.note.warn { color: var(--pill-warning-ink); background: var(--pill-warning-bg); padding: 10px 12px; border-radius: var(--radius-card); }
.note.ok-note { color: var(--text); background: var(--raised); padding: 12px 14px; border-radius: var(--radius-card); }
.btn-blue-full { width: 100%; height: 42px; border-radius: var(--radius-control); background: var(--text); color: #000; font-weight: 600; margin-top: 18px; }
.btn-blue-full:hover { background: #e4e4e6; }
.btn-blue-full:disabled { opacity: .5; }
.max-btn { color: var(--text); font: 600 12px var(--mono); }
.clean-list { max-height: 320px; overflow-y: auto; border-radius: var(--radius-card); background: var(--ground); margin-top: 12px; }
.clean-row { display: grid; grid-template-columns: 22px 28px 1fr auto auto; gap: 12px; align-items: center; padding: 0 12px; height: 44px; border-bottom: 1px solid var(--rule); font-size: var(--fs-small); }
.clean-row:last-child { border-bottom: 0; }
.clean-row .av { width: 24px; height: 24px; }
.search-modal { width: min(640px, calc(100vw - 32px)); padding: 0; overflow: hidden; align-self: start; margin-top: 12vh; }
.search-modal .field { border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; height: 56px; background: transparent; padding: 0 20px; }
.search-modal .field input { font-size: 15px; }
.sres { max-height: 440px; overflow-y: auto; padding: 6px; }
.sres .r { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-card); cursor: pointer; }
.sres .r:hover, .sres .r.sel { background: var(--raised); }
.sres .r .av { width: 34px; height: 34px; }
.sres .r .right { margin-left: auto; text-align: right; font-size: var(--fs-small); }
.pnl-canvas { width: 100%; aspect-ratio: 1200 / 675; display: block; border-radius: var(--radius-card); }
#toasts { position: fixed; right: 20px; bottom: calc(var(--status) + 16px); display: flex; flex-direction: column; gap: 8px; z-index: 60; width: 340px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-card); font-size: var(--fs-small); line-height: 1.5; background: var(--raised); border: 1px solid var(--control); box-shadow: var(--float); animation: tin .2s ease-out; }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }
.toast .ti { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--muted); }
.toast.ok .ti { background: var(--positive); }
.toast.err .ti { background: var(--negative); }
.toast.wait .ti { background: var(--warning); animation: pulse 1s infinite; }
.toast b { display: block; margin-bottom: 2px; font-size: 13px; }
.toast a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- identités, suggestions, historique ---------- */
.idchip { flex: none; display: inline-grid; place-items: center; border-radius: 50%; font: 600 12px/1 var(--font); }
.frow .who { display: inline-flex; align-items: center; gap: 8px; }
.sg-head { padding: 16px 16px 10px; font-size: 13px; }
.sg-row { display: grid; grid-template-columns: 1.6fr 1fr .7fr .7fr .6fr 96px; gap: 12px; align-items: center; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.sg-row > span:nth-child(n+2):nth-child(-n+5) { text-align: right; font-family: var(--mono); }
.sg-row > span:last-child { text-align: right; }
.sg-row.head { height: 36px; color: var(--muted); font-size: var(--fs-small); }
.sg-row.head > span { font-family: var(--font); }
.sg-row .who { display: inline-flex; align-items: center; gap: 8px; }
.hrow.hist { grid-template-columns: minmax(200px, 1.6fr) .7fr 1fr 1fr .8fr .8fr 1.1fr; }
.hrow.hist > div:nth-child(n+3) { text-align: right; }
/* colonne gauche du Tracker : un seul panneau, à la hauteur du flux */
.tr-wallets { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); gap: 0; }
.tr-wallets > .tr-add, .tr-wallets .wcard { background: none; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--rule); }
.tr-wallets .empty-state { padding: 32px 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- tablette ---------- */
@media (max-width: 1250px) {
  .pulse-grid { grid-template-columns: 1fr 1fr; overflow-y: auto; }
  .pcol { min-height: 520px; }
  .tk { grid-template-columns: minmax(0, 1fr) 320px; }
  /* tablette : le tableau Discover garde 5 colonnes, sans défilement horizontal */
  .drow { min-width: 0; grid-template-columns: minmax(200px, 2fr) 1fr 1fr 1fr 90px; }
  .drow > div:nth-child(3), .drow > div:nth-child(6) { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .tr-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .hint { display: none; }
}
/* ---------- téléphone : le rail devient une barre du bas avec libellés ---------- */
@media (max-width: 820px) {
  body { grid-template-columns: 1fr; overflow: auto; }
  .side { position: fixed; left: 0; right: 0; bottom: 0; height: 60px; flex-direction: row; justify-content: space-around; padding: 0 8px; border-right: 0; border-top: 1px solid var(--border); z-index: 40; }
  .brand, .side-bottom { display: none; }
  .nav { flex-direction: row; gap: 0; width: 100%; justify-content: space-around; }
  .nav a { width: auto; height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 6px; }
  .nav a .nl { display: block; font-size: 11px; }
  .nav a.active::after { left: 10px; right: 10px; top: 0; bottom: auto; width: auto; height: 1px; }
  .main { height: calc(100vh - 60px); }
  .header { padding: 0 16px; }
  .search-btn { display: none; }
  .hright .addr { display: none; }
  .status { display: none; }
  .paper-toggle { font-size: 0; gap: 0; padding: 0 10px; }
  .hright { gap: 6px; }
  .chip, .btn-primary { padding: 0 12px; }
  .page-head { padding: 16px; }
  .pulse-grid, .tk, .tr-grid { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .dtable { margin: 0 16px 16px; }
  .pf { padding: 0 16px 16px; }
  .chart-wrap { min-height: 340px; }
  .tk { overflow-y: auto; grid-auto-rows: max-content; }
  .tk-left { overflow: visible; }
  .trow { grid-template-columns: 38px 40px 1fr 1fr 1.2fr; gap: 8px; padding: 0 16px; }
  .trow > span:nth-child(5), .trow > a:last-child, .trow > span:last-child:empty { display: none; }
  .trader .tl { display: none; }
  .tk-tabs .seg { display: none; }
  .tk-right { overflow: visible; }
  .tk-head { flex-wrap: wrap; gap: 14px 22px; overflow: visible; padding: 16px; }
  .tk-id { width: 100%; }
  .tk-stat { text-align: left; }
  .kpis { grid-template-columns: 1fr; }
  .hrow, .hrow.hist, .hrow.rw-row { grid-template-columns: 1fr 1fr; row-gap: 4px; padding: 12px 16px; }
  .hrow.head { display: none; }
  .hrow > div { text-align: left !important; }
  .hrow > div:nth-child(even) { text-align: right !important; }
  .sg-row { grid-template-columns: 1.4fr 1fr 84px; }
  .sg-row > span:nth-child(3), .sg-row > span:nth-child(4), .sg-row > span:nth-child(5) { display: none; }
  .frow { grid-template-columns: 1fr auto; height: auto; padding: 10px 16px; row-gap: 4px; }
  .frow > span:nth-child(1), .frow > span:nth-child(6) { display: none; }
}
