:root {
  --bg-dark: #07090E;
  --panel-dark: #0F131C;
  --border-dark: #1E2530;
  
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dark: #475569;
  
  --c-blue: #0A84FF;
  --c-purple: #9D4EDD;
  --c-green: #10B981;
  --c-red: #EF4444;
  --c-yellow: #F59E0B;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  padding: calc(clamp(0.55rem, 1.4vw, 1.25rem) + 0.45rem) clamp(0.55rem, 1.4vw, 1.25rem) clamp(0.55rem, 1.4vw, 1.25rem);
  line-height: 1.4;
}

.app-hover-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  width: min(520px, calc(100vw - 2rem));
  height: 48px;
  pointer-events: none;
}

.app-hover-nav-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 160px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-purple));
  box-shadow: 0 0 18px rgba(10, 132, 255, 0.45);
  pointer-events: auto;
}

.app-hover-nav-panel {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  display: flex;
  gap: 0.4rem;
  padding: 0.45rem;
  transform: translate(-50%, -130%);
  opacity: 0;
  pointer-events: auto;
  background: rgba(15, 19, 28, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.app-hover-nav:hover .app-hover-nav-panel,
.app-hover-nav:focus-within .app-hover-nav-panel {
  transform: translate(-50%, 0);
  opacity: 1;
}

.app-nav-tab {
  min-width: 110px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.app-nav-tab:hover,
.app-nav-tab.active {
  border-color: rgba(10, 132, 255, 0.35);
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(157, 78, 221, 0.14));
  color: var(--text-main);
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.fr-compare-view {
  min-height: calc(100vh - 2rem);
  margin-top: 1rem;
}

.fr-compare-panel {
  min-height: calc(100vh - 2.5rem);
  background: var(--panel-dark);
  padding: 1.25rem;
}

.info-view {
  min-height: calc(100vh - 2rem);
  margin-top: 1rem;
}

.info-panel {
  background: var(--panel-dark);
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.info-header {
  margin-bottom: 1.5rem;
}

.info-entry {
  margin: 0 0 1.75rem 0;
  padding: 0 0 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-entry-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary, #e6e8ee);
}

.info-entry p {
  margin: 0 0 0.6rem 0;
  line-height: 1.55;
  color: var(--text-secondary, #b9bcc7);
  font-size: 0.92rem;
}

.info-entry p:last-child {
  margin-bottom: 0;
}

.info-entry code {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}

.info-entry strong {
  color: var(--text-primary, #e6e8ee);
}

.table-tab-info {
  min-width: 2.25rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-weight: 700;
}

.fr-compare-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.85rem;
}

.fr-compare-mock-badge {
  border: 1px solid rgba(10, 132, 255, 0.24);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  background: rgba(10, 132, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.fr-compare-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 20;
  margin-top: -0.25rem;
}

.fr-blacklist-dropdown {
  position: relative;
}

.fr-blacklist-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 260px;
  height: 32px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 0 0.7rem 0 2.2rem;
  background: var(--bg-dark);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 14px;
}

.fr-blacklist-toggle:hover,
.fr-blacklist-toggle:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 8px rgba(10, 132, 255, 0.18);
  outline: none;
}

.fr-blacklist-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.14);
  color: var(--c-blue);
}

.fr-blacklist-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(320px, 80vw);
  padding: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 19, 28, 0.98);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.42);
}

.fr-blacklist-panel.hidden {
  display: none;
}

.fr-dropdown-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.fr-dropdown-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(10, 132, 255, 0.28);
  border-radius: 7px;
  background: rgba(10, 132, 255, 0.08);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.fr-dropdown-action-btn:hover,
.fr-dropdown-action-btn:focus {
  border-color: var(--c-blue);
  background: rgba(10, 132, 255, 0.16);
  outline: none;
}

.fr-blacklist-search,
.fr-coin-search {
  width: 100%;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-main);
  outline: none;
}

.fr-blacklist-search {
  height: 34px;
  padding: 0 0.65rem;
  margin-bottom: 0.55rem;
}

.fr-blacklist-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 342px;
  overflow-y: auto;
}

.fr-blacklist-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 32px;
  padding: 0.4rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.fr-blacklist-item:hover {
  border-color: rgba(16, 185, 129, 0.38);
  color: var(--c-green);
}

.fr-blacklist-empty,
.fr-empty-cell {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.8rem;
  text-align: center;
}

.fr-compare-table-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.fr-compare-table-wrap {
  max-height: 462px;
  overflow: auto;
  background: transparent;
  scrollbar-color: rgba(10, 132, 255, 0.55) rgba(7, 9, 14, 0.9);
  scrollbar-width: thin;
}

.fr-compare-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.fr-compare-table-wrap::-webkit-scrollbar-track {
  background: rgba(7, 9, 14, 0.9);
  border-left: 1px solid rgba(30, 37, 48, 0.85);
}

.fr-compare-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 9, 14, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.78), rgba(157, 78, 221, 0.66));
}

.fr-compare-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.95), rgba(157, 78, 221, 0.86));
}

.fr-compare-table-wrap::-webkit-scrollbar-corner {
  background: rgba(7, 9, 14, 0.9);
}

.fr-compare-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.78rem;
}

.fr-compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 52px;
  border-bottom: 1px solid rgba(30, 37, 48, 0.9);
  border-right: 0;
  background: var(--panel-dark);
  color: var(--text-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.fr-compare-table th,
.fr-compare-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(30, 37, 48, 0.9);
  border-right: 0;
}

.fr-compare-table tbody tr {
  height: 41px;
}

.fr-compare-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.006);
}

.fr-compare-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.026);
}

.fr-compare-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.042);
}

tr.blacklisted-search-hit > th,
tr.blacklisted-search-hit > td {
  background: rgba(148, 163, 184, 0.14) !important;
  box-shadow: inset 3px 0 0 rgba(203, 213, 225, 0.6);
  color: #d5deea;
}

tr.blacklisted-search-hit .top-spread-asset {
  color: inherit;
}

.fr-eye-head,
.fr-eye-cell {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.fr-coin-head,
.fr-coin-cell {
  width: 175px;
  text-align: left;
}

.fr-coin-head {
  z-index: 12 !important;
}

.fr-coin-cell {
  background: transparent;
}

.fr-exchange-head,
.fr-exchange-cell {
  width: 150px;
  min-width: 150px;
  text-align: left !important;
}

.fr-interval-head,
.fr-interval-cell {
  width: 82px;
  min-width: 82px;
  text-align: center !important;
}

.fr-next-funding-head,
.fr-next-funding-cell {
  width: 142px;
  min-width: 142px;
  text-align: center !important;
}

.fr-interval-cell,
.fr-next-funding-cell {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.fr-coin-search {
  height: 32px;
  padding: 0 0.7rem;
  font-weight: 700;
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

.fr-sort-head {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 72px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.fr-head-icon {
  display: none;
}

.fr-sort-head.active,
.fr-sort-head:hover {
  color: var(--text-main);
}

.fr-coin-cell {
  font-weight: 900;
  letter-spacing: 0.04em;
}

.fr-eye-cell {
  padding-right: 0.25rem !important;
}

.fr-eye-button {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.fr-eye-button:hover {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.08);
}

.fr-eye-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6f7b91;
}

.fr-eye-glyph-hidden {
  color: var(--c-green);
}

.fr-value-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.fr-value-cell.fr-bg-pos-soft {
  background: rgba(16, 185, 129, 0.08);
}

.fr-value-cell.fr-bg-pos-medium {
  background: rgba(16, 185, 129, 0.15);
}

.fr-value-cell.fr-bg-pos-strong {
  background: rgba(16, 185, 129, 0.25);
}

.fr-value-cell.fr-bg-neg-soft {
  background: rgba(239, 68, 68, 0.08);
}

.fr-value-cell.fr-bg-neg-medium {
  background: rgba(239, 68, 68, 0.15);
}

.fr-value-cell.fr-bg-neg-strong {
  background: rgba(239, 68, 68, 0.25);
}

.fr-exchange-cell {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: left !important;
}

.fr-exchange-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 0.45rem;
  box-shadow: 0 0 10px currentColor;
}

.fr-compare-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.85rem 0 0;
  border-top: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fr-compare-footer-actions {
  display: inline-flex;
  gap: 0.45rem;
}

.fr-compare-footer-btn {
  min-width: 88px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 0.48rem 0.75rem;
  background: var(--bg-dark);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.fr-compare-footer-btn:hover:not(:disabled) {
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.fr-compare-footer-btn:disabled {
  color: #777;
  opacity: 0.65;
  cursor: not-allowed;
}

.fr-exchange-matrix-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(30, 37, 48, 0.9);
}

.fr-exchange-matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.fr-period-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  padding: 0.28rem;
  background: var(--bg-dark);
}

.fr-period-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fr-period-tab:hover,
.fr-period-tab.active {
  border-color: rgba(10, 132, 255, 0.35);
  background: rgba(10, 132, 255, 0.14);
  color: var(--text-main);
}

.fr-matrix-availability-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fr-matrix-availability-filter input {
  width: 52px;
  height: 26px;
  border: 1px solid var(--border-dark);
  border-radius: 7px;
  background: rgba(7, 9, 14, 0.95);
  color: var(--text-main);
  font-weight: 900;
  text-align: center;
  outline: none;
}

.fr-matrix-availability-filter input:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 8px rgba(10, 132, 255, 0.18);
}

.chart-empty-state {
  position: absolute;
  inset: 50% auto auto 50%;
  max-width: min(460px, 82%);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  background: rgba(15, 19, 28, 0.88);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}

.chart-empty-state.hidden {
  display: none;
}

.fr-exchange-picker-item {
  display: grid;
  grid-template-columns: 18px 10px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 32px;
  padding: 0.4rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  text-align: left;
  font-weight: 850;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.fr-exchange-picker-item:hover,
.fr-exchange-picker-item.selected {
  border-color: rgba(10, 132, 255, 0.28);
  background: rgba(10, 132, 255, 0.08);
}

.fr-exchange-picker-check {
  color: var(--c-green);
  font-size: 0.72rem;
  font-weight: 900;
}

.fr-exchange-matrix-wrap {
  max-height: 462px;
}

.fr-exchange-matrix-table {
  min-width: 980px;
}

.fr-matrix-eye-head,
.fr-matrix-eye-cell {
  position: sticky;
  left: 0;
  z-index: 11;
  width: 42px;
  min-width: 42px;
  background: var(--panel-dark);
  text-align: center !important;
}

.fr-matrix-market-head,
.fr-matrix-symbol-cell {
  position: sticky;
  left: 42px;
  z-index: 11;
  width: 120px;
  min-width: 120px;
  background: var(--panel-dark);
  text-align: left !important;
}

.fr-matrix-eye-head,
.fr-matrix-market-head {
  z-index: 13 !important;
}

.fr-matrix-eye-cell {
  padding-right: 0.25rem !important;
}

.fr-matrix-exchange-head {
  min-width: 126px;
  text-align: center !important;
  white-space: nowrap;
}

.fr-matrix-exchange-head .fr-exchange-dot {
  margin-right: 0.45rem;
}

.fr-matrix-sort-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.fr-matrix-sort-head:hover,
.fr-matrix-sort-head.active {
  color: var(--text-main);
}

.fr-matrix-sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.75rem;
  color: var(--c-blue);
  font-size: 0.76rem;
}

.fr-matrix-symbol-cell {
  color: var(--text-main);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.fr-matrix-value-cell {
  text-align: center !important;
  white-space: nowrap;
}

.oi-matrix-view {
  margin-top: 1rem;
}

.oi-matrix-panel {
  width: 100%;
}

.oi-matrix-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.oi-matrix-controls {
  display: flex;
  align-items: end;
  gap: 0.65rem;
}

.oi-matrix-blacklist-dropdown .fr-blacklist-toggle {
  min-width: 180px;
}

.oi-matrix-blacklist-dropdown {
  z-index: 20;
}

.oi-matrix-blacklist-dropdown .fr-blacklist-panel {
  z-index: 30;
}

.oi-matrix-blacklist-dropdown .fr-blacklist-toggle:focus-visible,
.oi-matrix-blacklist-dropdown .fr-blacklist-search:focus-visible,
.oi-matrix-blacklist-dropdown .fr-dropdown-action-btn:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

.oi-matrix-search-label {
  display: grid;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.oi-matrix-search {
  min-width: 180px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  background: var(--bg-dark);
  color: var(--text-main);
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.oi-matrix-search:focus {
  border-color: var(--c-blue);
  outline: none;
}

.oi-matrix-status {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.oi-matrix-wrap {
  max-height: min(68vh, 680px);
  overflow: auto;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
}

.oi-matrix-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.72rem;
}

.oi-matrix-table th,
.oi-matrix-table td {
  border-bottom: 1px solid rgba(30, 37, 48, 0.9);
}

.oi-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--panel-dark);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.oi-matrix-eye-head,
.oi-matrix-eye-cell {
  position: sticky;
  left: 0;
  z-index: 12;
  width: 42px;
  min-width: 42px;
  padding: 0.45rem;
  background: var(--panel-dark);
  text-align: center;
}

.oi-matrix-market-head,
.oi-matrix-market-cell {
  position: sticky;
  left: 42px;
  z-index: 11;
  min-width: 116px;
  padding: 0.7rem 0.85rem;
  background: var(--panel-dark);
  color: var(--text-main);
  text-align: left;
}

.oi-matrix-market-head {
  z-index: 13 !important;
}

.oi-matrix-eye-head {
  z-index: 14 !important;
}

.oi-matrix-market-cell {
  font-weight: 900;
  letter-spacing: 0.04em;
}

.oi-matrix-eye-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.oi-matrix-eye-btn:hover,
.oi-matrix-eye-btn:focus {
  border-color: rgba(10, 132, 255, 0.35);
  color: var(--text-main);
  outline: none;
}

.oi-matrix-exchange-head {
  min-width: 120px;
  padding: 0;
  text-align: center;
}

.oi-matrix-sort-head {
  width: 100%;
  border: 0;
  padding: 0.7rem 0.45rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.oi-matrix-sort-head:hover,
.oi-matrix-sort-head.active {
  color: var(--text-main);
}

.oi-matrix-cell {
  min-width: 120px;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.012);
  vertical-align: top;
}

.oi-matrix-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 1.25rem;
  white-space: nowrap;
}

.oi-matrix-line-key {
  color: var(--text-muted);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.oi-matrix-line-value {
  color: var(--text-main);
  font-weight: 800;
}

.oi-matrix-line.has-oi-cap {
  cursor: help;
  outline: none;
}

.oi-matrix-cap-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 16rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(203, 213, 225, 0.35);
  border-radius: 5px;
  background: #111827;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
  pointer-events: none;
  white-space: pre-line;
}

.oi-matrix-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.oi-matrix-page-btn {
  min-width: 5.5rem;
}

.oi-matrix-page-status {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.oi-util-green { background: rgba(34, 197, 94, 0.08); }
.oi-util-yellow { background: rgba(234, 179, 8, 0.09); }
.oi-util-red { background: rgba(239, 68, 68, 0.1); }

.oi-at-cap-badge {
  margin-left: 0.35rem;
  border: 1px solid rgba(239, 68, 68, 0.6);
  border-radius: 999px;
  padding: 0.08rem 0.3rem;
  color: #f87171;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analysis-only-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  border: 1px solid;
  border-radius: 999px;
  padding: 0.08rem 0.32rem;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.analysis-only-badge-rfq {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.8);
  color: #FCD34D;
}

.analysis-only-badge-neutral {
  background: rgba(71, 85, 105, 0.35);
  border-color: #94A3B8;
  color: #E2E8F0;
}

.indicative-spread-cost {
  color: var(--c-yellow);
  font-weight: 800;
}

.analysis-only-warning {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.65);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #FDE68A;
  padding: 0.6rem 0.75rem;
  line-height: 1.45;
}

.oi-matrix-empty {
  padding: 1.25rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 700px) {
  .app-hover-nav {
    width: calc(100vw - 1rem);
  }

  .app-nav-tab {
    min-width: 92px;
  }

  .fr-compare-hero {
    flex-direction: column;
  }

  .fr-compare-toolbar,
  .fr-exchange-matrix-header,
  .oi-matrix-header,
  .oi-matrix-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .oi-matrix-search {
    width: 100%;
  }

  .oi-matrix-blacklist-dropdown .fr-blacklist-toggle {
    width: 100%;
  }

  .fr-blacklist-toggle {
    width: 100%;
  }
}

.alerts-container {
  width: 100%;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--c-yellow);
}

.alert-dismiss {
  background: var(--border-dark);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--text-main);
  padding: 0.3rem 0.60rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.alert-dismiss:hover {
  background: var(--c-yellow);
  color: var(--bg-dark);
}

.alert-summary {
  justify-content: center;
  color: var(--text-muted);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Two Column Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 16vw, 320px) clamp(360px, 24vw, 460px);
  grid-template-rows: auto minmax(0, auto) auto auto;
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
}

.main-left-column {
  display: contents;
}

.right-column {
  grid-column: 3;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.chart-panel {
  grid-column: 1 / span 2;
  grid-row: 1 / span 3;
  min-height: 560px;
}

.stats-panel {
  grid-column: 1 / span 2;
  grid-row: 3;
  padding: 1rem;
  gap: 0.75rem;
}

.exchange-funding-panel {
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .main-left-column,
  .right-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .top-spreads-panel,
  .exchange-funding-panel {
    grid-column: auto;
    grid-row: auto;
  }
}

.panel {
  background: var(--panel-dark);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.panel-title-bordered {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.panel-subtitle {
  font-size: 0.7rem;
  color: var(--text-dark);
}

/* Control Panel */
.control-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.65rem;
  background: var(--panel-dark);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1rem 0.85rem;
}

.control-group {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.control-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.1;
}

input.custom-select {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.62rem 0.875rem 0.62rem 2.25rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: text;
  outline: none;
  width: 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input.custom-select:focus {
  border-color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(241, 245, 249, 0.06);
}

input.custom-select::placeholder {
  color: var(--text-dark);
  font-weight: 400;
  opacity: 0.55;
}

.asset-input-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.asset-loading-indicator {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-top-color: var(--c-blue);
  border-radius: 50%;
  animation: asset-loading-spin 0.75s linear infinite;
}

.asset-loading-indicator.hidden {
  display: none;
}

@keyframes asset-loading-spin {
  to { transform: rotate(360deg); }
}

.timeframe-controls {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 0.65rem 0.55rem;
  align-items: center;
}

.timeframe-controls .range-picker {
  width: 100%;
}

.time-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.62rem 0.875rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
}

.time-input.compact {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
  padding: 0 0.35rem;
}

.time-input.compact::-webkit-outer-spin-button,
.time-input.compact::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.time-input.compact {
  appearance: textfield;
  -moz-appearance: textfield;
}

.days-stepper {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch;
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.days-stepper:focus-within {
  border-color: var(--text-main);
  box-shadow: 0 0 0 2px rgba(241, 245, 249, 0.07);
}

.days-step {
  height: 100%;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
}

.days-step:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.days-step:active {
  background: rgba(255, 255, 255, 0.15);
}

.range-picker {
  position: relative;
  width: 100%;
}

.range-input {
  width: 100%;
  padding-right: 2.2rem;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.range-input:hover,
.range-input.open {
  border-color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(241, 245, 249, 0.06);
}

.range-clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.range-clear:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-main);
}

.range-clear.visible {
  display: block;
}

.range-calendar {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: 620px;
  background: rgba(15, 19, 28, 0.98);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  padding: 1rem;
  z-index: 50;
}

.range-calendar.hidden {
  display: none;
}

.range-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-dark);
}

.range-calendar-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.range-nav {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.35rem 0.55rem;
}

.range-nav:hover,
.range-clear:hover {
  border-color: var(--c-blue);
  color: var(--text-main);
}

.range-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.9rem;
}

.range-month-title {
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
  text-align: center;
}

.range-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.range-weekday {
  color: var(--text-dark);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.range-day {
  aspect-ratio: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.range-day:not(.empty):hover {
  border-color: rgba(10, 132, 255, 0.5);
  color: var(--text-main);
}

.range-day.empty {
  pointer-events: none;
}

.range-day.range-between {
  background: rgba(10, 132, 255, 0.16);
  color: var(--text-main);
}

.range-day.range-start,
.range-day.range-end {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: white;
}

.range-day.range-today:not(.range-start):not(.range-end) {
  border-color: rgba(16, 185, 129, 0.55);
  color: var(--text-main);
}

.time-input:focus {
  border-color: var(--text-main);
  box-shadow: 0 0 0 2px rgba(241, 245, 249, 0.07);
}

@media (max-width: 700px) {
  .range-calendar {
    left: 0;
    right: auto;
    width: min(92vw, 360px);
  }

  .range-months {
    grid-template-columns: 1fr;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 96px;
  gap: 0.55rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.15s ease;
}

.stat-card.has-outlier {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(245, 158, 11, 0.01));
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-sub {
  font-size: 0.65rem;
  color: var(--text-dark);
  font-weight: 600;
}

.stat-sub-strong {
  color: var(--text-main);
}

/* Top Historical Spreads */
.top-spreads-panel {
  width: 100%;
}

.top-spreads-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.85rem;
  flex-wrap: nowrap;
}

.top-spreads-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin-left: 0;
}

.top-spreads-status {
  min-height: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--text-dark);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-spreads-spinner {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(148, 163, 184, 0.22);
  border-top-color: var(--c-blue);
  border-radius: 999px;
  animation: top-spreads-spin 0.8s linear infinite;
}

.top-spreads-spinner.hidden {
  display: none;
}

@keyframes top-spreads-spin {
  to { transform: rotate(360deg); }
}

.top-spreads-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.top-spread-exchange-filters {
  align-items: flex-end;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.top-spread-add-exchange {
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.top-spread-add-exchange:hover:not(:disabled) {
  border-color: var(--c-blue);
  color: var(--text-main);
}

.top-spread-add-exchange:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.top-spread-filter-row {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
}

.top-spread-blacklist-dropdown {
  align-self: flex-end;
}

.top-spread-eye-head {
  width: 28px;
  padding: 0;
}

.top-spread-eye-cell {
  padding: 0;
  text-align: center;
  vertical-align: middle;
  width: 28px;
}

.top-spread-eye-btn {
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.top-spread-eye-btn:hover,
.top-spread-eye-btn:focus {
  color: var(--text-main);
  outline: none;
}

.top-spread-remove-exchange {
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.top-spread-remove-exchange:hover:not(:disabled) {
  border-color: var(--c-red);
  color: var(--text-main);
}

.top-spread-remove-exchange:disabled {
  cursor: wait;
  opacity: 0.6;
}

.top-spread-label-row {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  position: relative;
}

.ranking-tooltip {
  align-items: center;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: help;
  display: inline-flex;
  font-size: 0.58rem;
  font-weight: 900;
  height: 15px;
  justify-content: center;
  line-height: 1;
  width: 15px;
}

.ranking-tooltip:focus {
  border-color: var(--c-blue);
  outline: none;
}

.ranking-tooltip-content {
  background: rgba(15, 19, 28, 0.98);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: var(--text-muted);
  display: none;
  font-size: 0.68rem;
  font-weight: 650;
  left: 0;
  line-height: 1.35;
  max-width: min(86vw, 520px);
  min-width: min(86vw, 430px);
  padding: 0.75rem 0.85rem;
  position: absolute;
  text-transform: none;
  top: 1.45rem;
  white-space: normal;
  z-index: 50;
}

.ranking-tooltip-content strong {
  color: var(--text-main);
  display: block;
  font-size: 0.7rem;
  margin-top: 0.55rem;
}

.ranking-tooltip-content strong:first-child {
  margin-top: 0;
}

.ranking-tooltip:hover + .ranking-tooltip-content,
.ranking-tooltip:focus + .ranking-tooltip-content {
  display: block;
}

.top-spread-mode .top-spread-select {
  min-width: 180px;
}

.top-spread-min-oi-filter .top-spread-select {
  min-width: 80px;
  width: 80px;
}

.top-spread-days-filter,
.top-spread-min-oi-filter {
  align-items: stretch;
}

.top-spread-days-stepper,
.exchange-funding-days-stepper,
.hedged-days-stepper {
  width: 80px;
  min-width: 80px;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
}

/* Table tabs */
.table-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.table-tabs-nav {
  display: inline-flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0;
  width: fit-content;
}

.table-tabs-nav-global {
  position: sticky;
  /* Room for the fixed .account-rail strip above. Keep in sync with its
     height in the .account-rail rule. */
  top: 34px;
  z-index: 120;
  width: fit-content;
  background: var(--bg-main, #0b0e14);
  padding: 0.4rem 1rem 0;
  margin-top: 34px;
}

.tabbar-actions {
  display: inline-flex;
  align-items: center;
  background: var(--bg-main, #0b0e14);
}

.funding-refresh-btn {
  align-self: center;
  margin-left: 0.25rem;
  position: relative;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.funding-refresh-btn.is-cooldown {
  flex-basis: 2.8rem;
  width: 2.8rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.funding-refresh-btn:hover:not(:disabled) {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.funding-refresh-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.funding-refresh-btn.is-refreshing {
  animation: funding-refresh-spin 1s linear infinite;
}

@keyframes funding-refresh-spin {
  to { transform: rotate(360deg); }
}

.lifecycle-tab-badge {
  background: var(--c-blue);
  color: white;
  border-radius: 999px;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.lifecycle-overlay {
  position: fixed;
  /* Sits inside the account-rail strip (right side), stays right-aligned. */
  top: 3px;
  right: 1rem;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.lifecycle-overlay > * {
  pointer-events: auto;
}

.lifecycle-overlay-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel-bg, rgba(15, 23, 42, 0.9));
  border: 1px solid var(--panel-border, rgba(148, 163, 184, 0.2));
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
  backdrop-filter: blur(6px);
}

.lifecycle-overlay-toggle:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(148, 163, 184, 0.35);
}

.lifecycle-overlay-caret {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
  opacity: 0.7;
}

.lifecycle-overlay:not(.lifecycle-overlay-collapsed) .lifecycle-overlay-caret {
  transform: rotate(180deg);
}

.lifecycle-overlay-panel {
  margin-top: 0.4rem;
  width: 100%;
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  background: var(--panel-bg, rgba(15, 23, 42, 0.98));
  border: 1px solid var(--panel-border, rgba(148, 163, 184, 0.2));
  border-radius: 0.6rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  padding: 0.8rem;
  backdrop-filter: blur(8px);
}

.lifecycle-overlay-collapsed .lifecycle-overlay-panel {
  display: none;
}

.lifecycle-panel-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.6rem;
}

.lifecycle-day-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.table-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.table-tab:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.06);
}

.table-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--c-blue);
}

.table-tab:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

.tab-beta-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-radius: 3px;
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.35);
  vertical-align: middle;
}

.table-tab-content {
  display: none;
}

.table-tab-content.active {
  display: block;
}

.table-tab-content .panel {
  width: 100%;
}

.top-spread-days-stepper .days-step,
.exchange-funding-days-stepper .days-step,
.hedged-days-stepper .days-step {
  font-size: 0.9rem;
  padding: 0;
}

.hedged-days-stepper .time-input {
  border: 0;
  background: transparent;
  text-align: center;
  height: 100%;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-main);
  -moz-appearance: textfield;
}

.hedged-days-stepper .time-input::-webkit-outer-spin-button,
.hedged-days-stepper .time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.control-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.control-label-row .ranking-tooltip-content {
  left: 0;
  top: 100%;
  margin-top: 0.5rem;
}

.th-tooltip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.th-tooltip-wrap .ranking-tooltip-content {
  left: 0;
  top: 100%;
  margin-top: 0.5rem;
  min-width: 240px;
  z-index: 30;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.th-tooltip-wrap .ranking-tooltip-content.tooltip-anchor-right {
  left: auto;
  right: 0;
}

.top-spread-days-stepper .time-input,
.exchange-funding-days-stepper .time-input {
  border: 0;
  background: transparent;
  text-align: center;
  height: 100%;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-main);
  -moz-appearance: textfield;
}

.top-spread-days-stepper .time-input::-webkit-outer-spin-button,
.top-spread-days-stepper .time-input::-webkit-inner-spin-button,
.exchange-funding-days-stepper .time-input::-webkit-outer-spin-button,
.exchange-funding-days-stepper .time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.top-spread-select {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  min-width: 150px;
  outline: none;
}

.top-spread-min-oi {
  text-align: right;
}

.top-spread-min-oi::placeholder {
  color: var(--text-dark);
}

.top-spread-select:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 8px rgba(10, 132, 255, 0.18);
}

.top-spread-select:disabled {
  cursor: wait;
  opacity: 0.6;
}

.top-spreads-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.top-spreads-pagination,
.hedged-pair-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.85rem;
}

.top-spreads-page-btn,
.hedged-pair-page-btn,
.backtest-run {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0.48rem 0.75rem;
  text-transform: uppercase;
}

.top-spreads-page-btn:hover:not(:disabled),
.hedged-pair-page-btn:hover:not(:disabled),
.backtest-run:hover:not(:disabled) {
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.top-spreads-page-btn:disabled,
.hedged-pair-page-btn:disabled,
.backtest-run:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.top-spreads-page-info,
.hedged-pair-page-info {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.backtest-panel {
  width: 100%;
}

.backtest-header {
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.85rem;
}

.backtest-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.backtest-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.backtest-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 800;
  outline: none;
  padding: 0.48rem 0.7rem;
  width: 100%;
}

.backtest-input:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 8px rgba(10, 132, 255, 0.18);
}

.backtest-result {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.9rem;
}

.backtest-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.backtest-result-grid div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.backtest-result-grid span {
  color: var(--text-dark);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.backtest-result-grid strong {
  font-size: 0.95rem;
  font-weight: 900;
}

.backtest-fees-section {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-dark);
}

.backtest-fees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.backtest-fees-grid div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.backtest-fees-grid span {
  color: var(--text-dark);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.backtest-fees-grid strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-main);
}

.backtest-fees-note {
  color: var(--text-dark);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.top-spreads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.top-spreads-table th,
.top-spreads-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(30, 37, 48, 0.9);
  text-align: left;
  white-space: nowrap;
}

.top-spreads-table th {
  color: var(--text-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-spreads-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.top-spread-asset {
  background: transparent;
  border: 0;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 0;
}

.top-spread-asset:hover {
  color: var(--c-blue);
}

.top-spread-market-search {
  min-width: 6.5rem;
}

.top-spread-exchange {
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.top-spread-net {
  color: var(--c-green);
  font-size: 0.88rem;
  font-weight: 900;
}

@media (max-width: 760px) {
  .top-spreads-header,
  .top-spreads-controls {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .top-spread-exchange-filters {
    flex-wrap: wrap;
  }

  .top-spread-select {
    width: 100%;
  }
}

/* Three-State APR Colors */
.rate-pos {
  color: var(--c-green) !important;
}

.rate-neg {
  color: var(--c-red) !important;
}

.rate-neutral {
  color: var(--text-main) !important;
}

.outlier-tag {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--c-yellow);
  font-size: 0.65rem;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
}

/* Match Banner */
.best-match-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(10, 132, 255, 0.08) 100%);
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.spread-side-card {
  grid-column: 2;
  grid-row: 3;
  align-self: stretch;
  width: 100%;
  min-height: 118px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
}

.best-match-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-blue);
  margin-bottom: 0.15rem;
}

.best-match-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.best-match-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.best-match-right {
  text-align: right;
}

.spread-side-card .best-match-right {
  text-align: center;
}

.spread-formula {
  width: 100%;
  max-width: 15.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
}

.spread-formula-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.spread-formula-side {
  color: var(--text-light);
}

.spread-short-exchange {
  color: var(--c-red);
}

.spread-long-exchange {
  color: var(--c-green);
}

.spread-formula-value {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.spread-formula-value.rate-pos {
  color: var(--c-green);
}

.spread-formula-value.rate-neg {
  color: var(--c-red);
}

.spread-formula-value.rate-neutral {
  color: var(--text-muted);
}

.spread-formula-symbol {
  align-self: center;
  color: var(--c-green);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.spread-formula-divider {
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  min-width: 9.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
}

.spread-fraction-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.8), transparent);
  border-radius: 999px;
}

.spread-fraction-denominator {
  font-variant-numeric: tabular-nums;
}

.spread-formula-result {
  width: 100%;
  margin-top: 0.85rem;
  padding-top: 0.95rem;
  text-align: center;
}

.best-match-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: bold;
  text-transform: uppercase;
}

.best-match-spread {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--c-green);
}

/* Historical Chart Panel */
.chart-container {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  height: clamp(600px, 72vh, 780px);
  position: relative;
  padding: 1.5rem 1rem 1.5rem 3rem;
}

.chart-panel .chart-container {
  flex: 1;
  min-height: 600px;
  border: none;
}

.chart-y-axis {
  position: absolute;
  left: 0.5rem;
  top: 1.5rem;
  bottom: 2.5rem;
  font-size: 0.7rem;
  color: var(--text-dark);
  text-align: right;
  width: 32px;
  cursor: ns-resize;
}

.chart-y-tick {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  line-height: 1;
}

.chart-y-zero {
  color: var(--text-main);
}

.chart-x-axis {
  position: absolute;
  left: 3rem;
  right: 1rem;
  bottom: 0.5rem;
  height: 1rem;
  font-size: 0.7rem;
  color: var(--text-dark);
  cursor: ew-resize;
}

.chart-x-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chart-x-tick-start {
  transform: translateX(0);
}

.chart-x-tick-end {
  transform: translateX(-100%);
}

.chart-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.chart-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(51, 62, 78, 0.58);
  pointer-events: none;
  z-index: 0;
}

.chart-grid-zero {
  border-top-color: rgba(210, 219, 232, 0.34);
  border-top-width: 1.5px;
}

.svg-chart {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1;
}

.chart-line {
  fill: none;
  opacity: 0.82;
  stroke-width: 0.42;
  stroke-linecap: round;
  transition: opacity 0.2s ease, stroke-width 0.15s ease;
}

.chart-excluded-spike-marker {
  opacity: 0.24;
  stroke: var(--panel-dark);
  stroke-width: 0.45;
  pointer-events: none;
}

/* Hover crosshair vertical line */
.hover-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1.5px dashed var(--c-blue);
  pointer-events: none;
  display: none;
  z-index: 5;
}

/* COMPACT HOVER TOOLTIP */
.hover-tooltip {
  position: absolute;
  background: rgba(15, 19, 28, 0.95);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-main);
  pointer-events: none;
  display: none;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  width: 180px; 
  backdrop-filter: blur(4px);
}

.tooltip-title {
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.25rem;
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.05rem 0; 
}

.tooltip-row .exchange-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tooltip-row .exchange-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tooltip-row .apr-val {
  font-weight: 700;
}

/* Tooltip text color states */
.tooltip-row .apr-val.settled-pos {
  color: var(--c-green) !important;
}

.tooltip-row .apr-val.settled-neg {
  color: var(--c-red) !important;
}

.tooltip-row .apr-val.settled-neu {
  color: var(--text-main) !important;
}

.tooltip-row .apr-val.carried {
  color: var(--text-dark);
  font-weight: 500;
}

.tooltip-footer {
  font-size: 0.55rem;
  color: var(--text-dark);
  margin-top: 0.4rem;
  border-top: 1px solid var(--border-dark);
  padding-top: 0.2rem;
  text-align: center;
}

/* EXCHANGE SELECTOR SIDEBAR */
.exchange-sidebar {
  background: var(--panel-dark);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-self: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  padding-left: 0.5rem;
}

.sidebar-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dark);
  min-width: 0;
}

.sidebar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.sidebar-action {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sidebar-action:hover {
  border-color: var(--c-blue);
  background: rgba(10, 132, 255, 0.14);
  color: var(--text-main);
}

.exchange-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.exchange-item {
  display: grid;
  grid-template-columns: 1fr 4.5rem 5.75rem 4.5rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.45rem;
  height: 2.5rem;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s ease;
}

.exchange-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.exchange-item-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.exchange-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exchange-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.exchange-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.exchange-subtext {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.05em;
}

.exchange-oi-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  flex-shrink: 0;
}

.exchange-oi-label {
  color: var(--text-dark);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exchange-oi-value {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text-main);
  text-align: right;
  display: block;
}

.exchange-interval {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-muted);
}

.exchange-rate-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}

.exchange-live-apr {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.exchange-avg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.exchange-avg-apr {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.exchange-avg-label {
  color: var(--text-dark);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Crossed-out styling for inactive exchanges */
.exchange-item.inactive {
  opacity: 0.35;
}

.exchange-item.inactive .exchange-name {
  text-decoration: line-through;
  color: var(--text-dark);
}

.exchange-item.inactive .exchange-dot {
  filter: grayscale(1);
}

.lifecycle-popup {
  position: fixed;
  right: calc(clamp(280px, 18vw, 340px) + 2rem);
  top: 0.5rem;
  width: 320px;
  max-width: calc(100vw - 2rem);
  background: rgba(15, 19, 28, 0.96);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: var(--text-main);
  z-index: 60;
  font-size: 0.72rem;
  overflow: hidden;
  transition: width 0.18s ease, height 0.18s ease;
}

.lifecycle-popup[data-minimized="true"] {
  width: auto;
}

.lifecycle-popup[data-minimized="true"] .lifecycle-popup-actions,
.lifecycle-popup[data-minimized="true"] .lifecycle-popup-body {
  display: none;
}

.lifecycle-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid var(--border-dark);
}

.lifecycle-popup-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lifecycle-popup-badge {
  background: rgba(10, 132, 255, 0.18);
  border: 1px solid rgba(10, 132, 255, 0.45);
  color: var(--c-blue);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
}

.lifecycle-popup-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.lifecycle-popup-day-btn,
.lifecycle-popup-toggle {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-main);
  border-radius: 6px;
  width: 1.55rem;
  height: 1.55rem;
  font-weight: 800;
  cursor: pointer;
}

.lifecycle-popup-day-btn:hover,
.lifecycle-popup-toggle:hover {
  background: rgba(148, 163, 184, 0.22);
}

.lifecycle-popup-day-label {
  font-weight: 700;
  font-size: 0.7rem;
  min-width: 4.5rem;
  text-align: center;
}

.lifecycle-popup-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lifecycle-event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(15, 19, 28, 0.6);
}

.lifecycle-event.listed {
  border-left: 3px solid var(--c-green, #10B981);
}

.lifecycle-event.delisted {
  border-left: 3px solid var(--c-red, #ef4444);
}

.lifecycle-event-tag {
  font-size: 0.6rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.lifecycle-event-symbol {
  font-weight: 700;
}

.lifecycle-event-exchange {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.lifecycle-event-time {
  font-size: 0.62rem;
  color: var(--text-dark);
}

.lifecycle-popup-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
  font-style: italic;
}

/* Asset Selector Redesign Styles */
.asset-select-wrapper {
  position: relative;
  width: 100%;
}

.asset-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: rgba(15, 19, 28, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 400px;
}

.asset-dropdown-panel.hidden {
  display: none;
}


.asset-list-container {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 300px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) transparent;
}

.asset-list-container::-webkit-scrollbar {
  width: 5px;
}
.asset-list-container::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}

.asset-list-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.asset-list-item:hover {
  background: rgba(30, 37, 48, 0.6);
}

.asset-list-item.selected {
  background: rgba(10, 132, 255, 0.15);
  border-left: 2px solid var(--c-blue);
}

.asset-pin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-dark);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.asset-pin-icon:hover {
  color: var(--text-muted);
  transform: scale(1.1);
}

.asset-pin-icon.pinned {
  color: var(--c-yellow);
}

.asset-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex-grow: 1;
}

.asset-symbol {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.asset-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Exchange Funding Panel */
.exchange-funding-panel {
  /* Inherits panel styling */
}

.exchange-funding-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.exchange-funding-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin-left: 0;
}

.exchange-funding-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exchange-funding-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(148, 163, 184, 0.22);
  border-top-color: var(--c-blue);
  border-radius: 999px;
  animation: exchange-funding-spin 0.8s linear infinite;
}

.exchange-funding-spinner.hidden {
  display: none;
}

@keyframes exchange-funding-spin {
  to { transform: rotate(360deg); }
}

.exchange-funding-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.exchange-funding-select {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 800;
  height: 32px;
  min-width: 110px;
  padding: 0 0.5rem;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.exchange-funding-select:focus {
  border-color: var(--c-blue);
}

.exchange-funding-days {
  width: 70px;
  min-width: auto;
  text-align: center;
}

.exchange-funding-min-oi {
  width: 80px;
  min-width: auto;
  text-align: center;
}

.exchange-funding-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.exchange-funding-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.exchange-funding-table th,
.exchange-funding-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(30, 37, 48, 0.9);
  text-align: left;
  white-space: nowrap;
}

.exchange-funding-table th {
  color: var(--text-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exchange-funding-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.exchange-funding-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.85rem;
}

.exchange-funding-page-btn {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0.48rem 0.75rem;
  text-transform: uppercase;
}

.exchange-funding-page-btn:hover:not(:disabled) {
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.exchange-funding-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.exchange-funding-page-info {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .exchange-funding-header {
    flex-direction: column;
    align-items: stretch;
  }
  .exchange-funding-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }
}

/* Hedged Pair Finder */
.hedged-pair-panel {
  padding: 1rem;
}

.hedged-pair-header {
  margin-bottom: 0.75rem;
}

.hedged-pair-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: flex-end;
}

.hedged-pair-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hedged-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 110px;
}

.hedged-input:focus {
  outline: none;
  border-color: var(--c-blue);
}

.hedged-pair-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.hedged-pair-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.hedged-pair-table th {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border-dark);
  white-space: nowrap;
}

.hedged-pair-table td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}

.hedged-pair-table tr:hover td {
  background: rgba(148, 163, 184, 0.06);
}

.hedged-simulate-open {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0.15rem 0.25rem;
}

.hedged-simulate-open:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

.hedged-leg-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.oi-cap-wrap {
  position: relative;
}

.oi-cap-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel, #1a1a1a);
  border: 1px solid var(--border-dark, #444);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 11px;
  z-index: 200;
  pointer-events: none;
  color: var(--text-primary, #e0e0e0);
}

.oi-cap-wrap:hover .oi-cap-tooltip {
  display: block;
}

.hedged-leg-label {
  font-size: 0.62rem;
}

.hedged-spread-bps {
  font-size: 0.58rem;
  color: var(--text-dark);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 0.1rem;
}

.hedged-apr-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.hedged-pair-table th.hedged-pair-divider,
.hedged-pair-table td.hedged-pair-divider {
  border-left: 1px solid var(--border-dark);
  padding-left: 1rem;
}

.hedged-apr-sep {
  color: var(--text-dark);
}

.stability-header-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  white-space: nowrap;
}

.stability-header-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--text-muted);
}

.hedged-simulate-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hedged-simulate-content {
  background: rgba(15, 19, 28, 0.98);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  max-width: 640px;
  width: calc(100vw - 3rem);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hedged-simulate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-dark);
}

.hedged-simulate-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.hedged-simulate-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.hedged-simulate-close:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

.hedged-simulate-body {
  padding: 1rem;
  font-size: 0.76rem;
  line-height: 1.55;
}

.hedged-simulate-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}

.hedged-simulate-body th,
.hedged-simulate-body td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.hedged-simulate-body th {
  text-align: left;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.hedged-simulate-body h4 {
  margin: 0.75rem 0 0.35rem 0;
  font-size: 0.85rem;
}

.hedged-exchange-slots {
  display: contents;
}

.hedged-slot-row {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.hedged-add-exchange,
.hedged-remove-exchange {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-main);
  border-radius: 6px;
  width: 1.85rem;
  height: 1.85rem;
  cursor: pointer;
  font-weight: 800;
  align-self: flex-end;
}

.hedged-add-exchange:hover,
.hedged-remove-exchange:hover {
  background: rgba(148, 163, 184, 0.22);
}

.backtest-swap {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  padding: 0 0.6rem;
  height: 32px;
  align-self: flex-end;
  font-size: 1rem;
  font-weight: 700;
}

.backtest-swap:hover {
  background: rgba(148, 163, 184, 0.22);
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.hedged-loading,
.table-loading {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 1.5rem 0.5rem !important;
  animation: hedged-loading-pulse 1.6s ease-in-out infinite;
}

@keyframes hedged-loading-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Uniform control height across the app */
.hedged-input,
.exchange-funding-select,
.exchange-funding-min-oi,
.top-spread-select,
.top-spread-min-oi,
.backtest-input,
.days-stepper {
  height: 32px;
  box-sizing: border-box;
}

.hedged-input,
.top-spread-select,
.exchange-funding-select,
.backtest-input {
  line-height: 1;
}

.hedged-more-dropdown {
  position: relative;
  display: inline-block;
}

.hedged-more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-width: 160px;
  cursor: pointer;
  text-align: left;
}

.hedged-more-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  background: rgba(15, 19, 28, 0.98);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 0.5rem;
  min-width: 320px;
}

.hedged-more-panel.hidden {
  display: none;
}

.hedged-more-actions {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.hedged-more-action-btn {
  flex: 1;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem 0;
  font-weight: 700;
}

.hedged-more-action-btn:hover {
  background: rgba(148, 163, 184, 0.18);
}

.hedged-more-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.5rem;
}

.hedged-more-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
}

.hedged-more-item:hover {
  background: rgba(148, 163, 184, 0.08);
}

.hedged-more-item input[type="checkbox"] {
  accent-color: var(--c-blue);
}

/* ================================================================ */
/* Depeg Monitor Tab                                                */
/* ================================================================ */

.depeg-view { display: none; }
.depeg-view.active { display: block; margin-top: 1rem; }

.depeg-panel { padding: 16px; }

.depeg-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.depeg-updated {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  align-self: center;
}

.depeg-table-wrap { overflow-x: auto; }

.depeg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.depeg-table th,
.depeg-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color, rgba(148,163,184,0.15));
  text-align: left;
  vertical-align: top;
}

.depeg-table th {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.depeg-table th:hover { color: var(--text-primary, #f1f5f9); }

.depeg-table th.sort-active { color: var(--text-primary, #f1f5f9); }
.depeg-table th.sort-asc::after  { content: ' ▲'; font-size: 9px; }
.depeg-table th.sort-desc::after { content: ' ▼'; font-size: 9px; }

.depeg-table td.col-right,
.depeg-table th.col-right { text-align: right; font-variant-numeric: tabular-nums; }

.depeg-table tbody tr:hover { background: rgba(148,163,184,0.05); }

.depeg-subtext {
  font-size: 11px;
  color: var(--text-tertiary, #64748b);
  margin-top: 2px;
}

.depeg-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(148,163,184,0.4);
}
.depeg-link:hover { color: var(--accent, #38bdf8); border-bottom-color: currentColor; }

.depeg-cell { font-weight: 600; }
.depeg-cell.depeg-positive { color: var(--success, #10b981); }
.depeg-cell.depeg-negative { color: var(--danger, #ef4444); }
.depeg-cell.depeg-neutral  { color: var(--text-tertiary, #64748b); }

.depeg-empty {
  padding: 40px !important;
  text-align: center !important;
  color: var(--text-tertiary, #64748b);
}

/* ================================================================ */
/* OI Matrix: bullets vor Exchange-Header + Scrollbar-Styling      */
/* ================================================================ */

.oi-matrix-exchange-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.oi-matrix-sort-head {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.oi-matrix-wrap {
  scrollbar-color: rgba(10, 132, 255, 0.55) rgba(7, 9, 14, 0.9);
  scrollbar-width: thin;
}

.oi-matrix-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.oi-matrix-wrap::-webkit-scrollbar-track {
  background: rgba(7, 9, 14, 0.9);
  border-left: 1px solid rgba(30, 37, 48, 0.85);
}

.oi-matrix-wrap::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 9, 14, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.78), rgba(157, 78, 221, 0.66));
}

.oi-matrix-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.95), rgba(157, 78, 221, 0.86));
}

.oi-matrix-wrap::-webkit-scrollbar-corner {
  background: rgba(7, 9, 14, 0.9);
}

/* ================================================================ */
/* Airdrop Rechner Tab (v2)                                         */
/* ================================================================ */

.airdrop-view { display: none; }
.airdrop-view.active { display: block; margin-top: 1rem; }

.airdrop-panel { padding: 16px; }

.airdrop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.airdrop-toolbar { display: flex; gap: 12px; align-items: center; }

.airdrop-btn {
  padding: 9px 16px;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.24), rgba(157, 78, 221, 0.24));
  border: 1px solid rgba(10, 132, 255, 0.5);
  color: #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.1s;
}
.airdrop-btn:hover {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.36), rgba(157, 78, 221, 0.36));
}
.airdrop-btn:active { transform: translateY(1px); }

.airdrop-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.airdrop-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  color: var(--text-secondary, #94a3b8);
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 19, 28, 0.4);
}
.airdrop-empty-icon { font-size: 32px; margin-bottom: 8px; }
.airdrop-empty-title { font-size: 16px; font-weight: 600; color: var(--text-primary, #f1f5f9); margin-bottom: 4px; }
.airdrop-empty-hint { font-size: 13px; }

.airdrop-card-v2 {
  background:
    linear-gradient(180deg, rgba(15, 19, 28, 0.94), rgba(10, 13, 22, 0.94)),
    linear-gradient(135deg, rgba(10, 132, 255, 0.08), rgba(157, 78, 221, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.airdrop-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.airdrop-card-name {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary, #f1f5f9);
  font-size: 16px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 6px;
  flex: 1;
  min-width: 0;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.airdrop-card-name:hover { background: rgba(255, 255, 255, 0.04); }
.airdrop-card-name:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.airdrop-card-actions { display: flex; gap: 6px; }

.airdrop-icon-btn {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-secondary, #94a3b8);
  border-radius: 6px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
}
.airdrop-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #f1f5f9);
  border-color: rgba(148, 163, 184, 0.4);
}
.airdrop-icon-btn.del {
  border-color: rgba(239, 68, 68, 0.35);
  color: rgba(239, 68, 68, 0.85);
  font-size: 18px;
  line-height: 1;
}
.airdrop-icon-btn.del:hover { background: rgba(239, 68, 68, 0.14); color: #ef4444; }
.airdrop-icon-btn.share.shared-flash {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}
.airdrop-icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -30px;
  right: 0;
  background: rgba(15, 19, 28, 0.95);
  color: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.25);
  pointer-events: none;
  z-index: 10;
}

.airdrop-outputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.airdrop-output-tile {
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.airdrop-output-tile strong {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.airdrop-output-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.airdrop-output-sub {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.65);
  font-variant-numeric: tabular-nums;
}

.airdrop-output-apr {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.55);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.15);
  width: 100%;
  text-align: center;
}

.airdrop-output-tile.bear { border-color: rgba(239, 68, 68, 0.35); }
.airdrop-output-tile.bear strong { color: #f87171; }
.airdrop-output-tile.bear .airdrop-output-label { color: rgba(239, 68, 68, 0.85); }

.airdrop-output-tile.base { border-color: rgba(234, 179, 8, 0.35); }
.airdrop-output-tile.base strong { color: #facc15; }
.airdrop-output-tile.base .airdrop-output-label { color: rgba(234, 179, 8, 0.85); }

.airdrop-output-tile.bull { border-color: rgba(34, 197, 94, 0.35); }
.airdrop-output-tile.bull strong { color: #4ade80; }
.airdrop-output-tile.bull .airdrop-output-label { color: rgba(34, 197, 94, 0.85); }

.airdrop-output-caption {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  text-align: center;
  font-style: italic;
  margin-top: -4px;
}

.airdrop-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.airdrop-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.airdrop-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary, #94a3b8);
  font-weight: 600;
}

.airdrop-section-hint {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.5);
}

.airdrop-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.airdrop-mode-opt {
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.7);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.15s, color 0.15s;
}
.airdrop-mode-opt:hover { color: var(--text-primary, #f1f5f9); }
.airdrop-mode-opt.active {
  background: rgba(10, 132, 255, 0.25);
  color: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.4);
}

.airdrop-section input[type="number"],
.airdrop-section input[type="date"] {
  background: rgba(7, 9, 14, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-primary, #f1f5f9);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  width: 100%;
  box-sizing: border-box;
  color-scheme: dark;
}
.airdrop-section input[type="number"]:focus,
.airdrop-section input[type="date"]:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(7, 9, 14, 0.85);
}

.airdrop-dates {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center;
}
.airdrop-dates-arrow { color: rgba(148, 163, 184, 0.5); font-size: 14px; }

.airdrop-mode-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.airdrop-row-points {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  align-items: end;
}
.airdrop-row-points.single { grid-template-columns: 1fr; }

.airdrop-apr-inputs {
  display: grid;
  grid-template-columns: minmax(72px, 0.75fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
}

.airdrop-labeled-input {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.airdrop-input-label {
  color: var(--text-secondary, #94a3b8);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.airdrop-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.airdrop-input-wrap input[type="number"] {
  background: rgba(7, 9, 14, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-primary, #f1f5f9);
  padding: 10px 48px 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  width: 100%;
  box-sizing: border-box;
  color-scheme: dark;
  height: 40px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.airdrop-input-wrap input[data-field="daysInvested"] {
  padding-right: 12px;
}
.airdrop-input-wrap input[data-field="invest"] {
  padding-right: 28px;
}
.airdrop-input-wrap input[data-field="myPoints"] {
  padding-right: 48px;
}
.airdrop-input-wrap input[type="number"]::-webkit-outer-spin-button,
.airdrop-input-wrap input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
.airdrop-input-wrap input[type="number"]:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.5);
  background: rgba(7, 9, 14, 0.85);
}
.airdrop-input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(7, 9, 14, 0.65) 25%);
  padding-left: 12px;
}

.airdrop-fdv-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.airdrop-fdv-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border-left: 3px solid;
}

.airdrop-fdv-row span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.airdrop-fdv-row input[type="number"] {
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: 6px 8px !important;
  text-align: right;
}
.airdrop-fdv-row input[type="number"]:focus {
  background: rgba(7, 9, 14, 0.65) !important;
  border-color: rgba(10, 132, 255, 0.5) !important;
}

.airdrop-fdv-row.bear { border-left-color: rgba(239, 68, 68, 0.5); }
.airdrop-fdv-row.bear span { color: rgba(239, 68, 68, 0.9); }
.airdrop-fdv-row.base { border-left-color: rgba(234, 179, 8, 0.5); }
.airdrop-fdv-row.base span { color: rgba(234, 179, 8, 0.9); }
.airdrop-fdv-row.bull { border-left-color: rgba(34, 197, 94, 0.5); }
.airdrop-fdv-row.bull span { color: rgba(34, 197, 94, 0.9); }

@media (max-width: 700px) {
  .airdrop-projects {
    grid-template-columns: 1fr;
  }

  .airdrop-apr-inputs {
    grid-template-columns: 1fr;
  }
}

/* ================================================================ */
/* ETF Spot Konverter Tab                                           */
/* ================================================================ */

.etf-view { display: none; }
.etf-view.active { display: block; margin-top: 1rem; }

.etf-panel { padding: 16px; }

.etf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.etf-toolbar { display: flex; gap: 12px; align-items: center; }
.etf-updated { font-size: 12px; color: var(--text-secondary, #94a3b8); }

.etf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 12px;
}

.etf-card {
  container-type: inline-size;
  background: rgba(15, 19, 28, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.etf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.etf-card-title { font-size: 14px; font-weight: 700; color: var(--text-primary, #f1f5f9); }
.etf-card-sub { font-size: 11px; color: var(--text-secondary, #94a3b8); margin-top: 2px; }

.etf-live-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  background: rgba(7, 9, 14, 0.5);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.etf-live-cell { display: flex; flex-direction: column; gap: 2px; align-items: center; min-width: 0; }
.etf-live-label {
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #94a3b8);
}
.etf-live-cell strong { font-size: 13px; color: var(--text-primary, #f1f5f9); font-weight: 700; }
.etf-swap-meta {
  color: rgba(148, 163, 184, 0.72);
  font-size: 8px;
  line-height: 1.2;
  text-align: center;
}

.etf-venues {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.etf-venues-title {
  color: var(--text-secondary, #94a3b8);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.etf-venue-list {
  display: grid;
  gap: 8px;
}

.etf-venue-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) minmax(68px, auto) minmax(74px, auto) minmax(54px, auto) minmax(68px, auto);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 2px solid rgba(10, 132, 255, 0.55);
  border-radius: 6px;
  background: rgba(7, 9, 14, 0.48);
}

.etf-venue-identity {
  min-width: 0;
}

.etf-venue-exchange {
  color: var(--text-primary, #f1f5f9);
  font-size: 12px;
  font-weight: 800;
}

.etf-venue-market {
  overflow: hidden;
  color: rgba(148, 163, 184, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etf-venue-price,
.etf-venue-value,
.etf-venue-spread,
.etf-venue-average {
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.etf-venue-metric span {
  display: block;
  color: rgba(148, 163, 184, 0.58);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.etf-venue-price strong,
.etf-venue-value strong {
  color: var(--text-primary, #f1f5f9);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.etf-venue-premium {
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.etf-venue-average .etf-venue-history {
  color: rgba(148, 163, 184, 0.68);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.etf-venue-premium.positive { color: #f87171; }
.etf-venue-premium.negative { color: #4ade80; }
.etf-venue-premium.neutral { color: var(--text-secondary, #94a3b8); }

.etf-venues-empty {
  padding: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  color: rgba(148, 163, 184, 0.6);
  font-size: 11px;
  text-align: center;
}

.etf-info-note {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  line-height: 1.4;
}

@container (max-width: 400px) {
  .etf-venue-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 10px 14px;
  }

  .etf-venue-identity {
    grid-column: 1 / -1;
  }
}

@container (max-width: 360px) {
  .etf-venue-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Account rail + wallet-login dialog (2026-08-02 user mgmt) ---
   Sits in the same fixed row as #lifecycleOverlay and extends leftwards.
   Kept monochrome to match the rest of the dashboard chrome (no blue). */
.account-rail {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 34px;
  /* Reserve ~240px on the right for the fixed Listings & Delistings toggle
     that also lives in this strip; keep in sync with its collapsed width. */
  padding: 0 240px 0 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  z-index: 130; /* above the sticky tab bar (z-index 120) */
  background: #0a0a0a;
  border-bottom: 1px solid #1c1c1c;
  font-size: 0.85rem;
  color: #bfbfbf;
}
.account-hint {
  color: #7d7d7d;
  white-space: nowrap;
}
.account-btn {
  background: #1c1c1c;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
}
.account-btn:hover { border-color: #555; }
.account-btn.secondary { background: transparent; }
.account-user { color: #d5d5d5; }
.account-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  background: #262626;
  color: #a1a1a1;
  border: 1px solid #333;
}
.account-badge.pending { color: #d59b4a; border-color: #40331d; }
.account-caret { opacity: 0.6; margin-left: 0.35rem; }
.account-menu-wrapper { position: relative; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 6px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.account-menu[hidden] { display: none; }
.account-menu-suffix {
  padding: 4px 12px 6px;
  color: #6f6f6f;
  font-size: 0.75rem;
  border-bottom: 1px solid #262626;
  margin-bottom: 4px;
}
.account-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #d5d5d5;
  cursor: pointer;
  font: inherit;
}
.account-menu button:hover { background: #262626; }

.login-dialog {
  background: #141414;
  color: #e0e0e0;
  border: 1px solid #e0a44b; /* orange accent frame matches primary CTA */
  border-radius: 8px;
  padding: 1.75rem 2rem 1.4rem;
  width: 420px;
  max-width: 92vw;
  text-align: center;
  /* inset:0 + margin:auto reliably centers a <dialog> opened via showModal
     across Chromium/Firefox — top/left/transform gets overridden by the
     top-layer positioning otherwise. */
  inset: 0;
  margin: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.55);
}
.login-dialog::backdrop { background: rgba(0,0,0,0.6); }
.login-dialog h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: #e0a44b;
  letter-spacing: 0.02em;
}
.login-safety {
  color: #a1a1a1;
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
}
.login-hint {
  color: #8f8f8f;
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  line-height: 1.55;
}
.login-label {
  display: block;
  margin: 0.5rem 0 0.35rem;
  color: #c0c0c0;
  font-size: 0.82rem;
  text-align: center;
}
.login-dialog input {
  width: 100%;
  background: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
  text-align: center;
}
.login-dialog input:focus {
  outline: none;
  border-color: #e0a44b;
  box-shadow: 0 0 0 2px rgba(224, 164, 75, 0.15);
}
.login-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.1rem;
}
.login-actions-secondary { margin-top: 0.4rem; }
.login-btn-primary {
  background: #e0a44b;
  color: #14100a;
  border: 1px solid #e0a44b;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 0.15s, box-shadow 0.15s;
}
.login-btn-primary:hover {
  background: #ecb662;
  box-shadow: 0 0 0 3px rgba(224, 164, 75, 0.18);
}
.login-btn-secondary {
  background: transparent;
  color: #e0e0e0;
  border: 1px solid #3c3c3c;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}
.login-btn-secondary:hover { border-color: #6a6a6a; }
.login-btn-link {
  background: transparent;
  border: none;
  color: #7c7c7c;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
}
.login-btn-link:hover { color: #d0d0d0; }
.login-status { color: #9c9c9c; font-size: 0.78rem; min-height: 1.1em; margin-top: 0.75rem; }
.login-error { color: #d55151; font-size: 0.82rem; min-height: 1.1em; margin-top: 0.25rem; }

/* Guest-hint takes ~360px — the account-rail strip has fixed 34px height and
   the Listings & Delistings toggle also lives there, so hide the long hint
   when there isn't much horizontal room to keep both without overlap. */
@media (max-width: 1600px) {
  .account-hint { display: none; }
}

/* --- Admin user-management panel --- */
.admin-dialog {
  background: #141414;
  color: #e0e0e0;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  width: 720px;
  max-width: 96vw;
  max-height: 88vh;
}
.admin-dialog::backdrop { background: rgba(0,0,0,0.6); }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.admin-header h2 { margin: 0; font-size: 1.05rem; color: #f2f2f2; }
.admin-body { max-height: 68vh; overflow-y: auto; padding-right: 4px; }
.admin-user {
  border: 1px solid #252525;
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.6rem;
  background: #181818;
}
.admin-user-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.admin-username { font-weight: 600; color: #f0f0f0; }
.admin-status {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  border: 1px solid #333;
  color: #bfbfbf;
}
.admin-status-pending { color: #d59b4a; border-color: #40331d; }
.admin-status-active { color: #79d59b; border-color: #1d402b; }
.admin-status-denied, .admin-status-blocked { color: #d55b5b; border-color: #402020; }
.admin-role { font-size: 0.75rem; color: #999; }
.admin-wallet { font-size: 0.78rem; color: #808080; margin-left: auto; }
.admin-user-meta { margin: 0.35rem 0; color: #7c7c7c; font-size: 0.75rem; }
.admin-user-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.4rem 0;
}
.admin-user-actions button {
  background: #1c1c1c;
  color: #d5d5d5;
  border: 1px solid #333;
  padding: 0.28rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}
.admin-user-actions button:hover { border-color: #555; }
.admin-user-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-user-perms {
  display: flex;
  gap: 0.4rem 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.78rem;
  border-top: 1px solid #232323;
  padding-top: 0.5rem;
  margin-top: 0.35rem;
}
.admin-perm { color: #c7c7c7; user-select: none; }
.admin-perm input { margin-right: 0.25rem; vertical-align: middle; }
.admin-save-btn {
  background: #262626;
  color: #e0e0e0;
  border: 1px solid #3a3a3a;
  padding: 0.28rem 0.7rem;
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
  margin-left: auto;
}
.admin-save-btn:hover { border-color: #555; }
.admin-perm-status { color: #9c9c9c; font-size: 0.75rem; margin-left: 0.4rem; }
.admin-loading, .admin-empty { padding: 1rem; color: #9c9c9c; }
.admin-error { padding: 0.75rem; color: #d55b5b; }

/* Self-service wallets dialog (multi_wallet permission) */
.wallet-list { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; }
.wallet-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0.55rem;
  background: #181818;
  border: 1px solid #252525;
  border-radius: 3px;
  font-size: 0.82rem;
}
.wallet-address { font-family: monospace; color: #d5d5d5; overflow-wrap: anywhere; }
.wallet-added { color: #7c7c7c; font-size: 0.72rem; }
.wallet-add {
  border-top: 1px solid #232323;
  padding-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.wallet-add label { color: #b6b6b6; font-size: 0.82rem; }
.wallet-add input {
  background: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 0.45rem 0.6rem;
  border-radius: 3px;
  font: inherit;
  font-family: monospace;
}

.login-hint { color: #8f8f8f; margin: 0 0 0.6rem; font-size: 0.78rem; line-height: 1.4; }
.login-hint-inline { color: #7c7c7c; font-weight: normal; font-size: 0.72rem; }

.login-hint-tip {
  display: inline-block;
  margin-left: 0.6rem;
  color: #d59b4a;
  font-size: 0.72rem;
  font-weight: normal;
  cursor: help;
  border-bottom: 1px dotted #40331d;
}
