:root {
  color-scheme: dark;
  --bg: #090c0f;
  --panel: #141a20;
  --panel-soft: #1c242c;
  --line: #303a43;
  --text: #f0f4f5;
  --muted: #9da8ad;
  --good: #5bd18f;
  --bad: #ff7373;
  --accent: #d9b56d;
  --accent-strong: #f1cd82;
  --unique: #c76b2b;
  --unique-bright: #ff9a3d;
  --poe-blue: #9da0ff;
  --poe-frame: #70522f;
  --blue: #7eb6d9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(9, 12, 15, 0.25), var(--bg) 520px),
    radial-gradient(circle at 18% 0%, rgba(217, 181, 109, 0.18), transparent 380px),
    radial-gradient(circle at 100% 12%, rgba(126, 182, 217, 0.12), transparent 420px),
    var(--bg);
  color: var(--text);
  font-family: Segoe UI, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.app {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 104px;
  margin-bottom: 14px;
  padding: 18px 28px 16px;
  border: 1px solid rgba(217, 181, 109, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 181, 109, 0.14), rgba(20, 26, 32, 0.7)),
    linear-gradient(90deg, rgba(20, 26, 32, 0.92), rgba(20, 26, 32, 0.58));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.heroCopy {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.brandMark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(241, 205, 130, 0.64);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(241, 205, 130, 0.22), rgba(167, 119, 48, 0.18));
  color: var(--accent-strong);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 2.75rem);
  line-height: 1;
}

.subtitle {
  max-width: 340px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.actions .searchBox {
  flex: 1 1 250px;
  max-width: 340px;
  min-width: 230px;
}

.actions button,
.actions .buttonLink {
  flex: 0 0 auto;
}

.searchBox {
  position: relative;
}

input,
button,
select,
.buttonLink {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(9, 12, 15, 0.62);
  color: var(--text);
  font: inherit;
}

input {
  width: 100%;
  padding: 0 12px;
}

select {
  width: 100%;
  padding: 0 12px;
}

.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 0 18px;
  color: #14100a;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(180deg, var(--accent-strong), #a77730);
  border-color: rgba(241, 205, 130, 0.7);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.buttonLink.secondary {
  color: var(--accent-strong);
  background: rgba(9, 12, 15, 0.42);
}

.downloadLink {
  min-width: 118px;
}

.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: min(440px, 80vw);
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(217, 181, 109, 0.38);
  border-radius: 8px;
  background: #10161b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.suggestion {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(48, 58, 67, 0.8);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.suggestion:hover,
.suggestion.active {
  background: rgba(217, 181, 109, 0.12);
  filter: none;
}

.suggestion.selected {
  background: rgba(91, 209, 143, 0.1);
}

.suggestion.selected .suggestionPrice {
  color: var(--good);
}

.suggestion img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.suggestion strong,
.suggestion small {
  display: block;
}

.suggestion small {
  color: var(--muted);
  line-height: 1.25;
}

.suggestionPrice {
  color: var(--accent-strong);
  font-weight: 800;
  white-space: nowrap;
}

.suggestionFavorite {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(241, 205, 130, 0.35);
  border-radius: 6px;
  color: var(--muted);
  font-size: 1.1rem;
}

.suggestionFavorite.active {
  color: var(--accent-strong);
  background: rgba(241, 205, 130, 0.12);
}

button {
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent-strong), #a77730);
  color: #14100a;
  border-color: rgba(241, 205, 130, 0.7);
}

button:hover {
  filter: brightness(1.08);
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.35);
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.investmentHero {
  min-height: 220px;
}

.walletPanel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(217, 181, 109, 0.24);
  border-radius: 8px;
  background: rgba(20, 26, 32, 0.78);
}

.walletPanel label,
.walletTotal span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.walletPanel input {
  width: 100%;
}

.walletTotal {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 12, 15, 0.34);
}

.walletTotal strong {
  font-size: 1.2rem;
}

.investmentPicker {
  margin-bottom: 18px;
}

.pickerTools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.pickerSearch input {
  width: 100%;
}

.secondaryAction {
  color: var(--accent-strong);
  background: rgba(9, 12, 15, 0.42);
}

.investmentPill {
  height: 38px;
}

.investmentTrends {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.investmentTrends.compact {
  display: grid;
  gap: 4px;
  margin-top: 0;
}

.trendChip {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 4px;
  align-items: baseline;
  padding: 2px 6px;
  border: 1px solid rgba(48, 58, 67, 0.82);
  border-radius: 999px;
  background: rgba(9, 12, 15, 0.28);
  font-size: 0.76rem;
}

.trendChip span {
  color: var(--muted);
}

.trendChip b {
  font-size: 0.78rem;
}

.trendChip.positive {
  color: var(--good);
}

.trendChip.negative {
  color: var(--bad);
}

.trendChip.neutral {
  color: var(--muted);
}

.investmentSummary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.investmentList {
  display: grid;
  gap: 8px;
}

.investmentCard {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px 42px minmax(0, 1fr) minmax(160px, auto) 104px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(191, 116, 51, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(112, 60, 23, 0.26), transparent 22px),
    radial-gradient(circle at 14% 0%, rgba(255, 154, 61, 0.13), transparent 180px),
    rgba(6, 5, 4, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 104, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.78);
}

.investmentCard::before,
.favoriteItem::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--unique), var(--unique-bright), var(--unique), transparent);
  opacity: 0.82;
}

.investmentCard .rank {
  color: var(--accent-strong);
  font-weight: 900;
}

.investmentCard img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.investmentCard strong,
.investmentCard small,
.investmentCard em,
.investmentGain b,
.investmentGain span {
  display: block;
}

.investmentCard strong,
.favoriteItem strong {
  color: #fff4df;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 154, 61, 0.16);
}

.investmentCard small,
.investmentCard em,
.investmentGain span {
  color: var(--muted);
  font-style: normal;
}

.investmentGain {
  text-align: right;
}

.investmentGain b {
  color: var(--good);
  font-size: 1.08rem;
}

.tradePlan {
  display: grid;
  grid-template-columns: 86px 120px 92px 148px 92px;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.tradePlan label {
  display: grid;
  gap: 4px;
}

.tradePlan label span {
  color: var(--muted);
  font-size: 0.72rem;
}

.tradePlan input,
.tradePlan select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
}

.tradePreview {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tradePreview span {
  color: #8fa0aa;
}

.movementList {
  display: grid;
  gap: 8px;
}

.portfolioList {
  display: grid;
  gap: 8px;
}

.portfolioItem {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(130px, auto) 96px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(112, 82, 47, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(112, 82, 47, 0.16), transparent 20px),
    rgba(5, 5, 5, 0.78);
}

.portfolioItem.open {
  border-color: rgba(241, 205, 130, 0.3);
}

.portfolioItem.danger {
  animation: dangerPulse 1s infinite alternate;
  border-color: rgba(255, 115, 115, 0.72);
}

.portfolioItem.targetHit {
  border-color: rgba(91, 209, 143, 0.72);
  box-shadow: 0 0 20px rgba(91, 209, 143, 0.16);
}

.portfolioItem.closed {
  opacity: 0.82;
}

.portfolioItem img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.portfolioItem strong,
.portfolioItem small,
.portfolioItem em {
  display: block;
}

.portfolioItem small,
.portfolioItem em {
  color: var(--muted);
  font-style: normal;
}

.portfolioClosedTitle {
  margin: 12px 0 2px;
  color: var(--accent-strong);
  font-size: 1rem;
}

.saveInvestment.compact,
.closeInvestment {
  height: 36px;
  padding: 0 12px;
}

.deleteInvestment {
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: rgba(255, 97, 97, 0.5);
  background: rgba(255, 97, 97, 0.08);
  color: #ff8a8a;
}

.deleteInvestment:hover {
  background: rgba(255, 97, 97, 0.16);
  filter: none;
}

.alertOn {
  background: linear-gradient(180deg, #ffb0b0, #b94040);
}

@keyframes dangerPulse {
  from {
    box-shadow: 0 0 0 rgba(255, 115, 115, 0);
  }
  to {
    box-shadow: 0 0 22px rgba(255, 115, 115, 0.42);
  }
}

.movementItem {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(140px, auto) 112px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(112, 82, 47, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(112, 82, 47, 0.14), transparent 18px),
    rgba(5, 5, 5, 0.76);
}

.movementItem.up {
  border-color: rgba(91, 209, 143, 0.26);
}

.movementItem.down {
  border-color: rgba(255, 115, 115, 0.26);
}

.movementItem img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.movementItem strong,
.movementItem small,
.movementItem em,
.movementNumbers b,
.movementNumbers span {
  display: block;
}

.movementItem small,
.movementItem em,
.movementNumbers span {
  color: var(--muted);
  font-style: normal;
}

.movementNumbers {
  text-align: right;
}

.operationForm {
  grid-template-columns: 1.2fr 0.7fr 1.2fr auto;
}

.operationList {
  display: grid;
  gap: 12px;
}

.operationCard {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 12, 15, 0.36);
}

.operationCard.open {
  border-color: rgba(241, 205, 130, 0.28);
}

.operationCard.closed {
  opacity: 0.86;
}

.operationTop,
.operationStats,
.operationColumns {
  display: grid;
  gap: 12px;
}

.operationTop {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.operationTop strong,
.operationTop small,
.operationResult b,
.operationResult span,
.operationStats span,
.operationEntry span,
.operationEntry small {
  display: block;
}

.operationTop small,
.operationResult span,
.operationStats span,
.operationEntry small {
  color: var(--muted);
}

.operationResult {
  text-align: right;
}

.operationStats {
  grid-template-columns: repeat(3, 1fr);
  padding: 10px;
  border: 1px solid rgba(48, 58, 67, 0.78);
  border-radius: 8px;
  background: rgba(20, 26, 32, 0.5);
}

.operationStats b {
  color: var(--text);
}

.operationColumns {
  grid-template-columns: 1fr 1fr;
}

.operationColumns h3 {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.95rem;
}

.operationDetails {
  padding-top: 6px;
}

.operationDetails summary {
  width: max-content;
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 800;
}

.operationDetails[open] summary {
  margin-bottom: 10px;
}

.detailStats {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
}

.operationNote {
  margin: 0 0 12px;
  color: var(--muted);
}

.operationEntry {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(48, 58, 67, 0.7);
}

.operationEntry > div {
  min-width: 0;
}

.entryForm {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) 110px 130px 130px 96px;
  align-items: end;
  gap: 8px;
}

.entryForm input,
.entryForm select {
  width: 100%;
}

.entryField {
  display: grid;
  gap: 5px;
}

.entryField > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.entryPreview {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.deleteEntry {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-color: rgba(255, 97, 97, 0.5);
  background: rgba(255, 97, 97, 0.08);
  color: #ff8a8a;
  font-size: 1rem;
}

.deleteEntry:hover {
  background: rgba(255, 97, 97, 0.16);
  filter: none;
}

.entryItemBox {
  position: relative;
}

.entrySuggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(217, 181, 109, 0.38);
  border-radius: 8px;
  background: #10161b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.entrySuggestion {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(48, 58, 67, 0.78);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.entrySuggestion:hover {
  background: rgba(217, 181, 109, 0.12);
  filter: none;
}

.entrySuggestion img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.entrySuggestion strong,
.entrySuggestion small {
  display: block;
}

.entrySuggestion small {
  color: var(--muted);
}

.emptySuggestion {
  display: block;
  color: var(--muted);
  cursor: default;
}

.closeOperation {
  justify-self: end;
  height: 38px;
  color: var(--accent-strong);
  background: rgba(9, 12, 15, 0.42);
}

.summaryCard {
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 26, 32, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.summaryCard.featured {
  border-color: rgba(217, 181, 109, 0.48);
}

.currencyCard {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(199, 107, 43, 0.16), rgba(9, 12, 15, 0.24) 42%),
    rgba(20, 26, 32, 0.92);
}

.currencyCard img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.42));
}

.currencyCard > div {
  min-width: 0;
}

.summaryCard > span,
.currencyCard > div > span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.summaryCard strong {
  display: grid;
  gap: 8px;
  font-size: 1.16rem;
}

.summaryCard .rateValue {
  margin: 0;
  color: var(--text);
  font-size: 1.16rem;
}

.summaryTrend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.summaryCard .summaryTrend .trendChip {
  margin: 0;
  padding: 2px 4px;
  gap: 2px;
  font-size: 0.6rem;
  line-height: 1.05;
}

.summaryCard .summaryTrend .trendChip b {
  font-size: 0.62rem;
}

.summaryCard .summaryTrend {
  gap: 3px;
  flex-wrap: nowrap;
}

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
}

.toolbar strong {
  color: var(--text);
  margin-right: 8px;
}

.toolbar a {
  color: var(--accent-strong);
  text-decoration: none;
}

.marketRadar {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(112, 82, 47, 0.64);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(112, 60, 23, 0.1), transparent 58px),
    rgba(15, 18, 20, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 104, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.favoritesPanel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(112, 82, 47, 0.64);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(112, 60, 23, 0.11), transparent 58px),
    rgba(15, 18, 20, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 104, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.favoritesHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.favoritesHeader h2 {
  margin: 0;
  font-size: 1.2rem;
}

.favoritesHeader button {
  height: 38px;
  background: rgba(9, 12, 15, 0.42);
  color: var(--accent-strong);
}

.favoritesList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.favoriteItem {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 70px;
  padding: 10px;
  border-color: rgba(191, 116, 51, 0.42);
  background:
    linear-gradient(180deg, rgba(112, 60, 23, 0.24), transparent 22px),
    radial-gradient(circle at 12% 0%, rgba(255, 154, 61, 0.12), transparent 160px),
    rgba(5, 5, 5, 0.82);
  color: var(--text);
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 104, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.82);
}

.favoriteItem img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.favoriteItem strong,
.favoriteItem small {
  display: block;
}

.favoriteItem strong {
  line-height: 1.2;
}

.favoriteItem small {
  color: #c9c1b3;
  line-height: 1.25;
}

.favoriteItem b {
  color: var(--accent-strong);
  white-space: nowrap;
}

.favoriteMetrics {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: start;
  gap: 6px 8px;
  font-size: 0.74rem;
}

.favoriteMetrics small,
.favoriteMetrics .radarChange {
  display: inline-grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 1px;
  min-width: 0;
}

.favoriteMetrics span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1;
}

.favoriteMetrics b,
.favoriteMetrics .radarChange b {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.05;
}

.favoriteMetrics .positive,
.favoriteMetrics .radarChange.positive {
  color: var(--good);
}

.favoriteMetrics .negative,
.favoriteMetrics .radarChange.negative {
  color: var(--bad);
}

.favoriteMetrics .neutral,
.favoriteMetrics .radarChange.neutral {
  color: var(--muted);
}

.favoriteActions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.favoriteActions span {
  padding: 4px 8px;
  border: 1px solid rgba(241, 205, 130, 0.3);
  border-radius: 999px;
  color: var(--accent-strong);
}

.comparePanel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(112, 82, 47, 0.54);
  border-radius: 8px;
  background: rgba(15, 18, 20, 0.84);
}

.compareHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.compareActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compareRange {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(112, 82, 47, 0.58);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.5);
}

.rangeButton {
  width: auto;
  min-width: 46px;
  height: 30px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
}

.rangeButton.active {
  color: #14100a;
  border-color: rgba(241, 205, 130, 0.72);
  background: linear-gradient(180deg, var(--accent-strong), #a77730);
}

.compareHeader h2 {
  margin: 0;
  font-size: 1.2rem;
}

.compareHeader button,
.pagination button,
.modalClose {
  height: 38px;
  background: rgba(9, 12, 15, 0.42);
  color: var(--accent-strong);
}

.compareList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.comparePill {
  display: inline-grid;
  grid-template-columns: 24px auto auto;
  gap: 8px;
  align-items: center;
  height: 40px;
  background: rgba(9, 12, 15, 0.52);
  color: var(--text);
}

.comparePill img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.muted {
  color: var(--muted);
}

.chartBox {
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 12, 15, 0.34);
}

.chartBox.large {
  min-height: 380px;
}

.chartEmpty {
  display: grid;
  min-height: inherit;
  place-items: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.lineChart {
  display: block;
  width: 100%;
  height: auto;
}

.chartLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chartLegendItem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chartLegendItem b {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chartGrid line {
  stroke: rgba(157, 168, 173, 0.18);
}

.chartTimeAxis line {
  stroke: rgba(157, 168, 173, 0.28);
}

.chartTimeAxis text {
  fill: rgba(198, 221, 231, 0.72);
  font-size: 9px;
  font-weight: 600;
}

.chartGrid text,
.chartLabel {
  fill: var(--muted);
  font-size: 12px;
}

.chartLine {
  fill: none;
  stroke-width: 3;
}

.chartPoint {
  cursor: help;
  stroke: #0b1015;
  stroke-width: 2;
}

.radarHeader {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.radarHeader h2 {
  margin: 0;
  font-size: 1.5rem;
}

.radarHeader span {
  color: var(--muted);
  text-align: right;
}

.liveDot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 6px rgba(91, 209, 143, 0.12);
}

.radarTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.radarTab {
  height: 38px;
  min-width: 112px;
  background: rgba(9, 12, 15, 0.42);
  color: var(--muted);
  border-color: var(--line);
}

.radarTab.active {
  color: #14100a;
  border-color: rgba(241, 205, 130, 0.72);
  background: linear-gradient(180deg, var(--accent-strong), #a77730);
}

.radarList {
  display: grid;
  gap: 8px;
}

.radarItem {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 190px minmax(150px, auto);
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 76px;
  padding: 12px;
  border-color: rgba(112, 82, 47, 0.68);
  background:
    linear-gradient(180deg, rgba(112, 82, 47, 0.16), transparent 18px),
    rgba(5, 5, 5, 0.78);
  color: var(--text);
  text-align: left;
}

.radarItem::before,
.portfolioItem::before,
.movementItem::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(217, 181, 109, 0.58), transparent);
}

.miniChart {
  width: 180px;
  height: 46px;
}

.miniChart path {
  fill: none;
  stroke: var(--good);
  stroke-width: 3;
}

.miniChart.down path {
  stroke: var(--bad);
}

.miniChart circle {
  cursor: help;
  fill: transparent;
  stroke: transparent;
}

.miniChart:hover circle {
  fill: var(--accent-strong);
  stroke: #0b1015;
  stroke-width: 1.5;
}

.radarItem span {
  min-width: 0;
}

.radarItem img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.radarItem strong,
.radarItem small,
.radarItem em,
.radarNumbers b {
  display: block;
}

.radarItem strong {
  overflow-wrap: anywhere;
  font-size: 1.02rem;
  line-height: 1.15;
  color: #f2ead8;
  text-shadow: 0 1px 0 #000;
}

.radarItem small {
  color: #b9b0a3;
  line-height: 1.25;
}

.radarItem em {
  margin-top: 3px;
  color: var(--poe-blue);
  font-size: 0.86rem;
  font-style: normal;
  line-height: 1.28;
}

.radarNumbers {
  color: var(--accent-strong);
  text-align: right;
  white-space: nowrap;
}

.radarNumbers .investmentTrends {
  justify-content: flex-end;
}

.radarNumbers .investmentTrends.compact {
  margin-top: 5px;
}

.radarChange {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px;
  justify-content: end;
  align-items: baseline;
}

.radarChange span {
  color: var(--muted);
  font-size: 0.72rem;
}

.radarChange b {
  font-size: 0.82rem;
}

.radarNumbers small.positive {
  color: var(--good);
}

.radarNumbers small.negative {
  color: var(--bad);
}

.radarNumbers small.neutral,
.radarChange.neutral b {
  color: var(--muted);
}

.radarEmpty {
  margin: 0;
  min-height: 72px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer span:first-child {
  color: var(--accent-strong);
  font-weight: 800;
}

.scrollTools {
  position: fixed;
  right: max(16px, calc((100vw - 1220px) / 2 - 58px));
  bottom: 22px;
  z-index: 15;
  display: grid;
  gap: 8px;
}

.scrollTools button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: rgba(241, 205, 130, 0.42);
  border-radius: 8px;
  background: rgba(9, 12, 15, 0.78);
  color: var(--accent-strong);
  font-size: 1.25rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}

.scrollTools button:hover {
  background: rgba(217, 181, 109, 0.18);
  filter: none;
}

.tableWrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 26, 32, 0.9);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28);
}

tbody tr {
  cursor: pointer;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1b232a;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.sortableHeader {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: inherit;
  font-weight: 800;
  text-transform: inherit;
}

th:first-child .sortableHeader {
  justify-content: flex-start;
}

.sortableHeader::after {
  content: "";
  width: 0;
  color: var(--accent-strong);
  opacity: 0;
}

.sortableHeader:hover,
.sortableHeader.active {
  color: var(--accent-strong);
  filter: none;
}

.sortableHeader.active::after {
  content: "↓";
  width: auto;
  opacity: 1;
}

.sortableHeader.active[data-direction="asc"]::after {
  content: "↑";
}

tbody tr:hover {
  background: rgba(126, 182, 217, 0.08);
}

.item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.item .englishName {
  color: var(--blue);
}

.positive {
  color: var(--good);
}

.negative {
  color: var(--bad);
}

.neutral {
  color: var(--muted);
}

.signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.signal.buy {
  border-color: rgba(91, 209, 143, 0.45);
  color: var(--good);
  background: rgba(91, 209, 143, 0.08);
}

.signal.watch {
  border-color: rgba(241, 205, 130, 0.44);
  color: var(--accent-strong);
  background: rgba(241, 205, 130, 0.08);
}

.signal.avoid {
  border-color: rgba(255, 115, 115, 0.45);
  color: var(--bad);
  background: rgba(255, 115, 115, 0.08);
}

.loading,
.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

.compareCheck {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

.rowActions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.favoriteToggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: rgba(241, 205, 130, 0.38);
  background: rgba(9, 12, 15, 0.42);
  color: var(--muted);
  font-size: 1.1rem;
}

.favoriteToggle.active {
  color: var(--accent-strong);
  background: rgba(241, 205, 130, 0.12);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 4px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.modal[hidden] {
  display: none;
}

.modalPanel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(217, 181, 109, 0.34);
  border-radius: 8px;
  background: #111820;
}

.modalClose {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modalHeader {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 90px;
}

.modalHeader img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.modalHeader h2 {
  margin: 0 0 4px;
}

.modalHeader span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 20px, 1220px);
    padding: 12px 0 28px;
  }

  .hero {
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 16px;
  }

  .brand {
    margin-bottom: 12px;
  }

  .brandMark {
    width: 38px;
    height: 38px;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .searchBox {
    grid-column: 1 / -1;
  }

  input,
  button,
  .buttonLink {
    width: 100%;
  }

  .suggestions {
    left: 0;
    right: auto;
    width: 100%;
    max-height: min(68vh, 520px);
  }

  .suggestion {
    grid-template-columns: 34px minmax(0, 1fr) auto 30px;
    min-height: 74px;
    gap: 8px;
    padding: 10px;
  }

  .suggestion strong {
    font-size: 0.98rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .suggestion small {
    display: -webkit-box;
    max-height: 2.5em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .suggestionPrice {
    font-size: 0.92rem;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .walletPanel,
  .investmentSummary {
    grid-template-columns: 1fr;
  }

  .pickerTools {
    grid-template-columns: 1fr;
  }

  .investmentTrends.compact {
    display: flex;
    flex-wrap: wrap;
  }

  .investmentCard {
    grid-template-columns: 36px 38px minmax(0, 1fr);
  }

  .investmentGain {
    grid-column: 3;
    text-align: left;
  }

  .investmentCard .saveInvestment {
    grid-column: 3;
  }

  .tradePlan {
    grid-template-columns: 1fr 1fr;
  }

  .tradePreview {
    grid-column: 1 / -1;
  }

  .portfolioItem {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .portfolioItem .movementNumbers,
  .portfolioItem .closeInvestment,
  .portfolioItem .deleteInvestment {
    grid-column: 2;
    text-align: left;
  }

  .movementItem {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .movementNumbers,
  .movementItem .signal {
    grid-column: 2;
    text-align: left;
  }

  .operationForm,
  .operationTop,
  .operationStats,
  .operationColumns,
  .entryForm {
    grid-template-columns: 1fr;
  }

  .operationResult {
    text-align: left;
  }

  .closeOperation {
    justify-self: stretch;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .favoritesPanel {
    padding: 14px;
  }

  .favoritesHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .favoritesList {
    grid-template-columns: 1fr;
  }

  .favoriteItem {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .favoriteItem strong {
    font-size: 0.96rem;
  }

  .favoriteMetrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .radarHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .radarHeader span {
    text-align: left;
  }

  .radarTab {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .radarItem {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
    min-height: 0;
    padding: 12px;
  }

  .miniChart {
    grid-column: 1 / -1;
    width: 100%;
    height: 52px;
    margin-top: 2px;
  }

  .radarNumbers {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .radarNumbers b,
  .radarNumbers small {
    display: inline-block;
  }

  .radarNumbers > b {
    grid-column: 1;
  }

  .radarNumbers > small:first-of-type {
    grid-column: 2;
    text-align: right;
  }

  .radarNumbers .investmentTrends {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .radarChange {
    justify-content: start;
  }

  .radarChange:nth-last-child(1) {
    justify-content: end;
  }

  .radarItem strong {
    font-size: 1rem;
  }

  .radarItem em {
    display: -webkit-box;
    max-height: 2.6em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .compareHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .compareActions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .compareRange {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .comparePill {
    width: 100%;
    grid-template-columns: 24px 1fr auto;
  }

  .footer {
    flex-direction: column;
  }

  .scrollTools {
    right: 12px;
    bottom: 76px;
  }

  .scrollTools button {
    width: 40px;
    height: 40px;
  }
}
