
.ctp-app *{box-sizing:border-box}
.ctp-top{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px}
.ctp-top-row{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;font-size:13px}
.ctp-status{color:var(--muted);font-size:12px}
.ctp-fund{display:none}
.ctp-fund-col{background:#0f1526;border-radius:8px;padding:6px 8px;font-size:11px}
.ctp-fund-col b{display:block;margin-bottom:4px;color:var(--accent)}
.ctp-grid4{display:block;gap:8px;flex:1;min-height:0}
.ctp-pane{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px;min-width:0;display:flex;flex-direction:column;min-height:36vh}
.ctp-pane h2{margin:0;font-size:14px;display:flex;justify-content:space-between}
.ctp-acc{display:flex;flex-wrap:wrap;gap:6px 10px;font-size:11px;color:var(--muted);margin:4px 0}
.ctp-pos{color:var(--green);font-weight:700}
.ctp-neg{color:var(--red);font-weight:700}
.ctp-tabs{display:flex;gap:4px;margin:4px 0}
.ctp-tab,.ctp-pager button{background:#203056;color:#fff;border:1px solid var(--line);border-radius:6px;padding:3px 8px;cursor:pointer;font-size:11px}
.ctp-tab.is-on{background:#2a4d8f}
.ctp-split{display:flex;flex-direction:column;gap:6px;flex:1;min-height:0}
.ctp-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:8px;max-height:28vh}
.ctp-table{width:100%;border-collapse:collapse;font-size:11px}
.ctp-table th,.ctp-table td{padding:4px 5px;border-bottom:1px solid var(--line);white-space:nowrap;text-align:left}
.ctp-table th{position:sticky;top:0;background:#1b243c}
.ctp-filters{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:4px}
.ctp-filters input{background:#0f1526;border:1px solid var(--line);color:#fff;border-radius:5px;padding:3px 5px;width:72px;font-size:11px}
.ctp-pager{display:flex;gap:6px;justify-content:flex-end;align-items:center;font-size:10px;margin-top:4px}
.ctp-prices{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px}
.ctp-prices-h{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:6px;font-size:12px}
.ctp-prices .ctp-table-wrap{max-height:28vh}
.ctp-table th[data-sort]{cursor:pointer;user-select:none}
.ctp-table th.is-sort{color:var(--accent)}
.ctp-hold{color:var(--muted);max-width:280px;white-space:normal}
@media(max-width:900px){
  .ctp-grid4,.ctp-fund,.ctp-split{grid-template-columns:1fr}
}

.ctp-tab,.ctp-pager button,.ctp-chip,button.ctp-x,.ctp-side{background:#203056;color:#fff;border:1px solid var(--line);border-radius:6px;padding:3px 8px;cursor:pointer;font-size:11px}
.ctp-tab.is-on,.ctp-chip.is-on{background:#3a6ad4;box-shadow:inset 0 0 0 1px #8eb4ff}
.ctp-x{background:#203056;color:#ff8b96}
.ctp-x:hover{background:#5a2430}
.ctp-side-g{background:#163528;color:#3dd68c}
.ctp-side-g:hover{background:#1e5a3a}
.ctp-side-r{background:#3a1b22;color:#ff6b7a}
.ctp-side-r:hover{background:#5a2430}
.ctp-in-sm{width:38px!important}
.ctp-pick{margin:0 2px 2px 0;padding:2px 6px}
.ctp-pickcell{white-space:normal;max-width:240px}

.ctp-form input[data-mf="symbol"]{width:53px}
.ctp-form input[data-mf="price"]{width:32px}
.ctp-prices .ctp-table-wrap{overflow-x:auto}
.ctp-prices .ctp-table{width:auto;table-layout:auto;margin-right:auto}
.ctp-prices .ctp-table th,.ctp-prices .ctp-table td{width:auto;white-space:nowrap}

.ctp-form{gap:2px}
.ctp-form .ctp-tab,.ctp-form .ctp-side{margin:0;padding:3px 7px}
.ctp-form input[data-mf="symbol"]{width:106px;background:#3a4154;border-color:#4a5168;color:#e8eefc}
.ctp-form input[data-mf="price"]{width:64px;background:#3a4154;border-color:#4a5168;color:#e8eefc}
.ctp-in,.ctp-filters input,[data-pf],[data-role="price-q"]{background:#3a4154!important;border:1px solid #4a5168!important;color:#e8eefc!important;border-radius:5px}

.ctp-form{gap:4px;row-gap:4px;column-gap:4px}
.ctp-form .ctp-tab,.ctp-form .ctp-side{margin:0 2px}

.ctp-lbl{color:#fff;font-weight:600}
.ctp-drag{cursor:grab;color:#93a0bf;margin-right:4px;letter-spacing:-2px}
.ctp-pane.is-drag{opacity:.6}
.ctp-pane.is-over{outline:1px dashed #6ea8ff}
.ctp-form input[data-mf="symbol"]{margin-right:6px}
.ctp-form input[data-mf="price"]{margin-left:4px}
.ctp-prices .ctp-table-wrap{height:auto;max-height:none;min-height:320px}.ctp-hold{white-space:normal}


/* Layout 50/50 ngang */
.ctp-main{display:flex;gap:10px;align-items:stretch;width:100%;box-sizing:border-box}
.ctp-left,.ctp-right{flex:1 1 50%;width:50%;max-width:50%;min-width:0;box-sizing:border-box}
.ctp-grid4{display:block;grid-template-columns:1fr}
.ctp-prices{margin-top:0;height:100%;display:flex;flex-direction:column}
.ctp-prices .ctp-table-wrap{flex:1;max-height:calc(100vh - 120px);overflow:auto;min-height:320px}
.ctp-prices .ctp-table{width:100%;table-layout:auto;font-size:12px;border-collapse:collapse}
.ctp-prices .ctp-table th,.ctp-prices .ctp-table td{padding:4px 6px;white-space:nowrap}
.ctp-prices .ctp-table th[data-sort^="pct_"],.ctp-prices .ctp-table td.ctp-pct{text-align:right;min-width:58px}
.ctp-prices .ctp-table th.is-sort{color:#8eb4ff}
.ctp-muted{opacity:.45}
@media (max-width:900px){
  .ctp-main{flex-direction:column}
  .ctp-left,.ctp-right{width:100%;max-width:100%;flex:1 1 auto}
}
  .ctp-left{max-width:none;flex:1 1 auto}
}

.ctp-auto-open{display:inline-flex;align-items:center;gap:6px;margin-left:10px;font-size:12px;color:#c5d0e6;cursor:pointer;user-select:none}
.ctp-auto-open input{margin:0}


/* ========== BẢNG GIÁ MỚI (UI theo ảnh) ========== */
.ctp-prices{
  margin:0;padding:0;background:transparent;border:none;
  height:100%;display:flex;flex-direction:column;min-height:0;
}
.ctp-pt{
  display:flex;flex-direction:column;height:100%;min-height:280px;min-width:0;
  background:#141a2a;border:1px solid #1e2740;border-radius:12px;overflow:visible;
}
.ctp-pt-toolbar{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  padding:10px 12px;background:#12182a;border-bottom:1px solid #1e2740;
}
.ctp-pt-title{font-weight:700;font-size:13px;color:#e8eefc;margin-right:4px}
.ctp-pt-seg{display:inline-flex;background:#1a2236;border-radius:999px;padding:2px;gap:2px}
.ctp-seg-btn{
  border:0;background:transparent;color:#9aa8c7;font-size:12px;font-weight:600;
  padding:5px 14px;border-radius:999px;cursor:pointer;line-height:1.2;
}
.ctp-seg-btn.is-on{background:#3b82f6;color:#fff;box-shadow:0 1px 4px rgba(59,130,246,.4)}
.ctp-seg-btn:hover:not(.is-on){color:#e8eefc}
.ctp-pt-search{
  width:120px;max-width:28vw;height:30px;padding:0 12px;
  border-radius:999px;border:1px solid #2a3550;background:#1a2236!important;
  color:#e8eefc!important;font-size:12px;outline:none;
}
.ctp-pt-search:focus{border-color:#3b82f6}
.ctp-pt-clear{
  border:0;background:#243049;color:#c5d0e6;font-size:12px;font-weight:600;
  padding:6px 12px;border-radius:999px;cursor:pointer;
}
.ctp-pt-clear:hover{background:#2e3c5a}
.ctp-pt-meta,.ctp-pt-page{font-size:12px;color:#9aa8c7;font-variant-numeric:tabular-nums}
.ctp-pt-pager{display:inline-flex;gap:4px;margin-left:auto;align-items:center;flex-wrap:wrap}
.ctp-pt-pg{
  min-width:28px;height:28px;border:1px solid #243050;border-radius:8px;background:#243049;color:#e8eefc;
  font-size:12px;font-weight:600;line-height:1;cursor:pointer;padding:0 8px;
  display:inline-flex;align-items:center;justify-content:center;
}
.ctp-pt-pg:hover{background:#3b82f6;border-color:#3b82f6;color:#fff}
.ctp-pt-pg.is-on{background:#3b82f6;border-color:#3b82f6;color:#fff}
.ctp-pt-pg:disabled{opacity:.4;cursor:default}
.ctp-pt-pg-dots{color:#6b7a99;font-size:12px;padding:0 2px}
.ctp-pt-nav{
  width:28px;height:28px;border:0;border-radius:8px;background:#243049;color:#e8eefc;
  font-size:16px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;
}
.ctp-pt-nav:hover{background:#3b82f6}
.ctp-settings-link{
  display:inline-block;padding:4px 10px;border-radius:8px;background:#161d30;color:#6ea8ff;
  text-decoration:none;font-size:12px;font-weight:600;border:1px solid #243050;white-space:nowrap;
}
.ctp-settings-link:hover{background:#1e2a48;color:#fff;border-color:#3b82f6}

.ctp-pt-scroll{flex:1;overflow:auto!important;min-height:200px;max-height:calc(100vh - 130px);-webkit-overflow-scrolling:touch}
.ctp-pt-table{width:100%;min-width:560px;border-collapse:separate;border-spacing:0;font-size:12px;table-layout:auto}
.ctp-pt-table thead th{
  position:sticky;top:0;z-index:2;
  background:#1a2240;color:#b8c5e0;font-weight:600;font-size:11px;
  text-align:left;padding:9px 10px;border-bottom:1px solid #243056;
  white-space:nowrap;user-select:none;
}
.ctp-pt-table thead th.ctp-th{cursor:pointer}
.ctp-pt-table thead th.is-sort{color:#6ea8ff}
.ctp-pt-table thead th.ctp-th-pct,
.ctp-pt-table thead th.ctp-th-price{text-align:right}
.ctp-pt-table thead th.ctp-th-pick{width:64px}
.ctp-pt-table tbody td{
  padding:8px 10px;border-bottom:1px solid #1a2238;color:#e8eefc;
  white-space:nowrap;vertical-align:middle;
}
.ctp-pt-table tbody tr:hover td{background:#1a243c}
.ctp-td-coin{font-weight:600;letter-spacing:.02em}
.ctp-td-price{text-align:right;font-variant-numeric:tabular-nums;color:#dce6f8}
.ctp-td-pct{text-align:right;font-variant-numeric:tabular-nums;min-width:64px}
.ctp-td-hold{color:#9aa8c7;max-width:180px;overflow:hidden;text-overflow:ellipsis}
.ctp-td-pick{width:auto;min-width:168px;white-space:nowrap}
.ctp-pick-btn{
  border:0;background:#2a3a6a;color:#d6e2ff;font-size:11px;font-weight:600;
  padding:4px 10px;border-radius:8px;cursor:pointer;
}
.ctp-pick-btn:hover{background:#3b82f6;color:#fff}
.ctp-pct-up{color:#3dd68c;font-weight:600}
.ctp-pct-dn{color:#ff6b7a;font-weight:600}
.ctp-pct-zero{color:#9aa8c7}
.ctp-pct-na{color:#4a5568}
.ctp-pt-empty td{text-align:center;color:#6b7a99;padding:28px 12px}

@media (max-width:900px){
  .ctp-pt-pager{margin-left:0}
  .ctp-pt-search{width:100px}
}

.ctp-td-time,.ctp-td-days{font-variant-numeric:tabular-nums;color:#9aa8c7;font-size:11px}
.ctp-td-hold,.ctp-prices .ctp-td-hold,td.ctp-hold{white-space:normal!important;max-width:280px;line-height:1.35;font-size:11px}

/* layout-force-right: bảng giá bên phải */
.ctp-main{display:flex!important;flex-direction:row!important;gap:10px;align-items:stretch;width:100%}
.ctp-left{flex:1 1 50%;width:50%;max-width:50%;min-width:0;order:1}
.ctp-right{flex:1 1 50%;width:50%;max-width:50%;min-width:0;order:2}
.ctp-prices{width:100%;height:100%}
@media (max-width:900px){
  .ctp-main{flex-direction:column!important}
  .ctp-left,.ctp-right{width:100%;max-width:100%}
}

/* v2.1.25 layout + seed */
.ctp-app{width:100%;max-width:100%;overflow:visible}
.ctp-main{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  gap:12px;align-items:flex-start;width:100%!important;min-height:480px;
}
.ctp-left{
  flex:0 0 48%;width:48%;max-width:48%;min-width:280px;
  display:flex;flex-direction:column;gap:10px;order:1;
}
.ctp-right{
  flex:1 1 52%;width:52%;max-width:52%;min-width:280px;order:2;
  display:block!important;visibility:visible!important;
}
.ctp-grid4{display:flex!important;flex-direction:column!important;gap:10px;width:100%}
.ctp-pane{width:100%;margin:0}
.ctp-prices,.ctp-prices[data-role="prices"]{
  display:block!important;visibility:visible!important;
  width:100%!important;min-height:360px!important;
  background:#141a2a;border:1px solid #1e2740;border-radius:12px;
}
.ctp-pt{display:flex!important;flex-direction:column;min-height:360px}
.ctp-seed-bar{margin:6px 0 8px}
.ctp-seed-btn{background:#1e5a3a!important;color:#3dd68c!important;font-weight:700}
.ctp-seed-btn:hover{background:#247a4a!important}
@media (max-width:900px){
  .ctp-main{flex-direction:column!important}
  .ctp-left,.ctp-right{width:100%!important;max-width:100%!important;flex:1 1 auto}
}

.ctp-seed-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 8px}
.ctp-seed-check{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#c5d0e6;cursor:pointer;user-select:none}
.ctp-seed-check input{margin:0}

/* v2.1.27 pagination + mobile prices last */
.ctp-pt-nav:disabled{opacity:.35;cursor:not-allowed}
.ctp-pt-page{font-weight:700;color:#8eb4ff!important;min-width:4.5em;text-align:center}
.ctp-td-days{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:11px;color:#9aa8c7}
@media (max-width:900px){
  .ctp-main{display:flex!important;flex-direction:column!important}
  .ctp-left{order:1!important;width:100%!important;max-width:100%!important}
  .ctp-right{order:2!important;width:100%!important;max-width:100%!important}
  .ctp-prices{order:99}
  .ctp-pt-scroll{max-height:55vh;min-height:240px}
}

/* v2.1.28 rules + price visible */
.ctp-rules{margin:6px 0 8px;padding:8px 10px;background:#0f1524;border:1px solid #1e2740;border-radius:8px}
.ctp-rule-row{font-size:11px;color:#9ec3ff;line-height:1.45;margin:2px 0}
.ctp-prices,.ctp-prices[data-role="prices"]{
  display:block!important;visibility:visible!important;opacity:1!important;
  width:100%!important;min-height:320px!important;
}
.ctp-pt{display:flex!important;flex-direction:column;min-height:320px}
.ctp-pt-scroll{display:block!important;overflow:auto!important;min-height:220px!important;max-height:calc(100vh - 120px)}
.ctp-pt-table{display:table!important;width:100%}
.ctp-pt-table tbody{display:table-row-group!important}
.ctp-pt-table tr{display:table-row!important}
.ctp-pt-table td,.ctp-pt-table th{display:table-cell!important}

/* v2.1.29 full page + form acts */
html body .ctp-app,
#ctp-app.ctp-app,
.ctp-app{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  max-width:100%!important;
  min-height:400px!important;
  height:auto!important;
  overflow:visible!important;
  position:relative!important;
  z-index:1;
  box-sizing:border-box;
  color:#e8eefc;
  background:transparent;
}
.ctp-main{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  min-height:400px!important;
  height:auto!important;
  overflow:visible!important;
  gap:12px;
  align-items:flex-start;
}
.ctp-left,.ctp-right{
  display:block!important;
  visibility:visible!important;
  overflow:visible!important;
  height:auto!important;
  min-height:200px;
}
.ctp-left{flex:0 0 48%;width:48%;max-width:48%;order:1}
.ctp-right{flex:1 1 52%;width:52%;max-width:52%;order:2}
.ctp-grid4{display:flex!important;flex-direction:column!important;gap:12px;width:100%}
.ctp-pane{
  display:block!important;
  visibility:visible!important;
  overflow:visible!important;
  height:auto!important;
  background:#141a2a;border:1px solid #1e2740;border-radius:12px;padding:12px;
}
.ctp-form-wrap{display:block!important;margin:8px 0}
.ctp-form{display:flex!important;flex-wrap:wrap;gap:6px;align-items:center}
.ctp-form-acts{
  display:flex!important;flex-wrap:wrap;gap:8px;margin-top:10px;width:100%;
}
.ctp-act{
  border:0;border-radius:8px;padding:8px 16px;font-weight:800;font-size:13px;
  cursor:pointer;letter-spacing:.02em;min-width:72px;
}
.ctp-act-long{background:#0d3d2a;color:#3dd68c}
.ctp-act-short{background:#4a1520;color:#ff7b93}
.ctp-act-buy{background:#163a5c;color:#6eb6ff}
.ctp-act-sell{background:#4a3010;color:#ffc266}
.ctp-act:hover{filter:brightness(1.12)}
.ctp-acc{display:flex;flex-wrap:wrap;gap:8px 12px;font-size:12px;margin:6px 0 8px}
.ctp-acc .ctp-lbl{opacity:.75;margin-right:2px}
@media (max-width:900px){
  .ctp-main{flex-direction:column!important}
  .ctp-left,.ctp-right{width:100%!important;max-width:100%!important;flex:1 1 auto}
}

/* v2.1.32 form tight + act on same row */
.ctp-form,.ctp-form-tight{display:flex!important;flex-wrap:wrap;gap:4px!important;align-items:center}
.ctp-form .ctp-tab,.ctp-form .ctp-in,.ctp-form .ctp-in-sm{margin:0!important}
.ctp-form .ctp-tab{padding:4px 8px!important;font-size:11px!important;line-height:1.2}
.ctp-form .ctp-in,.ctp-form .ctp-in-sm{height:28px;padding:2px 8px;font-size:12px}
.ctp-form .ctp-act-long{background:#0d3d2a!important;color:#3dd68c!important;font-weight:700}
.ctp-form .ctp-act-short{background:#4a1520!important;color:#ff7b93!important;font-weight:700}
.ctp-form .ctp-act-buy{background:#0d3d2a!important;color:#3dd68c!important;font-weight:700}
.ctp-form .ctp-act-sell{background:#4a1520!important;color:#ff7b93!important;font-weight:700}

/* v2.1.34 collapse + coin search */
.ctp-pane-h{display:flex;align-items:center;gap:6px;margin:0 0 8px;cursor:default}
.ctp-collapse{border:0;background:#243049;color:#e8eefc;width:26px;height:26px;border-radius:6px;cursor:pointer;font-size:11px;line-height:1;padding:0}
.ctp-collapse:hover{background:#3b82f6}
.ctp-pane.is-collapsed{padding-bottom:8px}
.ctp-pane.is-collapsed .ctp-pane-h{margin:0}
.ctp-coin-search{display:inline-flex;position:relative}
.ctp-coin-search .ctp-in{min-width:110px}

/* Auto trade UI */
.ctp-auto-badge{
  font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;
  letter-spacing:.03em;white-space:nowrap;
}
.ctp-auto-badge.is-on{background:#0d3d2a;color:#3dd68c;border:1px solid #1a5c3a}
.ctp-auto-badge.is-off{background:#2a2030;color:#c5a0b0;border:1px solid #4a3550}
.ctp-status.is-auto{
  background:#0d3d2a;color:#3dd68c;font-weight:700;font-size:11px;
  padding:2px 8px;border-radius:999px;border:1px solid #1a5c3a;
}
.ctp-status.is-off{color:#8a7a90;opacity:.85}
.ctp-auto-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:6px}
.ctp-auto-pill{
  font-size:10px;font-weight:800;padding:2px 8px;border-radius:999px;letter-spacing:.04em;
}
.ctp-auto-pill.is-on{background:#0d3d2a;color:#3dd68c;border:1px solid #1a5c3a}
.ctp-auto-pill.is-off{background:#2a2430;color:#a090a8;border:1px solid #3a3040}
.ctp-auto-hint{font-size:11px;color:#8a9ab8}
.ctp-rule-empty{color:#6b7a99;font-style:italic}
.ctp-rules{margin:6px 0 8px;padding:8px 10px;background:#0f1524;border:1px solid #1e2740;border-radius:8px}
.ctp-rule-row{font-size:12px;color:#c5d0e6;line-height:1.45;margin:2px 0}

/* Pane header click toggle */
.ctp-pane-h[data-pane-toggle]{cursor:pointer;user-select:none}
.ctp-pane-h[data-pane-toggle]:hover{background:rgba(59,130,246,.08);border-radius:8px}
.ctp-pane-chev{margin-left:auto;font-size:11px;color:#9aa8c7;padding:0 4px}

/* Nút Xuân Hạ Thu Đông trên bảng giá — 1 dòng, cách nhẹ */
.ctp-pick-wrap{display:inline-flex!important;flex-wrap:nowrap!important;gap:6px;align-items:center;white-space:nowrap}
.ctp-td-pick{padding:6px 8px!important;white-space:nowrap!important;width:auto!important;min-width:180px}
.ctp-pick-btn{
  margin:0!important;padding:4px 9px!important;font-size:11px!important;
  border-radius:7px;flex:0 0 auto;white-space:nowrap;
}
.ctp-pt-table thead th.ctp-th-pick{min-width:180px;white-space:nowrap}

/* v2.1.46: 4 pane full viewport 2x2; bảng giá dưới fold; days 3d|3h14m */
/* Full-bleed: nền xám sát 4 cạnh màn hình */
#ctp-app.ctp-app{
  display:flex!important;flex-direction:column!important;
  width:100vw!important;max-width:100vw!important;
  min-height:100vh!important;box-sizing:border-box;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  padding:4px 6px 8px!important;gap:6px!important;
  background:#0b1020!important;
  border-radius:0!important;border:0!important;
  position:relative;left:0;right:0;
}
#ctp-app .ctp-top{flex:0 0 auto!important;margin:0!important}
/* Top status cạnh tiêu đề: tự xuống dòng, không tràn mobile */
#ctp-app .ctp-top-row{
  display:flex!important;flex-wrap:wrap!important;
  gap:6px 10px!important;align-items:center!important;
  width:100%!important;min-width:0!important;
}
#ctp-app .ctp-top-row strong{
  flex:0 1 auto;min-width:0;max-width:100%;
}
#ctp-app .ctp-top-row > span,
#ctp-app .ctp-top-row .ctp-status,
#ctp-app .ctp-top-row .ctp-auto-badge{
  flex:1 1 auto;min-width:0;max-width:100%;
  white-space:normal!important;word-break:break-word;
  overflow-wrap:anywhere;line-height:1.35;
}
#ctp-app .ctp-main{
  display:flex!important;flex-direction:column!important;
  flex:1 1 auto!important;width:100%!important;
  gap:12px!important;min-height:0!important;
  align-items:stretch!important;
}
/* 4 trader = full màn hình còn lại (trên fold) */
#ctp-app .ctp-left{
  flex:0 0 auto!important;
  width:100%!important;max-width:100%!important;
  min-width:0!important;order:1!important;
  height:calc(100vh - 72px)!important;
  max-height:calc(100vh - 72px)!important;
}
#ctp-app .ctp-grid4{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;height:100%!important;
  min-height:100%!important;
  align-items:stretch!important;
}
#ctp-app .ctp-grid4 > .ctp-pane{
  min-width:0!important;min-height:0!important;
  max-height:none!important;height:100%!important;
  overflow:hidden!important;
  display:flex!important;flex-direction:column!important;
  margin:0!important;
}
#ctp-app .ctp-grid4 > .ctp-pane .ctp-pane-h{flex:0 0 auto}
#ctp-app .ctp-grid4 > .ctp-pane .ctp-pane-body{
  flex:1 1 auto!important;min-height:0!important;overflow:auto!important;
}
/* Bảng giá dưới fold — chỉ thấy khi cuộn */
#ctp-app .ctp-right{
  flex:0 0 auto!important;
  width:100%!important;max-width:100%!important;
  min-width:0!important;order:2!important;
  height:auto!important;
}
#ctp-app .ctp-prices{width:100%!important}
#ctp-app .ctp-pt-scroll{
  overflow-x:auto!important;overflow-y:auto!important;
  max-height:min(60vh,560px)!important;
  -webkit-overflow-scrolling:touch;
}
#ctp-app .ctp-pt-table{
  width:max-content!important;min-width:100%!important;
  table-layout:auto!important;
}
#ctp-app .ctp-pt-table th,
#ctp-app .ctp-pt-table td{
  white-space:nowrap!important;
}
/* Cột dồn trái — không giãn full */
#ctp-app .ctp-pt-table th.ctp-th-pick,
#ctp-app .ctp-pt-table td.ctp-td-pick{width:1%;white-space:nowrap!important}
#ctp-app .ctp-td-days{
  font-variant-numeric:tabular-nums;white-space:nowrap;
  font-size:11px;color:#9aa8c7;min-width:3.2em;
}
@media (max-width:900px){
  #ctp-app .ctp-left{
    height:auto!important;max-height:none!important;
  }
  #ctp-app .ctp-grid4{
    grid-template-columns:1fr!important;
    grid-template-rows:auto!important;
    height:auto!important;min-height:0!important;
  }
  #ctp-app .ctp-grid4 > .ctp-pane{
    height:auto!important;max-height:none!important;
  }
}

/* v2.1.47: top 4 PnL + bảng giá cột sát trái fit nội dung */
.ctp-top-pnls{
  display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;
  margin-top:4px;padding:4px 0 4px 15px;
  background:transparent;border:0;border-radius:0;
  font-size:16px;line-height:1.35;
}
.ctp-top-pnl-item{
  display:inline-flex;align-items:baseline;gap:4px;
  padding:0;border-radius:0;background:transparent;
  white-space:nowrap;font-size:16px;
}
.ctp-top-pnl-name{color:#c5d0e6;font-weight:700;margin-right:2px}
.ctp-top-pnl-item small{opacity:.85;font-size:10px}
#ctp-app .ctp-pt-table{
  width:max-content!important;
  min-width:0!important;
  table-layout:auto!important;
  border-collapse:collapse!important;
}
#ctp-app .ctp-pt-table th,
#ctp-app .ctp-pt-table td{
  width:1%!important;
  white-space:nowrap!important;
  padding:5px 8px!important;
}
#ctp-app .ctp-pt-table th.ctp-th-pick,
#ctp-app .ctp-pt-table td.ctp-td-pick{
  width:1%!important;padding-right:10px!important;
}
#ctp-app .ctp-pt-scroll{
  overflow-x:auto!important;
  text-align:left!important;
}
#ctp-app .ctp-pt-scroll .ctp-pt-table{
  margin-right:auto!important;
  margin-left:0!important;
}

/* v2.1.48: rules collapse + top PnL format */
.ctp-auto-head[data-rules-toggle]{cursor:pointer;user-select:none}
.ctp-auto-head[data-rules-toggle]:hover{background:rgba(59,130,246,.08);border-radius:6px}
.ctp-rules-chev{margin-left:auto;font-size:11px;color:#9aa8c7;padding:0 4px}
.ctp-rules.is-collapsed .ctp-rules-body{display:none}
.ctp-top-pnl-sep{color:#6b7a99;margin:0 1px}
.ctp-top-pnl-item{font-variant-numeric:tabular-nums}

/* v2.1.49: fonts, icons, selects */
#ctp-app .ctp-trader-name{font-size:20px!important;font-weight:800;color:#fff;letter-spacing:.02em}
#ctp-app .ctp-trader-icon{font-size:20px;line-height:1;margin-right:2px}
#ctp-app .ctp-pane-h{font-size:20px!important;align-items:center}
#ctp-app .ctp-tab-mkt,
#ctp-app .ctp-tabs > .ctp-tab[data-pos]{
  font-weight:700!important;font-size:14px!important;
}
#ctp-app .ctp-top-pnls{font-size:16px!important;background:transparent!important;border:0!important;padding-left:15px!important}
#ctp-app .ctp-top-pnl-item{font-size:16px!important;background:transparent!important;padding:0!important}
#ctp-app .ctp-top-pnl-name{font-size:16px!important}
#ctp-app .ctp-site-title{font-size:16px!important;font-weight:700;padding-left:15px}
#ctp-app .ctp-ver{font-size:11px;color:#8a9ab8;font-weight:500;opacity:.9}
#ctp-app .ctp-sel{
  max-width:120px;min-width:72px;padding:4px 6px!important;
  font-size:12px;background:#1a2236;color:#e8eefc;border:1px solid #2a3550;
  border-radius:8px;cursor:pointer;
}
#ctp-app .ctp-filters{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:6px}


/* History price columns */
.ctp-td-hist-px{font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.25;font-size:11px}
.ctp-hist-px{color:#e8eefc;font-weight:600}
.ctp-hist-t{color:#9aa8c7;font-size:10px;opacity:.9}

.ctp-td-hist-t{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:11px;color:#9aa8c7}

.ctp-td-rule{font-size:11px;color:#9ecbff;white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis}


.ctp-coin-link{color:#7eb6ff;text-decoration:none;font-weight:600}
.ctp-coin-link:hover{color:#b7d6ff;text-decoration:underline}

/* v2.1.80 search + trader header */
.ctp-pt-search-wrap,.ctp-pos-search-wrap{display:inline-flex;align-items:center;gap:4px}
.ctp-pt-find,.ctp-pos-find{
  background:#2a354f;border:1px solid #3d4a66;color:#e8eefc;border-radius:6px;
  padding:4px 10px;font-size:12px;cursor:pointer;font-weight:600
}
.ctp-pt-find:hover,.ctp-pos-find:hover{background:#3b82f6;border-color:#3b82f6}
.ctp-pos-search{width:110px!important;min-width:90px}
.ctp-pane-h{display:flex!important;align-items:center;justify-content:space-between;gap:8px}
.ctp-pane-h-left,.ctp-pane-h-right{display:inline-flex;align-items:center;gap:6px}
.ctp-pane-h-right{margin-left:auto}
.ctp-trader-slug{
  font-size:11px;font-weight:600;color:#8eb4ff;background:#1a243c;
  border:1px solid #2e3c5a;border-radius:999px;padding:1px 8px;text-transform:lowercase
}
.ctp-trader-icon{font-size:16px;line-height:1}

/* v2.1.81 drag handle only */
.ctp-drag{
  cursor:grab!important;color:#93a0bf;margin-right:6px;letter-spacing:-2px;
  padding:2px 4px;border-radius:4px;user-select:none;touch-action:none
}
.ctp-drag:hover{background:rgba(59,130,246,.15);color:#c5d4f0}
.ctp-drag:active{cursor:grabbing!important}
.ctp-pane{cursor:default}
.ctp-pane.is-drag{opacity:.55}
.ctp-pane.is-over{outline:1px dashed #6ea8ff}
.ctp-auto-open{display:inline-flex;align-items:center;gap:6px;margin-left:8px;font-size:12px;color:#c5d0e6;cursor:pointer;user-select:none;white-space:nowrap}
.ctp-auto-open input{margin:0;accent-color:#3b82f6}

/* v2.1.95 bottom nav + title + auto plain */
.ctp-site-title{font-size:18px!important;display:inline-flex;align-items:center;gap:6px}
.ctp-title-green{color:#22c55e!important;font-weight:700}
.ctp-title-red{color:#ef4444!important;font-weight:700}
.ctp-site-logo{width:18px;height:18px}
.ctp-auto-badge,.ctp-auto-badge.is-on,.ctp-auto-badge.is-off{
  background:transparent!important;border:0!important;padding:0!important;border-radius:0!important;font-weight:600
}
.ctp-bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:9999;
  background:rgba(11,16,32,.96);border-top:1px solid #1e2740;
  padding:6px 8px calc(6px + env(safe-area-inset-bottom,0));
}
.ctp-bottom-nav-inner{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;max-width:1200px;margin:0 auto}
.ctp-bottom-nav a{
  display:inline-block;padding:6px 10px;border-radius:8px;
  background:#161d30;color:#c5d0e6;text-decoration:none;font-size:12px;font-weight:600;border:1px solid #243050
}
.ctp-bottom-nav a:hover{background:#1e2a48;color:#fff;border-color:#3b82f6}
.ctp-mcap-lists{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ctp-mcap-box{background:#12182a;border:1px solid #1e2740;border-radius:10px;padding:8px 10px}
.ctp-mcap-box h4{margin:0 0 6px;font-size:13px;color:#c5d0e6}
.ctp-mcap-chips{display:flex;flex-wrap:wrap;gap:4px;max-height:160px;overflow:auto;font-size:11px}
.ctp-mcap-chip{padding:2px 6px;border-radius:4px;background:#1a2238;color:#9aa8c7}
.ctp-mcap-chip.is-large{color:#f59e0b}
.ctp-mcap-chip.is-small{color:#3dd68c}
#ctp-app{padding-bottom:56px}
@media(max-width:700px){.ctp-mcap-lists{grid-template-columns:1fr}}

/* v2.2.4 title 16, tabbar vốn/pnl, cột volume cố định, ô tìm coin lịch sử */
#ctp-app .ctp-trader-name{font-size:16px!important;font-weight:700;line-height:1.2}
#ctp-app .ctp-pane-h{font-size:16px!important;align-items:center;margin:0}
#ctp-app .ctp-trader-icon{font-size:16px}
.ctp-tabbar{
  display:flex;flex-direction:column;gap:4px;
  margin:4px 0 6px;padding:4px 6px 6px;
  background:#12182a;border:1px solid #1e2740;border-radius:8px;
  min-height:52px;
}
.ctp-acc-bar{
  display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;
  margin:0;padding:2px 2px 4px;font-size:12px;line-height:1.3;
  min-height:18px;
}
.ctp-tabbar .ctp-tabs{margin:0;align-items:center;flex-wrap:nowrap}
.ctp-pos-search,.ctp-hist-coin,.ctp-pt-search{width:118px;min-width:118px;max-width:118px;flex:0 0 118px}
.ctp-hist-search,.ctp-pos-search-wrap,.ctp-pt-search-wrap{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}
.ctp-pos-table{table-layout:fixed;width:100%}
.ctp-pos-table th,.ctp-pos-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ctp-pos-table th[data-psort="qty"],.ctp-pos-table td.ctp-td-qty{width:76px;min-width:76px;max-width:76px;text-align:right;font-variant-numeric:tabular-nums}
.ctp-pt-table{table-layout:fixed}
.ctp-pt-table th,.ctp-pt-table td{overflow:hidden;text-overflow:ellipsis}
.ctp-pt-scroll{overflow:auto}

/* Tiêu đề section VỊ THẾ / LỊCH SỬ */
.ctp-sec-h{
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#e8eefc;
  font-size:13px;
  margin:10px 0 6px;
}
.ctp-hist-title{
  margin:0 8px 0 0;
  flex:0 0 auto;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
}
