
:root {
  --bg: #0b1020;
  --panel: #11182b;
  --text: #e8ecf8;
  --muted: #9aa4bf;
  --line: #24304f;
  --positive: #33d29a;
  --negative: #ff6b8a;
  --accent: #9b6cff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar,
.controls,
.table-wrap,
.footer,
.detail-shell {
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0 8px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.controls label,
.floating-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.controls input,
.controls select,
.controls > button,
.floating-popover button,
.floating-popover input,
.floating-popover select {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
}

.controls > button,
.floating-popover button {
  cursor: pointer;
}

.search-control {
  width: min(280px, 100%);
  flex: 0 0 auto;
}

.search-control input {
  width: 100%;
}

.overview-actions,
.detail-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.overview-actions {
  margin-left: auto;
}

.overview-controls {
  align-items: center;
}

.auto-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  color: var(--text) !important;
  user-select: none;
}

.auto-toggle span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
}

.auto-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.icon-btn {
  width: 46px;
  height: 46px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn:focus-visible,
.open-btn:hover,
.open-btn:focus-visible {
  border-color: rgba(155, 108, 255, 0.55);
  outline: none;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  display: block;
}

.table-wrap {
  padding-bottom: 24px;
}

.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}


.overview-table .col-asset { width: 14%; }
.overview-table .col-metric { width: 18%; }
.overview-table .col-chg { width: 7%; }
.overview-table .col-action { width: 8%; }


.data-table thead th {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table thead th.action-col {
  width: 1%;
}

.data-table thead th.chg-col,
.data-table tbody td.chg-col {
  width: 92px;
}

.data-table thead th.chg-col {
  text-align: right;
}

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(36, 48, 79, 0.6);
}

.metric-value-col,
.chg-col,
.action-col {
  white-space: nowrap;
}

.table-num {
  display: inline-block;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.metric-value-col {
  font-variant-numeric: tabular-nums;
}

.chg-col {
  text-align: right;
}

.action-col {
  text-align: right;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.metric-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-cell .value {
  font-variant-numeric: tabular-nums;
}

.change {
  font-size: 13px;
  min-width: 76px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.standalone-change {
  display: inline-block;
  width: 100%;
  min-width: 0;
}

.change.positive { color: var(--positive); }
.change.negative { color: var(--negative); }
.change.muted { color: var(--muted); }

.table-error-cell {
  color: #ffd3df;
  font-size: 14px;
}

.ticker-link,
.open-btn,
.back-link,
.footer a {
  color: #9fc1ff;
  text-decoration: none;
}

.open-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  display: inline-block;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
}

.hidden { display: none !important; }

.sort-header {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
}

.sort-header:hover,
.sort-header:focus-visible {
  color: var(--text);
  outline: none;
}

.sort-header.active {
  color: var(--text);
}

.sort-header-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: rgba(232, 236, 248, 0.9);
}

.sort-header.active .sort-header-icon {
  color: var(--accent);
}

.sort-header-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.sort-header-label {
  letter-spacing: 0.01em;
}

.sort-header-right {
  justify-content: flex-end;
}

.data-table thead th {
  cursor: default;
}

.data-table thead th.action-col,
.data-table thead th.action-col * {
  cursor: default;
}

.data-table thead th .sort-header,
.data-table thead th .sort-header *,
.data-table thead th .sort-header-icon,
.data-table thead th .sort-header-label {
  cursor: pointer;
}

.floating-filter-wrap {
  position: relative;
  align-items: flex-start;
}

.floating-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(420px, calc(100vw - 48px));
  background: linear-gradient(180deg, rgba(20, 25, 42, 0.985), rgba(15, 20, 36, 0.985));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.floating-popover-title {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
}

.floating-popover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.single-column-grid {
  grid-template-columns: minmax(0, 1fr);
}

.floating-popover-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}

.floating-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.04) !important;
}

.page-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 16, 32, 0.52);
  backdrop-filter: blur(1px);
  z-index: 100;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 16, 32, 0.52);
  backdrop-filter: blur(1px);
  z-index: 30;
}

.loading-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: #7aa2ff;
  animation: detail-spin 0.9s linear infinite;
}

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

.detail-body .topbar,
.detail-body .controls,
.detail-body .detail-shell {
  width: min(1700px, calc(100vw - 24px));
}

.detail-topbar {
  padding-bottom: 4px;
}

.detail-heading h1 {
  margin-bottom: 0;
}

.detail-controls {
  padding-bottom: 12px;
  justify-content: flex-start;
}

.compact-detail-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.detail-shell {
  padding-bottom: 24px;
  display: flex;
  justify-content: flex-start;
}

.detail-panel {
  position: relative;
  width: 100%;
  height: calc(100vh - 148px);
  min-width: 720px;
  min-height: 260px;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.detail-chart-container {
  width: 100%;
  height: 100%;
}

.pane-badge-layer {
  position: absolute;
  inset: 0 0 28px 0;
  pointer-events: none;
  z-index: 24;
}

.pane-badge {
  position: absolute;
  padding: 4px 9px;
  border-radius: 10px;
  background: rgba(6, 11, 26, 0.88);
  border: 1px solid rgba(36, 48, 79, 0.85);
  color: #e8ecf8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.detail-status {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
}

.detail-status.hidden {
  display: none;
}

.detail-status.error {
  color: #ffd3df;
  border-color: rgba(255, 107, 138, 0.4);
}

.detail-status.info {
  color: var(--muted);
}

.scale-resize-handle {
  position: absolute;
  top: 0;
  right: 108px;
  width: 16px;
  bottom: 28px;
  cursor: col-resize;
  z-index: 26;
}

.panel-resize-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 28;
  border-right: 2px solid rgba(155, 108, 255, 0.7);
  border-bottom: 2px solid rgba(155, 108, 255, 0.7);
  border-bottom-right-radius: 6px;
}

.is-resizing-scale {
  cursor: col-resize;
  user-select: none;
}

.is-resizing-panel {
  cursor: nwse-resize;
  user-select: none;
}

@media (max-width: 900px) {
  .controls,
  .compact-detail-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .overview-actions,
  .detail-actions {
    justify-content: flex-start;
  }

  .detail-panel {
    min-width: 0;
    width: 100% !important;
    height: max(260px, calc(100vh - 164px)) !important;
  }
}


.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 16px;
  }

  .overview-table {
    min-width: 980px;
  }
}


.panel-picker {
  position: relative;
  display: inline-flex;
  align-items: end;
  min-height: 46px;
}

.panel-picker-btn {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}

.panel-picker-btn:hover,
.panel-picker-btn:focus-visible {
  border-color: rgba(155, 108, 255, 0.55);
  outline: none;
}

.panel-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(17, 24, 43, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  z-index: 60;
}

.panel-picker-menu.hidden {
  display: none;
}

.panel-toggle-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--text) !important;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.panel-toggle-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.panel-toggle-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.panel-toggle-row input[type="checkbox"] {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}


.range-tool-btn {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}

.range-tool-btn:hover,
.range-tool-btn:focus-visible,
.range-tool-btn.active {
  border-color: rgba(122, 162, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(122, 162, 255, 0.22) inset;
  outline: none;
}

.range-tool-btn.active {
  background: rgba(122, 162, 255, 0.14);
  color: #f2f6ff;
}

.range-tool-active .detail-chart-container {
  cursor: crosshair;
}

.range-tool-layer {
  position: absolute;
  inset: 0 0 28px 0;
  z-index: 25;
  pointer-events: none;
}

.range-tool-layer.hidden,
.range-selection-box.hidden,
.range-stats-box.hidden {
  display: none;
}

.range-selection-box {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 1px;
  border-left: 1px solid rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(122, 162, 255, 0.075);
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.26);
  pointer-events: none;
}

.range-selection-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  transform: translateX(-50%);
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  z-index: 3;
}

.range-selection-handle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, 0.16);
}

.range-selection-handle-left {
  left: 0;
}

.range-selection-handle-right {
  left: 100%;
}

.range-stats-box {
  position: absolute;
  top: 14px;
  width: 352px;
  max-width: calc(100vw - 40px);
  max-height: min(620px, calc(100vh - 96px));
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  touch-action: pan-y;
  cursor: default;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(6, 11, 26, 0.94);
  border: 1px solid rgba(122, 162, 255, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  color: var(--text);
  font-size: 12px;
  line-height: 1.28;
  scrollbar-width: thin;
  user-select: text;
}

.range-stats-box::-webkit-scrollbar {
  width: 8px;
}

.range-stats-box::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(122, 162, 255, 0.42);
}

.range-stats-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.range-stat-title {
  font-weight: 800;
  margin-bottom: 8px;
  color: #f2f6ff;
}

.range-stat-row,
.range-stat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.range-stat-row {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.range-stat-row span,
.range-stat-grid span,
.range-stat-heading small,
.range-stat-note,
.range-stat-muted {
  color: var(--muted);
}

.range-stat-block {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.range-stat-heading {
  font-weight: 800;
  margin-bottom: 5px;
}

.range-stat-grid {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 3px 12px;
}

.range-stats-box strong {
  font-variant-numeric: tabular-nums;
}

.range-stats-box .pos {
  color: #34d399;
}

.range-stats-box .neg {
  color: #ff6b8a;
}

.range-stat-note {
  margin-top: 8px;
  font-size: 11px;
}


.pane-empty-message {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(6, 11, 26, 0.72);
  border: 1px solid rgba(77, 93, 129, 0.55);
  color: rgba(232, 236, 248, 0.72);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}


/* Batch 52: compact detail quick range controls */
.range-quick-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.32);
}
.range-quick-btn {
  min-width: 38px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.range-quick-btn:hover {
  color: rgba(248, 250, 252, 0.96);
  background: rgba(148, 163, 184, 0.14);
}
.range-quick-btn.active {
  color: #dff7ff;
  background: rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.36);
}
@media (max-width: 760px) {
  .range-quick-picker {
    order: 20;
    width: 100%;
    justify-content: space-between;
  }
  .range-quick-btn {
    flex: 1;
  }
}

/* Batch 52.2: compact quick range controls */
#rangeQuickPicker.range-quick-picker,
.range-quick-picker.range-quick-segment {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  height: 38px !important;
  padding: 3px !important;
  margin: 0 8px !important;
  border: 1px solid rgba(71, 85, 105, 0.86) !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.68) !important;
  box-shadow: none !important;
  vertical-align: middle !important;
}
#rangeQuickPicker .range-quick-btn,
.range-quick-picker.range-quick-segment .range-quick-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  min-width: 34px !important;
  height: 30px !important;
  padding: 0 7px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: rgba(226, 232, 240, 0.74) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  outline: none !important;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease !important;
}
#rangeQuickPicker .range-quick-btn:hover,
.range-quick-picker.range-quick-segment .range-quick-btn:hover {
  color: #f8fafc !important;
  background: rgba(148, 163, 184, 0.10) !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
}
#rangeQuickPicker .range-quick-btn.active,
#rangeQuickPicker .range-quick-btn[aria-pressed="true"],
.range-quick-picker.range-quick-segment .range-quick-btn.active,
.range-quick-picker.range-quick-segment .range-quick-btn[aria-pressed="true"] {
  color: #ffffff !important;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.34), rgba(37, 99, 235, 0.24)) !important;
  border-color: rgba(167, 139, 250, 0.48) !important;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.14) !important;
}
#rangeQuickPicker .range-quick-btn:focus-visible,
.range-quick-picker.range-quick-segment .range-quick-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.44) !important;
}
@media (max-width: 900px) {
  #rangeQuickPicker.range-quick-picker,
  .range-quick-picker.range-quick-segment {
    height: 36px !important;
    margin: 6px 0 0 !important;
    order: 30 !important;
  }
  #rangeQuickPicker .range-quick-btn,
  .range-quick-picker.range-quick-segment .range-quick-btn {
    height: 28px !important;
    min-width: 32px !important;
    font-size: 12px !important;
    padding: 0 6px !important;
  }
}
/* End Batch 52.2 */


/* BATCH53_STATS_TOOL_V2_START */
.range-v2-block {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(122, 162, 255, 0.075);
  border: 1px solid rgba(122, 162, 255, 0.18);
}

.range-v2-title {
  font-weight: 800;
  color: #f2f6ff;
  margin-bottom: 6px;
}

.range-v2-line {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(120px, auto);
  gap: 8px;
  align-items: center;
  padding: 3px 0;
}

.range-v2-line span {
  color: var(--muted);
}

.range-v2-line strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* BATCH53_STATS_TOOL_V2_END */




/* BATCH54_2_BTC_RELATIVE_STYLE */
.btc-relative-toggle {
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  color: rgba(226, 232, 240, 0.88);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.btc-relative-toggle:hover {
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(129, 140, 248, 0.56);
  color: #f8fafc;
}
.btc-relative-toggle.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.30), rgba(124, 58, 237, 0.28));
  border-color: rgba(129, 140, 248, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.12), 0 6px 16px rgba(37, 99, 235, 0.12);
}
.btc-relative-toggle:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.7);
  outline-offset: 2px;
}


/* BATCH54_3_BTC_RELATIVE_PANEL */
.btc-relative-toggle {
  display: none !important;
}

/* BATCH56_STATS_OVERLAY_ZINDEX */
/* Keep Stats panel above selection handles, pane overlays, and chart layers. */
.range-tool-layer {
  z-index: 120;
}

.range-selection-box {
  z-index: 1;
}

.range-selection-handle {
  z-index: 8;
}

.range-stats-box {
  z-index: 40;
  background: rgba(5, 10, 24, 0.985);
  border-color: rgba(122, 162, 255, 0.54);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(122, 162, 255, 0.12) inset;
  isolation: isolate;
}

.range-stats-box:hover,
.range-stats-box:focus-within {
  z-index: 45;
}



/* BATCH57_DETAIL_PANEL_STABILIZATION */
.range-tool-layer {
  z-index: 240 !important;
}
.range-selection-box {
  z-index: 1 !important;
}
.range-selection-handle {
  z-index: 2 !important;
}
.range-stats-box {
  z-index: 20 !important;
  background: rgba(6, 11, 26, 0.985) !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(122, 162, 255, 0.18) !important;
}
.btc-relative-toggle {
  display: none !important;
}


/* BATCH63_3_HEALTH_BACKUP_LOADER_FIX */
.backup-status-section { margin-top: 1rem; }
.backup-summary-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(220px, 1fr);
  gap: .55rem 1rem;
  align-items: center;
}
.backup-summary-label { color: var(--muted, #9aa4b8); }
.backup-summary-value { color: var(--text, #e8eefc); overflow-wrap: anywhere; }
.status-pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; border: 1px solid rgba(148,163,184,.35); font-weight: 700; }
.status-pill.ok { color: #34d399; border-color: rgba(52,211,153,.45); }
.status-pill.warn { color: #fbbf24; border-color: rgba(251,191,36,.45); }
.status-pill.critical { color: #fb7185; border-color: rgba(251,113,133,.45); }
.status-pill.muted { color: #94a3b8; }
.backup-warnings { margin-top: .8rem; color: #fbbf24; }


/* Batch 103: Detail settings + Market Anomalies Bubbles */
.detail-settings-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
}

.detail-settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  max-height: min(74vh, 620px);
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  background: rgba(17, 24, 43, 0.985);
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.40);
  z-index: 90;
}

.detail-settings-menu.hidden {
  display: none;
}

.detail-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 10px;
  color: var(--text);
}

.detail-settings-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
}

.detail-settings-close:hover,
.detail-settings-close:focus-visible {
  color: var(--text);
  border-color: rgba(122, 162, 255, 0.55);
  outline: none;
}

.detail-settings-section {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0 4px;
}

.detail-settings-title {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px 2px;
}

.detail-settings-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.detail-settings-row {
  min-height: 32px;
}

.detail-settings-number-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  color: var(--text) !important;
}

.detail-settings-number-row input[type="number"] {
  width: 86px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 13, 26, 0.72);
  color: var(--text);
}

.detail-settings-number-row input[type="number"]:disabled {
  opacity: 0.45;
}

.detail-settings-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 4px 8px 2px;
}
