:root{
  --bg:#06080f;
  --bg2:#070b14;
  --text:#f0f2f8;
  --muted:rgba(240,242,248,.5);
  --line:rgba(255,255,255,.06);
  --line2:rgba(255,255,255,.15);
  --panel:rgba(255,255,255,.03);
  --panel2:rgba(255,255,255,.05);
  --accent:#00dfa2;
  --accent2:#38bdf8;
  --green:#34d399;
  --red:#f87171;
  --gold:#e8b931;
  --radius:20px;
  --container:1620px;
}

*{box-sizing:border-box;margin:0;padding:0}

/* ── dark scrollbar (all pages) ── */
*{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.24)}

html{
  min-height:100%;
  background:#06080f;
  overscroll-behavior-y:auto;
}

body{
  min-height:100%;
  font-family:"Inter",sans-serif;
  color:var(--text);
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  background:#06080f;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.15;
  z-index:-1;
  background:
    linear-gradient(to right, rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size:36px 36px;
  mask-image:radial-gradient(circle at center, black 34%, transparent 100%);
}

a{text-decoration:none;color:inherit}
button,input,select{font:inherit;color:inherit;background:none;border:none;outline:none}
button{cursor:pointer}
input,select{-webkit-appearance:none;appearance:none}

.container{
  width:min(var(--container), calc(100% - 48px));
  margin:0 auto;
}

header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(14px);
  background:rgba(6,8,22,.78);
  border-bottom:1px solid rgba(255,255,255,.05);
}

.nav{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.nav-left,
.nav-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.menu-toggle{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after{
  display:block;
  width:18px;
  height:2px;
  background:#fff;
  border-radius:999px;
  content:"";
  position:relative;
}

.menu-toggle span::before{
  position:absolute;
  top:-6px;
}

.menu-toggle span::after{
  position:absolute;
  top:6px;
}

.logo{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:28px;
  font-weight:800;
  letter-spacing:-.05em;
}

.logo-mark{
  width:34px;
  height:34px;
  border-radius:11px;
  flex:0 0 34px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 10px 30px rgba(111,124,255,.28);
  position:relative;
}

.logo-mark::before{
  content:"";
  position:absolute;
  inset:7px 9px;
  border-radius:8px;
  background:#0a0f1f;
  transform:skewX(-18deg);
}

.top-btn{
  min-height:46px;
  padding:0 18px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:#eef1ff;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.top-btn.primary{
  border:none;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 12px 28px rgba(111,124,255,.18);
}

.drawer-backdrop{
  position:fixed;
  inset:0;
  z-index:90;
  background:rgba(0,0,0,.42);
  opacity:0;
  pointer-events:none;
  transition:.25s ease;
}

.drawer-backdrop.show{
  opacity:1;
  pointer-events:auto;
}

.side-drawer{
  position:fixed;
  top:18px;
  left:12px;
  z-index:100;
  width:min(295px,76vw);
  max-height:calc(100vh - 36px);
  transform:translateX(-115%);
  transition:transform .28s ease;
  background:linear-gradient(180deg, rgba(10,14,30,.98), rgba(7,10,22,.98));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 20px 60px rgba(0,0,0,.4);
  border-radius:22px;
  padding:18px 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow:auto;
}

.side-drawer.open{
  transform:translateX(0);
}

.drawer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.drawer-top .logo{
  font-size:20px;
  gap:10px;
}

.drawer-top .logo-mark{
  width:28px;
  height:28px;
  flex-basis:28px;
}

.drawer-top .logo-mark::before{
  inset:6px 7px;
}

.drawer-close{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  font-size:22px;
}

.drawer-title{
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#9aa3bf;
  padding:0 2px;
}

.drawer-divider{
  height:1px;
  background:rgba(255,255,255,.08);
}

.scanner-toggle,
.drawer-link,
.scanner-btn{
  width:100%;
  min-height:40px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:14px;
  font-weight:600;
}

.scanner-buttons{
  display:grid;
  gap:7px;
  margin-top:8px;
}

.scanner-btn.active{
  justify-content:center;
  background:linear-gradient(135deg, rgba(111,124,255,.22), rgba(140,99,255,.18));
  border-color:rgba(140,99,255,.35);
  box-shadow:0 10px 24px rgba(111,124,255,.16);
}

.drawer-nav{
  display:grid;
  gap:8px;
}

.drawer-link{
  justify-content:flex-start;
  font-weight:500;
}

main{
  padding:20px 0 34px;
}

.filters-panel,
.table-panel{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(255,255,255,.025);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}

.filters-panel{
  margin-bottom:14px;
  overflow:visible;
}

.filters-toggle{
  width:100%;
  min-height:52px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:15px;
  font-weight:700;
}

.filters-panel.closed .filters-toggle{
  border-bottom:none;
}

.filters-toggle-arrow{
  transition:transform .22s ease;
  color:#bcc6eb;
}

.filters-panel.closed .filters-toggle-arrow{
  transform:rotate(-90deg);
}

.filters-content{
  padding:14px 16px 16px;
  display:grid;
  gap:14px;
}

.filters-panel.closed .filters-content{
  display:none;
}

.filters-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.field{
  display:grid;
  gap:8px;
  position:relative;
}

.field.full{
  grid-column:1 / -1;
}

.field label{
  font-size:13px;
  font-weight:500;
}

.control,
.multi-select-trigger,
.picker-trigger,
.refresh-btn{
  width:100%;
  min-height:48px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  font-size:14px;
  color:#fff;
}

.control::placeholder{
  color:#8a93b5;
}

.search-wrap{
  position:relative;
}

.search-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  opacity:.6;
  pointer-events:none;
  z-index:2;
}

.search-input{
  padding-left:46px !important;
}

.suggest-box,
.picker-menu,
.multi-select-menu,
.refresh-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  z-index:80;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(14,18,36,.98), rgba(9,12,24,.98));
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  border-radius:16px;
  display:none;
}

.suggest-box.show,
.picker-menu.show,
.multi-select-menu.show,
.refresh-menu.show{
  display:block;
}

.suggest-list,
.picker-list{
  max-height:260px;
  overflow:auto;
  padding:8px;
}

.picker-group{
  margin-bottom:14px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.picker-group:last-child{
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:none;
}

.picker-group-title{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#a0a8c7;
  margin-bottom:8px;
}

.picker-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:8px;
}

.picker-grid .picker-item{
  margin-bottom:0;
}

.suggest-item,
.picker-item,
.check-item,
.refresh-item{
  min-height:32px;
  padding:5px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  margin-bottom:5px;
}

.suggest-item:last-child,
.picker-item:last-child,
.check-item:last-child,
.refresh-item:last-child{
  margin-bottom:0;
}

.suggest-item{
  cursor:pointer;
  justify-content:flex-start;
}

.suggest-item:hover,
.refresh-item:hover,
.picker-item:hover,
.check-item:hover{
  background:rgba(255,255,255,.05);
}

.multi-select-trigger,
.picker-trigger,
.refresh-btn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  text-align:left;
}

.check-item{
  justify-content:flex-start;
  cursor:pointer;
}

.check-item input,
.picker-item input{
  -webkit-appearance:checkbox !important;
  appearance:checkbox !important;
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
  accent-color:#7c73ff;
  display:block;
  flex:0 0 18px;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.placeholder{
  color:#8a93b5;
  display:flex;
  align-items:center;
  min-height:32px;
}

.picker-trigger{
  min-height:56px;
  padding:10px 14px;
  align-items:center;
  overflow:hidden;
}

.picker-trigger > .chips{
  flex:1;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  min-height:32px;
  min-width:0;
}

.chips.collapsed{
  flex-wrap:nowrap;
  overflow:hidden;
  white-space:nowrap;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  height:32px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  font-size:12px;
  line-height:1;
  white-space:nowrap;
  max-width:100%;
  flex:0 0 auto;
}

.chip button{
  width:18px;
  height:18px;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
  flex:0 0 18px;
}

.chips-count{
  font-size:13px;
  font-weight:500;
  color:#fefefe;
  opacity:.9;
}

.picker-top{
  padding:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  display:grid;
  gap:10px;
}

.exchanges-top{
  padding-bottom:8px;
}

.exchange-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.exchange-action-btn{
  min-height:40px;
  padding:0 12px;
  border-radius:12px;
  font-size:13px;
}

#exchangesOptions{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  max-height:420px;
  overflow:auto;
  align-items:stretch;
}

#exchangesOptions .check-item{
  margin-bottom:0;
  min-height:44px;
}

#exchangesOptions .check-item.empty{
  opacity:0;
  pointer-events:none;
}

#exchangesOptions .check-item span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.apply-main-btn{
  width:100%;
  height:52px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 12px 28px rgba(111,124,255,.18);
  font-size:15px;
  font-weight:700;
}

.table-panel{
  overflow:visible;
  border-color:var(--line2);
}

.table-top{
  padding:12px 14px;
  border-bottom:1px solid var(--line2);
  background:rgba(255,255,255,.015);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.table-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.table-title strong{
  font-size:17px;
  letter-spacing:-.03em;
}

.table-title span{
  font-size:12px;
  color:var(--muted);
}

.table-tools{
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
  flex-shrink:0;
  width:100%;
  max-width:220px;
}

.refresh-wrap{
  position:relative;
  min-width:160px;
  max-width:220px;
  width:100%;
}

.refresh-btn{
  min-height:40px;
  padding:0 12px;
  font-size:13px;
  border-radius:12px;
  width:100%;
}

.refresh-menu{
  top:calc(100% + 6px);
  left:0;
  right:0;
  width:100%;
  min-width:0;
  padding:8px;
}

.refresh-item{
  cursor:pointer;
  justify-content:space-between;
  font-size:13px;
}

.refresh-item.active{
  border-color:rgba(140,99,255,.35);
  background:rgba(111,124,255,.12);
}

.table-wrap{
  overflow:auto;
}

table{
  width:100%;
  min-width:1180px;
  border-collapse:collapse;
}

th,td{
  padding:8px 10px;
  text-align:left;
  vertical-align:middle;
  border-right:1px solid var(--line2);
  border-bottom:1px solid var(--line2);
  background:transparent;
}

th:last-child,
td:last-child{
  border-right:none;
}

th{
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#d2daf6;
  background:transparent;
  white-space:nowrap;
  padding-top:9px;
  padding-bottom:9px;
  user-select:none;
}

th.sortable{
  cursor:pointer;
}

th.sortable:hover{
  background:rgba(255,255,255,.055);
}

th.sortable.active{
  color:#fff;
}

.sort-head{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.sort-arrow{
  display:inline-flex;
  width:14px;
  height:14px;
  align-items:center;
  justify-content:center;
  color:#8f9ad0;
  opacity:.85;
}

.sort-arrow svg{
  width:12px;
  height:12px;
  display:block;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

th.sortable.active .sort-arrow{
  opacity:1;
  color:#d9e0ff;
}

tbody tr td{
  background:transparent;
}

tbody tr:not(.row-main):hover td{
  background:rgba(255,255,255,.04);
}

.row-main:active td{
  background:transparent;
}

.row-main{
  cursor:pointer;
}

.row-main.open td:not(.coin-td){
  border-bottom:none;
}

.row-sub td{
  background:transparent;
  border-top:1px solid var(--line2);
  border-bottom:none;
}

.row-sub.row-sub-last td{
  border-bottom:1px solid var(--line2);
}

.coin-td{
  vertical-align:top;
  background:transparent;
}

.coin{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:150px;
}

.coin-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.coin-left{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}

.coin-avatar{
  width:28px;
  height:28px;
  border-radius:50%;
  flex:0 0 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  color:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  overflow:hidden;
}
.coin-avatar-img{
  background:transparent;
  box-shadow:none;
}
.coin-avatar-img img{
  width:28px;
  height:28px;
  border-radius:50%;
  object-fit:cover;
  display:block;
}

.coin-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  cursor:pointer;
  flex:1;
}

.coin-trigger{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.coin strong{
  font-size:13px;
  font-weight:700;
  letter-spacing:-.02em;
  overflow:hidden;
  text-overflow:ellipsis;
}

.coin-count{
  font-size:10px;
  color:var(--muted);
  line-height:1.2;
}

.coin-open-icon{
  width:16px;
  height:16px;
  color:#7ea0ff;
  flex:0 0 16px;
  transition:transform .2s ease;
}

.row-main.open .coin-open-icon{
  transform:rotate(180deg);
}

.coin-open-icon svg{
  width:16px;
  height:16px;
  display:block;
  stroke:currentColor;
  fill:none;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.pin-btn{
  width:22px;
  height:22px;
  border-radius:8px;
  color:#9aa5cc;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.02);
  flex:0 0 22px;
}

.pin-btn.pinned{
  color:var(--gold);
  border-color:rgba(255,216,107,.24);
  background:rgba(255,216,107,.08);
}

.pin-btn svg{
  width:13px;
  height:13px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.exchange-merged{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:220px;
}

.exchange-line{
  display:grid;
  grid-template-columns:minmax(90px,auto) minmax(95px,1fr) 28px;
  align-items:center;
  gap:10px;
}

.exchange-link{
  font-size:12px;
  font-weight:700;
  line-height:1.05;
  text-decoration:underline;
  text-decoration-color:rgba(255,255,255,.22);
  text-underline-offset:2px;
}

.exchange-link.long{
  color:#93ff6f;
}

.exchange-link.short{
  color:#ff9aa8;
}

.ex-name{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-width:0;
  overflow:hidden;
  padding-bottom:3px;
  margin-bottom:-3px;
}

.ex-max{
  font-size:10px;
  color:var(--muted);
  font-weight:500;
  white-space:nowrap;
}

.exchange-price{
  font-size:12px;
  color:#eef1ff;
  justify-self:end;
  white-space:nowrap;
  text-align:right;
}

.chart-btn,
.chart-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(140,99,255,.24);
  background:rgba(111,124,255,.08);
  color:#a98dff;
}

.chart-btn{
  width:24px;
  height:24px;
  border-radius:8px;
  justify-self:end;
  align-self:start;
  margin-top:-1px;
}

.chart-mini{
  width:22px;
  height:22px;
  border-radius:7px;
  margin-left:auto;
}

.chart-btn svg,
.chart-mini svg{
  width:13px;
  height:13px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.spread-main{
  font-size:15px;
  font-weight:800;
  letter-spacing:-.03em;
  white-space:nowrap;
  line-height:1.05;
}

.spread-main.good{
  color:var(--green);
}

.spread-main.bad{
  color:var(--red);
}

.funding-vertical{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  column-gap:10px;
  min-width:118px;
}

.funding-values{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.funding-top,
.funding-bottom{
  font-size:12px;
  font-weight:500;
  line-height:1.05;
  white-space:nowrap;
}

.funding-spread{
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  justify-self:end;
}

.funding-spread.good{
  color:var(--green);
}

.funding-spread.bad{
  color:var(--red);
}

.period-cell{
  text-align:center;
  min-width:96px;
}

.period-stack{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.period-entry{
  display:grid;
  grid-template-columns:32px 1fr;
  align-items:center;
  gap:5px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  border-radius:7px;
  padding:3px 7px 3px 5px;
  min-width:96px;
}

.period-label{
  font-size:10px;
  font-weight:700;
  color:#6ee7a8;
  white-space:nowrap;
  text-align:left;
}

.period-time{
  font-size:10px;
  font-weight:600;
  color:#93c5fd;
  white-space:nowrap;
  text-align:right;
  letter-spacing:-.01em;
}

.perf-cell{
  min-width:56px;
}

.perf-value{
  font-size:13px;
  font-weight:800;
  letter-spacing:-.03em;
  white-space:nowrap;
  line-height:1.05;
}

.perf-value.good{
  color:var(--green);
}

.perf-value.bad{
  color:var(--red);
}

/* Funding history button in d1 cell */
.fh-cell{
  position:relative;
}
.fh-cell-inner{
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.fh-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:none;
  border:none;
  cursor:pointer;
  padding:2px;
  color:var(--muted);
  opacity:.55;
  transition:opacity .15s;
  flex-shrink:0;
}
.fh-trigger:hover{
  opacity:1;
  color:var(--accent);
}

/* Funding history overlay */
.fh-overlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:1200;
  background:rgba(6,8,22,.6);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  align-items:center;
  justify-content:center;
}
.fh-overlay.open{
  display:flex;
}
.fh-popover{
  background:#0d1225;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  width:min(680px,95vw);
  max-height:85vh;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 80px rgba(0,0,0,.7);
  overflow:hidden;
}
.fh-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px 14px;
  border-bottom:1px solid rgba(255,255,255,.09);
  flex-shrink:0;
}
.fh-symbol{
  font-size:15px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--text);
}
.fh-label{
  font-size:11px;
  color:var(--muted);
  margin-left:8px;
  font-weight:500;
}
.fh-close{
  background:none;
  border:none;
  cursor:pointer;
  color:var(--muted);
  font-size:22px;
  line-height:1;
  padding:0 4px;
  transition:color .15s;
}
.fh-close:hover{ color:var(--text); }

.fh-body{
  display:flex;
  gap:0;
  overflow:hidden;
  flex:1;
  min-height:0;
}
.fh-column{
  flex:1;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(255,255,255,.07);
  min-width:0;
}
.fh-column:last-child{ border-right:none; }
.fh-column-header{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
  padding:10px 16px 8px;
  border-bottom:1px solid rgba(255,255,255,.07);
  flex-shrink:0;
}
.fh-column-list{
  overflow-y:auto;
  flex:1;
  padding:4px 0;
}
.fh-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:5px 16px;
  gap:8px;
}
.fh-row:hover{ background:rgba(255,255,255,.03); }
.fh-date{
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.fh-rate{
  font-size:13px;
  font-weight:700;
  letter-spacing:-.02em;
  white-space:nowrap;
}
.fh-rate-positive{ color:var(--green); }
.fh-rate-negative{ color:var(--red); }
.fh-rate-zero{ color:var(--muted); }
.fh-total-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 16px;
  border-top:1px solid rgba(255,255,255,.09);
  font-size:13px;
  font-weight:700;
  flex-shrink:0;
}
.fh-no-data{
  padding:16px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
}
.fh-loading{
  padding:32px;
  font-size:13px;
  color:var(--muted);
  text-align:center;
  width:100%;
}
.fh-error{
  padding:24px;
  font-size:13px;
  color:var(--red);
  text-align:center;
  width:100%;
}

.pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  padding:16px;
  border-top:1px solid var(--line2);
  flex-wrap:wrap;
}

.pagination button{
  min-width:40px;
  height:40px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:#fff;
  font-size:14px;
  font-weight:600;
}

.pagination button:hover{
  background:rgba(255,255,255,.06);
}

.pagination button.active{
  border:none;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 10px 24px rgba(111,124,255,.16);
}

.pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.pagination-ellipsis{
  padding:0 4px;
  color:var(--muted);
  font-size:14px;
}

.table-message{
  padding:18px 14px;
  color:var(--muted);
  font-size:14px;
  border-top:1px solid var(--line2);
}

@media (max-width:760px){
  .container{
    width:min(var(--container), calc(100% - 20px));
  }

  .nav{
    min-height:74px;
  }

  .logo{
    font-size:22px;
    gap:10px;
  }

  .logo-mark{
    width:30px;
    height:30px;
    flex-basis:30px;
  }

  .logo-mark::before{
    inset:6px 8px;
  }

  .top-btn{
    min-height:42px;
    padding:0 14px;
    border-radius:14px;
    font-size:14px;
  }

  .filters-grid{
    grid-template-columns:1fr;
  }

  .control,
  .multi-select-trigger,
  .picker-trigger{
    min-height:46px;
    font-size:14px;
    padding:0 14px;
    border-radius:14px;
  }

  .apply-main-btn{
    height:50px;
    font-size:15px;
    border-radius:14px;
  }

  .side-drawer{
    width:min(258px,69vw);
    top:14px;
    left:10px;
    max-height:calc(100vh - 28px);
  }

  .table-top{
    flex-direction:column;
  }

  .refresh-wrap{
    width:100%;
    min-width:0;
    max-width:none;
  }

  .refresh-btn{
    width:100%;
    min-width:0;
  }

  .refresh-menu{
    width:100%;
    left:0;
    right:0;
  }

  .table-tools{
    width:100%;
    max-width:none;
  }

  #exchangesOptions{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

/* ── xStocks toggle ─────────────────────────────────────────── */
.xstocks-row{
  display:flex;
  align-items:stretch;
  min-width:0;
}

.xstocks-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-width:0;
  padding:0 14px;
  min-height:56px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  cursor:pointer;
  user-select:none;
  transition:border-color .18s;
}
.xstocks-label:hover{ border-color:var(--line2); }

.xstocks-label-text{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
  overflow:hidden;
}

.xstocks-badge{
  flex:0 0 auto;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  color:#fff;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  border-radius:8px;
  padding:3px 9px;
}

.xstocks-desc{
  font-size:13px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.toggle-input{ display:none; }

.toggle-wrap{ flex:0 0 auto; }

.toggle-track{
  display:flex;
  align-items:center;
  width:44px;
  height:24px;
  border-radius:12px;
  background:rgba(255,255,255,.12);
  border:1px solid var(--line);
  padding:2px;
  transition:background .2s, border-color .2s;
  position:relative;
}

.toggle-thumb{
  width:18px;
  height:18px;
  border-radius:50%;
  background:var(--muted);
  transition:transform .2s, background .2s;
}

.toggle-input:checked + .toggle-track{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  border-color:var(--accent);
}

.toggle-input:checked + .toggle-track .toggle-thumb{
  transform:translateX(20px);
  background:#fff;
}