/* =========================
   YearBull Dashboard — CLEAN (2025-12-27)
   - scoped to .yb-dashboard + dashboard wrappers
   - no duplicate/conflicting patches
   - no "table -> cards" mode on dashboard (mobile uses horizontal scroll)
   - sticky thead + sticky first column inside scroll container
   - mobile: Search input floats above table (does not break columns)
   ========================= */

/* ---------- Base tokens (dashboard only) ---------- */
.yb-dashboard{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:rgba(15,23,42,.65);
  --border:rgba(15,23,42,.10);

  margin:18px 0 22px;
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  max-width:100%;
}

@media (prefers-color-scheme:dark){
  .yb-dashboard{
    --bg:#0b1220;
    --text:rgba(255,255,255,.92);
    --muted:rgba(255,255,255,.65);
    --border:rgba(255,255,255,.10);
  }
}

/* theme manual dark classes */
body.dark .yb-dashboard,
body.dark-mode .yb-dashboard,
body.is-dark .yb-dashboard,
.dark body .yb-dashboard{
  --bg:#0b1220;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --border:rgba(255,255,255,.10);
}

/* WP Dark Mode plugin: toggles dark theme via class/attrs, not prefers-color-scheme */
html.wp-dark-mode-active .yb-dashboard,
html[data-wp-dark-mode-active] .yb-dashboard,
body.wp-dark-mode-active .yb-dashboard,
body[data-wp-dark-mode-active] .yb-dashboard{
  --bg:#0b1220;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --border:rgba(255,255,255,.10);
}

/* ---------- Cards ---------- */
.yb-dashboard .yb-card{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  min-width:0;
}

/* header */
.yb-dashboard .yb-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.yb-dashboard .yb-h1{font-weight:900;font-size:18px;letter-spacing:.2px;line-height:1.2}
.yb-dashboard .yb-sub{opacity:.85;margin-top:6px;line-height:1.35}
.yb-dashboard .yb-reasons{margin-top:12px;font-size:13px;opacity:.92;line-height:1.45}

/* =========================
   GRID (HOME)
   ========================= */
.yb-dashboard .yb-grid.yb-grid--home{
  display:grid;
  gap:14px;
  align-items:stretch;
  max-width:100%;
}
.yb-dashboard .yb-grid.yb-grid--home > *{min-width:0}

/* DESKTOP: 30 / 60 / 10 */
@media (min-width:1181px){
  .yb-dashboard .yb-grid.yb-grid--home{grid-template-columns:30% 60% 10%}
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--market{grid-column:1}
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--lists{grid-column:2}
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--latest{
    grid-column:3;
    width:100%;
    max-width:none;
    justify-self:stretch;
  }
}

/* TABLET: 2 cols, Latest goes full width below */
@media (max-width:1180px){
  .yb-dashboard .yb-grid.yb-grid--home{grid-template-columns:1fr 1fr}
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--latest{
    grid-column:1 / -1;
    width:auto;
    max-width:none;
    justify-self:stretch;
  }
}

/* MOBILE: 1 col */
@media (max-width:860px){
  .yb-dashboard .yb-grid.yb-grid--home{grid-template-columns:1fr}
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--latest{grid-column:auto}
}

/* =========================
   Orb indicator
   ========================= */
.yb-dashboard .yb-orb-host{margin-top:14px;display:flex;justify-content:center}
.yb-dashboard .yb-orb{
  width:220px;height:220px;border-radius:999px;position:relative;
  display:flex;align-items:center;justify-content:center;
  background:conic-gradient(#dc2626 0%, #f59e0b 50%, #16a34a 100%);
}
.yb-dashboard .yb-orb::before{
  content:"";position:absolute;inset:14px;border-radius:999px;
  background:var(--bg);
  border:1px solid var(--border);
}
.yb-dashboard .yb-orb__inner{position:relative;z-index:2;text-align:center}
.yb-dashboard .yb-orb__value{display:flex;align-items:baseline;justify-content:center;gap:6px;line-height:1}
.yb-dashboard .yb-orb__num{font-size:64px;font-weight:1000;letter-spacing:-1px}
.yb-dashboard .yb-orb__den{font-size:16px;font-weight:900;opacity:.65}
.yb-dashboard .yb-orb__phase{margin-top:8px;font-size:18px;font-weight:1000;letter-spacing:.2px}
.yb-dashboard .yb-orb[data-risk="low"]  .yb-orb__phase{color:#16a34a}
.yb-dashboard .yb-orb[data-risk="mid"]  .yb-orb__phase{color:#f59e0b}
.yb-dashboard .yb-orb[data-risk="high"] .yb-orb__phase{color:#dc2626}
@media (max-width:420px){
  .yb-dashboard .yb-orb{width:200px;height:200px}
  .yb-dashboard .yb-orb__num{font-size:58px}
}

/* =========================
   Lists (Top Bullish / Bearish)
   ========================= */
.yb-dashboard .yb-lists{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  margin-top:12px;
}
@media (max-width:520px){
  .yb-dashboard .yb-lists{grid-template-columns:minmax(0,1fr)}
}

.yb-dashboard .yb-h2{font-weight:900;font-size:13px;opacity:.85;margin-bottom:8px}
.yb-dashboard .yb-footnote{margin-top:12px;font-size:12px;opacity:.78}
.yb-dashboard .yb-dim{opacity:.65}

/* header grid */
.yb-dashboard .yb-list-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) 56px 56px 56px;
  gap:10px;
  align-items:center;
  margin:6px 2px 10px;
  font-size:12px;
  color:var(--muted);
}
.yb-dashboard .yb-col-left{min-width:0}
.yb-dashboard .yb-list-head .yb-col-bull,
.yb-dashboard .yb-list-head .yb-col-risk,
.yb-dashboard .yb-list-head .yb-col-cycle{
  text-align:center;
  min-width:0;
  white-space:nowrap;
}
@media (max-width:420px){
  .yb-dashboard .yb-list-head{grid-template-columns:minmax(0,1fr) 44px 50px 54px}
}

/* row */
.yb-dashboard .yb-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) 56px 56px 56px;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.015);
}
@media (prefers-color-scheme:dark){
  .yb-dashboard .yb-item{background:rgba(255,255,255,.03)}
}
@media (max-width:420px){
  .yb-dashboard .yb-item{grid-template-columns:minmax(0,1fr) 44px 50px 54px;padding:10px 8px}
}

/* left cell */
.yb-dashboard .yb-item__left{display:flex;align-items:baseline;gap:8px;min-width:0}
.yb-dashboard .yb-name-row{display:flex;align-items:baseline;gap:8px;min-width:0}
.yb-dashboard .yb-coin-name{font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.yb-dashboard .yb-coin-sym{font-size:12px;opacity:.65;text-transform:uppercase;white-space:nowrap}
.yb-dashboard .yb-coin-link{color:inherit;text-decoration:none}
.yb-dashboard .yb-coin-link:hover{text-decoration:underline}

/* right cells */
.yb-dashboard .yb-item__right{display:contents}

/* badges */
.yb-dashboard .yb-rank,
.yb-dashboard .yb-bull-score,
.yb-dashboard .yb-cycle,
.yb-dashboard .yb-risk{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  white-space:nowrap;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.02);
  font-variant-numeric:tabular-nums;
}
@media (prefers-color-scheme:dark){
  .yb-dashboard .yb-rank,
  .yb-dashboard .yb-bull-score,
  .yb-dashboard .yb-cycle,
  .yb-dashboard .yb-risk{
    border-color:rgba(255,255,255,.14);
    background:rgba(255,255,255,.04);
  }
}

/* bull colors */
.yb-dashboard .yb-bull-high{background:rgba(22,163,74,.14);color:#16a34a;border-color:rgba(22,163,74,.20)}
.yb-dashboard .yb-bull-mid {background:rgba(100,116,139,.14);color:#64748b;border-color:rgba(100,116,139,.22)}
.yb-dashboard .yb-bull-low {background:rgba(220,38,38,.14);color:#dc2626;border-color:rgba(220,38,38,.20)}

/* cycle colors */
.yb-dashboard .yb-cycle-early{background:rgba(80,120,255,.12);color:#5078ff;border-color:rgba(80,120,255,.20)}
.yb-dashboard .yb-cycle-mid  {background:rgba(22,163,74,.14);color:#16a34a;border-color:rgba(22,163,74,.20)}
.yb-dashboard .yb-cycle-late {background:rgba(245,158,11,.16);color:#f59e0b;border-color:rgba(245,158,11,.22)}

/* risk colors */
.yb-dashboard .yb-risk-low {color:#16a34a;background:rgba(22,163,74,.08);border-color:rgba(22,163,74,.35)}
.yb-dashboard .yb-risk-mid {color:#f59e0b;background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.40)}
.yb-dashboard .yb-risk-high{color:#dc2626;background:rgba(220,38,38,.10);border-color:rgba(220,38,38,.40)}

/* YearBull Rank colors (SAFE) */
.yb-dashboard .yb-rank.yb-rank--good{color:#16a34a;background:rgba(22,163,74,.12);border-color:rgba(22,163,74,.35)}
.yb-dashboard .yb-rank.yb-rank--mid {color:#f59e0b;background:rgba(245,158,11,.14);border-color:rgba(245,158,11,.40)}
.yb-dashboard .yb-rank.yb-rank--bad {color:#dc2626;background:rgba(220,38,38,.14);border-color:rgba(220,38,38,.40)}

/* =========================
   Latest Coins
   ========================= */
.yb-dashboard .yb-latest{display:grid;gap:8px;margin-top:10px}
.yb-dashboard .yb-latest__row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.015);
  text-decoration:none;
  color:inherit;
  min-width:0;
}
@media (prefers-color-scheme:dark){
  .yb-dashboard .yb-latest__row{background:rgba(255,255,255,.03)}
}
.yb-dashboard .yb-latest__row:hover{text-decoration:underline}
.yb-dashboard .yb-latest__title{
  font-weight:900;
  min-width:0;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.25;
}
@media (min-width:861px){
  .yb-dashboard .yb-latest__title{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }
}
@media (max-width:860px){
  .yb-dashboard .yb-latest__title{
    display:block;
    -webkit-line-clamp:unset;
    overflow:visible;
  }
}

/* =========================
   Dashboard tables (Coins/Exchanges)
   Sticky header + sticky first column
   Mobile: horizontal scroll (NO cards)
   ========================= */
.yb-dashboard #yb-coins-wrap .crypto-table-wrapper,
.yb-dashboard #yb-exchanges-wrap .crypto-table-wrapper{
  position:relative;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border-radius:14px;
}

.yb-dashboard #yb-coins-wrap .crypto-table,
.yb-dashboard #yb-exchanges-wrap .crypto-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  position:relative;
}

.yb-dashboard #yb-coins-wrap .crypto-table thead th,
.yb-dashboard #yb-exchanges-wrap .crypto-table thead th{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--bg);
  background-clip:padding-box;
}

.yb-dashboard #yb-coins-wrap .crypto-table th:first-child,
.yb-dashboard #yb-coins-wrap .crypto-table td:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
  position:sticky;
  left:0;
  z-index:35;
  background:var(--bg);
  background-clip:padding-box;
  width:56px;
  min-width:56px;
  max-width:56px;
  text-align:center;
  padding-left:8px;
  padding-right:8px;
}

.yb-dashboard #yb-coins-wrap .crypto-table thead th:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table thead th:first-child{
  z-index:45;
}

.yb-dashboard #yb-coins-wrap .crypto-table thead th,
.yb-dashboard #yb-exchanges-wrap .crypto-table thead th{
  box-shadow:0 1px 0 rgba(0,0,0,.08);
}
@media (prefers-color-scheme:dark){
  .yb-dashboard #yb-coins-wrap .crypto-table thead th,
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead th{
    box-shadow:0 1px 0 rgba(255,255,255,.10);
  }
}
.yb-dashboard #yb-coins-wrap .crypto-table td:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
  box-shadow:1px 0 0 rgba(0,0,0,.06);
}
@media (prefers-color-scheme:dark){
  .yb-dashboard #yb-coins-wrap .crypto-table td:first-child,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
    box-shadow:1px 0 0 rgba(255,255,255,.10);
  }
}

.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  min-width:200px;
}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
  min-width:220px;
}

@media (max-width:860px){
  .yb-dashboard #yb-coins-wrap .crypto-table-wrapper,
  .yb-dashboard #yb-exchanges-wrap .crypto-table-wrapper{
    overflow-x:auto;
    overflow-y:hidden;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table,
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    table-layout:fixed;
    width:max-content;
    min-width:820px;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table th,
  .yb-dashboard #yb-coins-wrap .crypto-table td,
  .yb-dashboard #yb-exchanges-wrap .crypto-table th,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    vertical-align:middle;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
    white-space:normal;
    line-height:1.2;
  }

  .yb-dashboard #yb-coins-wrap .sparkline,
  .yb-dashboard #yb-exchanges-wrap .sparkline{
    width:120px;
    height:32px;
  }
}

@media (max-width:860px){
  .yb-dashboard #yb-coins-wrap .crypto-table-wrapper,
  .yb-dashboard #yb-exchanges-wrap .crypto-table-wrapper{
    padding-top:56px;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table thead input[type="search"],
  .yb-dashboard #yb-coins-wrap .crypto-table thead input[type="text"],
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead input[type="search"],
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead input[type="text"]{
    position:absolute;
    top:10px;
    left:10px;
    right:10px;
    width:auto;
    z-index:60;
    margin:0;
    max-width:none;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table thead th,
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead th{
    overflow:hidden;
  }
}

/* =========================
   Pagination (Coins + Exchanges)
   Prev = red, Next = green
   Scoped + high specificity (no !important)
   ========================= */
.yb-dashboard #yb-coins-wrap .yb-pagination,
.yb-dashboard #yb-exchanges-wrap .yb-pagination{
  display:flex;
  align-items:center;
  gap:10px;
}

.yb-dashboard #yb-coins-wrap .yb-pagination .yb-page,
.yb-dashboard #yb-exchanges-wrap .yb-pagination .yb-page{
  opacity:.8;
  font-weight:900;
  font-size:13px;
  margin-right:auto;
}

.yb-dashboard #yb-coins-wrap .yb-pagination button[data-a],
.yb-dashboard #yb-exchanges-wrap .yb-pagination button[data-a]{
  appearance:none;
  -webkit-appearance:none;
  border-radius:12px;
  padding:10px 12px;
  font-weight:900;
  font-size:13px;
  line-height:1;
  cursor:pointer;
  border:1px solid transparent;
  box-shadow:none;
  color:#fff;
}

.yb-dashboard #yb-coins-wrap .yb-pagination button[data-a="prev"],
.yb-dashboard #yb-exchanges-wrap .yb-pagination button[data-a="prev"]{
  background:#dc2626;
  border-color:#dc2626;
}
.yb-dashboard #yb-coins-wrap .yb-pagination button[data-a="prev"]:hover:not(:disabled),
.yb-dashboard #yb-exchanges-wrap .yb-pagination button[data-a="prev"]:hover:not(:disabled){
  background:#b91c1c;
  border-color:#b91c1c;
}

.yb-dashboard #yb-coins-wrap .yb-pagination button[data-a="next"],
.yb-dashboard #yb-exchanges-wrap .yb-pagination button[data-a="next"]{
  background:#16a34a;
  border-color:#16a34a;
}
.yb-dashboard #yb-coins-wrap .yb-pagination button[data-a="next"]:hover:not(:disabled),
.yb-dashboard #yb-exchanges-wrap .yb-pagination button[data-a="next"]:hover:not(:disabled){
  background:#15803d;
  border-color:#15803d;
}

.yb-dashboard #yb-coins-wrap .yb-pagination button[data-a]:disabled,
.yb-dashboard #yb-exchanges-wrap .yb-pagination button[data-a]:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Disable sticky section titles (theme may force it) */
.yb-dashboard .yb-section-title{
  position:static;
  top:auto;
  left:auto;
  right:auto;
  bottom:auto;
  z-index:auto;
  transform:none;
}


/* =========================
   FIXES: column widths + real mobile behavior
   ========================= */

/* Coins table: fixed layout + sane widths */
.yb-dashboard #yb-coins-wrap .crypto-table-wrapper{
  --yb-col1:72px;   /* YB Rank */
  --yb-col2:240px;  /* Coin */
}
.yb-dashboard #yb-coins-wrap .crypto-table{
  table-layout:fixed;
}
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(1),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(1){
  width:var(--yb-col1);
  min-width:var(--yb-col1);
  max-width:var(--yb-col1);
}
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
  width:var(--yb-col2);
  min-width:var(--yb-col2);
}

/* tighten numeric columns */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(3),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(3){width:130px} /* Price */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(4),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(4){width:90px}  /* 24h */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(5),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(5){width:160px} /* 7d sparkline */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(6),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(6){width:190px} /* Market Cap */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(7),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(7){width:85px}  /* Bull */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(8),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(8){width:95px}  /* Risk */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(9),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(9){width:95px}  /* Cycle */

/* Exchanges table: fixed layout + sane widths */
.yb-dashboard #yb-exchanges-wrap .crypto-table-wrapper{
  --yb-col1:72px;   /* Trust */
  --yb-col2:260px;  /* Exchange */
}
.yb-dashboard #yb-exchanges-wrap .crypto-table{
  table-layout:fixed;
}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(1),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(1){
  width:var(--yb-col1);
  min-width:var(--yb-col1);
  max-width:var(--yb-col1);
}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  width:var(--yb-col2);
  min-width:var(--yb-col2);
}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){width:190px} /* Volume by Currency */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(4),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(4){width:320px} /* bar */

/* Sticky first column: keep, but use wrapper vars (no huge columns) */
.yb-dashboard #yb-coins-wrap .crypto-table th:first-child,
.yb-dashboard #yb-coins-wrap .crypto-table td:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
  width:var(--yb-col1);
  min-width:var(--yb-col1);
  max-width:var(--yb-col1);
}

/* Sticky second column (Coin / Exchange) */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
  position:sticky;
  left:var(--yb-col1);
  z-index:34;
  background:var(--bg);
  background-clip:padding-box;
}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  position:sticky;
  left:var(--yb-col1);
  z-index:34;
  background:var(--bg);
  background-clip:padding-box;
}
.yb-dashboard #yb-coins-wrap .crypto-table thead th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table thead th:nth-child(2){
  z-index:44;
}

/* Hard reset any theme "card table" transforms on mobile */
@media (max-width:860px){
  .yb-dashboard #yb-coins-wrap .crypto-table,
  .yb-dashboard #yb-exchanges-wrap .crypto-table{display:table}
  .yb-dashboard #yb-coins-wrap .crypto-table thead,
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead{display:table-header-group}
  .yb-dashboard #yb-coins-wrap .crypto-table tbody,
  .yb-dashboard #yb-exchanges-wrap .crypto-table tbody{display:table-row-group}
  .yb-dashboard #yb-coins-wrap .crypto-table tr,
  .yb-dashboard #yb-exchanges-wrap .crypto-table tr{display:table-row}
  .yb-dashboard #yb-coins-wrap .crypto-table th,
  .yb-dashboard #yb-coins-wrap .crypto-table td,
  .yb-dashboard #yb-exchanges-wrap .crypto-table th,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td{display:table-cell}

  /* mobile widths: allow scroll, but not absurd min-width */
  .yb-dashboard #yb-coins-wrap .crypto-table,
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    width:max-content;
    min-width:720px;
  }

  /* search row must not consume a table column */
  .yb-dashboard #yb-coins-wrap .crypto-table thead input,
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead input{
    display:block;
  }
}

/* Ultra small: hide last column (Cycle) on coins, and bar on exchanges */
@media (max-width:360px){
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(9),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(9){display:none}

  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(4),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(4){display:none}
}
/* =========================
   Shortcode structure helpers (.crypto-app)
   ========================= */
.yb-dashboard.crypto-app{
  max-width:100%;
}
.yb-dashboard.crypto-app .yb-section-title{
  margin:18px 0 12px;
  font-size:26px;
  font-weight:900;
  letter-spacing:.2px;
}
.yb-dashboard.crypto-app .yb-search{
  width:100%;
  max-width:420px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  font-weight:700;
  background:var(--bg);
  color:var(--text);
  margin:0 0 12px;
}
@media (max-width:860px){
  .yb-dashboard.crypto-app .yb-search{max-width:none}
}

/* =========================
   HARD RESET against theme "responsive table cards"
   (Only inside .yb-dashboard)
   ========================= */
@media (max-width:860px){
  .yb-dashboard .crypto-table,
  .yb-dashboard .crypto-table thead,
  .yb-dashboard .crypto-table tbody,
  .yb-dashboard .crypto-table tfoot,
  .yb-dashboard .crypto-table tr,
  .yb-dashboard .crypto-table th,
  .yb-dashboard .crypto-table td{
    display:table !important;
  }
  .yb-dashboard .crypto-table thead{display:table-header-group !important;}
  .yb-dashboard .crypto-table tbody{display:table-row-group !important;}
  .yb-dashboard .crypto-table tfoot{display:table-footer-group !important;}
  .yb-dashboard .crypto-table tr{display:table-row !important;}
  .yb-dashboard .crypto-table th,
  .yb-dashboard .crypto-table td{display:table-cell !important;}

  /* kill label pseudo-elements used by card tables */
  .yb-dashboard .crypto-table td::before,
  .yb-dashboard .crypto-table th::before{
    content:none !important;
    display:none !important;
  }

  /* neutralize theme widths that force huge columns */
  .yb-dashboard .crypto-table,
  .yb-dashboard .crypto-table-wrapper{
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table,
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    width:max-content !important;
    min-width:720px !important;
  }
}

/* =========================
   Column widths (desktop + mobile)
   ========================= */

/* Coins */
.yb-dashboard #yb-coins-wrap .crypto-table-wrapper{
  --yb-col1:72px;   /* YB Rank */
  --yb-col2:240px;  /* Coin */
}
.yb-dashboard #yb-coins-wrap .crypto-table{table-layout:fixed}
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(1),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(1){
  width:var(--yb-col1);min-width:var(--yb-col1);max-width:var(--yb-col1);
}
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
  width:var(--yb-col2);min-width:var(--yb-col2);
}

/* Exchanges */
.yb-dashboard #yb-exchanges-wrap .crypto-table-wrapper{
  --yb-col1:72px;   /* Trust */
  --yb-col2:260px;  /* Exchange */
}
.yb-dashboard #yb-exchanges-wrap .crypto-table{table-layout:fixed}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(1),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(1){
  width:var(--yb-col1);min-width:var(--yb-col1);max-width:var(--yb-col1);
}
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  width:var(--yb-col2);min-width:var(--yb-col2);
}

/* Sticky 2 columns: 1st + 2nd */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  position:sticky;
  left:var(--yb-col1);
  z-index:34;
  background:var(--bg);
  background-clip:padding-box;
}
.yb-dashboard #yb-coins-wrap .crypto-table thead th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table thead th:nth-child(2){
  z-index:44;
}

/* Ultra-small: hide Cycle (coins) and bar (exchanges) */
@media (max-width:360px){
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(9),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(9){display:none !important;}

  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(4),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(4){display:none !important;}
}
/* ===== FIX: huge images in table rows (coin/exchange logos) ===== */
.yb-dashboard .crypto-table .coin,
.yb-dashboard .crypto-table .ex{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.yb-dashboard .crypto-table .coin img,
.yb-dashboard .crypto-table .ex img{
  width:26px;
  height:26px;
  max-width:26px;
  max-height:26px;
  flex:0 0 26px;
  object-fit:contain;
  border-radius:999px;
  background:rgba(0,0,0,.03);
  display:block;
}

/* keep name compact */
.yb-dashboard .crypto-table .coin a,
.yb-dashboard .crypto-table .ex a{
  display:inline-block;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-decoration:none;
  color:inherit;
  font-weight:700;
}
.yb-dashboard .crypto-table .coin small{
  display:block;
  opacity:.65;
  margin-top:2px;
  line-height:1.1;
}

/* ===== MOBILE FIX: hide non-working search + prevent huge Coin column ===== */

/* 1) Hide search on mobile (coins + exchanges blocks) */
@media (max-width:860px){
  .yb-dashboard #yb-coins-wrap .crypto-table thead input[type="search"],
  .yb-dashboard #yb-coins-wrap .crypto-table thead input[type="text"],
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead input[type="search"],
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead input[type="text"]{
    display:none !important;
  }

  /* remove reserved space for search bar */
  .yb-dashboard #yb-coins-wrap .crypto-table-wrapper,
  .yb-dashboard #yb-exchanges-wrap .crypto-table-wrapper{
    padding-top:0;
  }
}

/* 2) Coins table: make "Coin" column compact + wrap long names */
.yb-dashboard #yb-coins-wrap .crypto-table{
  table-layout:fixed;
}

/* column widths for coins table (desktop + mobile) */
.yb-dashboard #yb-coins-wrap .crypto-table th:first-child,
.yb-dashboard #yb-coins-wrap .crypto-table td:first-child{
  width:56px;
  min-width:56px;
  max-width:56px;
}

/* Coin column (2nd) */
.yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
  width:220px;
  min-width:220px;
  max-width:220px;
}

/* make name wrap to max 2 lines, symbol stays below */
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin a{
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  line-height:1.15;
}

/* keep tiny symbol on its own line */
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Mobile tighter Coin column to keep Price visible */
@media (max-width:860px){
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    width:170px;
    min-width:170px;
    max-width:170px;
  }
}

/* Ultra small: even tighter */
@media (max-width:420px){
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    width:150px;
    min-width:150px;
    max-width:150px;
  }
}

/* ===== HOTFIX: theme "responsive table -> cards" breaks layout on mobile ===== */
@media (max-width:860px){
  /* Force real table layout (override theme) */
  .yb-dashboard #yb-coins-wrap .crypto-table,
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    display:table !important;
    border-collapse:separate;
    border-spacing:0;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table thead,
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead{
    display:table-header-group !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table tbody,
  .yb-dashboard #yb-exchanges-wrap .crypto-table tbody{
    display:table-row-group !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table tr,
  .yb-dashboard #yb-exchanges-wrap .crypto-table tr{
    display:table-row !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table th,
  .yb-dashboard #yb-coins-wrap .crypto-table td,
  .yb-dashboard #yb-exchanges-wrap .crypto-table th,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td{
    display:table-cell !important;
    float:none !important;
    width:auto;
  }

  /* Kill label pseudo-elements some themes add */
  .yb-dashboard #yb-coins-wrap .crypto-table td::before,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td::before{
    content:none !important;
    display:none !important;
  }

  /* Keep row height sane */
  .yb-dashboard #yb-coins-wrap .crypto-table td,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td{
    vertical-align:middle;
    padding-top:10px;
    padding-bottom:10px;
  }

  /* Sparkline must not stretch */
  .yb-dashboard #yb-coins-wrap .crypto-table td .sparkline,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td .sparkline{
    width:120px !important;
    height:32px !important;
    max-width:120px !important;
    max-height:32px !important;
    display:block !important;
    overflow:hidden !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table td .sparkline svg,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td .sparkline svg,
  .yb-dashboard #yb-coins-wrap .crypto-table td .sparkline canvas,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td .sparkline canvas{
    width:120px !important;
    height:32px !important;
    max-width:120px !important;
    max-height:32px !important;
    display:block !important;
  }
}

/* ===== Coin/Exchange: wrap by words (no ellipsis) ===== */
.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin a,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2) .ex a{
  white-space:normal !important;
  display:inline-block !important;
  overflow:visible !important;
  text-overflow:clip !important;
  -webkit-line-clamp:unset !important;
  line-height:1.15;
  overflow-wrap:break-word;
  word-break:normal;
}

.yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  white-space:normal !important;
}

/* ===== Dark theme: fix "white patches" (sticky cells / thead) ===== */
html.dark .yb-dashboard,
html[data-theme="dark"] .yb-dashboard,
body[data-theme="dark"] .yb-dashboard,
body.theme-dark .yb-dashboard,
body.night .yb-dashboard{
  --bg:#0b1220;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --border:rgba(255,255,255,.10);
}

.yb-dashboard #yb-coins-wrap .crypto-table th,
.yb-dashboard #yb-coins-wrap .crypto-table td,
.yb-dashboard #yb-exchanges-wrap .crypto-table th,
.yb-dashboard #yb-exchanges-wrap .crypto-table td{
  background-color:var(--bg);
  color:var(--text);
}

/* subtle zebra */
.yb-dashboard #yb-coins-wrap .crypto-table tbody tr:nth-child(odd) td,
.yb-dashboard #yb-exchanges-wrap .crypto-table tbody tr:nth-child(odd) td{
  background-image:linear-gradient(rgba(0,0,0,.015), rgba(0,0,0,.015));
}
@media (prefers-color-scheme:dark){
  .yb-dashboard #yb-coins-wrap .crypto-table tbody tr:nth-child(odd) td,
  .yb-dashboard #yb-exchanges-wrap .crypto-table tbody tr:nth-child(odd) td{
    background-image:linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,.03));
  }
}

/* ===== FIX REGRESSION: don't repaint ALL cells; only header + sticky cols ===== */
.yb-dashboard #yb-coins-wrap .crypto-table tbody td,
.yb-dashboard #yb-exchanges-wrap .crypto-table tbody td{
  background-color:transparent !important;
  color:inherit !important;
}

/* header always uses dashboard bg */
.yb-dashboard #yb-coins-wrap .crypto-table thead th,
.yb-dashboard #yb-exchanges-wrap .crypto-table thead th{
  background-color:var(--bg) !important;
  color:var(--text) !important;
}

/* sticky columns (td/th with .sticky-col) always use dashboard bg */
.yb-dashboard #yb-coins-wrap .crypto-table .sticky-col,
.yb-dashboard #yb-exchanges-wrap .crypto-table .sticky-col{
  background-color:var(--bg) !important;
  color:var(--text) !important;
}

/* ===== Re-enforce logo sizes against theme rules ===== */
.yb-dashboard .crypto-table .coin img,
.yb-dashboard .crypto-table .ex img{
  width:26px !important;
  height:26px !important;
  max-width:26px !important;
  max-height:26px !important;
  flex:0 0 26px !important;
  object-fit:contain !important;
}

/* ===== MOBILE: each word on new line (Coin + Exchanges) ===== */
@media (max-width:860px){

  /* Coin names */
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin a{
    white-space:normal !important;
    word-break:break-word;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin a span,
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin a{
    display:block;
  }

  /* force word-per-line using <wbr> behavior */
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2) .coin a{
    word-spacing:999px;
  }

  /* Exchanges column identical to Coin */
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    table-layout:fixed;
  }

  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
    width:170px;
    min-width:170px;
    max-width:170px;
    white-space:normal !important;
  }

  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2) .ex a{
    display:block;
    white-space:normal !important;
    word-break:break-word;
    word-spacing:999px;
  }
}

/* ===== MOBILE: remove "gap" between YB Rank and Coin + make Price fit ===== */
@media (max-width:860px){

  /* tighter cell paddings for first two cols */
  .yb-dashboard #yb-coins-wrap .crypto-table th:first-child,
  .yb-dashboard #yb-coins-wrap .crypto-table td:first-child{
    padding-right:6px !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    padding-left:6px !important;
  }

  /* remove sticky separator shadow that looks like a "gap" */
  .yb-dashboard #yb-coins-wrap .crypto-table td:first-child{
    box-shadow:none !important;
  }

  /* tighten Coin column so Price header/value is not clipped */
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    width:140px !important;
    min-width:140px !important;
    max-width:140px !important;
  }

  /* give Price a guaranteed width */
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(3){
    width:120px !important;
    min-width:120px !important;
    max-width:120px !important;
    white-space:nowrap !important;
  }

  /* make Price label fully visible */
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(3){
    overflow:visible !important;
    text-overflow:clip !important;
  }
}

/* ultra small */
@media (max-width:420px){
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    width:130px !important;
    min-width:130px !important;
    max-width:130px !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(3){
    width:112px !important;
    min-width:112px !important;
    max-width:112px !important;
  }
}

/* ===== MOBILE: make 2 left columns sticky to remove "gap" on horizontal scroll ===== */
@media (max-width:860px){

  .yb-dashboard #yb-coins-wrap .crypto-table-wrapper{position:relative;}

  .yb-dashboard #yb-coins-wrap .crypto-table th:first-child,
  .yb-dashboard #yb-coins-wrap .crypto-table td:first-child{
    position:sticky !important;
    left:0 !important;
    z-index:50 !important;
    background:var(--bg) !important;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    position:sticky !important;
    left:56px !important;
    z-index:45 !important;
    background:var(--bg) !important;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table thead th:first-child{z-index:70 !important;}
  .yb-dashboard #yb-coins-wrap .crypto-table thead th:nth-child(2){z-index:65 !important;}

  .yb-dashboard #yb-coins-wrap .crypto-table td:first-child,
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    box-shadow:none !important;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2){
    border-right:1px solid rgba(255,255,255,.08);
  }
  @media (prefers-color-scheme:light){
    .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2),
    .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2){
      border-right:1px solid rgba(0,0,0,.08);
    }
  }

  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    width:128px !important;
    min-width:128px !important;
    max-width:128px !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(3){
    width:136px !important;
    min-width:136px !important;
    max-width:136px !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  /* 7d sparkline column (5th) */
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(5),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(5){
    width:138px !important;
    min-width:138px !important;
    max-width:138px !important;
  }

  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(5) .sparkline{
    width:120px !important;
    height:30px !important;
    max-width:120px !important;
    max-height:30px !important;
    display:block !important;
    margin:0 auto !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(5) .sparkline svg,
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(5) .sparkline canvas{
    width:120px !important;
    height:30px !important;
    display:block !important;
  }
}

@media (max-width:420px){
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(2){
    width:120px !important;
    min-width:120px !important;
    max-width:120px !important;
  }
  .yb-dashboard #yb-coins-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-coins-wrap .crypto-table td:nth-child(3){
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
  }
}

/* ===== Exchanges: Volume by Currency as bar, remove duplicate column ===== */
.yb-dashboard #yb-exchanges-wrap .curusd .yb-volcell{
  display:flex;
  align-items:center;
  gap:10px;
}
.yb-dashboard #yb-exchanges-wrap .curusd .yb-volbar{
  flex:1 1 auto;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  overflow:hidden;
}
@media (prefers-color-scheme:light){
  .yb-dashboard #yb-exchanges-wrap .curusd .yb-volbar{
    background:rgba(0,0,0,.10);
  }
}
.yb-dashboard #yb-exchanges-wrap .curusd .yb-volbar > i{
  display:block;
  height:100%;
  width:0%;
  background:rgba(22,163,74,.75);
  border-radius:999px;
}
.yb-dashboard #yb-exchanges-wrap .curusd .yb-volnum{
  flex:0 0 auto;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

/* tighten columns on mobile so numbers fit */
@media (max-width:860px){
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
    width:56px;
    min-width:56px;
    max-width:56px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
    width:170px;
    min-width:170px;
    max-width:170px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
    width:190px;
    min-width:190px;
    max-width:190px;
  }
  .yb-dashboard #yb-exchanges-wrap .curusd .yb-volbar{
    height:8px;
  }
}

/* ===== Top Exchanges: make Exchanges column compact (same as Coin) ===== */

/* Desktop + mobile */
.yb-dashboard #yb-exchanges-wrap .crypto-table{
  table-layout:fixed;
}

/* Trust */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
  width:56px;
  min-width:56px;
  max-width:56px;
}

/* Exchanges column (same logic as Coin) */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  width:160px;
  min-width:160px;
  max-width:160px;
  white-space:normal;
}

/* wrap exchange name nicely */
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2) .ex{
  display:flex;
  align-items:flex-start;
  gap:8px;
}
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2) .ex a{
  display:block;
  line-height:1.15;
  word-break:break-word;
}

/* Volume by Currency (USD) – give space to bar */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
  width:220px;
  min-width:220px;
  max-width:220px;
}

/* Mobile tighter */
@media (max-width:860px){
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
    width:140px;
    min-width:140px;
    max-width:140px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
    width:200px;
    min-width:200px;
    max-width:200px;
  }
}

/* ===== FIX: rollback broken exchanges layout + make Exchanges column narrower safely ===== */

/* Ensure mobile "card table" mode is always disabled for exchanges too */
@media (max-width:860px){
  .yb-dashboard #yb-exchanges-wrap .crypto-table{display:table !important;}
  .yb-dashboard #yb-exchanges-wrap .crypto-table thead{display:table-header-group !important;}
  .yb-dashboard #yb-exchanges-wrap .crypto-table tbody{display:table-row-group !important;}
  .yb-dashboard #yb-exchanges-wrap .crypto-table tr{display:table-row !important;}
  .yb-dashboard #yb-exchanges-wrap .crypto-table th,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td{
    display:table-cell !important;
    float:none !important;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table td::before{
    content:none !important;
    display:none !important;
  }
}

/* Safe fixed layout */
.yb-dashboard #yb-exchanges-wrap .crypto-table{table-layout:fixed;}

/* Trust fixed */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
  width:56px;
  min-width:56px;
  max-width:56px;
}

/* Exchanges: narrower, but not extreme */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  width:140px;
  min-width:140px;
  max-width:140px;
  white-space:normal;
}

/* Volume column gets space */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
  width:240px;
  min-width:240px;
  max-width:240px;
}

/* Small screens: allow horizontal scroll and compact exchanges */
@media (max-width:860px){
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    width:max-content;
    min-width:520px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
    width:120px;
    min-width:120px;
    max-width:120px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
    width:220px;
    min-width:220px;
    max-width:220px;
  }
}



/* ===== Top Exchanges: swapped columns (Exchanges first, Trust second) ===== */
.yb-dashboard #yb-exchanges-wrap .crypto-table{table-layout:fixed;}

/* Exchanges (1st) — sticky via .sticky-col in markup */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
.yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
  width:120px;
  min-width:120px;
  max-width:120px;
  white-space:normal;
}

/* Trust (2nd) */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
  width:56px;
  min-width:56px;
  max-width:56px;
  text-align:center;
  white-space:nowrap;
}

/* Volume column */
.yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
.yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
  width:240px;
  min-width:240px;
  max-width:240px;
}

/* Mobile */
@media (max-width:860px){
  .yb-dashboard #yb-exchanges-wrap .crypto-table{
    width:max-content;
    min-width:520px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:first-child,
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:first-child{
    width:110px;
    min-width:110px;
    max-width:110px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(2),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(2){
    width:56px;
    min-width:56px;
    max-width:56px;
  }
  .yb-dashboard #yb-exchanges-wrap .crypto-table th:nth-child(3),
  .yb-dashboard #yb-exchanges-wrap .crypto-table td:nth-child(3){
    width:220px;
    min-width:220px;
    max-width:220px;
  }
}
/* ===== FIX: Bull / Risk / Cycle in tables ===== */
.crypto-app .yb-bull-score,
.crypto-app .yb-risk,
.crypto-app .yb-cycle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  white-space:nowrap;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.02);
}

/* Bull */
.crypto-app .yb-bull-high{background:rgba(22,163,74,.14);color:#16a34a;border-color:rgba(22,163,74,.25)}
.crypto-app .yb-bull-mid {background:rgba(100,116,139,.14);color:#64748b;border-color:rgba(100,116,139,.25)}
.crypto-app .yb-bull-low {background:rgba(220,38,38,.14);color:#dc2626;border-color:rgba(220,38,38,.25)}

/* Risk */
.crypto-app .yb-risk-low {background:rgba(22,163,74,.10);color:#16a34a;border-color:rgba(22,163,74,.35)}
.crypto-app .yb-risk-mid {background:rgba(245,158,11,.12);color:#f59e0b;border-color:rgba(245,158,11,.40)}
.crypto-app .yb-risk-high{background:rgba(220,38,38,.12);color:#dc2626;border-color:rgba(220,38,38,.40)}

/* Cycle */
.crypto-app .yb-cycle-early{background:rgba(80,120,255,.12);color:#5078ff;border-color:rgba(80,120,255,.25)}
.crypto-app .yb-cycle-mid  {background:rgba(22,163,74,.14);color:#16a34a;border-color:rgba(22,163,74,.25)}
.crypto-app .yb-cycle-late {background:rgba(245,158,11,.16);color:#f59e0b;border-color:rgba(245,158,11,.30)}


/* =========================
   HOTFIX v3 (safe): apply to actual table wrappers by ID
   Works even if .yb-dashboard wrapper class is missing.
   Targets ONLY the dashboard tables.
   ========================= */

/* logo size (coins + exchanges) */
#yb-coins-wrap .crypto-table .coin img,
#yb-exchanges-wrap .crypto-table .ex img{
  width:26px !important;
  height:26px !important;
  max-width:26px !important;
  max-height:26px !important;
  flex:0 0 26px !important;
  object-fit:contain !important;
  border-radius:999px;
  display:block !important;
}

/* base pill in tables */
#yb-coins-wrap .crypto-table .pill,
#yb-exchanges-wrap .crypto-table .pill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:3px 9px !important;
  border-radius:999px !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  border:1px solid rgba(0,0,0,.10) !important;
  background:rgba(0,0,0,.03) !important;
  font-variant-numeric:tabular-nums !important;
}

/* dark */
@media (prefers-color-scheme:dark){
  #yb-coins-wrap .crypto-table .pill,
  #yb-exchanges-wrap .crypto-table .pill{
    border-color:rgba(255,255,255,.14) !important;
    background:rgba(255,255,255,.05) !important;
  }
}

/* bull (no level class) */
#yb-coins-wrap .crypto-table .pill.bull{
  color:#64748b !important;
  background:rgba(100,116,139,.14) !important;
  border-color:rgba(100,116,139,.22) !important;
}

/* risk */
#yb-coins-wrap .crypto-table .pill.risk-low{
  color:#16a34a !important;
  background:rgba(22,163,74,.10) !important;
  border-color:rgba(22,163,74,.35) !important;
}
#yb-coins-wrap .crypto-table .pill.risk-mid,
#yb-coins-wrap .crypto-table .pill.risk-medium{
  color:#f59e0b !important;
  background:rgba(245,158,11,.12) !important;
  border-color:rgba(245,158,11,.40) !important;
}
#yb-coins-wrap .crypto-table .pill.risk-high{
  color:#dc2626 !important;
  background:rgba(220,38,38,.12) !important;
  border-color:rgba(220,38,38,.40) !important;
}

/* cycle (no level class) */
#yb-coins-wrap .crypto-table .pill.cycle{
  color:#5078ff !important;
  background:rgba(80,120,255,.12) !important;
  border-color:rgba(80,120,255,.25) !important;
}
/* Rank TEXT (only in coins table) */
#yb-coins-wrap .crypto-table .yb-rank-text{
  font-weight:400;
  white-space:nowrap;
}

/* force colors (theme may override td color) */
#yb-coins-wrap .crypto-table .yb-rank-text.yb-rank--good{ color:#16a34a !important; }
#yb-coins-wrap .crypto-table .yb-rank-text.yb-rank--mid { color:#f59e0b !important; }
#yb-coins-wrap .crypto-table .yb-rank-text.yb-rank--bad { color:#dc2626 !important; }

/* =========================
   YB FIX — Layout + Top Bullish table width + mobile table scroll
   ========================= */

/* Give more space to Top Bullish column by shrinking Market card column on desktop */
@media (min-width:1181px){
  .yb-dashboard .yb-grid.yb-grid--home{
    grid-template-columns: minmax(320px,24%) minmax(0,1fr) minmax(220px,10%) !important;
  }
  /* Slightly tighter market card padding to reduce width pressure */
  .yb-dashboard .yb-card--market{padding:14px !important;}
}

/* Ensure Top Bullish is single wide column (Bearish hidden elsewhere) */
.yb-dashboard .yb-lists{grid-template-columns:minmax(0,1fr) !important;}
.yb-dashboard #yb-top-bear{display:none !important;}

/* 10-col header + rows (table) */
.yb-dashboard .yb-col:first-child .yb-list-head{
  display:grid !important;
  grid-template-columns:
    minmax(220px, 3.2fr)
    92px
    110px
    78px
    120px
    110px
    190px
    56px
    56px !important;
  gap:8px !important;
  align-items:center !important;
  padding:0 10px !important;
}
.yb-dashboard .yb-col:first-child .yb-list-head > *{
  min-width:0;
  white-space:nowrap;
}
.yb-dashboard .yb-col:first-child .yb-list-head *{
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
}

/* Rows: table grid */
.yb-dashboard #yb-top-bull .yb-item{
  display:grid !important;
  grid-template-columns:
    minmax(220px, 3.2fr)
    92px
    110px
    78px
    120px
    110px
    190px
    56px
    56px !important;
  gap:8px !important;
  align-items:center !important;
  padding:14px 12px !important;
}
.yb-dashboard #yb-top-bull .yb-item > div{min-width:0;}
.yb-dashboard #yb-top-bull .yb-item__rank,
.yb-dashboard #yb-top-bull .yb-item__price,
.yb-dashboard #yb-top-bull .yb-item__24h,
.yb-dashboard #yb-top-bull .yb-item__mcap,
.yb-dashboard #yb-top-bull .yb-item__vol,
.yb-dashboard #yb-top-bull .yb-item__liq,
.yb-dashboard #yb-top-bull .yb-item__risk,
.yb-dashboard #yb-top-bull .yb-item__cycle{
  justify-self:center;
  text-align:center;
}

/* Coin cell: icon + NAME + symbol */
.yb-dashboard #yb-top-bull .yb-item__left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.yb-dashboard #yb-top-bull .yb-coin-ico{flex:0 0 auto;}
.yb-dashboard #yb-top-bull .yb-coin-img{display:block;}
.yb-dashboard #yb-top-bull .yb-coin-meta{
  display:flex !important;
  flex-direction:column !important;
  min-width:0;
  line-height:1.15;
}
.yb-dashboard #yb-top-bull .yb-coin-name{
  display:block;
  font-weight:900;
  font-size:15px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.yb-dashboard #yb-top-bull .yb-coin-sym{
  display:block;
  opacity:.65;
  font-size:12px;
  line-height:1.1;
  margin-top:2px;
}

/* Liquidity bar: no clipping */
.yb-dashboard #yb-top-bull .yb-liq{width:100%;}
.yb-dashboard #yb-top-bull .yb-liq-bar{
  display:flex;
  overflow:hidden;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(0,0,0,.03);
  width:100%;
  max-width:190px;
}
.yb-dashboard #yb-top-bull .yb-liq-a,
.yb-dashboard #yb-top-bull .yb-liq-b{
  display:flex;
  align-items:center;
  min-width:0;
  padding:6px 8px;
  font-weight:900;
  font-size:12px;
  line-height:1;
}
.yb-dashboard #yb-top-bull .yb-liq-a{background:rgba(22,163,74,.18);}
.yb-dashboard #yb-top-bull .yb-liq-b{background:rgba(220,38,38,.10); justify-content:flex-end; text-align:right;}
.yb-dashboard #yb-top-bull .yb-liq-a span,
.yb-dashboard #yb-top-bull .yb-liq-b span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Mobile: keep TABLE with horizontal scroll (no cards) */
@media (max-width: 860px){
  .yb-dashboard .yb-col:first-child{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .yb-dashboard .yb-col:first-child .yb-list-head,
  .yb-dashboard #yb-top-bull{
    min-width: 980px;
  }
}

/* =========================
   YB HOTFIX: widen Top Bullish table container (desktop)
   - when Latest card is removed, third grid column still steals width
   - make Lists card take full remaining width and prevent spill
   ========================= */
@media (min-width:1181px){
  .yb-dashboard .yb-grid.yb-grid--home{
    grid-template-columns: minmax(320px,22%) minmax(0,1fr) minmax(0,0fr) !important;
  }
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--lists{
    grid-column: 2 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
  }
  /* keep the "table" inside the card; if still wider – scroll INSIDE card */
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--lists .yb-col:first-child{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .yb-dashboard .yb-grid.yb-grid--home .yb-card--lists .yb-col:first-child::-webkit-scrollbar{
    height: 10px;
  }
}


/* =========================
   FINAL HOTFIX — Top Bullish mobile overlap + coin icon size
   ========================= */

/* FIX: Top Bullish coin image size */
#yb-top-bull .yb-coin-img{
  width:28px !important;
  height:28px !important;
  max-width:28px !important;
  max-height:28px !important;
  object-fit:contain !important;
  border-radius:50%;
  flex:0 0 28px;
  display:block;
}

/* FIX: Mobile — coin name must NOT overlap YearBull Rank column */
@media (max-width:860px){
  #yb-top-bull .yb-item__left{
    min-width:0;
    overflow:hidden;
  }
  #yb-top-bull .yb-coin-meta{
    min-width:0;
    max-width:100%;
    overflow:hidden;
  }
  #yb-top-bull .yb-coin-link,
  #yb-top-bull .yb-coin-name{
    display:block;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}

/* =========================
   FIX v4 — Top Bullish mobile: keep icon+name visible + no overlap
   - force horizontal scroll for full 10-col table
   - ensure Coin column has enough min width
   - keep 28px icon size (requested)
   ========================= */

/* FIX: Top Bullish coin image size (keep in every build) */
#yb-top-bull .yb-coin-img{
  width:28px !important;
  height:28px !important;
  max-width:28px !important;
  max-height:28px !important;
  object-fit:contain !important;
  border-radius:50% !important;
  flex:0 0 28px !important;
  display:block !important;
}

@media (max-width:860px){
  /* make the whole list area scrollable horizontally */
  .yb-dashboard .yb-card--lists{ 
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  /* keep header + rows aligned in a wide "table" */
  .yb-dashboard .yb-card--lists .yb-list-head,
  .yb-dashboard .yb-card--lists #yb-top-bull{
    min-width:980px !important;
  }

  /* ensure Coin column is wide enough so icon+name are visible */
  #yb-top-bull .yb-item{
    grid-template-columns:
      minmax(240px, 2.2fr)
      92px
      110px
      78px
      120px
      110px
      190px
      56px
      56px
      56px !important;
  }

  /* coin cell: keep icon visible, ellipsis name inside meta */
  #yb-top-bull .yb-item__left{
    overflow:visible !important;
    min-width:0;
  }
  #yb-top-bull .yb-coin-ico{flex:0 0 28px !important; width:28px !important;}
  #yb-top-bull .yb-coin-meta{min-width:0; overflow:hidden;}
  #yb-top-bull .yb-coin-name{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* =========================
   FIX v5 — Top Bullish mobile: show NAME + keep Rank visible (no overlap)
   ========================= */
@media (max-width:860px){
  /* make Coin meta take space next to icon */
  #yb-top-bull .yb-item__left{align-items:center !important;}
  #yb-top-bull .yb-coin-meta{
    flex:1 1 auto !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  #yb-top-bull .yb-coin-link,
  #yb-top-bull .yb-coin-name{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    color:var(--text) !important;
    font-weight:900 !important;
    line-height:1.15 !important;
  }

  /* keep Rank badge fully readable */
  #yb-top-bull .yb-item__rank{overflow:visible !important;}
  #yb-top-bull .yb-item__rank .yb-rank{
    display:inline-flex !important;
    min-width:64px !important;
    justify-content:center !important;
  }
}

/* FIX v5: Top Bullish NAME visible */
.yb-dashboard #yb-top-bull .yb-coin-meta{flex:1 1 auto !important;min-width:0 !important;}
.yb-dashboard #yb-top-bull .yb-coin-name{display:block !important;}
.yb-dashboard #yb-top-bull .yb-coin-sym{display:block !important;}

/* =========================
   FIX v6 — Top Bullish MOBILE: NAME always visible (prevents meta collapsing to 0px)
   ========================= */
@media (max-width:860px){
  #yb-top-bull .yb-item__left{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    min-width:0 !important;
  }

  #yb-top-bull .yb-coin-ico{
    flex:0 0 28px !important;
    width:28px !important;
    height:28px !important;
  }

  /* force meta block to have real width inside Coin cell */
  #yb-top-bull .yb-coin-meta{
    display:block !important;
    flex:0 1 calc(100% - 38px) !important;
    width:calc(100% - 38px) !important;
    min-width:140px !important;
    overflow:hidden !important;
  }

  #yb-top-bull .yb-coin-link,
  #yb-top-bull .yb-coin-name{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  #yb-top-bull .yb-coin-sym{
    display:block !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
}


/* =========================
   FIX v7 — Top Bullish MOBILE: keep NAME stable + ensure Cycle fits (no clipping)
   - do NOT use overflow:visible on the card (breaks Coin cell sizing on mobile)
   - enforce horizontal scroll and a slightly wider table min-width
   ========================= */
@media (max-width:860px){

  /* scroll container */
  .yb-dashboard .yb-card--lists{
    overflow-x:auto !important;
    overflow-y:hidden !important;
  }

  /* keep header + rows aligned and wide enough for the last column */
  .yb-dashboard .yb-card--lists .yb-list-head,
  .yb-dashboard .yb-card--lists #yb-top-bull{
    min-width:1040px !important;
  }

  /* a tiny right padding so the last pill isn't visually cut by card radius */
  .yb-dashboard .yb-card--lists .yb-col:first-child{
    padding-right:14px !important;
    box-sizing:border-box;
  }

  /* make Coin column a bit wider so meta doesn't collapse */
  #yb-top-bull .yb-item{
    grid-template-columns:
      minmax(260px, 2.2fr)
      92px
      110px
      78px
      120px
      110px
      190px
      56px
      56px
      56px !important;
  }

  /* ensure NAME never collapses */
  #yb-top-bull .yb-item__left{min-width:0 !important;}
  #yb-top-bull .yb-coin-meta{
    width:auto !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  #yb-top-bull .yb-coin-name{
    display:block !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  /* ensure Cycle cell itself never clips */
  #yb-top-bull .yb-item__cycle{
    overflow:visible !important;
  }
}



/* =========================
   FIX v8 — Top Bullish: Liquidity readable + wider Coin + mobile sticky Coin
   ========================= */

/* Desktop/tablet: give Coin a bit more space, keep Liquidity wide enough for full numbers */
.yb-dashboard .yb-col:first-child .yb-list-head{
  grid-template-columns:
    minmax(0, 2.8fr)
    92px
    110px
    78px
    120px
    110px
    220px
    56px
    56px
    56px !important;
}
.yb-dashboard #yb-top-bull .yb-item{
  grid-template-columns:
    minmax(0, 2.8fr)
    92px
    110px
    78px
    120px
    110px
    220px
    56px
    56px
    56px !important;
}

/* Liquidity: never hide the "$…M" text (no ellipsis), allow bar to use full column width */
.yb-dashboard #yb-top-bull .yb-liq-bar{
  width:100% !important;
  max-width:none !important;
}
.yb-dashboard #yb-top-bull .yb-liq-a,
.yb-dashboard #yb-top-bull .yb-liq-b{
  flex:1 1 0 !important;
  min-width:84px !important;
}
.yb-dashboard #yb-top-bull .yb-liq-a span,
.yb-dashboard #yb-top-bull .yb-liq-b span{
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:nowrap !important;
}

/* Mobile: sticky Coin column inside horizontal scroll */
@media (max-width:860px){

  /* a bit wider overall so Liquidity & Cycle don't clip */
  .yb-dashboard .yb-card--lists .yb-list-head,
  .yb-dashboard .yb-card--lists #yb-top-bull{
    min-width:1120px !important;
  }

  /* keep Coin wide enough for name */
  #yb-top-bull .yb-item{
    grid-template-columns:
      minmax(300px, 2.8fr)
      92px
      110px
      78px
      120px
      110px
      220px
      56px
      56px
      56px !important;
  }

  /* sticky header cell "Coin" */
  .yb-dashboard .yb-card--lists .yb-list-head .yb-col-left{
    position:sticky !important;
    left:0 !important;
    z-index:95 !important;
    background:var(--bg) !important;
    background-clip:padding-box !important;
    padding-left:12px !important;
    padding-right:12px !important;
    box-shadow: 6px 0 10px rgba(0,0,0,.08);
  }
  @media (prefers-color-scheme:dark){
    .yb-dashboard .yb-card--lists .yb-list-head .yb-col-left{
      box-shadow: 6px 0 10px rgba(0,0,0,.35);
    }
  }

  /* sticky Coin cell in each row */
  #yb-top-bull .yb-item__left{
    position:sticky !important;
    left:0 !important;
    z-index:85 !important;
    background:var(--bg) !important;
    background-clip:padding-box !important;
    padding-left:12px !important;
    padding-right:12px !important;
    box-shadow: 6px 0 10px rgba(0,0,0,.08);
  }
  @media (prefers-color-scheme:dark){
    #yb-top-bull .yb-item__left{
      box-shadow: 6px 0 10px rgba(0,0,0,.35);
    }
  }
}


/* BULL column disabled */
.yb-dashboard .yb-col-bull,
.yb-dashboard #yb-top-bull .yb-item__bull{display:none !important;}



.yb-dashboard #yb-top-bull .yb-coin-name,
.yb-dashboard #yb-top-bull .yb-coin-title,
.yb-dashboard #yb-top-bull .yb-item__coin .name,
.yb-dashboard #yb-top-bull .yb-item__coin a{
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.15;
}


/* COIN/NAME: prevent letter-by-letter wrap; give the meta real width */
.yb-dashboard #yb-top-bull .yb-item__left{
  min-width: 260px;
}

.yb-dashboard #yb-top-bull .yb-coin-ico{
  flex: 0 0 auto;
}

.yb-dashboard #yb-top-bull .yb-coin-meta{
  flex: 1 1 auto;
  min-width: 160px;
  width: auto;
}

.yb-dashboard #yb-top-bull .yb-coin-name{
  display:block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}

.yb-dashboard #yb-top-bull .yb-coin-sym{
  display:block;
  opacity:.7;
}


/* COIN vs RANK overlap fix: allow grid item to shrink and clip */
.yb-dashboard #yb-top-bull .yb-item__left{
  min-width: 0 !important;
  overflow: hidden;
  padding-right: 10px;
}

.yb-dashboard #yb-top-bull .yb-coin-meta{
  min-width: 0 !important;
  overflow: hidden;
}

.yb-dashboard #yb-top-bull .yb-coin-meta .yb-coin-name{
  display: block;
  width: 100%;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* keep rank pill from squeezing weirdly */
.yb-dashboard #yb-top-bull .yb-item__rank{
  justify-self: start;
  min-width: 0;
}


/* HARD OVERRIDE: ensure Coin column has real width (prevents 1-letter truncation) */
.yb-dashboard #yb-top-bull .yb-list-head,
.yb-dashboard #yb-top-bull .yb-item{
  grid-template-columns:
    minmax(220px, 3.2fr)
    92px
    110px
    78px
    120px
    110px
    190px
    56px
    56px !important;
}


/* FIX: align dashboard header with row grid (Top Bullish / Top Bearish) without affecting other .yb-list-head */
.yb-dashboard .yb-card--lists .yb-list-head{
  display:grid !important;
  grid-template-columns:
    minmax(220px, 3.2fr)
    92px
    110px
    78px
    120px
    110px
    190px
    56px
    56px !important;
  gap:8px !important;
  align-items:center !important;
}



/* ALIGN: header labels with row padding/content */
.yb-dashboard .yb-card--lists .yb-list-head{
  padding: 0 12px !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* =========================================================
   HEADER AS REAL GRID ROW (JS clones first .yb-item)
   ========================================================= */
.yb-dashboard .yb-card--lists .yb-list-head{
  display:block !important;
  padding: 0 !important;
  margin: 6px 2px 10px !important;
}

.yb-dashboard .yb-card--lists .yb-list-head .yb-item--head{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 12px !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  color: var(--muted) !important;
}

.yb-dashboard .yb-card--lists .yb-list-head .yb-head-label{
  display:block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bull column safeguard */
.yb-dashboard .yb-col-bull,
.yb-dashboard #yb-top-bull .yb-item__bull{display:none !important;}


/* header wrapper should not be grid */
.yb-dashboard .yb-card--lists .yb-list-head{
  display:block !important;
}


/* =========================================================
   DESKTOP FIT: show last column without horizontal cut
   - Narrow YearBull Rank
   - Allow Coin name wrap to 2 lines (by words)
   - Do NOT change mobile
   ========================================================= */
@media (min-width: 901px){
  /* tighten grid columns for Top lists */
  .yb-dashboard #yb-top-bull .yb-item,
  .yb-dashboard #yb-top-bear .yb-item{
    grid-template-columns:
      minmax(200px, 2.7fr)
      72px            /* YearBull Rank narrower */
      104px
      68px
      108px
      98px
      180px
      54px
      54px !important;
  }

  /* header row (injected by JS) should mirror row columns */
  .yb-dashboard .yb-card--lists .yb-list-head .yb-item--head{
    grid-template-columns:
      minmax(200px, 2.7fr)
      72px
      104px
      68px
      108px
      98px
      180px
      54px
      54px !important;
  }

  /* Coin: allow 2-line wrap by words */
  .yb-dashboard #yb-top-bull .yb-coin-name,
  .yb-dashboard #yb-top-bear .yb-coin-name{
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important; /* 2 lines */
    line-height: 1.12 !important;
    max-height: calc(1.12em * 2) !important;
    overflow-wrap: break-word; /* words */
    word-break: normal !important;
  }

  /* Rank pill: keep compact */
  .yb-dashboard #yb-top-bull .yb-item__rank,
  .yb-dashboard #yb-top-bear .yb-item__rank{
    justify-self: start;
  }
}


/* HEADER FIX: prevent long header labels from overlapping into next columns (desktop) */
@media (min-width: 901px){
  .yb-dashboard .yb-card--lists .yb-list-head .yb-item--head > div{
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .yb-dashboard .yb-card--lists .yb-list-head .yb-item--head .yb-head-label{
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}


/* DESKTOP: push Price a bit to the right by tightening YB Rank header */
@media (min-width: 901px){
  .yb-dashboard #yb-top-bull .yb-item,
  .yb-dashboard .yb-card--lists .yb-list-head .yb-item--head{
    grid-template-columns:
      minmax(200px, 2.6fr) /* Coin */
      64px                 /* YB Rank (short label) */
      112px                /* Price (more space) */
      68px
      108px
      98px
      180px
      54px
      54px !important;
  }
}


/* =========================================================
   HEADER ALIGN: make header labels sit exactly over columns
   (matches "variant right" screenshot)
   ========================================================= */
.yb-dashboard .yb-card--lists .yb-list-head{
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

.yb-dashboard .yb-card--lists .yb-list-head .yb-item--head{
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Align header labels like data cells:
   Coin = left, all other columns = centered */
.yb-dashboard .yb-card--lists .yb-list-head .yb-item--head > div{
  min-width: 0 !important;
}
.yb-dashboard .yb-card--lists .yb-list-head .yb-item--head > div:not(:first-child){
  text-align: center !important;
  justify-content: center !important;
}
.yb-dashboard .yb-card--lists .yb-list-head .yb-item--head > div:first-child{
  text-align: left !important;
  justify-content: flex-start !important;
}


/* FINAL TWEAK: nudge header labels a bit to the right (desktop only) */
@media (min-width: 901px){
  .yb-dashboard .yb-card--lists .yb-list-head .yb-item--head > div:not(:first-child){
    transform: translateX(6px);
  }
}


/* FINAL MICRO-TWEAK: move header labels 3px more to the right */
@media (min-width: 901px){
  .yb-dashboard .yb-card--lists .yb-list-head .yb-item--head > div:not(:first-child){
    transform: translateX(22px);
  }
}
