.price-trend-page {
  color: var(--text-light, #1f2937);
}

.price-hero,
.price-toolbar,
.price-panel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.dark .price-hero,
.dark .price-toolbar,
.dark .price-panel {
  border-color: rgba(71, 85, 105, 0.5);
  background: rgba(20, 20, 22, 0.94);
  box-shadow: none;
}

.price-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.price-hero__main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.price-hero__icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #ecfdf5;
  color: #059669;
  font-size: 25px;
}

.dark .price-hero__icon {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

.price-hero h1,
.price-panel h2 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

.price-hero h1 {
  font-size: 24px;
}

.price-hero p,
.panel-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.dark .price-hero p,
.dark .panel-head p {
  color: #94a3b8;
}

.price-hero__meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  text-align: right;
}

.price-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
}

.price-toolbar label {
  display: grid;
  min-width: 220px;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
}

.price-toolbar select,
.price-toolbar button,
.price-table-panel input {
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 14px;
}

.price-toolbar select,
.price-table-panel input {
  padding: 0 12px;
}

.price-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  background: #0f766e;
  color: #fff;
  cursor: pointer;
}

.dark .price-toolbar select,
.dark .price-toolbar button,
.dark .price-table-panel input {
  border-color: rgba(71, 85, 105, 0.8);
  background: #111;
  color: #e5e7eb;
}

.dark .price-toolbar button {
  background: #0d9488;
}

.price-grid {
  display: block;
  margin-top: 10px;
}

.price-panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-head {
  margin-bottom: 10px;
}

.panel-head h2,
.price-panel h2 {
  font-size: 18px;
}

.panel-head a {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 14px;
}

.chart-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.chart-segment {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  background: #f8fafc;
  padding: 2px;
}

.chart-segment button,
.chart-action-button {
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.chart-segment button {
  height: 31px;
  background: transparent;
  padding: 0 10px;
  color: #64748b;
}

.chart-segment button.is-active {
  background: #0f766e;
  color: #fff;
}

.chart-action-button {
  display: inline-flex;
  height: 35px;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  padding: 0 11px;
}

.chart-action-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auto-refresh-toggle {
  display: inline-flex;
  height: 35px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  padding: 0 10px;
  color: #475569;
  font-size: 13px;
}

.auto-refresh-toggle input {
  width: 15px;
  height: 15px;
  accent-color: #0f766e;
}

.chart-meta-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.chart-legend-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-legend {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 7px;
}

.legend-chip {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  padding: 0 9px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, opacity .15s ease;
}

.legend-chip span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--legend-color);
}

.legend-chip.is-active {
  border-color: color-mix(in srgb, var(--legend-color) 65%, transparent);
  background: color-mix(in srgb, var(--legend-color) 10%, white);
  color: #0f172a;
}

.legend-chip:not(.is-active) {
  opacity: 0.58;
}

.legend-empty,
.refresh-status {
  color: #64748b;
  font-size: 12px;
  line-height: 28px;
}

.refresh-status {
  flex: 0 0 auto;
  text-align: right;
}

.price-chart {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(20, 184, 166, 0.12);
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.82));
}

.dark .price-chart {
  border-color: rgba(20, 184, 166, 0.16);
  background:
    radial-gradient(circle at 18% 0%, rgba(20, 184, 166, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(17, 17, 17, 0.96));
}

.price-chart svg {
  display: block;
  width: 100%;
  height: 390px;
  flex: 1 1 auto;
}

.price-chart .empty {
  display: grid;
  min-height: 390px;
  place-items: center;
  color: #64748b;
  font-size: 14px;
}

.chart-grid line {
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1;
}

.chart-grid text,
.chart-x-labels text,
.axis-title {
  fill: #64748b;
  font-size: 12px;
  white-space: pre;
}

.series-glow {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.1;
}

.series-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-series circle {
  stroke: #fff;
  stroke-width: 2;
}

.dark .chart-series circle {
  stroke: #111;
}

.series-outlier {
  stroke: #fff;
  stroke-width: 2;
  stroke-linejoin: round;
}

.dark .series-outlier {
  stroke: #111;
}

.series-outlier-label {
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.dark .series-outlier-label {
  stroke: rgba(17, 24, 39, 0.92);
}

.chart-hover-line {
  stroke: rgba(15, 23, 42, 0.34);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-hover-dots circle {
  stroke: #fff;
  stroke-width: 2.2;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.28));
}

.dark .chart-hover-line {
  stroke: rgba(226, 232, 240, 0.42);
}

.dark .chart-hover-dots circle {
  stroke: #111;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 268px;
  max-width: min(420px, calc(100% - 24px));
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
  color: #f8fafc;
  padding: 10px 11px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.chart-tooltip__time {
  margin-bottom: 7px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
}

.chart-tooltip__row {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.25;
}

.chart-tooltip__name {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
}

.chart-tooltip__name i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.chart-tooltip__outlier {
  color: #fbbf24;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.chart-tooltip__row b {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-tooltip__row em {
  color: #cbd5e1;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-chart-mobile-modal {
  display: none;
}

.price-chart-modal-open,
.price-chart-modal-open body {
  overflow: hidden;
}

.price-chart-mobile-modal.is-open {
  display: block;
}

.price-chart-mobile-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(15, 23, 42, 0.48);
}

.price-chart-mobile-modal__sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1301;
  max-height: 78vh;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -24px 64px rgba(15, 23, 42, 0.24);
}

.dark .price-chart-mobile-modal__sheet {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.98);
}

.price-chart-mobile-modal__handle {
  width: 44px;
  height: 5px;
  margin: 10px auto 6px;
  border-radius: 999px;
  background: #cbd5e1;
}

.price-chart-mobile-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 12px;
}

.price-chart-mobile-modal__eyebrow {
  color: #64748b;
  font-size: 12px;
}

.price-chart-mobile-modal__head h3 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.dark .price-chart-mobile-modal__head h3 {
  color: #f8fafc;
}

.price-chart-mobile-modal__close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
}

.dark .price-chart-mobile-modal__close {
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
}

.price-chart-mobile-modal__list {
  max-height: calc(78vh - 86px);
  overflow-y: auto;
  padding: 0 16px 16px;
}

.price-chart-mobile-modal__list .chart-tooltip__row {
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  padding: 10px 0;
  color: #0f172a;
  font-size: 13px;
}

.dark .price-chart-mobile-modal__list .chart-tooltip__row {
  border-top-color: rgba(51, 65, 85, 0.9);
  color: #f8fafc;
}

.price-chart-mobile-modal__list .chart-tooltip__name {
  color: inherit;
}

.price-chart-mobile-modal__list .chart-tooltip__row b {
  color: #0f766e;
}

.dark .price-chart-mobile-modal__list .chart-tooltip__row b {
  color: #5eead4;
}

.metric-list,
.status-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.metric-list div,
.status-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 7px;
  background: #f8fafc;
  padding: 12px;
}

.dark .metric-list div,
.dark .status-list div {
  background: #111;
}

.metric-list span,
.status-list span {
  color: #64748b;
  font-size: 13px;
}

.metric-list strong,
.status-list b {
  color: #0f766e;
  font-size: 18px;
  font-weight: 600;
}

.price-table-panel {
  margin-top: 14px;
}

.price-table-panel input {
  width: 220px;
}

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

.price-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.price-table th,
.price-table td {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  padding: 11px 10px;
  text-align: left;
  white-space: nowrap;
}

.price-table th {
  color: #64748b;
  font-weight: 600;
}

.price-table th:nth-child(1),
.price-table td:nth-child(1) {
  width: 26%;
}

.price-table th:nth-child(2),
.price-table td:nth-child(2) {
  width: 18%;
}

.price-table th:nth-child(3),
.price-table td:nth-child(3),
.price-table th:nth-child(4),
.price-table td:nth-child(4),
.price-table th:nth-child(5),
.price-table td:nth-child(5),
.price-table th:nth-child(6),
.price-table td:nth-child(6) {
  width: 14%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-table td:nth-child(3),
.price-table td:nth-child(4),
.price-table td:nth-child(5),
.price-table td:nth-child(6) {
  text-align: right;
}

.price-quote-fallback {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}

.dark .price-quote-fallback {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.price-up {
  color: #059669 !important;
}

.price-down {
  color: #dc2626 !important;
}

.price-summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
}

.price-summary-strip span {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.76);
  padding: 0 11px;
}

.price-summary-strip b {
  color: #0f766e;
  font-size: 14px;
  font-weight: 600;
}

.dark .price-summary-strip span {
  border-color: rgba(71, 85, 105, 0.58);
  background: rgba(15, 23, 42, 0.5);
}

@media (max-width: 980px) {
  .price-hero,
  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .price-hero__meta {
    text-align: left;
  }

}

@media (max-width: 640px) {
  .chart-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .chart-meta-links {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }

  .chart-legend-row {
    display: block;
  }

  .price-chart {
    min-height: 360px;
  }

  .price-chart svg {
    height: 360px;
  }

  .chart-grid text,
  .chart-x-labels text,
  .axis-title {
    font-size: 11px;
  }

  .chart-tooltip {
    min-width: min(268px, calc(100% - 20px));
    padding: 9px 10px;
  }

  .chart-tooltip__row {
    grid-template-columns: minmax(86px, 1fr) auto;
    gap: 8px;
  }

  .chart-tooltip__row em {
    display: none;
  }

  .price-toolbar label,
  .price-toolbar button,
  .price-table-panel input {
    width: 100%;
    min-width: 0;
  }
}
