.investi-screener-wrapper {
  --investi-scrollbar-height: 0px;
  --investi-sticky-gap: 10px;
  font-family: inherit;
  margin-bottom: 40px;
  color: var(--text-color);
  position: relative;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(203, 107, 253, 0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(46, 126, 206, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(12, 14, 24, 0.56), rgba(18, 23, 38, 0.44));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.24);
  overflow: visible;
}
html:not([data-mode="dark"]) .investi-screener-wrapper {
  background:
    radial-gradient(circle at top right, rgba(203, 107, 253, 0.12), transparent 32%),
    radial-gradient(circle at bottom left, rgba(46, 126, 206, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(244, 247, 252, 0.5));
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 18px 40px rgba(20, 24, 40, 0.12);
}

/* Search & Layout */
.investi-screener-heading {
  margin: 0 0 14px;
  text-align: left;
}

.investi-screener-title {
  margin: 0;
  color: var(--text-color);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
}

.investi-search-row {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: min(100%, 560px);
  margin: 0 auto 16px;
  padding: 0;
  box-sizing: border-box;
}
.investi-primary-search-input {
  width: 100%;
  max-width: none;
}
.investi-search-input-wrap {
  position: relative;
  width: 100%;
}
.investi-search-input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
  transform: translateY(-50%);
}
.investi-search-input-icon svg {
  width: 100%;
  height: 100%;
}
.investi-tabs-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.investi-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 18px 12px 46px;
  color: var(--text-color);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}
.investi-search-input::placeholder {
  color: var(--text-secondary);
}
.investi-search-input:focus {
  border-color: var(--accent-color);
}
.metric-neutral {
  color: #fff;
}
html:not([data-mode="dark"]) .metric-neutral {
  color: var(--text-color);
}

.investi-filters-row {
  position: relative;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.investi-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.active-filters-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-main-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-counter {
  font-size: 11px;
  background: var(--accent-color);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Dropdowns & Sliders */
.filter-group {
  position: relative;
  z-index: 1;
}
.filter-trigger {
  position: relative;
  z-index: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  backdrop-filter: var(--backdrop-blur);
}
.filter-trigger:hover {
  background: var(--glass-hover);
  border-color: var(--accent-color);
}
.filter-trigger.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}
.filter-trigger.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.72;
}
html:not([data-mode="dark"]) .filter-trigger.is-empty {
  border-color: rgba(20, 24, 40, 0.2);
  background: rgba(20, 24, 40, 0.04);
}
.filter-trigger.is-empty::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-color);
  opacity: 0.75;
  flex: 0 0 auto;
}
.filter-trigger.is-empty:hover {
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}
html:not([data-mode="dark"]) .filter-trigger.is-empty:hover {
  background: rgba(20, 24, 40, 0.08);
  border-color: rgba(20, 24, 40, 0.28);
}
.add-filter-btn {
  border-style: dashed;
  color: var(--text-secondary);
  border-color: var(--accent-color);
}
.mobile-filters-toggle {
  display: none;
}
.mobile-filters-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-color);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  background: #10131f;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: none;
  overflow-x: hidden;
}
.filter-dropdown.show {
  display: block;
}
html:not([data-mode="dark"]) .filter-dropdown {
  background: #f5f7fb;
}

.filter-list-container {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.filter-list-item {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.filter-list-item:hover {
  background: var(--glass-hover);
}
.filter-list-item .fname {
  font-weight: 600;
}
.filter-list-item .frange {
  color: var(--text-secondary);
  font-size: 11px;
  flex-grow: 1;
  text-align: right;
}
.filter-list-item .ficon {
  color: var(--text-secondary);
  width: 14px;
  text-align: center;
  font-weight: bold;
}
.filter-list-item.is-added .ficon {
  color: var(--accent-text-color);
}
.filter-list-item.is-added {
  background: var(--glass-bg);
  opacity: 0.8;
}

.preset-item {
  padding: 9px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.preset-item:hover {
  background: var(--glass-hover);
}
.preset-item span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Range Slider UI */
.manual-setup {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}
.manual-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.manual-setup-header label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
}
.manual-setup--category {
  margin-top: 0;
}
.filter-category-list {
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}
.filter-category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-color);
  font-size: 12px;
  cursor: pointer;
}
.filter-category-item:hover {
  background: var(--glass-hover);
}
.filter-category-item input {
  accent-color: var(--accent-color);
}
.filter-category-empty {
  padding: 8px 10px;
  color: var(--text-secondary);
  font-size: 12px;
}
.remove-filter-btn {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 6px;
}
.remove-filter-btn:hover {
  opacity: 1;
  color: var(--danger-color);
}

.range-slider-box {
  position: relative;
  width: 100%;
  height: 25px;
  margin-bottom: 10px;
}
.range-slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 4px;
  background: var(--glass-border);
  border-radius: 2px;
}
.range-slider-progress {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  z-index: 1;
}
.range-input-scaffold {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-appearance: none;
  z-index: 2;
  height: 0;
  outline: none;
  margin: 0;
}
.range-input-scaffold::-webkit-slider-thumb {
  pointer-events: all;
  width: 16px;
  height: 16px;
  -webkit-appearance: none;
  background: #fff;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
}
.range-input-scaffold::-moz-range-thumb {
  pointer-events: all;
  width: 16px;
  height: 16px;
  border: none;
  background: #fff;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
}

.input-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.input-wrapper {
  position: relative;
  width: 48%;
}
.input-wrapper span {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-secondary);
  pointer-events: none;
}
.input-row input {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-color);
  padding: 5px 5px 5px 28px;
  font-size: 12px;
}

.reset-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 500;
}
.reset-link:hover {
  color: var(--accent-text-color);
}

/* Table Styles (Glassmorphism) */
.investi-tabs-row {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  --investi-tab-btn-bg: rgba(255, 255, 255, 0.08);
  --investi-tab-btn-border-width: 1px;
  --investi-tab-btn-border-color: var(--glass-border);
  --investi-tab-btn-hover-bg: rgba(255, 255, 255, 0.12);
  --investi-tab-btn-hover-border-color: rgba(255, 255, 255, 0.22);
  --investi-tab-btn-opacity: 1;
  --investi-tab-btn-backdrop: var(--backdrop-blur);
  --investi-tab-btn-active-bg: var(--accent-color);
  --investi-tab-btn-active-color: #fff;
  --investi-tab-btn-active-border-color: var(--accent-color);
  --investi-tab-btn-active-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.investi-tabs-row .investi-tab-btn {
  font-size: 14px;
  font-weight: 600;
}

.investi-table-frame {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(13, 15, 25, 0.7), rgba(19, 22, 35, 0.58));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.12);
}
html:not([data-mode="dark"]) .investi-table-frame {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(246, 248, 252, 0.74));
}
.investi-table-scrollbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 260;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(13, 15, 25, 0.7), rgba(19, 22, 35, 0.58));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.1);
}
html:not([data-mode="dark"]) .investi-table-scrollbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(246, 248, 252, 0.74));
}
.investi-table-scrollbar__inner {
  height: 1px;
}
.investi-table-native {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.investi-table-native th,
.investi-table-native td {
  padding: 6px 15px;
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
  text-align: center;
}
.investi-table-native thead th {
  position: sticky;
  top: calc(var(--investi-scrollbar-height) + var(--investi-sticky-gap));
  z-index: 300;
  background: #080a12;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(12px);
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: middle;
}
html:not([data-mode="dark"]) .investi-table-native thead th {
  background: #f5f7fb;
}

.col-symbol {
  position: sticky;
  left: 0;
  width: 90px;
  background: #10131f;
  z-index: 180;
  border-right: 2px solid var(--glass-border);
  box-shadow: 2px 0 0 var(--glass-border);
  isolation: isolate;
}
html:not([data-mode="dark"]) .col-symbol {
  background: #f8fafd;
}
thead .col-symbol {
  top: calc(var(--investi-scrollbar-height) + var(--investi-sticky-gap));
  left: 0;
  z-index: 320!important;
  background: #080a12;
  isolation: isolate;
  box-shadow: 2px 0 0 var(--glass-border);
}
html:not([data-mode="dark"]) thead .col-symbol {
  background: #f5f7fb;
}
.investi-table-native td.col-symbol {
  padding: 0;
}
.col-name {
  min-width: 280px;
}
.col-dynamic {
  min-width: 120px;
}
.investi-table-native th .cell-content,
.investi-table-native td .cell-content {
  display: flex;
  justify-content: flex-end;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: right;
}
.investi-table-native th .cell-content--sortable {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  width: 100%;
}
.investi-table-native th .sort-label {
  white-space: normal;
  line-height: 1.2;
  max-width: 10ch;
  min-height: calc(1.2em * 2);
  align-content: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.investi-table-native th.col-name .sort-label {
  white-space: nowrap;
  max-width: none;
  min-height: auto;
  display: block;
  overflow: visible;
  text-overflow: clip;
}
.sort-indicators {
  display: inline-flex;
  flex-direction: column;
  align-self: start;
  line-height: 0.8;
  gap: 1px;
  padding-top: 2px;
  flex: 0 0 auto;
}
.sort-arrow {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.38);
  transition: color 0.2s ease, opacity 0.2s ease;
}
html:not([data-mode="dark"]) .sort-arrow {
  color: rgba(20, 24, 40, 0.35);
}
.investi-table-native thead th.sort-asc .sort-arrow--up,
.investi-table-native thead th.sort-desc .sort-arrow--down {
  color: var(--accent-text-color);
}
.investi-table-native thead th.sort-asc .sort-arrow--down,
.investi-table-native thead th.sort-desc .sort-arrow--up {
  opacity: 0.45;
}
.investi-table-native .col-name .cell-content,
.investi-table-native .col-symbol .cell-content {
  min-width: max-content;
}
.investi-table-native .col-name .cell-content {
  justify-content: flex-start;
  margin: 0;
  text-align: left;
}
.investi-table-native .col-symbol .cell-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
}
.investi-screener-row-link {
  color: inherit;
  text-decoration: none;
}
.investi-screener-row-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.investi-screener-row-link:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 6px;
}
.investi-screener-row-link--symbol {
  display: block;
  width: 100%;
}
.investi-screener-row-link--name {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.investi-screener-name-link__content {
  display: flex;
  align-items: center;
  min-width: 0;
}
.symbol-pill {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 8px;
  border-radius: 0;
  font-weight: 800;
  font-size: 12px;
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  color: var(--accent-text-color);
}

.bond-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  margin-right: 8px;
  display: inline-block;
}
.badge-gov {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.badge-corp {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.badge-mtf {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

tbody tr:hover td {
  background: var(--glass-hover);
  cursor: pointer;
}
tbody tr:hover .col-symbol {
  background: #10131f;
}
html:not([data-mode="dark"]) tbody tr:hover .col-symbol {
  background: #f8fafd;
}
tbody td {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.025);
}
html:not([data-mode="dark"]) tbody td {
  background: rgba(255, 255, 255, 0.18);
}
.investi-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10005;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.investi-backdrop.show {
  display: block;
}

@media (max-width: 900px) {
  .investi-screener-wrapper {
    padding: 14px 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .investi-tabs-shell {
    flex-direction: column;
    align-items: stretch;
  }
  .investi-search-row,
  .investi-filters-row,
  .investi-tabs-shell {
    margin-left: 14px;
    margin-right: 14px;
  }
  .investi-filters-row {
    z-index: 10040;
    isolation: isolate;
    overflow: visible;
  }
  .filter-group {
    z-index: 1;
  }
  .filter-trigger {
    z-index: 1;
  }
  .investi-search-row {
    padding: 0 4px;
  }
  .investi-primary-search-input {
    width: min(420px, calc(100% - 8px));
    max-width: none;
  }
  .active-filters-container {
    display: none;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
  }
  .active-filters-container.show {
    display: flex;
  }
  .active-filters-container.modal-open > .filter-group:not(.is-modal-open) {
    opacity: 0;
    pointer-events: none;
  }
  .mobile-filters-toggle {
    display: inline-flex;
  }
  .investi-filters-row > .investi-filter-toolbar > .filter-group:last-of-type {
    display: none;
  }
  .active-filters-container.show + .filter-group:last-of-type,
  .investi-filters-row.is-filter-modal-open > .investi-filter-toolbar > .filter-group:last-of-type {
    display: block;
  }
  .filter-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    z-index: 10030;
    border-radius: 14px;
    padding: 16px;
    background: #10131f;
    opacity: 1;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  }
  html:not([data-mode="dark"]) .filter-dropdown {
    background: #f5f7fb;
    opacity: 1;
  }
  .filter-dropdown.show {
    display: block;
  }
  .active-filters-container .filter-group.is-modal-open {
    z-index: 10050;
  }
  .manual-setup,
  .range-slider-box,
  .input-row,
  .input-wrapper {
    max-width: 100%;
  }
  .input-row {
    gap: 6px;
  }
  .input-wrapper {
    width: calc(50% - 3px);
  }
  .investi-table-frame {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    overscroll-behavior-y: auto;
  }

  .investi-table-scrollbar {
    margin-left: 14px;
    margin-right: 14px;
  }

  .investi-table-native th,
  .investi-table-native td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .col-name {
    min-width: 220px;
  }

  .col-dynamic {
    min-width: 108px;
  }
}
