body {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  width: 100%;
  max-width: 450px;
  box-sizing: border-box;
  overflow-x: hidden;
  font-family: var(--font-mono);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent
}

/* Global scrollbar styling for your extension */
*::-webkit-scrollbar {
  width: 4px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

*::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #606060;
}

hr {
  width: 100%;
  height: 1px;
  border: none;
  margin: 0px;
  background-color: var(--glass-border);
}


.header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 16px;
}

.title-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 1;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.chevron-container {
  position: relative;
  display: flex;
  align-items: center;
}

h1 {
  margin: 0 0 4px;
  font-size: var(--text-2xl);
  text-align: left;
  font-weight: var(--font-semibold);
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-transform: uppercase;
  line-height: var(--leading-tight);
  cursor: default;
  padding: 1px 2px;
  position: relative;
  transition: all 0.2s ease;
}


/* Chevron button styling */
.icon-button {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: none; /* Let clicks pass through to the select */
}

.icon-button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Symbol dropdown styling - positioned over chevron */
.symbol-dropdown {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  border: none;
  background: transparent;
  font-size: var(--text-base);
  font-family: var(--font-mono);
}

.symbol-dropdown:focus {
  outline: none;
}

/* Show hover effect on chevron when select is hovered */
.chevron-container:hover .icon-button {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}


.dashboard {
  background: var(--bg-dashboard);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  width: 100%;
  box-shadow: 0 1px 8px var(--shadow-light);
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  padding: 0px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.signal-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease-out;
  cursor: pointer;
}

.signal-icon:hover {
  transform: scale(1.5);
  transition: transform 0.2s ease-out;
  cursor: pointer;
}

.signal-icon.watchlist {
  width: 16px;
  height: 16px;
}

.data-item:last-child {
  margin-bottom: 0;
}

.data-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
}

.data-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
  padding: 16px 0px;
}

.data-outcome {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  text-transform: capitalize;
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.data-value {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* Shimmer effect for loading state */
.data-value.loading::before,
.data-status.loading::before,
.data-outcome.loading::before,
.percent-change.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  filter: blur(5px);
  mix-blend-mode: overlay;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer-loading 0.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes shimmer-loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Skeleton placeholder bar — used by the watchlist loading state before symbols arrive */
.skeleton-bar {
  display: inline-block;
  height: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  position: relative;
  overflow: hidden;
  vertical-align: middle;
}
.skeleton-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: shimmer-loading 1s ease-in-out infinite;
}

.data-value.loading,
.data-status.loading,
.data-outcome.loading,
.percent-change.loading {
  color: var(--text-secondary);
  opacity: 1;
  transition: all 0.2s ease;
}

.data-status {
  display: flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* Status colors moved to styles.css */

/* Price container and percentage change styling */
.price-container {
  display: flex;
  padding: 4px 2px;
  align-items: center;
  gap: 8px;
}

.percent-change {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  font-family: var(--font-mono);
  text-transform: capitalize;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--percent-neutral-bg);
  line-height: var(--leading-normal);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* Indicator section styling */
.indicator-section {
  padding: 16px;
  position: relative;
}

/* Signal context text styling */
.signal-context {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  text-align: left;
}

.signal-context .context-highlight {
  color: var(--text-primary);
  font-weight: var(--font-medium);
}


/* Dashboard content layout - side by side */
.dashboard-content {
  display: flex;
  gap: 0px;
  align-items: flex-start;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
}

/* Chart container styling */
.chart-container {
  flex: 1;
  width: 100%;
  min-width: 0; /* Allows flex item to shrink below content size */
  box-sizing: border-box;
}

#price-chart {
  height: 120px;
  width: 100%;
  display: block;
  cursor: default;
}

/* Chart tooltip styling */
.chart-tooltip {
  position: fixed;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 2px 4px;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-primary);
  pointer-events: none;
  z-index: 10000;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}



.last-updated {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: left;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 4px;
  transition: all 0.2s ease;
}

.last-updated:hover:not(.loading) {
  color: var(--text-primary);
}

.last-updated.loading {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.last-updated .material-icons {
  transition: transform 0.3s ease;
}

.last-updated .material-icons.rotating {
  animation: spin 0.5s ease-in-out;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.buttons {
  display: flex;
  padding-top: 2px;
  flex-direction: row;
  gap: 8px;
  flex-shrink: 0;
}

button.primary {
  width: 100%;
  height: 42px;
  padding: 0px 16px;
  font-size: var(--text-base);
  color: var(--bg-primary);
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: #FFFFFF;
  font-weight: var(--font-medium);
  font-family: var(--font-mono);
  line-height: 0;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

button.primary:hover {
  background: #dadada;
  border-color: var(--input-border);
}

button.primary:active {
  background: var(--bg-secondary);
  transform: scale(0.98);
}

button.primary.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
  cursor: not-allowed;
}

button.primary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -12px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

button.icon {
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 100px;
  border: none;
  background: var(--bg-tertiary);
  font-weight: var(--font-medium);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  transition: background-color 0.1s;
  text-transform: uppercase;
}

button.icon:hover {
  background: var(--bg-secondary);
}

button.icon:active {
  background: var(--bg-secondary);
}

button.text {
  padding: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  opacity: 0.5;
  cursor: pointer;
  border: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: none;
}

button.text:hover {
  opacity: 1;
}

a {
  padding: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  opacity: 0.5;
  cursor: pointer;
  border: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: none;
  transition: all 0.2s ease;
}

a:hover {
  opacity: 1;
}


button.secondary {
  width: 100%;
  padding: 0 16px;
  height: 42px;
  font-size: var(--text-base);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
  font-weight: var(--font-medium);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  transition: all 0.2s ease;
  text-transform: uppercase;
}

button.secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
}


.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Rotate refresh icon when loading */
.loading .material-symbols-outlined {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.breating-glow {
  position: fixed;
  top: -420px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(64px);
  pointer-events: none;
  animation: breathing-glow 6s ease-in-out infinite;
  transition: background-color 0.8s ease;
  z-index: -1;
}

/* Market signal breathing glow colors */
.breating-glow.signal-bullish,
.breating-glow.signal-weak_bullish {
  background-color: #2f9361;
}

.breating-glow.signal-bearish,
.breating-glow.signal-weak_bearish {
  background-color: #881717;
}

.breating-glow.signal-conflicting {
  background-color: #a36921;
}

.breating-glow.signal-neutral {
  background-color:  #2f66b2;
}

.breating-glow.simple {
  opacity: 1;
  position: absolute;
  background-color: var(--bg-secondary);
  width: 200px;
  height: 75px;
  filter: blur(50px);
  animation: breathing-glow 6s ease-in-out infinite;
}

@keyframes breathing-glow {
  0% {
    transform: translateX(-50%) scale(0.9);
    opacity: 0.3;
  }
  50% {
    transform: translateX(-50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translateX(-50%) scale(0.9);
    opacity: 0.3;
  }
}

/* Disclaimer container styling */
.disclaimer-container {
  width: 100%;
  display: flex;
  text-align: left;
  justify-content: space-between;
  align-items: center;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 24px;
}

img.logo {
  width: 24px;
  opacity: 0.3;
}

/* ===== DRAWER OVERLAY STYLES ===== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer-content {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 450px;
  padding-bottom: 16px;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  position: relative;
}

.drawer-content::before {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 2px;
  opacity: 0.4;
  z-index: 10;
}

.drawer-overlay.active .drawer-content {
  transform: translateY(0);
}

.drawer-content-page {
  background: var(--bg-primary);
  width: 100%;
  max-width: 450px;
  padding-top: 56px;
  padding-bottom: 72px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-content-page-dashboard {
  background: none;
  padding: 16px 16px 72px 16px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.drawer-overlay.active .drawer-content-page {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--bg-primary);
  z-index: 1000;
  position: fixed;
}

.drawer-header-container.page {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  max-width: 450px;
  width: 100%;
  padding: 16px;
}

.drawer-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
}


.drawer-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.drawer-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.drawer-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.drawer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.drawer-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ===== TOGGLE SWITCH STYLES ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  margin-left: 18px;
  width: 42px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-secondary);
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
  background: var(--signal-strong-buy);
  border-color: var(--signal-strong-buy);
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background: white;
}

/* Hover states for toggle switch */
/* Default hover state (unchecked) */
.toggle-switch:hover .toggle-slider {
  background: var(--bg-tertiary);
}

/* Checked hover state - overrides the default hover */
.toggle-switch:hover input:checked + .toggle-slider {
  background: var(--signal-strong-buy-hover);
}


/* ===== INPUT STYLES ===== */
input {
  background: var(--bg-tertiary);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  height: 32px;
  padding: 0 8px;
  font-size: var(--text-sm);
  color: var(--input-text);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  width: 42px;
  text-align: left;
  transition: all 0.2s ease;
}

input[list]::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
}

input:focus {
  outline: none;
  border-color: var(--text-secondary);
  background: var(--bg-secondary);
}

input:hover {
  border-color: var(--text-secondary);
}

/* Live-validation flag for out-of-range advanced settings */
input.invalid,
input.invalid:focus,
input.invalid:hover {
  border-color: var(--signal-strong-sell);
  background: var(--signal-negative-bg);
}


/* ===== INFO ICON STYLES ===== */
.info-icon {
  font-size: 16px !important;
  opacity: 0.3;
  margin-bottom: 2px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
  vertical-align: middle;
  color: var(--text-secondary);
  position: relative;
}

.info-icon:hover {
  opacity: 1;
}

/* Simple tooltip using CSS */
.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-10%);
  margin-left: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text-primary);
  max-width: 200px;
  white-space: normal;
  width: max-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  pointer-events: none;
  line-height: 1.5;
}

.info-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ===== TOAST NOTIFICATION STYLES ===== */
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--status-negative);
  border-color: var(--status-negative);
  color: #FFFFFF;
}

.toast .material-icons {
  font-size: 16px;
  color: var(--signal-strong-buy);
  flex-shrink: 0;
}

.toast.error .material-icons {
  color: #FFFFFF;
}

.toast-message {
  font-weight: var(--font-medium);
  white-space: nowrap;
  line-height: var(--leading-normal);
}

.toast-message a {
  color: inherit;
  text-decoration: underline;
  opacity: 1;
  cursor: pointer;
}

.toast-message a:hover {
  opacity: 0.8;
}

/* ===== OPPORTUNITY BANNER STYLES ===== */
.opportunity-banner {
  display: flex;
  align-items: center;
  cursor: pointer; 
  justify-content: space-between;
  max-height: 0;
  padding: 0px 16px;
  border-top: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.opportunity-banner.show {
  max-height: 42px;
  opacity: 1;
  border-top-color: var(--glass-border);
  pointer-events: auto;
}

.opportunity-banner .material-icons {
  font-size: 18px;
  color: var(--signal-conflicting);
  filter: drop-shadow(0px 1px 5px #ffa60072);
}

.opportunity-banner .material-icons.info-icon {
  opacity: 1;
  color: var(--text-primary);
  filter: none;
  transition: transform 0.2s ease;
}

.opportunity-banner:hover {
  background: var(--bg-tertiary);
  transition: all 0.2s ease;
}

.opportunity-banner:hover .material-icons.info-icon {
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.opportunity-banner .banner-text {
  flex: 1;
  height: 42px;
  align-items: center;
  justify-content: center;
  display: flex;
  text-align: left;
}

/* Shimmer effect overlay */
.opportunity-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 65%
  );
  animation: shimmer 4s ease-out infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  30% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== MARKET TOOLS DRAWER STYLES ===== */
.market-tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  text-decoration: none;
  opacity: 1;
  transition: all 0.2s ease;
  cursor: pointer;
}

.drawer-body.market-tool-items {
  padding: 0;
}

.market-tool-item:last-child {
  border-bottom: none;
}

.market-tool-item:hover {
  background: var(--bg-tertiary);
}

.market-tool-item .tool-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.market-tool-item .tool-logo img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 6px;
}

.market-tool-item .tool-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.market-tool-item .material-icons {
  font-size: 16px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.market-tool-item:hover .material-icons {
  transform: rotate(-45deg);
  color: var(--text-primary);
  
}

/* ===== WATCHLIST OVERLAY STYLES ===== */
.watchlist-search-container {
padding: 16px 16px 0 16px;
}

.watchlist-search-input-wrapper {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0px 8px;
  transition: all 0.2s ease;
}

.watchlist-search-input-wrapper:hover {
  border-color: var(--text-secondary);
}

.watchlist-search-input-wrapper:focus-within {
  border-color: var(--text-secondary);
  background: var(--bg-secondary);
}

.watchlist-search-input-wrapper .search-icon {
  color: var(--text-secondary);
  font-size: 20px;
  flex-shrink: 0;
}

.watchlist-search-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  text-transform: uppercase;
  padding: 0;
  width: auto;
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.watchlist-search-input-wrapper input:focus {
  outline: none;
  border: none;
  background: none;
}

.watchlist-search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.watchlist-search-input-wrapper .icon-button {
  pointer-events: auto;
  flex-shrink: 0;
}

/* Watchlist Header */
.watchlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
}


/* Watchlist Item */
.watchlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:16px;
  gap: 8px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.15s ease;
  cursor: pointer;
  position: relative;
}

.watchlist-item:hover {
  background: var(--bg-tertiary);
}

.watchlist-item:last-child {
  border-bottom: none;
}

.watchlist-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.watchlist-item.drag-over {
  border-top: 1px solid var(--text-primary);
}

/* Grip icon */
.watchlist-item-grip {
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.15s ease;
  color: var(--text-secondary);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.watchlist-item:hover .watchlist-item-grip {
  opacity: 0.6;
}

.watchlist-item-grip:hover {
  opacity: 1 !important;
  color: var(--text-primary);
}

.watchlist-item.dragging .watchlist-item-grip {
  cursor: grabbing;
}


.watchlist-item-header {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}




/* Watchlist Item Data Display */
.watchlist-item-data {
  display: flex;
  align-items: center;
  gap: 10px;
}


.watchlist-item-delete {
  opacity: 0.3;
  transition: opacity 0.15s ease;
  pointer-events: auto;
}

.watchlist-item:hover .watchlist-item-delete {
  opacity: 1;
}

.watchlist-item-delete:hover {
  color: var(--status-negative);
}

/* Empty State */
.watchlist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.watchlist-empty .empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.watchlist-empty p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.watchlist-empty .empty-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 8px;
}

/* Preset Indices Section */
.watchlist-presets-section {
  margin-top: 8px;
  padding: 16px;
  border-top: 1px solid var(--glass-border);
}

.watchlist-presets-header {
  margin-bottom: 12px;
}

.watchlist-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Preset Chip */
.preset-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  font-family: var(--font-mono);
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.preset-chip:disabled,
.preset-chip.added {
  opacity: 0.4;
  cursor: default;
}
/* Title clickable for watchlist */
.title-row.watchlist-enabled h1 {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  transition: background 0.15s ease;
}

.title-row.watchlist-enabled h1:hover {
  background: var(--bg-tertiary);
}

.title-row.watchlist-enabled h1::after {
  content: "\e863";
  font-family: "Material Icons";
  font-size: 12px;
  position: absolute;
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  width: 20px;
  height: 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 2px;
  right: -8px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  color: var(--text-primary);
}

.title-row.watchlist-enabled h1:hover::after {
  opacity: 1;
}

/* ===== CUSTOM AUTOCOMPLETE DROPDOWN STYLES ===== */
.custom-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.autocomplete-active {
  background: var(--bg-tertiary);
}

.autocomplete-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.autocomplete-item-symbol {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.autocomplete-item-name {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autocomplete-item-badge {
  font-size: 9px;
  font-weight: var(--font-semibold);
  padding: 2px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.autocomplete-item-badge.badge-preset {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.autocomplete-item-badge.badge-ind {
  background: var(--signal-positive-bg);
  color: var(--signal-strong-buy);
}

.autocomplete-item-badge.badge-us {
  background: var(--signal-neutral-bg);
  color: var(--signal-neutral);
}

/* Position relative for parent to contain dropdown */
.watchlist-search-input-wrapper {
  position: relative;
}

/* ===== FILTER DROPDOWN STYLES ===== */
.custom-filter-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  min-width: 280px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.filter-section {
  padding: 12px;
}

.filter-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 12px;
}

.filter-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

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

.filter-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.filter-description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: var(--leading-normal);
}

/* =============================================================================
   BOTTOM NAVIGATION BAR
   ============================================================================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border-top: 1px solid var(--glass-border);
  z-index: 1000;
}

.bottom-nav-container {
  width: 100%;
  max-width: 450px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  gap: 8px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border-radius: 8px;
  min-width: 60px;
  position: relative;
  will-change: transform;
}

.bottom-nav-item:hover {
  color: var(--text-primary);
}

.bottom-nav-item.active {
  color: var(--text-primary);
  opacity: 1;
}

.bottom-nav-item.active .material-icons {
  color: var(--text-primary);
}

.bottom-nav-item .material-icons {
  font-size: 24px;
  transition: color 0.2s ease;
}

.bottom-nav-label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* Dashboard drawer: bound height + clear the bottom nav so all content is scrollable */
.drawer-content { max-height: 90vh; }

/* Dashboard drawer spacing — ported from the extension (scoped so it doesn't affect watchlist/settings) */
#dashboard-overlay .dashboard-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
}
#dashboard-overlay .dashboard-drawer-header h3 { margin: 0; }
#dashboard-overlay .price-container { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
#dashboard-overlay .drawer-body { padding: 16px 16px 96px; gap: 16px; display: flex; flex-direction: column; }
#dashboard-overlay .dashboard {
  background: var(--bg-dashboard);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  width: 100%;
}
#dashboard-overlay .dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  padding: 0 8px;
  border-bottom: 1px solid var(--glass-border);
}
#dashboard-overlay .dashboard-content { display: flex; flex-direction: column; gap: 0; }
#dashboard-overlay .indicator-section { padding: 16px 8px; width: 100%; }
#dashboard-overlay .signal-context { font-size: var(--text-sm); color: var(--text-secondary); text-align: left; }
#dashboard-overlay .chart-container { width: 100%; padding: 0 8px 8px; min-width: 0; box-sizing: border-box; }
#dashboard-overlay #price-chart { width: 100%; height: 120px; display: block; }
#dashboard-overlay .data-group { display: flex; flex-direction: column; width: 100%; gap: 8px; padding: 0; box-sizing: border-box; }
#dashboard-overlay .data-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
#dashboard-overlay .data-outcome { font-size: var(--text-xl); font-weight: var(--font-semibold); text-transform: capitalize; font-family: var(--font-mono); }
#dashboard-overlay hr { margin: 0; border: none; border-top: 1px solid var(--glass-border); }

/* Check-times editor (settings) */
.check-times-list { display: flex; flex-direction: column; gap: 8px; padding: 0 0 8px; }
.check-time-row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.check-time-input { width: 120px; }
.check-time-remove { flex: 0 0 auto; }

/* Make icon-buttons clickable — the PWA doesn't use the <select> passthrough chevron */
.icon-button { pointer-events: auto; }

/* Check-times editor layout (left-aligned, labelled) */
.check-times-list { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; align-items: flex-start; }
.check-time-row { display: flex; align-items: center; gap: 10px; justify-content: flex-start; width: 100%; }
.check-time-label { font-size: var(--text-xs); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; min-width: 56px; }
.check-time-input { width: 90px; }
.check-time-remove { flex: 0 0 auto; }

/* =============================================================================
   DESKTOP SIDE-PANEL LAYOUT (wide screens)
   Watchlist docks left; the per-symbol dashboard becomes a persistent right
   panel instead of a bottom sheet. Mobile keeps the bottom-sheet behavior.
   ============================================================================= */
@media (min-width: 1000px) {
  :root { --wl-col: 460px; }

  body { max-width: none; width: 100%; align-items: flex-start; }

  /* Left column: the watchlist sits flush-left under the app-bar header */
  #watchlist-page { max-width: var(--wl-col); border-right: 1px solid var(--glass-border); min-height: 100vh; }

  /* Bottom nav docks under the left column, left-aligned */
  .bottom-nav { justify-content: flex-start; width: var(--wl-col); border-right: 1px solid var(--glass-border); }

  /* Dashboard: docked right panel, always visible (no backdrop / no slide-up) */
  #dashboard-overlay {
    position: fixed;
    top: 56px;
    left: var(--wl-col);
    right: 0;
    bottom: 0;
    background: none;
    backdrop-filter: none;
    opacity: 1;
    visibility: visible;
    align-items: stretch;
    justify-content: stretch;
    z-index: 1;
  }
  #dashboard-overlay .drawer-content {
    transform: none;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 24px;
  }
  #dashboard-overlay .drawer-content::before { display: none; } /* drag handle */
  #close-dashboard { display: none; }                          /* no back button on desktop */

  /* Center the docked analysis so it doesn't stretch on very wide screens */
  #dashboard-overlay .drawer-body,
  #dashboard-overlay .dashboard-drawer-header { max-width: 720px; margin-left: auto; margin-right: auto; }

  /* Selected-row highlight */
  .watchlist-item.selected { background: var(--bg-tertiary); }
  .watchlist-item.selected::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--text-primary);
  }
}
