/* 3commas-style design system (app.css). Loaded on every page via _nav.html. */
:root{
  --cb-sidebar-w: 224px;
  --cb-header-h: 58px;
  --cb-bg:#f4f6f8; --cb-panel:#fff; --cb-border:#e7eaee;
  --cb-text:#1a1d29; --cb-dim:#6b7280; --cb-faint:#9ca3af;
  --cb-teal:#0ea5a3; --cb-teal-dark:#0b8a88;
  --cb-green:#16a34a; --cb-red:#dc2626;
  --cb-accent:#eefaf9; --cb-active:#eaf7f6;
  --cb-radius:10px; --cb-shadow:0 1px 2px rgba(16,24,40,.04),0 1px 3px rgba(16,24,40,.06);
}
/* Dark theme: only the design-system tokens are remapped, so pages built on var(--cb-*)
   adapt. Areas with hardcoded hex inline styles stay light until migrated. Applied when
   the user picks Dark in the header menu (data-theme on <html>). */
:root[data-theme="dark"]{
  --cb-bg:#0f1115; --cb-panel:#171a21; --cb-border:#262b36;
  --cb-text:#e6e8ee; --cb-dim:#9aa3b2; --cb-faint:#6b7280;
  --cb-accent:#0e2a29; --cb-active:#0e2a29;
  --cb-shadow:0 1px 2px rgba(0,0,0,.3),0 1px 3px rgba(0,0,0,.35);
}
/* Theme = System: follow the OS when the user hasn't pinned light or dark. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]):not([data-theme="dark"]){
    --cb-bg:#0f1115; --cb-panel:#171a21; --cb-border:#262b36;
    --cb-text:#e6e8ee; --cb-dim:#9aa3b2; --cb-faint:#6b7280;
    --cb-accent:#0e2a29; --cb-active:#0e2a29;
    --cb-shadow:0 1px 2px rgba(0,0,0,.3),0 1px 3px rgba(0,0,0,.35);
  }
}
/* Push all page content clear of the fixed sidebar + header. */
body{ padding-left: var(--cb-sidebar-w) !important; padding-top: var(--cb-header-h) !important; background: var(--cb-bg); }

/* ---------- TOP HEADER ---------- */
.cb-header{ position:fixed; top:0; left:0; right:0; height:var(--cb-header-h); z-index:1100;
  display:flex; align-items:center; gap:18px; padding:0 18px 0 0;
  background:var(--cb-panel); border-bottom:1px solid var(--cb-border);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
.cb-hbrand{ display:flex; align-items:center; gap:9px; width:var(--cb-sidebar-w); box-sizing:border-box;
  padding:0 16px; height:100%; text-decoration:none; color:var(--cb-text); font-weight:700; font-size:16px;
  border-right:1px solid var(--cb-border); }
.cb-hbrand-t{ white-space:nowrap; }
.cb-rates{ display:flex; gap:22px; }
.cb-rate{ display:flex; flex-direction:column; line-height:1.15; font-size:11px; color:var(--cb-faint); }
.cb-rate b{ font-size:13.5px; color:var(--cb-text); font-weight:700; }
.cb-rate-l{ font-size:10px; letter-spacing:.03em; }
.cb-rate-c{ font-size:11px; } .cb-rate-c.pos{ color:var(--cb-green); } .cb-rate-c.neg{ color:var(--cb-red); }
.cb-acct{ position:relative; }
.cb-acct-btn{ display:flex; align-items:center; gap:10px; background:none; border:none; cursor:pointer; padding:6px 8px; border-radius:8px; }
.cb-acct-btn:hover{ background:var(--cb-bg); }
.cb-acct-badge{ font-size:10px; font-weight:800; letter-spacing:.04em; padding:3px 7px; border-radius:5px; }
.cb-acct-badge.real{ background:#fdecec; color:var(--cb-red); }
.cb-acct-badge.demo{ background:var(--cb-active); color:var(--cb-teal-dark); }
.cb-acct-bal{ display:flex; flex-direction:column; line-height:1.15; text-align:left; }
.cb-acct-bal b{ font-size:13px; color:var(--cb-text); } .cb-acct-bal small{ font-size:10px; color:var(--cb-faint); }
/* The plan chip is what now separates the left half of the header from the right, so it
   carries the flex spacer. `.cb-push` puts it back on the teal button for the rare account
   whose plan could not be read and which therefore has no chip. */
.cb-plan{ position:relative; margin-left:auto; }
.cb-plan-btn{ display:flex; align-items:center; gap:8px; background:none; cursor:pointer;
  border:1px solid var(--cb-border); border-radius:8px; padding:5px 9px; }
.cb-plan-btn:hover{ background:var(--cb-bg); }
.cb-plan-txt{ display:flex; flex-direction:column; line-height:1.2; text-align:left; }
.cb-plan-name{ font-size:12.5px; font-weight:700; color:var(--cb-text); white-space:nowrap; }
.cb-plan-exp{ font-size:10.5px; color:var(--cb-faint); white-space:nowrap; }
.cb-plan-btn.urgent .cb-plan-exp{ color:#d946a6; font-weight:700; }
.cb-plan-pop{ right:0; width:288px; }
.cb-plan-row{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:6px 2px; font-size:12.5px; color:var(--cb-dim); }
.cb-plan-row b{ color:var(--cb-text); font-weight:700; font-variant-numeric:tabular-nums; }
.cb-plan-row.full b{ color:var(--cb-red); }
.cb-plan-note{ font-size:11px; color:var(--cb-faint); margin:8px 2px 2px; }
.cb-plan-note.urgent{ color:#d946a6; }
.cb-plan-up{ display:block; margin-top:10px; background:var(--cb-teal); color:#fff; text-align:center;
  text-decoration:none; font-weight:700; font-size:12.5px; padding:9px 0; border-radius:8px; }
.cb-plan-up:hover{ background:var(--cb-teal-dark); }
.cb-getfull{ margin-left:10px; background:var(--cb-teal); color:#fff; text-decoration:none; font-weight:700;
  font-size:12.5px; padding:8px 14px; border-radius:8px; white-space:nowrap; }
.cb-getfull.cb-push{ margin-left:auto; }
.cb-getfull:hover{ background:var(--cb-teal-dark); }
.cb-user{ position:relative; }
.cb-user-btn{ display:flex; align-items:center; gap:5px; background:none; border:1px solid var(--cb-border); border-radius:20px; padding:4px 8px 4px 4px; cursor:pointer; }
.cb-user-btn:hover{ background:var(--cb-bg); }
.cb-avatar{ width:26px; height:26px; border-radius:50%; background:linear-gradient(135deg,var(--cb-teal),#0f766e);
  color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; }
.cb-header .cb-caret{ font-size:10px; color:var(--cb-faint); }

/* ---------- HEADER — responsive ----------
   Below 820px the sidebar becomes a drawer opened by .cb-menu-btn, so the header only needs
   to fit: hamburger, logo, account balance, user menu. Everything else that can't fit a phone
   width is hidden here rather than shrunk into unreadable text. */
@media (max-width:820px){
  .cb-header{ gap:8px; padding:0 10px; }
  .cb-hbrand{ width:auto; padding:0 4px; border-right:none; }
  .cb-hbrand-t{ display:none; }               /* keep just the logo mark */
  .cb-rates{ display:none; }                  /* BTC/ETH ribbon */
  .cb-plan-exp{ display:none; }
  .cb-plan-name{ max-width:64px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .cb-getfull{ padding:8px 10px; font-size:11.5px; }
  .cb-acct-bal{ display:none; }                /* keep the Real/Demo badge, drop the $ figure */
}
@media (max-width:480px){
  .cb-plan{ display:none; }                    /* plan chip is the first thing to go entirely */
  .cb-getfull.cb-push{ margin-left:0; }
  .cb-acct-btn{ padding:6px 4px; }
}

/* header dropdowns */
.cb-pop{ position:absolute; top:calc(100% + 8px); background:var(--cb-panel); border:1px solid var(--cb-border);
  border-radius:12px; box-shadow:0 12px 34px rgba(16,24,40,.16); padding:12px; z-index:1200; }
.cb-acct-pop{ left:0; width:290px; }
.cb-user-pop{ right:0; width:250px; }
.cb-pop[hidden]{ display:none; }
@media (max-width:480px){
  .cb-acct-pop,.cb-plan-pop,.cb-user-pop{ width:calc(100vw - 24px); right:12px; left:auto; }
}
.cb-pop-lbl{ font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--cb-faint); font-weight:700; margin:4px 2px 6px; }
.cb-pop-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 2px; }
.cb-pop-t{ font-size:13px; color:var(--cb-text); font-weight:600; }
.cb-pop-s{ font-size:11px; color:var(--cb-faint); }
.cb-pop-div{ height:1px; background:var(--cb-border); margin:8px 0; }
.cb-switch{ width:38px; height:22px; border-radius:12px; border:none; background:#cbd5e1; position:relative; cursor:pointer; flex:none; transition:background .15s; }
.cb-switch::after{ content:""; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left .15s; }
.cb-switch.on{ background:var(--cb-teal); } .cb-switch.on::after{ left:18px; }
.cb-switch:disabled{ opacity:.5; cursor:default; }
.cb-user-email{ font-size:13px; font-weight:700; color:var(--cb-text); padding:2px 2px 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cb-theme{ display:flex; gap:6px; }
.cb-theme button{ flex:1; padding:8px 0; border:1px solid var(--cb-border); background:var(--cb-panel); border-radius:8px; cursor:pointer; font-size:14px; color:var(--cb-dim); }
.cb-theme button.on{ background:var(--cb-active); color:var(--cb-teal-dark); border-color:var(--cb-teal); }
.cb-menu-item{ display:flex; align-items:center; gap:10px; padding:9px 6px; border-radius:8px; text-decoration:none; color:var(--cb-text); font-size:13px; font-weight:500; }
.cb-menu-item:hover{ background:var(--cb-bg); }
.cb-menu-item .cb-mi{ width:18px; text-align:center; color:var(--cb-dim); }
.cb-menu-danger{ color:var(--cb-red); } .cb-menu-danger .cb-mi{ color:var(--cb-red); }
.cb-soon-link{ opacity:.85; }

/* Sit the sidebar below the header; the header carries the logo, so drop the
   sidebar's own brand when the header is present (authenticated pages). */
.cb-header ~ .cb-sidebar{ top:var(--cb-header-h); }
.cb-header ~ .cb-sidebar .cb-brand{ display:none; }

/* Push all page content clear of the fixed sidebar. */
body{ padding-left: var(--cb-sidebar-w) !important; background: var(--cb-bg); }

/* ---------- SIDEBAR ---------- */
.cb-sidebar{
  position:fixed; top:0; left:0; bottom:0; width:var(--cb-sidebar-w); z-index:1000;
  background:var(--cb-panel); border-right:1px solid var(--cb-border);
  display:flex; flex-direction:column; padding:16px 12px; overflow-y:auto;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
.cb-brand{ display:flex; align-items:center; gap:8px; padding:4px 8px 18px; font-weight:700; font-size:16px; color:var(--cb-text); text-decoration:none; }
.cb-logo{ width:26px; height:26px; border-radius:7px; background:linear-gradient(135deg,var(--cb-teal),#0f766e); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; }
.cb-nav a, .cb-nav .cb-group-toggle{
  display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px;
  color:var(--cb-dim); font-size:13.5px; font-weight:500; text-decoration:none; cursor:pointer; margin-bottom:2px; user-select:none;
}
.cb-nav a:hover, .cb-nav .cb-group-toggle:hover{ background:#f6f7f9; color:var(--cb-text); }
.cb-nav a.active{ background:var(--cb-active); color:var(--cb-teal-dark); font-weight:600; }
.cb-nav .cb-ic{ width:18px; text-align:center; opacity:.85; }
.cb-badge{ margin-left:auto; font-size:10px; font-weight:700; padding:1px 6px; border-radius:5px; background:#fff1e6; color:#c2410c; }
.cb-caret{ margin-left:auto; font-size:10px; color:var(--cb-faint); transition:transform .15s; }
.cb-group.open .cb-caret{ transform:rotate(180deg); }
.cb-submenu{ max-height:0; overflow:hidden; transition:max-height .18s ease; padding-left:30px; }
.cb-group.open .cb-submenu{ max-height:240px; }
.cb-submenu a{ font-size:13px; padding:7px 8px; }
.cb-soon{ color:var(--cb-faint); cursor:not-allowed; }
.cb-soon .cb-badge{ background:#eef2f7; color:#94a3b8; }
.cb-divider{ height:1px; background:var(--cb-border); margin:12px 4px; }
.cb-foot{ margin-top:auto; padding-top:14px; }
.cb-promo{ background:linear-gradient(160deg,#eefaf9,#f4f6f8); border:1px solid var(--cb-border); border-radius:var(--cb-radius); padding:12px; font-size:12px; color:var(--cb-dim); }
.cb-promo .t{ font-weight:700; color:var(--cb-text); font-size:13px; margin-bottom:4px; }
.cb-logout{ display:block; text-align:center; margin-top:10px; padding:8px; border-radius:7px; border:1px solid var(--cb-border); color:var(--cb-dim); text-decoration:none; font-weight:600; font-size:12.5px; }
.cb-logout:hover{ background:#f6f7f9; }

/* ---------- MOBILE MENU BUTTON (hamburger) ----------
   Hidden on desktop; shown only under the 820px breakpoint where the sidebar becomes an
   off-canvas drawer instead of a permanent column. Lives in the header, to the left of the
   brand, so it's reachable with a thumb regardless of scroll position. */
.cb-menu-btn{
  display:none; align-items:center; justify-content:center; width:40px; height:40px;
  margin-left:4px; border:none; background:none; cursor:pointer; border-radius:8px;
  color:var(--cb-text); font-size:20px; line-height:1; flex:none;
}
.cb-menu-btn:hover{ background:var(--cb-bg); }

/* Backdrop behind the open drawer; tapping it closes the menu (wired in _nav.html). */
.cb-backdrop{
  display:none; position:fixed; inset:0; z-index:999; background:rgba(16,24,40,.5);
}
.cb-backdrop.open{ display:block; }
body.cb-noscroll{ overflow:hidden; }

@media (max-width:820px){
  body{ padding-left:0 !important; }
  .cb-menu-btn{ display:flex; }

  /* The sidebar becomes an off-canvas drawer: fixed, slid out of view to the left, and
     brought in with a transform when `.open` is toggled by the hamburger button. Using
     transform (not `left`) keeps it on the compositor so the slide stays smooth. */
  .cb-sidebar{
    position:fixed; top:var(--cb-header-h); left:0; bottom:0; width:min(78vw,300px);
    height:auto; flex-direction:column; flex-wrap:nowrap; align-items:stretch;
    transform:translateX(-100%); transition:transform .2s ease; z-index:1050;
    box-shadow:0 0 0 rgba(0,0,0,0);
  }
  .cb-sidebar.open{ transform:translateX(0); box-shadow:12px 0 30px rgba(16,24,40,.18); }
  .cb-foot,.cb-divider{ display:block; }
}

@media (max-width:560px){
  .cb-content{ padding:16px 14px 60px; }
  .cb-title{ font-size:19px; }
}
/* CB_COMPONENTS */
.cb-content{ padding:22px 26px 60px; max-width:1400px; }
.cb-title{ font-size:24px; font-weight:700; margin:0 0 16px; color:var(--cb-text); }
.cb-tabs{ display:flex; gap:22px; border-bottom:1px solid var(--cb-border); margin-bottom:20px; }
.cb-tab{ padding:10px 2px; font-size:13.5px; font-weight:600; color:var(--cb-dim); cursor:pointer; border-bottom:2px solid transparent; text-decoration:none; }
.cb-tab.active{ color:var(--cb-teal-dark); border-color:var(--cb-teal-dark); }
.cb-grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:22px; }
.cb-grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:22px; }
@media (max-width:1100px){ .cb-grid-4{ grid-template-columns:repeat(2,1fr);} .cb-grid-3{ grid-template-columns:1fr 1fr;} }
@media (max-width:700px){ .cb-grid-4,.cb-grid-3{ grid-template-columns:1fr; } }
.cb-card{ background:var(--cb-panel); border:1px solid var(--cb-border); border-radius:var(--cb-radius); padding:16px; box-shadow:var(--cb-shadow); }
.cb-card h3{ margin:0 0 10px; font-size:13px; color:var(--cb-dim); font-weight:600; }
.cb-card .cb-stat{ font-size:22px; font-weight:700; }
.cb-pos{ color:var(--cb-green); font-weight:600; } .cb-neg{ color:var(--cb-red); font-weight:600; }
.cb-card .cb-create{ float:right; font-size:12px; background:#f2f4f7; border:1px solid var(--cb-border); padding:5px 12px; border-radius:6px; cursor:pointer; font-weight:600; color:var(--cb-text); text-decoration:none; }
.cb-subline{ font-size:12px; color:var(--cb-faint); margin-top:4px; }
.cb-panel{ background:var(--cb-panel); border:1px solid var(--cb-border); border-radius:var(--cb-radius); padding:20px; box-shadow:var(--cb-shadow); margin-bottom:22px; }
.cb-strat{ background:var(--cb-panel); border:1px solid var(--cb-border); border-radius:var(--cb-radius); padding:16px; box-shadow:var(--cb-shadow); }
.cb-strat .head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.cb-strat .pair{ font-weight:700; }
.cb-copy{ background:var(--cb-teal); color:#fff; border:none; padding:6px 14px; border-radius:6px; font-weight:700; font-size:12px; cursor:pointer; }
.cb-strat .roi{ font-size:20px; font-weight:700; color:var(--cb-green); margin:6px 0 8px; }
.cb-kv{ display:flex; justify-content:space-between; font-size:12px; color:var(--cb-dim); padding:4px 0; border-top:1px dashed var(--cb-border); }
.cb-pill{ font-size:11px; font-weight:700; padding:3px 9px; border-radius:5px; display:inline-block; }
.cb-pill.long{ background:#e8f8ee; color:var(--cb-green); }
.cb-pill.short{ background:#fdecec; color:var(--cb-red); }
.cb-btn-primary{ background:var(--cb-teal); color:#fff; border:none; padding:9px 16px; border-radius:8px; font-weight:600; font-size:13px; cursor:pointer; text-decoration:none; display:inline-block; }

/* ---------- CONTROL PANEL data grid ---------- */
.cp-toolbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:10px; flex-wrap:wrap; }
.cp-subtabs{ display:flex; gap:8px; }
.cp-pilltab{ padding:7px 14px; border-radius:8px; font-size:12.5px; font-weight:600; cursor:pointer; background:#f2f4f7; color:var(--cb-dim); border:none; }
.cp-pilltab.active{ background:var(--cb-active); color:var(--cb-teal-dark); }
.cp-tools{ display:flex; gap:8px; align-items:center; }
.cp-search{ display:flex; align-items:center; gap:6px; border:1px solid var(--cb-border); border-radius:7px; padding:6px 10px; font-size:12.5px; background:var(--cb-panel); }
.cp-search input{ border:none; outline:none; font-size:12.5px; width:150px; background:transparent; }
.cp-limit{ background:#fdecec; color:#b42318; border:1px solid #f7c9c4; border-radius:8px; padding:10px 16px; font-size:13px; margin-bottom:16px; }
.cp-limit a{ color:#b42318; font-weight:700; }
.cp-wrap{ overflow-x:auto; border:1px solid var(--cb-border); border-radius:var(--cb-radius); background:var(--cb-panel); box-shadow:var(--cb-shadow); }
table.cp{ width:100%; min-width:2100px; border-collapse:collapse; }
table.cp thead th{ position:sticky; top:0; background:var(--cb-panel); z-index:2; text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--cb-faint); padding:12px 14px; border-bottom:1px solid var(--cb-border); font-weight:700; white-space:nowrap; }
table.cp thead th.sortable{ cursor:pointer; } table.cp thead th.sortable:hover{ color:var(--cb-dim); }
table.cp tbody td{ padding:12px 14px; border-bottom:1px solid var(--cb-border); font-size:12.5px; white-space:nowrap; vertical-align:middle; }
table.cp tbody tr:last-child td{ border-bottom:none; }
table.cp tbody tr:hover{ background:#fafbfc; }
table.cp tbody tr.selected{ background:var(--cb-accent); }
.cp-check{ width:16px; height:16px; accent-color:var(--cb-teal); cursor:pointer; }
.cp-name{ display:flex; flex-direction:column; }
.cp-name .lnk{ color:var(--cb-teal-dark); font-weight:600; font-size:13px; }
.cp-name .sub{ font-size:11px; color:var(--cb-faint); margin-top:2px; }
.cp-dash{ color:var(--cb-faint); }
.cp-status{ font-weight:700; color:var(--cb-dim); } .cp-status.err{ color:var(--cb-red); }
.cp-actions{ display:flex; gap:6px; }
.cp-start{ background:var(--cb-teal); color:#fff; border:none; padding:6px 12px; border-radius:6px; font-size:12px; font-weight:700; cursor:pointer; }
.cp-start.stop{ background:#f2f4f7; color:var(--cb-text); border:1px solid var(--cb-border); }
.cp-mini{ border:1px solid var(--cb-border); background:var(--cb-panel); border-radius:6px; cursor:pointer; color:var(--cb-dim); padding:6px 9px; font-size:12px; text-decoration:none; }
.cp-foot{ display:flex; align-items:center; justify-content:flex-end; gap:14px; margin-top:14px; color:var(--cb-dim); font-size:12.5px; }

/* ---------- shared pager ----------
   Every list long enough to need paging uses these: the Control Panel grid, both tables on
   /deals, and the DCA trade tables. One style, because a pager that looks different on each
   page reads as a different control. `data-page` on the button is what the page scripts
   delegate on; `.cur` is the page you are on and a disabled edge button stays visible (an
   absent Prev is a layout jump, and jumping is what pagination is meant to stop). */
.cp-pager{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:0 auto; }
.cp-pager button{ min-width:32px; padding:6px 10px; border:1px solid var(--cb-border); border-radius:8px;
  background:var(--cb-panel); font-size:13px; font-weight:600; color:var(--cb-text); cursor:pointer; }
.cp-pager button:hover:not(:disabled){ background:var(--cb-bg); }
.cp-pager button.cur{ background:var(--cb-active); color:var(--cb-teal-dark); border-color:var(--cb-teal); }
.cp-pager button:disabled{ opacity:.5; cursor:default; }
.cp-pager .gap{ border:none; background:none; min-width:auto; padding:6px 2px; color:var(--cb-faint); cursor:default; }
.cp-perpage{ display:flex; align-items:center; gap:7px; font-size:12px; color:var(--cb-faint); }
.cp-perpage select{ border:1px solid var(--cb-border); border-radius:8px; padding:6px 8px; font-size:12.5px;
  background:var(--cb-panel); color:var(--cb-text); }
#cb-toast{ position:fixed; right:22px; bottom:22px; z-index:2000; background:#1a1d29; color:#fff; padding:11px 18px; border-radius:9px; font-size:12.8px; font-weight:600; box-shadow:0 8px 24px rgba(0,0,0,.18); opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity .18s,transform .18s; }
#cb-toast.show{ opacity:1; transform:translateY(0); }

/* Control Panel: freeze the Actions (last) column so Start/Stop/Edit/Close stay
   visible while the wide grid scrolls horizontally. */
#cp-table thead th:last-child,
#cp-table tbody td:last-child{
  position:sticky; right:0; background:var(--cb-panel); z-index:3;
  box-shadow:-8px 0 8px -8px rgba(16,24,40,.18);
}
#cp-table thead th:last-child{ z-index:4; }
#cp-table tbody tr:hover td:last-child{ background:#fafbfc; }
#cp-table tbody tr.selected td:last-child{ background:var(--cb-accent); }

/* ---------- EXCHANGE LOGOS (the shape static/js/exchange_icon.js writes) ----------
   Here rather than in a page stylesheet because a logo may appear on ANY page, and
   app.css is the one sheet every page loads (via _nav.html). .ex-ic is the round frame;
   when the SVG is missing the <img> inside is replaced by a two-letter monogram TEXT node,
   so the frame styles the text as well — that is why the font rules sit on .ex-ic. */
.ex-ic{ width:26px; height:26px; border-radius:50%; background:var(--cb-panel);
  border:1px solid var(--cb-border); display:inline-flex; align-items:center; justify-content:center;
  overflow:hidden; flex:0 0 auto; box-sizing:border-box;
  font-size:10px; font-weight:800; letter-spacing:-.02em; color:var(--cb-dim); text-transform:uppercase; }
.ex-ic .ex-img{ width:100%; height:100%; object-fit:contain; display:block; }
.ex-chip{ display:inline-flex; align-items:center; gap:8px; vertical-align:middle; }
.ex-chip .ex-name{ font-size:12.5px; font-weight:600; color:var(--cb-text); white-space:nowrap; }
.ex-ic.sm{ width:20px; height:20px; font-size:8.5px; }
.ex-ic.lg{ width:40px; height:40px; font-size:14px; }
.ex-ic.xl{ width:52px; height:52px; font-size:17px; }



