/* TOOLBAR */
.toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(31,41,55,0.9);
}
.toolbar-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-right: 4px;
  align-self: center;
  font-weight: 600;
}

.chip {
  border: none;
  outline: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.chip:hover {
  transform: translateY(-1px);
}
.chip--active {
  background: var(--accent-soft);
  color: #e0f2fe;
}
.chip--danger {
  color: var(--danger);
}

.toolbar-group--days {
  background: #020617;
  border-radius: 999px;
  border: 1px solid #ffffff;
  padding: 6px 10px;
  column-gap: 10px;
}
.toolbar-group--days .toolbar-label {
  margin-right: 20px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.20em;
}
.toolbar-group--days .chip {
  min-width: 48px;
  text-align: center;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
}
.toolbar-group--days .chip--active {
  background: #111827;
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(148,163,184,0.7);
}
.toolbar-group--days .chip:hover {
  background: rgba(15,23,42,0.9);
}

.card {
  border-radius: 18px;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(31,41,55,0.95);
  box-shadow: 0 20px 35px rgba(15,23,42,0.9);
  overflow: visible;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(31,41,55,0.9);
}
.card-title {
  font-size: 15px;
  font-weight: 500;
}
.card-sub {
  font-size: 12px;
  color: var(--muted);
}
.card-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.card-stats strong {
  color: var(--accent2);
}

/* блок сортировки над таблицей */
.card-sort {
  display: flex;
  align-items: center;
  margin-left: 16px;
}

#sortMcapBtn {
  display: inline-flex;          /* текст + стрелка в одну строку */
  align-items: center;
  justify-content: center;
  gap: 4px;                      /* расстояние между текстом и стрелкой */
  white-space: nowrap;           /* запрет переносов внутри кнопки */

  padding: 10px 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 60%),
    rgba(15,23,42,0.98);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(15,23,42,1),
    0 12px 28px rgba(0,0,0,0.55);
}

/* всё содержимое внутри кнопки — в одну строку */
#sortMcapBtn * {
  display: inline-block;
}

#sortMcapBtn:hover {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.26), transparent 60%),
    rgba(17,24,39,1);
  transform: translateY(-1px);
}

/* фильтры справа */
.filter-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.filter-label {
  font-size: 12px;
  color: #e5e7eb;
  font-weight: 700;
}
.filter-input {
  background: #111827;
  border-radius: 999px;
  border: 1px solid #4b5563;
  padding: 6px 12px;
  color: var(--text);
  font-size: 12px;
  min-width: 180px;
  outline: none;
  font-weight: 700;
}
.filter-input::placeholder {
  color: #6b7280;
  font-weight: 400;
}
.filter-input:focus {
  border-color: #e5e7eb;
  box-shadow: 0 0 0 1px rgba(148,163,184,0.7);
}

.ex-filter {
  position: relative;
}
.ex-toggle {
  border: none;
  outline: none;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #4b5563;
  color: #f9fafb;
  font-size: 14px;
  padding: 7px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.ex-toggle:hover {
  background: #1f2937;
  transform: translateY(-1px);
}
.ex-toggle--active {
  background: #e2c9a3;
  color: #111827;
  box-shadow: 0 0 0 1px rgba(226,201,163,0.45);
}

.ex-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  min-width: 430px; /* шире окно */
  background: #020617;
  border-radius: 12px;
  border: 1px solid #4b5563;
  box-shadow: 0 18px 30px rgba(15,23,42,0.9);
  padding: 8px 10px;
  z-index: 50;
  display: none;
}
.ex-dropdown.open {
  display: block;
}
.ex-dropdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 6px;
}

/* ВНУТРИ ОКНА: 2 КОЛОНКИ
   слева — список бирж,
   справа — CEX / DEX / Add all / Clear all */
.ex-dropdown-body {
  display: grid;
  grid-template-columns: 1fr 150px;
  column-gap: 12px;
  align-items: flex-start;

  max-height: 260px;   /* ограничиваем высоту всего контента */
  overflow-y: auto;    /* одна общая крутилка справа */
}

/* левая колонка — список бирж, без своего скролла */
.ex-options {
  /* убираем отдельный scroll с этого блока */
  max-height: none;
  overflow: visible;
}
.ex-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #e5e7eb;
}
.ex-option:hover {
  background: #111827;
}
.ex-option-name {
  flex: 1 1 auto;
}
.ex-option-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.ex-option--active .ex-option-check {
  background: #e2c9a3;
  color: #111827;
  border-color: #e2c9a3;
}
.ex-option-logo {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.8);
}

/* правая колонка с быстрыми фильтрами */
.ex-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* строки CEX / DEX / Add all / Clear all
   выглядят как такая же колонка, только с другим списком */
.ex-tool-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #e5e7eb;
}
.ex-tool-option:hover {
  background: #111827;
}

.ex-tool-option-logo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.8);
}
.ex-tool-option-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ex-tool-name {
  flex: 1 1 auto;
}

.ex-tool-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* когда фильтр активен — те же цвета, что и у бирж */
.ex-tool-check--active {
  background: #e2c9a3;
  color: #111827;
  border-color: #e2c9a3;
}